query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Returns the list of values for d | public double[] getDs() {
return this.ds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<T> values();",
"List getValues();",
"public List<V> values()\r\n\t{\r\n\t\tList<V> values = new ArrayList<V>();\r\n\t\t\r\n\t\tfor(Entry element : data)\r\n\t\t{\r\n\t\t\tvalues.add(element.value);\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn values;\r\n\t}",
"public List<Object> getValues();",
"@Override\n List<Value> values();",
"java.util.List<java.lang.String> getValuesList();",
"public List<V> values() {\n return values;\n }",
"public List<V> values() {\n return values;\n }",
"java.util.List<it.unipr.aotlab.dmat.core.generated.MatrixPieceTripletsBytesWire.Triplet> \n getValuesList();",
"public List<T> values() {\n return values(System.currentTimeMillis());\n }",
"public double[] getDoubleList();",
"@Override\n public List<V> values() {\n List<V> values = new AList<>();\n for(int i =0; i < capacity; i++){\n Entry n = (Entry)table[i];\n if(n != null && !n.isRemoved())\n values.add(n.getValue()); \n }\n assert values.size() == size;\n return values; \n }",
"public List<Long> values() {\n\t\treturn sample.values();\n\t}",
"Collection<V> values();",
"Collection<V> values();",
"public Iterable<V> values();",
"public List<String> getValues() {\n\t\treturn (new Vector<String>(this.values));\n\t}",
"public List getValues() {\r\n\t\tif (this.values == null) {\r\n\t\t\tthis.values = new ArrayList();\r\n\t\t}\r\n\t\treturn values;\r\n\t}",
"HCollection values();",
"public List<NeonValue> getValues();",
"public Collection<Object> values()\n {\n return data.values();\n }",
"@Override\n\tpublic Collection<V> values() {\n\t\tList<V> list = Util.newList();\n\t\tfor (K key : keys) {\n\t\t\tlist.add(map.get(key));\n\t\t}\n\t\t\n\t\treturn list;\n\t}",
"public Object[] getScriptOfValuesAsDouble() {\r\n\t\tArrayList valueDouble;\r\n\t\tvalueDouble = new ArrayList<Double>();\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (var.getType().equals(\"double\") || var.getType().equals(\"int\")) {\r\n\r\n\t\t\t\tif (var.getValue() != null && !var.getValue().equals(\"\") && !var.getValue().equals(\"NaN\")) {\r\n\r\n\t\t\t\t\tvalueDouble.add(var.getValue());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalueDouble.add(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tObject[] values = new Object[valueDouble.size()];\r\n\t\tint i = 0;\r\n\t\tfor (Object d : valueDouble) {\r\n\t\t\tif (d == null) {\r\n\t\t\t\td = 0.0;\r\n\t\t\t}\r\n\r\n\t\t\tvalues[i] = d;\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn values;\r\n\r\n\t}",
"public List<Double> getData( ) {\r\n return data;\r\n }",
"@Override\n public Collection<V> values() {\n Collection<V> values = new HashSet<V>(size());\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry != null) {\n values.add(entry.getValue());\n }\n }\n }\n return values;\n }",
"public Object[] getValues();",
"public Listof<V> vals() {\n return this.bst.toSortedList().map(i -> i.right);\n }",
"@Nonnull\n public <T extends Serializable> List<T> getValues() {\n final T[] ary = values();\n return Arrays.asList(ary);\n }",
"public java.util.List<java.lang.String> getValuesList() {\n return java.util.Collections.unmodifiableList(result.values_);\n }",
"@Override\n public Collection<T> values() {\n List<T> values = new ArrayList<>();\n for (Map.Entry<String, T> v : entries.values()) {\n values.add(v.getValue());\n }\n return values;\n }",
"public List getFieldValues()\n {\n return (List) m_values.clone();\n }",
"public ArrayList<Double> getAllValues()\n {\n return allValues;\n }",
"public ListVS<V> getValues() {\n ListVS<V> result = new ListVS<V>(getUniverse());\n for (V value : this.entries.values()) {\n result = result.add(value);\n }\n return result;\n }",
"Object[] getValues();",
"Object[] getValues();",
"@Override\n\tpublic Collection<V> values() {\n\t\t// TODO\n\t\treturn new ValueView();\n\t}",
"public List<XYValue> getValues() {\n return values;\n }",
"Values values();",
"public String getValueDs() {\n return this.valueDs;\n }",
"public String getValues() {\n\t\tString[] valStrArr = values.toArray(new String[values.size()]);\n\t\tlogInfo(String.join(\", \", valStrArr));\n\t\treturn \"\"+String.join(\", \", valStrArr);\n\t}",
"public Collection<V> values() {\r\n\t\t\tCollection<V> valueList = new ArrayList<V>();\r\n\t\t\tListNode current = header;\r\n\t\t\twhile (current != null) {\r\n\t\t\t\tvalueList.add(current.value);\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\treturn valueList;\r\n\t\t}",
"@JsonIgnore\n List<T> getValues();",
"public double[] getValues() {\n return values.clone();\n }",
"public List<Double> getData() {\n return data;\n }",
"T[] getValues();",
"public ArrayList<Double> getValues() {\n\n ArrayList<Double> values = new ArrayList<Double>(); //create new arraylist to return\n FreqNode tmpNode; //create temp node \n\n //traverse entire table \n for (FreqNode node : frequencyTable) {\n //set node \n tmpNode = node;\n while (true) {\n if (tmpNode == null) {\n break;\n } else {\n //add value to node in table and cast to double \n values.add((node.getValue() * 1.0));\n //set it to the next node \n tmpNode = tmpNode.getNext();\n } //end else \n }//end if \n }\n // Return the keys\n return values;\n }",
"public Collection<V> values() {\n\t\treturn new ValueCollection();\n\t}",
"public List<XYValue> getListOfValues() {\n\t\treturn listOfValues;\n\t}",
"public double[] ds() {\n double rval[] = new double[size()];\n for (int i = 0; i < rval.length; i++) {\n rval[i] = get(i) == null ? Double.NaN : get(i).doubleValue();\n }\n\n return rval;\n }",
"private List<MaskValue> maskAsList(Mask m) {\n List<MaskValue> mList = new ArrayList<>();\n for (int i = 0, maskLen = m.getSize(); i < maskLen; i++) {\n\n mList.add(m.getValue(i));\n }\n\n return mList;\n }",
"@Override\r\n\tpublic Collection<V> values() {\r\n\t\tCollection<V> valueList = new ArrayList<V>();\r\n\t\tfor (Object o : buckets) {\r\n\t\t\tBucket b = (Bucket) o;\r\n\t\t\tvalueList.addAll(b.values());\r\n\t\t}\r\n\t\treturn valueList;\r\n\t}",
"public String[] getValues()\n\t{\n\t\tString[] retArr = new String[values.size()];\n\n\t\tvalues.toArray(retArr);\n\n\t\treturn retArr;\n\t}",
"public List<A> getInValues() {\n return inValues;\n }",
"public Iterator<V> values();",
"public Iterator<V> values();",
"java.util.List<com.google.api.servicecontrol.v1.MetricValue> getMetricValuesList();",
"@Override\n\tpublic Collection<Value> values() {\n\t\tCollection<Value> c = new ArrayList<Value>();\n\t\tif (!isEmpty()) {\n\t\t\tFork<Key, Value> f = (Fork<Key, Value>) bst;\n\t\t\tEntry<Key, Value> e = new Entry<>(f.getKey().get(), f.getValue().get());\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tEntry<Key, Value>[] a = (Entry<Key, Value>[]) Array.newInstance(e.getClass(), size());\n\t\t\tbst.saveInOrder(a);\n\t\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\t\tc.add(a[i].getValue());\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}",
"public String[] getValues()\n {\n return values;\n }",
"public List<String> values() {\n return this.values;\n }",
"public Object[] getValues() {\n return this.values;\n }",
"List<String> d();",
"public synchronized List<T> getValues() {\n List<T> castVals = new ArrayList<>(values.size());\n for (Object obj : values) {\n castVals.add((T) obj);\n }\n return castVals;\n }",
"public Collection<Collection<V>> values() {\n return map.values();\n }",
"String getValues() {\n String r = x + \" \";\n Lista iter = new Lista(this);\n while(iter.next != null) {\n iter = iter.next;\n r += iter.x + \" \";\n } \n return r;\n }",
"java.util.List<java.lang.Integer> getStateValuesList();",
"@java.lang.Override\n public java.util.List<java.lang.Long>\n getValueList() {\n return value_;\n }",
"java.util.List<java.lang.String>\n getStrValuesList();",
"public Listof<V> sortedVals() {\n return this.bst.toSortedList().map(i -> i.right);\n }",
"public ArrayList<Integer> get_values()\r\n\t{\r\n\t\treturn this.poss_values;\r\n\t}",
"public Object[] getScriptOfValuesAsInt() {\r\n\t\tArrayList valueDouble;\r\n\t\tvalueDouble = new ArrayList<Integer>();\r\n\r\n\t\tfor (DataVariable var : dataTestModel) {\r\n\t\t\tif (var.getType().equals(\"double\") || var.getType().equals(\"int\")) {\r\n\r\n\t\t\t\tif (var.getValue() != null && !var.getValue().equals(\"\")) {\r\n\r\n\t\t\t\t\tvalueDouble.add(var.getValue());\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tvalueDouble.add(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tObject[] values = new Object[valueDouble.size()];\r\n\t\tint i = 0;\r\n\t\tfor (Object d : valueDouble) {\r\n\t\t\tif (d == null) {\r\n\t\t\t\td = 0;\r\n\t\t\t}\r\n\t\t\tvalues[i] = d;\r\n\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn values;\r\n\r\n\t}",
"public double[] getDoubleArray() {\r\n\t\treturn (value.getDoubleArray());\r\n\t}",
"public double[] getValues() {\n\t\tdouble[] values;\n\t\tif(getDictionary() instanceof MatrixBlockDictionary) {\n\t\t\tLOG.warn(\"Inefficient get values for constant column group (but it is allowed)\");\n\t\t\tfinal MatrixBlock mb = ((MatrixBlockDictionary) getDictionary()).getMatrixBlock();\n\t\t\tif(mb.isInSparseFormat()) {\n\t\t\t\tvalues = new double[mb.getNumColumns()];\n\t\t\t\tSparseBlock sb = mb.getSparseBlock();\n\t\t\t\tfinal int alen = sb.size(0);\n\t\t\t\tfinal double[] aval = sb.values(0);\n\t\t\t\tfinal int[] aix = sb.indexes(0);\n\t\t\t\tfor(int j = 0; j < alen; j++)\n\t\t\t\t\tvalues[aix[j]] = aval[j];\n\t\t\t}\n\t\t\telse\n\t\t\t\tvalues = mb.getDenseBlockValues();\n\t\t}\n\t\telse\n\t\t\tvalues = _dict.getValues();\n\t\treturn values;\n\t}",
"public double[] getValues(Array2D input) {\n\t\treturn listToDArray( getValuesD(input) );\n\t}",
"public Collection values() {\n return map.values();\n }",
"public java.util.List<java.lang.Integer> getValueList() {\n return java.util.Collections.unmodifiableList(result.value_);\n }",
"public Collection<V> values() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Collection<V> values() {\n\t\tArrayList<V> valores = new ArrayList<V>();\n\t\tIterator it = tabla.iterator();\n\t\tint i = 0;\n\t\twhile (it.hasNext()) {\n\t\t\tIterator it2 = tabla.get(i).valueSet().iterator();\n\t\t\tit.next();\n\t\t\tint j = 0;\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tit2.next();\n\t\t\t\tvalores.add(tabla.get(i).valueSet().get(j));\n\t\t\t\tj++;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn new HashSet<V>(valores);\n\t}",
"public V[] values() {\n MyStack<V> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current.getValue());\n current = current.getNext();\n }\n result.push(current.getValue());\n }\n }\n return result.toArray();\n }",
"java.util.List<java.lang.Integer> getRequestedValuesList();",
"public List<String> getV();",
"List<ChargeSummary> value();",
"List<String> getLookupValues();",
"@Override\n\tpublic Collection<V> values() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Collection<V> values() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Collection<V> values() {\n\t\treturn null;\n\t}",
"public List<String> getDataPoints() {\n Object[] dataPoints = (Object[])configMap.get(DATA_POINT);\n List<String> dps = Utility.downcast( dataPoints );\n return dps;\n }",
"public Collection<T> values(){\n\t\treturn null;\r\n\t\t//TODO\r\n\t}",
"java.util.List<KeyValuePair>\n getInfoList();",
"private static Object[][] getData(Database d) {\n\t\tdb = d;\n\t\tEntity[] data = db.getData();\n\t\tObject[][] toReturn = new Object[data.length][];\n\t\tfor(int i = 0; i < toReturn.length; i++) {\n\t\t\ttoReturn[i] = data[i].getObject();\n\t\t}\n\t\treturn toReturn;\n\t}",
"public abstract String[] getValues();",
"public List<ValueObject> getValueObjects()\r\n {\r\n List<ValueObject> vos = new ArrayList<ValueObject>();\r\n vos.add(getValueObject());\r\n return vos;\r\n }",
"public List<String> getValue() {\r\n return value;\r\n }",
"public java.util.List<java.lang.Long>\n getValueList() {\n return ((bitField0_ & 0x00000001) != 0) ?\n java.util.Collections.unmodifiableList(value_) : value_;\n }",
"@Override\n\tpublic ArregloDinamico<V> valueSet() {\n\t\tArregloDinamico<V> respuesta = new ArregloDinamico<V>(N);\n\t\tfor(int i = 0; i<M ; i++)\n\t\t{\n\t\t\tArregloDinamico<NodoTabla<K,V>> temporal = map.darElemento(i).getAll();\n\t\t\tfor(int j=0 ; j < temporal.size() ; j++)\n\t\t\t{\n\t\t\t\tNodoTabla<K,V> elemento = temporal.darElemento(j);\n\t\t\t\tif(elemento != null && elemento.darLlave() != null)\n\t\t\t\t\trespuesta.addLast(elemento.darValor());\t\n\t\t\t}\n\t\t}\n\t\treturn respuesta;\n\t}",
"public double[] getDoubles()\r\n {\r\n return resultDoubles;\r\n }",
"public List<Boolean> getValues() {\r\n\t\treturn values;\r\n\t}",
"public Collection<SingleValue> values() {\n return Collections.unmodifiableCollection(container.values());\n }",
"int[] getValues()\n {\n return values_;\n }",
"public Collection<String> valuesOfMap() {\n Map<String, String> tempMap = createSimpleMap(\"Fondue\",\"Cheese\");\n\t\treturn tempMap.values();\n\t}",
"public List<StatsObject> getData() {\n\t\tList<StatsObject> stats = new ArrayList<StatsObject>(data.values());\n\t\treturn stats;\n\n\t}"
] | [
"0.721996",
"0.718755",
"0.7114984",
"0.69275206",
"0.6861326",
"0.68281084",
"0.6669955",
"0.6669955",
"0.662396",
"0.65286833",
"0.6524202",
"0.6522868",
"0.64728343",
"0.6470909",
"0.6470909",
"0.6430983",
"0.6412161",
"0.64048773",
"0.64033115",
"0.63929635",
"0.6351749",
"0.6343453",
"0.63343346",
"0.6327463",
"0.63068473",
"0.630146",
"0.62783897",
"0.6264451",
"0.62530273",
"0.62463355",
"0.6237185",
"0.623165",
"0.6224951",
"0.622482",
"0.622482",
"0.62132573",
"0.6212033",
"0.6186808",
"0.61724037",
"0.61388856",
"0.6114743",
"0.6106336",
"0.6087285",
"0.6073979",
"0.6058864",
"0.60577345",
"0.6052327",
"0.6052184",
"0.60430884",
"0.6035431",
"0.6032585",
"0.6013142",
"0.6006454",
"0.5982353",
"0.5982353",
"0.59717095",
"0.59591264",
"0.59472114",
"0.59273154",
"0.59259737",
"0.59229386",
"0.59107465",
"0.5907297",
"0.5899944",
"0.58891803",
"0.58863765",
"0.5879802",
"0.5877569",
"0.5872494",
"0.58679396",
"0.5861907",
"0.5856668",
"0.5837657",
"0.583741",
"0.5834441",
"0.58282197",
"0.58266604",
"0.5824922",
"0.58046985",
"0.58003193",
"0.5798494",
"0.5795609",
"0.57826084",
"0.57826084",
"0.57826084",
"0.5769552",
"0.5764029",
"0.5759199",
"0.5755268",
"0.57415724",
"0.57305163",
"0.5713816",
"0.57069844",
"0.5700448",
"0.5678379",
"0.5677727",
"0.56685555",
"0.5663918",
"0.5662085",
"0.56618327"
] | 0.58787847 | 67 |
Calculates and returns the normalised normal to face; the normal is in the direction the face is 'facing', which is the direction from which the face's vertices are listed in clockwise order | private Vector normal(int[] face) {
Vector point0 = verts[face[0]];
Vector point1 = verts[face[1]];
Vector point2 = verts[face[2]];
return point1.subtract(point0).crossProduct(point2.subtract(point0)).normalise();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }",
"private Vector3f calcNormal(int loopStart) throws IOException {\n\t\t// calculating the normal of the polygon using the first 3 vertices \n\t\t// of the planar face:\n\t\t//\t\t\tvec3 ab = b - a;\n\t\t// vec3 ac = c - a;\n\t\t// vec3 normal = normalize(cross(ab, ac));\n\t\tMLoop loop = loops[loopStart + 0];\n\t\tCArrayFacade<Float> a = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 1];\n\t\tCArrayFacade<Float> b = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 2];\n\t\tCArrayFacade<Float> c = vertices[loop.getV()].getCo();\n\t\t\n\t\tVector3f ab = new Vector3f(b.get(0)-a.get(0), b.get(1)-a.get(1), b.get(2)-a.get(2));\n\t\tVector3f ac = new Vector3f(c.get(0)-a.get(0), c.get(1)-a.get(1), c.get(2)-a.get(2));\n\t\t\n\t\treturn ab.cross(ac);\n\t}",
"private void computeNormal() {\n normal = getDirection();\r\n\r\n // Rotate by -90 degrees to get normal of line\r\n float oldY = normal.y;\r\n normal.y = -normal.x;\r\n normal.x = oldY;\r\n }",
"private void calculateNormals() {\n int i;\n float[] l_vect1 = new float[3];\n float[] l_vect2 = new float[3];\n float[] l_vect3 = new float[3];\n float[] l_vect_b1;\n float[] l_vect_b2;\n float[] l_normal;\n\n normals = new float[faces.length*3];\n int normalIndex = 0;\n\n for (i=0; i<faces.length; i=i+3) {\n\n l_vect1[0] = vertices[faces[i] * 3];\n l_vect1[1] = vertices[faces[i] * 3 + 1];\n l_vect1[2] = vertices[faces[i] * 3 + 2];\n l_vect2[0] = vertices[faces[(i + 1)] * 3];\n l_vect2[1] = vertices[faces[(i + 1)] * 3 + 1];\n l_vect2[2] = vertices[faces[(i + 1)] * 3 + 2];\n l_vect3[0] = vertices[faces[(i + 2)] * 3];\n l_vect3[1] = vertices[faces[(i + 2)] * 3 + 1];\n l_vect3[2] = vertices[faces[(i + 2)] * 3 + 2];\n\n l_vect_b1 = VectorCreate(l_vect1, l_vect2);\n l_vect_b2 = VectorCreate(l_vect1, l_vect3);\n\n l_normal = VectorDotProduct(l_vect_b1, l_vect_b2);\n l_normal = VectorNormalize(l_normal);\n\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n }\n }",
"public VectorA normal()\n {\n return new VectorA(this.x/this.mag(), this.y/this.mag());\n }",
"public double getDirectionFace();",
"public static final Vector3f generateFaceNormal(Vector3f vert1, Vector3f vert2, Vector3f vert3) {\r\n\t\t\r\n\t\tVector3f v1 = new Vector3f(vert2);\r\n\t\tv1.sub(vert1);\r\n\t\t\r\n\t\tVector3f v2 = new Vector3f(vert3);\r\n\t\tv2.sub(vert1);\r\n\t\tv2.cross(v2, v1);\r\n\t\tv2.normalize();\r\n\t\t\r\n\t\treturn v2;\r\n\t}",
"public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }",
"final public Vector3 normalized(){\n return new Vector3(x/magnitude, y/magnitude, z/magnitude);\n }",
"public Vector3 getNormal() {\n\t\tdouble mag = this.magnitude();\n\t\tif (mag > 0) {\n\t\t\treturn new Vector3(\n\t\t\t\t\tthis.x/mag,\n\t\t\t\t\tthis.y/mag,\n\t\t\t\t\tthis.z/mag\n\t\t\t\t\t);\n\t\t} else {\n\t\t\treturn new Vector3();\n\t\t}\n\t}",
"IVec3 normalized();",
"public void calculateNormals() {\n // TODO!\n }",
"float norm();",
"public void updateFaceDir() {\n\t\tif (faceDirection != null)\n\t\t\tface(location.transform(faceDirection.getDiffX(),\n\t\t\t\t\tfaceDirection.getDiffY(), 0));\n\t}",
"public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}",
"public abstract Vector4fc normalize3();",
"public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}",
"public void drawNearClippedFace(int face) {\n\t\tint centerX = Draw3D.centerX;\n\t\tint centerY = Draw3D.centerY;\n\t\tint elements = 0;\n\n\t\tint a = faceVertexA[face];\n\t\tint b = faceVertexB[face];\n\t\tint c = faceVertexC[face];\n\n\t\tint zA = vertexViewSpaceZ[a];\n\t\tint zB = vertexViewSpaceZ[b];\n\t\tint zC = vertexViewSpaceZ[c];\n\n\t\tif (zA >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[a];\n\t\t\tclippedY[elements] = vertexScreenY[a];\n\t\t\tclippedColor[elements++] = faceColorA[face];\n\t\t} else {\n\t\t\tint xA = vertexViewSpaceX[a];\n\t\t\tint yA = vertexViewSpaceY[a];\n\t\t\tint colorA = faceColorA[face];\n\n\t\t\tif (zC >= 50) {\n\t\t\t\tint scalar = (50 - zA) * reciprical16[zC - zA];\n\t\t\t\tclippedX[elements] = centerX + (((xA + (((vertexViewSpaceX[c] - xA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yA + (((vertexViewSpaceY[c] - yA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorA + (((faceColorC[face] - colorA) * scalar) >> 16);\n\t\t\t}\n\n\t\t\tif (zB >= 50) {\n\t\t\t\tint scalar = (50 - zA) * reciprical16[zB - zA];\n\t\t\t\tclippedX[elements] = centerX + (((xA + (((vertexViewSpaceX[b] - xA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yA + (((vertexViewSpaceY[b] - yA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorA + (((faceColorB[face] - colorA) * scalar) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tif (zB >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[b];\n\t\t\tclippedY[elements] = vertexScreenY[b];\n\t\t\tclippedColor[elements++] = faceColorB[face];\n\t\t} else {\n\t\t\tint xB = vertexViewSpaceX[b];\n\t\t\tint yB = vertexViewSpaceY[b];\n\t\t\tint colorB = faceColorB[face];\n\n\t\t\tif (zA >= 50) {\n\t\t\t\tint scalar = (50 - zB) * reciprical16[zA - zB];\n\t\t\t\tclippedX[elements] = centerX + (((xB + (((vertexViewSpaceX[a] - xB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yB + (((vertexViewSpaceY[a] - yB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorB + (((faceColorA[face] - colorB) * scalar) >> 16);\n\t\t\t}\n\n\t\t\tif (zC >= 50) {\n\t\t\t\tint scalar = (50 - zB) * reciprical16[zC - zB];\n\t\t\t\tclippedX[elements] = centerX + (((xB + (((vertexViewSpaceX[c] - xB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yB + (((vertexViewSpaceY[c] - yB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorB + (((faceColorC[face] - colorB) * scalar) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tif (zC >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[c];\n\t\t\tclippedY[elements] = vertexScreenY[c];\n\t\t\tclippedColor[elements++] = faceColorC[face];\n\t\t} else {\n\t\t\tint xC = vertexViewSpaceX[c];\n\t\t\tint yC = vertexViewSpaceY[c];\n\t\t\tint colorC = faceColorC[face];\n\n\t\t\tif (zB >= 50) {\n\t\t\t\tint k6 = (50 - zC) * reciprical16[zB - zC];\n\t\t\t\tclippedX[elements] = centerX + (((xC + (((vertexViewSpaceX[b] - xC) * k6) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yC + (((vertexViewSpaceY[b] - yC) * k6) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorC + (((faceColorB[face] - colorC) * k6) >> 16);\n\t\t\t}\n\n\t\t\tif (zA >= 50) {\n\t\t\t\tint l6 = (50 - zC) * reciprical16[zA - zC];\n\t\t\t\tclippedX[elements] = centerX + (((xC + (((vertexViewSpaceX[a] - xC) * l6) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yC + (((vertexViewSpaceY[a] - yC) * l6) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorC + (((faceColorA[face] - colorC) * l6) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tint x0 = clippedX[0];\n\t\tint x1 = clippedX[1];\n\t\tint x2 = clippedX[2];\n\t\tint y0 = clippedY[0];\n\t\tint y1 = clippedY[1];\n\t\tint y2 = clippedY[2];\n\n\t\t// Back-face culling\n\t\tif ((((x0 - x1) * (y2 - y1)) - ((y0 - y1) * (x2 - x1))) <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tDraw3D.clipX = false;\n\n\t\t// It's possible for a single triangle to be clipped into two separate triangles.\n\n\t\tif (elements == 3) {\n\t\t\tif ((x0 < 0) || (x1 < 0) || (x2 < 0) || (x0 > Draw2D.boundX) || (x1 > Draw2D.boundX) || (x2 > Draw2D.boundX)) {\n\t\t\t\tDraw3D.clipX = true;\n\t\t\t}\n\n\t\t\tint type;\n\n\t\t\tif (faceInfo == null) {\n\t\t\t\ttype = 0;\n\t\t\t} else {\n\t\t\t\ttype = faceInfo[face] & 3;\n\t\t\t}\n\n\t\t\tif (type == 0) {\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2]);\n\t\t\t} else if (type == 1) {\n\t\t\t\tDraw3D.fillTriangle(y0, y1, y2, x0, x1, x2, palette[faceColorA[face]]);\n\t\t\t} else if (type == 2) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t} else if (type == 3) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t}\n\t\t} else if (elements == 4) {\n\t\t\tif ((x0 < 0) || (x1 < 0) || (x2 < 0) || (x0 > Draw2D.boundX) || (x1 > Draw2D.boundX) || (x2 > Draw2D.boundX) || (clippedX[3] < 0) || (clippedX[3] > Draw2D.boundX)) {\n\t\t\t\tDraw3D.clipX = true;\n\t\t\t}\n\n\t\t\tint type;\n\n\t\t\tif (faceInfo == null) {\n\t\t\t\ttype = 0;\n\t\t\t} else {\n\t\t\t\ttype = faceInfo[face] & 3;\n\t\t\t}\n\n\t\t\tif (type == 0) {\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2]);\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], clippedColor[0], clippedColor[2], clippedColor[3]);\n\t\t\t} else if (type == 1) {\n\t\t\t\tint colorA = palette[faceColorA[face]];\n\t\t\t\tDraw3D.fillTriangle(y0, y1, y2, x0, x1, x2, colorA);\n\t\t\t\tDraw3D.fillTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], colorA);\n\t\t\t} else if (type == 2) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], clippedColor[0], clippedColor[2], clippedColor[3], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t} else if (type == 3) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t}\n\t\t}\n\t}",
"public Vector3f getNormalVertice(int i) {\n\t\treturn normalVertices.get(i);\n\t}",
"public void normalize()\n {\n double magnitude = this.magnitude();\n this.x = x / (float)magnitude;\n this.y = y / (float)magnitude;\n this.z = z / (float)magnitude;\n this.w = w / (float)magnitude;\n }",
"void computeTriangleNormals();",
"@Override\n Vector calculate_normal_vector(Point hitPoint, int surface) {\n Point origin = new Point(0, 0, 0);\n return getInternalTransformer().substraction_to_vector(hitPoint, origin);\n }",
"public float[] getNormals() {\r\n\t\treturn normals;\r\n\t}",
"public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }",
"private void getNormalVector(Conformer conformer, int[] atom, double[] n) {\n\t\t// calculate the three vectors leading from atom[0] to the other three atoms\n\t\tdouble[][] coords = new double[2][3];\n\t\tfor (int i=0; i<2; i++) {\n\t\t\tcoords[i][0] = conformer.getX(atom[i+1]) - conformer.getX(atom[0]);\n\t\t\tcoords[i][1] = conformer.getY(atom[i+1]) - conformer.getY(atom[0]);\n\t\t\tcoords[i][2] = conformer.getZ(atom[i+1]) - conformer.getZ(atom[0]);\n\t\t\t}\n\n\t\t// calculate the normal vector (vector product of coords[0] and coords[1])\n\t\tn[0] = coords[0][1]*coords[1][2]-coords[0][2]*coords[1][1];\n\t\tn[1] = coords[0][2]*coords[1][0]-coords[0][0]*coords[1][2];\n\t\tn[2] = coords[0][0]*coords[1][1]-coords[0][1]*coords[1][0];\n\n\t\tdouble l = Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);\n\t\tn[0] /= l;\n\t\tn[1] /= l;\n\t\tn[2] /= l;\n\t\t}",
"public Vector2D normal()\n\t{\n\t\treturn this.mul(1/this.length());\n\t}",
"public Point4 getNormal();",
"private Vector3f getPlaneNormal(Vector3f directionVector) {\n\t\tVector3f up = new Vector3f(0, 0, 1);\n\t\tif (directionVector.z == 1 || directionVector.z == -1)\n\t\t\tup.set(0, 1, 0);\n\n\t\tfloat dirX = directionVector.x;\n\t\tfloat dirY = directionVector.y;\n\t\tfloat dirZ = directionVector.z;\n\t\tfloat upX = up.x;\n\t\tfloat upY = up.y;\n\t\tfloat upZ = up.z;\n\n\t\t// right = direction x up\n\t\tfloat rightX, rightY, rightZ;\n\t\trightX = dirY * upZ - dirZ * upY;\n\t\trightY = dirZ * upX - dirX * upZ;\n\t\trightZ = dirX * upY - dirY * upX;\n\t\t// normalize right\n\t\tfloat invRightLength = 1.0f / (float) Math.sqrt(rightX * rightX + rightY * rightY + rightZ * rightZ);\n\t\trightX *= invRightLength;\n\t\trightY *= invRightLength;\n\t\trightZ *= invRightLength;\n\n\t\treturn new Vector3f(rightX, rightY, rightZ);\n\t}",
"@java.lang.Override\n public godot.wire.Wire.Vector3 getNormal() {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }",
"public void flipNormal() {\n int i, j;\n\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n points[i][j].z = -points[i][j].z;\n }\n }\n\n for (i = 0; i < (int) ((double) nr_of_segments / step); i++) {\n for (j = 0; j < (int) ((double) points_per_segment / step); j++) {\n evaluated_points[i][j].z = -evaluated_points[i][j].z;\n }\n }\n\n }",
"public Vector normalize ( );",
"godot.wire.Wire.Vector3 getNormal();",
"public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}",
"private double[][] normalize (float[][] in) {\n\n\t\tdouble[][] temp = new double[in.length][2];\n\n\t\t// Get centroid\n\t\tfloat[] centroid = getCentroid(in);\n\n\t\t// Normalize\n\t\tfor(int i = 0; i < in.length; i++) {\n\t\t\ttemp[i][0] = in[i][0] - centroid[0];\n\t\t\ttemp[i][1] = in[i][1] - centroid[1];\n\t\t}\n\n\t\treturn temp;\n\t}",
"public abstract Vector4fc normalize(float length);",
"public Vector3 normalized() {\n float length = length();\n return new Vector3(x / length, y / length, z / length);\n }",
"public float[] getNormals(float[] input) {\n\t\tVector<Float> result = new Vector<Float>();\n\t\t//get the three vertices of the triangle and calculate vector normal\n\t\tfor (int i = 0; i < input.length; i += 9) {\n\t\t\tPoint3D a = new Point3D(input[i], input[i + 1], input[i + 2]);\n\t\t\tPoint3D b = new Point3D(input[i + 3], input[i + 4], input[i + 5]);\n\t\t\tPoint3D c = new Point3D(input[i + 6], input[i + 7], input[i + 8]);\n\t\t\tPoint3D p1 = a.minus(b);\n\t\t\tPoint3D p2 = a.minus(c);\n\n\t\t\tVector3D e1 = new Vector3D(p1);\n\t\t\tVector3D e2 = new Vector3D(p2);\n\t\t\tVector3D n = e1.cross(e2).normalize();\n\t\t\t//add normal's components to the result array\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tresult.add((float) n.getX());\n\t\t\t\t// System.out.print(n.getX());\n\t\t\t\tresult.add((float) n.getY());\n\t\t\t\t// System.out.print(n.getY());\n\t\t\t\tresult.add((float) n.getZ());\n\t\t\t\t// System.out.print(n.getZ());\n\t\t\t\t// System.out.println();\n\t\t\t}\n\n\t\t}\n\t\treturn ArrayUtils.toPrimitive(result.toArray(new Float[0]));\n\n\t}",
"public void calculateAlbedoAndSurfaceNormals() {\n\t\tRealMatrix STranspose = this.S.transpose();\n\t\tdouble[][] p = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] nx = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] ny = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] nz = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\t\n\t\tRealMatrix gMatrix = null;\n\t\tfor(int i=0; i < I1.getColumnDimension(); i++) {\n\t\t\tfor (int j=0; j < I1.getRowDimension(); j++) {\n\t\t\t\t\n\t\t\t\t// Stacking our 'I's.\n\t\t\t\tdouble[][] intensityMatrixData = { {I1.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I2.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I3.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I4.getEntry(i, j)}\n\t\t\t\t\t\t \t\t\t \t };\n\t\t\t\tRealMatrix intensityMatrix = MatrixUtils.createRealMatrix(intensityMatrixData);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Pseudo-Inverse step multiplied by 'I'.\n\t\t\t\tgMatrix = new LUDecomposition(STranspose.multiply(scalarMultiplication(intensityMatrix, this.S)))\n\t\t\t\t\t.getSolver()\n\t\t\t\t\t.getInverse()\n\t\t\t\t\t.multiply(STranspose)\n\t\t\t\t\t.multiply(scalarMultiplication(intensityMatrix, intensityMatrix));\n\t\t\t\t\n\t\t\t\t// Calculating the albedo.\n\t\t\t\tp[i][j] = (Math.sqrt(Math.pow(gMatrix.getEntry(0, 0), 2)+\n\t\t\t\t\t\t Math.pow(gMatrix.getEntry(1, 0), 2)+\n\t\t\t\t\t\t Math.pow(gMatrix.getEntry(2, 0), 2)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (p[i][j] > 1) {\n\t\t\t\t\tSystem.out.println(\"wrong!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Calculating the surface normals.\n\t\t\t\tnx[i][j] = gMatrix.getEntry(0, 0) / p[i][j];\n\t\t\t\tny[i][j] = gMatrix.getEntry(1, 0) / p[i][j];\n\t\t\t\tnz[i][j] = gMatrix.getEntry(2, 0) / p[i][j];\n\t\t\t}\n\n\t\t}\n\t\tthis.P = MatrixUtils.createRealMatrix(p);\n\t\tthis.Nx = MatrixUtils.createRealMatrix(nx).transpose();\n\t\tthis.Ny = MatrixUtils.createRealMatrix(ny).transpose();\n\t\tthis.Nz = MatrixUtils.createRealMatrix(nz).transpose();\t\n\t}",
"public Vector[] getNormals() {\n\t\treturn this.normals;\n\t}",
"public Vector4 normalized()\n {\n double magnitude = this.magnitude();\n\n float normalizeX = x / (float)magnitude;\n float normalizeY = y / (float)magnitude;\n float normalizeZ = z / (float)magnitude;\n float normalizeW = w / (float)magnitude;\n\n return new Vector4(normalizeX, normalizeY, normalizeZ, normalizeW);\n }",
"public Vector3 normalized() {\n\t\tif (isZeroVector(this)) {\n\t\t\treturn this;\n\t\t}\n\t\treturn new Vector3(x / norm(), y / norm(), z / norm());\n\t}",
"private float normalize(float angle) {\n\t\tfloat a = angle;\n\t\twhile (a > 180)\n\t\t\ta -= 360;\n\t\twhile (a < -180)\n\t\t\ta += 360;\n\t\treturn a;\n\t}",
"public void normalize() {\r\n\t\tfloat length = (float) this.lenght();\r\n\t\tif (length > 0) {\r\n\t\t\tx /= length;\r\n\t\t\ty /= length;\r\n\t\t\tz /= length;\r\n\t\t}\r\n\t}",
"public void normal(PointType n)\r\n {\r\n\t //System.out.println(\"norm: \"+n.x+\", \"+n.y+\", \"+n.z);\r\n\t\tgl.glNormal3d(n.x, n.y, n.z);\t\t\r\n\t}",
"public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}",
"private Vector3f calculateVectorDirectionBetweenEyeAndCenter() {\n\t\tVector3f br = new Vector3f();\n\n\t\tbr.x = player.getPosition().x - camera.getPosition().x;\n\t\tbr.y = player.getPosition().y - camera.getPosition().y;\n\t\tbr.z = player.getPosition().z - camera.getPosition().z;\n\n\t\treturn br;\n\t}",
"private static Vector3f getNormal(double[] a, double[] b)\n\t{\n\t\tfloat vectorX = (float)(a[FTContour.X] - b[FTContour.X]);\n\t\tfloat vectorY = (float)(a[FTContour.Y] - b[FTContour.Y]);\n\n\t\tfloat length = (float)Math.sqrt(vectorX * vectorX + vectorY * vectorY);\n\n\t\tif (length > 0.0f)\n\t\t{\n\t\t\tlength = 1 / length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlength = 0.0f;\n\t\t}\n\n\t\treturn new Vector3f((float)vectorY * length, (float)-vectorX * length, 0.0f);\n\t}",
"public SbVec3f getNormal() { return worldNormal; }",
"float norm2();",
"float[][] getCameraVectorsNormal(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vectors[j*resX+i]=normalize(vectors[j*resX+i]);\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }",
"private void normalize() {\n this.x = (this.x - RobocodeRunner.width / 2) / RobocodeRunner.width;\n this.y = (this.y - RobocodeRunner.height / 2) / RobocodeRunner.height;\n this.distance /= Math.sqrt(RobocodeRunner.width * RobocodeRunner.width + RobocodeRunner.height * RobocodeRunner.height);\n this.enemyHeading /= 90;\n this.enemyDx /= 8;\n this.enemyDy /= 8;\n this.gunToTurn /= 180;\n this.angle /= 180;\n }",
"public Vector2f normalizeLocal ()\n {\n return normalize(this);\n }",
"public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}",
"@Override\n public Vector getNormal(Point3D p) {\n Vector O_P= p.subtract(_center);\n return O_P.normalize();\n // return null;\n }",
"public void updateDirectionFace();",
"public godot.wire.Wire.Vector3 getNormal() {\n if (normalBuilder_ == null) {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n } else {\n return normalBuilder_.getMessage();\n }\n }",
"public Vector2f[] getNormals() {\n\t\treturn normals.clone();\n\t}",
"public double norm() {\n\t\treturn Math.sqrt(x * x + y * y + z * z);\n\t}",
"private void normalizeOrientation() {\n\t\twhile (this.orientation >= 2 * Math.PI) {\n\t\t\torientation -= 2 * Math.PI;\n\t\t}\n\t\twhile (this.orientation < 0) {\n\t\t\torientation += 2 * Math.PI;\n\t\t}\n\t}",
"public void normalize() {\n\t\tVector initPos = palmData.get(0)[0];\n\n\t\tfor (int i=1; i<length; i++) { //skip first frame\n\t\t\t//normalize palm\n\t\t\tVector framePos = palmData.get(i)[0];\n\n\t\t\tframePos.setX(framePos.getX() - initPos.getX());\n\t\t\tframePos.setY(framePos.getY() - initPos.getY());\n\t\t\tframePos.setZ(framePos.getZ() - initPos.getZ());\n\n\t\t\t//normalize fingers\n\t\t\tfor (int j=0; j<5; j++) {\n\t\t\t\tVector fingerPos = fingerData.get(i)[j][0];\n\n\t\t\t\tif (fingerPos != null) {\n\t\t\t\t\tif (rightHanded) {\n\t\t\t\t\t\tfingerPos.setX(fingerPos.getX() - initPos.getX());\n\t\t\t\t\t\tfingerPos.setY(fingerPos.getY() - initPos.getY());\n\t\t\t\t\t\tfingerPos.setZ(fingerPos.getZ() - initPos.getZ());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfingerPos.setX(-(fingerPos.getX() - initPos.getX()));\n\t\t\t\t\t\tfingerPos.setY(-(fingerPos.getY() - initPos.getY()));\n\t\t\t\t\t\tfingerPos.setZ(-(fingerPos.getZ() - initPos.getZ()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tVector framePos = palmData.get(0)[0];\n\n\t\t//set first frame\n\t\tpalmData.get(0)[0].setX(framePos.getX() - initPos.getX());\n\t\tpalmData.get(0)[0].setY(framePos.getY() - initPos.getY());\n\t\tpalmData.get(0)[0].setZ(framePos.getZ() - initPos.getZ());\n\n\t\t//normalize fingers\n\t\tfor (int i=0; i<5; i++) {\n\t\t\tVector fingerPos = fingerData.get(0)[i][0];\n\n\t\t\tif (fingerPos != null) {\n\t\t\t\tfingerPos.setX(fingerPos.getX() - initPos.getX());\n\t\t\t\tfingerPos.setY(fingerPos.getY() - initPos.getY());\n\t\t\t\tfingerPos.setZ(fingerPos.getZ() - initPos.getZ());\n\t\t\t}\n\t\t}\n\t}",
"public Point3D normalize() {\n\t\treturn this.divide(Math.sqrt(x*x + y*y + z*z));\n\t}",
"@Override\n public Vector getFacingVector() {\n double[] rotation = {Math.cos(this.rot), Math.sin(this.rot)};\n Vector v = new Vector(rotation);\n v = VectorUtil.direction(v);\n Vector w = VectorUtil.direction(this.getR());\n v.plus(w);\n return v;\n }",
"public SbVec3f\ngetObjectNormal() {\n\treturn getObjectNormal(null);\n}",
"public float normalize() {\r\n\t\tfloat length = mDirection.length();\r\n\t\tif (length>0) {\r\n\t\t\tmDirection.normalize();\r\n\t\t}\r\n\t\treturn length;\r\n\t}",
"@Override\n\tpublic Vector getNormal(Point3D point) {\n\t\tdouble temp=axisRay.getDir().dotProduct(point.subtract(axisRay.getP0()));\n\t\tif(Util.isZero(temp/100))return (point.subtract(Point3D.ZERO)).normalize();\n\t\tPoint3D O=axisRay.getP0().add(axisRay.getDir().scale(temp));\n\t\treturn (point.subtract(O)).normalize();\n\n\t}",
"public Vector3 normalizeLocal () {\n return normalize(this);\n }",
"public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }",
"public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}",
"boolean getNormal();",
"public Vector getNormal(Point3D point) {\r\n\t\treturn point.subtract(centerPoint).normalize();\r\n\t}",
"@Override\r\n\tprotected Ray normalAt(double xx, double yy, double zz) {\n\t\treturn null;\r\n\t}",
"public void computeTextureUVCoordinates()\n\t{\n\t\tthis.faceTextureUCoordinates = new float[faceCount][];\n\t\tthis.faceTextureVCoordinates = new float[faceCount][];\n\n\t\tfor (int i = 0; i < faceCount; i++)\n\t\t{\n\t\t\tint textureCoordinate;\n\t\t\tif (textureCoordinates == null)\n\t\t\t{\n\t\t\t\ttextureCoordinate = -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttextureCoordinate = textureCoordinates[i];\n\t\t\t}\n\n\t\t\tint textureIdx;\n\t\t\tif (faceTextures == null)\n\t\t\t{\n\t\t\t\ttextureIdx = -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttextureIdx = faceTextures[i] & 0xFFFF;\n\t\t\t}\n\n\t\t\tif (textureIdx != -1)\n\t\t\t{\n\t\t\t\tfloat[] u = new float[3];\n\t\t\t\tfloat[] v = new float[3];\n\n\t\t\t\tif (textureCoordinate == -1)\n\t\t\t\t{\n\t\t\t\t\tu[0] = 0.0F;\n\t\t\t\t\tv[0] = 1.0F;\n\n\t\t\t\t\tu[1] = 1.0F;\n\t\t\t\t\tv[1] = 1.0F;\n\n\t\t\t\t\tu[2] = 0.0F;\n\t\t\t\t\tv[2] = 0.0F;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextureCoordinate &= 0xFF;\n\n\t\t\t\t\tbyte textureRenderType = 0;\n\t\t\t\t\tif (textureRenderTypes != null)\n\t\t\t\t\t{\n\t\t\t\t\t\ttextureRenderType = textureRenderTypes[textureCoordinate];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (textureRenderType == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint faceVertexIdx1 = faceVertexIndices1[i];\n\t\t\t\t\t\tint faceVertexIdx2 = faceVertexIndices2[i];\n\t\t\t\t\t\tint faceVertexIdx3 = faceVertexIndices3[i];\n\n\t\t\t\t\t\tshort triangleVertexIdx1 = textureTriangleVertexIndices1[textureCoordinate];\n\t\t\t\t\t\tshort triangleVertexIdx2 = textureTriangleVertexIndices2[textureCoordinate];\n\t\t\t\t\t\tshort triangleVertexIdx3 = textureTriangleVertexIndices3[textureCoordinate];\n\n\t\t\t\t\t\tfloat triangleX = (float) vertexPositionsX[triangleVertexIdx1];\n\t\t\t\t\t\tfloat triangleY = (float) vertexPositionsY[triangleVertexIdx1];\n\t\t\t\t\t\tfloat triangleZ = (float) vertexPositionsZ[triangleVertexIdx1];\n\n\t\t\t\t\t\tfloat f_882_ = (float) vertexPositionsX[triangleVertexIdx2] - triangleX;\n\t\t\t\t\t\tfloat f_883_ = (float) vertexPositionsY[triangleVertexIdx2] - triangleY;\n\t\t\t\t\t\tfloat f_884_ = (float) vertexPositionsZ[triangleVertexIdx2] - triangleZ;\n\t\t\t\t\t\tfloat f_885_ = (float) vertexPositionsX[triangleVertexIdx3] - triangleX;\n\t\t\t\t\t\tfloat f_886_ = (float) vertexPositionsY[triangleVertexIdx3] - triangleY;\n\t\t\t\t\t\tfloat f_887_ = (float) vertexPositionsZ[triangleVertexIdx3] - triangleZ;\n\t\t\t\t\t\tfloat f_888_ = (float) vertexPositionsX[faceVertexIdx1] - triangleX;\n\t\t\t\t\t\tfloat f_889_ = (float) vertexPositionsY[faceVertexIdx1] - triangleY;\n\t\t\t\t\t\tfloat f_890_ = (float) vertexPositionsZ[faceVertexIdx1] - triangleZ;\n\t\t\t\t\t\tfloat f_891_ = (float) vertexPositionsX[faceVertexIdx2] - triangleX;\n\t\t\t\t\t\tfloat f_892_ = (float) vertexPositionsY[faceVertexIdx2] - triangleY;\n\t\t\t\t\t\tfloat f_893_ = (float) vertexPositionsZ[faceVertexIdx2] - triangleZ;\n\t\t\t\t\t\tfloat f_894_ = (float) vertexPositionsX[faceVertexIdx3] - triangleX;\n\t\t\t\t\t\tfloat f_895_ = (float) vertexPositionsY[faceVertexIdx3] - triangleY;\n\t\t\t\t\t\tfloat f_896_ = (float) vertexPositionsZ[faceVertexIdx3] - triangleZ;\n\n\t\t\t\t\t\tfloat f_897_ = f_883_ * f_887_ - f_884_ * f_886_;\n\t\t\t\t\t\tfloat f_898_ = f_884_ * f_885_ - f_882_ * f_887_;\n\t\t\t\t\t\tfloat f_899_ = f_882_ * f_886_ - f_883_ * f_885_;\n\t\t\t\t\t\tfloat f_900_ = f_886_ * f_899_ - f_887_ * f_898_;\n\t\t\t\t\t\tfloat f_901_ = f_887_ * f_897_ - f_885_ * f_899_;\n\t\t\t\t\t\tfloat f_902_ = f_885_ * f_898_ - f_886_ * f_897_;\n\t\t\t\t\t\tfloat f_903_ = 1.0F / (f_900_ * f_882_ + f_901_ * f_883_ + f_902_ * f_884_);\n\n\t\t\t\t\t\tu[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_;\n\t\t\t\t\t\tu[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_;\n\t\t\t\t\t\tu[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_;\n\n\t\t\t\t\t\tf_900_ = f_883_ * f_899_ - f_884_ * f_898_;\n\t\t\t\t\t\tf_901_ = f_884_ * f_897_ - f_882_ * f_899_;\n\t\t\t\t\t\tf_902_ = f_882_ * f_898_ - f_883_ * f_897_;\n\t\t\t\t\t\tf_903_ = 1.0F / (f_900_ * f_885_ + f_901_ * f_886_ + f_902_ * f_887_);\n\n\t\t\t\t\t\tv[0] = (f_900_ * f_888_ + f_901_ * f_889_ + f_902_ * f_890_) * f_903_;\n\t\t\t\t\t\tv[1] = (f_900_ * f_891_ + f_901_ * f_892_ + f_902_ * f_893_) * f_903_;\n\t\t\t\t\t\tv[2] = (f_900_ * f_894_ + f_901_ * f_895_ + f_902_ * f_896_) * f_903_;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.faceTextureUCoordinates[i] = u;\n\t\t\t\tthis.faceTextureVCoordinates[i] = v;\n\t\t\t}\n\t\t}\n\t}",
"double normaliseHeading(double ang) {\r\n\t\tif (ang > 2 * PI)\r\n\t\t\tang -= 2 * PI;\r\n\t\tif (ang < 0)\r\n\t\t\tang += 2 * PI;\r\n\t\treturn ang;\r\n\t}",
"private double[] getNormalVector(Conformer conformer, int[] atom) {\n\t\tdouble[] n = new double[3];\n\t\tgetNormalVector(conformer, atom, n);\n\t\treturn n;\n\t\t}",
"public void triangulate() {\n // Save the outline and calculate normals\n outline = new Vector<PlanarEdge>();\n for (PlanarEdge e : subdivision.getEdges()) {\n if (e.isRealEdge()) {\n outline.add(e);\n }\n }\n // Calculate outline normals\n outline_normals = new Vector3f[outline.size()];\n for (PlanarEdge e : outline) {\n TriangulationVertex vert = (TriangulationVertex) e.getDestination();\n // Normal 1\n Vector3f normal1 = new Vector3f(vert.getOutGoingEdge()\n .getDestination().getPoint())\n .subtractLocal(vert.getPoint()).normalizeLocal();\n // Vector3f normal1 = new\n // Vector3f(vert.getOutGoingEdge().getDestination().getPoint()).subtractLocal(vert.getPoint());\n normal1.z = -normal1.x;\n normal1.x = normal1.y;\n normal1.y = normal1.z;\n normal1.z = 0;\n // Normal 2\n Vector3f normal2 = new Vector3f(vert.getPoint()).subtractLocal(\n vert.getInGoingEdge().getOrigin().getPoint())\n .normalizeLocal();\n // Vector3f normal2 = new\n // Vector3f(vert.getPoint()).subtractLocal(vert.getInGoingEdge().getOrigin().getPoint());\n normal2.z = -normal2.x;\n normal2.x = normal2.y;\n normal2.y = normal2.z;\n normal2.z = 0;\n normal1.addLocal(normal2).normalizeLocal();\n\n outline_normals[vert.getIndex()] = normal1;\n }\n\n // Calculate the triangulation of the surface.\n surface = subdivision.triangulate();\n }",
"public void calcNormal() {\n nx = y2 - y1;\n ny = x1 - x2;\n }",
"public Vector Normalize(){\n float magnitude = Magnitude();\n for(int i = 0; i < axis.length; i++){\n axis[i] /= magnitude;\n }\n return this;\n }",
"public float[] getHitNormal();",
"public INormalizer getNormalizer();",
"private Point3D findNormalAtPoint(Point3D hitPoint) {\n double x = hitPoint.getX();\n double y = hitPoint.getY();\n double z = hitPoint.getZ();\n double normalX = 2 * a * x + e * z + f * y + g;\n double normalY = 2 * b * y + d * z + f * x + h;\n double normalZ = 2 * c * z + d * y + e * x + i;\n return new Point3D(normalX, normalY, normalZ).normalize();\n }",
"@Override\n public Vector getNormal(Point3D P) {\n Point3D O = _center;\n Vector n = P.subtract(O);\n return n.normalized();\n }",
"private Point3 _getIntersection(Point3 eye, Point3 direction) {\n int size = NORMALS.length;\n float tresult;\n Point4 norm; // normal of face hit\n Plane plane; // plane equation\n float tnear, tfar, t, vn, vd;\n int front = 0, back = 0; // front/back face # hit\n\n tnear = -1.0e+20f; // -HUGE_VAL\n tfar = +1.0e+20f; // tmax\n for (int i = 0; i < size; i++) {\n\n plane = _planes[i];\n\n vd = plane.dot(direction);\n vn = plane.distance(eye);\n if (vd == 0.0f) {\n // ray is parallel to plane -\n // check if ray origin is inside plane's\n // half-space\n if (vn < 0.0f) {\n return null;\n }\n\n } else {\n // ray not parallel - get distance to plane\n t = -vn / vd;\n if (vd > 0.0f) {\n\n if (t > tfar) {\n return null;\n }\n if (t > tnear) {\n // hit near face, update normal\n front = i;\n tnear = t;\n }\n } else {\n // back face - T is a far point\n\n if (t < tnear) {\n return null;\n }\n if (t < tfar) {\n // hit far face, update normal\n\n back = i;\n tfar = t;\n }\n }\n }\n }\n // survived all tests\n // Note: if ray originates on polyhedron,\n // may want to change 0.0 to some\n // epsilon to avoid intersecting the originating face.\n //\n if (tnear >= 0.0f) {\n // outside, hitting front face\n norm = _planes[front]._normal;\n tresult = tnear;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n if (tfar < 1.0e+20f) {\n // inside, hitting back face\n norm = _planes[back]._normal;\n tresult = tfar;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n // inside, but back face beyond tmax//\n return null;\n }\n }\n }",
"public Vector getNormal(Point3D point) throws Exception {\n\n // Setting the U vector\n Vector vecU = new Vector(_p1.getX().getCoordinate()-_p2.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p2.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p2.getZ().getCoordinate());\n // Setting the V vector\n Vector vecV = new Vector(_p1.getX().getCoordinate()-_p3.getX().getCoordinate(),\n _p1.getY().getCoordinate()-_p3.getY().getCoordinate(),\n _p1.getZ().getCoordinate()-_p3.getZ().getCoordinate());\n\n // Finding the normal vector and normalize it\n Vector _normal = new Vector(vecU.crossProduct(vecV));\n _normal.normalize();\n _normal.scale(-1);\n\n return _normal;\n }",
"public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n if (normalBuilder_ != null) {\n return normalBuilder_.getMessageOrBuilder();\n } else {\n return normal_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }\n }",
"@Override\n\tpublic Vecteur getNormal(Point impact, Rayon rayon) {\n\t\tassert impact != null && rayon != null;\n\t\tint indice = appartientCube(impact);\n\t\t\n\t\t//Assert pt d'impact appartient au cube\n\t\tif (indice == -1) {\n\t\t\tSystem.out.println(\"getNormal : Le point n'appartient pas au cube\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn this.plans.get(indice).getNormal(impact, rayon);\n\t}",
"private void computeFacing() {\n\t\tfacing = GeometryUtil.getAngle(p1, p2) + 90;\n\t}",
"@Test\n void getNormal() {\n Plane pl = new Plane(new Point3D(-1,2,1), new Point3D(0,-3,2), new Point3D(1,1,-4)\n );\n\n assertEquals(new Vector(26,7,9).normalize(),\n pl.getNormal(),\n \"Bad normal to trinagle\");\n\n }",
"public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}",
"public void drawFace(int face) {\n\t\tif (faceNearClipped[face]) {\n\t\t\tdrawNearClippedFace(face);\n\t\t\treturn;\n\t\t}\n\n\t\tint a = faceVertexA[face];\n\t\tint b = faceVertexB[face];\n\t\tint c = faceVertexC[face];\n\t\tDraw3D.clipX = faceClippedX[face];\n\n\t\tif (faceAlpha == null) {\n\t\t\tDraw3D.alpha = 0;\n\t\t} else {\n\t\t\tDraw3D.alpha = faceAlpha[face];\n\t\t}\n\n\t\tint type;\n\n\t\tif (faceInfo == null) {\n\t\t\ttype = 0;\n\t\t} else {\n\t\t\ttype = faceInfo[face] & 0b11;\n\t\t}\n\n\t\tif (type == 0) {\n\t\t\tDraw3D.fillGouraudTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face]);\n\t\t} else if (type == 1) {\n\t\t\tDraw3D.fillTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], palette[faceColorA[face]]);\n\t\t} else if (type == 2) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorB[face], faceColorC[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t} else if (type == 3) {\n\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\tint ta = texturedVertexA[texturedFace];\n\t\t\tint tb = texturedVertexB[texturedFace];\n\t\t\tint tc = texturedVertexC[texturedFace];\n\t\t\tDraw3D.fillTexturedTriangle(vertexScreenY[a], vertexScreenY[b], vertexScreenY[c], vertexScreenX[a], vertexScreenX[b], vertexScreenX[c], faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[ta], vertexViewSpaceX[tb], vertexViewSpaceX[tc], vertexViewSpaceY[ta], vertexViewSpaceY[tb], vertexViewSpaceY[tc], vertexViewSpaceZ[ta], vertexViewSpaceZ[tb], vertexViewSpaceZ[tc], faceColor[face]);\n\t\t}\n\t}",
"public void normalize() {\n float length = (float)Math.sqrt(nx * nx + ny * ny);\n nx/=length;\n ny/=length;\n }",
"private float getHorizontalAngle(EnumFacing facing) {\n\t\treturn facing.getAxis() == EnumFacing.Axis.X ? facing.getOpposite().getHorizontalAngle() : facing.getHorizontalAngle();\n\t}",
"public static double eyeZToNormalizedEyeZ(double ze, double n, double f)\n\t{\n\t\treturn (f + n) / (f - n) - 2 * f * n / (f - n) / ze;\n\t}",
"final public Normal3 asNormal(){\n return new Normal3(x, y, z);\n }",
"public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }",
"public void faceDirection(Vector direction) {\n \tVector originalFaceDirection = new Vector(0,0,-1);\n \t\n \tfloat angle;\n \t\n \tif (direction.size() == 0)\n \t\tangle = 0;\n \telse\n \t\tangle = (float)Math.toDegrees( direction.angleBetween(originalFaceDirection) );\n \t\n \tVector orientation = player.getOrientation();\n \tplayer.setOrientation( angle , orientation.y(), orientation.z());\n }",
"private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}",
"@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n return getNormal();\n }",
"public double[] getNormal(int index){\n Node3D node = mesh.nodes.get(index);\n return calculateMeanNormal(node, node_to_triangle.get(node));\n }",
"public final void normalize() {\n\tsvd(this);\n }",
"@Override\n\tpublic Sample normalize(Sample sample) {\n\t\tdouble angle = 0;\n\n\t\tint smallestX = 100000000;\n\t\tint largestX = -100000000;\n\t\tint smallestXIndex = 0;\n\t\tint largestXIndex = 0;\n\t\tfor (int i = 0; i < sample.getMatrix().size(); i++) {\n\t\t\t// Looking for the left most point.\n\t\t\tList<Integer> vector = sample.getMatrix().get(i);\n\t\t\tint avg = getAverageX(vector);\n\t\t\tif (avg < smallestX) {\n\t\t\t\tsmallestX = avg;\n\t\t\t\tsmallestXIndex = i;\n\t\t\t}\n\t\t\tif (avg > largestX) {\n\t\t\t\tlargestX = avg;\n\t\t\t\tlargestXIndex = i;\n\t\t\t}\n\t\t}\n\t\tList<Integer> leftVector = sample.getMatrix().get(smallestXIndex);\n\t\tList<Integer> rightVector = sample.getMatrix().get(largestXIndex);\n\n\t\tint leftX = leftVector.get(0);\n\t\tint leftY = leftVector.get(1);\n\t\tint rightX = rightVector.get(0);\n\t\tint rightY = rightVector.get(1);\n\t\t\n\t\tdouble dy = rightY - leftY;\n\t\tdouble dx = rightX - leftX;\n\t\t\n\t\t//estimate the center point to perform rotation around.\n\t\tdouble centerX = leftX+(dx/2);\n\t\tdouble centerY = leftY+(dy/2);\n\n\t\tangle = (-1)*Math.atan2(dy, dx);\n\n\t\tif (Math.abs(angle) > ROTATION_THRESHOLD) {\n\t\t\tfor (List<Integer> vector : sample.getMatrix()) {\n\t\t\t\tfor (int i = 0; i < vector.size(); i += 2) {\n\t\t\t\t\tdouble x = vector.get(i)-centerX; //rotation around (0,0)\n\t\t\t\t\tdouble y = vector.get(i + 1)-centerY; //rotation around (0,0)\n\t\t\t\t\t// x' = x*cos(a) - y*sin(a)\n\t\t\t\t\t// y' = x*sin(a) + y*cos(a)\n\t\t\t\t\tvector.set(i,\n\t\t\t\t\t\t\t(int)(Math.round(((x * Math.cos(angle)) - (y * Math.sin(angle))))+centerX));\n\t\t\t\t\tvector.set(i + 1,\n\t\t\t\t\t\t\t(int)(Math.round(((x * Math.sin(angle)) + (y * Math.cos(angle))))+centerY));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn sample;\n\t}"
] | [
"0.69235384",
"0.654207",
"0.6352867",
"0.633719",
"0.60157603",
"0.6013803",
"0.60106796",
"0.59653443",
"0.58550555",
"0.5779874",
"0.57644826",
"0.57532275",
"0.57407266",
"0.5739919",
"0.57331145",
"0.5721922",
"0.5682329",
"0.56537926",
"0.5648336",
"0.56215304",
"0.56162995",
"0.55939484",
"0.55692154",
"0.5561664",
"0.5558174",
"0.55259657",
"0.5467373",
"0.5461436",
"0.5458617",
"0.5457794",
"0.54534453",
"0.54494965",
"0.5445275",
"0.5430583",
"0.5427682",
"0.54274607",
"0.5420053",
"0.5384431",
"0.53506124",
"0.53504026",
"0.5344914",
"0.5338104",
"0.5335981",
"0.5335145",
"0.5293128",
"0.52787405",
"0.5275554",
"0.5222389",
"0.52150625",
"0.5204738",
"0.5201875",
"0.52010506",
"0.51830333",
"0.51781774",
"0.5175679",
"0.5171243",
"0.51513743",
"0.51489717",
"0.5139271",
"0.51366436",
"0.5131287",
"0.51206374",
"0.5120017",
"0.5114791",
"0.51145303",
"0.51081955",
"0.5105258",
"0.50937724",
"0.506235",
"0.5058321",
"0.50466543",
"0.5026591",
"0.5013955",
"0.5013092",
"0.5011114",
"0.49826306",
"0.49678826",
"0.49502727",
"0.4942824",
"0.49404025",
"0.49385175",
"0.49350932",
"0.49326926",
"0.49183607",
"0.4918052",
"0.4916221",
"0.49138325",
"0.49128282",
"0.4912391",
"0.49055734",
"0.490021",
"0.48990336",
"0.48976704",
"0.48944044",
"0.48908406",
"0.48900095",
"0.48869282",
"0.48856196",
"0.48771867",
"0.48724872"
] | 0.79497427 | 0 |
Service for working with Git features. | public interface GitService extends Service {
/**
* Checks that project has selected branches
*
* @param project project for checking
* @param branches branches that need to be checked
* @param isCommon if true - checking will occur for all selected branches, if false - for at least one of them.
* @return true if project contains selected branches, false if does not contains
*/
boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);
/**
* Checkouts projects to selected branch
*
* @param projects projects that need to be checked out
* @param branch selected branch
* @param progress the listener for obtaining data on the process of performing the operation
*
* @return map with projects and theirs checkout statuses
*/
Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);
/**
* Checkouts projects to selected branch
*
* @param projects projects that need to be checked out
* @param branchName name of the branch
* @param isRemote <code>true</code> if the branch has {@link BranchType#REMOTE}
* @param progress the listener for obtaining data on the process of performing the operation
* @return map with projects and theirs checkout statuses
*/
Map<Project, JGitStatus> checkoutBranch(List<Project> projects, String branchName, boolean isRemote, ProgressListener progress);
/**
* Gets projects that have uncommited changes
*
* @param projects projects that need to be checked
* @return list of projects that has uncommited changes
*/
List<Project> getProjectsWithChanges(List<Project> projects);
/**
* Reverts uncommited changes
*
* @param projects projects that need to be resets
* @return list of projects that and their discard statuses
*/
Map<Project, JGitStatus> revertChanges(List<Project> projects);
/**
* Commit changes to selectedProjects
*
* @param projects projects that contains changes
* @param commitMessage message for commit
* @param isPushImmediately if true - make push operation after commiting, if false - make commit without pushing
* @param progressListener Listener for obtaining data on the process of performing the operation.
*/
Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,
ProgressListener progressListener);
/**
* Creates new branch
*
* @param projects the projects that needs new branch
* @param branchName new branch name
* @param startPoint corresponds to the start-point option; if <code>null</code>, the current HEAD will be used
* @param force if <code>true</code> and the branch with the given name
* already exists, the start-point of an existing branch will be
* set to a new start-point; if false, the existing branch will
* not be changed
* @return map with projects and theirs statuses of branch creating
*/
Map<Project, JGitStatus> createBranch(List<Project> projects, String branchName, String startPoint, boolean force);
/**
* Returns the set of selected type of branches
*
* @param projects projects list
* @param branchType selected {@link BranchType}
* @param isOnlyCommon if <code>true</code> returns only common branches for all projects and otherwise if <code>false</code>
* @return set of the branches or empty set if such type of branches does not exist for this projects
*/
Set<Branch> getBranches(List<Project> projects, BranchType branchType, boolean isOnlyCommon);
/**
* Returns current branch name for selected project
*
* @param project - selected project
* @return current branch name for selected project or <code>null</code> if project has no branches (unreachable state)
*/
String getCurrentBranchName(Project project);
/**
* Pushed selected projects to upstream
*
* @param projects - list of projects
* @param progressListener - listener for obtaining data on the process of performing the operation
* @return map of operation statuses
*/
Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);
/**
* Pulls changes in selected projects from upstream
*
* @param projects - selected projects
* @param progressListener - instance of {@link OperationProgressListener}
* @return <code>true</code> if pull operation works well and <code>false</code> otherwise
*/
boolean pull(List<Project> projects, OperationProgressListener progressListener);
/**
* Checks that project has any references.
*
* @param project the cloned project
* @return <code>true</code> if project has any references, <code>false</code> if project does not have references.
*/
public boolean hasAtLeastOneReference(Project project);
/**
* Returns count of commits ahead and behind index
*
* @param project - project to show status
* @param branchName - the name of branch
* @return array of ahead and behind commits counts<br>
* Array consists of two parameters:
* first is the count of commits ahead Index, <br>
* second is the count of commits behind Index
*/
public int[] getAheadBehindIndexCounts(Project project, String branchName);
/**
* Checks whether the project has conflicts and uncommitted changes.
*
* @param project the project
* @return array of values. Array consists of two parameters:
* - has conflicts: <true> is has, otherwise <false>.
* - has changes: <true> is has, otherwise <false>.
*/
public boolean[] hasConflictsAndChanges(Project project);
/**
* Starts canceling process for cloning. This may take some time.
*/
void cancelClone();
/** This method return tracking branch.
*
* @param project
* @return tracking branch.
*/
public String getTrackingBranch(Project project);
/**
* This method return all commits for currently selected project
*
* @param project the project
* @param branchName the branch
* @return list of all commits for currently selected project
*/
public List<Commit> getAllCommits(Project project, String branchName);
/**
* Gets ChangedFiles for project.
*
* @param project the project
* @return a ChangedFiles list
*/
List<ChangedFile> getChangedFiles(Project project);
/**
* Adds untracked files to index.
*
* @param files the map of projects and changed files
* @return the list of added files
*/
List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);
/**
* Resets changed files to head
*
* @param files the map which has projects and their changed files
* @return a list of changed files
*/
List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);
/**
* Gets ProjectStatus for project.
* We use {@link Status} for getting info about conflicting, untracked files etc.
* Also, use it for checking the presence of uncommitted changes.
* Gets current branch name, ahead and behind indexes using {@link Git}.
*
* @param project the project
* @return ProjectStatus for the project.
*/
ProjectStatus getProjectStatus(Project project);
/**
* Gets branches of project
*
* @param projects cloned project
* @param brType type branch
* @param onlyCommon if value is <code>true</code> return only common branches of projects,
* if <code>false</code> return all branches.
* @return a list of branches
*/
Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);
/**
* Replaces changed files with HEAD revision
*
* @param changedFiles the files for replacing
*/
void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);
/**
* Creates stash for projects
*
* @param projects the cloned projects
* @param stashMessage the stash message
* @param includeUntracked <code>true</code> if need to include untracked file to stash, otherwise <code>false</code>
* @return a map of operation statuses
*/
Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);
/**
* Gets list of stashes for projects
*
* @param projects the cloned projects
* @return a list of projects' stashes
*/
List<Stash> getStashList(List<Project> projects);
/**
* Applies stash for the project
*
* @param stash the stash for applying
* @param progressListener the listener for obtaining data on the process of performing the operation
*/
void applyStashes(Stash stash, ProgressListener progressListener);
/**
* Drops stash from the project
*
* @param stash the stash which need to drop
* @return a map of operation statuses
*/
Map<Project, Boolean> stashDrop(Stash stash);
/**
* Deletes branch from projects
*
* @param projects the cloned projects
* @param deletedBranch the branch which will be deleted
* @param progressListener the listener for obtaining data on the process of performing the operation
* @return a map of operation statuses by each project.
* <code>true</code> if a branch was successfully deleted from a project, otherwise <code>false</code>.
*/
Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Git getGit();",
"public void gitThis(){\n\t}",
"private HelloGitUtil(){\n\t}",
"public abstract void execute(GitTool opts) throws Exception;",
"public static void main(String[] args) {\nSystem.out.println(\"day one example how to use git\");\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"trying git\"); \r\n\t\tSystem.out.println(\"Getting there\");\r\n\t\t//Faisel\r\n\t}",
"public static void main(String[] args) {\nSystem.out.println(\"This is for git\");\n\t}",
"void fetch() throws GitException, InterruptedException;",
"public interface GitClient {\n\n\t/**\n\t * Instances of the GitClient that are identified by the path of the git\n\t * repository.\n\t */\n\tpublic Map<IPath, GitClient> instances = new HashMap<IPath, GitClient>();\n\n\t/**\n\t * Retrieves an existing GitClient instance or creates a new instance if there\n\t * is no instance for the given path yet.\n\t * \n\t * @return GitClient instance.\n\t */\n\tpublic static GitClient getOrCreate() {\n\t\tIPath path = ConfigPersistenceManager.getPathToGit();\n\t\tString reference = ConfigPersistenceManager.getBranch();\n\t\tString projectKey = ConfigPersistenceManager.getProjectKey();\n\t\treturn getOrCreate(path, reference, projectKey);\n\t}\n\n\t/**\n\t * Retrieves an existing GitClient instance or creates a new instance if there\n\t * is no instance for the given path yet.\n\t * \n\t * @param path\n\t * to the .git folder.\n\t * @param reference\n\t * git object identifier, e.g., HEAD, refs/heads/master or commit id.\n\t * @param projectKey\n\t * of the associated JIRA project.\n\t * @return GitClient instance.\n\t */\n\tpublic static GitClient getOrCreate(IPath path, String reference, String projectKey) {\n\t\tif (instances.containsKey(path)) {\n\t\t\treturn instances.get(path);\n\t\t}\n\t\tGitClient gitClient = new GitClientImpl(path, reference, projectKey);\n\t\tinstances.put(path, gitClient);\n\t\treturn gitClient;\n\t}\n\n\t/**\n\t * Retrieve the commit message for a given line from a blamed file as a\n\t * RevCommit.\n\t * \n\t * @param filePath\n\t * path to the file to be blamed.\n\t * @param line\n\t * the line that is to be analyzed.\n\t * @return {@link GitCommit} object.\n\t */\n\tGitCommit getCommitForLine(IPath filePath, int line);\n\n\t/**\n\t * Retrieve the commit message for a given line from a blamed file.\n\t * \n\t * @param filePath\n\t * path to the file to be blamed.\n\t * @param line\n\t * the line that is to be analyzed.\n\t * @return commit message.\n\t */\n\tString getCommitMessageForLine(IPath filePath, int line);\n\n\t/**\n\t * Retrieves all commits on the current branch.\n\t * \n\t * @return set of all commits on the current branch as a list of\n\t * {@link GitCommit} objects.\n\t */\n\tList<GitCommit> getCommits();\n\n\t/**\n\t * Retrieve the commits with the JIRA issue key in their commit message.\n\t * \n\t * @param jiraIssueKey\n\t * key for which commits are searched.\n\t * @return commits with the JIRA issue key in their commit message as a list of\n\t * {@link GitCommit} objects.\n\t */\n\tList<GitCommit> getCommitsForJiraIssue(String jiraIssueKey);\n\n\t/**\n\t * Get a map of diff entries and the respective edit lists for a commit.\n\t * \n\t * @param commit\n\t * as a {@link GitCommit} object.\n\t * @return map of diff entries and respective edit lists.\n\t */\n\tMap<DiffEntry, EditList> getDiff(GitCommit commit);\n\n\t/**\n\t * Returns a set of changed files for a commit.\n\t * \n\t * @param commit\n\t * as a {@link GitCommit} object\n\t * @return set of {@link ChangedFile} objects.\n\t */\n\tSet<ChangedFile> getChangedFiles(GitCommit commit);\n\n\t/**\n\t * Returns the jgit git object.\n\t * \n\t * @return jgit git object.\n\t */\n\tGit getGit();\n\n\t/**\n\t * Returns the path to the .git folder.\n\t * \n\t * @return path to the .git folder.\n\t */\n\tIPath getPath();\n\n\t/**\n\t * Show what author and revision last modified each line of a file.\n\t * \n\t * @param filePath\n\t * path to the file to be blamed.\n\t * @return git blame result for the given file.\n\t */\n\tBlameResult getGitBlameForFile(IPath filePath);\n\n\t/**\n\t * Get the parent commit for a given commit.\n\t * \n\t * @param commit\n\t * commit as a {@link GitCommit} object.\n\t * @return parent commit as a {@link GitCommit} object.\n\t */\n\tGitCommit getParent(GitCommit commit);\n\n\t/**\n\t * Gets the git object identifier, e.g., HEAD, refs/heads/master or commit id.\n\t * \n\t * @return git object identifier.\n\t */\n\tString getReference();\n\n\t/**\n\t * Get the jgit repository object.\n\t * \n\t * @return jgit repository object\n\t */\n\tRepository getRepository();\n\n\t/**\n\t * Sets the git object identifier, e.g., HEAD, refs/heads/master or commit id.\n\t * \n\t * @param reference\n\t * git object identifier.\n\t */\n\tvoid setReference(String reference);\n}",
"public Gitlet getMyGit(){\n\t\treturn myGit;\n\t}",
"public static void main(String[] args) {\n\n\t\tGitService gitService = new GitServiceImpl();\n\t\tGitHistoryRefactoringMiner miner = new GitHistoryRefactoringMinerImpl();\n\n\t\tRepository repo;\n\t\ttry {\n\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t\t\t\"/home/steve/Steve/git/commons-rng\",\n\t\t\t\t\t\"https://github.com/apache/commons-rng.git\");\n\t\t\t//\t\t\trepo = gitService.cloneIfNotExists(\n\t\t\t//\t\t\t\t\t\"tmp/refactoring-toy-example\",\n\t\t\t//\t\t\t\t\t\"https://github.com/danilofes/refactoring-toy-example.git\");\n\t\t\t// For all with sample\n\t\t\t//\t\t\tminer.detectAll(repo, \"master\", new RefactoringHandler() {\n\t\t\t//\t\t\t\t @Override\n\t\t\t//\t\t\t\t public void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t System.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t for (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t System.out.println(ref.toString());\n\t\t\t////\t\t\t\t System.out.println(ref.toJSON());\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t }\n\t\t\t//\t\t\t\t});\n\t\t\t// For between 2 commits with sample\n\t\t\t//\t\t\t// start commit: 819b202bfb09d4142dece04d4039f1708735019b\n\t\t\t//\t\t\t// end commit: d4bce13a443cf12da40a77c16c1e591f4f985b47\n\t\t\t//\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t//\t\t\t\t\t\"819b202bfb09d4142dece04d4039f1708735019b\", \"d4bce13a443cf12da40a77c16c1e591f4f985b47\",\n\t\t\t//\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t//\t\t\t\t@Override\n\t\t\t//\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t//\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t//\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t//\t\t\t\t\t\t//\t\t\t System.out.println(ref.toString());\n\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\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\n\t\t\t// start commit: 40fd7ad244b350d657ca4f1a9efe667c52697327\n\t\t\t// end commit: 3ca48892811538e911eb3c5bafd60b4d9ca92483\n\t\t\tminer.detectBetweenCommits(repo, \n\t\t\t\t\t\"40fd7ad244b350d657ca4f1a9efe667c52697327\", \"3ca48892811538e911eb3c5bafd60b4d9ca92483\",\n\t\t\t\t\tnew RefactoringHandler() {\n\t\t\t\t@Override\n\t\t\t\tpublic void handle(String commitId, List<Refactoring> refactorings) {\n\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\tSystem.out.println(\"Refactorings at \" + commitId);\n\t\t\t\t\tfor (Refactoring ref : refactorings) {\n\t\t\t\t\t\t// System.out.println(ref.toString());\n\t\t\t\t\t\t//\t\t\t\t\t\tSystem.out.println(ref.toJSON());\n\t\t\t\t\t\tif (ref instanceof ExtractOperationRefactoring) {\n\t\t\t\t\t\t\tExtractOperationRefactoring refactoring = (ExtractOperationRefactoring)ref;\n\t\t\t\t\t\t\tUMLOperationBodyMapper mapper = refactoring.getBodyMapper();\n\t\t\t\t\t\t\tList<StatementObject> newLeaves = mapper.getNonMappedLeavesT2(); //newly added leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> newComposites = mapper.getNonMappedInnerNodesT2(); //newly added composite statements\n\t\t\t\t\t\t\tList<StatementObject> deletedLeaves = mapper.getNonMappedLeavesT1(); //deleted leaf statements\n\t\t\t\t\t\t\tList<CompositeStatementObject> deletedComposites = mapper.getNonMappedInnerNodesT1(); //deleted composite statements\n\t\t\t\t\t\t\tSystem.out.println(\"newLeaves: \\n\" + newLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"newComposites: \\n\" + newComposites);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedLeaves: \\n\" + deletedLeaves);\n\t\t\t\t\t\t\tSystem.out.println(\"deletedComposites: \\n\" + deletedComposites);\n\n\t\t\t\t\t\t\tfor(AbstractCodeMapping mapping : mapper.getMappings()) {\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment1 = mapping.getFragment1();\n\t\t\t\t\t\t\t\tAbstractCodeFragment fragment2 = mapping.getFragment2();\n\t\t\t\t\t\t\t\tSet<Replacement> replacements = mapping.getReplacements();\n\t\t\t\t\t\t\t\tSystem.out.println(\"**************** Replacements: ***********\\n\");\n\t\t\t\t\t\t\t\tfor(Replacement replacement : replacements) {\n\t\t\t\t\t\t\t\t\tString valueBefore = replacement.getBefore();\n\t\t\t\t\t\t\t\t\tString valueAfter = replacement.getAfter();\n\t\t\t\t\t\t\t\t\tReplacementType type = replacement.getType();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueBefore: \" + valueBefore);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"valueAfter: \" + valueAfter);\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"type: \" + type);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"***********************************************************************************\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n}",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(\"git_test!\");\n\t}",
"void fetch(String repository, String refspec) throws GitException, InterruptedException;",
"public interface SVNService {\n public Map<String, String> getLatestFileCheckout(String svnUrl, String sourceDir, String svnId, String svnPassword, int startRevision, int endRevision) throws Exception;\n public Map<String, String> getLatestFileCheckout(ProjectParam param) throws Exception;\n public Map<String, String> getRepositorypaths(String svnUrl, String svnId, String svnPassword, int startRevision, int endRevision) throws Exception;\n public boolean compileComplete(String sourceDir, String sourceWWWDir, String sourceLibDir, String sourceDeployDir) throws Exception;\n public boolean compileComplete(ProjectParam valid) throws IOException;\n\n public boolean svnConnectionCheck(String svnId, String svnPassword);\n}",
"public interface IFeatureService {\n\n\t/**\n\t * Deletes the feature with the given id.\n\t * \n\t * @param id\n\t * the id of the Feature to be deleted\n\t */\n\tvoid deleteFeature(Integer id);\n\n\t/**\n\t * Loads the feature with the given id.\n\t * \n\t * @param id id of the feature to be loaded\n\t * @return The loaded feature\n\t */\n\tFeature loadFeature(Integer id);\n\n\t/**\n\t * Notifies all children of the feature by setting the updatedParent variable\n\t * \n\t * @param feature Feature that has been updated\n\t * @author Robert Völkner\n\t */\n\tvoid notifyChildren(Feature feature);\n}",
"public static void main(String[] args) {\nSystem.out.println(\"this is git learing \");\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\" commit\");\n\t\tSystem.out.println(\"3rd commit\");\n\t\tSystem.out.println(\"final commit\");\n\t\tSystem.out.println(\"pull\");\n\t}",
"public void execute() throws IOException, ParseException, GitAPIException {\n \t\tfinal int[][] pix = readPixels();\n \t\treadContributions();\n \t\tcomputeTargetContrib(pix);\n \n \t\tif (debug) {\n \t\t\tdebug(asciiImage(true));\n \t\t\tprintContrib();\n \t\t}\n \n \t\tinitGitRepository();\n \n \t\tif (showGUI) showProgressWindow();\n \n \t\tint i = 0;\n \t\tfor (int x = 0; x < CAL_WIDTH; x++) {\n \t\t\tfor (int y = 0; y < CAL_HEIGHT; y++) {\n \t\t\t\tif (contrib[y][x] == null) continue;\n \t\t\t\twhile (contrib[y][x].current < contrib[y][x].target) {\n \t\t\t\t\tcontrib[y][x].current++;\n \t\t\t\t\tif (git != null) doCommit(y, x);\n \t\t\t\t\ti++;\n \t\t\t\t\tif (showGUI) updateProgress(i);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tprogressFrame.dispose();\n \n \t\tif (debug) System.out.println(\"Complete!\");\n \t}",
"@Test\n public void testProjectNameWithGitExtension()\n throws AuthorCommitsFailedException, IOException{\n EasyMock.expect(mockManager.openRepository(new Project.NameKey(\"trial\")))\n .andReturn(\n RepositoryCache.open(FileKey.lenient(new File(\n \"../../review_site/git\", \"trial.git\"), FS.DETECTED)));\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability, mockManager);\n List<CommitInfo> expected = new LinkedList<CommitInfo>();\n CommitInfo ex = new CommitInfo();\n ex.setId(\"ede945e22cba9203ce8a0aae1409e50d36b3db72\");\n ex.setAuth(\"Keerath Jaggi <[email protected]> 1401771779 +0530\");\n ex.setMsg(\"init commit\\n\");\n ex.setDate(\"Tue Jun 03 10:32:59 IST 2014\");\n expected.add(ex);\n cmd_test.setCommits(new Project.NameKey(\"trial.git\"), \"kee\");\n assertEquals(expected, cmd_test.getCommits());\n }",
"public interface ProjectService {\n\n void clone(String projectName);\n\n void switchBranch(String projectName,String branchName);\n\n void createNewBranch(String projectName,String oldBranchName,String newBranchName);\n\n String getAddressByProject(String projectName);\n\n File getLocalFileByProject(String projectName);\n\n}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello Git\");\n\t\tSystem.out.println(\"添加更新1\");\n\t\tSystem.out.println(\"添加更新2\");\n\t\tSystem.out.println(\"添加更新3\");\n\t\tSystem.out.println(\"创建分支\");\n\t\tSystem.out.println(\"主干添加\");\n\t\tSystem.out.println(\"分支添加\");\n\t\tSystem.out.println(\"本地库更新\");\n\t\tSystem.out.println(\"在线添加\");\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"git hi\");\r\n\t\tSystem.out.println(\"git 연습1\");\r\n\t}",
"public static void main(String[] args) {\n\t\tFile folder = new File(\".gitlet\");\n\t\tif (folder.exists() && args[0].equals(\"init\")) {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"A gitlet version control system already exists in the current directory.\");\n\t\t}\n\t\tif (!folder.exists()) {\n\t\t\tif (!args[0].equals(\"init\")) {\n\t\t\t\tSystem.out.println(\"have not initialized yet!\");\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tGitlet.init();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tGitlet myGit = Gitlet.DeserializeGitlet();\n\n\t\tif (myGit.conflictState) {\n\t\t\tString[] allowedCommands = { \"add\", \"rm\", \"commit\", \"checkout\",\n\t\t\t\t\t\"log\", \"global-log\", \"find\", \"status\" };\n\t\t\tArrayList<String> allowed = new ArrayList<String>();\n\t\t\tfor (String s : allowedCommands) {\n\t\t\t\tallowed.add(s);\n\t\t\t}\n\t\t\tif (!allowed.contains(args[0])) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Cannot do this command until the merge conflict has been resolved.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tswitch (args[0]) {\n\t\t\tcase \"add\":\n\t\t\t\tmyGit.add(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"commit\":\n\t\t\t\tif (args.length < 2)\n\t\t\t\t\tSystem.out.println(\"Please enter a commit message.\");\n\t\t\t\telse\n\t\t\t\t\tmyGit.commit(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"rm\":\n\t\t\t\tmyGit.rm(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"log\":\n\t\t\t\tmyGit.log();\n\t\t\t\tbreak;\n\t\t\tcase \"global-log\":\n\t\t\t\tmyGit.globalLog();\n\t\t\t\tbreak;\n\t\t\tcase \"find\":\n\t\t\t\tmyGit.find(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"status\":\n\t\t\t\tmyGit.status();\n\t\t\t\tbreak;\n\t\t\tcase \"checkout\":\n\t\t\t\tif (args.length == 2) {\n\t\t\t\t\tmyGit.checkout(args[1]);\n\t\t\t\t} else {\n\t\t\t\t\tmyGit.checkout(Integer.parseInt(args[1]), args[2]);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"branch\":\n\t\t\t\tmyGit.branch(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"rm-branch\":\n\t\t\t\tmyGit.rmBranch(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"reset\":\n\t\t\t\tmyGit.reset(Integer.parseInt(args[1]));\n\t\t\t\tbreak;\n\t\t\tcase \"merge\":\n\t\t\t\tmyGit.merge(args[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"rebase\":\n\t\t\t\tmyGit.rebase(args[1]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\treturn;\n\t\t}\n\n\t}",
"@Test\n\tpublic void createRepo() throws NoFilepatternException, GitAPIException, IOException {\n\t\t\n\t\t\n\t\tFile baseDir = Files.createTempDir(\"gitrepo\");\n\t\tFile gitDir = new File(baseDir, \".git\");\n\n\t\tRepository repo = new FileRepositoryBuilder().setGitDir(gitDir).setWorkTree(baseDir).build();\n\t\trepo.create();\n\n\t\tGit git = new Git(repo);\n\n\t\tFiles.write(\"Nothing\", new File(baseDir,\"my.sample\"));\n\t\t\n\t\tgit.add().addFilepattern(\"*.sample\").call();\n\t\tgit.commit().setMessage(\"first commit\").call();\n\t\t\n\t\tgit.branchCreate().setName(\"new-branch\").call();\n\t\tgit.checkout().setName(\"new-branch\").call();\n\t\t\n\t\tList<Ref> branches = git.branchList().call();\n\t\t\n\t\tSystem.out.println(\"Branches: \"+branches);\n\t\t\n\t\tAssert.assertTrue(\"clean up\",Files.deleteAll(baseDir));\n\t}",
"@ApiModelProperty(value = \"Name of the git service provider\")\n public String getGitServiceName() {\n return gitServiceName;\n }",
"public void fetch(TaskMonitor aTM) throws Exception\n{\n // Do fetch\n Git git = getGit();\n FetchCommand fetch = git.fetch();\n if(getCD()!=null) fetch.setCredentialsProvider(getCD());\n if(aTM!=null) fetch.setProgressMonitor(getProgressMonitor(aTM));\n fetch.call();\n \n // Refresh files\n //getRootDir().refresh();\n}",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control..\n *\n * @param branch The repo branch of the source control.\n * @return the next definition stage.\n */\n Update withBranch(String branch);\n }",
"@FXML\n private void git(MouseEvent event) throws URISyntaxException, IOException {\n Desktop desktop = Desktop.getDesktop();\n desktop.browse(new URI(\"https://github.com/ashMohseni\"));\n }",
"public static void main(String[] args) {\n\n\t\tSystem.out.println(\"THis is my new claas in local repo\");\n\t\tSystem.out.println(\"Lets make some changes on local class and again we have to push that class in GIT\");\n\t}",
"void addFeature(Feature feature);",
"public JGitFileSystemProvider(final Map<String, String> gitPrefs) {\n this(new ConfigProperties(gitPrefs),\n Executors.newCachedThreadPool(new DescriptiveThreadFactory()));\n }",
"public interface FeatureSwitchService {\n \n /**\n * Returns the value of the feature switch based on the key supplied. \n * <br/>\n * The key name must follow these rules:<br/>\n * 1. not start with \"/\". <br/>\n * 2. not contain the following characters: \\u0001 - \\u0019 and \\u007F - \\u009F, \n * \\ud800 -uF8FFF, \\uFFF0-uFFFF, \\ uXFFFE - \\ uXFFFF (where X is a digit 1 - E), \\uF0000 - \\uFFFFF.<br/>\n * 3. The \".\" character can be used as part of another name, but \".\" and \"..\" cannot alone be used<br/>\n * \n * @param key Feature switch key value.\n * @return true if the feature is enabled.\n */\n boolean isEnabled(String key);\n}",
"@SuppressWarnings(\"unused\") \n\tprivate void extractChanges(Node commit_node, RevCommit m) throws Exception\n\t{\n\n\t\tList<String> commitIds = new ArrayList<String>(); \n\n\t\tcommitIds.add(m.toObjectId().getName());\n\t\t\n\t\tCommitInfoExtractor cie = new CommitInfoExtractor();\n\t\tcie.extractFeatureChanges(commitIds);\n\t\tList<EvolutionStep>steps = cie.getSteps();\n\t\t\n\t\ttry(Transaction tx = DBConnection.getService().beginTx())\n\t\t{\n\t\t\tfor(EvolutionStep step : steps)\n\t\t\t{\n\t\t\t\tFileChangeExtractor file_changes = new FileChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> file_nodes = file_changes.addFileChangesToCommit(step.files, commit_node);\n\t\t\t\t\n\t\t\t\tVMChangeExtractor vm_changes = new VMChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> vm_nodes = vm_changes.addVMChangesToCommit(step.fm_changes, commit_node);\n\t\t\t\t\n\t\t\t\tBuildChangeExtractor build_changes = new BuildChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> build_nodes = build_changes.addBuildChangesToCommit(step.build_changes, commit_node);\n\t\t\t\t\n\t\t\t\tCodeChangeExtractor code_changes = new CodeChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> code_nodes = code_changes.addCodeChangesToCommit(step.impl_changes, commit_node);\n\n//\t\t\t\tList<EvolutionStep> local = new ArrayList<EvolutionStep>(); local.add(step);\n//\t\t\t\tFeatureOrientedChangeExtractor dataextractor = new FeatureOrientedChangeExtractor(local);\n//\t\t\t\tdataextractor.buildFeatureChanges();\n//\t\t\t\t\n//\t\t\t\tList<FeatureOrientedChange> changes = dataextractor.getFeatureChanges();\n//\t\n//\t\t\t\tList<Node> focs = new ArrayList<Node>();\n//\t\t\t\tfor(FeatureOrientedChange c : changes)\n//\t\t\t\t{\n//\t\t\t\t\tNode foc_node = createFeatureOrientedChangeForCommit(c);\n//\t\t\t\t\tfocs.add(foc_node);\n//\t\t\t\t\tlink_file_and_vm_changes(c,foc_node,file_nodes, vm_nodes,build_nodes,code_nodes); \n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tMap<String,Node> known_focs = buildFOCMap(focs);\n//\t\t\t\tlink_mapping_artefacts(known_focs,build_nodes);\n//\t\t\t\tlink_code_artefacts(known_focs,code_nodes);\n\t\t\t}\n\t\t\ttx.success();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to create Neo4j nodes - \", e);\n\t\t}\n\t}",
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"public interface FeatureService {\n /**\n * 添加\n */\n public Integer addFeature(WebParam map);\n\n /**\n * 根据主键查找\n */\n public WebResultMap getFeatureByKey(WebParam map);\n\n /**\n * 根据主键批量查找\n */\n public List<WebResultMap> getFeaturesByKeys(WebParam map);\n\n /**\n * 根据主键删除\n */\n public Integer deleteByKey(WebParam map);\n\n /**\n * 根据主键批量删除\n */\n public Integer deleteByKeys(WebParam map);\n\n /**\n * 根据主键更新\n */\n public Integer updateFeatureByKey(WebParam map);\n\n /**\n * 分页查询\n */\n public Pagination getFeatureListWithPage(WebParam map);\n\n /**\n * 集合查询\n */\n public List<WebResultMap> getFeatureList(WebParam map);\n\n /**\n * 总条数\n */\n public int getFeatureListCount(WebParam map);\n}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Hello\");\n\t\t//ADDing comment 1 in testRebase branch\n\t\t//Adding commit2 in testRebase branch\n\t\t\n\t\t\n\t\t//Add commit 1.1 in master branch\n\n\t}",
"public interface CheckoutProvider {\n @NonNls ExtensionPointName<CheckoutProvider> EXTENSION_POINT_NAME = new ExtensionPointName<>(\"com.intellij.checkoutProvider\");\n\n /**\n * @param project current project or default project if no project is open.\n * @deprecated should not be used outside VcsCloneComponentStub\n * Migrate to {@link com.intellij.util.ui.cloneDialog.VcsCloneDialog} or {@link VcsCloneComponent}\n */\n @Deprecated(forRemoval = true)\n void doCheckout(@NotNull final Project project, @Nullable Listener listener);\n\n @Nls @NotNull String getVcsName();\n\n interface Listener {\n @RequiresBackgroundThread\n void directoryCheckedOut(File directory, VcsKey vcs);\n\n @RequiresBackgroundThread\n void checkoutCompleted();\n }\n\n class CheckoutProviderComparator implements Comparator<CheckoutProvider> {\n @Override\n public int compare(@NotNull final CheckoutProvider o1, @NotNull final CheckoutProvider o2) {\n return UIUtil.removeMnemonic(o1.getVcsName()).compareTo(UIUtil.removeMnemonic(o2.getVcsName()));\n }\n }\n\n @NotNull\n default VcsCloneComponent buildVcsCloneComponent(@NotNull Project project, @NotNull ModalityState modalityState, @NotNull VcsCloneDialogComponentStateListener dialogStateListener) {\n return new VcsCloneComponentStub(project, this, VcsBundle.message(\"clone.dialog.clone.button\"));\n }\n}",
"public void getBranchCommand() {\n\n }",
"@ApiModelProperty(value = \"If true the project is configured with a git repository\")\n public Boolean isUsesGit() {\n return usesGit;\n }",
"public void testGitHub() {\n\t}",
"public JGitFileSystemProvider(final ConfigProperties gitPrefs,\n final ExecutorService executorService) {\n this.executorService = executorService;\n\n setupConfigs(gitPrefs);\n\n setupFileSystemsManager();\n\n setupFSEvents();\n\n setupGitDefaultCredentials();\n\n setupSSH();\n\n setupFullHostNames();\n\n setupDaemon();\n\n setupGitSSH();\n }",
"@Override\n public void postReceive(RepositoryHookContext context, \n \t\tCollection<RefChange> refChanges) {\n String jenkinsBase = context.getSettings().getString(\"jenkinsBase\");\n String gitRepoUrl = context.getSettings().getString(\"gitRepoUrl\");\n Boolean ignoreCerts = context.getSettings().getBoolean(\"ignoreCerts\");\n \n if (jenkinsBase == null || gitRepoUrl == null)\n \treturn;\n \n Boolean usingSsl = jenkinsBase.startsWith(\"https\");\n HttpClient client = null;\n \n try {\n\t client = factory.getHttpClient(usingSsl, ignoreCerts);\n \tHttpGet get = new HttpGet(getUrl(jenkinsBase, gitRepoUrl));\n \tclient.execute(get);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n \tif (client != null)\n \t\tclient.getConnectionManager().shutdown();\n }\n }",
"Feature getFeature();",
"Feature getFeature();",
"public JGitFileSystemProvider() {\n this(new ConfigProperties(System.getProperties()),\n Executors.newCachedThreadPool(new DescriptiveThreadFactory()));\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n GitVcsSupport support = getSupport();\n VcsRoot root = getRoot(\"master\");\n // ensure that all revisions reachable from master are fetched\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n // now check merge commit relatively to the branch\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n // no check the merge commit relatively to the fork\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n // check the case with broken commit\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n }",
"public abstract RepositoryOperation getAddOperation(URI repoLocation);",
"public GitFileSite(GitCommit aGC) { _cmt = aGC; setURL(createURL()); }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"This is commited by GitData\");\n\n\t}",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\tGitHub github = GitHub.connectUsingPassword(\"shashankmjain\", \"welcome1\");\n\t\t\n\t\tGHRepository repo=github.getRepository(\"twitter/algebird\");\n\t\t\n\t\tMap branches=repo.getBranches();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(branches);\n\t\t\n\n\t}",
"public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}",
"void merge(String revSpec) throws GitException, InterruptedException;",
"public interface Feature {\n String code();\n String featureName();\n Review.State reviewState();\n Review.State nextState();\n}",
"public interface FeatureFileUtils {\n\n\t/**\n\t * @param path The path to check for feature files\n\t * @param featureGroup The name of the feature group to look for\n\t * @param baseUrl The optional base url that imported files can be downloaded from\n\t * @return A collection of feature files\n\t */\n\tList<FileDetails> getFeatureScripts(\n\t\t@NotNull String path,\n\t\tString featureGroup,\n\t\tString baseUrl);\n}",
"String repoUrl();",
"public static void init() {\n File dir = new File(\".gitlet\");\n if (dir.exists()) {\n System.out.println(\"a gitlet version-control system already exists in the current directory.\");\n return;\n } else {\n dir.mkdir();\n File next = new File(\".gitlet/heads/master.ser\");\n File currentBranch = new File(\".gitlet/current\");\n File heads = new File(\".gitlet/heads\");\n File currentname = new File(\".gitlet/current/master.ser\");\n File staged = new File(\".gitlet/staged\");\n File commits = new File(\".gitlet/commits\");\n File unstaged = new File(\".gitlet/unstaged\");\n File blobs = new File(\".gitlet/blobs\");\n try {\n heads.mkdir();\n staged.mkdir();\n commits.mkdir();\n unstaged.mkdir();\n currentBranch.mkdir();\n blobs.mkdir();\n Commit initial = new Commit(\"initial commit\", null, null);\n FileOutputStream fileOut = new FileOutputStream(next);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(initial);\n Files.copy(next.toPath(), currentname.toPath());\n } catch (IOException e) {\n return;\n }\n }}",
"void submoduleSync() throws GitException, InterruptedException;",
"public abstract boolean manipulateRepositories();",
"void updateGitProvider(@Nonnull final ProjectDescriptor project, final AsyncCallback<ProjectDescriptor> callback) {\n // update 'vcs.provider.name' attribute value\n projectServiceClient.getProject(project.getPath(),\n new AsyncRequestCallback<ProjectDescriptor>(\n dtoUnmarshallerFactory.newUnmarshaller(ProjectDescriptor.class)) {\n @Override\n protected void onSuccess(ProjectDescriptor projectDescriptor) {\n appContext.getCurrentProject().setRootProject(projectDescriptor);\n callback.onSuccess(projectDescriptor);\n }\n\n @Override\n protected void onFailure(Throwable throwable) {\n callback.onFailure(throwable);\n }\n });\n }",
"public static void main(String[] args) {\n System.out.println(\"Testando o Git\");\r\n System.out.println(\"Tomara que tudo tenha saido corretamente!\");\r\n JOptionPane.showMessageDialog(null, \"Deu tudo certo\");\r\n }",
"@Override\n public StateRepository getStateRepository() {\n\tFile tmp = null;\n\ttry {\n\t tmp = File.createTempFile(\"features\", \"properties\");\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n\treturn new FileBasedStateRepository(tmp);\n }",
"private void initGitRepository() throws IOException, GitAPIException {\n \t\tif (gitDir == null) {\n \t\t\tSystem.err.println(\"Warning: no output directory \"\n \t\t\t\t+ \"given for git repository; simulating result\");\n \t\t\treturn;\n \t\t}\n \n \t\tif (!gitDir.exists()) {\n \t\t\tfinal boolean success = gitDir.mkdirs();\n \t\t\tif (!success) {\n \t\t\t\tthrow new IOException(\"Could not create Git output directory: \" +\n \t\t\t\t\tgitDir);\n \t\t\t}\n \t\t}\n \n \t\tfinal InitCommand init = Git.init();\n \t\tinit.setDirectory(gitDir);\n \t\tinit.call();\n \n \t\tgit = Git.open(gitDir);\n \n \t\tauthor = new PersonIdent(git.getRepository());\n \n \t\tasciiImageFile = new File(gitDir, ASCII_IMAGE_FILE);\n \t\tcalendarDataFile = new File(gitDir, CALENDAR_DATA_FILE);\n \t}",
"public GitRef getHead() { return getRef(Constants.HEAD); }",
"public static void main(String[] args) throws IOException {\n Validate.command(args);\n\n String firstArg = args[0];\n switch(firstArg) {\n /** 1. Calls the repository set up initializing method which creates a .gitlet directory */\n case \"init\":\n Validate.numArgs(args, 1);\n Validate.reInit();\n Repository.init();\n break;\n case \"add\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n String filename = args[1];\n Repository.add(filename);\n break;\n case \"commit\":\n Validate.noCommitMessage(args);\n Validate.initialization();\n String message = args[1];\n Repository.commit(message);\n break;\n case \"rm\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n filename = args[1];\n Repository.rm(filename);\n break;\n case \"log\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.log();\n break;\n case \"global-log\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.globalLog();\n break;\n case \"find\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n message = args[1];\n Repository.find(message);\n break;\n case \"status\":\n Validate.numArgs(args, 1);\n Validate.initialization();\n Repository.status();\n break;\n case \"checkout\":\n Validate.numArgs(args, 2,4);\n Validate.initialization();\n Repository.checkout(args);\n break;\n case \"branch\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n String name = args[1];\n Repository.branch(name);\n break;\n case \"rm-branch\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.rmBranch(name);\n break;\n case \"reset\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.reset(name);\n break;\n case \"merge\":\n Validate.numArgs(args, 2);\n Validate.initialization();\n name = args[1];\n Repository.merge(name);\n break;\n default:\n Validate.noExistingCmd();\n }\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testCurrentVersion(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n GitVcsSupport support = getSupport();\n VcsRoot root = getRoot(\"version-test\");\n String version = support.getCurrentVersion(root);\n assertEquals(VERSION_TEST_HEAD, version);\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testConcurrentCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n \n final GitVcsSupport support = getSupport();\n final List<Exception> errors = Collections.synchronizedList(new ArrayList<Exception>());\n \n Runnable r1 = new Runnable() {\n public void run() {\n try {\n // ensure that all revisions reachable from master are fetched\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r2 = new Runnable() {\n public void run() {\n try {\n // now check merge commit relatively to the branch\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r3 = new Runnable() {\n public void run() {\n try {\n // no check the merge commit relatively to the fork\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r4 = new Runnable() {\n public void run() {\n try {\n // check the case with broken commit\n final VcsRoot root = getRoot(\"master\");\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n for (int i = 0; i < 50; i++) {\n BaseTestCase.runAsync(4, r1, r2, r3, r4);\n }\n \n if (!errors.isEmpty()) {\n throw errors.get(0);\n }\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }",
"Feature update(Feature feature);",
"public static void main(String... args) throws IOException {\n Controller controller = new Controller();\n try {\n controller.parseLine(args);\n } catch (TinyGitException e) {\n System.out.println(e.getMessage());\n System.exit(0);\n }\n }",
"@Test\n public void testCommitsApi() throws Exception\n {\n \n \n RequestBuilder builder = new RequestBuilder(\"GET\");\n Request request = builder.setUrl(\n UriTemplate.fromTemplate(BASE)\n .append(PATH_EXPRESSION)\n .set(\"user\", \"damnhandy\")\n .set(\"repo\", \"Handy-URI-Templates\")\n .set(\"function\",\"commits\")\n .expand()).build();\n Assert.assertEquals(\"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits\", request.getUrl());\n executeRequest(createClient(), request);\n }",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public interface IFileSysOperationsFactory\n{\n public IPathCopier getCopier(boolean requiresDeletionBeforeCreation);\n\n public IImmutableCopier getImmutableCopier();\n\n public IPathRemover getRemover();\n\n public IPathMover getMover();\n\n /**\n * Tries to find the <code>ssh</code> executable.\n * \n * @return <code>null</code> if not found.\n */\n public File tryFindSshExecutable();\n\n /**\n * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned.\n */\n public String tryGetIncomingRsyncExecutable();\n\n /**\n * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned.\n */\n public String tryGetOutgoingRsyncExecutable();\n}",
"public CellEditorProyectGit(){}",
"public static void main(String... args) throws IOException {\n if (args[0].equals(\"init\")) {\n Init initialize = new Init();\n initialize.init();\n } else if (args[0].equals(\"commit\")) {\n Commit c = new Commit(args[1], false);\n c.commit(false);\n } else if (args[0].equals(\"add\")) {\n (new Stage()).add(new File(args[1]));\n } else if (args[0].equals(\"rm\")) {\n (new Stage()).rm(new File(args[1]));\n } else if (args[0].equals(\"branch\")) {\n Branch.branch(args[1]);\n } else if (args[0].equals(\"rm-branch\")) {\n Branch.rmBranch(args[1]);\n } else if (args[0].equals(\"status\")) {\n (new Stage()).status();\n } else if (args[0].equals(\"log\")) {\n (new Logging()).log();\n } else if (args[0].equals(\"global-log\")) {\n (new Logging()).globalLog();\n } else if (args[0].equals(\"find\")) {\n (new Find()).find(args[1]);\n } else if (args[0].equals(\"checkout\")) {\n if (args[1].equals(\"--\")) {\n (new Checkout()).checkout(args[2]);\n } else if (args.length > 2) {\n if (args[2].equals(\"--\")) {\n (new Checkout()).checkout(args[1], args[3]);\n } else {\n System.out.println(\"Incorrect operands.\");\n }\n } else {\n (new Checkout()).checkoutBranch(args[1]);\n }\n } else if (args[0].equals(\"reset\")) {\n (new Reset()).reset(args[1]);\n } else if (args[0].equals(\"merge\")) {\n (new Merge()).merge(args[1]);\n }\n\n }",
"void open(IdeaProject project);",
"public static void main(String[] args) {\n\t\tPull_request0731 pr = new Pull_request0731();\n\t\tpr.getNewPull_request(pr.pull_request_history_openFile);\n\t}",
"public interface RepositorySetupService {\n\n\tString USER_PATH = \"userPath\";\n String GROUP_PATH = \"groupPath\";\n String MEMBER_OF = \"memberOf\";\n\n /**\n * adds ACL accordiong to rules declared as JSON file; e.g.\n * <ul>\n * <li>allow read for 'everyone' on root ('/') to walk trough (this node only)</li>\n\t * <li>deny read for 'a-group' on '/apps' and all subnodes and ensure that this folder and the group exists</li>\n\t * <li>make 'everyone' and 'someone' a member of 'a-group' (both principals must exist)</li>\n * <li>remove each ACL for 'a-group' from '/conf' and ensure that this group exists</li>\n * </ul>\n * [{\n * \"path\": \"/\",\n * \"acl\": [{\n * \"principal\": \"everyone\",\n\t * \"reset\": true,\n\t * \"rules\": [{\n\t * \"grant\": \"jcr:read\",\n * \"restrictions\": {\n * \"rep:glob\": \"\"\n * }\n * }]\n * }]\n * },{\n * \"path\": \"/apps\",\n * \"jcr:primaryType\": \"sling:Folder\"\n * \"acl\": [{\n\t * \"principal\": [\n\t * \"a-group\"\n\t * \"another-group\"\n\t * ],\n * \"groupPath\": \"example\",\n\t * \"deny\": [\n * \"jcr:read\"\n * ]\n * }]\n * },{\n\t * \"principal\": [\n\t * \"everyone\",\n\t * \"someone\"\n\t * ],\n * \"memberOf\": [\n * \"a-group\"\n * ]\n * }]\n * },{\n * \"path\": \"/conf\",\n * \"acl\": [{\n\t * \"principal\": \"a-user\",\n\t * \"userPath\": \"example\",\n\t * \"memberOf\": [\n\t * \"a-group\"\n\t * ]\n * }]\n * }]\n *\n * @param session the session (not resolver to make it easy usable in install hooks)\n * @param jsonFilePath a repository path to the ACL JSON file\n */\n void addJsonAcl(@NotNull Session session, @NotNull String jsonFilePath,\n @Nullable Map<String, Object> values)\n throws RepositoryException, IOException;\n\n void addJsonAcl(@NotNull Session session, @NotNull Reader reader,\n @Nullable Map<String, Object> values)\n throws RepositoryException, IOException;\n\n /**\n * revert all changes made by 'addJsonAcl'... - use the same configuration file\n */\n void removeJsonAcl(@NotNull Session session, @NotNull String jsonFilePath,\n @Nullable Map<String, Object> values)\n throws RepositoryException, IOException;\n\n void removeJsonAcl(@NotNull Session session, @NotNull Reader reader,\n @Nullable Map<String, Object> values)\n throws RepositoryException, IOException;\n}",
"GitRemote(String aName) { _name = aName; }",
"public static void main(String[] args) {\nSystem.out.println(\"nagarjuna is .................\");\r\n//second commit\r\nSystem.out.println(\"vinay is ..............................\");\r\n//third commit\r\nSystem.out.println(\"vinay is a ?\");\r\n\t}",
"TArea checkout(TCommit commit, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);",
"GitCommit(RevCommit anRC) { _rev = anRC; }",
"public interface IRepo {\r\n\t//current state of the repository\r\n\tPrgState getCurrentState() throws RepoException;\r\n\t\r\n\t//writes log of execution to log file\r\n\tvoid logPrgStateExec() throws FileNotFoundException, IOException;\r\n}",
"public GitRemote getRemote() { return getRemote(\"origin\"); }",
"StrCommand getFeatureNew();",
"public interface Features {\n /**\n * Loads the image at the given filename into the controller's model.\n *\n * @param filename the location of the image to load\n * @throws IOException if the provided file path is invalid\n */\n void loadPhoto(String filename) throws IOException;\n\n /**\n * Loads a generated rainbow image into the controller's model.\n *\n * @param width width of image to generate in pixels\n * @param height height of image to generate in pixels\n * @param isHorizontal True for horizontal stripes, else vertical stripes\n */\n void loadRainbow(int width, int height, boolean isHorizontal);\n\n /**\n * Loads a generated checker board image into the controller's model.\n *\n * @param tileSize the side length of tiles for the generated image in pixels.\n */\n void loadCheckerBoard(int tileSize);\n\n /**\n * Saves the current state of the image in the controller's model to the specified file location.\n *\n * @param filename the location to save the image\n * @throws IOException if the provided file path is invalid\n */\n void saveToFile(String filename) throws IOException;\n\n /**\n * Applies the blur effect to the image loaded in the controller's model.\n */\n void blur();\n\n /**\n * Applies the sharpen effect to the image loaded in the controller's model.\n */\n void sharpen();\n\n /**\n * Applies the greyscale effect to the image loaded in the controller's model.\n */\n void greyscale();\n\n /**\n * Applies the sepia effect to the image loaded in the controller's model.\n */\n void sepia();\n\n /**\n * Applies the dither effect to the image loaded in the controller's model.\n */\n void dither();\n\n /**\n * Applies the Mosaic effect to the image loaded in the controller's model.\n *\n * @param seeds number of panes to generate in mosaic\n */\n void mosaic(int seeds);\n\n /**\n * reverts the controller's model to the image prior to the most recent effect.\n *\n * @throws IllegalStateException if no changes yet to undo\n */\n void undo();\n\n /**\n * reverts the controller's model to the image after the most recent effect.\n *\n * @throws IllegalStateException if no undos yet to restore\n */\n void redo();\n\n /**\n * Retrieves a copy of the image data stored in the controller's model image.\n *\n * @return a copy of the image data stored in the controller's model image\n */\n BufferedImage outputImage();\n\n /**\n * Runs the batch script commands provided in the given readable.\n *\n * @throws IOException if any issues with accessing the Readable\n */\n void executeScript(Readable script) throws IOException;\n}",
"public static void init() throws IOException {\n\t\tGitlet myGit = new Gitlet();\n\t\tFile gitletFolder = new File(\".gitlet\");\n\t\tgitletFolder.mkdir();\n\t\tFile initialCommit = new File(\".gitlet/0\");\n\t\tinitialCommit.mkdir();\n\t\t// create a gitlet folder and an initial commit folder\n\t\tVersion initCommit = new Version(0, \"initial commit\", null, true,\n\t\t\t\t\"master\");\n\t\t// create Version object\n\t\tmyGit.myHead = initCommit;\n\t\tmyGit.currentBranch = \"master\";\n\t\tmyGit.myBranch.put(\"master\", initCommit);\n\t\tmyGit.myCommit.put(0, initCommit);\n\t\t// bind variables\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(0);\n\t\tmyGit.messageMap.put(\"initial commit\", a);\n\n\t\tFile stage = new File(\".gitlet/stage\");\n\t\tstage.mkdir();\n\t\tmyGit.stagePath = stage.getCanonicalPath();// create it and bind its\n\t\t\t\t\t\t\t\t\t\t\t\t\t// path to stagePath\n\t\tmyGit.Serialization();\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Hola_Git\"\r\n\t\t\t\t+ \"Un placer\");\r\n\t\tSystem.out.println(\"change2\");\r\n\t\t\r\n\t}",
"private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}",
"@Test\n public void fileAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(vf);\n verifyStatus(added(AFILE));\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"Feature createFeature();",
"public interface CollabService {\n\n /**\n * Requesting a lease of for a content path.\n * \n * @param page page path where this content is located in\n * @param uid page edit session ID requesting the lease\n * @param path path of the content to be leased\n * @param userId ID of the requesting user\n * @throws UserNotFoundException if the user data has not been created on this\n * instance yet\n * @throws RejectedException if the lease cannot be granted\n */\n void lease(String page, String uid, String path, String userId) throws UserNotFoundException, RejectedException;\n\n /**\n * Return a previously granted lease.\n * \n * @param page page path where the lease applied\n * @param uid page edit session ID requesting the release\n * @throws UserNotFoundException if the user data has not been created on this\n * instance yet\n */\n void release(String page, String uid) throws UserNotFoundException;\n\n /**\n * Capturing that a page edit session of a user is terminated.\n * \n * @param page page path where the page edit session was active on\n * @param uid page edit session ID to terminate\n */\n void exit(String page, String uid);\n\n /**\n * Processes a content change on a page.\n * \n * @param page page path where the change occurred\n * @param paths content paths which got modified\n * @param refreshPaths the paths within the page content which should get\n * refreshed\n */\n void update(String page, Collection<String> paths, Collection<String> refreshPaths);\n\n /**\n * Inquiring if content is available for lease.\n * \n * @param page page containing the content\n * @param uid page edit session ID inquiring about the lease\n * @param path path of the content to be potentially leased\n * @return if the content is either available for lease, or the active lease\n * belongs to the same user\n */\n boolean mayLease(String page, String uid, String path);\n\n /**\n * Tracks a new user active on this page.\n * \n * @param page page where the user is active on\n * @param userId ID of the new user\n * @param uid new page edit session ID for this user\n */\n void addUser(String page, String userId, String uid);\n\n /**\n * Provides the currently active users on a page.\n * \n * @param page page for which to return the users\n * @return display names of all current users on this page\n */\n Set<String> getUsers(String page);\n\n /**\n * Get all active lease on a page for other page edit session IDs.\n * \n * @param page page for which to return the leases\n * @param excludeUid page edit session ID for which not to return any lease.\n * This should be the requesting session's ID.\n * @return mapping between leased content paths and their lease owner's display\n * name\n */\n Map<String, String> getLeases(String page, String excludeUid);\n\n /**\n * Retrieve update history for a page after a given minimum time.\n * \n * @param page page for which to return the updates\n * @param minTime will only return updates newer than this timestamp\n * @return list of all newer updates on this page\n */\n List<Update> getUpdates(String page, long minTime);\n\n /**\n * Checks if the extension has collected data about a specific page.\n * \n * @param page path of the page\n * @return if any collaboration data has been collected for this page\n */\n boolean hasPage(String page);\n\n /**\n * Returns the display name for a user ID.\n * \n * @param userId ID of the user\n * @return display name of the user\n */\n String getUserName(String userId);\n\n}",
"void addFeatures(Features features);",
"public static void main(String... args) {\n\n if (args.length == 0){\n System.out.println(\"Please enter a command\");\n return;\n }\n\n // load commit-tree if .gitlet initialized\n Main program = new Main();\n program.setTree_(program.loadTree());\n\n if (program.getTree_() == null && !args[0].equals(\"init\")){\n System.out.println(\"Not in an initialized gitlet directory.\");\n return;\n }\n\n String command = args[0];\n switch (command){\n\n case \"init\":\n\n checkNumArgs(1, args);\n boolean created = program.createGitletDirectory();\n if (created){\n program.setTree_(CommitTree.initCommitTree());\n }\n break;\n\n case \"add\":\n\n checkNumArgs(2, args);\n program.getTree_().add(args[1]);\n break;\n\n case \"commit\":\n\n checkNumArgs(2, args);\n program.getTree_().commit(args[1]);\n break;\n\n case \"rm\":\n\n checkNumArgs(2, args);\n program.getTree_().removeFile(args[1]);\n break;\n\n case \"log\":\n\n checkNumArgs(1, args);\n program.getTree_().log();\n break;\n\n case \"global-log\":\n\n checkNumArgs(1, args);\n program.getTree_().globalLog();\n break;\n\n case \"find\":\n\n checkNumArgs(2, args);\n program.getTree_().find(args[1]);\n break;\n\n case \"status\":\n\n checkNumArgs(1, args);\n program.getTree_().status();\n break;\n\n case \"checkout\":\n\n // check arguments and invoke specific checkout command\n program.checkoutArgs(args);\n break;\n\n case \"branch\":\n\n checkNumArgs(2, args);\n program.getTree_().branch(args[1]);\n break;\n\n case \"rm-branch\":\n\n checkNumArgs(2, args);\n program.getTree_().removeBranch(args[1]);\n break;\n\n case \"reset\":\n\n checkNumArgs(2, args);\n program.getTree_().reset(args[1]);\n break;\n\n case \"merge\":\n\n checkNumArgs(2, args);\n program.getTree_().merge(args[1]);\n break;\n\n default:\n\n System.out.println(\"No command with that name exists.\");\n break;\n }\n\n // save commit-tree to disk\n program.SaveTree();\n }",
"public interface BuildFilterService {\n\n /**\n * Gets the default filter to use when none is defined.\n */\n BuildFilter defaultFilter();\n\n /**\n * Builds a standard build filter\n */\n StandardFilterBuilder standardFilter(int count);\n\n /**\n * Gets the list of all existing filters.\n *\n * @param branchId Branch to get the filters for\n * @return List of filters\n */\n Collection<BuildFilterResource<?>> getBuildFilters(ID branchId);\n\n /**\n * Gets the list of forms to create new filters\n *\n * @param branchId Branch to get the forms for\n * @return List of forms\n */\n Collection<BuildFilterForm> getBuildFilterForms(ID branchId);\n\n /**\n * Basic method to compute an actual filter from a type and a list of parameters.\n *\n * @param branchId Branch to apply the filter on\n * @param type Qualified type for the filter\n * @param parameters Parameters for the filter\n * @return Actual filter to use, or the {@linkplain #defaultFilter() default filter} if\n * the <code>type</code> cannot be resolved or if the filter cannot be instantiated using\n * the given parameters.\n */\n BuildFilter computeFilter(ID branchId, String type, JsonNode parameters);\n\n /**\n * Gets the form to edit an existing filter.\n *\n * @param branchId Branch to get the form on\n * @param name name of the filter on the branch\n * @return An edition form\n * @throws BuildFilterNotFoundException If the filter is not defined\n * @throws BuildFilterNotLoggedException If the user is not logged\n */\n BuildFilterForm getEditionForm(ID branchId, String name) throws BuildFilterNotFoundException, BuildFilterNotLoggedException;\n\n /**\n * Saves a filter for a branch. This method does nothing if the user is not logged,\n * or if the filter type is not found, or if the parameters are not valid.\n *\n * @param branchId Branch to save the filter for\n * @param shared If the filter must be shared in the branch (needs specific authorisation)\n * @param name Name of the filter\n * @param type Type of the filter\n * @param parameters Parameters for the filter\n */\n Ack saveFilter(ID branchId, boolean shared, String name, String type, JsonNode parameters);\n\n /**\n * Deletes a filter for a branch. This method does nothing if the user is not logged,\n * or if the filter is not found.\n *\n * @param branchId Branch to save the filter for\n * @param name Name of the filter\n */\n Ack deleteFilter(ID branchId, String name);\n\n /**\n * Copies all the filters from one branch to another\n */\n void copyToBranch(ID sourceBranchId, ID targetBranchId);\n}",
"private void checkout(){\n Scanner input = new Scanner(System.in);\n System.out.println(\"checkout commit : \");\n System.out.println(\"masukan nama commit : \"); // nama commit bukan kode hash\n String value = input.nextLine();\n \n // overwrite file commit ke file-untuk-git\n overWriteFile(\"file-untuk-git\", value + \".txt\", false);\n \n \n }",
"@Override\n public Class<? extends Feature> getFeatureClass() {\n\treturn VersionFeatures.class;\n }",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"AutoCommittalRepositoryManager getAutoCommittalRepositoryManager();",
"public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }",
"public GitBranch(String aName) { _name = aName; }"
] | [
"0.72034943",
"0.68151605",
"0.65959096",
"0.6454569",
"0.63468",
"0.59933245",
"0.5983597",
"0.5817693",
"0.57845837",
"0.5747153",
"0.5672248",
"0.56617767",
"0.55207354",
"0.5518685",
"0.54743063",
"0.54628944",
"0.54356",
"0.5393968",
"0.53637135",
"0.53322524",
"0.53286123",
"0.53283775",
"0.53248477",
"0.531698",
"0.5302265",
"0.5258181",
"0.517425",
"0.5162495",
"0.5157666",
"0.5155324",
"0.51421106",
"0.50879234",
"0.508511",
"0.5081954",
"0.5068459",
"0.5067184",
"0.5028711",
"0.50135803",
"0.5001952",
"0.49985266",
"0.4997864",
"0.49908054",
"0.4985482",
"0.4985482",
"0.4983501",
"0.49585137",
"0.49469268",
"0.49372137",
"0.4929865",
"0.49137473",
"0.49095017",
"0.49034247",
"0.49032295",
"0.48934823",
"0.48818162",
"0.48792103",
"0.48767334",
"0.4869356",
"0.4857613",
"0.4851044",
"0.4850523",
"0.4849682",
"0.48324004",
"0.48292607",
"0.4828474",
"0.48047057",
"0.47841564",
"0.47809562",
"0.4771235",
"0.47699377",
"0.47673714",
"0.47609752",
"0.4757189",
"0.4755029",
"0.4747165",
"0.47435504",
"0.4736089",
"0.47357008",
"0.47304",
"0.4728076",
"0.47227946",
"0.4713326",
"0.47001883",
"0.46989435",
"0.46982348",
"0.46949652",
"0.46926135",
"0.4691055",
"0.46753278",
"0.46745002",
"0.4674085",
"0.46702668",
"0.46567836",
"0.46565688",
"0.46369022",
"0.46343663",
"0.4627447",
"0.4624407",
"0.46225074",
"0.46159837"
] | 0.69587344 | 1 |
Checks that project has selected branches | boolean containsBranches(Project project, List<Branch> branches, boolean isCommon); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"boolean isBranchTaken();",
"public boolean hasBranch() {\n\t if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasBranch() \");\n Via via=(Via)sipHeader;\n \n return via.hasParameter(Via.BRANCH); \n }",
"public void updateBranches() throws VcsException {\n VirtualFile root = getSelectedRoot();\n GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);\n handler.addParameters(\"--no-color\", \"-a\", \"--no-merged\");\n String output = ProgressManager.getInstance().runProcessWithProgressSynchronously(\n () -> Git.getInstance().runCommand(handler).getOutputOrThrow(),\n \"Preparing List of Branches\", true, myProject);\n myBranchChooser.clear();\n for (StringTokenizer lines = new StringTokenizer(output, \"\\n\", false); lines.hasMoreTokens();) {\n String branch = lines.nextToken().substring(2);\n myBranchChooser.addElement(branch, false);\n }\n }",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public List<Map<String, Object>> getAvailableBranches()\n {\n List<String> allTenants = getWikiSelector().getMptIdSelector().getTenants(GWikiWeb.getRootWiki());\n List<Map<String, Object>> branchProps = new ArrayList<Map<String, Object>>();\n\n // default new branch is selected\n this.selectedBranch = NEW_BRANCH;\n\n for (String tenantId : allTenants) {\n\n // if approve you have to copy the file in a branch other than draft\n if (PlcConstants.DRAFT_ID.equalsIgnoreCase(tenantId) == true\n && FileState.APPROVED_CHIEF_EDITOR.name().equals(newPageState) == true) {\n continue;\n }\n\n GWikiProps branchInfoProp = wikiContext.runInTenantContext(tenantId, getWikiSelector(),\n new CallableX<GWikiProps, RuntimeException>()\n {\n @Override\n public GWikiProps call() throws RuntimeException\n {\n return PlcUtils.getBranchInfo(wikiContext);\n }\n });\n\n if (branchInfoProp == null) {\n continue;\n }\n\n // only add offline branches\n if (BranchState.OFFLINE.name()\n .equals(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_STATE)) == true) {\n Map<String, Object> m = new HashMap<String, Object>();\n m.putAll(branchInfoProp.getMap());\n m.put(\"RELEASE_DATE_DATE\",\n GWikiProps.parseTimeStamp(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE)));\n branchProps.add(m);\n\n // if branch release date matches article release date -> preselect branch\n String release = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE);\n Date branchReleaseDate = GWikiProps.parseTimeStamp(release);\n if (branchReleaseDate != null && branchReleaseDate.equals(getStartDateOfArticle())) {\n selectedBranch = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_ID);\n }\n }\n }\n return branchProps;\n }",
"public boolean hasBranchTags() {\n\t\treturn numTags(CVSTag.BRANCH) > 0;\n\t}",
"private boolean inMultipleBranches(List<Boolean> branches) {\n int inBranches = 0;\n for (Boolean bool : branches) {\n if (bool && ++inBranches > 1) {\n break;\n }\n }\n return inBranches > 1;\n }",
"boolean hasProject();",
"boolean isSetBranchOfficeList();",
"Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);",
"public String getTrackingBranch(Project project);",
"String getCurrentBranchName(Project project);",
"boolean hasBracksSelected();",
"public boolean[] hasConflictsAndChanges(Project project);",
"private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }",
"private void checkBranch(String appId, String clusterName, String namespaceName, String branchName) {\n checkNamespace(appId, clusterName, namespaceName);\n\n //2. check child namespace\n Namespace childNamespace = namespaceService.findOne(appId, branchName, namespaceName);\n if (childNamespace == null) {\n throw new BadRequestException(String.format(\"Namespace's branch not exist. AppId = %s, ClusterName = %s, \"\n + \"NamespaceName = %s, BranchName = %s\",\n appId, clusterName, namespaceName, branchName));\n }\n\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesMergedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesMergedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestMergedActionFilter tmp3 = (BitBucketPPRPullRequestMergedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestMergedActionFilter\");\n assertFalse(isToApprove);\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesWithApproveMergedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesWithApproveMergedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestMergedActionFilter tmp3 = (BitBucketPPRPullRequestMergedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestMergedActionFilter\");\n assertTrue(isToApprove);\n }",
"public boolean isBranchHaveAgent(Branch branch);",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }",
"private void populateSelectedBranches() {\n\t\ttry {\n\t\t\tStationsDTO[] stations = handler.getAllBranches();\n\t\t\tif (null != stations) {\n\t\t\t\tint len = stations.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcbSB.add(stations[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ stations[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void testDslTriggerPRAllowedBranchesUpdatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesUpdatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestUpdatedActionFilter tmp3 = (BitBucketPPRPullRequestUpdatedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestUpdatedActionFilter\");\n assertFalse(isToApprove);\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesApprovedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesApprovedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestApprovedActionFilter\");\n }",
"public Set<String> branches() {\r\n\t\treturn branchesPartOf;\r\n\t}",
"List<String> branches();",
"@Override\n protected Result check()\n {\n return this.gitLabModeInfos.isEmpty() ? Result.unhealthy(\"No GitLab modes available\") : Result.healthy();\n }",
"@Test\n public void testDslTriggerPRAllowBranchesCreatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowBranchesCreatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestCreatedActionFilter tmp3 = (BitBucketPPRPullRequestCreatedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestCreatedActionFilter\");\n assertFalse(isToApprove);\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesWithApproveUpdatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesWithApproveUpdatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestUpdatedActionFilter tmp3 = (BitBucketPPRPullRequestUpdatedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestUpdatedActionFilter\");\n assertTrue(isToApprove);\n }",
"private boolean containsOnlyNonProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // check for empty selection\r\n if (types == 0) {\r\n return false;\r\n }\r\n // note that the selection may contain multiple types of resource\r\n return (types & IResource.PROJECT) == 0;\r\n }",
"public void printBranches() {\n System.out.println(\"=== Branches ===\");\n List<String> allBranchF = Utils.plainFilenamesIn(Main.ALL_BRANCHES);\n String commitInHead = Utils.readObject(HEADNAME, String.class);\n for (String branch: allBranchF) {\n if (branch.equals(commitInHead)) {\n System.out.println(\"*\" + branch);\n } else {\n System.out.println(branch);\n }\n }\n }",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }",
"public boolean addBranch()\n\t{\n\t\tList<Branch> branches = this.company.getBranches();\n\t\tList<Stock> stocks = this.company.getStocks();\n\t\tint branchNumber = branches.length();\n\t\tint uniqueId = this.company.getBranchCounter();\n\n\t\tbranches.insert(new Branch(uniqueId, uniqueId));\n\n\t\tType t[] = Type.values();\n\t\tColor c[] = Color.values();\n\t\tList<Furniture> furniture = new List<Furniture>();\n\n\t\tint counter = 0;\n\n\t\t// insert chairs\n\t\tfor(int i=0; i<7; i++)\n\t\t{\n\t\t\tfor(int j=0; j<5; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[0], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert desks\n\t\tfor(int i=0; i<5; i++)\n\t\t{\n\t\t\tfor(int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[1], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert tables\n\t\tfor(int i=0; i<10; i++)\n\t\t{\n\t\t\tfor(int j=0; j<4; j++)\n\t\t\t{\n\t\t\t\tfurniture.insert(new Furniture(counter++, i, t[2], c[j], branches.get(branchNumber), 5));\n\t\t\t}\n\t\t}\n\n\t\t// insert bookcases\n\t\tfor(int i=0; i<12; i++)\n\t\t{\n\t\t\tfurniture.insert(new Furniture(counter++, i, t[3], Color.NONE, branches.get(branchNumber), 5));\n\t\t}\n\n\t\t// insert cabinets\n\t\tfor(int i=0; i<12; i++)\n\t\t{\n\t\t\tfurniture.insert(new Furniture(counter++, i, t[4], Color.NONE, branches.get(branchNumber), 5));\n\t\t}\n\n\n\t\tstocks.insert(new Stock(uniqueId, furniture));\n\n\t\treturn true;\n\t}",
"public boolean hasBankBranchID() {\n return fieldSetFlags()[8];\n }",
"public void getBranchCommand() {\n\n }",
"boolean hasBuild();",
"public static String setDefaultBranch(Project project) {\n String defaultBranch = SourcegraphConfig.getInstance(project).getDefaultBranch();\n if (defaultBranch == null || defaultBranch.length() == 0) {\n Properties props = readProps();\n defaultBranch = props.getProperty(\"defaultBranch\", null);\n }\n return defaultBranch;\n }",
"public boolean airportIsBuilt() {\n\t\tif(projectsAvailable.isEmpty() && projectsActive.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n public void testDslTriggerPRAllowBranchesWithApproveCreatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowBranchesWithApproveCreatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestCreatedActionFilter tmp3 = (BitBucketPPRPullRequestCreatedActionFilter) tmp2\n .getTriggers().get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestCreatedActionFilter\");\n assertTrue(isToApprove);\n }",
"@Test\n\tpublic void testGetAllBranchCopies() throws SQLException {\n\t\tfinal List<BranchCopies> allBranchCopies = copiesDaoImpl\n\t\t\t\t.getAllBranchCopies(testBranch);\n\t\tassertTrue(\n\t\t\t\tallBranchCopies.contains(\n\t\t\t\t\t\tnew BranchCopies(testBook, testBranch, NUM_COPIES)),\n\t\t\t\t\"branch's records includes correct copy count for test book at test branch\");\n\t}",
"Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);",
"@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }",
"public void checkOutBranch(String branchName) throws IOException {\n File branch = new File(Main.ALL_BRANCHES, branchName);\n if (branch.exists()) {\n String associatedID = Utils.readObject(branch, String.class);\n String commitID = Utils.readObject(HEADFILE, String.class);\n File curCommitFile = new File(Main.ALL_COMMITS, commitID);\n Commit currCommit = Utils.readObject(curCommitFile, Commit.class);\n if (branchName.equals(Utils.readObject(HEADNAME, String.class))) {\n System.out.println(\"No need to checkout the current branch.\");\n } else {\n HashMap<String, Blob> allFiles =\n getCommitFromID(associatedID).getFile();\n HashMap<String, Blob> filesInCurr = currCommit.getFile();\n checkOutFiles(allFiles, filesInCurr);\n deleteIfNecessary(allFiles, filesInCurr);\n Utils.writeObject(HEADFILE, associatedID);\n Utils.writeObject(HEADNAME, branchName);\n }\n } else {\n System.out.println(\"No such branch exists.\");\n }\n }",
"String getBranchName();",
"public JsonArray getBranchesForRepo(String repoUrl, int repoId) {\n // get version labeled branches from db\n String url = \"/repo/branches\";\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"repoId\", repoId);\n JsonObject sendObject = sqlHandler.createPostDataObject(\"_post_repo_branches\", jsonObject);\n\n JsonElement returnElement = this.sqlHandler.post(url, sendObject);\n\n JsonArray branchJsonArray = new JsonArray();\n ProcessorCommon.checkValidResponseAndPopulateArray(returnElement, \"branches\", \"branch\", branchJsonArray);\n // get branch names from db\n ArrayList<String> dbBranchNameArray = new ArrayList<>();\n for (JsonElement branch : branchJsonArray) {\n JsonObject branchObject = branch.getAsJsonObject();\n dbBranchNameArray.add(ProcessorCommon.trimJsonElementString(branchObject.get(\"branchName\")));\n }\n\n String gitRepoName = ProcessorCommon.extractRepoName(repoUrl);\n\n\n// logger.debug(\"Extracting branch data for \" + repoName + \"from git\");\n // get branches from git\n url = gitBaseUrl + \"/repos/\" + gitRepoName + \"/branches\";\n JsonArray gitBranchArray = this.gitHandlerImplement.getJSONArrayFromGit(url);\n for (JsonElement branch : gitBranchArray) {\n JsonObject branchObject = branch.getAsJsonObject();\n String name = ProcessorCommon.trimJsonElementString(branchObject.get(\"name\"));\n if (!dbBranchNameArray.contains(name)) {\n JsonObject tempBranchObject = new JsonObject();\n tempBranchObject.addProperty(\"branchId\", -1);\n tempBranchObject.addProperty(\"branchName\", name);\n tempBranchObject.addProperty(\"versionId\", -1);\n tempBranchObject.addProperty(\"versionName\", \"null\");\n branchJsonArray.add(tempBranchObject);\n }\n }\n\n return branchJsonArray;\n\n }",
"@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"public boolean isBranchRoot() {\n return term.isBranchRoot();\n }",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"@Override\n\t\t\tpublic boolean checkPreconditions(){\n\t\t\t\treturn topLevelCheckbox.getSelection();\n\t\t\t}",
"public List<Commit> getAllCommits(Project project, String branchName);",
"boolean isBareRepository() throws GitException, InterruptedException;",
"public void testCheckinProjectFlags() {\n String[] sTestCmdLine = { \"soscmd\", \"-command\", \"CheckInProject\",\n \"-recursive\", \"-server\", SOS_SERVER_PATH, \"-name\", SOS_USERNAME,\n \"-password\", \"\", \"-database\", VSS_SERVER_PATH , \"-project\",\n \"$\"+VSS_PROJECT_PATH, \"\", \"\", \"-soshome\", SOS_HOME, \"-workdir\",\n project.getBaseDir().getAbsolutePath(), \"-log\", SRC_COMMENT, };\n\n // Set up a SOSCheckin task\n sosCheckin.setProject(project);\n sosCheckin.setVssServerPath(VSS_SERVER_PATH);\n sosCheckin.setSosServerPath(SOS_SERVER_PATH);\n sosCheckin.setProjectPath(VSS_PROJECT_PATH);\n sosCheckin.setComment(SRC_COMMENT);\n sosCheckin.setUsername(SOS_USERNAME);\n sosCheckin.setSosHome(SOS_HOME);\n sosCheckin.setNoCache(true);\n sosCheckin.setNoCompress(false);\n sosCheckin.setVerbose(false);\n sosCheckin.setRecursive(true);\n\n commandline = sosCheckin.buildCmdLine();\n String[] sGeneratedCmdLine = commandline.getCommandline();\n\n int i = 0;\n while (i < sTestCmdLine.length) {\n try {\n assertEquals(\"CheckInProject arg # \" + String.valueOf(i),\n sTestCmdLine[i],\n sGeneratedCmdLine[i]);\n i++;\n } catch (ArrayIndexOutOfBoundsException aioob) {\n fail(\"CheckInProject missing arg\");\n }\n\n }\n if (sGeneratedCmdLine.length > sTestCmdLine.length) {\n // We have extra elements\n fail(\"CheckInProject extra args\");\n }\n }",
"private void createAndSetNewBranch()\n {\n Date startDateOfArticle = getStartDateOfArticle();\n final String branchId = startDateOfArticle == null ? GWikiProps.formatTimeStamp(new Date()) : GWikiProps\n .formatTimeStamp(startDateOfArticle);\n\n wikiContext.runInTenantContext(branchId, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n final GWikiElement branchInfo = PlcUtils.createInfoElement(wikiContext, branchId, \"\", branchId, \"\");\n final GWikiElement branchFileStats = PlcUtils.createFileStats(wikiContext);\n wikiContext.getWikiWeb().getAuthorization().runAsSu(wikiContext, new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n wikiContext.getWikiWeb().saveElement(wikiContext, branchInfo, false);\n wikiContext.getWikiWeb().saveElement(wikiContext, branchFileStats, false);\n return null;\n }\n });\n GLog.note(GWikiLogCategory.Wiki, \"Autocreate branch: \" + branchId);\n return null;\n }\n });\n\n // set new created branch as selected\n selectedBranch = branchId;\n }",
"public final boolean hasNext() {\n return branch < max_branching;\n }",
"void evt_BranchSelectedObjects()\r\n {\r\n short num;\r\n CObject pHO, pHOPrev;\r\n int oil;\r\n CObjInfo oilPtr;\r\n\r\n for (oil = 0; oil < rhPtr.rhMaxOI; oil++)\r\n {\r\n oilPtr = rhPtr.rhOiList[oil];\r\n if (oilPtr.oilEventCountOR == rh4EventCountOR)\r\n {\r\n oilPtr.oilEventCount = rh2EventCount;\r\n\r\n num = oilPtr.oilObject;\r\n pHOPrev = null;\r\n while (num >= 0)\r\n {\r\n pHO = rhPtr.rhObjectList[num];\r\n if (pHO.hoSelectedInOR != 0)\r\n {\r\n if (pHOPrev != null)\r\n {\r\n pHOPrev.hoNextSelected = num;\r\n }\r\n else\r\n {\r\n oilPtr.oilListSelected = num;\r\n }\r\n pHO.hoNextSelected = -1;\r\n pHOPrev = pHO;\r\n }\r\n num = pHO.hoNumNext;\r\n }\r\n }\r\n }\r\n }",
"public boolean hasAssignedProject()\r\n {\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn (_assignedProject!=null);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }",
"Set<String> getBranchNames(TRepo repo);",
"@Test\n public void testDslTriggerPRAllowedBranchesDeclinedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesDeclinedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n boolean isToApprove = false;\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n BitBucketPPRPullRequestDeclinedActionFilter tmp3 = (BitBucketPPRPullRequestDeclinedActionFilter) tmp2.getTriggers()\n .get(0).getActionFilter();\n isToApprove = tmp3.shouldSendApprove();\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestDeclinedActionFilter\");\n assertFalse(isToApprove);\n }",
"public static void checkoutBranch(String arg) throws IOException {\n File currFile = Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\");\n Commit currCommit = Utils.readObject(currFile, Commit.class);\n\n if(!commitPointers.readBranches().containsKey(arg)){\n exitWithError(\"No such branch exists.\");\n }\n if(commitPointers.readHeadCommit()[0].equals(arg)) {\n exitWithError(\"No need to checkout the current branch.\");\n }\n File cFile = Utils.join(Commit.COMMIT_FOLDER, commitPointers.branches.get(arg) + \".txt\");\n Commit checkoutCommit = Utils.readObject(cFile, Commit.class);\n\n for (String cwdfileName : CWD.list()) {\n if (!cwdfileName.equals(\".gitlet\")) {\n File cwFile = Utils.join(CWD, cwdfileName);\n if ((cwFile.exists() && !currCommit.fileBlobs.containsKey(cwdfileName) && checkoutCommit.fileBlobs.containsKey(cwdfileName))) {\n exitWithError(\"There is an untracked file in the way; delete it, or add and commit it first.\");\n }\n }\n }\n\n for (String cwdfileName : CWD.list()) {\n if (!cwdfileName.equals(\".gitlet\")) {\n if (!checkoutCommit.fileBlobs.containsKey(cwdfileName) && currCommit.fileBlobs.containsKey(cwdfileName)) {\n Utils.join(CWD, cwdfileName).delete();\n }\n }\n }\n\n commitPointers.updateHead(arg, commitPointers.branches.get(arg));\n\n for (HashMap.Entry<String, String> fileBlob : checkoutCommit.fileBlobs.entrySet()) {\n checkoutFile(fileBlob.getKey());\n }\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }",
"private static boolean rebaseCheck(Gitlet currCommit, String[] args) {\n boolean temp = true;\n if (args.length != 2) {\n System.out.println(\"Please input the branch name\");\n temp = false;\n } else if (!currCommit.tree.hasBranch(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n temp = false;\n } else if (args[1].equals(currCommit.tree.getCurrentBranch())) {\n System.out.println(\"Cannot rebase a branch onto itself.\");\n temp = false;\n } else if (currCommit.tree.branchContainsCommit(currCommit.tree\n .getHeadCommit(args[1]))) {\n System.out.println(\"Already up-to-date.\");\n temp = false;\n }\n\n return temp;\n }",
"@Override\n boolean shouldBranch(StatusRegister sr) {\n return !sr.getFlag(7);\n }",
"boolean solveBranchingModel(BranchingConstraintSet targetSet) {\n for (BranchingConstraint branching : targetSet.branchingConstraints) {\n Map<String, Double> terms = new HashMap<>();\n terms.put(branching.branchingVarName, 1.0);\n\n if (branching.branchingType == ConstraintType.LEQL)\n origin.addConstraint(branching.name, terms, branching.branchingType, -Double.MAX_VALUE, branching.bound);\n else\n origin.addConstraint(branching.name, terms, branching.branchingType, branching.bound, Double.MAX_VALUE);\n\n }\n\n origin.solveLP();\n\n for (BranchingConstraint branching : targetSet.branchingConstraints) {\n origin.removeConstraint(branching.name);\n }\n\n if (origin.getStatus() == Model.Status.OPTIMAL) {\n// System.out.println(\"Objective: \" + origin.getOptimum()); /* Get objective value */\n if (integerSolution()) {\n if (origin.getOptimum() < ub)\n ub = origin.getOptimum();\n return false;\n } else {\n if (origin.getOptimum() > lb)\n lb = origin.getOptimum();\n return true;\n }\n } else {\n System.out.println(\"Current branch is infeasible!\");\n return false;\n }\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesCommentUpdatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesCommentUpdatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestCommentUpdatedActionFilter\");\n }",
"private void assertBranched(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n // First, make sure the proper resources are tagged in the repo\n assertTagged(mapping, branch);\n // Now make sure the proper local files are tagged\n final Map remotes = getTaggedRemoteFilesByPath(mapping, branch);\n final Map locals = getTaggedLocalFilesByPath(mapping, branch);\n for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {\n String key = (String)iter.next();\n ICVSRemoteFile remote = (ICVSRemoteFile)remotes.get(key);\n ICVSFile local = (ICVSFile)locals.get(key);\n assertNotNull(\"Remotely tagged resource was not tagged locally: \" + remote.getRepositoryRelativePath(), local);\n assertEquals(local.getIResource().getParent().getFullPath(), remote, local, false, false /* include tags */);\n assertEquals(\"Remotely tagged resource was not tagged locally: \" + remote.getRepositoryRelativePath(), branch, local.getSyncInfo().getTag());\n locals.remove(key);\n iter.remove();\n }\n // The remote map should be empty after traversal\n for (Iterator iter = remotes.keySet().iterator(); iter.hasNext();) {\n String path = (String) iter.next();\n fail(\"Remote file \" + path + \" was tagged remotely but not locally.\");\n }\n // The local map should be empty after traversal\n for (Iterator iter = locals.keySet().iterator(); iter.hasNext();) {\n String path = (String) iter.next();\n fail(\"Local file \" + path + \" was tagged locally but not remotely.\");\n }\n }",
"public void setBranchNo(String branchNo) {\r\n this.branchNo = branchNo;\r\n }",
"java.lang.String getBranchName();",
"@Test\n public void testDslServerAllPRAllowedBranchesActionsFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslServerAllPRAllowedBranchesActionsFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n /* Only one 'triggers{}' closure */\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n /* Six different triggers expected */\n assertEquals(6, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(1).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(2).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(3).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(4).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(5).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(6, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestServerCreatedActionFilter\");\n assertEquals(dispNames.get(1), \"BitBucketPPRPullRequestServerUpdatedActionFilter\");\n assertEquals(dispNames.get(2), \"BitBucketPPRPullRequestServerSourceUpdatedActionFilter\");\n assertEquals(dispNames.get(3), \"BitBucketPPRPullRequestServerApprovedActionFilter\");\n assertEquals(dispNames.get(4), \"BitBucketPPRPullRequestServerMergedActionFilter\");\n assertEquals(dispNames.get(5), \"BitBucketPPRPullRequestServerDeclinedActionFilter\");\n }",
"public void testCheckoutProjectFlags() {\n String[] sTestCmdLine = { \"soscmd\", \"-command\", \"CheckOutProject\",\n \"-recursive\", \"-server\", SOS_SERVER_PATH, \"-name\", SOS_USERNAME,\n \"-password\", \"\", \"-database\", VSS_SERVER_PATH , \"-project\",\n \"$\"+VSS_PROJECT_PATH, \"\", \"\", \"-soshome\", SOS_HOME, \"-workdir\",\n project.getBaseDir().getAbsolutePath() };\n\n // Set up a sosCheckout task\n sosCheckout.setProject(project);\n sosCheckout.setVssServerPath(VSS_SERVER_PATH);\n sosCheckout.setSosServerPath(SOS_SERVER_PATH);\n sosCheckout.setProjectPath(VSS_PROJECT_PATH);\n sosCheckout.setUsername(SOS_USERNAME);\n sosCheckout.setSosHome(SOS_HOME);\n sosCheckout.setNoCache(true);\n sosCheckout.setNoCompress(false);\n sosCheckout.setVerbose(false);\n sosCheckout.setRecursive(true);\n\n commandline = sosCheckout.buildCmdLine();\n String[] sGeneratedCmdLine = commandline.getCommandline();\n\n int i = 0;\n while (i < sTestCmdLine.length) {\n try {\n assertEquals(\"CheckOutProject arg # \" + String.valueOf(i),\n sTestCmdLine[i],\n sGeneratedCmdLine[i]);\n i++;\n } catch (ArrayIndexOutOfBoundsException aioob) {\n fail(\"CheckOutProject missing arg\");\n }\n\n }\n if (sGeneratedCmdLine.length > sTestCmdLine.length) {\n // We have extra elements\n fail(\"CheckOutProject extra args\");\n }\n }",
"public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}",
"public UpdateandRemoveBranch() {\n initComponents();\n }",
"public int getBranchCount() { return _brcnt; }",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\tGitHub github = GitHub.connectUsingPassword(\"shashankmjain\", \"welcome1\");\n\t\t\n\t\tGHRepository repo=github.getRepository(\"twitter/algebird\");\n\t\t\n\t\tMap branches=repo.getBranches();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(branches);\n\t\t\n\n\t}",
"boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;",
"@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsProject) {\n BsProject other = (BsProject)obj;\n if (!xSV(_projectId, other._projectId)) { return false; }\n return true;\n } else {\n return false;\n }\n }",
"@Test\n public void projectIsNotSelected_doesNotTriggerListeners() {\n projectSelector.handleOpenProjectSelectionDialog();\n\n verifyNoMoreInteractions(projectSelectionListener);\n }",
"private void checkStatus()\n {\n // If the last command failed\n if(!project.getLastCommandStatus())\n {\n view.alert(\"Error: \" + project.getLastCommandStatusMessage());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCommand lastCmd = project.getLastCommand();\n\t\t\tif (lastCmd != null && lastCmd.hasOptionalState())\n\t\t\t{\n\t\t\t\tview.loadFromJSON(lastCmd.getOptionalState());\n\t\t\t\tview.onUpdate(project.getProjectSnapshot(), false);\n\t\t\t}\n\t\t}\n }",
"public void status() {\n\t\tString bName;\n\t\tSystem.out.println(\"=== Branches ===\");\n\t\tIterator iter = myBranch.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbName = (String) entry.getKey();\n\n\t\t\tif (currentBranch.equals(bName)) {\n\t\t\t\tSystem.out.println(\"*\" + bName);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(bName);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Staged Files ===\");\n\t\tfor (int i = 0; i < stagedFiles.size(); i++) {\n\t\t\tSystem.out.println(stagedFiles.get(i));\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Files Marked for Untracking ===\");\n\t\tfor (int i = 0; i < untrackedFiles.size(); i++) {\n\t\t\tSystem.out.println(untrackedFiles.get(i));\n\t\t}\n\t}",
"public boolean containsGraph( final ProjectVersionRef ref )\n {\n return getConnectionInternal().containsProject( params, ref );\n }",
"public void setBranchNum(Integer branchNum) {\r\n this.branchNum = branchNum;\r\n }",
"public boolean shouldExecuteOnProject(Project project)\n {\n return fs.hasFiles(fs.predicates().hasLanguage(\"ruby\"));\n }",
"public boolean hasAtLeastOneReference(Project project);",
"@Test\n public void testDslTriggerCreateUpdatedMergedApprovedPRAllowBranchesWithApproveActionsFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerCreateUpdatedMergedApprovedPRAllowBranchesWithApproveActionsFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n /* Only one 'triggers{}' closure */\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n /* Three different triggers expected */\n assertEquals(4, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(1).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(2).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(3).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(4, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestCreatedActionFilter\");\n assertEquals(dispNames.get(1), \"BitBucketPPRPullRequestUpdatedActionFilter\");\n assertEquals(dispNames.get(2), \"BitBucketPPRPullRequestMergedActionFilter\");\n assertEquals(dispNames.get(3), \"BitBucketPPRPullRequestApprovedActionFilter\");\n }",
"public boolean contains(ReferenceType branch, String name) {\n return this.contains(Reference.class, branch.getBaseDir() + name);\n }",
"public void CheckOut(){\n if (isIn == true){\n isIn = false;\n// System.out.println(name + \" has been checked out of the library.\");\n// }else\n// System.out.println(name + \" is already checked out.\");\n }\n }",
"@Test\n public void branchspec() throws Throwable {\n MergeFilesOptions opts = new MergeFilesOptions();\n opts.setBranch(\"branch1\");\n\n List<IFileSpec> merged = client.mergeFiles(null, null, opts);\n assertEquals(\"wrong number of files\", 2, merged.size());\n\n List<IFileSpec> opened = client.openedFiles(null, null);\n assertEquals(\"files should not have been opened\", 2, opened.size());\n }",
"private boolean checkValidCodebase(int numFiles) {\n\t\tJFrame frame;\n\t\tif (numFiles > MAX_FILES) {\n\t\t\tframe = new JFrame();\n\t\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\t\t\"There are too many files in this codebase. Your codebase has \"\n\t\t\t\t\t\t\t+ numFiles + \" while we allow a maximum of \"\n\t\t\t\t\t\t\t+ MAX_FILES);\n\n\t\t} else if (numFiles < MIN_FILES) {\n\t\t\tframe = new JFrame();\n\t\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\t\t\"There are too few files in this codebase. Your codebase has \"\n\t\t\t\t\t\t\t+ numFiles + \" while we allow a minimum of \"\n\t\t\t\t\t\t\t+ MIN_FILES);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\tframe.dispose();\n\t\treturn false;\n\t}",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n GitVcsSupport support = getSupport();\n VcsRoot root = getRoot(\"master\");\n // ensure that all revisions reachable from master are fetched\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n // now check merge commit relatively to the branch\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n // no check the merge commit relatively to the fork\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n // check the case with broken commit\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n }",
"public String getBranchName() {\n return branchName;\n }",
"String branch();",
"public String getBranchName() {\r\n return branchName;\r\n }",
"@Test\n public void testDslTriggerPRAllowedBranchesCommentCreatedFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslTriggerPRAllowedBranchesCommentCreatedFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n assertEquals(1, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(1, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestCommentCreatedActionFilter\");\n }",
"private DefaultMutableTreeNode contains(DefaultMutableTreeNode tissueBranch, NodeLeaf insideLeaf) {\n\n DefaultMutableTreeNode deux = null;\n // find the tree node of the \"outside\" compartment\n Enumeration children = tissueBranch.children();\n while (children.hasMoreElements()) {\n DefaultMutableTreeNode un = (DefaultMutableTreeNode) children.nextElement();\n// if (un.isLeaf()) {\n String namu = ((NodeLeaf) un.getUserObject()).getCompartment().getIdentity();\n if (insideLeaf.getName().contentEquals(namu)) {\n int r = 0;\n return un;\n }\n// }\n }\n return null;\n }",
"void branch(String branchName) {\n File curr = new File(\".gitlet/current\");\n String path = null;\n File newBranch = new File(\".gitlet/heads/\" + branchName + \".ser\");\n for (File file: curr.listFiles()) {\n path = file.getName();\n }\n if (newBranch.exists()) {\n System.out.println(\"A branch with that name already exists.\");\n return;\n } else {\n Commit currCom = deserializeCommit(\".gitlet/current/\" + path);\n try {\n FileOutputStream fieOut = new FileOutputStream(newBranch);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(currCom);\n } catch (IOException e) {\n System.out.println(\"p\");\n }\n }\n }",
"@Test\n public void testDslServerAllPRAllowedBranchesWithApproveActionsFreeStyle() throws Exception {\n createSeedJob(readDslScript(\"./dsl/testDslServerAllPRAllowedBranchesWithApproveActionsFreeStyle.groovy\"));\n /* Fetch the newly created job and check its trigger configuration */\n FreeStyleProject createdJob = (FreeStyleProject) j.getInstance().getItem(\"test-job\");\n /* Go through all triggers to validate DSL */\n Map<TriggerDescriptor, Trigger<?>> triggers = createdJob.getTriggers();\n /* Only one 'triggers{}' closure */\n assertEquals(1, triggers.size());\n List<String> dispNames = new ArrayList<>();\n for (Trigger<?> entry : triggers.values()) {\n BitBucketPPRTrigger tmp2 = (BitBucketPPRTrigger) entry;\n /* Four different triggers expected */\n assertEquals(5, tmp2.getTriggers().size());\n String tmpNname = tmp2.getTriggers().get(0).getActionFilter().getClass().getName();\n String dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(1).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(2).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n\n tmpNname = tmp2.getTriggers().get(3).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n tmpNname = tmp2.getTriggers().get(4).getActionFilter().getClass().getName();\n dispName = tmpNname.substring(tmpNname.lastIndexOf(\".\") + 1);\n dispNames.add(dispName);\n }\n assertEquals(5, dispNames.size());\n assertEquals(dispNames.get(0), \"BitBucketPPRPullRequestServerCreatedActionFilter\");\n assertEquals(dispNames.get(1), \"BitBucketPPRPullRequestServerUpdatedActionFilter\");\n assertEquals(dispNames.get(2), \"BitBucketPPRPullRequestServerSourceUpdatedActionFilter\");\n assertEquals(dispNames.get(3), \"BitBucketPPRPullRequestServerApprovedActionFilter\");\n assertEquals(dispNames.get(4), \"BitBucketPPRPullRequestServerMergedActionFilter\");\n }",
"public String getBranchname() {\n return branchname;\n }",
"boolean hasGitModules(String treeIsh) throws GitException, InterruptedException;"
] | [
"0.6532074",
"0.64064217",
"0.63736767",
"0.6288467",
"0.61826724",
"0.61792696",
"0.5961198",
"0.5893698",
"0.58809626",
"0.58760923",
"0.580441",
"0.5766577",
"0.5748725",
"0.5741034",
"0.5735676",
"0.57135093",
"0.5693991",
"0.56845427",
"0.5626118",
"0.5580526",
"0.548736",
"0.54832876",
"0.54699486",
"0.539039",
"0.53785354",
"0.5362371",
"0.5337262",
"0.5329107",
"0.53224766",
"0.5318587",
"0.52947754",
"0.52882504",
"0.52851045",
"0.52664435",
"0.5210899",
"0.5204915",
"0.5193619",
"0.5190112",
"0.5151197",
"0.5139011",
"0.5137674",
"0.51190037",
"0.51164067",
"0.50945276",
"0.50821835",
"0.5049335",
"0.50468594",
"0.50443155",
"0.5039365",
"0.503123",
"0.503123",
"0.503123",
"0.50163543",
"0.5002504",
"0.5001274",
"0.49949124",
"0.49912554",
"0.49904755",
"0.49735063",
"0.49609149",
"0.4942923",
"0.49351472",
"0.49218228",
"0.49129227",
"0.4909694",
"0.48958158",
"0.48899466",
"0.48836887",
"0.48825973",
"0.48755503",
"0.48648298",
"0.48582634",
"0.48575416",
"0.48532507",
"0.4845676",
"0.48410326",
"0.48326963",
"0.4831378",
"0.4820373",
"0.4813127",
"0.47978792",
"0.47957414",
"0.4785219",
"0.47781333",
"0.4768355",
"0.4761336",
"0.47600636",
"0.47552517",
"0.47540846",
"0.4746814",
"0.47364137",
"0.47208664",
"0.47207806",
"0.4720224",
"0.47171208",
"0.47145018",
"0.47117022",
"0.47112915",
"0.47056362",
"0.47015962"
] | 0.6907267 | 0 |
Checkouts projects to selected branch | Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void checkoutBranch(String arg) throws IOException {\n File currFile = Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\");\n Commit currCommit = Utils.readObject(currFile, Commit.class);\n\n if(!commitPointers.readBranches().containsKey(arg)){\n exitWithError(\"No such branch exists.\");\n }\n if(commitPointers.readHeadCommit()[0].equals(arg)) {\n exitWithError(\"No need to checkout the current branch.\");\n }\n File cFile = Utils.join(Commit.COMMIT_FOLDER, commitPointers.branches.get(arg) + \".txt\");\n Commit checkoutCommit = Utils.readObject(cFile, Commit.class);\n\n for (String cwdfileName : CWD.list()) {\n if (!cwdfileName.equals(\".gitlet\")) {\n File cwFile = Utils.join(CWD, cwdfileName);\n if ((cwFile.exists() && !currCommit.fileBlobs.containsKey(cwdfileName) && checkoutCommit.fileBlobs.containsKey(cwdfileName))) {\n exitWithError(\"There is an untracked file in the way; delete it, or add and commit it first.\");\n }\n }\n }\n\n for (String cwdfileName : CWD.list()) {\n if (!cwdfileName.equals(\".gitlet\")) {\n if (!checkoutCommit.fileBlobs.containsKey(cwdfileName) && currCommit.fileBlobs.containsKey(cwdfileName)) {\n Utils.join(CWD, cwdfileName).delete();\n }\n }\n }\n\n commitPointers.updateHead(arg, commitPointers.branches.get(arg));\n\n for (HashMap.Entry<String, String> fileBlob : checkoutCommit.fileBlobs.entrySet()) {\n checkoutFile(fileBlob.getKey());\n }\n }",
"public void checkOutBranch(String branchName) throws IOException {\n File branch = new File(Main.ALL_BRANCHES, branchName);\n if (branch.exists()) {\n String associatedID = Utils.readObject(branch, String.class);\n String commitID = Utils.readObject(HEADFILE, String.class);\n File curCommitFile = new File(Main.ALL_COMMITS, commitID);\n Commit currCommit = Utils.readObject(curCommitFile, Commit.class);\n if (branchName.equals(Utils.readObject(HEADNAME, String.class))) {\n System.out.println(\"No need to checkout the current branch.\");\n } else {\n HashMap<String, Blob> allFiles =\n getCommitFromID(associatedID).getFile();\n HashMap<String, Blob> filesInCurr = currCommit.getFile();\n checkOutFiles(allFiles, filesInCurr);\n deleteIfNecessary(allFiles, filesInCurr);\n Utils.writeObject(HEADFILE, associatedID);\n Utils.writeObject(HEADNAME, branchName);\n }\n } else {\n System.out.println(\"No such branch exists.\");\n }\n }",
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"public void checkout() {\n\t}",
"public void checkOut() {\n\t}",
"public void CheckOut(){\n if (isIn == true){\n isIn = false;\n// System.out.println(name + \" has been checked out of the library.\");\n// }else\n// System.out.println(name + \" is already checked out.\");\n }\n }",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"public void checkoutbranch(String givenbranch) {\n if (branch.equals(givenbranch)) {\n Utils.message(\"No need to checkout the current branch. \");\n throw new GitletException();\n } else if (!branches.containsKey(givenbranch)) {\n Utils.message(\"No such branch exists.\");\n throw new GitletException();\n } else {\n Comm curr = head;\n if (hasuntracked(curr)) {\n Utils.message(\"There is an untracked file in the way;\"\n + \" delete it or add it first.\");\n throw new GitletException();\n } else {\n head = branches.get(givenbranch);\n branch = givenbranch;\n branches.put(branch, head);\n for (Blob b: head.getContents().values()) {\n File f = new File(b.getName());\n Utils.writeContents(f,\n head.getContents().get(b.getName()).getContent());\n stagingarea.clear();\n }\n deleteuntracked(head);\n }\n }\n }",
"public void testCommit() throws Exception {\n IProject project = createProject(\"testCommit\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n // Perform some operations on the copy and commit only the top level\n addResources(project, new String[] { \"added.txt\", \"folder2/\", \"folder2/added.txt\" }, false);\n setContentsAndEnsureModified(project.getFile(\"changed.txt\"));\n deleteResources(new IResource[] {project.getFile(\"deleted.txt\")});\n setContentsAndEnsureModified(project.getFile(\"folder1/a.txt\"));\n setContentsAndEnsureModified(project.getFile(\"folder1/subfolder1/c.txt\"));\n \n // Commit the project shallow\n commit(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), \"A commit message\");\n \n // Commit a subfolder shallow\n commit(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), \"A commit message\");\n \n // Now commit the file specifically\n commit(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), \"A commit message\");\n \n // Now commit the rest\n commit(asResourceMapping(new IResource[] { project.getFolder(\"folder2\") }, IResource.DEPTH_INFINITE), \"A commit message\");\n \n // Check the project out under a different name\n IProject copy = checkoutCopy(project, \"-copy\");\n assertEquals(project, copy);\n }",
"public void testCheckoutProjectFlags() {\n String[] sTestCmdLine = { \"soscmd\", \"-command\", \"CheckOutProject\",\n \"-recursive\", \"-server\", SOS_SERVER_PATH, \"-name\", SOS_USERNAME,\n \"-password\", \"\", \"-database\", VSS_SERVER_PATH , \"-project\",\n \"$\"+VSS_PROJECT_PATH, \"\", \"\", \"-soshome\", SOS_HOME, \"-workdir\",\n project.getBaseDir().getAbsolutePath() };\n\n // Set up a sosCheckout task\n sosCheckout.setProject(project);\n sosCheckout.setVssServerPath(VSS_SERVER_PATH);\n sosCheckout.setSosServerPath(SOS_SERVER_PATH);\n sosCheckout.setProjectPath(VSS_PROJECT_PATH);\n sosCheckout.setUsername(SOS_USERNAME);\n sosCheckout.setSosHome(SOS_HOME);\n sosCheckout.setNoCache(true);\n sosCheckout.setNoCompress(false);\n sosCheckout.setVerbose(false);\n sosCheckout.setRecursive(true);\n\n commandline = sosCheckout.buildCmdLine();\n String[] sGeneratedCmdLine = commandline.getCommandline();\n\n int i = 0;\n while (i < sTestCmdLine.length) {\n try {\n assertEquals(\"CheckOutProject arg # \" + String.valueOf(i),\n sTestCmdLine[i],\n sGeneratedCmdLine[i]);\n i++;\n } catch (ArrayIndexOutOfBoundsException aioob) {\n fail(\"CheckOutProject missing arg\");\n }\n\n }\n if (sGeneratedCmdLine.length > sTestCmdLine.length) {\n // We have extra elements\n fail(\"CheckOutProject extra args\");\n }\n }",
"Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);",
"TArea checkout(TCommit commit, TRepo repo, AreaFactory<TContent, TArea> areaFactory, ContentFactory<TContent> contentFactory);",
"public interface CheckoutProvider {\n @NonNls ExtensionPointName<CheckoutProvider> EXTENSION_POINT_NAME = new ExtensionPointName<>(\"com.intellij.checkoutProvider\");\n\n /**\n * @param project current project or default project if no project is open.\n * @deprecated should not be used outside VcsCloneComponentStub\n * Migrate to {@link com.intellij.util.ui.cloneDialog.VcsCloneDialog} or {@link VcsCloneComponent}\n */\n @Deprecated(forRemoval = true)\n void doCheckout(@NotNull final Project project, @Nullable Listener listener);\n\n @Nls @NotNull String getVcsName();\n\n interface Listener {\n @RequiresBackgroundThread\n void directoryCheckedOut(File directory, VcsKey vcs);\n\n @RequiresBackgroundThread\n void checkoutCompleted();\n }\n\n class CheckoutProviderComparator implements Comparator<CheckoutProvider> {\n @Override\n public int compare(@NotNull final CheckoutProvider o1, @NotNull final CheckoutProvider o2) {\n return UIUtil.removeMnemonic(o1.getVcsName()).compareTo(UIUtil.removeMnemonic(o2.getVcsName()));\n }\n }\n\n @NotNull\n default VcsCloneComponent buildVcsCloneComponent(@NotNull Project project, @NotNull ModalityState modalityState, @NotNull VcsCloneDialogComponentStateListener dialogStateListener) {\n return new VcsCloneComponentStub(project, this, VcsBundle.message(\"clone.dialog.clone.button\"));\n }\n}",
"public void updateBranches() throws VcsException {\n VirtualFile root = getSelectedRoot();\n GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);\n handler.addParameters(\"--no-color\", \"-a\", \"--no-merged\");\n String output = ProgressManager.getInstance().runProcessWithProgressSynchronously(\n () -> Git.getInstance().runCommand(handler).getOutputOrThrow(),\n \"Preparing List of Branches\", true, myProject);\n myBranchChooser.clear();\n for (StringTokenizer lines = new StringTokenizer(output, \"\\n\", false); lines.hasMoreTokens();) {\n String branch = lines.nextToken().substring(2);\n myBranchChooser.addElement(branch, false);\n }\n }",
"public void checkout(String name) throws IOException {\n\t\tif (myBranch.keySet().contains(name)) {\n\t\t\tif (conflictState) {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Cannot do this command until the merge conflict has been resolved.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (name == currentBranch) {\n\t\t\t\tSystem.out.println(\"No need to checkout the current branch.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (String s : myBranch.get(name).file().keySet()) {\n\t\t\t\tcheckoutHelper(s);\n\t\t\t\tFile before = new File(myBranch.get(name).file().get(s));\n\t\t\t\tFile after = new File(\"./\" + s);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\tcurrentBranch = name;\n\t\t\tmyHead = myBranch.get(name);\n\t\t\ttracked = myHead.file();\n\n\t\t} else if (myHead.file().keySet().contains(name)) {\n\t\t\tcheckoutHelper(name);\n\t\t\tString path = myHead.file().get(name);\n\t\t\tFile workingDirectory = new File(\".\");\n\t\t\tFile result = new File(workingDirectory.getCanonicalPath() + \"/\"\n\t\t\t\t\t+ name);\n\t\t\tcopyFile(path, result.getCanonicalPath());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"File does not exist in the most recent commit, or no such branch exists.\");\n\t\t}\n\t\tSerialization();\n\t}",
"void checkoutIntoArea(TCommit commit, TRepo repo, TArea areaToUpdate, ContentFactory<TContent> contentFactory);",
"public interface GitService extends Service {\n\n /**\n * Checks that project has selected branches\n *\n * @param project project for checking\n * @param branches branches that need to be checked\n * @param isCommon if true - checking will occur for all selected branches, if false - for at least one of them.\n * @return true if project contains selected branches, false if does not contains\n */\n boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branch selected branch\n * @param progress the listener for obtaining data on the process of performing the operation\n *\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branchName name of the branch\n * @param isRemote <code>true</code> if the branch has {@link BranchType#REMOTE}\n * @param progress the listener for obtaining data on the process of performing the operation\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, String branchName, boolean isRemote, ProgressListener progress);\n\n /**\n * Gets projects that have uncommited changes\n *\n * @param projects projects that need to be checked\n * @return list of projects that has uncommited changes\n */\n List<Project> getProjectsWithChanges(List<Project> projects);\n\n /**\n * Reverts uncommited changes\n *\n * @param projects projects that need to be resets\n * @return list of projects that and their discard statuses\n */\n Map<Project, JGitStatus> revertChanges(List<Project> projects);\n\n /**\n * Commit changes to selectedProjects\n *\n * @param projects projects that contains changes\n * @param commitMessage message for commit\n * @param isPushImmediately if true - make push operation after commiting, if false - make commit without pushing\n * @param progressListener Listener for obtaining data on the process of performing the operation.\n */\n Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);\n\n /**\n * Creates new branch\n *\n * @param projects the projects that needs new branch\n * @param branchName new branch name\n * @param startPoint corresponds to the start-point option; if <code>null</code>, the current HEAD will be used\n * @param force if <code>true</code> and the branch with the given name\n * already exists, the start-point of an existing branch will be\n * set to a new start-point; if false, the existing branch will\n * not be changed\n * @return map with projects and theirs statuses of branch creating\n */\n Map<Project, JGitStatus> createBranch(List<Project> projects, String branchName, String startPoint, boolean force);\n\n /**\n * Returns the set of selected type of branches\n *\n * @param projects projects list\n * @param branchType selected {@link BranchType}\n * @param isOnlyCommon if <code>true</code> returns only common branches for all projects and otherwise if <code>false</code>\n * @return set of the branches or empty set if such type of branches does not exist for this projects\n */\n Set<Branch> getBranches(List<Project> projects, BranchType branchType, boolean isOnlyCommon);\n\n /**\n * Returns current branch name for selected project\n *\n * @param project - selected project\n * @return current branch name for selected project or <code>null</code> if project has no branches (unreachable state)\n */\n String getCurrentBranchName(Project project);\n\n /**\n * Pushed selected projects to upstream\n *\n * @param projects - list of projects\n * @param progressListener - listener for obtaining data on the process of performing the operation\n * @return map of operation statuses\n */\n Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);\n\n /**\n * Pulls changes in selected projects from upstream\n *\n * @param projects - selected projects\n * @param progressListener - instance of {@link OperationProgressListener}\n * @return <code>true</code> if pull operation works well and <code>false</code> otherwise\n */\n boolean pull(List<Project> projects, OperationProgressListener progressListener);\n\n /**\n * Checks that project has any references.\n *\n * @param project the cloned project\n * @return <code>true</code> if project has any references, <code>false</code> if project does not have references.\n */\n public boolean hasAtLeastOneReference(Project project);\n\n /**\n * Returns count of commits ahead and behind index\n *\n * @param project - project to show status\n * @param branchName - the name of branch\n * @return array of ahead and behind commits counts<br>\n * Array consists of two parameters:\n * first is the count of commits ahead Index, <br>\n * second is the count of commits behind Index\n */\n public int[] getAheadBehindIndexCounts(Project project, String branchName);\n\n /**\n * Checks whether the project has conflicts and uncommitted changes.\n *\n * @param project the project\n * @return array of values. Array consists of two parameters:\n * - has conflicts: <true> is has, otherwise <false>.\n * - has changes: <true> is has, otherwise <false>.\n */\n public boolean[] hasConflictsAndChanges(Project project);\n\n /**\n * Starts canceling process for cloning. This may take some time.\n */\n void cancelClone();\n\n /** This method return tracking branch.\n *\n * @param project\n * @return tracking branch.\n */\n public String getTrackingBranch(Project project);\n\n /**\n * This method return all commits for currently selected project\n *\n * @param project the project\n * @param branchName the branch\n * @return list of all commits for currently selected project\n */\n public List<Commit> getAllCommits(Project project, String branchName);\n\n /**\n * Gets ChangedFiles for project.\n *\n * @param project the project\n * @return a ChangedFiles list\n */\n List<ChangedFile> getChangedFiles(Project project);\n\n /**\n * Adds untracked files to index.\n *\n * @param files the map of projects and changed files\n * @return the list of added files\n */\n List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);\n\n /**\n * Resets changed files to head\n *\n * @param files the map which has projects and their changed files\n * @return a list of changed files\n */\n List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);\n\n /**\n * Gets ProjectStatus for project.\n * We use {@link Status} for getting info about conflicting, untracked files etc.\n * Also, use it for checking the presence of uncommitted changes.\n * Gets current branch name, ahead and behind indexes using {@link Git}.\n *\n * @param project the project\n * @return ProjectStatus for the project.\n */\n ProjectStatus getProjectStatus(Project project);\n\n /**\n * Gets branches of project\n *\n * @param projects cloned project\n * @param brType type branch\n * @param onlyCommon if value is <code>true</code> return only common branches of projects,\n * if <code>false</code> return all branches.\n * @return a list of branches\n */\n Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);\n\n /**\n * Replaces changed files with HEAD revision\n *\n * @param changedFiles the files for replacing\n */\n void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);\n\n /**\n * Creates stash for projects\n *\n * @param projects the cloned projects\n * @param stashMessage the stash message\n * @param includeUntracked <code>true</code> if need to include untracked file to stash, otherwise <code>false</code>\n * @return a map of operation statuses\n */\n Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);\n\n /**\n * Gets list of stashes for projects\n *\n * @param projects the cloned projects\n * @return a list of projects' stashes\n */\n List<Stash> getStashList(List<Project> projects);\n\n /**\n * Applies stash for the project\n *\n * @param stash the stash for applying\n * @param progressListener the listener for obtaining data on the process of performing the operation\n */\n void applyStashes(Stash stash, ProgressListener progressListener);\n\n /**\n * Drops stash from the project\n *\n * @param stash the stash which need to drop\n * @return a map of operation statuses\n */\n Map<Project, Boolean> stashDrop(Stash stash);\n\n /**\n * Deletes branch from projects\n *\n * @param projects the cloned projects\n * @param deletedBranch the branch which will be deleted\n * @param progressListener the listener for obtaining data on the process of performing the operation\n * @return a map of operation statuses by each project.\n * <code>true</code> if a branch was successfully deleted from a project, otherwise <code>false</code>.\n */\n Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);\n}",
"public List<Commit> getAllCommits(Project project, String branchName);",
"public void removeBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"removeBranch()\");\n Via via=(Via)sipHeader;\n \n via.removeParameter(Via.BRANCH);\n }",
"void commit(String workspace);",
"void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }",
"public void checkOut() {\n\n }",
"private static void checkout(Gitlet currCommit, String[] args) {\n if (args.length < 2 && args.length > 3) {\n System.out\n .println(\"Please input one of the following combinations: \"\n + \"\\n File Name \\n Commit Id and File Name \\n Branch Name\");\n return;\n }\n if (!isSure()) {\n return;\n }\n if (args.length == 2) {\n if (currCommit.tree.getBranches().contains(args[1])) {\n if (currCommit.tree.getCurrentBranch().equals(args[1])) {\n System.out\n .println(\"No need to checkout the current branch.\");\n return;\n }\n Commit headCommit = currCommit.tree.getHeadCommit(args[1]);\n HashMap<String, String> locations = headCommit.getFileLoc();\n HashMap<String, String> currentFiles = currCommit.tree\n .getHeadCommit().getFileLoc();\n for (String x : currentFiles.keySet()) {\n if (locations.containsKey(x)) {\n FileManip temp = new FileManip(locations.get(x));\n temp.copyFile(x);\n }\n }\n currCommit.tree.setCurrentBranch(args[1]);\n currCommit.status.replaceMainBranch(args[1]);\n addSerializeFile(currCommit);\n return;\n }\n Commit headCommit = currCommit.tree.getHeadCommit();\n if (currCommit.tree.containsFile(args[1])) {\n FileManip dest = new FileManip(headCommit.getLocation(args[1]));\n dest.copyFile(args[1]);\n return;\n }\n String error = \"File does not exist in the most recent commit,\";\n error += \" or no such branch exists.\";\n System.out.println(error);\n return;\n } else {\n if (!currCommit.tree.hasId(args[1])) {\n System.out.println(\"No commit with that id exists.\");\n return;\n\n }\n Commit commit = currCommit.tree.getCommitFromId(args[1]);\n\n if (!commit.containsFile(args[2])) {\n System.out.println(\"No such file exists in this commit.\");\n\n } else {\n System.out.println(commit.getLocation(args[2]));\n FileManip dest = new FileManip(commit.getLocation(args[2]));\n dest.copyFile(args[2]);\n }\n }\n }",
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"public void checkin(String workspace) throws IOException {\n String[] command = {SVN, COMMIT, workspace, MESSAGE, \"\\\"\\\"\", NON_INTERACTIVE};\n\n long before = System.currentTimeMillis();\n run(command, null, null, null);\n long after = System.currentTimeMillis();\n\n }",
"void copyToBranch(ID sourceBranchId, ID targetBranchId);",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"public String getTrackingBranch(Project project);",
"String getCurrentBranchName(Project project);",
"public void Checkout_button() {\n\t\tthis.endUser.checkOut();\n\t\tthis.defaultSetup();\n\t}",
"void update(IBranchSpec branch) throws P4JavaException;",
"void branch(String branchName) {\n File curr = new File(\".gitlet/current\");\n String path = null;\n File newBranch = new File(\".gitlet/heads/\" + branchName + \".ser\");\n for (File file: curr.listFiles()) {\n path = file.getName();\n }\n if (newBranch.exists()) {\n System.out.println(\"A branch with that name already exists.\");\n return;\n } else {\n Commit currCom = deserializeCommit(\".gitlet/current/\" + path);\n try {\n FileOutputStream fieOut = new FileOutputStream(newBranch);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(currCom);\n } catch (IOException e) {\n System.out.println(\"p\");\n }\n }\n }",
"public String checkoutBranch(String branch, boolean create) throws IOException {\n List<String> command = new ArrayList<String>();\n command.add(\"checkout\");\n if (create) {\n command.add(\"-b\"); // force create new branch\n }\n command.add(expandNoHeadsRef(branch));\n String checkoutResult = git.launchCommand(command.toArray(new String[command.size()]));\n debuggingLogger.fine(String.format(\"Checkout result: %s\", checkoutResult));\n return checkoutResult;\n }",
"public void checkout() throws VcsException;",
"Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);",
"private void archiveProject(final Project project) {\n\t\t// TODO RemoveWorkerFromProject löschen\n\t\tfinal ArrayList<Task> tasks = getProjectTasks(project);\n\t\tif (!tasks.isEmpty()) {\n\t\t\tfinal TaskController taskController = mainController.getTaskController();\n\t\t\ttaskController.removeWorker(tasks.get(0));\n\t\t\tfor (final Task task : tasks) {\n\t\t\t\tif (task.getCurrentWorker() != null) {\n\t\t\t\t\ttaskController.removeWorker(task);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinal ArrayList<Worker> team = project.getWorkers();\n\t\tif (!team.isEmpty()) {\n\t\t\tfinal TeamController teamController = mainController.getTeamController();\n\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\twhile (!team.isEmpty()) {\n\t\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\t}\n\t\t}\n\t\tproject.setActive(false);\n\t}",
"private void checkout() {\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }",
"boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);",
"public UpdateandRemoveBranch() {\n initComponents();\n }",
"private static void removeBranch(Gitlet currCommit, String[] args) {\n if (args.length != 2) {\n System.out.println(\"Please input a branch name\");\n\n } else if (currCommit.tree.getCurrentBranch().equals(args[1])) {\n System.out.println(\"Cannot remove the current branch.\");\n\n } else if (!currCommit.tree.getBranches().contains(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n\n } else {\n currCommit.tree.removeBranch(args[1]);\n currCommit.status.removeBranch(args[1]);\n addSerializeFile(currCommit);\n }\n }",
"@Test\n public void testBranchCoverageSuccess() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,75,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogNotContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogNotContains(\"ERROR:\", run);\n }",
"private void copyAndSave()\n {\n // create new branch\n if (NEW_BRANCH.equals(selectedBranch)) {\n createAndSetNewBranch();\n }\n List<String> updatePages = getAllPageIdsForUpdate();\n\n // copy current filestats entry to source target branch\n copyAndSaveFileStats(branch, selectedBranch, updatePages);\n\n // add new page information to filestats of new branch\n updateFileStats(FileState.valueOf(newPageState), selectedAssignee, selectedBranch, updatePages);\n\n // save page(s) in new branch\n wikiContext.runInTenantContext(selectedBranch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().saveElement(wikiContext, pageToUpdate, true);\n }\n return null;\n }\n });\n\n // remove page(s) in old branch\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().removeWikiPage(wikiContext, pageToUpdate);\n }\n return null;\n }\n });\n }",
"public void fileNameCheckOut(String fileName) throws IOException {\n String id = getHeadCommitID();\n File commitFile = new File(Main.ALL_COMMITS, id);\n processCheckout(commitFile, fileName);\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n GitVcsSupport support = getSupport();\n VcsRoot root = getRoot(\"master\");\n // ensure that all revisions reachable from master are fetched\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n // now check merge commit relatively to the branch\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n // no check the merge commit relatively to the fork\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n // check the case with broken commit\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n }",
"@Test\n public void testBranchCoverageFailUnstable() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,0,76\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Code coverage enforcement failed for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's stability is 75.0 and set mininum stability is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build due to unstability.\", run);\n }",
"private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }",
"@Test\n public void testBranchCoverageFail() throws Exception {\n Jenkins jenkins = jenkinsRule.jenkins;\n WorkflowJob project = jenkins.createProject(WorkflowJob.class, \"cob-test\");\n \n project.setDefinition(new CpsFlowDefinition(new ScriptBuilder().setBranchCoverage(\"76,76,0\").getScript()));\n \n copyCoverageFile(\"coverage-with-data.xml\", \"coverage.xml\", project);\n \n WorkflowRun run = project.scheduleBuild2(0).get();\n jenkinsRule.waitForCompletion(run);\n \n jenkinsRule.assertLogContains(\"Publishing Cobertura coverage report...\", run);\n jenkinsRule.assertLogContains(\"Unhealthy for the following metrics:\", run);\n jenkinsRule.assertLogContains(\"Conditionals's health is 75.0 and set minimum health is 76.0.\", run);\n jenkinsRule.assertLogContains(\"ERROR: [Cobertura] Failing build because it is unhealthy.\", run);\n }",
"public Mono<Application> createBranch(String defaultApplicationId, GitBranchDTO branchDTO, MultiValueMap<String, String> params) {\n\n final String srcBranch = params.getFirst(FieldName.BRANCH_NAME);\n if (StringUtils.isEmptyOrNull(srcBranch)) {\n throw new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.BRANCH_NAME);\n }\n\n return applicationService.getApplicationByBranchNameAndDefaultApplication(srcBranch, defaultApplicationId, MANAGE_APPLICATIONS)\n .zipWhen(srcApplication -> {\n GitApplicationMetadata gitData = srcApplication.getGitApplicationMetadata();\n if (gitData.getDefaultApplicationId().equals(srcApplication.getId())) {\n return Mono.just(srcApplication.getGitApplicationMetadata().getGitAuth());\n }\n return applicationService.getSshKey(gitData.getDefaultApplicationId());\n })\n .flatMap(tuple -> {\n Application srcApplication = tuple.getT1();\n GitAuth defaultGitAuth = tuple.getT2();\n GitApplicationMetadata srcBranchGitData = srcApplication.getGitApplicationMetadata();\n if (srcBranchGitData == null\n || srcBranchGitData.getDefaultApplicationId() == null\n || srcBranchGitData.getRepoName() == null) {\n return Mono.error(new AppsmithException(\n AppsmithError.INVALID_GIT_CONFIGURATION,\n \"Unable to find the parent branch. Please create a branch from other available branches\"\n ));\n }\n Path repoSuffix = Paths.get(srcApplication.getOrganizationId(), srcBranchGitData.getDefaultApplicationId(), srcBranchGitData.getRepoName());\n // Create a new branch from the parent checked out branch\n return Mono.zip(\n gitExecutor.checkoutToBranch(repoSuffix, srcBranch)\n .onErrorResume(error -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"checkout\", \"Unable to find \" + srcBranch))),\n gitExecutor.fetchRemote(repoSuffix, defaultGitAuth.getPublicKey(), defaultGitAuth.getPrivateKey(), false))\n .flatMap(ignore -> gitExecutor.listBranches(repoSuffix, ListBranchCommand.ListMode.REMOTE, srcBranchGitData.getRemoteUrl(), defaultGitAuth.getPublicKey(), defaultGitAuth.getPrivateKey())\n .flatMap(branchList -> {\n boolean isDuplicateName = branchList.stream()\n // TODO We are only supporting origin as the remote name so this is safe\n // but needs to be altered if we starts supporting user defined remote names\n .anyMatch(branch -> branch.getBranchName().replace(\"refs/remotes/origin/\", \"\")\n .equals(branchDTO.getBranchName()));\n\n if (isDuplicateName) {\n return Mono.error(new AppsmithException(\n AppsmithError.DUPLICATE_KEY_USER_ERROR,\n \"remotes/origin/\" + branchDTO.getBranchName(),\n FieldName.BRANCH_NAME\n ));\n }\n return gitExecutor.createAndCheckoutToBranch(repoSuffix, branchDTO.getBranchName());\n }))\n .flatMap(branchName -> {\n final String srcApplicationId = srcApplication.getId();\n srcBranchGitData.setBranchName(branchName);\n // Save a new application in DB and update from the parent branch application\n srcBranchGitData.setGitAuth(null);\n srcApplication.setId(null);\n srcApplication.setPages(null);\n srcApplication.setPublishedPages(null);\n srcApplication.setGitApplicationMetadata(srcBranchGitData);\n return Mono.zip(\n applicationService.save(srcApplication),\n importExportApplicationService.exportApplicationById(srcApplicationId, SerialiseApplicationObjective.VERSION_CONTROL)\n );\n })\n .onErrorResume(error -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"branch\", error.getMessage())));\n })\n .flatMap(tuple -> {\n Application savedApplication = tuple.getT1();\n return importExportApplicationService.importApplicationInOrganization(\n savedApplication.getOrganizationId(),\n tuple.getT2(),\n savedApplication.getId()\n );\n });\n }",
"public void getBranchCommand() {\n\n }",
"public void testProjectsView() {\n ProjectsTabOperator.invoke();\n // needed for slower machines\n JemmyProperties.setCurrentTimeout(\"JTreeOperator.WaitNextNodeTimeout\", 30000); // NOI18N\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n Node sampleClass1Node = new Node(sample1Node, SAMPLE1_FILE_NAME);\n // test pop-up menu actions\n // \"Copy\"\n CopyAction copyAction = new CopyAction();\n copyAction.perform(sampleClass1Node);\n // \"Paste\"\n PasteAction pasteAction = new PasteAction();\n // \"Refactor\"\n String refactorItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_Action\");\n // \"Copy...\"\n String copyItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_CopyAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + copyItem).perform(sample1Node);\n\n String copyClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_CopyClass\");\n NbDialogOperator copyClassDialog = new NbDialogOperator(copyClassTitle);\n // \"Refactor\"\n String refactorLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"CTL_Finish\");\n new JButtonOperator(copyClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n copyClassDialog.waitClosed();\n\n Node newClassNode = new Node(sample1Node, \"SampleClass11\"); // NOI18N\n // \"Cut\"\n CutAction cutAction = new CutAction();\n cutAction.perform(newClassNode);\n // package created by default when the sample project was created\n Node sampleProjectPackage = new Node(sourcePackagesNode, SAMPLE_PROJECT_NAME.toLowerCase());\n // \"Move...\"\n String moveItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_MoveAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + moveItem).perform(sampleProjectPackage);\n new EventTool().waitNoEvent(1000);\n // confirm refactoring\n // \"Move Class\"\n String moveClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_MoveClass\");\n NbDialogOperator moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n try {\n moveClassDialog.waitClosed();\n } catch (TimeoutExpiredException e) {\n // try it once more\n moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n }\n // \"Delete\"\n newClassNode = new Node(sampleProjectPackage, \"SampleClass11\"); // NOI18N\n new EventTool().waitNoEvent(2000);\n new DeleteAction().perform(newClassNode);\n DeleteAction.confirmDeletion();\n }",
"private void checkout() {\n\t\tif (bag.getSize() == 0) {\n\t\t\tSystem.out.println(\"Unable to check out, the bag is empty!\");\n\t\t} else {\n\t\t\tcheckoutNotEmptyBag();\n\t\t}\n\t}",
"public void copyProjectsAction(){\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) {\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-copyProject() ERROR: \" + caught.toString());\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tif(!result.hasErrors()) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tdialogClose();\n\t\t\t\t\t\tBmoProject bmoProject = (BmoProject) result.getBmObject();\n\t\t\t\t\t\tUiProjectDetail uiProjectDetail = new UiProjectDetail(getUiParams(),\n\t\t\t\t\t\t\t\tbmoProject.getId());\n\t\t\t\t\t\tuiProjectDetail.show();\n\n\t\t\t\t\t\tgetUiParams().getUiTemplate().hideEastPanel();\n\t\t\t\t\t\tUiProject uiProject = new UiProject(getUiParams());\n\t\t\t\t\t\tuiProject.edit(bmoProject);\n\t\t\t\t\t\tshowSystemMessage(\"Copia Exitosa.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t\tshowSystemMessage(result.getBmErrorList().get(0).getMsg());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tif(copyProjectSuggestBox.getSelectedId() > 0) {\n\t\t\t\t\t\tbmoProject.setId(copyProjectSuggestBox.getSelectedId());\n\t\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().action(bmoProject.getPmClass(), bmoProject, BmoProject.ACCESS_COPYPROJECT, \"\" + customerSuggestBox.getSelectedId(), callback);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \" ERROR: \" + \"Debe seleccionar Projecto\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\t\t\t\t\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-action() ERROR: \" + e.toString());\n\t\t\t}\n\t\t}",
"WithCreate withBranch(String branch);",
"void removeBranch(TRepo repo, String branchName);",
"@Override\n\tpublic void checkout(MetodoPagamento object) {\n\t\t\n\t}",
"private void createAndSetNewBranch()\n {\n Date startDateOfArticle = getStartDateOfArticle();\n final String branchId = startDateOfArticle == null ? GWikiProps.formatTimeStamp(new Date()) : GWikiProps\n .formatTimeStamp(startDateOfArticle);\n\n wikiContext.runInTenantContext(branchId, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n final GWikiElement branchInfo = PlcUtils.createInfoElement(wikiContext, branchId, \"\", branchId, \"\");\n final GWikiElement branchFileStats = PlcUtils.createFileStats(wikiContext);\n wikiContext.getWikiWeb().getAuthorization().runAsSu(wikiContext, new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n wikiContext.getWikiWeb().saveElement(wikiContext, branchInfo, false);\n wikiContext.getWikiWeb().saveElement(wikiContext, branchFileStats, false);\n return null;\n }\n });\n GLog.note(GWikiLogCategory.Wiki, \"Autocreate branch: \" + branchId);\n return null;\n }\n });\n\n // set new created branch as selected\n selectedBranch = branchId;\n }",
"public void clearProject()\n\t{\n\t\tstoreViewState();\n\t\tproject.clearProject();\n\t\tcheckStatus();\n\t}",
"protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }",
"Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);",
"void reset() throws GitException, InterruptedException;",
"public void testCheckoutFile() throws Exception {\n System.out.print(\".. Testing checking out a file ..\");\n String workingPath = getWorkDirPath();\n workingDirectory = workingPath.substring(0, workingPath.indexOf(\"RegularDevelopment\")) + \"RepositoryCreation\" + File.separator + \"testCreateProjects\";\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current]\");\n new Action(VERSIONING_MENU + \"|\" + CHECK_OUT, CHECK_OUT).perform(A_FileNode);\n Thread.sleep(2000);\n String children[] = filesystemNode.getChildren();\n int count = children.length;\n boolean found = false;\n for(int i=0; i<count; i++) {\n String child = children[i];\n if (child.startsWith(\"A_File [Current] (\") && child.endsWith(\")\")) {\n found = true;\n userName = child.substring(18, child.length() - 1);\n }\n }\n if (!found) captureScreen(\"Error: Unable to find locked A_File [Current] (...) file.\");\n new DeleteAction().perform(A_FileNode);\n new NbDialogOperator(\"Confirm Object Deletion\").no();\n System.out.println(\". done !\");\n }",
"public RelocateBranch() {\n }",
"public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"Submitted Fourth project -branch 2 shelve\");\r\n\t}",
"public static void branch(String arg){\n commitPointers.branches = commitPointers.readBranches();\n if (commitPointers.branches.containsKey(arg)){\n exitWithError(\"A branch with that name already exists.\");\n }\n\n String headID = commitPointers.readHeadCommit()[1];\n commitPointers.branches.put(arg, headID);\n commitPointers.saveBranches();\n }",
"public void checkout(String configuration, String repository, String workspace) throws IOException {\n String[] command = {SVN, CHECKOUT, REVISION, configuration, repository, workspace};\n// String[] command = {SVN, CHECKOUT, REVISION, configuration, NON_INTERACTIVE, repository, workspace};\n\n long before = System.currentTimeMillis();\n run(command, null, null, null);\n long after = System.currentTimeMillis();\n\n }",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"@Test\n public void multipleMigrationsToOneDestination_separateRoots() throws Exception {\n fetch = primaryBranch;\n push = primaryBranch;\n\n Files.createDirectories(workdir.resolve(\"foo\"));\n Files.createDirectories(workdir.resolve(\"bar\"));\n Files.createDirectories(workdir.resolve(\"baz\"));\n\n Files.write(workdir.resolve(\"foo/one\"), \"First version\".getBytes(UTF_8));\n Files.write(workdir.resolve(\"bar/one\"), \"First version\".getBytes(UTF_8));\n Files.write(workdir.resolve(\"baz/one\"), \"First version\".getBytes(UTF_8));\n\n repo().withWorkTree(workdir).add().files(\"foo/one\").files(\"bar/one\").files(\"baz/one\").run();\n repo().withWorkTree(workdir).simpleCommand(\"commit\", \"-m\", \"Initial commit\");\n\n Glob repoAglob = Glob.createGlob(ImmutableList.of(\"foo/**\"), ImmutableList.of(\"bar/**\"));\n Glob repoBglob = Glob.createGlob(ImmutableList.of(\"bar/**\"), ImmutableList.of(\"foo/**\"));\n\n // Change on repo A\n Files.write(workdir.resolve(\"foo/one\"), \"Second version\".getBytes(UTF_8));\n Writer<GitRevision> writer1 = newWriter();\n DummyRevision repoAfirstRev = new DummyRevision(\"Foo first\");\n process(writer1, repoAglob, repoAfirstRev);\n\n assertThatCheckout(repo(), primaryBranch)\n .containsFile(\"foo/one\", \"Second version\")\n .containsFile(\"bar/one\", \"First version\")\n .containsFile(\"baz/one\", \"First version\")\n .containsNoMoreFiles();\n verifyDestinationStatus(repoAglob, repoAfirstRev);\n\n // Change on repo B, does not affect repo A paths\n Files.write(workdir.resolve(\"bar/one\"), \"Second version\".getBytes(UTF_8));\n Writer<GitRevision> writer2 = newWriter();\n DummyRevision repoBfirstRev = new DummyRevision(\"Bar first\");\n process(writer2, repoBglob, repoBfirstRev);\n\n assertThatCheckout(repo(), primaryBranch)\n .containsFile(\"foo/one\", \"Second version\")\n .containsFile(\"bar/one\", \"Second version\")\n .containsFile(\"baz/one\", \"First version\")\n .containsNoMoreFiles();\n verifyDestinationStatus(repoAglob, repoAfirstRev);\n verifyDestinationStatus(repoBglob, repoBfirstRev);\n\n // Change on repo A does not affect repo B paths\n Files.write(workdir.resolve(\"foo/one\"), \"Third version\".getBytes(UTF_8));\n Writer<GitRevision> writer3 = newWriter();\n DummyRevision repoASecondRev = new DummyRevision(\"Foo second\");\n process(writer3, repoAglob, repoASecondRev);\n\n assertThatCheckout(repo(), primaryBranch)\n .containsFile(\"foo/one\", \"Third version\")\n .containsFile(\"bar/one\", \"Second version\")\n .containsFile(\"baz/one\", \"First version\")\n .containsNoMoreFiles();\n verifyDestinationStatus(repoAglob, repoASecondRev);\n verifyDestinationStatus(repoBglob, repoBfirstRev);\n }",
"private void checkout(){\n Scanner input = new Scanner(System.in);\n System.out.println(\"checkout commit : \");\n System.out.println(\"masukan nama commit : \"); // nama commit bukan kode hash\n String value = input.nextLine();\n \n // overwrite file commit ke file-untuk-git\n overWriteFile(\"file-untuk-git\", value + \".txt\", false);\n \n \n }",
"private void checkout(ObjectId headId, String refName) throws IOException {\n \t\tif (!Constants.HEAD.equals(refName))\n \t\t\tdb.writeSymref(Constants.HEAD, refName);\n \n \t\tfinal Commit commit = db.mapCommit(headId);\n \t\tfinal RefUpdate u = db.updateRef(Constants.HEAD);\n \t\tu.setNewObjectId(commit.getCommitId());\n \t\tResult result = u.forceUpdate();\n \t\t\n \t\t//X TODO REMOVE DEBUGGING OUTPUT and CHECK RESULT!\n \t\tSystem.out.println(\"updateRef \" + u + \" returned Result=\" + result);\n \n \t\tfinal GitIndex index = db.getIndex();\n \t\tfinal Tree tree = commit.getTree();\n \t\tfinal WorkDirCheckout co;\n \n \t\tco = new WorkDirCheckout(db, db.getWorkDir(), index, tree);\n \t\tco.checkout();\n \t\tindex.write();\n \t}",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }",
"@Override\n protected Boolean doInBackground(String... params) {\n com.skrumaz.app.data.Store.Projects db = new com.skrumaz.app.data.Store.Projects(mContext);\n projects.clear();\n projects.addAll(db.getProjects(Preferences.getWorkspaceId(mContext, true)));\n db.close();\n\n return null;\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control..\n *\n * @param branch The repo branch of the source control.\n * @return the next definition stage.\n */\n Update withBranch(String branch);\n }",
"public void clickOnTheCheckOutButton() {\n\t\tSystem.out.println(\"Making click in the button checkout\");\n\t\twaitForAnExplicitElement(body_button_checkout);\n\t\tclick(body_button_checkout);\n\t}",
"@Override\n public void actionPerformed(AnActionEvent e) {\n CommandRun cmr = new CommandRun();\n Project currentProject = e.getProject();\n// strProjectPath = currentProject.getBasePath();\n// String[] arrCheckOuts = cmr.ListCheckOuts();\n AddinUI aui = new AddinUI();\n aui.createUI();\n }",
"public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}",
"public void finishProject(Subproject project) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.lowerScore(project.getFinishField().getAmountSZT());\n\t\t\t\tcurrent.raiseScore(project.getFinishField().getAmountSZT());\n\t\t\t}\n\t\t}\n\t\tproject.finishProject();\n\t\tprojectsFinished.add(project);\n\t\tprojectsActive.remove(project);\n\t}",
"void submoduleSync() throws GitException, InterruptedException;",
"public static void goToCheckout() {\n click(CHECKOUT_UPPER_MENU);\n }",
"@Test(dataProvider = \"doFetchInSeparateProcess\", dataProviderClass = FetchOptionsDataProvider.class)\n public void testConcurrentCollectBuildChanges(boolean fetchInSeparateProcess) throws Exception {\n System.setProperty(\"teamcity.git.fetch.separate.process\", String.valueOf(fetchInSeparateProcess));\n \n final GitVcsSupport support = getSupport();\n final List<Exception> errors = Collections.synchronizedList(new ArrayList<Exception>());\n \n Runnable r1 = new Runnable() {\n public void run() {\n try {\n // ensure that all revisions reachable from master are fetched\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> ms = support.collectChanges(root, VERSION_TEST_HEAD, CUD1_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, ms.size());\n ModificationData m2 = ms.get(1);\n assertEquals(\"The second commit\\n\", m2.getDescription());\n assertEquals(3, m2.getChanges().size());\n for (VcsChange ch : m2.getChanges()) {\n assertEquals(VcsChange.Type.ADDED, ch.getType());\n assertEquals(\"dir/\", ch.getFileName().substring(0, 4));\n }\n ModificationData m1 = ms.get(0);\n assertEquals(\"more changes\\n\", m1.getDescription());\n assertEquals(CUD1_VERSION, m1.getVersion());\n assertEquals(3, m1.getChanges().size());\n VcsChange ch10 = m1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch10.getFileName());\n assertEquals(CUD1_VERSION, ch10.getAfterChangeRevisionNumber());\n assertEquals(m2.getVersion(), ch10.getBeforeChangeRevisionNumber());\n assertEquals(VcsChange.Type.CHANGED, ch10.getType());\n VcsChange ch11 = m1.getChanges().get(1);\n assertEquals(\"dir/c.txt\", ch11.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch11.getType());\n VcsChange ch12 = m1.getChanges().get(2);\n assertEquals(\"dir/tr.txt\", ch12.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch12.getType());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r2 = new Runnable() {\n public void run() {\n try {\n // now check merge commit relatively to the branch\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms0 = support.collectChanges(root, MERGE_BRANCH_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(2, mms0.size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r3 = new Runnable() {\n public void run() {\n try {\n // no check the merge commit relatively to the fork\n final VcsRoot root = getRoot(\"master\");\n final List<ModificationData> mms1 = support.collectChanges(root, CUD1_VERSION, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(3, mms1.size());\n ModificationData md1 = mms1.get(0);\n assertFalse(md1.isCanBeIgnored());\n assertEquals(\"merge commit\\n\", md1.getDescription());\n assertEquals(MERGE_VERSION, md1.getVersion());\n assertEquals(3, md1.getChanges().size());\n VcsChange ch20 = md1.getChanges().get(0);\n assertEquals(\"dir/a.txt\", ch20.getFileName());\n assertEquals(VcsChange.Type.REMOVED, ch20.getType());\n VcsChange ch21 = md1.getChanges().get(1);\n assertEquals(\"dir/b.txt\", ch21.getFileName());\n assertEquals(VcsChange.Type.CHANGED, ch21.getType());\n VcsChange ch22 = md1.getChanges().get(2);\n assertEquals(\"dir/q.txt\", ch22.getFileName());\n assertEquals(VcsChange.Type.ADDED, ch22.getType());\n ModificationData md2 = mms1.get(1);\n assertTrue(md2.isCanBeIgnored());\n assertEquals(\"b-mod, d-add\\n\", md2.getDescription());\n assertEquals(MERGE_BRANCH_VERSION, md2.getVersion());\n assertEquals(2, md2.getChanges().size());\n ModificationData md3 = mms1.get(2);\n assertEquals(\"a-mod, c-rm\\n\", md3.getDescription());\n assertEquals(2, md3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n Runnable r4 = new Runnable() {\n public void run() {\n try {\n // check the case with broken commit\n final VcsRoot root = getRoot(\"master\");\n String missing = GitUtils.makeVersion(GitUtils.versionRevision(CUD1_VERSION).replace('0', 'f'), GitUtils.versionTime(CUD1_VERSION));\n final List<ModificationData> mms2 = support.collectChanges(root, missing, MERGE_VERSION, new CheckoutRules(\"\"));\n assertEquals(4, mms2.size());\n ModificationData mb3 = mms2.get(3);\n assertEquals(GitServerUtil.SYSTEM_USER, mb3.getUserName());\n assertEquals(0, mb3.getChanges().size());\n } catch (Exception e) {\n errors.add(e);\n }\n }\n };\n \n for (int i = 0; i < 50; i++) {\n BaseTestCase.runAsync(4, r1, r2, r3, r4);\n }\n \n if (!errors.isEmpty()) {\n throw errors.get(0);\n }\n }",
"void unsetBranchOfficeList();",
"public void changeCurrProject(ProjectModel p) {\n \tprojects.remove(p);\n \tprojects.add(0, p);\n }",
"protected File executeCheckout(String filePath) {\n if (dest == null) {\n dest = new File(System.getProperty(\"user.home\") + File.separator +\n \".savant_cvs_repository\");\n }\n\n Cvs cvs = (Cvs) getProject().createTask(\"cvs\");\n cvs.setPackage(pack);\n cvs.setCvsRoot(cvsroot);\n cvs.setCvsRsh(cvsrsh);\n cvs.setCompression(compression);\n cvs.setCompressionLevel(compressionlevel);\n cvs.setDest(dest);\n cvs.setTag(tag);\n cvs.setDate(date);\n cvs.setPort(port);\n cvs.setPassfile(passfile);\n cvs.setReallyquiet(true);\n\n // Check out the module from CVS\n String module = pack + File.separator + filePath;\n cvs.setPackage(module);\n cvs.perform();\n\n String file = pack + File.separator + filePath;\n return new File(dest, file);\n }",
"public static void ConvertToBuilt()\r\n\t{\r\n\t\t Browser.instance.findElement(exitButton).click();\r\n\t\tBuildBagsPage.goTo();\r\n\t\tBuildBagsPage.EmptyToBuilt();\r\n\t\t\r\n\t\t\r\n\t}",
"void createBranchAtCommit(TCommit commit, String branchName, TRepo repo);",
"Response checkin(String repoName, String repoPath, String lockTokenHeader, String ifHeader);",
"public void buildSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tnavigationController.clickProgress();\n\t\t\tprojectService.build(selectedItems, false);\n\t\t}\n\t}",
"String branch();",
"public abstract void execute(GitTool opts) throws Exception;",
"@Override\n public Mono<GitPullDTO> mergeBranch(String defaultApplicationId, String sourceBranch, String destinationBranch) {\n\n return getApplicationById(defaultApplicationId)\n .flatMap(application -> {\n GitApplicationMetadata gitApplicationMetadata = application.getGitApplicationMetadata();\n if (isInvalidDefaultApplicationGitMetadata(application.getGitApplicationMetadata())) {\n return Mono.error(new AppsmithException(AppsmithError.INVALID_GIT_SSH_CONFIGURATION));\n }\n Path repoPath = Paths.get(application.getOrganizationId(),\n gitApplicationMetadata.getDefaultApplicationId(),\n gitApplicationMetadata.getRepoName());\n\n //1. Hydrate from db to file system for both branch Applications\n Mono<Path> pathToFile = getBranchApplicationFromDBAndSaveToLocalFileSystem(defaultApplicationId, sourceBranch, sourceBranch, repoPath)\n .flatMap(path -> getBranchApplicationFromDBAndSaveToLocalFileSystem(defaultApplicationId, sourceBranch, destinationBranch, repoPath));\n\n return Mono.zip(\n Mono.just(application),\n pathToFile\n ).onErrorResume(error -> Mono.error(new AppsmithException(AppsmithError.INTERNAL_SERVER_ERROR)));\n })\n .flatMap(tuple -> {\n Application application = tuple.getT1();\n Path repoPath = tuple.getT2();\n\n //2. git checkout destinationBranch ---> git merge sourceBranch\n return Mono.zip(gitExecutor.mergeBranch(repoPath, sourceBranch, destinationBranch), Mono.just(application))\n // On merge conflict create a new branch and push the branch to remote. Let the user resolve it the git client like github/gitlab handleMergeConflict\n .onErrorResume(error -> {\n if(error.getMessage().contains(\"Merge conflict\")) {\n MultiValueMap<String, String> valueMap = new LinkedMultiValueMap<>();\n valueMap.add(FieldName.BRANCH_NAME, destinationBranch);\n return handleMergeConflict(defaultApplicationId, valueMap)\n .flatMap(status -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"merge\",error.getMessage() )));\n }\n return Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"Merge\", error.getMessage()));\n });\n })\n .flatMap(mergeStatusTuple -> {\n Application application = mergeStatusTuple.getT2();\n String mergeStatus = mergeStatusTuple.getT1();\n\n //3. rehydrate from file system to db\n try {\n Mono<ApplicationJson> applicationJson = fileUtils.reconstructApplicationFromGitRepo(\n application.getOrganizationId(),\n application.getGitApplicationMetadata().getDefaultApplicationId(),\n application.getGitApplicationMetadata().getRepoName(),\n destinationBranch);\n return Mono.zip(Mono.just(mergeStatus), Mono.just(application), applicationJson);\n } catch (IOException | GitAPIException e) {\n return Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"merge\", e.getMessage()));\n }\n })\n .flatMap(tuple -> {\n Application application = tuple.getT2();\n ApplicationJson applicationJson = tuple.getT3();\n String status = tuple.getT1();\n\n //4. Get the latest application mono with all the changes\n return importExportApplicationService\n .importApplicationInOrganization(application.getOrganizationId(), applicationJson, application.getId())\n .map(application1 -> setStatusAndApplication(application1, status));\n });\n }",
"public Checkout() {\n this(DSL.name(\"CHECKOUT\"), null);\n }",
"@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}",
"public void plan(String studyRepositoryURL, File exportedWorkspace, int finalConfiguration, String workspaceStudy) throws Exception {\n String url_oceano = \"http://localhost:8092/oceano/JSONServlet\";\n// String url_oceano = \"http://10.0.0.102:8092/oceano/JSONServlet\";\n// String url_oceano = \"https://gems.ic.uff.br/oceano/JSONServlet\";\n\n\n // List the repository\n list(studyRepositoryURL);\n // Create study workspace\n\n File studyWorkspace = createWorkSpace(workspaceStudy);\n // Check-out the configuration\n CheckoutCiclo checkoutCiclo = new CheckoutCiclo();\n\n CheckOut remoto = checkoutCiclo.remoto(studyRepositoryURL, \"marapa\", \"marapao\", studyWorkspace.getPath(), url_oceano);\n System.out.println(\"svn co \" + studyRepositoryURL + \" \" + studyWorkspace.getPath());\n\n\n\n if (!workspaceStudy.endsWith(\"/\")) {\n workspaceStudy += \"/\";\n }\n\n workspaceStudy += remoto.getAutobranch();\n studyWorkspace = new File(workspaceStudy);\n\n merge(exportedWorkspace, studyWorkspace);\n\n checkin(workspaceStudy);\n\n if (remoto.getAutobranch() % 20 == 0) {\n\n System.out.println(\"----------------Esperando 2 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n\n\n\n File f = new File(\"/home/marapao/experiementos/scripts/reiniciaglassfish\");\n Runtime r = Runtime.getRuntime();\n Process exec = null;\n\n System.out.println(\"---------------------Reiniciando GlassFish---------------------------------------\");\n if (f.canExecute()) {\n exec = r.exec(f.getAbsolutePath());\n }\n\n exec.waitFor();\n\n System.out.println(\"----------------Esperando 1 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n //reiniciar o glassfish\n ///home/marapao/glassfish/bin/asadmin stop-domain\n ///home/marapao/glassfish/bin/asadmin start-domain\n\n\n }\n\n }",
"void reset(boolean hard) throws GitException, InterruptedException;",
"public void clickCheckout()\n\t{\n\t\twaitForVisibility(checkout);\n\t\tcheckout.click();\n\t}",
"public void checkout(long chatId) {\n }",
"public void gitThis(){\n\t}",
"public void createProject(Project newProject);",
"public InternalBranch(String name, InternalL1 target) {\n this(InternalRefId.ofBranch(name).getId(), name, target.getMap(), Id.EMPTY,\n ImmutableList.of(new Commit(target.getId(), target.getMetadataId(), target.getParentId())), DT.now());\n }",
"void fetch() throws GitException, InterruptedException;",
"public check_out() {\n initComponents();\n }"
] | [
"0.61696863",
"0.6133506",
"0.6042762",
"0.6003959",
"0.5731692",
"0.5674813",
"0.56544274",
"0.5631035",
"0.5627025",
"0.5623421",
"0.56211287",
"0.5597924",
"0.55873346",
"0.5579308",
"0.5481574",
"0.54595006",
"0.54590696",
"0.5406293",
"0.5399936",
"0.5322111",
"0.5315089",
"0.5294109",
"0.5289305",
"0.52853733",
"0.5283494",
"0.52643013",
"0.52517384",
"0.5242022",
"0.51889056",
"0.51702195",
"0.51642984",
"0.5150602",
"0.51455456",
"0.5138606",
"0.512835",
"0.51091",
"0.5091019",
"0.5073408",
"0.50717324",
"0.5035564",
"0.5024692",
"0.50236464",
"0.4975469",
"0.49709952",
"0.49600875",
"0.49574932",
"0.49355972",
"0.4909136",
"0.49087855",
"0.48829415",
"0.48435748",
"0.4839569",
"0.48338273",
"0.48199055",
"0.48162988",
"0.4811825",
"0.48098",
"0.48063487",
"0.47997904",
"0.47996974",
"0.47793695",
"0.47630164",
"0.47540867",
"0.47512627",
"0.47327802",
"0.47178358",
"0.47001556",
"0.46997938",
"0.46914694",
"0.4687699",
"0.46846864",
"0.46558794",
"0.46325073",
"0.46270475",
"0.46259356",
"0.4616535",
"0.46120453",
"0.4602627",
"0.45680302",
"0.45621413",
"0.45608786",
"0.45393854",
"0.45349425",
"0.45272028",
"0.45155445",
"0.45106453",
"0.45105413",
"0.4506926",
"0.44982433",
"0.44834813",
"0.4481201",
"0.44804636",
"0.44756874",
"0.4474043",
"0.44647723",
"0.44634908",
"0.445868",
"0.4452491",
"0.44501802",
"0.4445588"
] | 0.73027897 | 0 |
Gets projects that have uncommited changes | List<Project> getProjectsWithChanges(List<Project> projects); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Project> getWithNonResolvedMessages();",
"public List<Project> getAllProjects();",
"private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }",
"@GetMapping(value = \"/getProjectDetails/ongoing\")\n\tpublic List<Project> getOngoingProjects()\n\t{\n\t\treturn integrationClient.getOngoingProjects();\n\t}",
"public boolean[] hasConflictsAndChanges(Project project);",
"public List<Project> getAllProject(boolean isDeleted) throws EmployeeManagementException;",
"public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"List<ChangedFile> getChangedFiles(Project project);",
"List<Project> getWithNonResolvedMessages(User user);",
"public static boolean keepProjectsInSync() {\r\n\t\treturn ProjectUIPlugin.keepProjectsInSync();\r\n\t}",
"public ProjectsList getProjects() {\n return projects.clone();\n }",
"public List<ProjectEntity> getProjectByName() {\n\t\treturn null;\n\t}",
"List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"@Test\n public void getProjectsWhenNoProjectInserted() throws InterruptedException {\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n //Then : the retrieved list is empty\n assertTrue(actualProjects.isEmpty());\n }",
"public ArrayList<Project> getProjects(){\n return this.projects;\n }",
"public List<String> getProjects() {\r\n\t\treturn projects;\r\n\t}",
"boolean hasProject();",
"public IProject [] getProjects(){\n\t\treturn projects;\n\t}",
"public List<Issue> getUserProjectActiveIssue(User user, Project project);",
"public abstract List<ProjectBean> getProjectList();",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"public static String GetPreviousProjects() {\n\t\tString previousProjects = \"\";\n\t\tif (applicationSettingsFile != null) {\n\t\t\t// Get all \"files\"\n\t\t\tNodeList lastProject = applicationSettingsFile.getDocumentElement().getElementsByTagName(\"previousProjects\");\n\t\t\t// Handle result\n\t\t\tif (lastProject.getLength() > 0) {\n\t\t\t\tpreviousProjects = Utilities.getXmlNodeAttribute(lastProject.item(0), \"value\");\n\t\t\t}\n\t\t}\n\t\treturn previousProjects;\n\t}",
"public static List<Project> getProjects() throws Exception {\n Multimap<String, File> mapOfAllFiles = null;\n mapOfAllFiles = createMapOfFiles(getProjectsPath());\n mapOfAllFiles = removeEntriesWithoutProjectFile(mapOfAllFiles);\n return convertMapToProjects(mapOfAllFiles);\n }",
"List<Project> selectAll();",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"public List<Commit> getAllCommits(Project project, String branchName);",
"public Object getProjectResources(Integer projectId) {\n\t\treturn null;\n\t}",
"public static List<Project> getGISProjects() {\r\n return Collections.unmodifiableList(ProjectPlugin.getPlugin().getProjectRegistry()\r\n .getProjects());\r\n }",
"public Collection<TopComponent> getUnchangedDocumentsForNB81() {\n\t\tfinal WindowManager wm = WindowManager.getDefault();\n\t\tfinal LinkedHashSet<TopComponent> result = new LinkedHashSet<TopComponent>();\n\t\tfor (TopComponent tc : getCurrentEditors()) {\n\t\t\tif (!wm.isEditorTopComponent(tc)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//check for the format of an unsaved file\n\t\t\tboolean isUnsaved = null != tc.getLookup().lookup(SaveCookie.class);\n\t\t\tif (isUnsaved) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tDataObject dob = tc.getLookup().lookup(DataObject.class);\n\t\t\tif (dob != null) {\n\t\t\t\tfinal FileObject file = dob.getPrimaryFile();\n\t\t\t\tObject attribute = file.getAttribute(\"ProvidedExtensions.VCSIsModified\");\n\t\t\t\tif (null != attribute) {\n\t\t\t\t\tif (Boolean.FALSE.equals(attribute)) {\n\t\t\t\t\t\tresult.add(tc);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//could not determine status, keep this document\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//close diff windows too\n\t\t\t\tresult.add(tc);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public List<TeamProjectReference> getProjects(\r\n final ProjectState stateFilter, \r\n final Integer top, \r\n final Integer skip) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final NameValueCollection queryParameters = new NameValueCollection();\r\n queryParameters.addIfNotNull(\"stateFilter\", stateFilter); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$top\", top); //$NON-NLS-1$\r\n queryParameters.addIfNotNull(\"$skip\", skip); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.GET,\r\n locationId,\r\n apiVersion,\r\n queryParameters,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, new TypeReference<List<TeamProjectReference>>() {});\r\n }",
"@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }",
"public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"@Override\r\n\tpublic List<SprintTo> getSprintWithNoChildrenForProject(String projectId) {\n\t\treturn sprintDao.getSprintWithNoChildrenForProject(projectId);\r\n\t}",
"TrackerProjects getTrackerProjects(final Integer id);",
"public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }",
"Integer getProjectCount( String key ){\n return developer.projects.size();\n }",
"public Project[] getProjectArray()\n throws RedmineException\n {\n getProjects(false);\n return projectMap.values().toArray(new Redmine.Project[projectMap.size()]);\n }",
"public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }",
"void getAllProjectList(int id);",
"public List<Build> getBuildsForProject(int projectId);",
"public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}",
"@Override\n public List<ReviewBaseline> getNonGreenProjectsForQuarter(String months, String years) {\n\n return reviewBaselineRepository.getNonGreenProjectsForQuarter(months, years);\n }",
"@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}",
"@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}",
"public List<String> getTestLinkProjects() {\r\n\t\tlogger.info(\"Getting TestLink projects...\");\r\n\t\tList<TestLinkMetricMeasurement> measurements = getAllTestLinkMetricObjects();\r\n\t\tList<String> projects = new ArrayList<>();\r\n\t\tfor (TestLinkMetricMeasurement testLinkMetricMeasurement : measurements) {\r\n\t\t\tString project = testLinkMetricMeasurement.getName();\r\n\t\t\tif (!projects.contains(project)) {\r\n\t\t\t\tprojects.add(project);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn projects;\r\n\t}",
"public int getProjectCount(){\n\t\treturn projectRepository.getProjectCount();\n\t}",
"@RequestMapping(value=\"/findUsersWithoutProject\", method=RequestMethod.GET)\r\n\t@ResponseBody\r\n\tpublic List<UserDto> findUsersWithoutProject()\r\n\t{\r\n\t\treturn service.findUsersWithoutProject();\r\n\t}",
"public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}",
"private boolean containsOnlyNonProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // check for empty selection\r\n if (types == 0) {\r\n return false;\r\n }\r\n // note that the selection may contain multiple types of resource\r\n return (types & IResource.PROJECT) == 0;\r\n }",
"List<Project> findProjectsOfAccount(String username);",
"@Query(\"FROM Project p\")\n\tList<Project> findPopProject();",
"public Collection<BaseDocument> getUnsavedDocuments() {\n\t\tVector<BaseDocument> ret = new Vector<BaseDocument>();\n\t\tif (theStructures.hasChanged())\n\t\t\tret.add(theStructures);\n\t\treturn ret;\n\t}",
"Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);",
"void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }",
"@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public List<org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource> getProjects() throws RegistryException {\n return getProjects(-1, -1, null, null);\n }",
"public List<Project> findByStates(States states){\n\t\tif(states != null){\n\t\t\treturn projectRepository.findByStates(states);\n\t\t}\n\t\treturn null;\n\t}",
"@Test\n public void getMissingProjectTest() throws Exception {// Covered user cases 6.1\n httpclient = HttpClients.createDefault();\n\n deleteUsers();\n \n String userId = createTestUser();\n\n //deleteProjects(userId);//all projects have already been deleted by server since deleteUsers();\n\n try {\n CloseableHttpResponse response = createProject(\"testProjectName1\", userId);\n // EntityUtils.consume(response.getEntity());\n String id1 = getIdFromResponse(response);\n response.close();\n\n response = createProject(\"testProjectName2\", userId);\n // EntityUtils.consume(response.getEntity());\n String id2 = getIdFromResponse(response);\n response.close();\n\n String missingId = \"1234\" + id1 + id2; // making sure the ID is not present\n\n response = getProject(userId, missingId);\n\n int status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(404, status);\n\n EntityUtils.consume(response.getEntity());\n response.close();\n } finally {\n httpclient.close();\n }\n }",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"private void loadProjects() {\n observableProjects.clear();\n dateFind.setValue(null);\n observableProjects.addAll(getProject());\n table.setItems(observableProjects);\n\n ControllersDataFactory.getLink().delete(CalendarController.class);\n }",
"public boolean getProjectExternallyEdited()\r\n {\r\n return (m_projectExternallyEdited);\r\n }",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }",
"public List<ProjectType> invokeQueryProjects() throws TsResponseException {\n checkSignedIn();\n\n final List<ProjectType> projects = new ArrayList<>();\n\n int currentPage = 1; // Tableau starts counting at 1\n BigInteger totalReturned = BigInteger.ZERO;\n BigInteger totalAvailable;\n\n // Loop over pages\n do {\n // Query the projects page\n final String url = getUriBuilder().path(QUERY_PROJECTS) //\n .queryParam(\"pageNumber\", currentPage) //\n .queryParam(\"pageSize\", PROJECTS_PAGE_SIZE) //\n .build(m_siteId).toString();\n final TsResponse response = get(url);\n\n // Get the projects from the response\n projects.addAll(response.getProjects().getProject());\n\n // Next page\n currentPage++;\n // NOTE: total available is the number of datasources available\n totalAvailable = response.getPagination().getTotalAvailable();\n totalReturned = totalReturned.add(response.getPagination().getPageSize());\n } while (totalReturned.compareTo(totalAvailable) < 0);\n\n return projects;\n }",
"public static IProject[] getAllRubyProjects() {\r\n \t\tArrayList<IProject> rubyProjects = new ArrayList<IProject>();\r\n \t\tIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\r\n \t\t\r\n \t\tfor (Project aweProject : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tfor (RubyProject rubyProject : aweProject.getElements(RubyProject.class)) {\r\n \t\t\t\tIProject resourceProject = root.getProject(rubyProject.getName());\r\n \t\t\t\ttry {\t\t\t\t\t\r\n \t\t\t\t\tresourceProject.setPersistentProperty(AWE_PROJECT_NAME, aweProject.getName());\r\n \t\t\t\t}\r\n \t\t\t\tcatch (CoreException e) {\r\n \t\t\t\t\tProjectPlugin.log(null, e);\r\n \t\t\t\t}\r\n \t\t\t\tfinally {\t\t\t\r\n \t\t\t\t\trubyProjects.add(resourceProject);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\treturn rubyProjects.toArray(new IProject[]{});\r\n \t}",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"@Override\n\tpublic List<ProjectTeamBean> listProjectTeam() {\n\t\treturn null;\n\t}",
"private void setupProjectIncompleteDripFlow() {\n List<DProjects> projects = AppConfig.getInstance().getdProjectsDAO().findAllInternal();\n if (projects == null || projects.isEmpty()) return;\n\n // 5 days old project created\n Date recentEnoughProjectAccessed = new Date(lastRunDate.getTime() - 5*ONE_DAY_MILISEC);\n\n //3 days old login.\n Date recentEnoughLoginTime = new Date(lastRunDate.getTime() - 3*ONE_DAY_MILISEC);\n\n // one notification per user is enough.\n Map<DUsers, DProjects> userProjectMap = new HashMap<>();\n // find projects which are not complete.\n for (DProjects project : projects) {\n\n // ignore old projects (accessed older than 5 days), they may be already in the flow.\n if (lastAccessTime(project).before(recentEnoughProjectAccessed)) {\n continue;\n }\n\n ProjectDetails details = Controlcenter.getProjectSummary(project);\n long totalDone = details.getTotalHitsDone() + details.getTotalHitsSkipped();\n // if > 70% done, then ignore.\n if (details.getTotalHits() == 0 || (totalDone/(double)details.getTotalHits()) < .70) {\n // Find all the project users.\n List<DProjectUsers> projectUsers = AppConfig.getInstance().getdProjectUsersDAO().findAllByProjectIdInternal(project.getId());\n if (projectUsers == null || projectUsers.isEmpty()) break;\n\n for (DProjectUsers projectUser : projectUsers) {\n //not sending to contributors as we add everyone to default projects,\n // would be sad to send them mail asking them to finish Default projects.\n if (projectUser.getRole() == DTypes.Project_User_Role.OWNER) {\n DUsers user = AppConfig.getInstance().getdUsersDAO().findByIdInternal(projectUser.getUserId());\n //if the user has not logged in anytime soon.\n if (user != null && user.getUpdated_timestamp().before(recentEnoughLoginTime)) {\n userProjectMap.put(user, project);\n }\n }\n }\n }\n }\n LOG.info(\"setupProjectIncompleteDripFlow userProjectMap = \" + userProjectMap.size());\n DripFlows.addToProjectIncompleteFlow(userProjectMap);\n\n }",
"@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}",
"public ArrayList<Project> getFollowedProjects() { return this.followedProjects; }",
"public Collection<Task> getTasksProject(String projectName) {\n\t\tCollection<Task> tasks = new ArrayList<Task>();\n\t\tfor(Task item : m_Tasks){\n\t\t\tif(item.project.equals(projectName)) tasks.add(item);\n\t\t}\n\t\tif(tasks.size() == 0) return null;\n\t\treturn tasks;\n\t}",
"public void checkUntracked(Commit givenCommit) {\n for (String fileName: givenCommit.getFile().keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n String contentInCWD = Utils.readContentsAsString(fileInCWD);\n Blob curBlob = getHeadCommit().getFile().get(fileName);\n if (curBlob == null) {\n if (!contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is an \"\n + \"untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n } else if (curBlob != null) {\n String contentInCurr = curBlob.getContent();\n if (!contentInCurr.equals(contentInCWD)\n && !contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is \"\n + \"an untracked file in the way; \"\n + \"delete it, or add and commit it first.\");\n System.exit(0);\n }\n }\n }\n }\n }",
"@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}",
"private List<S3ObjectSummary> findObsoleteProgspecFiles() {\n // Get the current local program specification state.\n Properties localProgspec = getProgSpecETags();\n\n // Compare the actual state to the state cached lcoally.\n Map<String, S3ObjectSummary> currentProgspec = Authenticator.getInstance().getProjectsHelper().getProgSpecInfo(getProgramId());\n List<S3ObjectSummary> result = new ArrayList<>();\n for (Map.Entry<String, S3ObjectSummary> e : currentProgspec.entrySet()) {\n // If we don't have the file locally, or if the eTag doesn't match, add to the result list.\n String localTag = localProgspec.containsKey(e.getKey()) ? localProgspec.get(e.getKey()).toString() : \"\";\n if (!e.getValue().getETag().equalsIgnoreCase(localTag))\n result.add(e.getValue());\n }\n return result;\n }",
"@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"@Override\n\tpublic List<NetBarDeployEntity> getUnDeployInfos() {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\" FROM \"+TableConstants.NETBAR_DEPLOY_TABLE+\" d WHERE d.is_deploy= :isDeploy \");\n\t\tparameters.put(\"isDeploy\", \"1\");\n\t\t\n\t\tList<Object> list = findNativeQuery(sql.toString(), parameters);\n\t\tfor (Object object : list) {\n\t\t\tif(object instanceof Object[]){\n\t\t\t\tObject[] obj = (Object[]) object;\n\t\t\t\tNetBarDeployEntity entity=this.obj2Entity(obj);\n\t\t\t\tdata.add(entity);\n\t\t\t}\n\t\t}\n\t\tif(data == null || data.size() <= 0){\n\t\t\treturn null;\n\t\t}\n\t\treturn data;\n\t}",
"public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);",
"public GitFile[] getFiles() { return null; }",
"private void loadProjects() {\n\t\tprojectsList.clear();\n\t\t\n\t\tArrayList<Job> projects = jdbc.getProjects();\n\t\tfor (Job j : projects) {\n\t\t\tprojectsList.addElement(j.jobname);\n\t\t}\n\t}",
"public static IProject[] getAWEProjects() {\r\n \t\tArrayList<IProject> aweProjects = new ArrayList<IProject>();\r\n \t\tIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\r\n \t\t\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tIProject aweProject = root.getProject(project.getName());\r\n \t\t\taweProjects.add(aweProject);\r\n \t\t}\r\n \t\t\r\n \t\treturn aweProjects.toArray(new IProject[]{});\r\n \t}",
"@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public void clearProject()\n\t{\n\t\tstoreViewState();\n\t\tproject.clearProject();\n\t\tcheckStatus();\n\t}",
"@Test\n\tpublic void getProjects() {\n\t\tList<Project> projects = new ArrayList<Project>();\n\t\tprojects.add(project);\n\t\twhen(repository.findAll()).thenReturn(projects);\n\t\tassertEquals(controller.getAllProjects(), projects);\n\t}",
"@Override\r\n\tpublic List<Project> selectProjectList(String id,int cPage,int numPerpage) {\n\t\treturn dao.selectProjectList(session,id,cPage,numPerpage);\r\n\t}",
"public Set<Task> getUnfinishedTasks(){\r\n return unfinished;\r\n }",
"@Override\n\tpublic Project getProjectById(int id) {\n\t\treturn null;\n\t}",
"private void filterInvalidJobs(List<Job> jobs)\n {\n try\n {\n ArrayList<Project> projectList = (ArrayList<Project>) ServerProxy.getProjectHandler()\n .getProjectsByUser(m_userId);\n\n Set<Long> projectIds = new HashSet<Long>();\n if (projectList != null && projectList.size() > 0)\n {\n for (Project pro : projectList)\n {\n projectIds.add(pro.getIdAsLong());\n }\n }\n\n for (Iterator<Job> it = jobs.iterator(); it.hasNext();)\n {\n if (!projectIds.contains(it.next().getProjectId()))\n {\n it.remove();\n }\n }\n }\n catch (Exception e)\n {\n logger.error(e);\n }\n }",
"@Test\n\tpublic void testNoopProject() {\n\t\tTag a = new Tag(A);\n\t\ttagService.create(a);\n\t\tTag b = tagService.create(new Tag(B));\n\t\tTag c = tagService.create(new Tag(C));\n\t\tIterable<Tag> values = tagService.find().matching(\n\t\t\t\tnew QueryBuilder<TagInformer>() {\n\n\t\t\t\t\tpublic QueryExpression createMatchingExpression(\n\t\t\t\t\t\t\tTagInformer object) {\n\t\t\t\t\t\treturn object.getText().differentFrom(null);\n\t\t\t\t\t}\n\t\t\t\t}).projectOn(new NoopProjectionBuilder<Tag, TagInformer>()).getAll();\n\t\tassertThat(values, IsCollectionContaining.hasItems(a, b, c));\n\t}",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public MavenProject removeForkedProject()\n {\n if ( !forkedProjectStack.isEmpty() )\n {\n MavenProject lastCurrent = currentProject;\n currentProject = (MavenProject) forkedProjectStack.pop();\n\n return lastCurrent;\n }\n\n return null;\n }",
"public Vector<ESItem> getUnsavedChanges() {\n Vector<ESItem> vars = new Vector<ESItem>();\n Enumeration en = root.depthFirstEnumeration();\n while (en.hasMoreElements()) {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) en.nextElement();\n Object obj = node.getUserObject();\n if (obj instanceof ESItem) {\n ESItem var = (ESItem) obj;\n if (var.isChanged()) {\n vars.add(var);\n }\n }\n }\n return vars;\n }",
"private Vector getProjectChangedListeners() {\r\n return this.projectChangedListeners;\r\n }",
"public Subproject drawProject() {\n\t\tSubproject result=projectsAvailable.get(0);\n\t\tprojectsAvailable.remove(result);\n\t\tprojectsActive.add(result);\n\t\treturn result;\n\t}",
"List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean getProjectModified() {\n\t\treturn projectModified;\n\t}"
] | [
"0.6906061",
"0.6249415",
"0.6238292",
"0.6181875",
"0.6174198",
"0.6097148",
"0.60448676",
"0.6023002",
"0.5963352",
"0.5944882",
"0.5928541",
"0.5836748",
"0.57538754",
"0.57311517",
"0.5730377",
"0.572611",
"0.5690791",
"0.56416094",
"0.56263727",
"0.5607872",
"0.56000787",
"0.5594449",
"0.55741644",
"0.5554562",
"0.55458444",
"0.54873186",
"0.54692507",
"0.53960264",
"0.5349326",
"0.534535",
"0.53427035",
"0.5340779",
"0.53224725",
"0.53184277",
"0.5317761",
"0.5289484",
"0.52794695",
"0.52791095",
"0.5267331",
"0.5266252",
"0.52658886",
"0.52546567",
"0.5253633",
"0.5247547",
"0.5229539",
"0.5207165",
"0.5196364",
"0.5183143",
"0.51770365",
"0.5175563",
"0.5175144",
"0.5173799",
"0.51700765",
"0.51690304",
"0.51671356",
"0.51559037",
"0.51473874",
"0.5145386",
"0.5142021",
"0.5136323",
"0.5134138",
"0.5128565",
"0.5121",
"0.512098",
"0.5109529",
"0.5100004",
"0.50962466",
"0.5077906",
"0.5069534",
"0.5066024",
"0.5048187",
"0.5046439",
"0.50444466",
"0.5034634",
"0.50283056",
"0.50254613",
"0.5016868",
"0.50083405",
"0.49884015",
"0.49830595",
"0.4982347",
"0.4980856",
"0.49784398",
"0.49765843",
"0.49668187",
"0.49660897",
"0.4960628",
"0.4959908",
"0.49253452",
"0.49206477",
"0.49102867",
"0.49087477",
"0.49050838",
"0.4903274",
"0.49006358",
"0.48992625",
"0.48981243",
"0.48975363",
"0.48917684",
"0.48893178"
] | 0.6777613 | 1 |
Commit changes to selectedProjects | Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,
ProgressListener progressListener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void commit(String workspace);",
"public void testCommit() throws Exception {\n IProject project = createProject(\"testCommit\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n // Perform some operations on the copy and commit only the top level\n addResources(project, new String[] { \"added.txt\", \"folder2/\", \"folder2/added.txt\" }, false);\n setContentsAndEnsureModified(project.getFile(\"changed.txt\"));\n deleteResources(new IResource[] {project.getFile(\"deleted.txt\")});\n setContentsAndEnsureModified(project.getFile(\"folder1/a.txt\"));\n setContentsAndEnsureModified(project.getFile(\"folder1/subfolder1/c.txt\"));\n \n // Commit the project shallow\n commit(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), \"A commit message\");\n \n // Commit a subfolder shallow\n commit(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), \"A commit message\");\n \n // Now commit the file specifically\n commit(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), \"A commit message\");\n \n // Now commit the rest\n commit(asResourceMapping(new IResource[] { project.getFolder(\"folder2\") }, IResource.DEPTH_INFINITE), \"A commit message\");\n \n // Check the project out under a different name\n IProject copy = checkoutCopy(project, \"-copy\");\n assertEquals(project, copy);\n }",
"void commit(IDevTree tree, Map options) throws IOException;",
"private void updateProjectList() {\n\t\tfinal MultipleSelectionModel<Project> selectionModel = selectionList.getSelectionModel();\n\t\tfinal Object[] selectedIndices = selectionModel.getSelectedIndices().toArray();\n\t\tselectionModel.clearSelection();\n\t\tfor (final Object i : selectedIndices) {\n\t\t\tselectionModel.select((int) i);\n\t\t}\n\t}",
"public void editProjectAction() throws IOException {\n\t\tfinal List<Project> projects = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (projects.size() == 1) {\n\t\t\tfinal Project project = projects.get(0);\n\t\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_AddProjectDialog.fxml\");\n\t\t\tdialog.initOwner(addProject.getScene().getWindow());\n\t\t\t((AddProjectDialogController) loader.getController()).getContentController().setProjectToEdit(project);\n\t\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\t\tif (result.isPresent()) {\n\t\t\t\tlogger.trace(\"dialog 'edit project' result: {}\", result::get);\n\t\t\t\tupdateProjectList();\n\t\t\t}\n\t\t}\n\t}",
"public void commitChanges()\n {\n }",
"public static void deleteAndRevert(IProject[] projects)\n throws CoreException {\n if (projects != null) {\n for (IProject project : projects) {\n if (project != null) {\n RevertAction revertAction = new RevertAction();\n revertAction.setAsync(false);\n revertAction.selectionChanged(null,\n new StructuredSelection(project));\n revertAction.runAction(false);\n\n if (project != null && project.exists()) {\n project.refreshLocal(IResource.DEPTH_INFINITE, null);\n project.accept(new IResourceVisitor() {\n\n public boolean visit(IResource resource)\n throws CoreException {\n ResourceAttributes attrs = resource\n .getResourceAttributes();\n if (attrs != null) {\n attrs.setReadOnly(false);\n try {\n resource.setResourceAttributes(attrs);\n } catch (CoreException e) {\n }\n }\n return true;\n }\n });\n project.delete(true, true, null);\n }\n }\n }\n }\n }",
"@Override\n public void onChanged(@Nullable final List<Project> projects) {\n adapter.setmProjects(projects);\n }",
"public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }",
"public void commit() {\n doCommit();\n }",
"private static void finalise_project() {\r\n\t\tDate deadline_date = null;\r\n\t\tint paid = 0;\r\n\t\tint charged = 0;\r\n\t\tString project_name = \"\";\r\n\t\tString email = \"\";\r\n\t\tString number = \"\";\r\n\t\tString full_name = \"\";\r\n\t\tString address = \"\";\r\n\t\tDate completion_date = null;\r\n\t\t\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\t// Allows for user input\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Select a project ID to modify it.\");\r\n\t\t\t\r\n\t\t\t// Prints out all project ids and names that are not complete:\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id INNER JOIN people ON projects.project_id = people.projects \"\r\n\t\t\t\t\t+ \"WHERE project_statuses.status <>'Complete';\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t// This creates a list of project ids to check that the user only selects an available one\r\n\t\t\tArrayList<Integer> project_id_list = new ArrayList<Integer>(); \r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"ID: \" + project_rset.getInt(\"project_id\") + \", Name:\" + project_rset.getString(\"project_name\"));\r\n\t\t\t\tproject_id_list.add(project_rset.getInt(\"project_id\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Allows user to select a project to finalize \r\n\t\t\tBoolean select_project = true;\r\n\t\t\tint project_id = 0;\r\n\t\t\twhile (select_project == true) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \");\r\n\t\t\t\tString project_id_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tproject_id = Integer.parseInt(project_id_str);\r\n\t\t\t\t\tfor (int i = 0; i < project_id_list.size(); i ++) {\r\n\t\t\t\t\t\tif (project_id == project_id_list.get(i)) { \r\n\t\t\t\t\t\t\tselect_project = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (select_project == true) {\r\n\t\t\t\t\t\tSystem.out.println(\"Please only select an available project id.\");\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 * @exception Throws exception if the users input for project number is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The project number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Gets values needed from the selected project\r\n\t\t\tResultSet project_select_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_select_rset.next()) {\r\n\t\t\t\tif (project_select_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tproject_id = project_select_rset.getInt(\"project_id\");\r\n\t\t\t\t\tproject_name = project_select_rset.getString(\"project_name\");\r\n\t\t\t\t\tdeadline_date = project_select_rset.getDate(\"deadline_date\");\r\n\t\t\t\t\tpaid = project_select_rset.getInt(\"paid\");\r\n\t\t\t\t\tcharged = project_select_rset.getInt(\"charged\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Gets values needed from related customer\r\n // This gets the created project's table id to use to update the people and project_statuses tables \r\n\t\t\tString strSelectCustomer = String.format(\"SELECT * FROM people WHERE projects = '%s'\", project_id);\r\n\t\t\tResultSet customer_rset = stmt.executeQuery(strSelectCustomer);\r\n\t\t\twhile (customer_rset.next()) {\r\n\t\t\t\tfull_name = customer_rset.getString(\"name\") + \" \" + customer_rset.getString(\"surname\");\r\n\t\t\t\taddress = customer_rset.getString(\"address\");\r\n\t\t\t\temail = customer_rset.getString(\"email_address\");\r\n\t\t\t\tnumber = customer_rset.getString(\"telephone_number\");\r\n\t\t\t}\r\n\r\n\t\t\t// This updates the completion date\r\n\t\t\tBoolean update_completion_date = true;\r\n\t\t\twhile (update_completion_date == true) {\r\n\t\t\t\tSystem.out.print(\"Date Complete (YYYY-MM-DD): \");\r\n\t\t\t\tString completion_date_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcompletion_date = Date.valueOf(completion_date_str);\r\n\t\t\t\t\tupdate_completion_date = false;\r\n\t\t\t\t}\r\n\t\t\t\t/**\r\n\t\t\t\t * @exception Throws exception if the users input for the completion date is in the wrong format\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The date must be in the format YYYY-MM-DD (eg. 2013-01-13). Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Updates the value\r\n\t\t\tPreparedStatement ps_finalise = conn.prepareStatement(\r\n\t\t\t\t\t\"UPDATE project_statuses SET completion_date = ?, status = ? WHERE project_id = ?;\");\r\n\t\t\tps_finalise.setDate(1, completion_date);\r\n\t\t\tps_finalise.setString(2, \"Complete\");\r\n\t\t\tps_finalise.setInt(3, project_id);\r\n\t\t\tps_finalise.executeUpdate();\r\n\t\t\tSystem.out.println(\"\\nUpdated completion date to \" + completion_date + \".\\n\");\r\n\t\t}\t\r\n\t\t/**\r\n\t\t * @exception If the project status table cannot be updated because of field constraints then an SQLException is thrown\r\n\t\t */\t\t\r\n\t\tcatch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t\t// Calculates the amount due and prints out an invoice\r\n\t\tint due = charged - paid;\r\n\t\tif (due > 0) {\r\n\t\t\tString content = \"\\t\\t\\t\\tInvoice\\n\" + \r\n\t\t\t\t\t\"\\nDate: \" + completion_date +\r\n\t\t\t\t\t\"\\n\\nName: \" + full_name +\r\n\t\t\t\t\t\"\\nContact Details: \" + email + \"\\n\" + number + \r\n\t\t\t\t\t\"\\nAddress: \" + address + \r\n\t\t\t\t\t\"\\n\\nAmount due for \" + project_name + \r\n\t\t\t\t\t\":\\nTotal Cost:\\t\\t\\t\\t\\t\\t\\tR \" + charged + \r\n\t\t\t\t\t\"\\nPaid: \\t\\t\\t\\t\\t\\t\\tR \" + paid +\r\n\t\t\t\t\t\"\\n\\n\\nDue: \\t\\t\\t\\t\\t\\t\\tR \" + due;\r\n\t\t\tCreateFile(project_name);\r\n\t\t\tWriteToFile(project_name, content);\r\n\t\t}\r\n\t}",
"public boolean updateProject(Project project);",
"public void commit() {\n\t\tcommitted = true;\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\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\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}",
"public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}",
"@Test(expected = RuntimeException.class)\r\n \tpublic void testCommit() throws ESException {\n \t\tlocalProject.commit();\r\n \t\tfail(\"Should not be able to commit an unshared Project!\");\r\n \t}",
"protected void commit(ResourceMapping mapper, String message) throws CoreException {\n SyncInfoTree set = getOutgoing(mapper.getProjects());\n commit(new ResourceMapping[] { mapper }, message);\n assertCommit(mapper, set);\n }",
"public void commitChanges(){\n\t\tskipRulesView.updateSkipRule();\n\t\tvalidationRulesView.updateValidationRule();\n\t\tdynamicListsView.updateDynamicLists();\n\t}",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"void commit() {\n }",
"private void setProjectsIntoComboBox() {\n cboClients.getSelectionModel().selectedItemProperty().addListener((options, oldVal, newVal) -> {\n if (newVal != null) {\n if (mainModel.getProjectList() != null) {\n try {\n mainModel.loadProjects(newVal);\n cboProjects.getItems().clear();\n cboProjects.getItems().addAll(mainModel.getProjectList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the projects.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }\n });\n }",
"@Override\n\tpublic void createProjects(Projects proj) {\n\t\tString sql = \"INSERT INTO projects VALUES (?,?,?,?,?,?,now(),now(),?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getProj_name(),\n\t\t\t\tproj.getProj_desc(),\n\t\t\t\tproj.getFile_id(),\n\t\t\t\tproj.getCus_id(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_currency()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id=\"+proj.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\tString file_name = \"\";\n\t\tif(proj.getFile_id() != 0){\n\t\t\tFileModel myFile = new FileModel();\n\t\t\tmyFile = getJdbcTemplate().queryForObject(\"select * from file where file_id=\"+proj.getFile_id(), new BeanPropertyRowMapper<FileModel>(FileModel.class));\n\t\t\tfile_name = myFile.getFile_name();\n\t\t}\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_id(),\n\t\t\t\t\"Projects\",\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created row on Projects name=\"+proj.getProj_name()+\", desc=\"+proj.getProj_desc()+\", file_name=\"+file_name\n\t\t\t\t+\", customer=\"+cus.getCus_code()+\", proj_currency=\"+proj.getProj_currency(),\n\t\t\t\tproj.getProj_name()\n\t\t});\n\t}",
"public void copyProjectsAction(){\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) {\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-copyProject() ERROR: \" + caught.toString());\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tif(!result.hasErrors()) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tdialogClose();\n\t\t\t\t\t\tBmoProject bmoProject = (BmoProject) result.getBmObject();\n\t\t\t\t\t\tUiProjectDetail uiProjectDetail = new UiProjectDetail(getUiParams(),\n\t\t\t\t\t\t\t\tbmoProject.getId());\n\t\t\t\t\t\tuiProjectDetail.show();\n\n\t\t\t\t\t\tgetUiParams().getUiTemplate().hideEastPanel();\n\t\t\t\t\t\tUiProject uiProject = new UiProject(getUiParams());\n\t\t\t\t\t\tuiProject.edit(bmoProject);\n\t\t\t\t\t\tshowSystemMessage(\"Copia Exitosa.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t\tshowSystemMessage(result.getBmErrorList().get(0).getMsg());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tif(copyProjectSuggestBox.getSelectedId() > 0) {\n\t\t\t\t\t\tbmoProject.setId(copyProjectSuggestBox.getSelectedId());\n\t\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().action(bmoProject.getPmClass(), bmoProject, BmoProject.ACCESS_COPYPROJECT, \"\" + customerSuggestBox.getSelectedId(), callback);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \" ERROR: \" + \"Debe seleccionar Projecto\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\t\t\t\t\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-action() ERROR: \" + e.toString());\n\t\t\t}\n\t\t}",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tif(validateForm()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tProject prj = compileProject();\n\t\t\t\t\t\tportfolio.add(prj,config.isUpdateDB());\n\t\t\t\t\t\tif(prj instanceof OngoingProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) opTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\topTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t} else if (prj instanceof FinishedProject) {\n\t\t\t\t\t\t\tProjectTableModel tm = (ProjectTableModel) fpTable.getModel();\n\t\t\t\t\t\t\ttm.addRow(prj.toTable());\n\t\t\t\t\t\t\tfpTable.setModel(tm);\n\t\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\t\ttoggleSaved(false);\n\t\t\t\t\t\t\tsel.add(pCode.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnpd.dispose();\n\t\t\t\t\t}\n\t\t\t\t}",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"@Override\n public Set<Project> applyChanges( final List<Project> projects )\n throws ManipulationException\n {\n final GroovyState state = session.getState( GroovyState.class );\n if ( !session.isEnabled() || !state.isEnabled() )\n {\n logger.debug( getClass().getSimpleName() + \": Nothing to do!\" );\n return Collections.emptySet();\n }\n\n final Set<Project> changed = new HashSet<>();\n\n for ( File groovyScript : parseGroovyScripts( state.getGroovyScripts() ))\n {\n GroovyShell shell = new GroovyShell( );\n Script script;\n\n for ( final Project project : projects )\n {\n if ( project.isExecutionRoot() )\n {\n logger.info (\"Executing {} on {}\", groovyScript, project);\n\n try\n {\n script = shell.parse( groovyScript );\n\n if ( script instanceof BaseScript )\n {\n ((BaseScript)script).setValues(session.getUserProperties(), projects, project);\n }\n else\n {\n throw new ManipulationException( \"Cannot cast \" + groovyScript + \" to a BaseScript to set values.\" );\n }\n }\n catch (MissingMethodException e)\n {\n try\n {\n logger.debug ( \"Failure when injecting into script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to inject values into base script\", e );\n }\n catch (CompilationFailedException e)\n {\n try\n {\n logger.debug ( \"Failure when parsing script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n catch ( IOException e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n try\n {\n script.run();\n }\n catch ( Exception e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n\n changed.add( project );\n }\n }\n }\n return changed;\n }",
"public void commit() {\r\n for (Iterator<Connection> it = connections.values().iterator(); it.hasNext();) {\r\n Connection conn = it.next();\r\n try {\r\n conn.commit();\r\n } catch (SQLException ex) {\r\n log.severe(\"Partial commit failure: \" + ex.getMessage());\r\n }\r\n }\r\n closeConnections();\r\n }",
"public void commitChanges(){\r\n try{\r\n //Record the state of unfinished set in unfinished.dat\r\n unfinishedFileOutputStream = new FileOutputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetOutputStream = new ObjectOutputStream(unfinishedFileOutputStream);\r\n unfinishedSetOutputStream.writeObject(unfinished);\r\n unfinishedSetOutputStream.close();\r\n unfinishedFileOutputStream.close();\r\n\r\n //Record the state of finished list in finished.dat\r\n finishedFileOutputStream = new FileOutputStream(FINISHED_FILE_PATH);\r\n finishedListOutputStream = new ObjectOutputStream(finishedFileOutputStream);\r\n finishedListOutputStream.writeObject(finished);\r\n finishedListOutputStream.close();\r\n finishedFileOutputStream.close();\r\n\r\n //Record the state of activities list in activities.dat\r\n activitiesFileOutputStream = new FileOutputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListOutputStream = new ObjectOutputStream(activitiesFileOutputStream);\r\n activitiesListOutputStream.writeObject(activities);\r\n activitiesListOutputStream.close();\r\n activitiesFileOutputStream.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Stress in commiting changes: \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n }",
"int modifyProject(Project project) throws WrongIDException, WrongDurationException;",
"public void setProjects(List<Project> newProjects)\r\n {\r\n synchronized (lock)\r\n {\r\n if (originalProjects != null)\r\n {\r\n originalProjects.clear();\r\n originalProjects.addAll(newProjects);\r\n }\r\n else\r\n {\r\n projects.clear();\r\n projects.addAll(newProjects);\r\n }\r\n }\r\n notifyDataSetChanged();\r\n }",
"public void changeCurrProject(ProjectModel p) {\n \tprojects.remove(p);\n \tprojects.add(0, p);\n }",
"protected void okPressed()\n\t{\n\t\t((NewProjectComposite) this.getDialogArea()).updateProject(project);\n\t\tsuper.okPressed();\n\t}",
"public void setProjects(ProjectsList projects) {\n this.projects = projects.clone();\n }",
"public void commit(boolean onSave) {\r\n\t\tfor( IFormPart part : _parts ) {\r\n\t\t\tif ( part.isDirty() ) part.commit( onSave );\r\n\t\t}\r\n\t}",
"@Test\n public void insertAndGetProjects() throws InterruptedException {\n insertProjects();\n\n setProjectIds(); //We set id after insertion in database not to interfere with autogenerate\n\n List<Project> expectedProjects = Arrays.asList( //We prepare id sorted expected list\n PROJECT_MAGICGITHUB,\n PROJECT_ENTREVOISINS,\n PROJECT_MAREU\n );\n\n //When : we get the list of projects\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n\n //Then : the retrieved list contains the three projects sorted by id (insertion order)\n assertArrayEquals(expectedProjects.toArray(), actualProjects.toArray());\n }",
"public void commit() {\n }",
"void setProject(InternalActionContext ac, HibProject project);",
"@Test\n\tpublic void saveProjects() throws ParseException {\n\t\tproject.setEstimates(5);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tDate parsed = format.parse(\"20110210\");\n\t\tjava.sql.Date sql = new java.sql.Date(parsed.getTime());\n\t\tproject.setdRequested(sql);\n\t\tproject.setdRequired(sql);\n\t\tproject.setCritical(true);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tProjectKeyContacts contacts = new ProjectKeyContacts();\n\t\tcontacts.setEmail(\"assdasd.gmail.com\");\n\t\tcontacts.setFname(\"sdsd\");\n\t\tcontacts.setLname(\"asdasd\");\n\t\tcontacts.setPhone(\"asd\");\n\t\tcontacts.setRole(\"asda\");\n\t\tcontacts.setTeam(\"saad\");\n\t\tproject.setContacts(contacts);\n\t\tProjectDetails det = new ProjectDetails();\n\t\tdet.setDescription(\"asdsd\");\n\t\tdet.setName(\"asd\");\n\t\tdet.setName(\"asdad\");\n\t\tdet.setSummary(\"asdd\");\n\t\tproject.setProjectDetails(det);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tassertEquals(controller.saveProject(project).getStatusCode(), HttpStatus.CREATED);\n\t}",
"@Test\n public void insertAllDeleteOneAndGetProjects() throws InterruptedException {\n insertProjects();\n\n setProjectIds(); //We set id after insertion in database not to interfere with autogenerate\n\n Project projectToDelete =\n LiveDataTestUtil.getValue(projectDao.getProjects()).get(FIRST_POSITION);\n\n projectDao.delete(projectToDelete); //We delete the project in database\n\n List<Project> expectedProjects = Arrays.asList( //We prepare id sorted expected list\n PROJECT_ENTREVOISINS,\n PROJECT_MAREU\n );\n\n //When : we get the list of projects\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n\n //Then : the retrieved list contains the two projects sorted by id (insertion order)\n assertArrayEquals(expectedProjects.toArray(), actualProjects.toArray());\n }",
"@PostMapping(\"/assign-to-students\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic @ResponseBody String assignProjectsToStudents(@RequestBody ArrayList<Project> projects) {\n\t\tfor (Project project : projects) {\n\t\t\tif (project.getProjectId() > 0) {\n\t\t\t\tfor (Student student : project.getMembers()) {\n\t\t\t\t\t// Set the given project for each student\n\t\t\t\t\tStudent saveStudent = userService.findByUserId(student.getUserId());\n\t\t\t\t\tsaveStudent.setProject(project);\n\t\t\t\t\tuserService.saveUser(saveStudent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprojectService.saveAssignment(projects);\n\t\treturn Constants.SUCCESS;\n\t}",
"@Override\n\tpublic Integer modifyProject(ProjectInfo project) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.modifyProject\", project);\n\t}",
"public static void updateFinal(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET completed = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, \"YES\");\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Test(expected = RuntimeException.class)\r\n \tpublic void testCommit2() throws ESException {\n \t\tlocalProject.commit(ESLogMessage.FACTORY.createLogMessage(\"test\", \"super\"), null, new NullProgressMonitor());\r\n \t\tfail(\"Should not be able to commit an unshared Project!\");\r\n \t}",
"public void setProjectAsToDo(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException,\n IllegalProjectStatusChangeException {\n Project project = getMandatoryProject(projectId);\n User currentUser = getMandatoryCurrentUser();\n if (project.getStatus() == Project.Status.IN_PROGRESS) {\n if (userIsAssignee(currentUser, project)) {\n project.setStatus(Project.Status.TO_DO);\n projectRepository.updateProject(project);\n } else {\n throw new UnauthorisedOperationException(\n currentUser.getId(),\n \"set back the project status to to do\",\n \"they are not the assignee\");\n }\n } else {\n throw new IllegalProjectStatusChangeException(project.getStatus(), Project.Status.TO_DO);\n }\n support.firePropertyChange(\n ProjectChangeablePropertyName.SET_PROJECT_STATUS.toString(), OLD_VALUE, NEW_VALUE);\n }",
"private static void update_project_status() {\r\n\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\t// Allows for user input\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Select a project ID to modify it.\");\r\n\t\t\t\r\n\t\t\t// Prints out all project ids and names:\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t// This creates a list of project ids to check that the user only selects an available one\r\n\t\t\tArrayList<Integer> project_id_list = new ArrayList<Integer>(); \r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"ID: \" + project_rset.getInt(\"project_id\") + \", Name:\" + project_rset.getString(\"project_name\"));\r\n\t\t\t\tproject_id_list.add(project_rset.getInt(\"project_id\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Allows user to select a project to update \r\n\t\t\tBoolean select_project = true;\r\n\t\t\tint project_id = 0;\r\n\t\t\twhile (select_project == true) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \");\r\n\t\t\t\tString project_id_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tproject_id = Integer.parseInt(project_id_str);\r\n\t\t\t\t\tfor (int i = 0; i < project_id_list.size(); i ++) {\r\n\t\t\t\t\t\tif (project_id == project_id_list.get(i)) { \r\n\t\t\t\t\t\t\tselect_project = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (select_project == true) {\r\n\t\t\t\t\t\tSystem.out.println(\"Please only select an available project id.\");\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 * @exception Throws exception if the users input for project id is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The project number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// The user can select either to change the due date, the status or the amount paid\r\n\t\t\t// The values are printed out so that the user can physically see the fields and decide\r\n\t\t\tSystem.out.println(\"Select 1, 2 or 3 depending on which field you want to update: \");\r\n\t\t\t\r\n\t\t\tResultSet project_select_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_select_rset.next()) {\r\n\t\t\t\tif (project_select_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"ID: \" + project_select_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\"\\nName: \" + project_select_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\"\\nCharged: R\" + project_select_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\"\\n1. Paid: R\" + project_select_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\"\\n2. Due on: \" + project_select_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\"\\n3. Status: \" + project_select_rset.getString(\"status\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Here the user can select the field to update's number\r\n\t\t\t// This allows the user to enter a charged amount \r\n\t\t\tBoolean select_update_field = true;\r\n\t\t\tint update_field = 0;\r\n\t\t\twhile (select_update_field == true) {\r\n\t\t\t\tSystem.out.print(\"Field number \");\r\n\t\t\t\tString field_change_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tupdate_field = Integer.parseInt(field_change_str);\r\n\t\t\t\t\tif (update_field == 1 || update_field == 2 || update_field == 3) {\r\n\t\t\t\t\t\tselect_update_field = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (update_field != 1 && update_field != 2 && update_field != 3) {\r\n\t\t\t\t\t\tSystem.out.println(\"You can only select 1, 2 or 3. Please try again\");\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 * @exception Throws exception if the users input for selected field to update is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The selected field number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tif (update_field == 1) {\r\n\t\t\t\t// This allows the user to enter update the amount paid \r\n\t\t\t\tBoolean update_paid = true;\r\n\t\t\t\tint prev_paid = 0;\r\n\t\t\t\tint paid = 0;\r\n\t\t\t\twhile (update_paid == true) {\r\n\t\t\t\t\tSystem.out.println(\"How much has been paid: R\");\r\n\t\t\t\t\tString paid_amount_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpaid = Integer.parseInt(paid_amount_str);\r\n\t\t\t\t\t\tupdate_paid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @exception Throws exception if the users input for amount paid is not a number\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The paid amount cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Fetches any previous paid amount to add it to the new amount\r\n\t\t\t\tResultSet project_paid_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\twhile (project_paid_rset.next()) {\r\n\t\t\t\t\tprev_paid = project_paid_rset.getInt(\"paid\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculates the total\r\n\t\t\t\tint total_paid = prev_paid + paid;\r\n\r\n\t\t\t\t// Updates the field\r\n\t\t\t\tPreparedStatement ps_paid = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET paid = ? WHERE project_id = ?;\");\r\n\t ps_paid.setInt(1, total_paid);\r\n\t ps_paid.setInt(2, project_id);\r\n\t ps_paid.executeUpdate();\r\n\t System.out.println(\"\\nUpdated Paid Amount to R\" + total_paid + \".\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif (update_field == 2) {\r\n\t\t\t\t\r\n\t\t\t\t// Allows the user to update the due date\r\n\t\t\t\tBoolean update_deadline_date = true;\r\n\t\t\t\tDate deadline_date = null;\r\n\t\t\t\twhile (update_deadline_date == true) {\r\n\t\t\t\t\tSystem.out.print(\"Deadline Date (YYYY-MM-DD): \");\r\n\t\t\t\t\tString deadline_date_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdeadline_date= Date.valueOf(deadline_date_str);\r\n\t\t\t\t\t\tupdate_deadline_date = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @exception Throws exception if the users input for deadline date is not in the correct format\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The date must be in the format YYYY-MM-DD (eg. 2013-01-13). Please try again\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Updates the value\r\n\t\t\t\tPreparedStatement ps_update_date = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET completion_date = ? WHERE project_id = ?;\");\r\n\t\t\t\tps_update_date.setDate(1, deadline_date);\r\n\t\t\t\tps_update_date.setInt(2, project_id);\r\n\t\t\t\tps_update_date.executeUpdate();\r\n\t\t\t\tSystem.out.println(\"\\nUpdated deadline date to \" + deadline_date + \".\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (update_field == 3) {\r\n\t\t\t\tSystem.out.print(\"In order to set the status to complete select finalize project from the project menu.\\n\"\r\n\t\t\t\t\t\t+ \"Select status number from list of statuses: \\n\");\r\n\t\t\t\tString[] statuses = new String[] {\"Initialised\", \"Paperwork Phase\", \"Foundations\", \"Primary Construction\", \"Finishes\"};\r\n\t\t\t\tfor (int i = 0; i < 5; i ++) {\r\n\t\t\t\t\tSystem.out.println((i + 1) + \". \" + statuses[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Allows a user to select a new status\r\n\t\t\t\tBoolean update_status = true;\r\n\t\t\t\tint status_index = 0;\r\n\t\t\t\twhile (update_status == true) {\r\n\t\t\t\t\tSystem.out.println(\"Status No: \");\r\n\t\t\t\t\tString status_index_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tstatus_index = Integer.parseInt(status_index_str);\r\n\t\t\t\t\t\tfor (int i = 0; i < 5; i ++) {\r\n\t\t\t\t\t\t\tif (status_index == i) { \r\n\t\t\t\t\t\t\t\tupdate_status = false;\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 (update_status == true) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please only select an available status numbers.\");\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 * @exception Throws exception if the users input for status index is not a number\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The status number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\r\n\t\t\t\tPreparedStatement ps_status = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET status = ? WHERE project_id = ?;\");\r\n\t ps_status.setString(1, statuses[status_index - 1]);\r\n\t ps_status.setInt(2, project_id);\r\n\t ps_status.executeUpdate();\r\n\t System.out.println(\"\\nThe status has been updated to \" + statuses[status_index -1] + \".\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception If the table entry cannot be updated due to database constrains then the SQLException is thrown\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}",
"private void update() {\n\n\t\tthis.projects.clear();\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Infrastructure) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Social) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\t}",
"void commit();",
"void commit();",
"public void commit();",
"public void acceptAsFinished(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException,\n IllegalProjectStatusChangeException {\n Project project = getMandatoryProject(projectId);\n User currentUser = getMandatoryCurrentUser();\n if (project.getStatus() == Project.Status.TURNED_IN) {\n if (userIsSupervisor(currentUser, project)) {\n project.setStatus(Project.Status.FINISHED);\n project.setFinishingDate(LocalDate.now());\n projectRepository.updateProject(project);\n } else {\n throw new UnauthorisedOperationException(\n currentUser.getId(), \"accept as finished\", \"they\" + \" are not the supervisor\");\n }\n } else {\n throw new IllegalProjectStatusChangeException(project.getStatus(), Project.Status.FINISHED);\n }\n support.firePropertyChange(\n ProjectChangeablePropertyName.SET_PROJECT_STATUS.toString(), OLD_VALUE, NEW_VALUE);\n }",
"@Override\n\tpublic void commit() {\n\n\t}",
"public void finishProject(Subproject project) {\n\t\tfor(Player p:players) {\n\t\t\tif(p!=current) {\n\t\t\t\tp.lowerScore(project.getFinishField().getAmountSZT());\n\t\t\t\tcurrent.raiseScore(project.getFinishField().getAmountSZT());\n\t\t\t}\n\t\t}\n\t\tproject.finishProject();\n\t\tprojectsFinished.add(project);\n\t\tprojectsActive.remove(project);\n\t}",
"public void setSelectedProjectName(String selectedProjectName) throws Exception{\n\t\tDataManager.createProjectFolder(selectedProjectName);\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}",
"public static void updateContractor(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET contract_name = ?, contract_tel = ?, contract_email = ?, contract_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.contract_name);\r\n pstmt.setString(2, NewProject.contract_tel);\r\n pstmt.setString(3, NewProject.contract_email);\r\n pstmt.setString(4, NewProject.contract_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tFile projectFile;\n\t\t\t\tint rVal = fileChooser.showSaveDialog(OldTimeTableApp.this);\n\t\t\t\tif(rVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\tprojectFile = fileChooser.getSelectedFile();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tProjectController.saveProject(currentProject, projectFile.getPath());\n\t\t\t\t\t\tcurrentProjectFilePath = projectFile.getPath();\n\t\t\t\t\t\tupdatePanel(currentProjectFilePath, currentProject.getCourseDetailsFileName(), currentProject.getStudentAllocationDetailsFileName());\n\t\t\t\t\t} catch (IOException error) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tJOptionPane.showMessageDialog(OldTimeTableApp.this, error, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"@Subscribe\r\n\tpublic void onProjectNewRequest(CloseProjectRequestEvent saveProjectRequest)\r\n\t{\r\n\r\n\t\tgetView().updateProjectLabel(\"\");\r\n\t\tgetView().updateSelectionLabel(\"\");\r\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}",
"public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void commitChanges(Context context) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.commit();\r\n\t}",
"void commit() throws CommitException;",
"@Override\n\tpublic Integer delProjectBatch(List<ProjectInfo> projList) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProjectBatch\", projList);\n\t}",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public void updateProjectList()\r\n {\r\n\r\n projects.updateUI();// call updateUI() for the JList\r\n }",
"protected void commit() {\n \t\t\tif (fStart < 0) {\n \t\t\t\tif (fDocumentUndoManager.fFoldingIntoCompoundChange) {\n \t\t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t\t} else {\n \t\t\t\t\treinitialize();\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tupdateTextChange();\n \t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t}\n \t\t\tfDocumentUndoManager.resetProcessChangeState();\n \t\t}",
"public void setProject(Project project){\n\t\tthis.project = project;\n\t\tif (project!=null){\n\t\t\tfor (final Iterator it = project.getRoot().getProgresses ().iterator ();it.hasNext ();){\n\t\t\t\tnew com.ost.timekeeper.actions.commands.DeleteProgress ((Progress)it.next ()).execute ();\n\t\t\t}\n\t\t}\n\t\tif (project!=null){\n\t\t\tthis.setSelectedItem (project.getRoot());\n\t\t} else {\n\t\t\tthis.setSelectedItem (null);\n\t\t}\n\t\t//notifica cambiamento di progetto\n\t\tsynchronized (this){\n\t\t\tthis.setChanged();\n\t\t\tthis.notifyObservers(ObserverCodes.PROJECTCHANGE);\n\t\t}\n\t}",
"@Override\n\tpublic int updateProject(Project project) {\n\t\treturn pm.updateProject(project);\n\t}",
"R commit(C change);",
"public void createProject(Project newProject);",
"@Override\n public void actionPerformed(AnActionEvent e) {\n VirtualFile vFile = e.getData(PlatformDataKeys.VIRTUAL_FILE);\n Project project = e.getData(PlatformDataKeys.PROJECT);\n CompareManager instance = getBCInstance();\n if (instance == null){\n return;\n }\n instance.setLeftCompare(new CompareObject(vFile,project));\n instance.setCurrentState(CompareManager.SelectState.WAITFORCOMPARE);\n\n\n System.out.println(\"select left project name: \"+project.getName()+\" path: \"+project.getBasePath());\n }",
"public static void saveProjects(Vendor vendor, HttpServletRequest request)\n throws EnvoyServletException\n {\n String toField = (String) request.getParameter(\"toField\");\n ArrayList projects = new ArrayList();\n if (toField != null)\n {\n if (toField.equals(\"\"))\n {\n vendor.setProjects(null);\n }\n else\n {\n try\n {\n String[] projIds = toField.split(\",\");\n for (int i = 0; i < projIds.length; i++)\n {\n Project proj = ServerProxy.getProjectHandler()\n .getProjectById(Long.parseLong(projIds[i]));\n projects.add(proj);\n }\n vendor.setProjects(projects);\n }\n catch (Exception ge)\n {\n throw new EnvoyServletException(ge);\n }\n }\n }\n\n PermissionSet permSet = (PermissionSet) request.getSession(false)\n .getAttribute(WebAppConstants.PERMISSIONS);\n\n if (permSet.getPermissionFor(Permission.USERS_PROJECT_MEMBERSHIP) == true)\n {\n if (request.getParameter(\"allProjects\") != null)\n {\n vendor.isInAllProjects(true);\n }\n else\n {\n vendor.isInAllProjects(false);\n }\n }\n }",
"public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}",
"void commit(boolean isMajor);",
"public void setProjectList(List<OtmProject> projectList) {\n this.projects = projectList;\n }",
"public void changeProject(ProjectWasChanged evt) throws InvalidProjectCommandException{\n validator.validate(this);\n UpdateProperties(evt.getProperties());\n ArrayList<Event> events = new ArrayList<Event>();\n events.add(new ProjectWasChanged(this, evt.getProperties()));\n }",
"public void commit() {\n tryCommit(true);\n }",
"public void removeSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tfinal Project[] items = selectedItems.toArray(new Project[selectedItems.size()]);\n\t\t\tfinal Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t\t\talert.initOwner(getWindow());\n\t\t\tif (selectedItems.size() > 1) {\n\t\t\t\talert.setTitle(String.format(\"Remove selected Projects from list? - %s items selected\",\n\t\t\t\t\t\tselectedItems.size()));\n\t\t\t} else {\n\t\t\t\talert.setTitle(\"Remove selected Project from list? - 1 item selected\");\n\t\t\t}\n\t\t\talert.setHeaderText(\"\"\"\n\t\t\t Are you sure you want to remove the selected projects?\n\t\t\t This will not remove any files from the project.\n\t\t\t \"\"\");\n\t\t\tfinal Optional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\tfor (final Project p : items) {\n\t\t\t\t\tprojectService.deleteProject(p);\n\t\t\t\t\tprojectsObservable.remove(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void addProject(){\n AlertDialog.Builder projectBuilder = new AlertDialog.Builder(mainActivity);\n projectBuilder.setTitle(\"New Project Name:\");\n\n final EditText projectNameInput = new EditText(mainActivity);\n\n projectNameInput.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);\n projectBuilder.setView(projectNameInput);\n\n projectBuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n String projectName = projectNameInput.getText().toString();\n projectList.add(projectName);\n\n HashSet<String> projectListSet = new HashSet<>(projectList);\n\n SharedPreferences.Editor listPrefsEditor = projectListPrefs.edit();\n listPrefsEditor.putStringSet(\"projectList\", projectListSet);\n listPrefsEditor.apply();\n\n mainActivity.codeStopwatch.pause();\n mainActivity.researchStopwatch.pause();\n final Button codingButton = mainActivity.findViewById(R.id.btn_coding_start);\n codingButton.setText(R.string.start);\n final Button researchButton = mainActivity.findViewById(R.id.btn_research_start);\n researchButton.setText(R.string.start);\n\n if (!selectedProjectName.equals(\"\")){\n mainActivity.manageClocks.saveClocks(selectedProjectName);\n }\n mainActivity.codeStopwatch.reset();\n mainActivity.researchStopwatch.reset();\n\n mainActivity.manageClocks.saveClocks(projectName);\n mainActivity.manageClocks.loadClocks(projectName);\n\n Spinner projectsSpinner = mainActivity.findViewById(R.id.projects_spinner);\n ArrayAdapter<String> projectsArrayAdapter = new ArrayAdapter<String>(\n mainActivity, android.R.layout.simple_spinner_item, projectList);\n projectsArrayAdapter.setDropDownViewResource(\n android.R.layout.simple_spinner_dropdown_item);\n projectsSpinner.setAdapter(projectsArrayAdapter);\n projectsSpinner.setSelection(projectsArrayAdapter.getPosition(projectName));\n\n selectedProjectName = projectName;\n SharedPreferences.Editor selectedProjectPrefsEditor = selectedProjectPrefs.edit();\n selectedProjectPrefsEditor.putString(\"selectedProjectName\", selectedProjectName);\n selectedProjectPrefsEditor.apply();\n }\n });\n projectBuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n projectBuilder.show();\n }",
"@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}",
"@Override\n public void commit() {\n }",
"public @Override void actionPerformed(ActionEvent e) {\n RP.post(new Runnable() {\n public @Override void run() {\n Set<Project> projects = new HashSet<Project>();\n // Collect projects corresponding to selected folders.\n for (DataFolder d : context.lookupAll(DataFolder.class)) {\n try {\n Project p = ProjectManager.getDefault().findProject(d.getPrimaryFile());\n if (p != null) {\n projects.add(p);\n }\n // Ignore folders not corresponding to projects (will not disable action if some correspond to projects).\n // Similarly, do not worry about projects which are already open - no harm done.\n } catch (IOException x) {\n Logger.getLogger(OpenProjectFolderAction.class.getName()).log(Level.INFO, null, x);\n }\n }\n OpenProjectList.getDefault().open(projects.toArray(new Project[projects.size()]), false, true);\n }\n });\n }",
"void onSelectProject();",
"public static void finaliseEdit() throws IOException {\r\n //Creating scanner object and reading the file\r\n Scanner s = new Scanner(new File(\"output.txt\"));\r\n Scanner sc2 = new Scanner(System.in);\r\n //Empty string to append the lines of the file to\r\n String lines = \"\";\r\n //While loop to append lines of file to empty string\r\n while (s.hasNext()) {\r\n lines += s.nextLine();\r\n }\r\n //Creating array by splitting the string by \"#\" which will be written in when a project is added\r\n String[] lineArr = lines.split(\"#\");\r\n //Creating arraylist and appending lines from array with while loop\r\n List<String> inLines = Arrays.asList(lineArr);\r\n while (s.hasNextLine()) {\r\n inLines.add(s.nextLine());\r\n }\r\n s.close();\r\n //For loop to split array by \", \"\r\n for (int i = 0; i < lineArr.length; i++) {\r\n String[] projectInfo = lineArr[i].split(\", \");\r\n //Prompting the user to enter a number to select a project to finalise\r\n System.out.println(\"Enter index number of task to finalise: \\ne - Exit\");\r\n int proSelect = sc2.nextInt();\r\n //Opening the file and creating a bufferedwriter object\r\n FileWriter writer = new FileWriter(\"output.txt\",false);\r\n BufferedWriter buffer = new BufferedWriter(writer);\r\n //The project gets selected by the user entering a number to select. That number will be subtracted by 1 to get the correct index of the selected project\r\n String selectedProj = inLines.get(proSelect - 1);\r\n //Creating array by splitting the string\r\n String[] selectedProjarr = selectedProj.split(\", \");\r\n //Changing the value of the index\r\n selectedProjarr[21] = \"finalised\";\r\n //Creating a string from the edited array\r\n String projLinestr = Arrays.toString(selectedProjarr);\r\n //Replacing the selected project in the arraylist with the string of the edited project\r\n inLines.set(proSelect - 1 , projLinestr);\r\n //For loop to write the arraylist to file. I got this method from https://stackoverflow.com/questions/6548157/how-to-write-an-arraylist-of-strings-into-a-text-file/6548204\r\n for(String str:inLines) {\r\n buffer.write((str + \"#\\n\"));\r\n }\r\n buffer.close();\r\n //Reading integers from file to calculate amount to be paid\r\n String feeStr = selectedProjarr[5];\r\n int feeINT = Integer.valueOf(feeStr);\r\n String ptdStr = selectedProjarr[6];\r\n int ptdInt = Integer.valueOf(ptdStr);\r\n int tobePaid = feeINT - ptdInt;\r\n //If there still is money to be payed when a project gets finalised, an invoice will be created, if all fees are paid, no invoive will be made\r\n if (tobePaid != 0) {\r\n //Opening the file and creating buffered writer to write to the file\r\n FileWriter writer2 = new FileWriter(\"invoice.txt\");\r\n BufferedWriter buffer2 = new BufferedWriter(writer2);\r\n //Writing to the file\r\n buffer2.write(\"Customer name: \" + selectedProjarr[12] + \" \" + selectedProjarr[13] + \"\\n\");\r\n buffer2.write(\"Customer tel number: \" + selectedProjarr[14] + \"\\n\");\r\n buffer2.write(\"Customer email: \" + selectedProjarr[15] + \"\\n\");\r\n buffer2.write(\"Customer address: \" + selectedProjarr[16] + \"\\n\");\r\n buffer2.write(\"Amount to be paid: \" + \"R\" + tobePaid);\r\n buffer2.close();\r\n System.out.println(\"Project has been finalised and invoice was created.\");\r\n }\r\n else\r\n {\r\n System.out.println(\"Total amount has been paid, invoice was not created.\\nProject was finalised.\");\r\n }\r\n //Opening file and creating buffered writer object to write to the completed projects file\r\n FileWriter writer3 = new FileWriter(\"completedProject.txt\");\r\n BufferedWriter buffer3 = new BufferedWriter(writer3);\r\n //Writing the project info to the file\r\n buffer3.write(\"Project name: \" + selectedProjarr[0] + \"\\n\");\r\n buffer3.write(\"Project number: \" + selectedProjarr[1] + \"\\n\");\r\n buffer3.write(\"Building type: \" + selectedProjarr[2] + \"\\n\");\r\n buffer3.write(\"Address: \" + selectedProjarr[3] + \"\\n\");\r\n buffer3.write(\"ERF Number: \" + selectedProjarr[4] + \"\\n\");\r\n buffer3.write(\"Fee: \" + \"R\" + selectedProjarr[5] + \"\\n\");\r\n buffer3.write(\"Amount paid to date: \" + \"R\" + selectedProjarr[6] + \"\\n\");\r\n buffer3.write(\"Due date: \" + selectedProjarr[7] + \"\\n\");\r\n //Creating date format to get the current date\r\n DateTimeFormatter dtf = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\r\n LocalDateTime now = LocalDateTime.now();\r\n buffer3.write(\"Date completed: \" + dtf.format(now) + \"\\n\");\r\n //Writing Contractor information\r\n buffer3.write(\"Contractor name: \" + selectedProjarr[8] + \"\\n\");\r\n buffer3.write(\"Contractor tel number: \" + selectedProjarr[9] + \"\\n\");\r\n buffer3.write(\"Contractor email: \" + selectedProjarr[10] + \"\\n\");\r\n buffer3.write(\"Contractor address: \" + selectedProjarr[11] + \"\\n\");\r\n //Writing Customer information\r\n buffer3.write(\"Customer name: \" + selectedProjarr[12] + \" \" + selectedProjarr[13] + \"\\n\");\r\n buffer3.write(\"Customer tel number: \" + selectedProjarr[14] + \"\\n\");\r\n buffer3.write(\"Customer email: \" + selectedProjarr[15] + \"\\n\");\r\n buffer3.write(\"Customer address: \" + selectedProjarr[16] + \"\\n\");\r\n //Writing Architect information\r\n buffer3.write(\"Architect name: \" + selectedProjarr[17] + \"\\n\");\r\n buffer3.write(\"Architect tel numbert: \" + selectedProjarr[18] + \"\\n\");\r\n buffer3.write(\"Architect email: \" + selectedProjarr[19] + \"\\n\");\r\n buffer3.write(\"Architect address: \" + selectedProjarr[20] + \"\\n\");\r\n buffer3.close();\r\n break;\r\n }\r\n }",
"public void doProjectOpen() {\r\n\t\tthis.observerList.notifyObservers(GNotification.PROJECT_OPEN, null);\r\n\t}",
"@Override\n public void onClick(View view) {\n String projectName = etProjectName.getText().toString();\n String projectOwner = etProjectOwner.getText().toString();\n String projectDescription = etProjectDescription.getText().toString();\n long projectId = 0; // This is just to give some value. Not used when saving new project because auto-increment in DB for this value.\n\n\n // USerid and projectname are mandatory parameters\n if( userId != 0 && projectName != null) {\n newProject = new Project(projectId, userId, projectName, projectOwner, projectDescription);\n dbHelper.saveProject(newProject);\n// showToast(\"NewprojectId:\" + newProject.projectId+ \"-->UserId: \"+ userId + \"--> ProjectName\" + newProject.projectName +\"->Owner\"+newProject.projectOwner);\n dbHelper.close();\n\n // SIIRRYTÄÄN PROJEKTILISTAUKSEEN\n Intent newProjectList = new Intent( NewProject.this, ProjectListActivity.class);\n newProjectList.putExtra(\"userId\", userId);\n startActivity(newProjectList);\n }\n\n }",
"@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}",
"public void notifyProjectItem(EtoProject etoProject){\n }",
"@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n\tpublic void hechoFase(long idProject) throws ConectelException {\r\n\t\tProyectoDO project = entityManager.find(ProyectoDO.class, idProject);\r\n\t\tif (project == null) {\r\n\t\t\tthrow new ConectelException(\"El proyecto no existe\");\r\n\t\t}\r\n\t\tEstadoDO estado = new EstadoDO(EstadoProyecto.DATOS_GRLS.getId());\r\n\t\tproject.setEstado(estado);\r\n\t\tentityManager.merge(project);\r\n\t}",
"@Override\n\tpublic void createProjectsReference(ProjectsReference proj) {\n\t\tString sql = \"INSERT INTO projects_reference VALUES (?,?,?,?,?,?,now(),now(),?,?,?,?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_ref_id(),\n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getItm_id(),\n\t\t\t\tproj.getTime(),\n\t\t\t\tproj.getPrice(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_ref_desc(),\n\t\t\t\tproj.getActual_time(),\n\t\t\t\tproj.getTopix_article_id(),\n\t\t\t\tproj.getActivated()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tProjects proj2 = new Projects();\n\t\tproj2 = getJdbcTemplate().queryForObject(\"select * from projects where proj_id=\"+proj.getProj_id(), new BeanPropertyRowMapper<Projects>(Projects.class));\n\t\tItem itm = new Item();\n\t\titm = getJdbcTemplate().queryForObject(\"select * from item where itm_id=\"+proj.getItm_id(), new BeanPropertyRowMapper<Item>(Item.class));\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id =\"+proj2.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_ref_id(),\n\t\t\t\t\"Projects Reference:\"+proj2.getProj_id(),\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created Item name=\"+itm.getItm_name()+\" on Project name=\"+proj2.getProj_name()+\", customer=\"+cus.getCus_name()\n\t\t\t\t+\", target_time=\"+proj.getTime()+\", actual_time=\"+proj.getActual_time()+\", price=\"+proj.getPrice()+\", desc=\"+proj.getProj_ref_desc()\n\t\t\t\t+\", topix_article_id=\"+proj.getTopix_article_id()+\", activated=\"+((proj.getActivated() == 0) ? \"No\" : \"Yes\"),\n\t\t\t\tproj2.getProj_name()+\" : \"+itm.getItm_name()\n\t\t});\n\t}",
"private void setActiveValue(int projectId, String value) {\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtUpdate = null;\n\t\ttry {\n\t\t\tStringBuilder sbUpdate = new StringBuilder(UPDATE)\n\t\t\t\t.append(projectTableName)\n\t\t\t\t.append(SET)\n\t\t\t\t.append(projectActiveColumnName).append(EQUAL).append(value) //$NON-NLS-1$\n\t\t\t\t.append(WHERE)\n\t\t\t\t.append(projectIdColumnName).append(EQUAL).append(projectId); //$NON-NLS-1$\n\n\t\t\tstmtUpdate = conn.prepareStatement(sbUpdate.toString());\n\t\t\tstmtUpdate.executeUpdate();\n\t\t\t\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new DAOException(ex);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtUpdate);\n\t\t}\n\t\t\n\t}",
"public static void updateArchitect(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects \" +\r\n \" SET architect_name = ?, architect_tel = ?, architect_email = ?, architect_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.architect_name);\r\n pstmt.setString(2, NewProject.architect_tel);\r\n pstmt.setString(3, NewProject.architect_email);\r\n pstmt.setString(4, NewProject.architect_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void buildSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tnavigationController.clickProgress();\n\t\t\tprojectService.build(selectedItems, false);\n\t\t}\n\t}"
] | [
"0.6360306",
"0.61800766",
"0.6121122",
"0.60884106",
"0.5969907",
"0.59379333",
"0.579169",
"0.5790801",
"0.57700616",
"0.5753942",
"0.57019234",
"0.5688416",
"0.5687013",
"0.568166",
"0.56726193",
"0.5669376",
"0.566153",
"0.5660767",
"0.5657972",
"0.56560767",
"0.56150115",
"0.5603302",
"0.5590657",
"0.55886716",
"0.5577391",
"0.5566751",
"0.5566009",
"0.55581564",
"0.55507106",
"0.55424184",
"0.554111",
"0.55247384",
"0.5487629",
"0.5484668",
"0.54734087",
"0.5449205",
"0.54323524",
"0.54186416",
"0.5406856",
"0.539561",
"0.5380836",
"0.53773636",
"0.5369836",
"0.53691715",
"0.5368603",
"0.53681123",
"0.53611165",
"0.5358822",
"0.5358822",
"0.5354194",
"0.535082",
"0.5342529",
"0.53349197",
"0.53296477",
"0.53244627",
"0.53244627",
"0.53244627",
"0.53244627",
"0.53244627",
"0.53121084",
"0.53091407",
"0.5286151",
"0.5285991",
"0.5285991",
"0.5285991",
"0.5285991",
"0.52779937",
"0.52727824",
"0.52644545",
"0.52601594",
"0.52584475",
"0.5256703",
"0.52409256",
"0.52376133",
"0.52374333",
"0.52273846",
"0.5226221",
"0.5222849",
"0.5217325",
"0.52096677",
"0.5203871",
"0.5200486",
"0.51976126",
"0.5191343",
"0.51911473",
"0.5165362",
"0.5161261",
"0.5158454",
"0.5143957",
"0.51425225",
"0.5137218",
"0.5136846",
"0.5134413",
"0.5127221",
"0.5104815",
"0.50867337",
"0.5083761",
"0.50815094",
"0.5079722",
"0.50767"
] | 0.6592325 | 0 |
Returns current branch name for selected project | String getCurrentBranchName(Project project); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getBranchName();",
"String getBranchName();",
"public String getTrackingBranch(Project project);",
"public String getBranchName() {\r\n return branchName;\r\n }",
"public String getBranchName() {\n return branchName;\n }",
"public String getBranchName() {\n return branchName;\n }",
"public String getBranchname() {\n return branchname;\n }",
"public java.lang.String getBranchName() {\n return branchName;\n }",
"com.google.protobuf.ByteString\n getBranchNameBytes();",
"java.lang.String getProjectName();",
"java.lang.String getBranchId();",
"public GitBranch getBranch() { return GitDir.this.getBranch(getName()); }",
"public String getBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getBranch()\");\n Via via=(Via)sipHeader;\n return via.getBranch();\n }",
"String getProjectName();",
"public String getBranchLabel() {\r\n\t\treturn branchLabel;\r\n\t}",
"public String getProjectName(){\n return projectModel.getProjectName();\n }",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"@Override\r\n\tString getProjectName();",
"public String getSelectedProjectName(){\n\t\treturn DataManager.getProjectFolderName();\n\t}",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getProjectName() { return DBCurrent.getInstance().projectName(); }",
"public String getBranchCode() {\n return normalizedBic.substring(BRANCH_CODE_INDEX, BRANCH_CODE_INDEX + BRANCH_CODE_LENGTH);\n }",
"public Optional<String> getBranch() {\n return Optional.fromNullable(branch);\n }",
"public static String gitBranch(String repoDir) throws IOException {\n return exec(\"git rev-parse --abbrev-ref HEAD\", repoDir).trim();\n }",
"public String getConfigChangeSetBranchName() {\n return configChangeSetBranchName;\n }",
"public String getBranchcode() {\n return branchcode;\n }",
"public String getBranchno() {\n return branchno;\n }",
"public static String setDefaultBranch(Project project) {\n String defaultBranch = SourcegraphConfig.getInstance(project).getDefaultBranch();\n if (defaultBranch == null || defaultBranch.length() == 0) {\n Properties props = readProps();\n defaultBranch = props.getProperty(\"defaultBranch\", null);\n }\n return defaultBranch;\n }",
"public String getBranchNo() {\r\n return branchNo;\r\n }",
"public GitBranch getBranch(String aName) { return GitDir.this.getBranch(getName() + '/' + aName); }",
"public String getBranchNo() {\n return branchNo;\n }",
"public String getProjectName() {\n\t\treturn project;\n\t}",
"public String getBranchId() {\n return branchId;\n }",
"public static String getActiveProjectName() {\r\n Project project = ProjectPlugin.getPlugin().getProjectRegistry().getCurrentProject();\r\n \r\n if (project == null)\r\n project = ProjectPlugin.getPlugin().getProjectRegistry().getDefaultProject();\r\n \r\n return project.getName();\r\n }",
"public static synchronized String getTestProjectName() {\n String retVal;\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.getTestProjectName\");\n if (Utility.isMacintosh()) {\n retVal = \"Test Project\";\n } else if (Utility.isLinux()) {\n retVal = \"Test Project\";\n } else {\n retVal = \"Test ProjectW\";\n }\n return retVal;\n }",
"public static String getBranch(@NotNull JSONObject jsonObject) {\n String ref = jsonObject.get(\"ref\").toString();\n return ref.split(\"^(refs/heads/)\")[1];\n }",
"public String getProjectName() {\n return projectName;\n }",
"public String getProjectName() {\r\n return projectName;\r\n }",
"public String getProjectName() {\r\n return this.projectName;\r\n }",
"public File curHeadBranch() {\n File result = null;\n String headName = Utils.readObject(HEADNAME, String.class);\n for (String fileName: Utils.plainFilenamesIn(Main.ALL_BRANCHES)) {\n if (fileName.equals(headName)) {\n File currFile = Utils.join(Main.ALL_BRANCHES, fileName);\n result = currFile;\n }\n }\n return result;\n }",
"public String getProjectName() {\n return projectName;\n }",
"public String getProjectName() {\n return projectName;\n }",
"public String getBranchPrefix() {\n\t\tString revisionNumber = logEntry.getRevision();\n\t\tint lastDotRev = revisionNumber.lastIndexOf(\".\");\n\t\tif (lastDotRev < 0) {\n\t\t\tVersionTreePlugin.log(IStatus.ERROR, \"Malformed revision: \"+revisionNumber);\n\t\t\treturn null;\n\t\t}\n\n\t\tString branchNumber = revisionNumber.substring(0, lastDotRev);\n\t\tint lastDotBr = branchNumber.lastIndexOf(\".\");\n\t\tif (lastDotBr > 0) {\n\t\t\tString branchPrefix = branchNumber.substring(0, lastDotBr) +\n\t\t\t\t\t\".0\" + branchNumber.substring(lastDotBr);\n\t\t\treturn branchPrefix;\n\t\t}\n\t\treturn branchNumber;\n\t}",
"public String getProjectName() {\r\n\t\t\treturn projectName;\r\n\t\t}",
"Commit getCurrentCommit() {\n String branchh = null;\n Commit prev = null;\n File currentB = new File(\".gitlet/current\");\n for (File file: currentB.listFiles()) {\n branchh = file.getName();\n }\n return deserializeCommit(\".gitlet/heads/\" + branchh);\n }",
"private static String nameOf(GitHubProject project) {\n return String.format(\"[%s/%s](%s)\",\n project.organization().name(), project.name(), project.scm().toString());\n }",
"public String getProjectName() {\n\t\treturn projectName;\n\t}",
"String branch();",
"public static final String getProject() { return project; }",
"public static final String getProject() { return project; }",
"public Integer getBranchNum() {\r\n return branchNum;\r\n }",
"public File getBranch() {\n return _branch;\n }",
"public String getBranchStatus() {\r\n return (String) getAttributeInternal(BRANCHSTATUS);\r\n }",
"com.google.protobuf.ByteString\n getBranchIdBytes();",
"public java.lang.String getBranchDesc() {\n return branchDesc;\n }",
"public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}",
"public String getProjectName() {\n return getProperty(Property.PROJECT_NAME);\n }",
"public String getJP_BranchName_Kana_Line();",
"public String getProjectName() {\n return this.mProjectName;\n }",
"public String projectName() {\n return this.projectName;\n }",
"public String getProjectTeamName(){\n return \"The name of the project of this researcher is \"+\n name_of_project_team +\n \"\\n*******\\n\";\n }",
"public java.lang.String getScenicBranchId() {\n return scenicBranchId;\n }",
"public String getBranchCd() {\r\n return branchCd;\r\n }",
"public void getBranchCommand() {\n\n }",
"public String toString() {\r\n\t\treturn \"Jump branchLabel: \" + branchLabel;\r\n\t}",
"public java.lang.String toString() {\n return \"Project name=\" + name;\n }",
"public static Branch getDefaultBranch(){\n BranchDao bDAO = new BranchDao();\n Branch branch = null;\n try {\n branch = bDAO.findByName(\"Main Branch\"); //from SQL script\n } catch (DaoException ex) {\n Logger.getLogger(BranchCtrl.class.getName()).log(Level.SEVERE, null, ex);\n ErrorMsg.setLastError(ErrorMsg.ERROR_SQL_ERROR);\n }\n if(branch==null){\n branch = defaultBranch;\n }\n return branch;\n }",
"public String getSelected ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n return (node == null)\n ? null\n : node.getName();\n }",
"public String f9Branch() throws Exception {\r\n\t\tString query = \" SELECT DISTINCT CENTER_ID,NVL(CENTER_NAME,' ') \"\r\n\t\t\t+ \" FROM HRMS_CENTER \"\r\n\t\t\t+ \" WHERE IS_ACTIVE='Y'\" \r\n\t\t\t+ \" ORDER BY CENTER_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"branch.code\"), getMessage(\"branch\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"branchId\", \"branchName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}",
"java.lang.String getProjectId();",
"public Integer getBranchId() {\n return branchId;\n }",
"public static String getName() {\n\t\treturn ProjectMain._name;\n\t}",
"static String extractProjectName(final MavenProject project) {\n if (project.getModel().getName() != null) {\n return project.getModel().getName();\n } else {\n return project.getArtifactId();\n }\n }",
"public BranchDetails getBranchDetails(){\n\t\n\tbranchD = BranchDetails.getBranchDetails();\t\n\treturn branchD;\n\t}",
"public static String getSymbolLookupProjectName() {\n\t\tIPreferenceStore prefs = Activator.getDefault().getPreferenceStore();\n\t\tString name = prefs.getString(GHIDRA_SYMBOL_LOOKUP_PROJECT_NAME);\n\t\tif (name.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn name;\n\t}",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"feature/design-new-api\", value = \"The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).\")\n public String getBranch() {\n return branch;\n }",
"private String getProjectName(String configFilePath) {\r\n\t\t// get the project name i.e the first directory name relative to the projects root\r\n\t\tFile projectsRoot = new File(RuntimeVariables.getProjectsRoot());\r\n\t\tString relativePath = configFilePath.substring(projectsRoot.getAbsolutePath().length());\r\n\t\treturn new StringTokenizer(relativePath, File.separator).nextToken();\t\t\r\n\t}",
"public String getProjectTitle()\r\n {\r\n return (m_projectTitle);\r\n }",
"private String getBranchForRevision(SVNLogEntry logEntry) {\n @SuppressWarnings(\"unchecked\")\n Set<String> paths = logEntry.getChangedPaths().keySet();\n // Finds the common path among all those paths\n String commonPath = null;\n for (String path : paths) {\n if (commonPath == null) {\n commonPath = path;\n } else {\n int diff = StringUtils.indexOfDifference(commonPath, path);\n commonPath = StringUtils.left(commonPath, diff);\n }\n }\n // Gets the branch for this path\n if (commonPath != null) {\n return extractBranch(commonPath);\n } else {\n // No path in the revision: no branch!\n return null;\n }\n }",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public String getBranchCodeFk() {\r\n return (String) getAttributeInternal(BRANCHCODEFK);\r\n }",
"public GitBranch getRemoteBranch()\n {\n if(getName().contains(\"/remotes/\")) return null;\n return getRemote().getBranch(getSimpleName());\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public String getUpdateBranch() {\n return updateBranch;\n }",
"public String getProjectName(TimeRecord timeRecord) throws IOException, SQLException, ClassNotFoundException {\n String projectName = null;\n ProjectDAO projectDAO = new ProjectDAO();\n try {\n Project project = projectDAO.getProject(timeRecord.getProjectId());\n if (project != null) {\n projectName = project.getProjectName();\n }\n } catch (IOException | SQLException | ClassNotFoundException e) {\n throw e;\n }\n return projectName;\n }",
"private void selectBranch () {\n \n TagsNode node = (TagsNode)tagsTree.getLastSelectedPathComponent();\n \n if (node == null) {\n // nothing selected\n }\n else\n if (node == position.getTagsNode()) {\n // If we're already positioned on the selected node, then no\n // need to do anything else (especially since it might set off\n // an endless loop).\n }\n else\n if (node.getNodeType() == TagsNode.ITEM) {\n // System.out.println (\"selectBranch selected item = \" + node.toString());\n boolean modOK = modIfChanged();\n if (modOK) {\n ClubEvent branch = (ClubEvent)node.getTaggable();\n int branchIndex = clubEventList.findByUniqueKey (branch);\n if (branchIndex >= 0) {\n position = clubEventList.positionUsingListIndex (branchIndex);\n position.setTagsNode (node);\n positionAndDisplay();\n } else {\n System.out.println (\"ClubPlanner.selectBranch\");\n System.out.println \n (\"-- Selected a branch from the tree that couldn't be found in the list\");\n System.out.println (\"-- node = \" + node.toString());\n System.out.println (\"-- event = \" + branch.getWhat());\n System.out.println (\"-- branch index = \" + String.valueOf(branchIndex));\n }\n }\n }\n else {\n // Do nothing until an item is selected\n // System.out.println (\"selectBranch selected node = \" + node.toString());\n }\n }",
"Set<String> getBranchNames(TRepo repo);",
"public String getBankBranchID() {\n return bankBranchID;\n }",
"public void setBranchName(final String branch) {\n branchName = branch;\n }",
"public java.lang.String getRndProjectName() {\n return rndProjectName;\n }",
"public static String getAWEprojectNameFromResource(IProject rubyProject) {\r\n \t\tString name = null;\r\n \t\ttry {\r\n \t\t\tname = rubyProject.getPersistentProperty(AWE_PROJECT_NAME);\r\n \t\t}\r\n \t\tcatch (CoreException e) {\r\n \t\t\t\r\n \t\t}\r\n \t\treturn name;\r\n \t}",
"public void setBranchName(String branchName) {\r\n this.branchName = branchName;\r\n }",
"public String getBankBranchID() {\n return bankBranchID;\n }"
] | [
"0.83120024",
"0.81681484",
"0.7825225",
"0.7571812",
"0.7534545",
"0.75179017",
"0.7447644",
"0.73280054",
"0.7234993",
"0.71140426",
"0.7013341",
"0.70043033",
"0.6986058",
"0.6975251",
"0.69367045",
"0.6877475",
"0.67086655",
"0.6689625",
"0.663296",
"0.65878654",
"0.65878654",
"0.65607584",
"0.653531",
"0.6508795",
"0.650759",
"0.6467472",
"0.6448756",
"0.6446154",
"0.64377993",
"0.6433808",
"0.6421844",
"0.6378088",
"0.6365087",
"0.63523734",
"0.6349635",
"0.6258199",
"0.624871",
"0.6240557",
"0.6198417",
"0.61955863",
"0.6181656",
"0.6181656",
"0.6168319",
"0.6082621",
"0.6080636",
"0.60546094",
"0.6047429",
"0.604174",
"0.6034899",
"0.6034899",
"0.6027883",
"0.6021966",
"0.6000427",
"0.5998997",
"0.5963277",
"0.59471077",
"0.5934432",
"0.59327585",
"0.5931346",
"0.5875706",
"0.58538467",
"0.5852964",
"0.5852327",
"0.58321863",
"0.58281195",
"0.58247215",
"0.5821247",
"0.5787279",
"0.57801414",
"0.5767992",
"0.5750695",
"0.57295996",
"0.57236457",
"0.5714999",
"0.57115114",
"0.56906015",
"0.5661404",
"0.5660722",
"0.5641953",
"0.5620506",
"0.5610377",
"0.5603175",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5557311",
"0.5555614",
"0.55544305",
"0.55474496",
"0.55245376",
"0.5515647",
"0.549468",
"0.5494263",
"0.5492323",
"0.54851913",
"0.54807043"
] | 0.91856605 | 0 |
Pushed selected projects to upstream | Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"public void addAllCommitPush(String message) throws IOException, GitAPIException {\n gitProjectUuidStore.pull().setTransportConfigCallback(transportConfigCallback).call();\n gitProjectZoneController.pull().setTransportConfigCallback(transportConfigCallback).call();\n //TODO: Add Missing Repos\n\n System.out.println(\"git add all files \");\n gitProjectUuidStore.add().addFilepattern(\".\").call();\n //Only commit and push in RELEASE MODE\n if(Play.current().isProd()) {\n CommitCommand commit = gitProjectUuidStore.commit();\n commit.setMessage(message).call();\n gitProjectUuidStore.push().setTransportConfigCallback(transportConfigCallback).call();\n }\n }",
"private void psPushAssetsToPhone() {\n if (DEBUG) {\n System.out.println(\"Pushing assets to phone...\");\n }\n for (ConcurrentMap.Entry<String, String> entry : downloadedProjectAssets.entrySet()) {\n String assetPath = entry.getKey();\n String localAssetPath = entry.getValue();\n final String assetName = assetNameFromAssetPath(assetPath);\n psPushAssetToPhone(assetName, localAssetPath, true /*ignore connect status*/);\n }\n if (DEBUG) {\n System.out.println(\"...finished pushing assets to phone.\");\n }\n }",
"Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);",
"public void doFullPush( File siteDir ) throws IOException{\n clearDirectories();\n makeRemoteDir( root );\n publish( siteDir, false, null );\n }",
"private void update() {\n\n\t\tthis.projects.clear();\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Infrastructure) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Social) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\t}",
"@Issue(\"JENKINS-18804\")\n @Test\n public void testUpstreamWasRemoved() throws Exception {\n {\n FreeStyleProject upstream = j.createFreeStyleProject();\n FreeStyleProject downstream = j.createFreeStyleProject();\n \n upstream.getBuildersList().add(new FileWriteBuilder(\n \"artifact.txt\",\n \"foobar\"\n ));\n upstream.getPublishersList().add(new ArtifactArchiver(\n \"**/*\",\n \"\",\n false,\n false\n ));\n upstream.getPublishersList().add(new BuildTrigger(\n downstream.getFullName(),\n false\n ));\n \n downstream.getBuildersList().add(new RemoveUpstreamBuilder());\n downstream.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n upstream.getFullName(),\n \"\",\n new TriggeredBuildSelector(false, TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, false),\n \"**/*\",\n \"\",\n \"\",\n false,\n true, // This results build succeed even if the upstream build has been removed.\n false\n ));\n \n j.jenkins.rebuildDependencyGraph();\n \n upstream.scheduleBuild2(0);\n j.waitUntilNoActivity();\n \n assertNull(upstream.getLastBuild());\n j.assertBuildStatusSuccess(downstream.getLastBuild());\n }\n \n // upstream -> intermediate -> downstream\n // Remove the build of upstream.\n {\n FreeStyleProject upstream = j.createFreeStyleProject();\n FreeStyleProject intermediate = j.createFreeStyleProject();\n FreeStyleProject downstream = j.createFreeStyleProject();\n \n upstream.getBuildersList().add(new FileWriteBuilder(\n \"artifact.txt\",\n \"foobar\"\n ));\n upstream.getPublishersList().add(new ArtifactArchiver(\n \"**/*\",\n \"\",\n false,\n false\n ));\n upstream.getPublishersList().add(new BuildTrigger(\n intermediate.getFullName(),\n false\n ));\n \n intermediate.getBuildersList().add(new RemoveUpstreamBuilder());\n intermediate.getPublishersList().add(new BuildTrigger(\n downstream.getFullName(),\n false\n ));\n \n downstream.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n upstream.getFullName(),\n \"\",\n new TriggeredBuildSelector(false, TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, false),\n \"**/*\",\n \"\",\n \"\",\n false,\n true, // This results build succeed even if the upstream build has been removed.\n false\n ));\n \n j.jenkins.rebuildDependencyGraph();\n \n upstream.scheduleBuild2(0);\n j.waitUntilNoActivity();\n \n assertNull(upstream.getLastBuild());\n j.assertBuildStatusSuccess(intermediate.getLastBuild());\n j.assertBuildStatusSuccess(downstream.getLastBuild());\n }\n \n // upstream -> intermediate -> downstream\n // Remove the build of intermediate.\n {\n FreeStyleProject upstream = j.createFreeStyleProject();\n FreeStyleProject intermediate = j.createFreeStyleProject();\n FreeStyleProject downstream = j.createFreeStyleProject();\n \n upstream.getBuildersList().add(new FileWriteBuilder(\n \"artifact.txt\",\n \"foobar\"\n ));\n upstream.getPublishersList().add(new ArtifactArchiver(\n \"**/*\",\n \"\",\n false,\n false\n ));\n upstream.getPublishersList().add(new BuildTrigger(\n intermediate.getFullName(),\n false\n ));\n \n intermediate.getPublishersList().add(new BuildTrigger(\n downstream.getFullName(),\n false\n ));\n \n downstream.getBuildersList().add(new RemoveUpstreamBuilder());\n downstream.getBuildersList().add(CopyArtifactUtil.createCopyArtifact(\n upstream.getFullName(),\n \"\",\n new TriggeredBuildSelector(false, TriggeredBuildSelector.UpstreamFilterStrategy.UseGlobalSetting, false),\n \"**/*\",\n \"\",\n \"\",\n false,\n true, // This results build succeed even if the upstream build has been removed.\n false\n ));\n \n j.jenkins.rebuildDependencyGraph();\n \n upstream.scheduleBuild2(0);\n j.waitUntilNoActivity();\n \n j.assertBuildStatusSuccess(upstream.getLastBuild());\n assertNull(intermediate.getLastBuild());\n j.assertBuildStatusSuccess(downstream.getLastBuild());\n }\n }",
"public static IStatus syncUpload(IProject project) {\n\n IStatus ret = isUploadableProject(project);\n if (!ret.isOK()) {\n return ret;\n }\n SloeberProject sProject = SloeberProject.getSloeberProject(project);\n return sProject.upload();\n }",
"public void addFromProject() {\n btAddFromProject().push();\n }",
"@Override\n\tpublic void reportUp(MultipartFile file) {\n\t\tProjectRrepUP projectRrepUp = new ProjectRrepUP();\n\t\tList<Project> lists = projectRrepUp.check(file);\n\t\tif (lists != null) {\n\t\t\tfor (Project project : lists) {\n\t\t\t\tprojRrep.save(project);\n\t\t\t}\n\t\t}\n\n\t}",
"public void addForkedProject( MavenProject project )\n {\n forkedProjectStack.push( currentProject );\n currentProject = project;\n }",
"public void setFollowedProjects(ArrayList<Project> followedProjects) { this.followedProjects = followedProjects; }",
"public static void saveProjects(Vendor vendor, HttpServletRequest request)\n throws EnvoyServletException\n {\n String toField = (String) request.getParameter(\"toField\");\n ArrayList projects = new ArrayList();\n if (toField != null)\n {\n if (toField.equals(\"\"))\n {\n vendor.setProjects(null);\n }\n else\n {\n try\n {\n String[] projIds = toField.split(\",\");\n for (int i = 0; i < projIds.length; i++)\n {\n Project proj = ServerProxy.getProjectHandler()\n .getProjectById(Long.parseLong(projIds[i]));\n projects.add(proj);\n }\n vendor.setProjects(projects);\n }\n catch (Exception ge)\n {\n throw new EnvoyServletException(ge);\n }\n }\n }\n\n PermissionSet permSet = (PermissionSet) request.getSession(false)\n .getAttribute(WebAppConstants.PERMISSIONS);\n\n if (permSet.getPermissionFor(Permission.USERS_PROJECT_MEMBERSHIP) == true)\n {\n if (request.getParameter(\"allProjects\") != null)\n {\n vendor.isInAllProjects(true);\n }\n else\n {\n vendor.isInAllProjects(false);\n }\n }\n }",
"private void archiveProject(final Project project) {\n\t\t// TODO RemoveWorkerFromProject löschen\n\t\tfinal ArrayList<Task> tasks = getProjectTasks(project);\n\t\tif (!tasks.isEmpty()) {\n\t\t\tfinal TaskController taskController = mainController.getTaskController();\n\t\t\ttaskController.removeWorker(tasks.get(0));\n\t\t\tfor (final Task task : tasks) {\n\t\t\t\tif (task.getCurrentWorker() != null) {\n\t\t\t\t\ttaskController.removeWorker(task);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinal ArrayList<Worker> team = project.getWorkers();\n\t\tif (!team.isEmpty()) {\n\t\t\tfinal TeamController teamController = mainController.getTeamController();\n\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\twhile (!team.isEmpty()) {\n\t\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\t}\n\t\t}\n\t\tproject.setActive(false);\n\t}",
"@PostMapping(\"/assign-to-students\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic @ResponseBody String assignProjectsToStudents(@RequestBody ArrayList<Project> projects) {\n\t\tfor (Project project : projects) {\n\t\t\tif (project.getProjectId() > 0) {\n\t\t\t\tfor (Student student : project.getMembers()) {\n\t\t\t\t\t// Set the given project for each student\n\t\t\t\t\tStudent saveStudent = userService.findByUserId(student.getUserId());\n\t\t\t\t\tsaveStudent.setProject(project);\n\t\t\t\t\tuserService.saveUser(saveStudent);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tprojectService.saveAssignment(projects);\n\t\treturn Constants.SUCCESS;\n\t}",
"public UploadProjectAction() {\n\t\tsuper();\n\t}",
"public void setProjects(ProjectsList projects) {\n this.projects = projects.clone();\n }",
"void push(RemoteConfig repository, String revspec) throws GitException, InterruptedException;",
"public void assignAndStartInitialProjects() {\n\t\tfor(Player p:players) {\n\t\t\tSubproject sp=drawProject();\n\t\t\tSubprojectField result=sp.setChip(p.removeChip());\n\t\t\tp.raiseScore(result.getAmountSZT());\n\t\t}\n\t}",
"public void createProject(Project newProject);",
"private void configureUploadTasks(Project project) {\n project.getTasks().withType(Upload.class).all(new Action<Upload>() {\n @Override\n public void execute(Upload upload) {\n upload.getRepositories().withType(MavenResolver.class).all(new Action<MavenResolver>() {\n @Override\n public void execute(MavenResolver resolver) {\n resolver.getPom().withXml(new PomTransformer(configurationStore));\n }\n });\n }\n });\n }",
"@Override\n public void onChanged(@Nullable final List<Project> projects) {\n adapter.setmProjects(projects);\n }",
"@Override\n public Set<Project> applyChanges( final List<Project> projects )\n throws ManipulationException\n {\n final GroovyState state = session.getState( GroovyState.class );\n if ( !session.isEnabled() || !state.isEnabled() )\n {\n logger.debug( getClass().getSimpleName() + \": Nothing to do!\" );\n return Collections.emptySet();\n }\n\n final Set<Project> changed = new HashSet<>();\n\n for ( File groovyScript : parseGroovyScripts( state.getGroovyScripts() ))\n {\n GroovyShell shell = new GroovyShell( );\n Script script;\n\n for ( final Project project : projects )\n {\n if ( project.isExecutionRoot() )\n {\n logger.info (\"Executing {} on {}\", groovyScript, project);\n\n try\n {\n script = shell.parse( groovyScript );\n\n if ( script instanceof BaseScript )\n {\n ((BaseScript)script).setValues(session.getUserProperties(), projects, project);\n }\n else\n {\n throw new ManipulationException( \"Cannot cast \" + groovyScript + \" to a BaseScript to set values.\" );\n }\n }\n catch (MissingMethodException e)\n {\n try\n {\n logger.debug ( \"Failure when injecting into script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to inject values into base script\", e );\n }\n catch (CompilationFailedException e)\n {\n try\n {\n logger.debug ( \"Failure when parsing script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n catch ( IOException e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n try\n {\n script.run();\n }\n catch ( Exception e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n\n changed.add( project );\n }\n }\n }\n return changed;\n }",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public void openUpProject(Subproject project) {\n\t\tSubprojectField field=project.setChip(current.removeChip());\n\t\tcurrent.raiseScore(field.getAmountSZT());\n\t}",
"@Override\n public void apply(Project project) {\n if (!project.getPlugins().hasPlugin(\"li-pegasus2\")) {\n project.getPlugins().apply(PegasusPlugin.class);\n }\n\n // Mimic the pegasus plugin behavior. It crawls through source sets.\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n\n javaPluginConvention.getSourceSets().all(sourceSet -> {\n setupTasks(project, sourceSet);\n });\n }",
"public void setProjectList(List<OtmProject> projectList) {\n this.projects = projectList;\n }",
"public void pushParent(IPSComponent pushParent);",
"private void initialDeploy() {\n }",
"@Override\n\tpublic synchronized void upload(final List<Uploadable> sources,\n\t\tfinal List<String> locks) throws IOException\n\t{\n\n\t\tsetCommand(\"date -u +%Y%m%d%H%M%S\");\n\t\ttimestamp = readNumber(in);\n\t\tsetTitle(\"Uploading\");\n\n\t\tfinal String uploadFilesCommand = \"scp -p -t -r \" + uploadDir;\n\t\tsetCommand(uploadFilesCommand);\n\t\tif (checkAck(in) != 0) {\n\t\t\tthrow new IOException(\"Failed to set command \" + uploadFilesCommand);\n\t\t}\n\n\t\ttry {\n\t\t\tuploadFiles(sources);\n\t\t}\n\t\tcatch (final UpdateCanceledException cancel) {\n\t\t\tfor (final String lock : locks)\n\t\t\t\tsetCommand(\"rm \" + uploadDir + lock + \".lock\");\n\t\t\tout.close();\n\t\t\tchannel.disconnect();\n\t\t\tthrow cancel;\n\t\t}\n\n\t\t// Unlock process\n\t\tfor (final String lock : locks)\n\t\t\tsetCommand(\"mv -f \" + uploadDir + lock + \".lock \" + uploadDir + lock);\n\n\t\tout.close();\n\t\tdisconnectSession();\n\t}",
"@Override\n\tpublic void createProjects(Projects proj) {\n\t\tString sql = \"INSERT INTO projects VALUES (?,?,?,?,?,?,now(),now(),?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getProj_name(),\n\t\t\t\tproj.getProj_desc(),\n\t\t\t\tproj.getFile_id(),\n\t\t\t\tproj.getCus_id(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_currency()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id=\"+proj.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\tString file_name = \"\";\n\t\tif(proj.getFile_id() != 0){\n\t\t\tFileModel myFile = new FileModel();\n\t\t\tmyFile = getJdbcTemplate().queryForObject(\"select * from file where file_id=\"+proj.getFile_id(), new BeanPropertyRowMapper<FileModel>(FileModel.class));\n\t\t\tfile_name = myFile.getFile_name();\n\t\t}\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_id(),\n\t\t\t\t\"Projects\",\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created row on Projects name=\"+proj.getProj_name()+\", desc=\"+proj.getProj_desc()+\", file_name=\"+file_name\n\t\t\t\t+\", customer=\"+cus.getCus_code()+\", proj_currency=\"+proj.getProj_currency(),\n\t\t\t\tproj.getProj_name()\n\t\t});\n\t}",
"@Override\n\tpublic void apply(Project project) {\n\t\tapplyToProject(project);\n\t}",
"public void changeCurrProject(ProjectModel p) {\n \tprojects.remove(p);\n \tprojects.add(0, p);\n }",
"private Mono<String> pushApplication(String applicationId, boolean doPublish) {\n\n return publishAndOrGetApplication(applicationId, doPublish)\n .flatMap(application -> {\n if (applicationId.equals(application.getGitApplicationMetadata().getDefaultApplicationId())) {\n return Mono.just(application);\n }\n return applicationService.findById(application.getGitApplicationMetadata().getDefaultApplicationId())\n .map(defaultApp -> {\n application.getGitApplicationMetadata().setGitAuth(defaultApp.getGitApplicationMetadata().getGitAuth());\n return application;\n });\n })\n .flatMap(application -> {\n GitApplicationMetadata gitData = application.getGitApplicationMetadata();\n\n if (gitData == null\n || StringUtils.isEmptyOrNull(gitData.getBranchName())\n || StringUtils.isEmptyOrNull(gitData.getDefaultApplicationId())\n || StringUtils.isEmptyOrNull(gitData.getGitAuth().getPrivateKey())) {\n\n return Mono.error(new AppsmithException(\n AppsmithError.INVALID_GIT_CONFIGURATION, \"Please reconfigure the application to connect to git repo\"\n ));\n }\n Path baseRepoSuffix =\n Paths.get(application.getOrganizationId(), gitData.getDefaultApplicationId(), gitData.getRepoName());\n\n GitAuth gitAuth = gitData.getGitAuth();\n return gitExecutor.checkoutToBranch(baseRepoSuffix, application.getGitApplicationMetadata().getBranchName())\n .then(gitExecutor.pushApplication(\n baseRepoSuffix,\n gitData.getRemoteUrl(),\n gitAuth.getPublicKey(),\n gitAuth.getPrivateKey(),\n gitData.getBranchName()))\n .onErrorResume(error -> {\n if(error instanceof TransportException) {\n return Mono.error( new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"push\", \" Please give the write access to the Deploy Key\"));\n }\n return Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"push\", error.getMessage()));\n });\n })\n .flatMap(pushResult -> {\n if(pushResult.contains(\"REJECTED\")) {\n return Mono.error( new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \" push\", \" Remote has changes. Please pull them before pushing to remote branch.\"));\n }\n return Mono.just(pushResult);\n });\n }",
"public void push(String name);",
"void subprojects(Action<? super ProjectPluginDependenciesSpec> configuration);",
"void addToMyProjects(String userId,\n String projectGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"@Override\n public void apply(Project project) {\n this.project = project;\n setupEnvironment();\n createTasks();\n setupInstallationTasks();\n }",
"public void setProjects(ArrayList<View> views) {\n projects.clear();\n projects.addAll(views);\n }",
"public void copyProjectsAction(){\n\t\t\tAsyncCallback<BmUpdateResult> callback = new AsyncCallback<BmUpdateResult>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tstopLoading();\n\t\t\t\t\tif (caught instanceof StatusCodeException && ((StatusCodeException) caught).getStatusCode() == 0) {\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-copyProject() ERROR: \" + caught.toString());\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(BmUpdateResult result) {\n\t\t\t\t\tif(!result.hasErrors()) {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tdialogClose();\n\t\t\t\t\t\tBmoProject bmoProject = (BmoProject) result.getBmObject();\n\t\t\t\t\t\tUiProjectDetail uiProjectDetail = new UiProjectDetail(getUiParams(),\n\t\t\t\t\t\t\t\tbmoProject.getId());\n\t\t\t\t\t\tuiProjectDetail.show();\n\n\t\t\t\t\t\tgetUiParams().getUiTemplate().hideEastPanel();\n\t\t\t\t\t\tUiProject uiProject = new UiProject(getUiParams());\n\t\t\t\t\t\tuiProject.edit(bmoProject);\n\t\t\t\t\t\tshowSystemMessage(\"Copia Exitosa.\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tcopyProjectDialog();\n\t\t\t\t\t\tshowSystemMessage(result.getBmErrorList().get(0).getMsg());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Llamada al servicio RPC\n\t\t\ttry {\n\t\t\t\tif (!isLoading()) {\n\t\t\t\t\tstartLoading();\n\t\t\t\t\tif(copyProjectSuggestBox.getSelectedId() > 0) {\n\t\t\t\t\t\tbmoProject.setId(copyProjectSuggestBox.getSelectedId());\n\t\t\t\t\t\tgetUiParams().getBmObjectServiceAsync().action(bmoProject.getPmClass(), bmoProject, BmoProject.ACCESS_COPYPROJECT, \"\" + customerSuggestBox.getSelectedId(), callback);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstopLoading();\n\t\t\t\t\t\tshowErrorMessage(this.getClass().getName() + \" ERROR: \" + \"Debe seleccionar Projecto\");\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (SFException e) {\n\t\t\t\tstopLoading();\t\t\t\t\n\t\t\t\tshowErrorMessage(this.getClass().getName() + \"-action() ERROR: \" + e.toString());\n\t\t\t}\n\t\t}",
"@Test\n public void insertAndGetProjects() throws InterruptedException {\n insertProjects();\n\n setProjectIds(); //We set id after insertion in database not to interfere with autogenerate\n\n List<Project> expectedProjects = Arrays.asList( //We prepare id sorted expected list\n PROJECT_MAGICGITHUB,\n PROJECT_ENTREVOISINS,\n PROJECT_MAREU\n );\n\n //When : we get the list of projects\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n\n //Then : the retrieved list contains the three projects sorted by id (insertion order)\n assertArrayEquals(expectedProjects.toArray(), actualProjects.toArray());\n }",
"void allprojects(Action<? super ProjectPluginDependenciesSpec> configuration);",
"@Override\n public void put(Collection<? extends ArtifactUpload> artifactUploads, Collection<? extends MetadataUpload> metadataUploads)\n {\n defaultRepositoryConnector.put(artifactUploads, metadataUploads);\n }",
"public void UpdatePushIndex() {\n\t\tsetorgetState(true,false);\n\t}",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"@Override\n public void execute() {\n pickUp.collect();\n \n }",
"@Override\n\tpublic void pushWaybillToCUBC(List<WaybillLogEntity> cubcLogEntitys) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tfullProjectUpdate(\"218.90.120.43\", 22, \"pro\",\"18962211182!189.cn\", \"/usr/local\",\"nicemq_node\");\n\t}",
"public static void push()\n\t{\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"It is a push\");\n\t}",
"void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }",
"static void perform_push(String passed){\n\t\tint type = type_of_push(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tpush_to_stack(passed);\n\t\t\tbreak;\n\t\t}\n\t}",
"int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;",
"private void copyAndSave()\n {\n // create new branch\n if (NEW_BRANCH.equals(selectedBranch)) {\n createAndSetNewBranch();\n }\n List<String> updatePages = getAllPageIdsForUpdate();\n\n // copy current filestats entry to source target branch\n copyAndSaveFileStats(branch, selectedBranch, updatePages);\n\n // add new page information to filestats of new branch\n updateFileStats(FileState.valueOf(newPageState), selectedAssignee, selectedBranch, updatePages);\n\n // save page(s) in new branch\n wikiContext.runInTenantContext(selectedBranch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().saveElement(wikiContext, pageToUpdate, true);\n }\n return null;\n }\n });\n\n // remove page(s) in old branch\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().removeWikiPage(wikiContext, pageToUpdate);\n }\n return null;\n }\n });\n }",
"public void setProjects(List<Project> newProjects)\r\n {\r\n synchronized (lock)\r\n {\r\n if (originalProjects != null)\r\n {\r\n originalProjects.clear();\r\n originalProjects.addAll(newProjects);\r\n }\r\n else\r\n {\r\n projects.clear();\r\n projects.addAll(newProjects);\r\n }\r\n }\r\n notifyDataSetChanged();\r\n }",
"void push() {\n\t\t// push logic here\n\t\t_pushes++;\n\t\t_money += _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"private void setupProjectIncompleteDripFlow() {\n List<DProjects> projects = AppConfig.getInstance().getdProjectsDAO().findAllInternal();\n if (projects == null || projects.isEmpty()) return;\n\n // 5 days old project created\n Date recentEnoughProjectAccessed = new Date(lastRunDate.getTime() - 5*ONE_DAY_MILISEC);\n\n //3 days old login.\n Date recentEnoughLoginTime = new Date(lastRunDate.getTime() - 3*ONE_DAY_MILISEC);\n\n // one notification per user is enough.\n Map<DUsers, DProjects> userProjectMap = new HashMap<>();\n // find projects which are not complete.\n for (DProjects project : projects) {\n\n // ignore old projects (accessed older than 5 days), they may be already in the flow.\n if (lastAccessTime(project).before(recentEnoughProjectAccessed)) {\n continue;\n }\n\n ProjectDetails details = Controlcenter.getProjectSummary(project);\n long totalDone = details.getTotalHitsDone() + details.getTotalHitsSkipped();\n // if > 70% done, then ignore.\n if (details.getTotalHits() == 0 || (totalDone/(double)details.getTotalHits()) < .70) {\n // Find all the project users.\n List<DProjectUsers> projectUsers = AppConfig.getInstance().getdProjectUsersDAO().findAllByProjectIdInternal(project.getId());\n if (projectUsers == null || projectUsers.isEmpty()) break;\n\n for (DProjectUsers projectUser : projectUsers) {\n //not sending to contributors as we add everyone to default projects,\n // would be sad to send them mail asking them to finish Default projects.\n if (projectUser.getRole() == DTypes.Project_User_Role.OWNER) {\n DUsers user = AppConfig.getInstance().getdUsersDAO().findByIdInternal(projectUser.getUserId());\n //if the user has not logged in anytime soon.\n if (user != null && user.getUpdated_timestamp().before(recentEnoughLoginTime)) {\n userProjectMap.put(user, project);\n }\n }\n }\n }\n }\n LOG.info(\"setupProjectIncompleteDripFlow userProjectMap = \" + userProjectMap.size());\n DripFlows.addToProjectIncompleteFlow(userProjectMap);\n\n }",
"@Override\n\tpublic int updateProject(Project project) {\n\t\treturn pm.updateProject(project);\n\t}",
"void update(IBranchSpec branch) throws P4JavaException;",
"Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);",
"private static void addToProjectStructure(IProject newProject, String[] paths) throws CoreException {\n for (String path : paths) {\n IFolder etcFolders = newProject.getFolder(path);\n createFolder(etcFolders);\n }\n }",
"@Override\n public void setUpstreamRepository(ConfigRepository upstreamConfigRepository) {\n }",
"private void updateProjectList() {\n\t\tfinal MultipleSelectionModel<Project> selectionModel = selectionList.getSelectionModel();\n\t\tfinal Object[] selectedIndices = selectionModel.getSelectedIndices().toArray();\n\t\tselectionModel.clearSelection();\n\t\tfor (final Object i : selectedIndices) {\n\t\t\tselectionModel.select((int) i);\n\t\t}\n\t}",
"@Override\n\tpublic Integer addProject(ProjectInfo project) {\n\t\treturn sqlSession.insert(\"cn.sep.samp2.project.addProject\", project);\n\t}",
"@Override\n\tpublic void createProjectsReference(ProjectsReference proj) {\n\t\tString sql = \"INSERT INTO projects_reference VALUES (?,?,?,?,?,?,now(),now(),?,?,?,?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_ref_id(),\n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getItm_id(),\n\t\t\t\tproj.getTime(),\n\t\t\t\tproj.getPrice(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_ref_desc(),\n\t\t\t\tproj.getActual_time(),\n\t\t\t\tproj.getTopix_article_id(),\n\t\t\t\tproj.getActivated()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tProjects proj2 = new Projects();\n\t\tproj2 = getJdbcTemplate().queryForObject(\"select * from projects where proj_id=\"+proj.getProj_id(), new BeanPropertyRowMapper<Projects>(Projects.class));\n\t\tItem itm = new Item();\n\t\titm = getJdbcTemplate().queryForObject(\"select * from item where itm_id=\"+proj.getItm_id(), new BeanPropertyRowMapper<Item>(Item.class));\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id =\"+proj2.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_ref_id(),\n\t\t\t\t\"Projects Reference:\"+proj2.getProj_id(),\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created Item name=\"+itm.getItm_name()+\" on Project name=\"+proj2.getProj_name()+\", customer=\"+cus.getCus_name()\n\t\t\t\t+\", target_time=\"+proj.getTime()+\", actual_time=\"+proj.getActual_time()+\", price=\"+proj.getPrice()+\", desc=\"+proj.getProj_ref_desc()\n\t\t\t\t+\", topix_article_id=\"+proj.getTopix_article_id()+\", activated=\"+((proj.getActivated() == 0) ? \"No\" : \"Yes\"),\n\t\t\t\tproj2.getProj_name()+\" : \"+itm.getItm_name()\n\t\t});\n\t}",
"@Override\r\n protected void doCreate(boolean update) throws IOException, ServletException, Descriptor.FormException, InvalidProjectFileException {\r\n // Read the manage project file\r\n FileItem fileItem = getRequest().getFileItem(\"manageProject\");\r\n if (fileItem == null) {\r\n return;\r\n }\r\n\r\n manageFile = fileItem.getString();\r\n manageProject = new ManageProject(manageFile);\r\n manageProject.parse();\r\n\r\n getTopProject().setDescription(\"Top-level multi job to run the manage project: \" + getManageProjectName());\r\n String tmpLabel = getNodeLabel();\r\n if (tmpLabel == null || tmpLabel.isEmpty()) {\r\n tmpLabel = \"master\";\r\n }\r\n Label label = new LabelAtom(tmpLabel);\r\n getTopProject().setAssignedLabel(label);\r\n \r\n // Build actions...\r\n addSetup(getTopProject());\r\n // Add multi-job phases\r\n // Building...\r\n List<PhaseJobsConfig> phaseJobs = new ArrayList<>();\r\n \r\n projectsAdded = new ArrayList<>();\r\n projectsNeeded = new ArrayList<>();\r\n projectsExisting = new ArrayList<>();\r\n \r\n projectsAdded.add(getTopProject().getFullName());\n \r\n String baseName = getBaseName();\r\n if (getJobName() != null && !getJobName().isEmpty()) {\r\n baseName = getJobName();\r\n }\r\n\n String folderName = getTopProject().getParent().getFullName();\n if (folderName != null && !folderName.isEmpty()) {\n folderName = folderName + \"/\";\n }\n\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = folderName + baseName + \"_\" + detail.getProjectName();\n projectsNeeded.add(name);\r\n PhaseJobsConfig phase = new PhaseJobsConfig(name, \r\n /*jobproperties*/\"\", \r\n /*currParams*/true, \r\n /*configs*/null, \r\n PhaseJobsConfig.KillPhaseOnJobResultCondition.NEVER, \r\n /*disablejob*/false, \r\n /*enableretrystrategy*/false, \r\n /*parsingrulespath*/null, \r\n /*retries*/0, \r\n /*enablecondition*/false, \r\n /*abort*/false, \r\n /*condition*/\"\", \r\n /*buildonly if scm changes*/false,\r\n /*applycond if no scm changes*/false);\r\n phaseJobs.add(phase);\r\n }\r\n MultiJobBuilder multiJobBuilder = new MultiJobBuilder(\"Build, Execute and Report\", phaseJobs, MultiJobBuilder.ContinuationCondition.COMPLETED);\r\n getTopProject().getBuildersList().add(multiJobBuilder);\r\n\r\n // Copy artifacts per building project\r\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = folderName + baseName + \"_\" + detail.getProjectName();\n String tarFile = \"\";\r\n if (isUsingSCM()) {\r\n tarFile = \", \" + getBaseName() + \"_\" + detail.getProjectName() + \"_build.tar\";\r\n }\r\n CopyArtifact copyArtifact = new CopyArtifact(name);\r\n copyArtifact.setOptional(true);\r\n copyArtifact.setFilter(\"**/*_rebuild*,\" +\r\n \"execution/*.html, \" +\r\n \"management/*.html, \" +\r\n \"xml_data/**\" +\r\n tarFile);\r\n copyArtifact.setFingerprintArtifacts(false);\r\n BuildSelector bs = new WorkspaceSelector();\r\n copyArtifact.setSelector(bs);\r\n getTopProject().getBuildersList().add(copyArtifact);\r\n }\r\n addMultiJobBuildCommand();\r\n \r\n // Post-build actions if doing reporting\r\n if (getOptionUseReporting()) {\r\n addArchiveArtifacts(getTopProject());\r\n addXunit(getTopProject());\r\n addVCCoverage(getTopProject());\r\n addGroovyScriptMultiJob();\r\n }\r\n \r\n getTopProject().save();\r\n \r\n for (MultiJobDetail detail : manageProject.getJobs()) {\r\n String name = baseName + \"_\" + detail.getProjectName();\n createProjectPair(name, detail, update);\r\n }\r\n }",
"@Override\n\tpublic void actionPerformed(final AnActionEvent e)\n\t{\n\t\tfinal Project project = e.getData(PlatformDataKeys.PROJECT);\n\t\tfinal VirtualFile file = e.getData(PlatformDataKeys.VIRTUAL_FILE);\n\n\t\tif(project == null || project.isDisposed())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tshareProjectOnGithub(project, file);\n\t}",
"@Override\n\tpublic void uppdate() {\n\t\t\n\t}",
"@Override\n\tpublic void uppdate() {\n\t\t\n\t}",
"public void push()\n {\n\tsetIndentLevel(indentLevel + 1);\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 }",
"@Override\n public void uploadMultipleFiles(ArrayList<File> files, Modpack modpack) {\n uploadStatus = \"Uploading file(s) to server!\";\n modpackUploadRepository.uploadMultipleFiles(files, modpack);\n }",
"public void populate(IProject project) throws InvocationTargetException;",
"void percolateUp(int index) {\n Comparable x = pq[index];\n while (index > 0 && (compare(pq[parent(index)], x) == 1)) {\n pq[index] = pq[parent(index)];\n index = parent(index);\n }\n pq[index] = x;\n }",
"void setProject(InternalActionContext ac, HibProject project);",
"public void turnInProject(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException,\n IllegalProjectStatusChangeException {\n Project project = getMandatoryProject(projectId);\n User currentUser = getMandatoryCurrentUser();\n if (project.getStatus() != Project.Status.FINISHED\n && project.getStatus() != Project.Status.TURNED_IN) {\n if (userIsAssignee(currentUser, project)) {\n project.setStatus(Project.Status.TURNED_IN);\n projectRepository.updateProject(project);\n } else {\n throw new UnauthorisedOperationException(\n currentUser.getId(), \"turn in project\", \"they \" + \"are not the assignee\");\n }\n } else {\n throw new IllegalProjectStatusChangeException(project.getStatus(), Project.Status.TURNED_IN);\n }\n support.firePropertyChange(\n ProjectChangeablePropertyName.SET_PROJECT_STATUS.toString(), OLD_VALUE, NEW_VALUE);\n }",
"public void querySubProjects() {\r\n\t\t// Create a task\r\n\t\tProject master = new Project();\r\n\t\tmaster.setName(\"INFRASTRUCTURE\");\r\n\t\tmaster.setDisplayName(\"Infrastructure\");\r\n\t\tmaster.setDescription(\"Project to setup the new infrastructure\");\r\n\t\tmaster = (Project) aggregateService.create(master, new Settings());\t\r\n\r\n\t\t// Create 2 dependents\r\n\t\tProject A = new Project();\r\n\t\tA.setName(\"SETUP_NETWORK\");\r\n\t\tA.setDisplayName(\"Setup network\");\r\n\t\tA.setDescription(\"Project to lay the network cables and connect to routers\");\r\n\t\tA = (Project) aggregateService.create(A, new Settings());\r\n\r\n\t\tProject B = new Project();\r\n\t\tB.setName(\"SETUP_TELEPHONE\");\r\n\t\tB.setDisplayName(\"Setup telephone\");\r\n\t\tB.setDescription(\"Setup the telephone at each employee desk\");\r\n\t\tB = (Project) aggregateService.create(B, new Settings());\r\n\r\n\t\tMap<String, Project> subProjects = new HashMap<String, Project>();\r\n\t\tsubProjects.put(A.getName(), A);\r\n\t\tsubProjects.put(B.getName(), B);\r\n\t\tmaster.setSubProjects(subProjects);\r\n\t\tmaster = (Project) aggregateService.read(master, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setView(aggregateService.getView(\"SUBPROJECTS\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(master, settings);\r\n\r\n\t\tassert(toList.size() == 1);\t\t\r\n\r\n\t\tObject obj = toList.get(0);\r\n\t\tassert(Project.class.isAssignableFrom(obj.getClass()));\r\n\r\n\t\tProject root = (Project) obj;\r\n\t\tassert(root.getSubProjects() != null && root.getSubProjects().size() == 2);\r\n\t\tassert(root.getSubProjects().get(\"SETUP_NETWORK\").getName().equals(\"SETUP_NETWORK\"));\r\n\t\tassert(root.getSubProjects().get(\"SETUP_TELEPHONE\").getName().equals(\"SETUP_TELEPHONE\"));\t\t\r\n\t}",
"@Override\r\n public void onSubmit() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n \r\n // check if any field is missing\r\n boolean hasAllFields = true;\r\n if (this.projectName == null) {\r\n hasAllFields = false;\r\n error(\"Project name is required.\");\r\n }\r\n if (this.ownerName == null) {\r\n hasAllFields = false;\r\n error(\"Owner name is required.\");\r\n }\r\n if (this.password == null) {\r\n hasAllFields = false;\r\n error(\"Password is required.\");\r\n }\r\n if (this.svnUrl == null) {\r\n hasAllFields = false;\r\n error(\"The repository URL is required.\");\r\n }\r\n \r\n if (hasAllFields) {\r\n try {\r\n // check if the owner is a valid hackystat user\r\n String host = app.getSensorBaseHost();\r\n SensorBaseClient client = new SensorBaseClient(host, this.ownerName, this.password);\r\n client.authenticate();\r\n }\r\n catch (SensorBaseClientException e) {\r\n error(\"Owner is not valid Hackystat user or password does not match.\");\r\n }\r\n \r\n try {\r\n // check if the svn url is a valid google host url\r\n WebConversation wc = new WebConversation();\r\n WebResponse response = wc.getResponse(this.svnUrl);\r\n if (!response.getTitle().contains(\"Revision\")) {\r\n error(\"The repository URL is not a valid Google host repository URL.\");\r\n }\r\n }\r\n catch (Exception e) {\r\n error(\"Cannot connect to the repository URL.\");\r\n }\r\n \r\n // if there is no error, create the project and go back to the home page\r\n if (!hasError() && createProject()) {\r\n // redirect to the projects page\r\n setResponsePage(ProjectsPage.class);\r\n }\r\n else {\r\n error(\"The project cannot be created. \" +\r\n \"A project with the same name already exists, or some information are invalid.\");\r\n }\r\n }\r\n \r\n }",
"List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);",
"private Set<Project> applyManipulations( final List<Project> projects )\n throws ManipulationException\n {\n final Set<Project> changed = new HashSet<>();\n for ( final Manipulator manipulator : orderedManipulators )\n {\n logger.info( \"Running manipulator {}\", manipulator.getClass().getName() );\n final Set<Project> mChanged = manipulator.applyChanges( projects );\n\n if ( mChanged != null )\n {\n changed.addAll( mChanged );\n }\n }\n\n if ( changed.isEmpty() )\n {\n logger.info( \"Maven-Manipulation-Extension: No changes.\" );\n }\n\n return changed;\n }",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"public void add2ChipsOnTheSameProject(Subproject project) {\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT());\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT());\n\t}",
"public void joinProject(Project project) {\n if (!this.hasScheme(project)) {\n project.addMember(new Member(this, project));\n }\n }",
"void deployGroup(String groupJson);",
"void submoduleSync() throws GitException, InterruptedException;",
"public interface GitService extends Service {\n\n /**\n * Checks that project has selected branches\n *\n * @param project project for checking\n * @param branches branches that need to be checked\n * @param isCommon if true - checking will occur for all selected branches, if false - for at least one of them.\n * @return true if project contains selected branches, false if does not contains\n */\n boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branch selected branch\n * @param progress the listener for obtaining data on the process of performing the operation\n *\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);\n\n /**\n * Checkouts projects to selected branch\n *\n * @param projects projects that need to be checked out\n * @param branchName name of the branch\n * @param isRemote <code>true</code> if the branch has {@link BranchType#REMOTE}\n * @param progress the listener for obtaining data on the process of performing the operation\n * @return map with projects and theirs checkout statuses\n */\n Map<Project, JGitStatus> checkoutBranch(List<Project> projects, String branchName, boolean isRemote, ProgressListener progress);\n\n /**\n * Gets projects that have uncommited changes\n *\n * @param projects projects that need to be checked\n * @return list of projects that has uncommited changes\n */\n List<Project> getProjectsWithChanges(List<Project> projects);\n\n /**\n * Reverts uncommited changes\n *\n * @param projects projects that need to be resets\n * @return list of projects that and their discard statuses\n */\n Map<Project, JGitStatus> revertChanges(List<Project> projects);\n\n /**\n * Commit changes to selectedProjects\n *\n * @param projects projects that contains changes\n * @param commitMessage message for commit\n * @param isPushImmediately if true - make push operation after commiting, if false - make commit without pushing\n * @param progressListener Listener for obtaining data on the process of performing the operation.\n */\n Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);\n\n /**\n * Creates new branch\n *\n * @param projects the projects that needs new branch\n * @param branchName new branch name\n * @param startPoint corresponds to the start-point option; if <code>null</code>, the current HEAD will be used\n * @param force if <code>true</code> and the branch with the given name\n * already exists, the start-point of an existing branch will be\n * set to a new start-point; if false, the existing branch will\n * not be changed\n * @return map with projects and theirs statuses of branch creating\n */\n Map<Project, JGitStatus> createBranch(List<Project> projects, String branchName, String startPoint, boolean force);\n\n /**\n * Returns the set of selected type of branches\n *\n * @param projects projects list\n * @param branchType selected {@link BranchType}\n * @param isOnlyCommon if <code>true</code> returns only common branches for all projects and otherwise if <code>false</code>\n * @return set of the branches or empty set if such type of branches does not exist for this projects\n */\n Set<Branch> getBranches(List<Project> projects, BranchType branchType, boolean isOnlyCommon);\n\n /**\n * Returns current branch name for selected project\n *\n * @param project - selected project\n * @return current branch name for selected project or <code>null</code> if project has no branches (unreachable state)\n */\n String getCurrentBranchName(Project project);\n\n /**\n * Pushed selected projects to upstream\n *\n * @param projects - list of projects\n * @param progressListener - listener for obtaining data on the process of performing the operation\n * @return map of operation statuses\n */\n Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);\n\n /**\n * Pulls changes in selected projects from upstream\n *\n * @param projects - selected projects\n * @param progressListener - instance of {@link OperationProgressListener}\n * @return <code>true</code> if pull operation works well and <code>false</code> otherwise\n */\n boolean pull(List<Project> projects, OperationProgressListener progressListener);\n\n /**\n * Checks that project has any references.\n *\n * @param project the cloned project\n * @return <code>true</code> if project has any references, <code>false</code> if project does not have references.\n */\n public boolean hasAtLeastOneReference(Project project);\n\n /**\n * Returns count of commits ahead and behind index\n *\n * @param project - project to show status\n * @param branchName - the name of branch\n * @return array of ahead and behind commits counts<br>\n * Array consists of two parameters:\n * first is the count of commits ahead Index, <br>\n * second is the count of commits behind Index\n */\n public int[] getAheadBehindIndexCounts(Project project, String branchName);\n\n /**\n * Checks whether the project has conflicts and uncommitted changes.\n *\n * @param project the project\n * @return array of values. Array consists of two parameters:\n * - has conflicts: <true> is has, otherwise <false>.\n * - has changes: <true> is has, otherwise <false>.\n */\n public boolean[] hasConflictsAndChanges(Project project);\n\n /**\n * Starts canceling process for cloning. This may take some time.\n */\n void cancelClone();\n\n /** This method return tracking branch.\n *\n * @param project\n * @return tracking branch.\n */\n public String getTrackingBranch(Project project);\n\n /**\n * This method return all commits for currently selected project\n *\n * @param project the project\n * @param branchName the branch\n * @return list of all commits for currently selected project\n */\n public List<Commit> getAllCommits(Project project, String branchName);\n\n /**\n * Gets ChangedFiles for project.\n *\n * @param project the project\n * @return a ChangedFiles list\n */\n List<ChangedFile> getChangedFiles(Project project);\n\n /**\n * Adds untracked files to index.\n *\n * @param files the map of projects and changed files\n * @return the list of added files\n */\n List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);\n\n /**\n * Resets changed files to head\n *\n * @param files the map which has projects and their changed files\n * @return a list of changed files\n */\n List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);\n\n /**\n * Gets ProjectStatus for project.\n * We use {@link Status} for getting info about conflicting, untracked files etc.\n * Also, use it for checking the presence of uncommitted changes.\n * Gets current branch name, ahead and behind indexes using {@link Git}.\n *\n * @param project the project\n * @return ProjectStatus for the project.\n */\n ProjectStatus getProjectStatus(Project project);\n\n /**\n * Gets branches of project\n *\n * @param projects cloned project\n * @param brType type branch\n * @param onlyCommon if value is <code>true</code> return only common branches of projects,\n * if <code>false</code> return all branches.\n * @return a list of branches\n */\n Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon);\n\n /**\n * Replaces changed files with HEAD revision\n *\n * @param changedFiles the files for replacing\n */\n void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);\n\n /**\n * Creates stash for projects\n *\n * @param projects the cloned projects\n * @param stashMessage the stash message\n * @param includeUntracked <code>true</code> if need to include untracked file to stash, otherwise <code>false</code>\n * @return a map of operation statuses\n */\n Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);\n\n /**\n * Gets list of stashes for projects\n *\n * @param projects the cloned projects\n * @return a list of projects' stashes\n */\n List<Stash> getStashList(List<Project> projects);\n\n /**\n * Applies stash for the project\n *\n * @param stash the stash for applying\n * @param progressListener the listener for obtaining data on the process of performing the operation\n */\n void applyStashes(Stash stash, ProgressListener progressListener);\n\n /**\n * Drops stash from the project\n *\n * @param stash the stash which need to drop\n * @return a map of operation statuses\n */\n Map<Project, Boolean> stashDrop(Stash stash);\n\n /**\n * Deletes branch from projects\n *\n * @param projects the cloned projects\n * @param deletedBranch the branch which will be deleted\n * @param progressListener the listener for obtaining data on the process of performing the operation\n * @return a map of operation statuses by each project.\n * <code>true</code> if a branch was successfully deleted from a project, otherwise <code>false</code>.\n */\n Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);\n}",
"public final void mPUSH() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.PUSH;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:702:6: ( 'push' )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:702:8: 'push'\n\t\t\t{\n\t\t\t\tthis.match(\"push\");\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}",
"public boolean updateProject(Project project);",
"void commit(String workspace);",
"public boolean push(ProgressMonitor monitor, String remoteName, String branchName) \n \tthrows URISyntaxException, IOException {\n \t\treturn push(monitor, null, remoteName, branchName, branchName, false, false, null);\n \t}",
"public void notifyProjectItem(EtoProject etoProject){\n }",
"public void execute() throws MojoExecutionException {\n deploy(service, dockerImage,Optional.ofNullable(kalixProject),Optional.ofNullable(kalixContext));\n }",
"private void solveDependencies() {\n requiredProjects.clear();\n requiredProjects.addAll(getFlattenedRequiredProjects(selectedProjects));\n }",
"public void remove2ChipsFromProjectsAndAddToPlayer(Subproject projectA, Subproject projectB) {\n\t\tcurrent.addChip(projectA.removeLastChip());\n\t\tcurrent.addChip(projectB.removeLastChip());\n\t}",
"private static void addProjectFiles(IProject newProject){\n \t//add README file\n \taddProjectFile(newProject , README_FILE_NAME , \"\" );\n \t//add ProviderClass\n \taddProjectFile(newProject , PROVIDER_SCRIPT_FILE_NAME , CLASSES_FOLDER+\"/\" );\n }",
"void percolateUp(int index) {\n T x = (T) pq[index];\n while(index>0 && (pq[parent(index)].compareTo(x)==1)) {\n pq[index] = pq[parent(index)];\n index = parent(index);\n pq[index]=x;\n }\n\n }",
"void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }",
"public void apply(Project project) {\n TaskContainer taskContainer = project.getTasks();\n\n TaskCacheTask taskCacheTask = taskContainer.create(\"cacheTaskList\", TaskCacheTask.class);\n taskContainer.getByName(\"assemble\").dependsOn(taskCacheTask);\n\n CommandlineFlagsTask flagsCacheTask = taskContainer.create(\"cacheCommandlineFlags\", CommandlineFlagsTask.class);\n taskContainer.getByName(\"assemble\").dependsOn(flagsCacheTask);\n\n taskContainer.create(\"installTabCompletion\", InstallerTask.class);\n\n //TODO: Add up-to-date checks for both\n }",
"@Test\n @DisplayName(\"push test4\")\n void push_test4(){\n\n mongoOperations.updateMulti(\n new Query(),\n new Update()\n .addToSet(\"values\")\n .each(\"spring\", \"data\", \"mongodb\"),\n UserTestArray.class\n );\n }",
"public void removeChipFromProjectAndPutItIntoAnother(Subproject fromProject, Subproject toProject) {\n\t\tif(fromProject.chipCanBeRemoved()){\n\t\t\tChip removedChip=fromProject.removeLastChip();\n\t\t\tcurrent.raiseScore(toProject.setChip(removedChip).getAmountSZT());\n\t\t}\n\t}"
] | [
"0.61461616",
"0.5740284",
"0.55875254",
"0.55555815",
"0.55161595",
"0.55028784",
"0.54728734",
"0.54205143",
"0.53854364",
"0.53703415",
"0.5357096",
"0.5351392",
"0.5340906",
"0.5312805",
"0.52636766",
"0.52472836",
"0.52358246",
"0.5220136",
"0.5216979",
"0.52004105",
"0.5193381",
"0.5186716",
"0.5180483",
"0.51467085",
"0.514563",
"0.51222944",
"0.51046854",
"0.510371",
"0.51037025",
"0.5100179",
"0.509984",
"0.50936043",
"0.5088812",
"0.5029038",
"0.5020889",
"0.50171137",
"0.5014197",
"0.500946",
"0.5001625",
"0.5000488",
"0.49756718",
"0.4972106",
"0.4962041",
"0.496183",
"0.4957002",
"0.49478063",
"0.4920541",
"0.49141893",
"0.49009636",
"0.48975256",
"0.48606223",
"0.48485917",
"0.48465297",
"0.48424205",
"0.4839932",
"0.4827347",
"0.48168993",
"0.48148355",
"0.48128492",
"0.48095316",
"0.47850037",
"0.4774729",
"0.47729638",
"0.47562385",
"0.47550127",
"0.47504795",
"0.47388816",
"0.47388816",
"0.47311133",
"0.4725917",
"0.4724155",
"0.4720868",
"0.47150463",
"0.47149327",
"0.47135994",
"0.4697464",
"0.46943593",
"0.4686596",
"0.46865633",
"0.4682333",
"0.4680121",
"0.46728206",
"0.46717605",
"0.46695295",
"0.46665534",
"0.4659626",
"0.46564406",
"0.46556726",
"0.46446598",
"0.46264544",
"0.46178904",
"0.46177605",
"0.46174705",
"0.46155182",
"0.4607141",
"0.46066162",
"0.4605574",
"0.45968089",
"0.4593272",
"0.45907825"
] | 0.6401831 | 0 |
Checks that project has any references. | public boolean hasAtLeastOneReference(Project project); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasProject();",
"private void addReferences() throws BuildException {\n Hashtable thisReferences\n = (Hashtable) getProject().getReferences().clone();\n Hashtable newReferences = newProject.getReferences();\n Enumeration e;\n if (references.size() > 0) {\n for (e = references.elements(); e.hasMoreElements();) {\n Reference ref = (Reference) e.nextElement();\n String refid = ref.getRefId();\n if (refid == null) {\n throw new BuildException(\"the refid attribute is required\"\n + \" for reference elements\");\n }\n if (!thisReferences.containsKey(refid)) {\n log(\"Parent project doesn't contain any reference '\"\n + refid + \"'\",\n Project.MSG_WARN);\n continue;\n }\n \n thisReferences.remove(refid);\n String toRefid = ref.getToRefid();\n if (toRefid == null) {\n toRefid = refid;\n }\n copyReference(refid, toRefid);\n }\n }\n \n // Now add all references that are not defined in the\n // subproject, if inheritRefs is true\n if (inheritRefs) {\n for (e = thisReferences.keys(); e.hasMoreElements();) {\n String key = (String) e.nextElement();\n if (newReferences.containsKey(key)) {\n continue;\n }\n copyReference(key, key);\n }\n }\n }",
"public boolean[] hasConflictsAndChanges(Project project);",
"boolean hasReference();",
"public void check() throws XMLBuildException {\r\n\r\n\t}",
"public void check() throws XMLBuildException {\r\n\r\n\t}",
"public boolean hasReferences() {\n\t\treturn this.refCounter > 0;\n\t}",
"@Test\n public void shouldNotReportValidReferences() {\n\n Compilation compilation = compile();\n assertThat(compilation).failed();\n\n List<Diagnostic<? extends JavaFileObject>> collect = compilation.errors().stream()\n .filter(e -> e.getMessage(null).indexOf(\"must not access org.moditect.deptective.plugintest.basic.bar\") == -1)\n .collect(Collectors.toList());\n\n assertThat(\n \"Test-Class 'Foo' should not have any invalid dependencies beside those to 'org.moditect.deptective.plugintest.basic.bar*'\",\n collect, Is.is(Lists.emptyList()));\n }",
"private void solveDependencies() {\n requiredProjects.clear();\n requiredProjects.addAll(getFlattenedRequiredProjects(selectedProjects));\n }",
"protected void resolveProjectDependencies() {\n // Create a set of old and new artifacts.\n final Set<String> oldReferences = new HashSet<String>();\n final Set<String> newReferences = new HashSet<String>();\n for (PropertyInfo pi:properties.values()) {\n if (pi != null) {\n if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.PATH_PARSER) {\n // Get original artifacts\n final List oldList = (List)pi.getOldValue();\n if ( oldList != null ) {\n final Iterator it = oldList.iterator();\n while (it.hasNext()) oldReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n \n // Get artifacts after the edit\n final List newList = (List)pi.getValue();\n if ( newList != null ) {\n final Iterator it = newList.iterator();\n while (it.hasNext()) newReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n } else if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.FILE_REFERENCE_PARSER) {\n oldReferences.add(pi.getOldRawValue());\n newReferences.add(pi.getRawValue());\n }\n }\n }\n \n // Create set of removed artifacts and remove them\n final Set<String> removed = new HashSet<String>( oldReferences );\n removed.removeAll( newReferences );\n final Set<String> added = new HashSet<String>(newReferences);\n added.removeAll(oldReferences);\n \n // 1. first remove all project references. The method will modify\n // project property files, so it must be done separately\n for ( String reference : removed ) {\n if (reference != null && !reference.startsWith(LIBS)) { //NOI18N\n refHelper.destroyReference(reference);\n }\n }\n \n // 2. now read project.properties and modify rest\n final EditableProperties ep = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n boolean changed = false;\n \n for( final String reference:removed) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // remove helper property pointing to library jar if there is any\n ep.remove(reference.substring(2, reference.length()-1));\n changed = true;\n }\n }\n final File projDir = FileUtil.toFile(antProjectHelper.getProjectDirectory());\n for( String reference:added ) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // add property to project.properties pointing to relativized\n // library jar(s) if possible\n reference = reference.substring(2, reference.length()-1);\n final String value = relativizeLibraryClasspath(reference, projDir);\n if (value != null) {\n ep.setProperty(reference, value);\n ep.setComment(reference, new String[]{\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine1\", reference), //NOI18N\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine2\")}, false); //NOI18N\n changed = true;\n }\n }\n }\n if (changed) {\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n \n }",
"public boolean satisfyingReferences() {\n\t\tfor (DependencyElement refEl : references) {\n\t\t\tif (!refEl.after(this)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private void checkReferences(final HashSet<Reference> expectedReferences, SearchMatch referenceMatch) {\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Reference pair : expectedReferences) {\r\n\t\t\t\t\t\tReference reference = pair;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString refModuleName = reference.getModuleNode().getModuleFullyQualifiedName();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tIModelElement modelElement = downCast(referenceMatch.getElement());\r\n\t\t\t\t\t\tISourceModule matchSrcModule = DeeSearchEngineTestUtils.getSourceModule(modelElement);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString matchModuleName = DeeSearchEngineTestUtils.getSourceModuleFQName(matchSrcModule);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(areEqual(refModuleName, matchModuleName) &&\r\n\t\t\t\t\t\t\treference.getOffset() == referenceMatch.getOffset() &&\r\n\t\t\t\t\t\t\treference.getLength() == referenceMatch.getLength()\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\texpectedReferences.remove(pair);\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tassertFail();\r\n\t\t\t\t}",
"protected boolean isReferenced() {\r\n return mReferenced || mUsers.size() > 0;\r\n }",
"public void resolveExternalDependencies(List<Antfile> antfiles)\n {\n List<Dependency> unresolvedDependencies = getUnresolvedDependencies();\n\n for (Dependency unresolvedDependency : unresolvedDependencies)\n {\n boolean found = false;\n String unresolvedDependencyName = unresolvedDependency.getName();\n\n for (Antfile antfile : antfiles)\n {\n if (!antfile.getBuildFile().equals(buildFile))\n {\n List<Target> targets = getAllTargets(antfile);\n\n for (Target target : targets)\n {\n String targetName = target.getName();\n String qualifiedTargetname = antfile.getProjectName() + \".\" + targetName;\n\n if (unresolvedDependencyName.equals(targetName) || unresolvedDependencyName.equals(qualifiedTargetname))\n {\n unresolvedDependency.setResolved(true);\n unresolvedDependency.setBuildFile(antfile);\n found = true;\n\n break;\n }\n\n if (found)\n {\n break;\n }\n }\n }\n }\n } // end for\n }",
"boolean hasRef();",
"public boolean hasIgnoredReferences() {\n\t\treturn !ignoredReferences.isEmpty();\n\t}",
"private void validateWebXmlReferences(GraphContext context)\n {\n WebXmlService webXmlService = new WebXmlService(context);\n Iterator<WebXmlModel> models = webXmlService.findAll().iterator();\n\n // There should be at least one file\n Assert.assertTrue(models.hasNext());\n WebXmlModel model = models.next();\n\n // and only one file\n Assert.assertFalse(models.hasNext());\n\n Assert.assertEquals(\"Sample Display Name\", model.getDisplayName());\n\n int numberFound = 0;\n for (EnvironmentReferenceModel envRefModel : model.getEnvironmentReferences())\n {\n Assert.assertEquals(\"jdbc/myJdbc\", envRefModel.getName());\n Assert.assertEquals(\"javax.sql.DataSource\", envRefModel.getReferenceType());\n numberFound++;\n }\n\n // there is only one env-ref\n Assert.assertEquals(1, numberFound);\n }",
"public void verify() {\n lblSourcePackageFolder();\n lblClasspath();\n btAddJARFolder();\n btRemove();\n lblOutputFolderOrJAR();\n txtOutputFolder();\n btBrowse();\n lstClasspath();\n cboSourcePackageFolder();\n btMoveUp();\n btMoveDown();\n lblOnlineError();\n }",
"@Override\n\tpublic void checkDependencies() throws Exception\n\t{\n\t\t\n\t}",
"public boolean containsGraph( final ProjectVersionRef ref )\n {\n return getConnectionInternal().containsProject( params, ref );\n }",
"public final boolean hasDependents() {\r\n synchronized (f_seaLock) {\r\n return !f_dependents.isEmpty();\r\n }\r\n }",
"public boolean hasAssignedProject()\r\n {\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn (_assignedProject!=null);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }",
"private boolean checkDependenciesSatisfied() {\n\t\tLOGGER.trace(\"CheckDependenciesSatisfied: Start Checking\");\n\t\tfinal Collection<ModuleDependency> moduleDependencies = selfModule.getDependencies();\n\t\tif (moduleDependencies == null) {\n\t\t\treturn true;\n\t\t}\n\t\tfor (final ModuleDependency moduleDependency : moduleDependencies) {\n\t\t\tif (!peerDiscoveryService.getPeerRegistry().containsPeerWithType(moduleDependency.getModuleTypeId(), true)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasResolve();",
"public void resolveInternalDependencies()\n {\n List<Dependency> dependencies = getUnresolvedDependencies();\n\n for (Dependency dependency : dependencies)\n {\n List<Target> allTargets = getTargets();\n\n for (Target target : allTargets)\n {\n String dependencyName = dependency.getName();\n String targetName = target.getName();\n\n System.out.println(\"Antfile.resolveInternalDependencies dependencyName, targetName = \" + dependencyName + \" \" + targetName);\n\n if (dependencyName == null)\n {\n System.out.println(\"Antfile.resolveInternalDependencies dependency = \" + dependency);\n }\n else if (dependencyName.equals(targetName))\n {\n dependency.setResolved(true);\n\n break;\n }\n }\n }\n }",
"boolean hasBuild();",
"boolean isSetRef();",
"public final boolean isReferencedAtMostOnce() {\n return this.getReferences(false, true).size() == 0 && this.getReferences(true, false).size() <= 1;\r\n }",
"protected void checkLinkage(String[] paths) {\n\t\tcheckImport(paths);\n\t\tcheckInclude(paths);\n\t}",
"private boolean checkResolve(BundleImpl b) {\n ArrayList okImports = new ArrayList();\n if (framework.perm.missingMandatoryPackagePermissions(b.bpkgs, okImports) == null &&\n checkBundleSingleton(b) == null) {\n HashSet oldTempResolved = (HashSet)tempResolved.clone();\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n HashMap oldTempRequired = (HashMap)tempRequired.clone();\n HashSet oldTempBlackList = (HashSet)tempBlackList.clone();\n tempResolved.add(b);\n if (checkRequireBundle(b) == null) {\n List r = resolvePackages(okImports.iterator());\n if (r.size() == 0) {\n return true;\n }\n }\n tempResolved = oldTempResolved;\n tempProvider = oldTempProvider;\n tempRequired = oldTempRequired;\n tempBlackList = oldTempBlackList;\n }\n return false;\n }",
"public boolean isProjectOpen() {\n\t\treturn (projectFileIO != null);\n\t}",
"private void checkReferences(DataStage dataStage, boolean useSourceType, Object result) {\n final List<TargetInternalReference> references = new ArrayList<>();\n Helpers.collectAllTargetInternalReferences(result, references);\n Map<String, Boolean> cachedReferences = new HashMap<>();\n references.forEach(t -> {\n boolean reset = false;\n if (t.getReference() != null) {\n final Boolean fromCache = cachedReferences.get(t.getReference());\n if(fromCache !=null){\n if(fromCache){\n reset = true;\n }\n }\n else {\n TargetInstance reference = null;\n try {\n final List<String> typesOfReference = kgV3.getTypesOfInstance(t.getReference(), DataStage.IN_PROGRESS, false);\n if (typesOfReference != null) {\n final TranslatorModel<?, ?> referenceTranslatorModel = TranslatorModel.MODELS.stream().filter(m -> m.getV3translator() != null && m.getV3translator().semanticTypes().stream().anyMatch(typesOfReference::contains)).findFirst().orElse(null);\n if (referenceTranslatorModel != null) {\n final String referenceQueryId = typesOfReference.stream().map(type -> referenceTranslatorModel.getV3translator().getQueryIdByType(type)).findFirst().orElse(null);\n reference = translateTargetInstance(dataStage, useSourceType, t, reference, referenceTranslatorModel, referenceQueryId);\n }\n }\n reset = reference == null;\n cachedReferences.put(t.getReference(), reset);\n } catch (WebClientResponseException ignored) {\n logger.error(\"A web client exception occurred - ignoring\");\n }\n }\n }\n if (reset) {\n t.setReference(null);\n }\n });\n }",
"boolean isZeroReference() {\n return refCount == 0;\n }",
"boolean hasHadithReferenceNo();",
"private void checkAndAddReferenceFrame(ReferenceFrame referenceFrame)\n {\n checkAndAddReferenceFrame(referenceFrame, referenceFrame.getNameBasedHashCode());\n }",
"private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}",
"static boolean sourceCoveredByProjectViewTargets(LocationContext context) {\n Collection<TargetKey> targetsBuildingSource =\n SourceToTargetMap.getInstance(context.project)\n .getRulesForSourceFile(new File(context.file.getPath()));\n return !targetsBuildingSource.isEmpty()\n && sourceInProjectTargets(context, targetsBuildingSource);\n }",
"private static void checkReferenceTypes(Component component)\n\t{\n\t\tList<ExternalReference> refs = component.getExternalReferences();\n\t\tif (refs != null)\n\t\t{\n\t\t\tfor (ExternalReference ref : refs)\n\t\t\t{\n\t\t\t\tif (ref.getType() == null)\n\t\t\t\t\tref.setType(ExternalReference.Type.OTHER);\n\t\t\t}\n\t\t}\n\t}",
"public boolean referencesInState(ResourceState ... expectedRefStates) throws DependencyException {\n\t\tfor (DependencyElement refEl : references) {\n\t\t\tif (refEl.resource == null) {\n\t\t\t\tthrow new DependencyException(\"Could not locate ResourceMetadata for \" + refEl);\n\t\t\t}\n\t\t\t\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0; i < expectedRefStates.length; i++) {\n\t\t\t\tif (refEl.resource.getState().isEquivalent(expectedRefStates[i])) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!found) {\n\t\t\t\tlog.info(refEl + \" is in state [\" + refEl.resource.getState() + \"], expected [\" + Arrays.asList(expectedRefStates) + \"]\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }",
"private boolean isReference()\n {\n return countAttributes(REFERENCE_ATTRS) > 0;\n }",
"private boolean checkPreviousRefs(String ref) {\n\t\t// Prevent stack overflow, when an unlock happens from inside here:\n\t\tList<String> checked = (List<String>) threadLocalManager.get(TwoFactorAuthenticationImpl.class.getName());\n\t\tif (checked == null) {\n\t\t\tchecked = new ArrayList<String>();\n\t\t\tthreadLocalManager.set(TwoFactorAuthenticationImpl.class.getName(), checked);\n\t\t}\n\t\tif (checked.contains(ref)) {\n\t\t\treturn false; // This allows the required entity to load.\n\t\t}\n\t\ttry {\n\t\t\tchecked.add(ref);\n\t\t\treturn findSiteId(ref);\n\t\t} finally {\n\t\t\tif(!checked.isEmpty()) {\n\t\t\t\tchecked.remove(checked.size()-1);\n\t\t\t}\n\t\t}\n\t}",
"public boolean canBeReferencedByIDREF() {\n/* 171 */ return false;\n/* */ }",
"protected void checkCanRun() throws BuildException {\n \n }",
"String checkIfProjectExists(String projectKey, String projectName);",
"private boolean isReferenced(String item) {\n\t\tif (varReferences.contains(item)) return true;\n\t\telse return false;\n\t}",
"protected static boolean checkTypeReferences() {\n Map<Class<?>, LinkedList<Class<?>>> missingTypes = new HashMap<>();\n for (Map.Entry<String, ClassProperties> entry : classToClassProperties.entrySet()) {\n String className = entry.getKey();\n Class<?> c = lookupClass(className);\n Short n = entry.getValue().typeNum;\n if (marshalledTypeNum(n)) {\n Class<?> superclass = getValidSuperclass(c);\n if (superclass != null)\n checkClassPresent(c, superclass, missingTypes);\n LinkedList<Field> fields = getValidClassFields(c);\n for (Field f : fields) {\n Class<?> fieldType = getFieldType(f);\n checkClassPresent(c, fieldType, missingTypes);\n }\n }\n }\n if (missingTypes.size() > 0) {\n for (Map.Entry<Class<?>, LinkedList<Class<?>>> entry : missingTypes.entrySet()) {\n Class<?> c = entry.getKey();\n LinkedList<Class<?>> refs = entry.getValue();\n String s = \"\";\n for (Class<?> ref : refs) {\n if (s != \"\")\n s += \", \";\n s += \"'\" + getSimpleClassName(ref) + \"'\";\n }\n Log.error(\"Missing type '\" + getSimpleClassName(c) + \"' is referred to by type(s) \" + s);\n }\n Log.error(\"Aborting code generation due to missing types\");\n return false;\n }\n else\n return true;\n }",
"boolean isBundleDependencies();",
"public void shouldNotGc() {\n reachabilityReferenceChain = new Reference(\n new SoftReference(\n new Reference(\n new WeakReference(\n new SoftReference(\n new PhantomReference(new Object(), referenceQueue))))));\n }",
"public boolean isSetReference_vendored_const() {\n\t\treturn EncodingUtils.testBit(__isset_bitfield, __REFERENCE_VENDORED_CONST_ISSET_ID);\n\t}",
"private void validateDependencies() throws ReportingSystemException {\r\n\r\n\t\tif (calculationService == null || manipulationService == null || incomingRankingService == null\r\n\t\t\t\t|| outgoingRankingService == null || dataReader == null || dataWriter == null)\r\n\t\t\tthrow new ReportingSystemException(\r\n\t\t\t\t\tReportingSystemResourceUtil.getValue(ReportingSystemConstants.EXCEPTION_DEPENDENCY_INJECTION));\r\n\r\n\t}",
"@Test\n public void testIsCreatingProjectIfMissing() throws Exception {\n assertThat(\"Expect true\", testling.isCreatingProjectIfMissing(), is(Boolean.TRUE));\n }",
"boolean isSetSurfaceRefs();",
"public void testVerifyExpectedParentStructure()\n throws CycleDetectedException, DuplicateProjectException\n {\n ProjectDependencyGraph graph = threeProjectsDependingOnASingle();\n final List<MavenProject> sortedProjects = graph.getSortedProjects();\n assertEquals( aProject, sortedProjects.get( 0 ) );\n assertEquals( depender1, sortedProjects.get( 1 ) );\n assertEquals( depender2, sortedProjects.get( 2 ) );\n assertEquals( depender3, sortedProjects.get( 3 ) );\n }",
"private List<IProjectCheckInconsistency> getClasspathVerificationCheckResults(IProject project)\n\t{\n\n\t\tString fileName = Messages.CheckForClasspathVerification_classpath;\n\t\tList<IProjectCheckInconsistency> checkList = new ArrayList<IProjectCheckInconsistency>();\n\n\t\tIFile file = project.getFile(fileName);\n\t\tif (file.exists())\n\t\t{\n\n\t\t\tString xmlFilePath = file.getLocation().toOSString();\n\t\t\tcheckProjectVerificationForClasspathEntry(xmlFilePath, checkList, file);\n\t\t}\n\n\t\treturn checkList;\n\n\t}",
"public boolean referencesHaveCondition(ResourceCondition condition) throws DependencyConditionException {\n\t\tfor (DependencyElement refEl : references) {\n\t\t\t// Check if the condition evaluates to false\n\t\t\ttry {\n\t\t\t\tif (!condition.evaluate(refEl.resource)) { \n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} catch (DependencyException de) {\n\t\t\t\tthrow new DependencyConditionException(refEl.resource, condition, de.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isReferenceToPrimaryKey() {\n\t\treturn referencedColumns.isEmpty();\n\t}",
"private static boolean checkDependencies(ArrayList listeFileXml, XmlDocument fXml) {\r\n \r\n // liste des dpendences\r\n Element root = fXml.getDocument().getRootElement(); // Get the root element\r\n List listeDependencies = root.getChildren(DEPENDENCIES_TAG);\r\n \r\n if (listeDependencies != null) {\r\n \r\n Iterator iterDependencies = listeDependencies.iterator();\r\n while (iterDependencies.hasNext()) {\r\n \r\n Element eltDependencies = (Element) iterDependencies.next();\r\n List listeDependencyFiles = eltDependencies.getChildren(SETTINGSFILE_TAG);\r\n Iterator iterDependencyFiles = listeDependencyFiles.iterator();\r\n \r\n while (iterDependencyFiles.hasNext()) {\r\n \r\n Element eltDependencyFile = (Element) iterDependencyFiles.next();\r\n String name = eltDependencyFile.getAttributeValue(SETTINGSFILENAME_ATTRIB);\r\n \r\n boolean found = false;\r\n for (int i = 0; i < listeFileXml.size(); i++) {\r\n File f = (File) xmlFiles.get(i);\r\n \r\n if (f.getName().equals(name)) {\r\n found = true;\r\n i = listeFileXml.size();\r\n }\r\n }\r\n \r\n if (found == false) {\r\n return false;\r\n }\r\n } // while\r\n \r\n } // while\r\n \r\n } // if\r\n \r\n return true;\r\n }",
"private static boolean sourceInProjectTargets(\n LocationContext context, Collection<TargetKey> targetsBuildingSource) {\n if (targetsBuildingSource.stream().anyMatch(context.syncData.getTargetMap()::contains)) {\n return true;\n }\n ImportRoots roots = context.getImportRoots();\n return targetsBuildingSource.stream().anyMatch(t -> roots.targetInProject(t.getLabel()));\n }",
"private static boolean assetHasLocalReference(MD5Key id) {\n \n \t\treturn getLocalReference(id) != null;\n \t}",
"boolean hasImported();",
"public boolean dependenciesRunning() {\n\t\ttry {\n\t\t\treturn dependenciesInState(ResourceState.RUNNING);\n\t\t} catch (DependencyException de) {\n\t\t\tlog.warn(\"Unable to check is dependencies are running for \" + this, de);\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n\tpublic void testIsConsistentProjectNoOpen() throws Exception {\n\t\trodinProject.close();\n\t\tassertTrue(\"closed project should be consistent\", \n\t\t\t\trodinProject.isConsistent());\n\t\tassertFalse(\"project should not be open\", rodinProject.isOpen());\n\t}",
"public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasChangeSetComputed() {\n File changelogFile = new File(getRootDir(), \"changelog.xml\");\n return changelogFile.exists();\n }",
"void createProjectReference(java.lang.String referenceName, org.apache.ant.common.model.Project model) throws org.apache.ant.common.util.ExecutionException;",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void scanProject() {\n ProjectResources resources = ResourceManager.getInstance().getProjectResources(mProject);\n if (resources != null) {\n Collection<ResourceItem> layouts = resources.getResourceItemsOfType(LAYOUT);\n for (ResourceItem layout : layouts) {\n List<ResourceFile> sources = layout.getSourceFileList();\n for (ResourceFile source : sources) {\n updateFileIncludes(source, false);\n }\n }\n\n return;\n }\n }",
"public boolean shouldDisposeProjectFiles(File projectFile) {\n\n\t\tboolean shouldDispose = true;\n\n\t\tif (projectFile != null) {\n\n\t\t\t// getting the name of the project\n\t\t\tString projectName = Toolkit.getFileName(projectFile);\n\t\t\tString currentPrjName = \"\";\n\t\t\tFile handleProjectFile = null;\n\n\t\t\tif (projectName != null && !projectName.equals(\"\")) {\n\n\t\t\t\t// for each handle\n\t\t\t\tfor (SVGHandle hnd : Editor.getEditor().getHandlesManager()\n\t\t\t\t\t\t.getHandles()) {\n\n\t\t\t\t\t// getting the project file of this handle\n\t\t\t\t\thandleProjectFile = hnd.getScrollPane().getSVGCanvas()\n\t\t\t\t\t\t\t.getProjectFile();\n\n\t\t\t\t\tif (handleProjectFile != null) {\n\n\t\t\t\t\t\tcurrentPrjName = Toolkit.getFileName(handleProjectFile);\n\n\t\t\t\t\t\tif (currentPrjName != null\n\t\t\t\t\t\t\t\t&& currentPrjName.equals(projectName)) {\n\n\t\t\t\t\t\t\tshouldDispose = false;\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}\n\t\t\t}\n\t\t}\n\n\t\treturn shouldDispose;\n\t}",
"@Test\n public void testZeroDependencies() {\n dependencyManager.depend(\"foo\", ImmutableSet.of());\n assertTrue(dependencyManager.isdepend(\"foo\", ImmutableSet.of()));\n }",
"private boolean containsOnlyNonProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // check for empty selection\r\n if (types == 0) {\r\n return false;\r\n }\r\n // note that the selection may contain multiple types of resource\r\n return (types & IResource.PROJECT) == 0;\r\n }",
"public boolean getIsValid() {\n return projectName != null && packageName != null && !projectName.isEmpty() && !packageName.isEmpty();\n }",
"void warningsForUnresolvedFragRefs()\n { \n FragRefs[] unresolved = (FragRefs[])fragRefs.values().toArray(new FragRefs[fragRefs.size()]);\n for (int i=0; i<unresolved.length; ++i)\n { \n FragRefs r = unresolved[i];\n for (int j=0; j < r.uris.size(); ++j)\n {\n Uri uri = (Uri)r.uris.get(j);\n XElem elem = (XElem)r.elems.get(j);\n warning(\"Unresolved fragment reference '\" + uri + \"'\", elem);\n }\n } \n }",
"public boolean isReference() {\n AnnotatedBase comp = m_item.getSchemaComponent();\n return comp instanceof IReference && ((IReference)comp).getRef() != null;\n }",
"void verifyNoReferences(Node n) {\n if (returned.contains(n))\n Assert.UNREACHABLE(\"ERROR: returned set contains \"+n);\n if (thrown.contains(n))\n Assert.UNREACHABLE(\"ERROR: thrown set contains \"+n);\n if (false) {\n for (int i=0; i<this.params.length; ++i) {\n if (this.params[i] == n)\n Assert.UNREACHABLE(\"ERROR: param #\"+i+\" \"+n);\n }\n }\n for (Iterator i = nodeIterator(); i.hasNext(); ) {\n Node n2 = (Node) i.next();\n if (n2 instanceof UnknownTypeNode) continue;\n if (multiset_contains(n2.addedEdges, n)) {\n Assert.UNREACHABLE(\"ERROR: \"+n2+\" contains an edge to \"+n);\n }\n if (multiset_contains(n2.predecessors, n)) {\n Assert.UNREACHABLE(\"ERROR: \"+n2+\" contains predecessor \"+n);\n }\n if (multiset_contains(n2.accessPathEdges, n)) {\n Assert.UNREACHABLE(\"ERROR: \"+n2+\" contains access path edge to \"+n);\n }\n if (n2 instanceof FieldNode) {\n FieldNode fn = (FieldNode) n2;\n if (fn.field_predecessors != null &&\n fn.field_predecessors.contains(n)) {\n Assert.UNREACHABLE(\"ERROR: \"+fn+\" contains a field predecessor \"+n);\n }\n }\n }\n }",
"public boolean verifyAdd() {\n\t\treturn projTable.findElement(By.linkText(nameOfProject)).isDisplayed();\n\t}",
"protected void validateReferences (Validator validator)\n {\n _cfgmgr.validateReferences(validator);\n }",
"private boolean isValidAndNewReference(String ref) {\n Set<String> allRefs = getAllReferenceNames();\n if (allRefs.contains(ref)) {\n if (!ref.equals(currentReference)) {\n return true;\n }\n } else if (allRefs.contains(\"chr\" + ref)) {\n // Looks like a number. Let's try slapping on \"chr\" and see if it works.\n return isValidAndNewReference(\"chr\" + ref);\n } else {\n if (TrackController.getInstance().getTracks().size() > 0) {\n DialogUtils.displayMessage(String.format(\"<html>Reference <i>%s</i> not found in loaded tracks.</html>\", ref));\n }\n }\n return false;\n }",
"@Override\n public boolean isRemoteProject() {\n return true;\n }",
"@Test\n\tpublic void testExistsProjectClosed() throws Exception {\n\t\trodinProject.getProject().close(null);\n\t\tassertFalse(\"The project should not be open\", rodinProject.isOpen());\n\t\tassertNotExists(\"The Rodin project should not exist\", rodinProject);\n\t\tassertFalse(\"The existence test should not have opened the project\",\n\t\t\t\trodinProject.isOpen());\n\t}",
"@Test\n\tpublic void testExistsProjectInexistent() throws Exception {\n\t\tIRodinProject other = getRodinProject(\"Inexistent\");\n\t\tassertFalse(\"An existent project should not be open\",\n\t\t\t\tother.isOpen());\n\t\tassertNotExists(\"The Rodin project should not exist\", other);\n\t\tassertFalse(\"The existence test should not have opened the project\",\n\t\t\t\tother.isOpen());\n\t}",
"public static boolean keepProjectsInSync() {\r\n\t\treturn ProjectUIPlugin.keepProjectsInSync();\r\n\t}",
"public boolean hasRefSeason() {\n return refSeasonBuilder_ != null || refSeason_ != null;\n }",
"public BaseMsg verifyProjectInfo(long projectId);",
"public boolean doesGoToReferenceExist(String id)\n {\n IDNode node = (IDNode)idReferences.get(id); \n return node.isThereInternalLinkGoTo();\n }",
"public void addReference() {\r\n mReferenced = true;\r\n }",
"@Override\n boolean areNestedRefsProhibited() {\n return true;\n }",
"public boolean getProjectExternallyEdited()\r\n {\r\n return (m_projectExternallyEdited);\r\n }",
"public void checkNodes() {\n // Don't do anything when you check the nodes. This nodes is built by\n // when the setTarget method is called.\n }",
"public static boolean updateProjectWithJARs(URL[] urls, String refClassName, FileObject fileInProject) {\n try {\n ClassPath classPath = ClassPath.getClassPath(fileInProject, ClassPath.EXECUTE);\n String resourceName = refClassName.replace('.', '/') + \".class\"; // NOI18N\n FileObject fob = classPath.findResource(resourceName); // NOI18N\n if (fob == null) {\n List<ClassSource.Entry> cpEntries = new ArrayList<ClassSource.Entry>(urls.length);\n for (URL url : urls) {\n FileObject jar = URLMapper.findFileObject(url);\n if (jar != null) {\n cpEntries.add(new ClassSourceResolver.JarEntry(FileUtil.toFile(jar)));\n }\n }\n return ClassPathUtils.updateProject(fileInProject, new ClassSource(\"\", cpEntries)); // NOI18N\n }\n } catch (IOException ex) {\n Logger.getLogger(J2EEUtils.class.getName()).log(Level.INFO, ex.getMessage(), ex);\n }\n return false;\n }",
"private static <T extends BaseVertex, E extends BaseEdge> void sanityCheckReferenceGraph(final BaseGraph<T,E> graph, final Haplotype refHaplotype) {\n if( graph.getReferenceSourceVertex() == null ) {\n throw new IllegalStateException(\"All reference graphs must have a reference source vertex.\");\n }\n if( graph.getReferenceSinkVertex() == null ) {\n throw new IllegalStateException(\"All reference graphs must have a reference sink vertex.\");\n }\n if( !Arrays.equals(graph.getReferenceBytes(graph.getReferenceSourceVertex(), graph.getReferenceSinkVertex(), true, true), refHaplotype.getBases()) ) {\n throw new IllegalStateException(\"Mismatch between the reference haplotype and the reference assembly graph path. for graph \" + graph +\n \" graph = \" + new String(graph.getReferenceBytes(graph.getReferenceSourceVertex(), graph.getReferenceSinkVertex(), true, true)) +\n \" haplotype = \" + new String(refHaplotype.getBases())\n );\n }\n }",
"private void checkReference()\r\n {\r\n if (myKeyRef.get() == null)\r\n {\r\n myValue = null;\r\n }\r\n }",
"public static boolean libraryReferenceList(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"libraryReferenceList\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, LIBRARY_REFERENCE_LIST, \"<library reference list>\");\n r = libraryComponentReferenceExpression(b, l + 1);\n r = r && libraryReferenceList_1(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"public static void checkBugginess(Ticket ticket){\n\t\tfor (String path: ticket.getBugFiles()) {\n\t\t\t\n\t\t\tfor (Release rel: ticket.getAv()) {\n\t\t\t\t\n\t\t\t\t\tfor (ReleaseFile rf: rel.getReleaseFiles()) {\n\t\t\t\t\t\t//if a file is called *path* or was called *path* set bugginess true\t\t\n\t\t\t\t\t\tif (rf.getChange().getPaths().contains(path)) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\trf.setBugginess(true);\n\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}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\n\t}",
"public void clearProject()\n\t{\n\t\tstoreViewState();\n\t\tproject.clearProject();\n\t\tcheckStatus();\n\t}",
"@java.lang.Override\n public boolean hasBuild() {\n return instance.hasBuild();\n }",
"protected void checkIfReady() throws Exception {\r\n checkComponents();\r\n }",
"public boolean isReference() {\n return isReference;\n }",
"public boolean isInCheck() {\n\t\treturn false;\n\t}",
"public boolean airportIsBuilt() {\n\t\tif(projectsAvailable.isEmpty() && projectsActive.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}"
] | [
"0.6571544",
"0.62240857",
"0.6152511",
"0.61361825",
"0.6107451",
"0.6107451",
"0.6088319",
"0.5963836",
"0.59308225",
"0.5827528",
"0.5801029",
"0.5794786",
"0.57924545",
"0.5788509",
"0.5782212",
"0.575601",
"0.5741508",
"0.57299906",
"0.5701295",
"0.5584389",
"0.555914",
"0.55502164",
"0.554323",
"0.5486252",
"0.5465105",
"0.54337543",
"0.5432433",
"0.54315054",
"0.54062295",
"0.539244",
"0.53921556",
"0.53789115",
"0.53588676",
"0.5294724",
"0.526629",
"0.52515334",
"0.52358526",
"0.5211584",
"0.5194563",
"0.5178692",
"0.5118831",
"0.5111575",
"0.51112413",
"0.51038396",
"0.50934917",
"0.5092941",
"0.5088974",
"0.5077886",
"0.507213",
"0.5062539",
"0.5058318",
"0.50432175",
"0.50412124",
"0.503423",
"0.5034206",
"0.5020023",
"0.50195694",
"0.5006473",
"0.50021195",
"0.49908683",
"0.49883974",
"0.49873298",
"0.49835253",
"0.49776742",
"0.49727052",
"0.49698713",
"0.4964961",
"0.49554175",
"0.49499106",
"0.49488372",
"0.49431047",
"0.49418285",
"0.49360958",
"0.49321172",
"0.49281973",
"0.49249265",
"0.49178204",
"0.49124992",
"0.48723894",
"0.48678562",
"0.48645917",
"0.4862719",
"0.48523438",
"0.4824394",
"0.48229933",
"0.4820266",
"0.481619",
"0.481007",
"0.4807075",
"0.4799202",
"0.47974467",
"0.47726783",
"0.476507",
"0.4759284",
"0.47490445",
"0.47423372",
"0.4732589",
"0.47310436",
"0.47306275",
"0.47234452"
] | 0.7192113 | 0 |
Returns count of commits ahead and behind index | public int[] getAheadBehindIndexCounts(Project project, String branchName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void advanceCommitIndex() {\n // 获取quorum matchIndex\n int peerNum = configuration.getServersList().size();\n long[] matchIndexes = new long[peerNum];\n int i = 0;\n for (RaftProto.Server server : configuration.getServersList()) {\n if (server.getServerId() != localServer.getServerId()) {\n Peer peer = peerMap.get(server.getServerId());\n matchIndexes[i++] = peer.getMatchIndex();\n }\n }\n matchIndexes[i] = raftLog.getLastLogIndex();\n Arrays.sort(matchIndexes);\n long newCommitIndex = matchIndexes[peerNum / 2];\n LOG.debug(\"newCommitIndex={}, oldCommitIndex={}\", newCommitIndex, commitIndex);\n if (raftLog.getEntryTerm(newCommitIndex) != currentTerm) {\n LOG.debug(\"newCommitIndexTerm={}, currentTerm={}\",\n raftLog.getEntryTerm(newCommitIndex), currentTerm);\n return;\n }\n\n if (commitIndex >= newCommitIndex) {\n return;\n }\n long oldCommitIndex = commitIndex;\n commitIndex = newCommitIndex;\n raftLog.updateMetaData(currentTerm, null, raftLog.getFirstLogIndex(), commitIndex);\n // 同步到状态机\n for (long index = oldCommitIndex + 1; index <= newCommitIndex; index++) {\n RaftProto.LogEntry entry = raftLog.getEntry(index);\n if (entry.getType() == RaftProto.EntryType.ENTRY_TYPE_DATA) {\n stateMachine.apply(entry.getData().toByteArray());\n } else if (entry.getType() == RaftProto.EntryType.ENTRY_TYPE_CONFIGURATION) {\n applyConfiguration(entry);\n }\n }\n lastAppliedIndex = commitIndex;\n LOG.debug(\"commitIndex={} lastAppliedIndex={}\", commitIndex, lastAppliedIndex);\n commitIndexCondition.signalAll();\n }",
"CommitIndex getCommittedIndex() {\n return committed;\n }",
"private synchronized long getLastSeenCommitIndex()\n {\n return lastSeenCommitIndex;\n }",
"public int getCommits() {\n return Integer.parseInt(getCellContent(COMMITS));\n }",
"private int indexUntilCheckpointCount() {\n int total = 0;\n for (int i = 0; i < MAX_CHECKPOINTS_BEHIND; i++) {\n final int numDocs = randomIntBetween(1, 5);\n for (int j = 0; j < numDocs; ++j) {\n indexDoc();\n }\n total += numDocs;\n refresh(INDEX_NAME);\n }\n return total;\n }",
"int getUncommittedEventCount();",
"long getUpdateCounts(int index);",
"@Test\n\tpublic void test_increment_commits(){\n\t\tassertEquals(\"Initial commit number should be 1\", 1, test1.getCommitCount());\n\t\ttest1.incrementCommitCount();\n\t\tassertEquals(\"Number of Commit should be incremented\", 2, test1.getCommitCount());\n\t}",
"private int digitCount(String text, int position, int amount) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[605]++;\r\n int limit = Math.min(text.length() - position, amount);\r\n amount = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[606]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[607]++;\nbyte CodeCoverTryBranchHelper_L18 = 0;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]++;\n\n\nint CodeCoverConditionCoverageHelper_C182;\r\n for (;(((((CodeCoverConditionCoverageHelper_C182 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C182 |= (2)) == 0 || true) &&\n ((limit > 0) && \n ((CodeCoverConditionCoverageHelper_C182 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[182].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C182, 1) && false); limit--) {\nif (CodeCoverTryBranchHelper_L18 == 0) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[52]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]++;\n} else if (CodeCoverTryBranchHelper_L18 == 1) {\n CodeCoverTryBranchHelper_L18++;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[53]--;\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.loops[54]++;\n}\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[608]++;\r\n char c = text.charAt(position + amount);\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[609]++;\nint CodeCoverConditionCoverageHelper_C183;\r\n if ((((((CodeCoverConditionCoverageHelper_C183 = 0) == 0) || true) && (\n(((CodeCoverConditionCoverageHelper_C183 |= (8)) == 0 || true) &&\n ((c < '0') && \n ((CodeCoverConditionCoverageHelper_C183 |= (4)) == 0 || true)))\n || \n(((CodeCoverConditionCoverageHelper_C183 |= (2)) == 0 || true) &&\n ((c > '9') && \n ((CodeCoverConditionCoverageHelper_C183 |= (1)) == 0 || true)))\n)) && (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) || true)) || (CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.conditionCounters[183].incrementCounterOfBitMask(CodeCoverConditionCoverageHelper_C183, 2) && false)) {\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[389]++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[610]++;\r\n break;\n\r\n } else {\n CodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.branches[390]++;}\r\n amount++;\nCodeCoverCoverageCounter$654mo6kyai828p9tp73nf924rb8c6mckm6f215emx9469.statements[611]++;\r\n }\r\n return amount;\r\n }",
"public int numCommitVotes() {\n return commitVotes;\n }",
"@Override\n public int countOut() {\n if (callCheck())\n return EMPTY_INDEX;\n int ret = last.getValue();\n last = last.getPrev();\n return ret;\n }",
"long getLastLogIndex();",
"int getCompletionsCount();",
"public int commitcount(int AID) {\n\t\treturn acmapper.commitcount(AID);\n\t}",
"@Nullable\n\tpublic LogIndex getCommitted() {\n\t\treturn committedIndex;\n\t}",
"long getNumberOfComparisons();",
"public int getHistoryCSCount() {\n\n // 1. build the query\n String countQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n // 2. execute the query to search whether the record exists\n Cursor cursor = db.rawQuery(countQuery, null);\n\n // 2. get the count\n int count = cursor.getCount();\n\n cursor.close();\n return count;\n }",
"public int getProjectCommitCount(int pgId) {\n int commitNumber = 0;\n String sql = \"SELECT commitNumber from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE auId = ?));\";\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n commitNumber = rs.getInt(\"commitNumber\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return commitNumber;\n }",
"CommitIndex getAppliedIndex() {\n return applied;\n }",
"public int getBranchCount() { return _brcnt; }",
"int getIndexesCount();",
"int getRefsCount();",
"public int getExitedCountAtFloor(int floor) {\n\t\tif(floor < getNumberOfFloors()) {\n\t\t\treturn exitedCount.get(floor);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"@Override\n public int getNbChanges()\n {\n return nbChanges;\n }",
"public int getHistoryCount() {\n String countQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor cursor = db.rawQuery(countQuery, null);\n int count = cursor.getCount();\n cursor.close();\n\n // return count\n return count;\n }",
"public void incrementBranchCount() {\n this.branchCount++;\n }",
"private int newCursorPosition(int count) {\n int newCursorPosition = cursorPosition + count;\n if (((cursorPosition ^ newCursorPosition) & (count ^ newCursorPosition)) < 0) {\n return Integer.MAX_VALUE;\n } else {\n return newCursorPosition;\n }\n }",
"public synchronized void updateCommitNumber()\n\t{\n\t\tm_dbCommitNum++;\n\t}",
"@Override\n\tpublic int countIndex() {\n\t\treturn logoMapper.selectCountLogo()+headbannerMapper.selecCountHB()+succefulMapper.selecCountSucc()+solutionMapper.selecCountSolu();\n\t}",
"int getIndicesCount();",
"public int stoneCount(int bin)\n {\n \treturn state[bin];\n }",
"int getExchangeHistoryListCount();",
"private static int stateCount(int out, int in, int ret) {\n\t\tret -= out;\n\t\tret += in;\n\t\t\n\t\treturn ret;\n\t}",
"public int countInversion(){\n\t\tsetInversiones(0);\n\t\tnumeros = countStep(numeros, 0, numeros.size()-1);\n\t\treturn getInversiones();\n\t}",
"long getExecutedStatementsCount();",
"public int getBranchCount() {\n return this.branchCount;\n }",
"int getUpdateCountsCount();",
"public int countInversion(){\r\n\t\tsetInversiones(0);\r\n\t\tnumeros = countStep(numeros, 0, numeros.size()-1);\r\n\t\treturn getInversiones();\r\n\t}",
"int getVersionsCount();",
"int getProgressCount();",
"int getProgressCount();",
"int getProgressCount();",
"public int GetNewIndex() {\n int count = 0;\n try {\n Statement stmt = Con.createStatement();\n String query = \"SELECT COUNT(qora) AS REGULAR_COUNT FROM dqs_qanda WHERE LENGTH(content) < 2\";\n ResultSet rs = stmt.executeQuery(query);\n while(rs.next()) {\n count = rs.getInt(\"REGULAR_COUNT\");\n }\n }\n catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return count;\n }",
"public int getHitsLeft(){\n return hitsLeft;\n }",
"private int getNeighborCount(int x, int y, Assignment assignment){\n\t\tint neighbors = 0;\n\n\t\t// try neighbor up\n\t\tif(isNeighborAt(x-1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-left\n\t\tif(isNeighborAt(x-1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor up-right\n\t\tif(isNeighborAt(x-1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down\n\t\tif(isNeighborAt(x+1, y, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-left\n\t\tif(isNeighborAt(x+1, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor down-right\n\t\tif(isNeighborAt(x+1, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor left\n\t\tif(isNeighborAt(x, y-1, assignment))\n\t\t\tneighbors++;\n\n\t\t// try neighbor right\n\t\tif(isNeighborAt(x, y+1, assignment))\n\t\t\tneighbors++;\n\n\t\treturn neighbors;\n\t}",
"private static int getHistory(SearchTreeNode parent, MazeState current, MazeProblem problem) {\n\t\treturn parent.history + problem.getCost(current);\n\t}",
"public Map<String, Map<String, Integer>> compareRecursively(RepositoryDTO repository, List<CommitDTO> commits) {\r\n\t\tMap<String, Map<String, Integer>> statistics = new HashMap<String, Map<String, Integer>>();\r\n\r\n\t\tif (commits.size() >= 2) {\r\n\r\n\t\t\tboolean ascSorted = commits.get(0).getCommitDate().before(commits.get(1).getCommitDate());\r\n\r\n\t\t\tfor (int i = 0; i < commits.size() - 1; i++) {\r\n\t\t\t\tint indexOld = ascSorted ? i : commits.size() - 1 - i;\r\n\t\t\t\tint indexNewer = indexOld + (ascSorted ? 1 : -1);\r\n\r\n\t\t\t\tMap<String, Map<String, Integer>> compareStats = compareCommit(repository, commits.get(indexOld),\r\n\t\t\t\t\t\tcommits.get(indexNewer));\r\n\r\n\t\t\t\tlogger.info(\"Before -G (current) : \" + statistics.toString());\r\n\t\t\t\tlogger.info(\"Before -G (new) : \" + compareStats.toString());\r\n\r\n\t\t\t\t// Node type (Method, Field, etc.)\r\n\t\t\t\tfor (String type : compareStats.keySet()) {\r\n\r\n\t\t\t\t\tMap<String, Integer> tmpTypeToAdd = compareStats.get(type);\r\n\t\t\t\t\tMap<String, Integer> currentGlobalType = statistics.get(type);\r\n\r\n\t\t\t\t\tif (currentGlobalType == null) {\r\n\t\t\t\t\t\tstatistics.put(type, tmpTypeToAdd);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Action (Add, Delete, Insert, Move, Update)\r\n\t\t\t\t\t\tfor (String action : tmpTypeToAdd.keySet()) {\r\n\r\n\t\t\t\t\t\t\tInteger hitNumber = currentGlobalType.getOrDefault(action, 0);\r\n\t\t\t\t\t\t\tInteger hitToAdd = tmpTypeToAdd.getOrDefault(action, 0);\r\n\t\t\t\t\t\t\tcurrentGlobalType.put(action, hitNumber + hitToAdd);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstatistics.put(type, currentGlobalType);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlogger.info(\"After (new) : \" + statistics.toString());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn statistics;\r\n\t}",
"public int countByCopiedFrom(long copiedFrom);",
"public int currentCount () {\n return count;\n }",
"public int currentChannelIndex() {\n int i = 0;\n for (YouTubeData data : mChannels) {\n if (data.mChannel.equals(mCurrentChannelID))\n return i;\n\n i++;\n }\n\n DUtils.log(\"should not get here: \" + DUtils.currentMethod());\n return 0;\n }",
"int countComponents() throws Exception;",
"public int getMigrationCount();",
"public int getNumConnections(ImmutableNodeInst n) {\n int myNodeId = n.nodeId;\n int i = searchConnectionByPort(myNodeId, 0);\n int j = i;\n for (; j < connections.length; j++) {\n int con = connections[j];\n ImmutableArcInst a = getArcs().get(con >>> 1);\n boolean end = (con & 1) != 0;\n int nodeId = end ? a.headNodeId : a.tailNodeId;\n if (nodeId != myNodeId) break;\n }\n return j - i;\n }",
"int getStatusCount();",
"public int howManyCardsUp() {\r\n return undoStack.size();\r\n }",
"public int howManyUnitsUp(){\n return undoStack.size();\n }",
"public StatusPage countHistoryEntries ( ) throws InterruptedException {\n wait.until ( ExpectedConditions.elementToBeClickable ( uiHistory ) );\n wait.until ( ExpectedConditions.visibilityOf ( uiHistory ) );\n Thread.sleep ( 7000 );\n uiHistory.click ();\n count2 = getSizeHistoryEntries ();\n System.out.println ( count2 );\n return new StatusPage ( this.driver );\n\n }",
"int getTransactionsCount();",
"static native int jniNumLinesInHunk(long patch, int hunkIdx);",
"int getActionLogCount();",
"int findCount();",
"public void testBacktracking() throws IOException {\n assertEquals(1, regexQueryNrHits(\"4934[314]\"));\n }",
"int getInCount();",
"int getCachedCount();",
"public int popcount(long m) {\r\n int c = 0;\r\n for (c = 0; m != 0; c++) m &= m - 1;\r\n return c;\r\n }",
"private long getChampConnectionCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(CONNECTION_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"int count(State state);",
"private void countChange() {\n /* To make 0.00, we use 0 coins. */\n myIndices[0] = 0;\n \n /* \n * Work from subproblem $0.01 to target. \n * Because subproblems overlap, we will\n * store them and use them dynamically.\n */\n for (int curr = 1; curr <= myTarget; curr++) {\n /* \n * Adds one coin (current-next used) to\n * the preemptive minimum coins needed.\n */\n myIndices[curr] = getMinPrior(curr) + 1;\n }\n \n myMinCoins = myIndices[myTarget];\n }",
"private static int[] countInversion(int[] left, int[] right)\n {\n int i = 0, j = 0, k = 0, leftLen = left.length, rightLen = right.length;\n int l = leftLen + rightLen;\n int[] merged = new int[l];\n do\n {\n if(left[i] <= right[j])\n merged[k++] = left[i++];\n else\n {\n splitCount += (leftLen - i);\n merged[k++] = right[j++];\n }\n\n } while (i < leftLen && j < rightLen);\n\n //copy remaining\n if(i < leftLen)\n for(; i < leftLen; i++)\n merged[k++] = left[i];\n\n else if(j < rightLen)\n for(; j < rightLen; j++)\n merged[k++] = right[j];\n\n return merged;\n }",
"@Test\n\tpublic void diffCommits() throws Exception {\n\t\tRepository repo = new FileRepository(testRepo);\n\t\tRevCommit commit1 = add(\"test.txt\", \"content\");\n\t\tRevCommit commit2 = add(\"test.txt\", \"content2\");\n\t\tTreeWalk walk = TreeUtils.diffWithCommits(repo, commit1, commit2);\n\t\tassertNotNull(walk);\n\t\tassertEquals(2, walk.getTreeCount());\n\t\tassertTrue(walk.next());\n\t\tassertEquals(\"test.txt\", walk.getPathString());\n\t\tassertEquals(BlobUtils.getId(repo, commit1, \"test.txt\"),\n\t\t\t\twalk.getObjectId(0));\n\t\tassertEquals(BlobUtils.getId(repo, commit2, \"test.txt\"),\n\t\t\t\twalk.getObjectId(1));\n\t\tassertFalse(walk.next());\n\t}",
"public int stoneCount(int bin1, int bin2)\n {\n \treturn state[7*bin1 + bin2];\n }",
"public Integer getBranchesCount() throws SQLException {\n\t\treturn getCount(\"select count(*) as COUNT from tbl_library_branch;\", null);\n\t}",
"public void findCommits(String logMsg) {\n List<String> allCommitID = getAllCommits();\n int countTotal = 0;\n for (String cmt: allCommitID) {\n File commitFile = new File(Main.ALL_COMMITS, cmt);\n Commit associatedCommit =\n Utils.readObject(commitFile, Commit.class);\n if (associatedCommit.getLogMsg().equals(logMsg)) {\n System.out.println(cmt);\n countTotal = countTotal + 1;\n }\n }\n if (countTotal == 0) {\n System.out.println(\"Found no commit with that message.\");\n }\n }",
"int getCommandCount();",
"public static void incrComparisons() { ++comparisons; }",
"public final int refCount ()\n {\n return _refCount;\n }",
"@Override\n\tpublic void commitOffsets() {\n\n\t}",
"public Long get_cachetot304hits() throws Exception {\n\t\treturn this.cachetot304hits;\n\t}",
"private long getChampNodeCount(Node series) {\n\t\tNode chrom = getSolutionChrom(series);\n\t\tif (chrom != null) {\n\t\t\tNode attribute = chrom.getFirstChild();\n\t\t\twhile (attribute != null) {\n\t\t\t\tif (attribute.getNodeName().equals(NODE_COUNT_TAG)) {\n\t\t\t\t\treturn Util.getLong(attribute);\n\t\t\t\t}\n\t\t\t\tattribute = attribute.getNextSibling();\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"private void createCommitTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index VCS_COMMIT_ID_INDEX_VCS_COMMIT on VCS_COMMIT(VCS_COMMIT_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index BEFORE_REVISION_ID_INDEX_VCS_COMMIT on VCS_COMMIT(BEFORE_REVISION_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index AFTER_REVISION_ID_INDEX_VCS_COMMIT on VCS_COMMIT(AFTER_REVISION_ID)\");\n \t}",
"public int count(char c){\n int counting = 0;\n \n if(isEmpty()){\n return counting; \n }else if(c == this.top){\n return counting += rest.count(c) + 1 ;\n }else{\n return counting = rest.count(c);\n }\n }",
"public int getCompCount(){\n return this.compCount;\n }",
"public static int offset_counter() {\n return (8 / 8);\n }",
"public long getCommitTime() { return _rev.getCommitTime()*1000L; }",
"public int count () throws IOException {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tinit();\n\t\twhile(hasNext()) {\n\t\t\tElement el = nextElement();\n\t\t\tint hash = el.GetHash();\n\t\t\tint pos = locate (list, hash);\n\t\t\tif ((pos == list.size()) || (list.get(pos) != hash)) {\n\t\t\t\tlist.add(pos, hash);\n\t\t\t}\n\t\t\t/*for (i=0; i<list.size() && list.get(i)<hash; i++) {}\n\t\t\t\tif ((i==list.size()) || (list.get(i) != el.GetHash())) {\n\t\t\t\t\tlist.add(i, hash);\n\t\t\t\t}*/\n\t\t}\n\t\treturn list.size();\n\t}",
"final public int get_count(int states, int actions) {\r\n\t\tint count = 0;\r\n\r\n\t\tlock_.lock();\r\n\r\n\t\ttry {\r\n\t\t\tBPF.getInstance().getBPFLogger().debug(TAG, \"Log size: \" + log_.size());\r\n\r\n\t\t\tfor (int i = 0; i < log_.size(); i++) {\r\n\r\n\t\t\t\tif ((log_.get(i).state().getCode() & states) != 0\r\n\t\t\t\t\t\t&& (log_.get(i).action().getCode() & actions) != 0) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tlock_.unlock();\r\n\t\t}\r\n\t\treturn count;\r\n\t}",
"public long getUpdateCounts(int index) {\n return updateCounts_.get(index);\n }",
"public synchronized int getCommitNumber()\n\t{\n\t\treturn m_dbCommitNum;\n\t}",
"private int count_events(List<Integer> events, int start_ts) {\n int l = 0, r = events.size() - 1;\n if (r == -1)\n return 0;\n if (events.get(r) < start_ts)\n return 0;\n int b = 0;\n while (l + 1 < r) {\n int mid = (l+r) / 2;\n if (events.get(mid) >= start_ts) {\n r = mid;\n } else {\n l = mid;\n }\n }\n if (events.get(r) >= start_ts) {\n b = r;\n }\n if (events.get(l) >= start_ts) {\n b = l;\n }\n int cnt = events.size() - 1 - b + 1;\n // System.out.println(cnt);\n return cnt;\n\t\t}",
"public abstract int getNumIndexes();",
"int getNodeCount();",
"int getNodeCount();",
"int getChunksLocationCount();",
"int getUnreachableCount();",
"public int getHexesMoved() {\n if (getLastStep() == null) {\n return 0;\n }\n return getLastStep().getDistance();\n }",
"private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }",
"int getSeenInfoCount();",
"@Override\n\tpublic int boardHistoryCount(int usid) {\n\t\treturn dao.boardHistoryCount(session, usid);\n\t}",
"int getLinesCount();",
"int getActionsCount();"
] | [
"0.6441644",
"0.58923346",
"0.5796712",
"0.5732093",
"0.5709883",
"0.5674648",
"0.56313854",
"0.5536244",
"0.5493177",
"0.54907554",
"0.5421669",
"0.5311873",
"0.52968955",
"0.5247269",
"0.52325475",
"0.52009135",
"0.519597",
"0.5192522",
"0.51265883",
"0.50937915",
"0.5065423",
"0.5065358",
"0.5031233",
"0.5026753",
"0.50263697",
"0.5018673",
"0.50069475",
"0.5006563",
"0.5006034",
"0.4998017",
"0.49847543",
"0.49825305",
"0.49805716",
"0.49799794",
"0.49796912",
"0.4975853",
"0.495602",
"0.49550623",
"0.49519658",
"0.49483788",
"0.49483788",
"0.49483788",
"0.494196",
"0.49288368",
"0.49105847",
"0.49016777",
"0.49015826",
"0.48940927",
"0.48696476",
"0.48435196",
"0.48384762",
"0.4827744",
"0.4820533",
"0.48076385",
"0.47989038",
"0.4794467",
"0.47872734",
"0.4780353",
"0.47776556",
"0.47717395",
"0.4748953",
"0.4748035",
"0.47435138",
"0.4732237",
"0.47239828",
"0.47209316",
"0.47177368",
"0.47172534",
"0.47146124",
"0.47102645",
"0.47098336",
"0.47089",
"0.47066414",
"0.4700733",
"0.4699624",
"0.46963406",
"0.46916407",
"0.46890706",
"0.46858764",
"0.46828496",
"0.46749854",
"0.4666456",
"0.46636558",
"0.4663212",
"0.46609017",
"0.46585682",
"0.46585166",
"0.46522075",
"0.46460092",
"0.4638857",
"0.4637255",
"0.4637255",
"0.4635545",
"0.46332794",
"0.4629016",
"0.46283954",
"0.4627928",
"0.46200448",
"0.46157777",
"0.46083915"
] | 0.7174345 | 0 |
Checks whether the project has conflicts and uncommitted changes. | public boolean[] hasConflictsAndChanges(Project project); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isDirty() {\n return !conflicts.isEmpty() || super.isDirty();\n }",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean handleDirtyConflict() {\r\n\t\treturn MessageDialog.openQuestion(getSite().getShell(),\r\n\t\t\t\tgetString(\"_UI_FileConflict_label\"),\r\n\t\t\t\tgetString(\"_WARN_FileConflict\"));\r\n\t}",
"private boolean checkConflict(String branchName,\n Commit splitPt) throws IOException {\n Commit givenCommit = findCommit(branchName);\n checkUntracked(givenCommit);\n Commit currCommit = getHeadCommit();\n HashMap<String, Blob> givenFile = givenCommit.getFile();\n checkSplitPoint(splitPt, currCommit, givenCommit);\n boolean conflictInGiven = processGivenFile(givenFile, splitPt,\n currCommit, givenCommit);\n boolean conflictInCurr = processCurrFile(currCommit.getFile(),\n splitPt, currCommit, givenCommit);\n return (conflictInCurr || conflictInGiven);\n }",
"private void checkStatus()\n {\n // If the last command failed\n if(!project.getLastCommandStatus())\n {\n view.alert(\"Error: \" + project.getLastCommandStatusMessage());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCommand lastCmd = project.getLastCommand();\n\t\t\tif (lastCmd != null && lastCmd.hasOptionalState())\n\t\t\t{\n\t\t\t\tview.loadFromJSON(lastCmd.getOptionalState());\n\t\t\t\tview.onUpdate(project.getProjectSnapshot(), false);\n\t\t\t}\n\t\t}\n }",
"@Test\n\tpublic void testIsConsistentProjectNoOpen() throws Exception {\n\t\trodinProject.close();\n\t\tassertTrue(\"closed project should be consistent\", \n\t\t\t\trodinProject.isConsistent());\n\t\tassertFalse(\"project should not be open\", rodinProject.isOpen());\n\t}",
"boolean hasProject();",
"public boolean hasChanges() {\n return !(changed.isEmpty() && defunct.isEmpty());\n }",
"public boolean hasChangeSetComputed() {\n File changelogFile = new File(getRootDir(), \"changelog.xml\");\n return changelogFile.exists();\n }",
"private void checkUnsavedChanges()\n {\n if (hasChanges) {\n DialogActivity.showConfirmDialog(mContext,\n R.string.service_gui_UNSAVED_CHANGES_TITLE,\n R.string.service_gui_UNSAVED_CHANGES,\n R.string.service_gui_SAVE, this);\n }\n else {\n cancel();\n }\n }",
"private boolean worthWaiting() {\n return !PsiDocumentManager.getInstance(myProject).hasUncommitedDocuments() && !ApplicationManager.getApplication().isWriteAccessAllowed() && !FileEditorsSplitters.isOpenedInBulk(myTextEditor.myFile);\n }",
"@Override\r\n\tpublic boolean hasPendingChanges() throws RepositoryException {\n\t\treturn false;\r\n\t}",
"public boolean isConsistent() {\n\t\tif (fRepoPath == null || (fStartId == null && fHistoryLength < 0))\n\t\t\treturn false;\n\n\t\tif (fOutputHunkGraph)\n\t\t\treturn true;\n\n\t\tif (fBuildPath == null)\n\t\t\treturn false;\n\n\t\tif (fTestClassRootPath != null && fClassRootPath != null)\n\t\t\treturn true;\n\n\t\tif ((fTestJacocoExecPath == null) != (fSourceRootPath.size() == 0)\n\t\t\t\t|| (fTestJacocoExecPath == null) != (fClassRootPath == null)\n\t\t\t\t|| (fClassRootPath == null) != (fSourceRootPath.size() == 0))\n\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public void checkDiffs(String newPojectName, String oldProjectName) throws Exception {\n\t\tDifferenceVisitor visitor = new DifferenceVisitor(oldProjectName);\n\t\tIProject currentProject = ajdtHandler.getProject(newPojectName);\n\t\tcurrentProject.accept(visitor, IResource.NONE);\n\t\tList<String> diffs = visitor.getDifferences();\n\t\tsaveDiffs(diffs);\n\t\tpriorj.setAffectedBlocks(diffs);\n\t}",
"public boolean hasChanges();",
"@Override\n\tfinal public boolean hasDoneChanges() {\n\t\treturn false;\n\t}",
"public boolean isDirty();",
"public boolean isConflicting(int org)\n\t{\n\t\treturn this.getEntryOrg(org).size() > 1;\n\t}",
"boolean hasChangeStatus();",
"public static boolean keepProjectsInSync() {\r\n\t\treturn ProjectUIPlugin.keepProjectsInSync();\r\n\t}",
"private boolean isInConflict(String contentInCur,\n String contentInGiven, String contentInSp) {\n if (bothModified(contentInCur, contentInGiven, contentInSp)) {\n if (isDifferent(contentInGiven, contentInCur)) {\n return true;\n }\n }\n return false;\n }",
"public boolean isConflictZero() {\r\n for (int x = 0; x < this.state.length; x++) {\r\n for (int y = x + 1; y < this.state.length; y++) {\r\n if (isConflict(x, this.state[x], y, this.state[y])) {\r\n // There is a conflict between a queen in A column and B column.\r\n\r\n // Record the column A.\r\n this.conflictColA = x;\r\n // Record the column B.\r\n this.conflictColB = y;\r\n\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public void checkUntracked(Commit givenCommit) {\n for (String fileName: givenCommit.getFile().keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n String contentInCWD = Utils.readContentsAsString(fileInCWD);\n Blob curBlob = getHeadCommit().getFile().get(fileName);\n if (curBlob == null) {\n if (!contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is an \"\n + \"untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n } else if (curBlob != null) {\n String contentInCurr = curBlob.getContent();\n if (!contentInCurr.equals(contentInCWD)\n && !contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is \"\n + \"an untracked file in the way; \"\n + \"delete it, or add and commit it first.\");\n System.exit(0);\n }\n }\n }\n }\n }",
"boolean isMerged();",
"public boolean getIsValid() {\n return projectName != null && packageName != null && !projectName.isEmpty() && !packageName.isEmpty();\n }",
"public boolean detectConflicts(ArrayList<Course> selectedCourses) {\n\n\t\tCourse first = selectedCourses.get(0), \n\t\t\t\tsecond = selectedCourses.get(1), third = selectedCourses.get(2);\n\n\t\tboolean b1 = false, b2 = false, b3 = false;\n\t\t\n\t\tstrBuilder = new StringBuilder();\n\t\t\n\t\tif(checkConflict(first, second)) {\n\t\t\tstrBuilder.append(\"[First] conflicts [Second]\\n\");\n\t\t\tb1 = true;\n\t\t}\n\t\t\n\t\tif(checkConflict(first, third)) {\n\t\t\tstrBuilder.append(\"[First] conflicts [Third]\\n\");\n\t\t\tb2 = true;\n\t\t}\n\t\t\n\t\tif(checkConflict(second, third)) {\n\t\t\tstrBuilder.append(\"[Second] conflicts [Third]\");\n\t\t\tb3 = true;\n\t\t}\n\t\t\n\t\tsetConflictsStr(strBuilder.toString());\n\t\t\n\t\treturn b1 || b2 || b3;\n\t}",
"public boolean isProjectOpen() {\n\t\treturn (projectFileIO != null);\n\t}",
"private boolean solutionChecker() {\n\t\t// TODO\n\t\treturn false;\n\n\t}",
"@Override\n public RefactoringStatus isValid(IProgressMonitor progress) throws CoreException,\n OperationCanceledException\n {\n return new RefactoringStatus();\n }",
"public void check() throws XMLBuildException {\r\n\r\n\t}",
"public void check() throws XMLBuildException {\r\n\r\n\t}",
"private boolean isDirty()\r\n {\r\n //\r\n return _modified;\r\n }",
"public boolean getProjectExternallyEdited()\r\n {\r\n return (m_projectExternallyEdited);\r\n }",
"public boolean isUniversallyCommitted(long transId) {\n return commitList.isUniversallyCommitted(transId);\n }",
"public boolean fullCommitNeeded ()\n {\n return true;\n }",
"protected void checkState() {\n\t\tboolean valid = true;\n\t\tinvalidFieldEditor = null;\n\t\t// The state can only be set to true if all\n\t\t// field editors contain a valid value. So we must check them all\n\t\tif (fields != null) {\n\t\t\tint size = fields.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tFieldEditor editor = fields.get(i);\n\t\t\t\tvalid = valid && editor.isValid();\n\t\t\t\tif (!valid) {\n\t\t\t\t\tinvalidFieldEditor = editor;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetValid(valid);\n\t}",
"boolean hasTransactionChangesPending() {\n// System.out.println(transaction_mod_list);\n return transaction_mod_list.size() > 0;\n }",
"private static boolean showCommitDialog(int showCommitDialogAttempts) {\n\t\tif (showCommitDialogAttempts > maxShowCommitDialogAttempts) {\n\t\t\treturn false;\n\t\t}\n\n\t\tDataContext dataContext = DataManager.getInstance().getDataContextFromFocus().getResultSync(500);\n\t\tif (dataContext == null) {\n\t\t\treturn showCommitDialog(showCommitDialogAttempts + 1);\n\t\t}\n\n\t\tAnActionEvent actionEvent = new AnActionEvent(\n\t\t\t\tnull,\n\t\t\t\tdataContext,\n\t\t\t\tActionPlaces.UNKNOWN,\n\t\t\t\tnew Presentation(),\n\t\t\t\tActionManager.getInstance(),\n\t\t\t\t0\n\t\t);\n\t\tnew CommonCheckinProjectAction().actionPerformed(actionEvent);\n\n\t\treturn true;\n\t}",
"private boolean checkConflicts(DymonPatchRequest r,Collection<DymonPatchRequest> active)\n{\n if (active_requests.isEmpty()) return false;\n if (r.getPatchOverlap() == PatchOverlap.ANY) return false;\n\n for (DymonPatchRequest ar : active) {\n if (ar.getDuration() == 0 || ar.getPatchOverlap() == PatchOverlap.ANY) continue;\n if (r.excludeOverlap(ar.getRequestName())) return true;\n if (r.getPatchOverlap() == PatchOverlap.NONE) return true;\n if (ar.excludeOverlap(r.getRequestName())) return true;\n if (ar.getPatchOverlap() == PatchOverlap.NONE) return true;\n if (ar.getPatchOverlap() == PatchOverlap.CLASS ||\n\t r.getPatchOverlap() == PatchOverlap.CLASS) {\n\t for (String s1 : r.getClasses()) {\n\t for (String s2 : ar.getClasses()) {\n\t if (s1.equals(s2)) return true;\n\t }\n\t }\n }\n }\n\n return false;\n}",
"public boolean isAtWar(@Nonnull State state) {\n for(Conflict c : conflicts) {\n if(c.getSideOf(state) != null) {\n return true;\n }\n }\n\n return false;\n }",
"private boolean Integritycheck() {\n String mail = Objects.requireNonNull(email.getEditText()).getText().toString();\n String password = Objects.requireNonNull(password1.getEditText()).getText().toString();\n String passwordAgain = Objects.requireNonNull(password2.getEditText()).getText().toString();\n String city = this.city.getText().toString();\n String fname = Objects.requireNonNull(FName.getEditText()).getText().toString();\n String Lname = Objects.requireNonNull(this.LName.getEditText()).getText().toString();\n String phone = Objects.requireNonNull(this.phone.getEditText()).getText().toString();\n\n return mail.length() < 1 || password.length() < 1 || passwordAgain.length() < 1 || city.length() < 1 || fname.length() < 1 || Lname.length() < 1 || phone.length() < 1;\n }",
"public boolean isDirty() {\r\n\t\tfor( IFormPart part : _parts ) {\r\n\t\t\tif ( part.isDirty() ) return true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean hasCompleteFile();",
"private boolean checkValidCodebase(int numFiles) {\n\t\tJFrame frame;\n\t\tif (numFiles > MAX_FILES) {\n\t\t\tframe = new JFrame();\n\t\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\t\t\"There are too many files in this codebase. Your codebase has \"\n\t\t\t\t\t\t\t+ numFiles + \" while we allow a maximum of \"\n\t\t\t\t\t\t\t+ MAX_FILES);\n\n\t\t} else if (numFiles < MIN_FILES) {\n\t\t\tframe = new JFrame();\n\t\t\tJOptionPane.showMessageDialog(frame,\n\t\t\t\t\t\"There are too few files in this codebase. Your codebase has \"\n\t\t\t\t\t\t\t+ numFiles + \" while we allow a minimum of \"\n\t\t\t\t\t\t\t+ MIN_FILES);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t\tframe.dispose();\n\t\treturn false;\n\t}",
"public boolean isAtWarWith(State state1, State state2) {\n return getConflictBetween(state1, state2) != null;\n }",
"public void checkCompatibility() {\n Utils.LOGGER.info(\"Checking compatibility...\");\n\n checkServerVersion();\n checkServerSoftware();\n\n if (incompatibilities.size() == 0) {\n Utils.LOGGER.info(\"Compatibility checks completed, no possible incompatibilities found.\");\n } else {\n Utils.LOGGER.warning(\"Compatibility checks completed, &b\" + incompatibilities.size() + \"&7 possible incompatibilities were found:\");\n incompatibilities.forEach(incompatibility -> Utils.LOGGER.warning(\"&8 - &b\" + incompatibility.getType().toString() + \"&7 check flagged: \" + incompatibility.getReason()));\n }\n }",
"@SuppressWarnings(\"SameReturnValue\")\n public boolean checkInvariant() {\n if (layerList.isEmpty()) {\n throw new IllegalStateException(\"no layer in \" + getName());\n }\n if (activeLayer == null) {\n throw new IllegalStateException(\"no active layer in \" + getName());\n }\n if (!layerList.contains(activeLayer)) {\n throw new IllegalStateException(\"active layer (\" + activeLayer.getName() + \") not in list (\" + layerList.toString() + \")\");\n }\n return true;\n }",
"void areChangesValid(\n final Iterable<Change> changes,\n final Repository repository,\n final String currentHash\n ) throws InvalidYamlFileException;",
"public boolean isCommitOnFailure () {\n return commitOnFailure;\n }",
"public boolean isInflated() {\n // TODO(cgavidia): This rule needs to be improved!\n\n boolean fixIsDelayed = false;\n\n if (this.isReportedSevere()) {\n fixIsDelayed = isFixDelayed(MAXIMUM_RELEASES_FOR_SEVERE);\n }\n\n if (this.isReportedDefault()) {\n fixIsDelayed = isFixDelayed(MAXIMUM_RELEASES_FOR_DEFAULT);\n }\n\n boolean fixIsRejected = isFixRejected();\n boolean issueIsIgnored = isIssueIgnored();\n\n return fixIsDelayed || fixIsRejected || issueIsIgnored;\n }",
"private static boolean performFirstCommitIfRequired(@Nonnull final Project project,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull VirtualFile root,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull GitRepository repository,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull ProgressIndicator indicator,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@Nonnull String url)\n\t{\n\t\tif(!repository.isFresh())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\tLOG.info(\"Trying to commit\");\n\t\ttry\n\t\t{\n\t\t\tLOG.info(\"Adding files for commit\");\n\t\t\tindicator.setText(\"Adding files to git...\");\n\n\t\t\t// ask for files to add\n\t\t\tfinal List<VirtualFile> trackedFiles = ChangeListManager.getInstance(project).getAffectedFiles();\n\t\t\tfinal Collection<VirtualFile> untrackedFiles = repository.getUntrackedFilesHolder()\n\t\t\t\t\t.retrieveUntrackedFiles();\n\t\t\tfinal List<VirtualFile> allFiles = new ArrayList<VirtualFile>();\n\t\t\tallFiles.addAll(trackedFiles);\n\t\t\tallFiles.addAll(untrackedFiles);\n\n\t\t\tfinal Ref<GithubUntrackedFilesDialog> dialogRef = new Ref<GithubUntrackedFilesDialog>();\n\t\t\tApplicationManager.getApplication().invokeAndWait(new Runnable()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tGithubUntrackedFilesDialog dialog = new GithubUntrackedFilesDialog(project, allFiles);\n\t\t\t\t\tif(!trackedFiles.isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tdialog.setSelectedFiles(trackedFiles);\n\t\t\t\t\t}\n\t\t\t\t\tDialogManager.show(dialog);\n\t\t\t\t\tdialogRef.set(dialog);\n\t\t\t\t}\n\t\t\t}, indicator.getModalityState());\n\t\t\tfinal GithubUntrackedFilesDialog dialog = dialogRef.get();\n\n\t\t\tfinal Collection<VirtualFile> files2commit = dialog.getSelectedFiles();\n\t\t\tif(!dialog.isOK() || files2commit.isEmpty())\n\t\t\t{\n\t\t\t\tGithubNotifications.showInfoURL(project, \"Successfully created empty repository on GitHub\", name, url);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tCollection<VirtualFile> files2add = ContainerUtil.intersection(untrackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> files2rm = consulo.ide.impl.idea.util.containers.ContainerUtil.subtract(trackedFiles, files2commit);\n\t\t\tCollection<VirtualFile> modified = new HashSet<VirtualFile>(trackedFiles);\n\t\t\tmodified.addAll(files2commit);\n\n\t\t\tGitFileUtils.addFiles(project, root, files2add);\n\t\t\tGitFileUtils.deleteFilesFromCache(project, root, files2rm);\n\n\t\t\t// commit\n\t\t\tLOG.info(\"Performing commit\");\n\t\t\tindicator.setText(\"Performing commit...\");\n\t\t\tGitSimpleHandler handler = new GitSimpleHandler(project, root, GitCommand.COMMIT);\n\t\t\thandler.addParameters(\"-m\", dialog.getCommitMessage());\n\t\t\thandler.endOptions();\n\t\t\thandler.run();\n\n\t\t\tVcsFileUtil.markFilesDirty(project, modified);\n\t\t}\n\t\tcatch(VcsException e)\n\t\t{\n\t\t\tLOG.warn(e);\n\t\t\tGithubNotifications.showErrorURL(project, \"Can't finish GitHub sharing process\",\n\t\t\t\t\t\"Successfully created project \", \"'\" + name + \"'\", \" on GitHub, but initial commit failed:<br/>\" +\n\t\t\t\t\t\t\te.getMessage(), url);\n\t\t\treturn false;\n\t\t}\n\t\tLOG.info(\"Successfully created initial commit\");\n\t\treturn true;\n\t}",
"public boolean checkBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tif(!building.isDestroyed()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean containsChanges() {\n return genClient.containsChanges();\n }",
"@Override\n\t\tpublic boolean isValidSolution() {\n\t\t\treturn super.isValidSolution();\n\t\t}",
"public boolean conflictCheck(String newStart, String newEnd, int customerId) throws SQLException {\r\n //Very long SQL statement to check for any conflicts\r\n String statement = \"SELECT Start, End FROM appointments WHERE Customer_ID = \"+customerId+\" AND (((Start < '\"+newStart+\"') AND ((End > '\"+newStart+\"') AND (End < '\"+newEnd+\"'))) /*Left Overlap*/ OR ((Start > '\"+newStart+\"') AND (End < '\"+newEnd+\"')) /*Inner Overlap*/ OR ((Start < '\"+newStart+\"') AND (End > '\"+newEnd+\"')) /*Outer Overlap*/ OR ((Start > '\"+newStart+\"') AND (Start < '\"+newEnd+\"'))/*Right Overlap*/ OR (Start = '\"+newStart+\"') /*Same Appointment*/ OR (End = '\"+newEnd+\"')) /*Same Appointment*/ \";\r\n\r\n\r\n ResultSet rs = conn.prepareStatement(statement).executeQuery();\r\n //If there is nothing in rs, then nothing was returned from SQL statement and no conflicts exist\r\n //System.out.println(\"No conflicts\");\r\n return rs.next();\r\n //System.out.println(\"About to return true\");\r\n }",
"@Override\r\n\tpublic boolean CheckConditions() {\n\t\treturn true;\r\n\t}",
"public boolean canUndo()\n {\n if (undoableChanges == null || undoableChanges.size() > 0)\n return true;\n else\n return false;\n }",
"public boolean areUstilWorking() {\n\t\t\n\t\treturn this.working;\n\t\t\n\t}",
"private boolean hasConflict(int tid, int varIndex, Lock.Type type) {\n if (!_lockTable.containsKey(varIndex)) {\n return false;\n }\n List<Lock> lockList = _lockTable.get(varIndex);\n if (type == Lock.Type.READ) {\n for (Lock lc : lockList) {\n // The only conflict with read is some other transaction has a write\n // lock\n if (lc.getTranId() != tid && lc.getType() == Lock.Type.WRITE) {\n return true;\n }\n }\n return false;\n } else {\n for (Lock lc : lockList) {\n // As long as other transaction holds a lock, it will conflict with\n // write\n if (lc.getTranId() != tid) {\n return true;\n }\n }\n return false;\n }\n }",
"boolean isBareRepository() throws GitException, InterruptedException;",
"private void dialogChanged() {\n\t\tIResource container = ResourcesPlugin.getWorkspace().getRoot()\n\t\t\t\t.findMember(new Path(getContainerName().get(\"ProjectPath\")));\n\n\t\tif(!containerSourceText.getText().isEmpty() && !containerTargetText.getText().isEmpty())\n\t\t{\n\t\t\tokButton.setEnabled(true);\n\t\t}\n\n\t\tif (getContainerName().get(\"ProjectPath\").length() == 0) {\n\t\t\tupdateStatus(\"File container must be specified\");\n\t\t\treturn;\n\t\t}\n\t\tif (container == null\n\t\t\t\t|| (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {\n\t\t\tupdateStatus(\"File container must exist\");\n\t\t\treturn;\n\t\t}\n\t\tif (!container.isAccessible()) {\n\t\t\tupdateStatus(\"Project must be writable\");\n\t\t\treturn;\n\t\t}\n\t\tupdateStatus(null);\n\t}",
"public boolean isItDirty() {\n\t\treturn false;\n\t}",
"@Test\n\tpublic void new_build_project_repository_is_dirty() {\n\t\tEnvironmentContext cx = null;\n\t\ttry {\n\t\t\tcx = new EnvironmentContext();\n\t\t} catch (Exception e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\t// When I create a new repository with that connection\n\t\tBuildProjectRepository repository = new BuildProjectRepositoryApiClient(cx);\n\t\t// Then it is initially dirty\n\t\tboolean dirty = false;\n\t\ttry {\n\t\t\tdirty = repository.isDirty();\n\t\t} catch (BuildProjectRepositoryException e) {\n\t\t\tfail(e.getMessage());\n\t\t}\n\t\tassertTrue(dirty);\n\t}",
"private void checkChanges() {\n CertificationStyleWrapper wrapper = (CertificationStyleWrapper) cbCertificationStyle.getSelectedItem();\n if (wrapper != null && settings.getCertificationStyle() != wrapper.style) {\n settings.setCertificationStyle(wrapper.style);\n }\n\n // set NFO filenames\n settings.clearNfoFilenames();\n if (chckbxTvShowNfo1.isSelected()) {\n settings.addNfoFilename(TvShowNfoNaming.TV_SHOW);\n }\n\n settings.clearEpisodeNfoFilenames();\n if (chckbxEpisodeNfo1.isSelected()) {\n settings.addEpisodeNfoFilename(TvShowEpisodeNfoNaming.FILENAME);\n }\n }",
"private boolean checkProjectTaskDates(Project pr)\n\t{\n\t\tfor(Task ts:taskManager.get(\"toInsert\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t}\n\t\tfor(Task ts:taskManager.get(\"toEdit\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\tArrayList<Task> tasks=null;\n\t\ttry \n\t\t{\n\t\t\ttasks=db.selectTaskforProjID(project.getProjectID());\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tErrorWindow wind = new ErrorWindow(e); \n\t\t\tUI.getCurrent().addWindow(wind);\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(Task ts:tasks)\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t }",
"public void checkIfFilesHaveChanged(NSNotification n) {\n int checkPeriod = checkFilesPeriod();\n \n if (!developmentMode && (checkPeriod == 0 || System.currentTimeMillis() - lastCheckMillis < 1000 * checkPeriod)) {\n return;\n }\n \n lastCheckMillis = System.currentTimeMillis();\n \n log.debug(\"Checking if files have changed\");\n for (Enumeration e = _lastModifiedByFilePath.keyEnumerator(); e.hasMoreElements();) {\n File file = new File((String)e.nextElement());\n if (file.exists() && hasFileChanged(file)) {\n fileHasChanged(file);\n }\n }\n }",
"public boolean checkProgramChanged(){\r\n\t\tfor(int i = 0; i < paneCount(); i++) {\r\n\t\t\tif (!checkProgramChanged(i))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }",
"private boolean checkResolve(BundleImpl b) {\n ArrayList okImports = new ArrayList();\n if (framework.perm.missingMandatoryPackagePermissions(b.bpkgs, okImports) == null &&\n checkBundleSingleton(b) == null) {\n HashSet oldTempResolved = (HashSet)tempResolved.clone();\n HashMap oldTempProvider = (HashMap)tempProvider.clone();\n HashMap oldTempRequired = (HashMap)tempRequired.clone();\n HashSet oldTempBlackList = (HashSet)tempBlackList.clone();\n tempResolved.add(b);\n if (checkRequireBundle(b) == null) {\n List r = resolvePackages(okImports.iterator());\n if (r.size() == 0) {\n return true;\n }\n }\n tempResolved = oldTempResolved;\n tempProvider = oldTempProvider;\n tempRequired = oldTempRequired;\n tempBlackList = oldTempBlackList;\n }\n return false;\n }",
"private Set<String> crossCheckDependenciesAndResolve(Map<String, List<Dependency>> dependencies) throws MojoFailureException {\n Map<String, Map<String, Dependency>> lookupTable = new HashMap<>();\n for (String bom : dependencies.keySet()) {\n Map<String, Dependency> bomLookup = new HashMap<>();\n lookupTable.put(bom, bomLookup);\n\n for (Dependency dependency : dependencies.get(bom)) {\n String key = dependencyKey(dependency);\n bomLookup.put(key, dependency);\n }\n }\n\n Map<String, Set<VersionInfo>> inconsistencies = new TreeMap<>();\n Set<String> trueInconsistencies = new TreeSet<>();\n\n // Cross-check all dependencies\n for (String bom1 : dependencies.keySet()) {\n for (Dependency dependency1 : dependencies.get(bom1)) {\n String key = dependencyKey(dependency1);\n String version1 = dependency1.getArtifact().getVersion();\n\n for (String bom2 : dependencies.keySet()) {\n // Some boms have conflicts with themselves\n\n Dependency dependency2 = lookupTable.get(bom2).get(key);\n String version2 = dependency2 != null ? dependency2.getArtifact().getVersion() : null;\n if (version2 != null) {\n Set<VersionInfo> inconsistency = inconsistencies.get(key);\n if (inconsistency == null) {\n inconsistency = new TreeSet<>();\n inconsistencies.put(key, inconsistency);\n }\n\n inconsistency.add(new VersionInfo(dependency1, bom1));\n inconsistency.add(new VersionInfo(dependency2, bom2));\n\n if (!version2.equals(version1)) {\n trueInconsistencies.add(key);\n }\n }\n }\n }\n }\n\n // Try to solve with preferences\n Set<String> resolvedInconsistencies = new TreeSet<>();\n DependencyMatcher preferencesMatcher = new DependencyMatcher(this.preferences);\n for (String key : trueInconsistencies) {\n int preferred = 0;\n for (VersionInfo nfo : inconsistencies.get(key)) {\n if (preferencesMatcher.matches(nfo.getDependency())) {\n preferred++;\n }\n }\n\n if (preferred == 1) {\n resolvedInconsistencies.add(key);\n }\n }\n\n trueInconsistencies.removeAll(resolvedInconsistencies);\n\n if (trueInconsistencies.size() > 0) {\n StringBuilder message = new StringBuilder();\n message.append(\"Found \" + trueInconsistencies.size() + \" inconsistencies in the generated BOM.\\n\");\n\n for (String key : trueInconsistencies) {\n message.append(key);\n message.append(\" has different versions:\\n\");\n for (VersionInfo nfo : inconsistencies.get(key)) {\n message.append(\" - \");\n message.append(nfo);\n message.append(\"\\n\");\n }\n }\n\n throw new MojoFailureException(message.toString());\n }\n\n return resolvedInconsistencies;\n }",
"@Test\n\tpublic void testcheckConflict() {\n\t\tActivity a1 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"MW\", 1330, 1445);\n\t\tActivity a2 = new Course(\"CSC216\", \"Programming Concepts - Java\", \"001\", 4, \"sesmith5\", 12, \"TH\", 1330, 1445);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t a2.checkConflict(a1);\n\t\t assertEquals(\"Incorrect meeting string for this Activity.\", \"MW 1:30PM-2:45PM\", a1.getMeetingString());\n\t\t assertEquals(\"Incorrect meeting string for possibleConflictingActivity.\", \"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t } catch (ConflictException e) {\n\t\t fail(\"A ConflictException was thrown when two Activities at the same time on completely distinct days were compared.\");\n\t\t }\n\t\t a1.setMeetingDays(\"TH\");\n\t\t a1.setActivityTime(1445, 1530);\n\t\t try {\n\t\t a1.checkConflict(a2);\n\t\t fail(); //ConflictException should have been thrown, but was not.\n\t\t } catch (ConflictException e) {\n\t\t //Check that the internal state didn't change during method call.\n\t\t assertEquals(\"TH 2:45PM-3:30PM\", a1.getMeetingString());\n\t\t assertEquals(\"TH 1:30PM-2:45PM\", a2.getMeetingString());\n\t\t }\n\t}",
"public boolean isUpToDate() {\n return false;\n }",
"public int getConflicts() {\r\n return conflicts;\r\n }",
"public boolean isDirty()\n\t{\n\t\tsynchronized (fileToSaveableMap)\n\t\t{\n\t\t\tfor (Saveable saveable: fileToSaveableMap.values())\n\t\t\t{\n\t\t\t\tif (saveable.isDirty())\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean checkProgramChanged(int i)\r\n\t{\r\n\t\tBoolean bool = true;\r\n\t\tif (isPaneModified(i)) {\r\n\t\t\tparentFrame.showProgram();\r\n\t\t\tsetSelectedIndex(i);\r\n\t\t\tString message = Messages\r\n\t\t\t\t.getString(\"EditorFrame.tab.discardChanges.confirm\"); //$NON-NLS-1$\r\n\t\t\tString title = Messages\r\n\t\t\t\t.getString(\"EditorFrame.program.discardChanges.confirmTitle\"); //$NON-NLS-1$\r\n\t\t\tObject[] options = { Messages.getString(\"tangara.yes\"), //$NON-NLS-1$\r\n\t\t\t\tMessages.getString(\"tangara.cancel\") }; //$NON-NLS-1$\r\n\t\t\tint answer = JOptionPane.showOptionDialog(this, message, title,\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION,\r\n\t\t\t\tJOptionPane.QUESTION_MESSAGE,\r\n\t\t\t\tnull, // do not use a custom Icon\r\n\t\t\t\toptions, // the titles of buttons\r\n\t\t\t\toptions[0]);\r\n\t\t\tif (answer != JOptionPane.OK_OPTION)\r\n\t\t\t\tbool = false;\r\n\t\t}\r\n\t\treturn bool;\r\n\t}",
"private boolean stillOpenElsewhere(IFile file)\n\t{\n\t\tSaveable[] openModels = getSaveableService().getOpenModels();\n\t\tfor (Saveable saveable: openModels)\n\t\t{\n\t\t\t// temporary solution until we will have the same unit of\n\t\t\t// saveability in all the ISaveablesSources (tree editor, table\n\t\t\t// view, etc)\n\t\t\tif (saveable instanceof BasicModelSaveable)\n\t\t\t{\n\t\t\t\tIWorkbenchPart[] partsForSaveable = getSaveableService().getPartsForSaveable(saveable);\n\n\t\t\t\tfor (IWorkbenchPart iWorkbenchPart: partsForSaveable)\n\t\t\t\t{\n\t\t\t\t\tif (iWorkbenchPart instanceof IEditorPart)\n\t\t\t\t\t{\n\t\t\t\t\t\tIEditorInput editorInput = ((IEditorPart) iWorkbenchPart).getEditorInput();\n\t\t\t\t\t\tIFile fileFromEditorInput = EcoreUIUtil.getFileFromEditorInput(editorInput);\n\t\t\t\t\t\tif (file.getFullPath().equals(fileFromEditorInput.getFullPath()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"private boolean check() {\n if (!isBST()) System.out.println(\"Not in symmetric order\");\n if (!isSizeConsistent()) System.out.println(\"Subtree counts not consistent\");\n if (!isRankConsistent()) System.out.println(\"Ranks not consistent\");\n return isBST() && isSizeConsistent() && isRankConsistent();\n }",
"public void verify() {\n lblSourcePackageFolder();\n lblClasspath();\n btAddJARFolder();\n btRemove();\n lblOutputFolderOrJAR();\n txtOutputFolder();\n btBrowse();\n lstClasspath();\n cboSourcePackageFolder();\n btMoveUp();\n btMoveDown();\n lblOnlineError();\n }",
"static boolean sourceCoveredByProjectViewTargets(LocationContext context) {\n Collection<TargetKey> targetsBuildingSource =\n SourceToTargetMap.getInstance(context.project)\n .getRulesForSourceFile(new File(context.file.getPath()));\n return !targetsBuildingSource.isEmpty()\n && sourceInProjectTargets(context, targetsBuildingSource);\n }",
"public boolean hasAtLeastOneReference(Project project);",
"public boolean hasAssignedProject()\r\n {\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn (_assignedProject!=null);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }",
"public boolean isCommitted(long transId) {\n return commitList.isCommitted(transId);\n }",
"public boolean shouldDisposeProjectFiles(File projectFile) {\n\n\t\tboolean shouldDispose = true;\n\n\t\tif (projectFile != null) {\n\n\t\t\t// getting the name of the project\n\t\t\tString projectName = Toolkit.getFileName(projectFile);\n\t\t\tString currentPrjName = \"\";\n\t\t\tFile handleProjectFile = null;\n\n\t\t\tif (projectName != null && !projectName.equals(\"\")) {\n\n\t\t\t\t// for each handle\n\t\t\t\tfor (SVGHandle hnd : Editor.getEditor().getHandlesManager()\n\t\t\t\t\t\t.getHandles()) {\n\n\t\t\t\t\t// getting the project file of this handle\n\t\t\t\t\thandleProjectFile = hnd.getScrollPane().getSVGCanvas()\n\t\t\t\t\t\t\t.getProjectFile();\n\n\t\t\t\t\tif (handleProjectFile != null) {\n\n\t\t\t\t\t\tcurrentPrjName = Toolkit.getFileName(handleProjectFile);\n\n\t\t\t\t\t\tif (currentPrjName != null\n\t\t\t\t\t\t\t\t&& currentPrjName.equals(projectName)) {\n\n\t\t\t\t\t\t\tshouldDispose = false;\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}\n\t\t\t}\n\t\t}\n\n\t\treturn shouldDispose;\n\t}",
"@Test(expected = RuntimeException.class)\r\n \tpublic void testCommit() throws ESException {\n \t\tlocalProject.commit();\r\n \t\tfail(\"Should not be able to commit an unshared Project!\");\r\n \t}",
"private boolean checkComp() {\n\t\tfor (int i = 0; i < comp.length; i++) {\n\t\t\tfor (int j = 0; j < comp[i].length; j++) {\n\t\t\t\tif (comp[i][j] != answer[i][j]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean shouldCommit();",
"public final boolean hasDependents() {\r\n synchronized (f_seaLock) {\r\n return !f_dependents.isEmpty();\r\n }\r\n }",
"private void checkLegal() {\n\tif (undoStack.size() == 2) {\n ArrayList<Integer> canGo = \n getMoves(undoStack.get(0), curBoard);\n boolean isLegal = false;\n int moveTo = undoStack.get(1);\n for (int i = 0; i < canGo.size(); i++) {\n if(canGo.get(i) == moveTo) {\n isLegal = true;\n break;\n }\n }\n\n if(isLegal) {\n curBoard = moveUnit(undoStack.get(0), \n moveTo, curBoard);\n clearStack();\n\n moveCount++;\n\t setChanged();\n\t notifyObservers();\n }\n\t}\n }",
"protected boolean attemptCommit() {\n \t\t\tpretendCommit();\n \t\t\tif (isValid()) {\n \t\t\t\tfDocumentUndoManager.commit();\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n \t\t}",
"boolean consistencyCheck(){\n\n String jbbInstdir = (String)typeToDir.get(\"jbbinst\");\n String simInstdir = (String)typeToDir.get(\"siminst\");\n String jbbColldir = (String)typeToDir.get(\"jbbcoll\");\n String simColldir = (String)typeToDir.get(\"simcoll\");\n if(simInstdir != null){\n simInstdir += \"/p01\";\n }\n if(simColldir != null){\n simColldir += \"/p01\";\n }\n return readAndCompare(jbbInstdir,simInstdir,jbbColldir,simColldir);\n }",
"public boolean hasChanges() {\n return Math.abs(this.x) > 1.0E-5f || Math.abs(this.y) > 1.0E-5f || Math.abs(this.scale - this.minimumScale) > 1.0E-5f || Math.abs(this.rotation) > 1.0E-5f || Math.abs(this.orientation) > 1.0E-5f;\n }",
"boolean isBranchTaken();",
"private void setNewStatusIfNeeded() {\n \t\tfor(FileDiffDirectory dir : directories ) {\n \t\t\tif (dir.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(FileDiffFile file : files ) {\n \t\t\tif (file.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}",
"public boolean canSaveChanges() {\n return this.additionalRequirementsAdapter.hasChanged(this.controller.getListing());\n }",
"public boolean isComplete() {\n return addedFrontWork.size() == 0 && addedBackWork.size() == 0 && sawAllDone.get();\n }",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"boolean hasBuild();",
"public void checkConsistency(List inconsistencies);",
"private void checkCloseStatus() throws IllegalStateException {\n checkState(!closed, \"The algorithm is already closed\");\n }",
"protected static List<Conflict> getConflicts(){\n\t\treturn setOfConflicts;\n\t}"
] | [
"0.69187033",
"0.65180224",
"0.6167319",
"0.59612656",
"0.58014995",
"0.57972085",
"0.57893693",
"0.57009774",
"0.5668049",
"0.5610332",
"0.5610121",
"0.55182403",
"0.5479471",
"0.5471442",
"0.54656976",
"0.54594344",
"0.5459061",
"0.5428745",
"0.54153293",
"0.5385341",
"0.5382777",
"0.5377938",
"0.53498846",
"0.5270996",
"0.5267376",
"0.5234875",
"0.5232349",
"0.5197158",
"0.517767",
"0.5176797",
"0.5176797",
"0.51656723",
"0.5147709",
"0.5142864",
"0.5099186",
"0.50946397",
"0.5092509",
"0.50918335",
"0.5090404",
"0.5064941",
"0.50478554",
"0.504421",
"0.5042568",
"0.50359863",
"0.5022558",
"0.50186473",
"0.50133866",
"0.5012385",
"0.500842",
"0.5003449",
"0.5002392",
"0.4998768",
"0.49945268",
"0.49828416",
"0.49809146",
"0.49741462",
"0.49715367",
"0.4970028",
"0.49697536",
"0.49689445",
"0.49605218",
"0.495356",
"0.49501643",
"0.49466974",
"0.4945654",
"0.49370828",
"0.4935073",
"0.49308172",
"0.49214563",
"0.49196845",
"0.49150816",
"0.49088192",
"0.48995498",
"0.48908532",
"0.48906627",
"0.48807636",
"0.48777357",
"0.48748055",
"0.48725185",
"0.4868686",
"0.48682037",
"0.4866472",
"0.4863428",
"0.48632494",
"0.4861726",
"0.4858658",
"0.48543724",
"0.48498717",
"0.48457336",
"0.48454374",
"0.48426878",
"0.48343563",
"0.4833732",
"0.48330745",
"0.48265475",
"0.4825969",
"0.4825256",
"0.48242357",
"0.48234215",
"0.48227155"
] | 0.7662465 | 0 |
Starts canceling process for cloning. This may take some time. | void cancelClone(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void cancel() {\n\t\tfinish();\n\t}",
"public void cancel() {\r\n\t\tbStop = true;\r\n\t}",
"void cancelOriginal();",
"public synchronized void cancel() {\n }",
"public void cancel(){\n cancelled = true;\n }",
"public void cancel() {\n\t\tcancelled = true;\n\t}",
"void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }",
"@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}",
"public void restart() {\r\n\t\tthis.cancel = false;\r\n\t}",
"public void cancel() {\n\t\tcancel(false);\n\t}",
"private void cancel() {\n mFuture.cancel(mMayInterruptIfRunning);\n }",
"public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}",
"public void cancel() {\n btCancel().push();\n }",
"private void onCancel() {\n cancelDisposalProcess();\n }",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"public void cancel();",
"@Override\n public void cancel() {\n }",
"@Override\n public void cancel() {\n }",
"synchronized void cancel()\n {\n state = DNSState.CANCELED;\n notifyAll();\n }",
"@Override\n public void cancel() {\n HologramHandler.despawnHologram(hologram);\n if (!mseEntity.isTamed())\n mseEntity.setCustomName(mseEntity.getDefaultName());\n threadCurrentlyRunning = false;\n super.cancel();\n }",
"@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}",
"@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}",
"@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}",
"@Override\n public void cancel() {\n\n }",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"void cancel();",
"public boolean cancel();",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"@Override\n public void cancel() {\n\n }",
"public void cancel() {\n ei();\n this.fd.eT();\n this.oJ.b(this);\n this.oM = Status.CANCELLED;\n if (this.oL != null) {\n this.oL.cancel();\n this.oL = null;\n }\n }",
"public void cancel() {\n\t\tinterrupt();\n\t}",
"void cancel() {\n\tsleepThread.interrupt();\n }",
"@Override\n\tpublic void cancel() {\n\t\t\n\t}",
"public static void cancelProcess() {\r\n\r\n if (m_Proc != null) {\r\n if (m_bProcInterruptible) {\r\n m_Proc.destroy();\r\n m_Proc = null;\r\n m_bProcCanceled = true;\r\n }\r\n }\r\n\r\n }",
"public void cancel(){\n\t\tstartTime = -1;\n\t\tplayersFinished = new ArrayList<>();\n\t\tplayersFinishedMarked = new ArrayList<Player>();\n\t\tDNFs = new ArrayList<>();\n\t\ttempNumber = 0;\n\t\tmarkedNum = 0;\n\t\t//normally we'd mark started racers as such, but we are don't know how many started.\n\t}",
"public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }",
"@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"public void cancel() {\n\t}",
"@Override\n public void cancel() {\n\n }",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"@Override\n\tpublic void canceled() {\n\t\t\n\t}",
"public void cancel() {\n if( this.attachedThread != null ) {\n this.attachedThread.interrupt();\n }\n else {\n this.attachedFuture.cancel( true );\n\n if( this.attachedHipanFuture != null ) {\n this.attachedHipanFuture.fail( new InterruptedException( \"Task was canceled\" ) );\n }\n }\n }",
"public boolean stopKVMClone() {\n System.err.println(\"Not implemented\");\n return false;\n }",
"public void cancelCurrentProcess()\n\t{\n\t\tcurrentProcess = Processes.peek();\n\t\tProcesses.dequeue();\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"@Override\n\tpublic void cancel() {\n\n\t}",
"public void cancel();",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmyAssetInstaller.copyAll();\n\n\t\t\t\t\tringProgressDialog.dismiss();\n\t\t\t\t}",
"private void executeImportClone() {\n if (objectsToClone.size() == 0) {\n clearCachedAssignedVmNames();\n executeImport();\n return;\n }\n ImportCloneModel entity = new ImportCloneModel();\n Object object = objectsToClone.iterator().next();\n entity.setEntity(object);\n entity.setTitle(getImportConflictTitle());\n entity.setHelpTag(HelpTag.import_conflict);\n entity.setHashName(\"import_conflict\"); //$NON-NLS-1$\n entity.getCommands().add(UICommand.createDefaultOkUiCommand(\"onClone\", this)); //$NON-NLS-1$\n entity.getCommands().add(UICommand.createCancelUiCommand(\"closeClone\", this)); //$NON-NLS-1$\n\n setConfirmWindow(entity);\n }",
"public void cancel()\n\t{\n\t}",
"public void killTarea() {\r\n\t\tsuper.cancel();\r\n\t}",
"public void checkCancel() throws CancellationException;",
"public void cancel()\n {\n this.controller.cancelDownloads();\n\n // Synchronised to avoid a race condition\n synchronized(this.cancelledMonitor)\n {\n // Set the cancelled field to true\n this.cancelled = true;\n }\n theLogger.info(\"Cancel request recieved from UI\");\n }",
"public native static int cancel();",
"@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }",
"@Override\n\tprotected void cancelCallback() {\n\t\twasCancelled = true;\n\t\tclose();\n\t}",
"public abstract boolean cancel();",
"private void cancelLaunchClientJob() {\n if (launchClientJob != null) {\n return;\n }\n\n launchClientJob = findLaunchClientJob();\n\n if (launchClientJob != null) {\n launchClientJob.cancel();\n }\n }",
"public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n protected void onPreExecute() {\n cancellationSignal.setOnCancelListener(\n new CancellationSignal.OnCancelListener() {\n @Override\n public void onCancel() { // on different thread\n cancelLoad();\n cancel(false);\n }\n });\n }",
"@Override\n public boolean cancel(boolean mayInterruptIfRunning) {\n callable.kill();\n\n return super.cancel(mayInterruptIfRunning);\n }",
"@Override\n public void run() {\n try {\n Thread.sleep(25000);\n dialog.cancel();\n Intent intent=new Intent(ProgressActivity.this,SudokuActivity.class);\n startActivity(intent);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"private void pararCancion() {\n clip.stop();\n clip.close();\n clip = null;\n }",
"abstract protected void cancelCommands();",
"protected boolean reallyCancel() throws Exception { return true; }",
"public boolean prepareClone() {\n\n switch (this.type) {\n\n case KVM:\n System.out.println(\"Preparing the KVM clone \" + this.name);\n System.err.println(\"Not yet implemented for the KVM clones\");\n break;\n\n case VIRTUALBOX:\n\n System.out.println(\"Preparing the Virtualbox clone \" + this.name);\n CloneState cloneState = getTheStateOfPhysicalMachine();\n System.out.println(\"clone \" + this.name + \" is on \" + cloneState + \" state\");\n\n switch (cloneState) {\n\n case STOPPED:\n if (startVBClone()) {\n System.out.println(\"Started the Virtualbox clone \" + this.name);\n this.status = CloneState.RESUMED;\n return true;\n } else {\n System.err.println(\"Could not start the Virtualbox clone \" + this.name);\n this.status = CloneState.STOPPED;\n return false;\n }\n\n case PAUSED:\n if (resumeVBClone()) {\n System.out.println(\"Resumed the Virtualbox clone \" + this.name);\n this.status = CloneState.RESUMED;\n return true;\n } else {\n System.err.println(\"Could not resume the Virtualbox clone \" + this.name);\n this.status = CloneState.STOPPED;\n return false;\n }\n\n case RESUMED:\n System.out.println(\"The Virtualbox clone \" + this.name + \" was already started\");\n return true;\n\n default:\n break;\n }\n\n return false;\n\n case AMAZON:\n System.out.println(\"Preparing the Amazon clone \" + this.name);\n System.err.println(\"Not yet implemented for the amazon clones\");\n break;\n\n case UNKNOWN:\n System.err.println(\"I don't know how to start the clone \" + this.name);\n printInfoAboutCloneName();\n break;\n }\n\n return false;\n }",
"public void cancel() {\n target.setAllowFlight(false);\n target.setWalkSpeed(0.01F);\n target.setFlySpeed(0.01F);\n targets.remove(target);\n\n JavaUtils.broadcastStage(\"done\",this);\n }",
"public void cancel(){\n \tLog.v(TAG, \"Cancel request\");\n \t// Cancel the initialization task\n \tif(initTask != null){\n \t\tLog.i(TAG, \"initTask was not null.\");\n \t\tinitTask.cancel(true);\n \t\tinitTask = null;\n \t}\n }",
"private void stopButtonActionPerformed() {\n if(ascopy != null) {\n ascopy.stopCopy();\n }\n\n if(ascopyREC != null) {\n ascopyREC.stopCopy();\n }\n\n copyStopped = true;\n stopButton.setEnabled(false);\n }",
"@Override\n public void checkCancelled() throws SVNCancelException {\n }",
"public final synchronized void restart() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t}",
"public void cancel() {\n request.disconnect();\n }",
"protected void cancel() {\n abort();\n if(cancelAction != null) {\n cancelAction.accept(getObject());\n }\n }",
"public void startAmazonClone() {\n System.err.println(\"Not implemented\");\n }",
"@Override\n\tpublic void teleopInit() {\n\t\tchooser.getSelected().cancel();\t\t\n\t}",
"public void cancelSendlogFiles() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(cancelButton);\n\t\tcancelButton.click();\n\n\t}",
"public boolean cancel(boolean mayInterruptIfRunning)\r\n/* 351: */ {\r\n/* 352:433 */ Object result = this.result;\r\n/* 353:434 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 354:435 */ return false;\r\n/* 355: */ }\r\n/* 356:438 */ synchronized (this)\r\n/* 357: */ {\r\n/* 358:440 */ result = this.result;\r\n/* 359:441 */ if ((isDone0(result)) || (result == UNCANCELLABLE)) {\r\n/* 360:442 */ return false;\r\n/* 361: */ }\r\n/* 362:445 */ this.result = CANCELLATION_CAUSE_HOLDER;\r\n/* 363:446 */ if (hasWaiters()) {\r\n/* 364:447 */ notifyAll();\r\n/* 365: */ }\r\n/* 366: */ }\r\n/* 367:451 */ notifyListeners();\r\n/* 368:452 */ return true;\r\n/* 369: */ }",
"@Override\n public boolean isCancelled() {\n return false;\n }",
"@Override\n\t\t\tpublic boolean isCanceled() {\n\t\t\t\treturn false;\n\t\t\t}",
"public synchronized void cancelExecution() {\n this.status = EXECUTION_CANCELED;\n if (this.context != null)\n context.close(true);\n }",
"public void cancelCurrentComputation(){\n\t\tft.cancel(true);\n\t}",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"default void cancel() {\n\t\tcancelOriginal();\n\t\tFutureStream.super.cancel();\n\n\t}",
"private void startRepositoryCheckProcess(final RemoteDBConnectDialogLight sourceRCD, final String sourceTitle,\n final int sourceUrlIndex) {\n Thread performer = new Thread(new Runnable() {\n public void run() {\n repositoryMismatchErrors = \"\";\n\n // first disable/enable the relevant buttons\n copyToASpaceButton.setEnabled(false);\n repositoryCheckButton.setEnabled(false);\n stopButton.setEnabled(true);\n\n // clear text area and show progress bar\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(\"\");\n copyProgressBar.setStringPainted(true);\n copyProgressBar.setString(\"Checking Repository Mismatches ...\");\n copyProgressBar.setIndeterminate(true);\n\n try {\n // print the connection message\n consoleTextArea.append(sourceRCD.getConnectionMessage());\n\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextField.getText();\n\n // create the hash map use to see if a certain record should be exported automatically\n // this is needed here otherwise an null pointer error is thrown\n HashMap <String, Boolean> publishMap = new HashMap<String, Boolean>();\n publishMap.put(\"names\", publishNamesCheckBox.isSelected());\n publishMap.put(\"subjects\", publishSubjectsCheckBox.isSelected());\n publishMap.put(\"accessions\", publishAccessionsCheckBox.isSelected());\n publishMap.put(\"digitalObjects\", publishDigitalObjectsCheckBox.isSelected());\n publishMap.put(\"resources\", publishResourcesCheckBox.isSelected());\n\n ascopyREC = new ASpaceCopyUtil(sourceRCD, host, admin, adminPassword);\n ascopyREC.setCheckRepositoryMismatch();\n ascopyREC.setPublishHashMap(publishMap);\n\n // set the reset password, and output console and progress bar\n ascopyREC.setOutputConsole(consoleTextArea);\n ascopyREC.setProgressIndicators(copyProgressBar, errorCountLabel);\n\n // set the progress bar from doing it's thing since the ascopy class is going to take over\n copyProgressBar.setIndeterminate(false);\n\n // get the number of resources to copy here to allow it to be reset while the migration\n // has been started, but migration of resources has not yet started\n int resourcesToCopy = 1000000;\n int threads = 1;\n\n ArrayList<String> resourcesIDsList = new ArrayList<String>();\n\n if(!copyStopped) {\n ascopyREC.setResourcesToCopyList(resourcesIDsList);\n ascopyREC.checkRepositoryMismatches(resourcesToCopy, threads);\n }\n\n repositoryMismatchMap = ascopyREC.getRepositoryMismatchMap();\n\n ascopyREC.cleanUp();\n\n // set the number of errors and message now\n String errorCount = \"\" + ascopyREC.getASpaceErrorCount();\n errorCountLabel.setText(errorCount);\n repositoryMismatchErrors = ascopyREC.getCurrentRecordCheckMessage() + \"\\n\\nTotal errors: \" + errorCount;\n } catch (Exception e) {\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(\"Unrecoverable exception, recording checking stopped ...\\n\\n\");\n\n // This is null for some reason so let commit it out.\n if(ascopyREC != null) {\n consoleTextArea.append(ascopyREC.getCurrentRecordInfo() + \"\\n\\n\");\n }\n\n consoleTextArea.append(getStackTrace(e));\n e.printStackTrace();\n } finally {\n sourceRCD.closeSession();\n }\n\n checkRepositoryMismatch = false;\n ascopyREC = null;\n\n if(copyRecordCheckBox.isSelected()) {\n CopyToASpaceButtonActionPerformed();\n } else {\n reEnableCopyButtons();\n }\n }\n });\n\n performer.start();\n }",
"private void startASpaceCopyProcess(final RemoteDBConnectDialogLight sourceRCD, final String sourceTitle,\n final int sourceUrlIndex) {\n Thread performer = new Thread(new Runnable() {\n public void run() {\n // first disable/enable the relevant buttons\n copyToASpaceButton.setEnabled(false);\n //errorLogButton.setEnabled(false);\n stopButton.setEnabled(true);\n\n // clear text area and show progress bar\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(\"\");\n copyProgressBar.setStringPainted(true);\n copyProgressBar.setString(\"Copying Records ...\");\n copyProgressBar.setIndeterminate(true);\n\n try {\n // print the connection message\n consoleTextArea.append(sourceRCD.getConnectionMessage());\n\n String host = hostTextField.getText().trim();\n String admin = adminTextField.getText();\n String adminPassword = adminPasswordTextField.getText();\n\n boolean simulateRESTCalls = simulateCheckBox.isSelected();\n boolean extentPortionInParts = byuExtentRadioButton.isSelected();\n boolean ignoreUnlinkedNames = ignoreUnlinkedNamesCheckBox.isSelected();\n boolean ignoreUnlinkedSubjects = ignoreUnlinkedSubjectsCheckBox.isSelected();\n\n // create the hash map use to see if a certain record should be exported automatically\n HashMap<String, Boolean> publishMap = new HashMap<String, Boolean>();\n publishMap.put(\"names\", publishNamesCheckBox.isSelected());\n publishMap.put(\"subjects\", publishSubjectsCheckBox.isSelected());\n publishMap.put(\"accessions\", publishAccessionsCheckBox.isSelected());\n publishMap.put(\"digitalObjects\", publishDigitalObjectsCheckBox.isSelected());\n publishMap.put(\"resources\", publishResourcesCheckBox.isSelected());\n publishMap.put(\"repositories\", publishReposCheckBox.isSelected());\n\n ascopy = new ASpaceCopyUtil(sourceRCD, host, admin, adminPassword);\n ascopy.setPublishHashMap(publishMap);\n ascopy.setRepositoryMismatchMap(repositoryMismatchMap);\n ascopy.setSimulateRESTCalls(simulateRESTCalls);\n ascopy.setExtentPortionInParts(extentPortionInParts);\n ascopy.setIgnoreUnlinkedRecords(ignoreUnlinkedNames, ignoreUnlinkedSubjects);\n\n // load the mapper script if specified\n if (svd != null && useScriptCheckBox.isSelected()) {\n String script = svd.getCurrentScript();\n ascopy.setMapperScript(script);\n } else if (cvd != null && useScriptCheckBox.isSelected()) {\n String script = cvd.getCurrentScript();\n ascopy.setMapperScript(script);\n }\n\n // set the reset password, and output console and progress bar\n ascopy.setResetPassword(resetPasswordTextField.getText().trim());\n ascopy.setOutputConsole(consoleTextArea);\n ascopy.setProgressIndicators(copyProgressBar, errorCountLabel);\n ascopy.setCopying(true);\n\n // try getting the session and only continue if a valid session is return;\n if (!ascopy.getSession()) {\n consoleTextArea.append(\"No session, nothing to do ...\\n\");\n reEnableCopyButtons();\n return;\n } else {\n consoleTextArea.append(\"Administrator authenticated ...\\n\");\n }\n\n // check the current aspace version to make sure\n String aspaceVersion = ascopy.getASpaceVersion();\n double aspaceVersionDouble = new Double(aspaceVersion.replaceAll(\"[^0-9.]\", \"\"));\n\n //Check if working\n System.out.println(\"Version: \" + aspaceVersion);\n\n if (aspaceVersion.isEmpty()) ascopy.setCopyAssessments();\n if (!aspaceVersion.isEmpty() && aspaceVersionDouble < 2.1) {\n String message = \"Unsupported Archivesspace Version\\nSupport Versions: v2.1 and higher ...\\n\";\n\n consoleTextArea.append(message);\n reEnableCopyButtons();\n return;\n }\n\n // process special options here. This could be done better but its the\n // quickest way to do it for now\n String ids = resourcesToCopyTextField.getText().trim();\n ArrayList<String> resourcesIDsList = new ArrayList<String>();\n\n if (!ids.isEmpty()) {\n String[] sa = ids.split(\"\\\\s*,\\\\s*\");\n for (String id : sa) {\n // check to see if we are dealing with a special command\n // or an id to copy\n if (id.startsWith(\"-\")) {\n processSpecialOption(ascopy, id);\n } else {\n resourcesIDsList.add(id);\n }\n }\n }\n\n\n\n if (continueMigration && ascopy.uriMapFileExist()) {\n ascopy.loadURIMaps();\n } else {\n // first load the notes etc types and resource from the destination database if not using saved ones\n if (!copyStopped) ascopy.loadRepositories();\n }\n\n // set the progress bar from doing it's thing since the ascopy class is going to take over\n copyProgressBar.setIndeterminate(false);\n\n if (!copyStopped) ascopy.copyLookupList();\n if (!copyStopped) ascopy.copyRepositoryRecords();\n if (!copyStopped) ascopy.mapRepositoryGroups();\n if (!copyStopped) ascopy.copyLocationRecords();\n if (!copyStopped) ascopy.addAdminUser(admin, \"Administrator User\", adminPassword);\n if (!copyStopped) ascopy.copyUserRecords();\n if (!copyStopped) ascopy.copySubjectRecords();\n if (!copyStopped) ascopy.copyNameRecords();\n if (!copyStopped) ascopy.copyAccessionRecords();\n if (!copyStopped) ascopy.copyDigitalObjectRecords();\n\n // get the number of resources to copy here to allow it to be reset while the migration\n // has been started, but migration of resources has not yet started\n int resourcesToCopy = 1000000;\n int threads = 1;\n\n try {\n boolean useBatchImport = batchImportCheckBox.isSelected();\n ascopy.setUseBatchImport(useBatchImport);\n\n // get the number of threads to run the copy process in\n threads = Integer.parseInt(threadsTextField.getText());\n\n // get the number of resource to copy\n if (resourcesIDsList.isEmpty()) {\n resourcesToCopy = Integer.parseInt(numResourceToCopyTextField.getText());\n } else {\n resourcesToCopy = resourcesIDsList.size();\n }\n } catch (NumberFormatException nfe) {}\n\n // check to make sure we didn't stop the copy process or resource to copy is\n // not set to zero. Setting resources to copy to zero is a convenient way\n // to generate a URI map which contains no resource records for testing purposes\n if (!copyStopped && resourcesToCopy != 0) {\n ascopy.setResourcesToCopyList(resourcesIDsList);\n ascopy.copyResourceRecords(resourcesToCopy, threads);\n }\n\n if (!copyStopped) ascopy.addAssessments();\n\n ascopy.cleanUp();\n\n // set the number of errors and message now\n String errorCount = \"\" + ascopy.getASpaceErrorCount();\n errorCountLabel.setText(errorCount);\n migrationErrors = ascopy.getSaveErrorMessages() + \"\\n\\nTotal errors/warnings: \" + errorCount;\n } catch (IntentionalExitException e) {\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(e.getMessage());\n consoleTextArea.append(\"\\nWill attempt to save URI maps ...\");\n if (ascopy != null) ascopy.saveURIMaps();\n else consoleTextArea.append(\"\\nCould not save URI maps ...\\nMigration will need to be restarted ...\");\n } catch (Exception e) {\n saveConsoleText(consoleTextArea);\n consoleTextArea.setText(\"Unrecoverable exception, migration stopped ...\\n\\n\");\n\n if(ascopy != null) {\n ascopy.saveURIMaps();\n consoleTextArea.append(ascopy.getCurrentRecordInfo() + \"\\n\\n\");\n } else {\n consoleTextArea.append(\"Could not save URI maps ...\\nMigration will need to be restarted ...\");\n }\n\n consoleTextArea.append(getStackTrace(e));\n\n } finally {\n sourceRCD.closeSession();\n }\n\n reEnableCopyButtons();\n }\n });\n\n performer.start();\n }",
"@Override\n protected void checkCanceled() {\n long l = System.currentTimeMillis();\n if (l >= myTime) {\n throw new ProcessCanceledException();\n }\n }",
"@Override\n\t\tpublic boolean isCanceled() {\n\t\t\treturn false;\n\t\t}",
"public void cancel() {\n try {\n bluetoothServerSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"void cancel(@NonNull java.lang.Runnable command, boolean mayInterruptIfRunning);"
] | [
"0.63153976",
"0.6038008",
"0.59268296",
"0.5842338",
"0.5792323",
"0.5762018",
"0.5744302",
"0.5735879",
"0.5655637",
"0.5637905",
"0.56346333",
"0.56252295",
"0.56238174",
"0.5611981",
"0.5576666",
"0.5567709",
"0.5554287",
"0.5554287",
"0.5554287",
"0.5554287",
"0.5554287",
"0.5554287",
"0.55512804",
"0.5542837",
"0.5528721",
"0.55177027",
"0.5515954",
"0.55075705",
"0.54980654",
"0.5496322",
"0.54906195",
"0.54906195",
"0.54906195",
"0.54906195",
"0.54906195",
"0.54843104",
"0.5480481",
"0.5480481",
"0.5480481",
"0.5472083",
"0.54697496",
"0.54697275",
"0.54689634",
"0.5466573",
"0.5458248",
"0.5457098",
"0.54438114",
"0.5411335",
"0.54101634",
"0.5408047",
"0.5408047",
"0.5387576",
"0.53758943",
"0.53444463",
"0.5335169",
"0.5335169",
"0.5335169",
"0.532142",
"0.53078854",
"0.5307363",
"0.53054917",
"0.5299747",
"0.5290444",
"0.5283979",
"0.5283593",
"0.5270321",
"0.526261",
"0.52375245",
"0.5233649",
"0.5233246",
"0.5220707",
"0.5216661",
"0.521315",
"0.5206817",
"0.5201986",
"0.51953703",
"0.51917344",
"0.51912814",
"0.51854944",
"0.5177034",
"0.5175136",
"0.5172851",
"0.51642925",
"0.5158526",
"0.5147141",
"0.51437795",
"0.5138541",
"0.5127765",
"0.5107021",
"0.5097101",
"0.5087813",
"0.5079477",
"0.50726074",
"0.50592417",
"0.50559694",
"0.50531894",
"0.5049314",
"0.50444776",
"0.5042097",
"0.5029925"
] | 0.74184805 | 0 |
This method return tracking branch. | public String getTrackingBranch(Project project); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getBranch()\");\n Via via=(Via)sipHeader;\n return via.getBranch();\n }",
"public GitBranch getBranch() { return GitDir.this.getBranch(getName()); }",
"public File getBranch() {\n return _branch;\n }",
"public GitBranch getRemoteBranch()\n {\n if(getName().contains(\"/remotes/\")) return null;\n return getRemote().getBranch(getSimpleName());\n }",
"public String getBranchNo() {\r\n return branchNo;\r\n }",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"public String getBranchNo() {\n return branchNo;\n }",
"public String getBranchno() {\n return branchno;\n }",
"public BranchDetails getBranchDetails(){\n\t\n\tbranchD = BranchDetails.getBranchDetails();\t\n\treturn branchD;\n\t}",
"public Optional<String> getBranch() {\n return Optional.fromNullable(branch);\n }",
"String branch();",
"public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}",
"String getCurrentBranchName(Project project);",
"public Integer getBranchNum() {\r\n return branchNum;\r\n }",
"public static Branch getDefaultBranch(){\n BranchDao bDAO = new BranchDao();\n Branch branch = null;\n try {\n branch = bDAO.findByName(\"Main Branch\"); //from SQL script\n } catch (DaoException ex) {\n Logger.getLogger(BranchCtrl.class.getName()).log(Level.SEVERE, null, ex);\n ErrorMsg.setLastError(ErrorMsg.ERROR_SQL_ERROR);\n }\n if(branch==null){\n branch = defaultBranch;\n }\n return branch;\n }",
"public String getBranchLabel() {\r\n\t\treturn branchLabel;\r\n\t}",
"java.lang.String getBranchId();",
"public String getBranchcode() {\n return branchcode;\n }",
"public String getBranchId() {\n return branchId;\n }",
"public File curHeadBranch() {\n File result = null;\n String headName = Utils.readObject(HEADNAME, String.class);\n for (String fileName: Utils.plainFilenamesIn(Main.ALL_BRANCHES)) {\n if (fileName.equals(headName)) {\n File currFile = Utils.join(Main.ALL_BRANCHES, fileName);\n result = currFile;\n }\n }\n return result;\n }",
"public String getBranchName() {\r\n return branchName;\r\n }",
"public String getBranchName() {\n return branchName;\n }",
"String getBranchName();",
"public String getBranchName() {\n return branchName;\n }",
"java.lang.String getBranchName();",
"private String getBranchForRevision(SVNLogEntry logEntry) {\n @SuppressWarnings(\"unchecked\")\n Set<String> paths = logEntry.getChangedPaths().keySet();\n // Finds the common path among all those paths\n String commonPath = null;\n for (String path : paths) {\n if (commonPath == null) {\n commonPath = path;\n } else {\n int diff = StringUtils.indexOfDifference(commonPath, path);\n commonPath = StringUtils.left(commonPath, diff);\n }\n }\n // Gets the branch for this path\n if (commonPath != null) {\n return extractBranch(commonPath);\n } else {\n // No path in the revision: no branch!\n return null;\n }\n }",
"Commit getCurrentCommit() {\n String branchh = null;\n Commit prev = null;\n File currentB = new File(\".gitlet/current\");\n for (File file: currentB.listFiles()) {\n branchh = file.getName();\n }\n return deserializeCommit(\".gitlet/heads/\" + branchh);\n }",
"public Integer getBranchId() {\n return branchId;\n }",
"public BranchGroup getMasterBranch()\r\n {\r\n \treturn mb.branch;\r\n }",
"public String getBranchname() {\n return branchname;\n }",
"public GitRef getHead() { return getRef(Constants.HEAD); }",
"public String getUpdateBranch() {\n return updateBranch;\n }",
"public GitBranch getBranch(String aName) { return GitDir.this.getBranch(getName() + '/' + aName); }",
"com.google.protobuf.ByteString\n getBranchIdBytes();",
"com.google.protobuf.ByteString\n getBranchNameBytes();",
"private Branch getBranch(String branchId) {\n \t\tBranch result = null;\n\n \t\tif (branchId != null) {\n \t\t\t// if branch doesn't exist, create it\n \t\t\tif (!branches.containsKey(branchId)) {\n \t\t\t\tresult = new Branch();\n \t\t\t\tresult.setBranchId(branchId);\n \t\t\t\tbranches.put(branchId, result);\n \t\t\t} else {\n \t\t\t\tresult = branches.get(branchId);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"public void getBranchCommand() {\n\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public boolean hasBranch() {\n\t if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasBranch() \");\n Via via=(Via)sipHeader;\n \n return via.hasParameter(Via.BRANCH); \n }",
"public BranchType getBranchType() {\n long __key = this.branchTypeId;\n if (branchType__resolvedKey == null || !branchType__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n BranchTypeDao targetDao = daoSession.getBranchTypeDao();\n BranchType branchTypeNew = targetDao.load(__key);\n synchronized (this) {\n branchType = branchTypeNew;\n \tbranchType__resolvedKey = __key;\n }\n }\n return branchType;\n }",
"public java.lang.String getBranchName() {\n return branchName;\n }",
"public String getBranchCd() {\r\n return branchCd;\r\n }",
"public String getBranchCode() {\n return normalizedBic.substring(BRANCH_CODE_INDEX, BRANCH_CODE_INDEX + BRANCH_CODE_LENGTH);\n }",
"public static String getBranch(@NotNull JSONObject jsonObject) {\n String ref = jsonObject.get(\"ref\").toString();\n return ref.split(\"^(refs/heads/)\")[1];\n }",
"public String getBranchStatus() {\r\n return (String) getAttributeInternal(BRANCHSTATUS);\r\n }",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public short getBranchOffset() {\r\n\t\treturn branchOffset;\r\n\t}",
"public List<PackerTreeNode<T>> getBranch() {\n final var result = new ArrayList<PackerTreeNode<T>>();\n result.add(this);\n if (parent != null) {\n result.addAll(parent.getBranch());\n }\n return result;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"feature/design-new-api\", value = \"The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).\")\n public String getBranch() {\n return branch;\n }",
"public String getTracking() {\n\t\t\treturn tracking;\n\t\t}",
"public static String gitBranch(String repoDir) throws IOException {\n return exec(\"git rev-parse --abbrev-ref HEAD\", repoDir).trim();\n }",
"public Branch getBranchById(int id){\n if( id==0 ) {\n return defaultBranch;\n } else {\n BranchDao bDAO = new BranchDao();\n Branch branch = null;\n try {\n branch = bDAO.findById(id);\n } catch (DaoException ex) {\n Logger.getLogger(BranchCtrl.class.getName()).log(Level.SEVERE, null, ex);\n ErrorMsg.setLastError(ErrorMsg.ERROR_SQL_ERROR);\n }\n return branch;\n }\n }",
"List<String> branches();",
"public int getBranchCount() { return _brcnt; }",
"public String getConfigChangeSetBranchName() {\n return configChangeSetBranchName;\n }",
"public String getBranchPrefix() {\n\t\tString revisionNumber = logEntry.getRevision();\n\t\tint lastDotRev = revisionNumber.lastIndexOf(\".\");\n\t\tif (lastDotRev < 0) {\n\t\t\tVersionTreePlugin.log(IStatus.ERROR, \"Malformed revision: \"+revisionNumber);\n\t\t\treturn null;\n\t\t}\n\n\t\tString branchNumber = revisionNumber.substring(0, lastDotRev);\n\t\tint lastDotBr = branchNumber.lastIndexOf(\".\");\n\t\tif (lastDotBr > 0) {\n\t\t\tString branchPrefix = branchNumber.substring(0, lastDotBr) +\n\t\t\t\t\t\".0\" + branchNumber.substring(lastDotBr);\n\t\t\treturn branchPrefix;\n\t\t}\n\t\treturn branchNumber;\n\t}",
"public List<Map<String, Object>> getAvailableBranches()\n {\n List<String> allTenants = getWikiSelector().getMptIdSelector().getTenants(GWikiWeb.getRootWiki());\n List<Map<String, Object>> branchProps = new ArrayList<Map<String, Object>>();\n\n // default new branch is selected\n this.selectedBranch = NEW_BRANCH;\n\n for (String tenantId : allTenants) {\n\n // if approve you have to copy the file in a branch other than draft\n if (PlcConstants.DRAFT_ID.equalsIgnoreCase(tenantId) == true\n && FileState.APPROVED_CHIEF_EDITOR.name().equals(newPageState) == true) {\n continue;\n }\n\n GWikiProps branchInfoProp = wikiContext.runInTenantContext(tenantId, getWikiSelector(),\n new CallableX<GWikiProps, RuntimeException>()\n {\n @Override\n public GWikiProps call() throws RuntimeException\n {\n return PlcUtils.getBranchInfo(wikiContext);\n }\n });\n\n if (branchInfoProp == null) {\n continue;\n }\n\n // only add offline branches\n if (BranchState.OFFLINE.name()\n .equals(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_STATE)) == true) {\n Map<String, Object> m = new HashMap<String, Object>();\n m.putAll(branchInfoProp.getMap());\n m.put(\"RELEASE_DATE_DATE\",\n GWikiProps.parseTimeStamp(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE)));\n branchProps.add(m);\n\n // if branch release date matches article release date -> preselect branch\n String release = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE);\n Date branchReleaseDate = GWikiProps.parseTimeStamp(release);\n if (branchReleaseDate != null && branchReleaseDate.equals(getStartDateOfArticle())) {\n selectedBranch = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_ID);\n }\n }\n }\n return branchProps;\n }",
"public java.lang.String getBranchDesc() {\n return branchDesc;\n }",
"public Integer getTrackingNo() {\n return trackingNo;\n }",
"public GHFrom getRef() {\n return ref;\n }",
"public synchronized String generateBranchId() {\n long num = rand.nextLong() + Utils.counter++ + System.currentTimeMillis();\n byte bid[] = digester.digest(Long.toString(num).getBytes());\n return SIPConstants.BRANCH_MAGIC_COOKIE + Utils.toHexString(bid);\n }",
"@Override\n public GetBranchResult getBranch(GetBranchRequest request) {\n request = beforeClientExecution(request);\n return executeGetBranch(request);\n }",
"public GitRemote getRemote() { return getRemote(\"origin\"); }",
"private ObjectId getBranchRevision(String branchSpec, Path dest) {\n if (!branchSpec.contains(\"/\")) {\n\n // <tt>BRANCH</tt> is recognized as a shorthand of <tt>*/BRANCH</tt>\n // so check all remotes to fully qualify this branch spec\n String fqbn = \"origin/\" + branchSpec;\n ObjectId result = getHeadRevision(fqbn, dest);\n if (result != null) {\n return result;\n }\n } else {\n // either the branch is qualified (first part should match a valid remote)\n // or it is still unqualified, but the branch name contains a '/'\n String repository = \"origin\";\n String fqbn;\n if (branchSpec.startsWith(repository + \"/\")) {\n fqbn = \"refs/remotes/\" + branchSpec;\n } else if (branchSpec.startsWith(\"remotes/\" + repository + \"/\")) {\n fqbn = \"refs/\" + branchSpec;\n } else if (branchSpec.startsWith(\"refs/heads/\")) {\n fqbn = \"refs/remotes/\" + repository + \"/\" + branchSpec.substring(\"refs/heads/\".length());\n } else {\n //Try branchSpec as it is - e.g. \"refs/tags/mytag\"\n fqbn = branchSpec;\n }\n\n ObjectId result = getHeadRevision(fqbn, dest);\n if (result != null) {\n return result;\n }\n\n //Check if exact branch name <branchSpec> exists\n fqbn = \"refs/remotes/\" + repository + \"/\" + branchSpec;\n result = getHeadRevision(fqbn, dest);\n if (result != null) {\n return result;\n }\n }\n\n ObjectId result = getHeadRevision(branchSpec, dest);\n if (result != null) {\n return result;\n }\n\n throw new RepositoryException(\"Couldn't find any revision to build. Verify the repository and branch configuration.\");\n }",
"public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}",
"public RelocateBranch() {\n }",
"WithCreate withBranch(String branch);",
"public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}",
"public Branch branch(String owner, String repo, String branch) {\n return apiClient.deserialize(apiClient.get(String.format(\"/repos/%s/%s/branchs/%s\", owner, repo, branch)), Branch.class);\n }",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control. Include branch as empty string for\n * VsoTfvc..\n *\n * @param branch The repo branch of the source control. Include branch as empty string for VsoTfvc.\n * @return the next definition stage.\n */\n WithCreate withBranch(String branch);\n }",
"public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}",
"public String trackingId() {\n return this.trackingId;\n }",
"public static GitClient getOrCreate() {\n\t\tIPath path = ConfigPersistenceManager.getPathToGit();\n\t\tString reference = ConfigPersistenceManager.getBranch();\n\t\tString projectKey = ConfigPersistenceManager.getProjectKey();\n\t\treturn getOrCreate(path, reference, projectKey);\n\t}",
"public Set<String> branches() {\r\n\t\treturn branchesPartOf;\r\n\t}",
"public String getTrack()\n\t{\n\t\treturn bgm;\n\t}",
"public Commit getHeadCommit() {\n Commit result = null;\n File headFile = new File(Main.DOTFILE, HEADNAME.getName());\n if (headFile.exists()) {\n String id = Utils.readObject(HEADNAME, String.class);\n File associatedFile = new File(Main.ALL_BRANCHES, id);\n if (associatedFile.exists()) {\n String headID = Utils.readObject(associatedFile, String.class);\n File cmt = new File(Main.ALL_COMMITS, headID);\n result = Utils.readObject(cmt, Commit.class);\n }\n }\n return result;\n }",
"private List<Branch> findBranchs()\r\n\t{\t\r\n\t\tList<Branch> localBranchs = new ArrayList<>();\r\n\t\tHashMap<String, Node> destinationNodes = new HashMap<>();\r\n\t\t\r\n\t\t// Percorre todos os arcos da rede\r\n\t\tfor (Edge edge: this.getEdges())\r\n\t\t{\t\r\n\t\t\t// Se ha carga no no destino do arco, este no � uma folha da rede\r\n\t\t\tif (edge != null && edge.getDestinationNode().getLoads().size() > 0) \r\n\t\t\t{\t\r\n\t\t\t\t// Verifica se h� mais de um arco com a mesma carga\r\n\t\t\t\tif (!destinationNodes.containsKey(edge.getDestinationNode().getLabel()))\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\tBranch branch = new Branch(edge.getDestinationNode().getLabel());\r\n\t\t\t\t\tbranch.addEdges(edge);\r\n\t\t\t\t\tEdge newEdge = edge.getReference();\r\n\t\t\t\t\tdestinationNodes.put(edge.getDestinationNode().getLabel(), edge.getDestinationNode());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// percorre os elementos amontantes do no e monta o laco\r\n\t\t\t\t\twhile (newEdge != null) \r\n\t\t\t\t\t{\t\t\r\n\t\t\t\t\t\tbranch.addEdges(newEdge.getReference());\r\n\t\t\t\t\t\tnewEdge = newEdge.getReference();\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tlocalBranchs.add(branch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\r\n\t\treturn localBranchs; \r\n\t}",
"Git getGit();",
"public String toString() {\r\n\t\treturn \"Jump branchLabel: \" + branchLabel;\r\n\t}",
"boolean isBranchTaken();",
"public static String setDefaultBranch(Project project) {\n String defaultBranch = SourcegraphConfig.getInstance(project).getDefaultBranch();\n if (defaultBranch == null || defaultBranch.length() == 0) {\n Properties props = readProps();\n defaultBranch = props.getProperty(\"defaultBranch\", null);\n }\n return defaultBranch;\n }",
"public String trackingType() {\n return this.trackingType;\n }",
"public Branch branchFromFile(String name) {\n File branchFile = Utils.join(_branch, name);\n if (!branchFile.exists()) {\n throw new IllegalArgumentException(\n \"No branch file with that name found.\");\n }\n return Utils.readObject(branchFile, Branch.class);\n }",
"public Commit getLeaf(){\n\t\treturn myLeaf;\n\t}",
"interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control..\n *\n * @param branch The repo branch of the source control.\n * @return the next definition stage.\n */\n Update withBranch(String branch);\n }",
"public int getBranchCount() {\n return this.branchCount;\n }",
"public GHFrom getSha() {\n return sha;\n }",
"@Override\n\tpublic String[] goPreviosBranch(String[] currentBranch) {\n\t\treturn null;\n\t}",
"private Iterator<TraceLog> getBranchIterator(File logFile) {\n\t\treturn null;\n\t}",
"public String getRefNodeType() {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"lfims:branchDetails\";\r\n\t\t\t\t\t}",
"public GHCommitPointer getBase() {\n return base;\n }",
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"public String viewBranchLiability() {\n\t\tthis.setViewOrNewAction(true);\n\t\treturn null;\n\t}"
] | [
"0.7004923",
"0.6909643",
"0.68587464",
"0.67680925",
"0.67323685",
"0.669299",
"0.66823435",
"0.6521628",
"0.6511686",
"0.64730674",
"0.645698",
"0.6384125",
"0.6339549",
"0.63390887",
"0.6266651",
"0.6251087",
"0.62461656",
"0.62285125",
"0.6206572",
"0.6168185",
"0.6153415",
"0.6136566",
"0.6103667",
"0.6093221",
"0.6087567",
"0.60471123",
"0.60251075",
"0.6018337",
"0.60181504",
"0.6009932",
"0.59946513",
"0.5985983",
"0.5938159",
"0.59327996",
"0.5921688",
"0.59150517",
"0.58994275",
"0.589661",
"0.589661",
"0.589661",
"0.589661",
"0.589661",
"0.589661",
"0.589661",
"0.589661",
"0.5868802",
"0.58179975",
"0.58159494",
"0.5800687",
"0.57469827",
"0.5705718",
"0.56931996",
"0.5682322",
"0.56519425",
"0.56410277",
"0.56239796",
"0.5613847",
"0.558668",
"0.55677944",
"0.5522941",
"0.5518707",
"0.5513404",
"0.54911333",
"0.5479564",
"0.54516566",
"0.5393215",
"0.53840035",
"0.5375637",
"0.5368805",
"0.534533",
"0.5340715",
"0.5329848",
"0.53244823",
"0.52788234",
"0.5264287",
"0.52433383",
"0.52411896",
"0.5232622",
"0.52277017",
"0.5214666",
"0.52060914",
"0.52059525",
"0.5204724",
"0.51971513",
"0.5186566",
"0.51685274",
"0.5133736",
"0.5130519",
"0.5123894",
"0.51229554",
"0.5110362",
"0.5096699",
"0.50920796",
"0.50901157",
"0.5074584",
"0.5070535",
"0.5069249",
"0.5067839",
"0.5064726",
"0.50644433"
] | 0.8001077 | 0 |
This method return all commits for currently selected project | public List<Commit> getAllCommits(Project project, String branchName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }",
"public List<String> getAllCommits() {\n return Utils.plainFilenamesIn(Main.ALL_COMMITS);\n }",
"public GitCommit[] getCommits()\n {\n List <GitCommit> list = new ArrayList(); for(GitCommit c=getCommit(); c!=null; c = c.getParent()) list.add(c);\n return list.toArray(new GitCommit[list.size()]);\n }",
"public ArrayList<ModelCommit> getCommits() {\n\t\treturn commits;\n\t}",
"public List<Commit> getAllCommits(Repository repo) throws Exception {\n List<Commit> commits = new ArrayList<>();\n RevWalk walk = this.createAllRevsWalk(repo, null);\n walk.markStart(walk.parseCommit(repo.resolve(\"HEAD\")));\n for (RevCommit r: walk){\n if(r.getParents().length>0){\n Commit c = getCommit(repo, r, r.getParent(0));\n commits.add(c);\n }else{\n Commit c = new Commit(r);\n commits.add(c);\n }\n\n }\n return commits;\n }",
"private ArrayList getCommitteList() {\r\n /**\r\n * This sends the functionType as 'G' to the servlet indicating to\r\n * get the details of all existing committees with the required\r\n * information\r\n */\r\n \r\n Vector vecBeans = new Vector();\r\n String connectTo = CoeusGuiConstants.CONNECTION_URL + \"/comMntServlet\";\r\n RequesterBean request = new RequesterBean();\r\n request.setDataObject(\"\"+CoeusConstants.IACUC_COMMITTEE_TYPE_CODE);\r\n request.setFunctionType(COMMITTEE_LIST_FOR_MODULE);\r\n AppletServletCommunicator comm = new AppletServletCommunicator(\r\n connectTo, request);\r\n /**\r\n * Updated for REF ID :0003 Feb'21 2003.\r\n * Hour Glass implementation while DB Trsactions Wait\r\n * by Subramanya Feb' 21 2003\r\n */\r\n setCursor( new Cursor( Cursor.WAIT_CURSOR ) );\r\n comm.send();\r\n ResponderBean response = comm.getResponse();\r\n setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );\r\n \r\n if (response.isSuccessfulResponse()) {\r\n vecBeans = response.getDataObjects();\r\n }\r\n return new ArrayList(vecBeans);\r\n }",
"public String findCommitters() {\n\t\tSet<String> result = new HashSet<String>();\n\t\tfor (Cell cell : cells.values()) {\n\t\t\tfor (SimpleUser committer : cell.getCommitters()) {\n\t\t\t\tString cleanCommitterId = cleanString(committer.getId());\n\t\t\t\tresult.add(cleanCommitterId);\n\t\t\t\tString cleanCommitterName = cleanString(committer.getName());\n\t\t\t\tresult.add(cleanCommitterName);\n\t\t\t}\n\t\t}\n\t\treturn Util.join(result, \" \");\n\t}",
"Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"public List<Project> getAllProjects();",
"public ArrayList<Commit> getCommmit() {\r\n return commmit;\r\n }",
"public int getCommits() {\n return Integer.parseInt(getCellContent(COMMITS));\n }",
"public void showGlobal() {\n List<String> allCommits = getAllCommits();\n for (String cmt: allCommits) {\n File commitFile = new File(Main.ALL_COMMITS, cmt);\n Commit associatedCommit =\n Utils.readObject(commitFile, Commit.class);\n printCommitLog(associatedCommit);\n }\n }",
"@GET\n @Path(\"all\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResult() {\n JSONArray array = new JSONArray();\n JSONObject result = new JSONObject();\n\n List<User> users = userDb.listAllUsers();\n for (User user : users) {\n JSONObject ob = db.getCommitResultByStudent(user.getId());\n array.put(ob);\n }\n result.put(\"result\", array); \n\n return Response.ok().entity(result.toString()).build();\n }",
"@Override\n public Set<Committee> getAllCommittee(Editor editor) {\n Set<Committee> committeeSet = new HashSet<>();\n\n\n return committeeSet;\n }",
"public JSONObject getProjectCommitRecord(int pgId) {\n String sql = \"SELECT * FROM Project_Commit_Record WHERE pgId=?\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }",
"public List<Commit> commits(String owner, String repo, String sha, long page) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/commits\", owner, repo),\n Maps.NEW(\"sha\", sha)\n .add(\"page\", page),\n null),\n Commit.class);\n }",
"List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"Commit getCurrentCommit() {\n String branchh = null;\n Commit prev = null;\n File currentB = new File(\".gitlet/current\");\n for (File file: currentB.listFiles()) {\n branchh = file.getName();\n }\n return deserializeCommit(\".gitlet/heads/\" + branchh);\n }",
"public List<Build> getBuildsForProject(int projectId);",
"@GetMapping(value=\"/getProjectDetails/completed\")\n\tpublic List<Project> getAllProjectDetails()\n\t{\n\t\treturn integrationClient.getProjectDetiails();\n\t}",
"public abstract List<ProjectBean> getProjectList();",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"public List<Project> findAllProject() {\n\treturn projectmapper.findProject(null);\n}",
"List<ChangedFile> getChangedFiles(Project project);",
"@NonNull\n public String getCommitId() {\n return this.commitId;\n }",
"CommitIndex getCommittedIndex() {\n return committed;\n }",
"@Override\n public Mono<List<GitLogDTO>> getCommitHistory(String defaultApplicationId, MultiValueMap<String, String> params) {\n\n String branchName = params.getFirst(FieldName.BRANCH_NAME);\n\n return applicationService.getApplicationByBranchNameAndDefaultApplication(branchName, defaultApplicationId, READ_APPLICATIONS)\n .flatMap(application -> {\n GitApplicationMetadata gitData = application.getGitApplicationMetadata();\n if (gitData == null || StringUtils.isEmptyOrNull(application.getGitApplicationMetadata().getBranchName())) {\n return Mono.error(new AppsmithException(\n AppsmithError.INVALID_GIT_CONFIGURATION,\n \"branch name is not available. Please reconfigure the application to connect to git repo\"\n ));\n }\n Path baseRepoSuffix = Paths.get(application.getOrganizationId(), gitData.getDefaultApplicationId(), gitData.getRepoName());\n // Checkout to branch\n return Mono.zip(\n gitExecutor.checkoutToBranch(baseRepoSuffix, gitData.getBranchName())\n .onErrorResume(e -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"checkout\", e.getMessage()))),\n Mono.just(baseRepoSuffix)\n );\n })\n .flatMap(tuple -> {\n Path baseRepoSuffix = tuple.getT2();\n return gitExecutor.getCommitHistory(baseRepoSuffix)\n .onErrorResume(e -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"log\", e.getMessage())));\n });\n }",
"public ProjectsList getProjects() {\n return projects.clone();\n }",
"List<Project> selectAll();",
"public List<String> getProjects() {\r\n\t\treturn projects;\r\n\t}",
"private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }",
"public IProject [] getProjects(){\n\t\treturn projects;\n\t}",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"public String getAllCommitteeMembers(){\r\n\t\tString allCommitteeMembers = \"\";\r\n\t\tfor(int index = 0; index < committeeMembers.size(); ++index){\r\n\t\t\tallCommitteeMembers += committeeMembers.get(index).returnNameInString() + \"\\n\\t\";\r\n\t\t}\r\n\t\treturn allCommitteeMembers;\r\n\t}",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"public ArrayList<Project> getProjects(){\n return this.projects;\n }",
"long getCommitID() {\r\n return commit_id;\r\n }",
"public List<ProjectEntity> getProjectByName() {\n\t\treturn null;\n\t}",
"public Map<String, CommitNode> getChildren() {\r\n\t\treturn children;\r\n\t}",
"public ChangeLogSet<? extends Entry> getChangeSet() {\n if(scm==null)\n scm = new CVSChangeLogParser();\n \n if(changeSet==null) // cached value\n changeSet = calcChangeSet();\n return changeSet;\n }",
"public void findCommits(String logMsg) {\n List<String> allCommitID = getAllCommits();\n int countTotal = 0;\n for (String cmt: allCommitID) {\n File commitFile = new File(Main.ALL_COMMITS, cmt);\n Commit associatedCommit =\n Utils.readObject(commitFile, Commit.class);\n if (associatedCommit.getLogMsg().equals(logMsg)) {\n System.out.println(cmt);\n countTotal = countTotal + 1;\n }\n }\n if (countTotal == 0) {\n System.out.println(\"Found no commit with that message.\");\n }\n }",
"@Override\n public void onSuccess(List<GitHubCommit> commits) {\n view.processResponse(commits);\n }",
"RetrieveCommitsStatisticsResultResponse retrieveCommits(final RetrieveCommitsStatisticsRequest request);",
"@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"private Changelist[] getChanges() {\n String depot = parent.getDepot();\n String counterName = parent.getCounter();\n Client client = Client.getClient();\n\n // Obtain the most recent changelist available on the client\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Obtain the lower boundary for the changelist results\n Counter counter = Counter.getCounter(counterName);\n int counterVal = 0;\n if (counter != null) {\n counterVal = counter.getValue();\n } else {\n counterVal = toChange.getNumber();\n }\n\n return Changelist.getChanges(depot, counterVal, toChange.getNumber());\n }",
"void getAllProjectList(int id);",
"public Commit getCommitById(int id) {\r\n for (Commit c : this.commmit) {\r\n if (c.getId() == id) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }",
"public List<ProjectIdea> showAll(){\n try {\n List<ProjectIdea> result = new ArrayList<ProjectIdea>();\n CloseableIterator<ProjectIdea> itr = super.closeableIterator();\n try {\n while (itr.hasNext()) {\n ProjectIdea tmp = itr.next();\n result.add(tmp);\n }\n } finally {\n itr.close();\n }\n return result;\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n }",
"public List<com.MyBlog.entity.Archivescommit> FindAll() {\n\t\treturn acmapper.FindAll();\n\t}",
"public List<Project> findAllProject() {\n\t\tProject project;\r\n\t\tList<Project> projectList = new ArrayList<Project>();\r\n\t\tString query = \"SELECT * FROM TA_PROJECTS\";\r\n\t\tSqlRowSet srs = jdbcTemplate.queryForRowSet(query);\r\n\t\twhile(srs.next()){\r\n\t\t\tproject = new Project();\r\n\t\t\tproject.setProjectID(srs.getString(1));\r\n\t\t\tproject.setProjectName(srs.getString(2));\r\n\t\t\tproject.setManagerID(srs.getString(3));\r\n\t\t\tprojectList.add(project);\r\n\t\t}\r\n\t\treturn projectList;\r\n\t}",
"public Collection getOpenedRepositories() {\r\n\t\t\r\n\t\treturn repositories.values();\r\n\t}",
"public List<GLJournalApprovalVO> getProject(String OrgId, String ClientId, String projectId) {\n String sqlQuery = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n List<GLJournalApprovalVO> list = null;\n try {\n list = new ArrayList<GLJournalApprovalVO>();\n sqlQuery = \" SELECT C_PROJECT.C_PROJECT_ID AS ID,C_PROJECT.NAME FROM C_PROJECT WHERE AD_ORG_ID IN (\"\n + OrgId + \") \" + \" AND AD_CLIENT_ID IN (\" + ClientId + \") AND C_PROJECT_ID IN (\"\n + projectId + \") \";\n st = conn.prepareStatement(sqlQuery);\n rs = st.executeQuery();\n while (rs.next()) {\n GLJournalApprovalVO VO = new GLJournalApprovalVO();\n VO.setId(rs.getString(1));\n VO.setName(rs.getString(2));\n list.add(VO);\n\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return list;\n }",
"public static void main(String[] args) throws IOException, SQLException {\n\n // boilerplate\n sourceDB = AndroidDBManager.getProductionInstance();\n analysisDB = AndroidDBManager.getAnalysisInstance();\n\n BufferedWriter resFile = new BufferedWriter(new FileWriter(new File(\"commits.csv\")));\n\n // get the list of committers first\n List<AnalysisPeople> committers = analysisDB.getPeopleForTheTag(\"change\");\n System.out.println(\"will process \" + committers.size() + \" people records\");\n\n for (AnalysisPeople p : committers) {\n System.out.println(p.getEmail() + \" start: \" + p.getActivity_begin() + \", end: \"\n + p.getActivity_end());\n\n List<Change> changes = sourceDB.getAuthorChanges(p.getId(), p.getActivity_begin(),\n p.getActivity_end());\n System.out.println(\" .. \" + changes.size() + \" change(s) found.\");\n\n for (Change c : changes) {\n StringBuilder csvLine = new StringBuilder();\n StringBuilder sbTemp = new StringBuilder();\n\n // date/author/project/target/commits\n sbTemp.append(c.getAuthor_date()).append(COMMA);\n sbTemp.append(\"\\\"\").append(p.getEmail()).append(\"\\\"\").append(COMMA);\n sbTemp.append(sourceDB.getProject(c.getProject_id()).getName()).append(COMMA);\n for (ChangeTarget target : sourceDB.getTargets(c.getId())) {\n csvLine.append(sbTemp.toString()).append(\"\\\"\").append(target.getTarget()).append(\"\\\"\")\n .append(COMMA);\n csvLine.append(target.isAdded()).append(COMMA);\n csvLine.append(target.isEdited()).append(COMMA);\n csvLine.append(target.isDeleted()).append(COMMA).append(CR);\n resFile.write(csvLine.toString());\n }\n }\n resFile.close();\n }\n }",
"@GetMapping(value = \"/getProjectDetails/ongoing\")\n\tpublic List<Project> getOngoingProjects()\n\t{\n\t\treturn integrationClient.getOngoingProjects();\n\t}",
"public static void log() {\n String branch = commitPointers.readHeadCommit()[0];\n String currName = commitPointers.readHeadCommit()[1];\n File cFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n Commit curr = Utils.readObject(cFile, Commit.class);\n\n while (currName != null) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + curr.commitID);\n if (curr.parentID.size() == 2) {\n System.out.println(\"Merge: \" + curr.parentID.get(0).substring(0, 7) + \" \" + curr.parentID.get(1).substring(0, 7));\n }\n System.out.println(\"Date: \" + curr.timeStamp.format(myFormatObj) + \" -0800\");\n System.out.println(curr.message);\n System.out.println();\n\n currName = curr.parentID.get(0);\n\n if (currName != null) {\n File newcFile = Utils.join(Commit.COMMIT_FOLDER, currName + \".txt\");\n curr = Utils.readObject(newcFile, Commit.class);\n }\n }\n }",
"List <ProjectAssignment> findAssignmentsByProject (int projectId);",
"public List<AbstractProject> getProjectList() {\n\t\tList<AbstractProject> projectList = new ArrayList<AbstractProject>();\n\t\tConnection conn = getConnection();\n\t\tPreparedStatement stmtSelect = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tStringBuilder sbSelect = new StringBuilder(SELECT)\n\t\t\t\t.append(projectIdColumnName).append(COMMA)\n\t\t\t\t.append(projectNameColumnName)\n\t\t\t\t.append(FROM).append(projectTableName);\n\n\t\t\tstmtSelect = conn.prepareStatement(sbSelect.toString());\n\t\t\trs = stmtSelect.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) { \n\t\t\t\tAbstractProject project = (AbstractProject) ATElementFactory.createITreeComponent(projectType);\n\t\t\t\tproject.setId(rs.getInt(1));\n\t\t\t\tproject.setName(rs.getString(2));\n\t\t\t\tproject.setDescription(rs.getString(3));\n\t\t\t\tprojectList.add(project);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DAOException(e);\n\t\t\t\n\t\t} finally {\n\t\t\tDbUtils.closeQuietly(conn);\n\t\t\tDbUtils.closeQuietly(stmtSelect);\n\t\t\tDbUtils.closeQuietly(rs);\n\t\t}\n\t\t\n\t\treturn projectList;\n\t}",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"@ApiMethod(\n name = \"getProjects\",\n path = \"getProjects\",\n httpMethod = HttpMethod.POST\n )\n public List<Project> getProjects(){\n \tQuery<Project> query = ofy().load().type(Project.class);\n \treturn query.list();\n }",
"@GetMapping(\"/api/getLatest\")\n\tpublic List<Project> findlatestProject()\n\t{\n\t\treturn this.integrationClient.findlatestProject();\n\t}",
"@Override\r\n\tpublic List<GroupApply> groupAllshowonapproval() {\n\t\treturn this.groupRepository.groupAllshowonapproval();\r\n\t}",
"public void getReposClicked(View v) {\n clearRepoList();\n // Call our getRepoList() function that is defined above and pass in the\n // text which has been entered into the etGitHubUser text input field.\n// getRepoList(etGitHubUser.getText().toString());\n }",
"@TransactionAttribute(TransactionAttributeType.SUPPORTS)\r\n\t\tpublic List<DatosGrlsProyectoDO> getAllAll() throws ConectelException {\r\n\t\t\tTypedQuery<DatosGrlsProyectoDO> query = entityManager.createNamedQuery(\r\n\t\t\t\t\t\"DatosGrlsProyectoDO.findAllAll\", DatosGrlsProyectoDO.class);\r\n\t\t\tList<DatosGrlsProyectoDO> dataProjectList;\r\n\t\t\ttry {\r\n\t\t\t\tdataProjectList = query.getResultList();\r\n\t\t\t} catch(NoResultException e) {\r\n\t\t\t\tthrow new ConectelException(\"No existen Datos Generales registrados.\");\r\n\t\t\t}\r\n\t\t\treturn dataProjectList;\r\n\t\t}",
"List<Bug> getFinishedBugsByProject(int projectId, int start, int limit);",
"List<Comment> getCommentsOfProject(int projectId) throws SQLException;",
"public List<Issue> getUserProjectActiveIssue(User user, Project project);",
"public Entry[] getEntries() { return GitIndex.this.getEntries(this); }",
"@Override\n public GetCommitResult getCommit(GetCommitRequest request) {\n request = beforeClientExecution(request);\n return executeGetCommit(request);\n }",
"List<Bug> getOpenedBugsByProject(int projectId, int start, int limit);",
"@RequestMapping(value = \"/project\", method = RequestMethod.GET)\n\tpublic Response getProjects() {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tList<Project> projects = projectService.getAllProjects();\n\t\t\tif (!projects.isEmpty()) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t\tresponse.setData(transformProjectToPojectDto(projects));\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"get all project Failed \", e);\n\t\t}\n\t\treturn response;\n\t}",
"@RequestMapping(value = { \"/comment\", \"/komentar\" }, method = RequestMethod.GET)\r\n\tpublic ResponseEntity<Iterable<Comment>> getAllApproved() {\r\n\r\n\t\treturn new ResponseEntity(commentRepository.findByCommentState(CommentState.APPROVED), HttpStatus.OK);\r\n\t}",
"@Override\n\tpublic List<Calendar> getEventsByProjectId(int id) {\n\t\treturn projectDao.getEventsByProjectId(id);\n\t}",
"@Override\n\tpublic List<Project> getProjectsByUserId(int id) {\n\t\treturn projectDao.getProjectsByUserId(id);\n\t}",
"public List<Compte> findAll() {\n\t\treturn dao.findAll();\n\t}",
"public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"public List<Contract> allContracts() {\r\n\r\n\t\tQuery query = this.em.createQuery(\"SELECT c FROM Contract c order by c.contractId desc\");\r\n\t\tList<Contract> contractList = null;\r\n\t\tif (query != null) {\r\n\t\t\tcontractList = query.getResultList();\r\n\t\t\tSystem.out.println(\"List:\"+contractList);\r\n\t\t}\r\n\t\treturn contractList;\r\n\t}",
"@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}",
"@Override\r\n\tpublic List<Project> viewAllProjects(String authToken) throws ManualException{\r\n\t\tfinal\tSession session=sessionFactory.openSession();\r\n\t\tList<Project> projectList =null;\r\n\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\r\n\t\t\tUser user = authtable.getUser();\r\n\t\t\tif(user.getUsertype().equals(\"Admin\")){\r\n\t\t\t\tString hql=\"from project\";\r\n\t\t\t\tQuery q=session.createQuery(hql);\r\n\t\t\t\tprojectList=(List)q.list();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tprojectList=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn projectList;\r\n\t\t}\r\n\t}",
"public Project[] findAll() throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" ORDER BY ID\", null);\n\t}",
"public JSONObject getLastProjectCommitRecord(int pgId) {\n String sql = \"SELECT * from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE pgId = ?));\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }",
"String getCurrentBranchName(Project project);",
"public String getRepos() {\n return repos;\n }",
"public Commit commitFullInfo(ArrayList<Commit> commitList) {\n\t\tCommit previousCommitID = null;\n\t\tfor (int i = 0; i < commitList.size(); i++) {\n\t\t\tif (commitList.get(i).commitID.contains(this.commitID)) {\n\t\t\t\treturn commitList.get(i);\n\t\t\t}\n\t\t}\n\n\t\treturn previousCommitID;\n\n\t}",
"public synchronized int getCommitNumber()\n\t{\n\t\treturn m_dbCommitNum;\n\t}",
"public ArrayList<Project> allProjects() {\n ArrayList<Project> projects = new ArrayList<>();\n for (Role role : this.roles) {\n if (role instanceof Member) {\n projects.add(((Member) role).getProject());\n } else if (role instanceof Leader) {\n projects.add(((Member) role).getProject());\n }\n }\n return projects;\n }",
"CommitData commitActiveBranch(String msg) throws NoChangesToCommitError {\n\n Commit commit = activeBranch.commit(msg, null);\n CommitData commitData = __createCommitData(commit);\n updateActiveBranchDataInHistory();\n commits.put(commitData.getSha1(), commitData);\n\n\n return commitData;\n }",
"public List<CommitLogStatus> getCommitLogStatus(String tabletName) throws IOException {\n return null;\n }",
"@Override\n\tpublic List<String> viewAllProjects(String userId) {\n\t\treturn fileDao.getUserAllProjectsName(userId);\n\t}",
"List<Bug> getAllBugsByProject(int projectId);",
"public String getTrackingBranch(Project project);",
"public void log() {\n String headID = head.getCommitID();\n while (headID != null) {\n File curr = new File(\".gitlet/commits/\" + headID);\n Comm currcomm = Utils.readObject(curr, Comm.class);\n System.out.println(\"===\");\n System.out.println(\"commit \" + currcomm.getCommitID());\n if (currcomm.getMergepointer() != null) {\n System.out.println(\"Merge: \"\n + currcomm.getParent().getCommitID()\n .substring(0, 7) + \" \"\n + currcomm.getMergepointer().getCommitID()\n .substring(0, 7));\n }\n System.out.println(\"Date: \" + currcomm.getDate());\n System.out.println(currcomm.getMessage());\n System.out.println();\n if (currcomm.getParent() == null) {\n break;\n } else {\n headID = currcomm.getParent().getCommitID();\n }\n }\n }",
"@Test\n public void testCommitsApi() throws Exception\n {\n \n \n RequestBuilder builder = new RequestBuilder(\"GET\");\n Request request = builder.setUrl(\n UriTemplate.fromTemplate(BASE)\n .append(PATH_EXPRESSION)\n .set(\"user\", \"damnhandy\")\n .set(\"repo\", \"Handy-URI-Templates\")\n .set(\"function\",\"commits\")\n .expand()).build();\n Assert.assertEquals(\"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits\", request.getUrl());\n executeRequest(createClient(), request);\n }",
"public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}",
"public Project[] getProjectArray()\n throws RedmineException\n {\n getProjects(false);\n return projectMap.values().toArray(new Redmine.Project[projectMap.size()]);\n }",
"public long getCommitTransId() {\n return commitList.getCommitTransId();\n }",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"CommitIndex getAppliedIndex() {\n return applied;\n }",
"public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);"
] | [
"0.7925441",
"0.72740126",
"0.70479065",
"0.6990224",
"0.67062545",
"0.62662506",
"0.59990007",
"0.5985707",
"0.5873153",
"0.5867077",
"0.5795912",
"0.57114476",
"0.571035",
"0.57014364",
"0.56581694",
"0.56166095",
"0.55907035",
"0.5554614",
"0.54670876",
"0.5450306",
"0.5432258",
"0.5400847",
"0.53988916",
"0.53941935",
"0.5348919",
"0.5348752",
"0.533923",
"0.533557",
"0.533097",
"0.5321043",
"0.5308443",
"0.5304865",
"0.52960813",
"0.5294186",
"0.5271218",
"0.5266718",
"0.52557117",
"0.52494025",
"0.52467597",
"0.5235931",
"0.52353233",
"0.5227329",
"0.52189976",
"0.51860416",
"0.51769185",
"0.5172493",
"0.5092863",
"0.5092391",
"0.5088669",
"0.5087975",
"0.50844985",
"0.50739986",
"0.5068047",
"0.5038552",
"0.5038053",
"0.50163484",
"0.49991402",
"0.49899897",
"0.4985013",
"0.49808875",
"0.4972838",
"0.49515995",
"0.49514553",
"0.49421343",
"0.4934872",
"0.492344",
"0.4923099",
"0.49183688",
"0.4911851",
"0.49086133",
"0.4902556",
"0.48943907",
"0.48901674",
"0.48846272",
"0.4883998",
"0.4876391",
"0.4873704",
"0.48576087",
"0.48547453",
"0.48541415",
"0.48527253",
"0.48437512",
"0.48411983",
"0.4834657",
"0.4821487",
"0.48210004",
"0.4816833",
"0.4810428",
"0.4806816",
"0.48029774",
"0.4798043",
"0.47958007",
"0.4791145",
"0.47882277",
"0.47878915",
"0.47789344",
"0.4776944",
"0.47762018",
"0.47658908",
"0.4763825"
] | 0.7966272 | 0 |
Gets ChangedFiles for project. | List<ChangedFile> getChangedFiles(Project project); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int getChangedFilesInProjectOption() {\r\n\t\treturn ProjectUIPlugin.getChangedFilesInProjectOption();\r\n\t}",
"@Override\n public GitFile[] getFiles()\n {\n if(_files==null) try { _files = getFilesImpl(); } catch(Exception e) { throw new RuntimeException(e); }\n return _files;\n }",
"private List<ChangedFile> getChangedFiles(Repository repository, List<DiffEntry> diffs) throws IOException {\n List<ChangedFile> files = new ArrayList<>();\n DiffFormatter diffFormatter = new DiffFormatter(DisabledOutputStream.INSTANCE);\n diffFormatter.setRepository(repository);\n diffFormatter.setContext(0);\n for (DiffEntry entry : diffs) {\n FileHeader header = diffFormatter.toFileHeader(entry);\n files.add(this.getChangedFile(header));\n }\n diffFormatter.close();\n return files;\n }",
"IFileDiff[] getDiffs();",
"public Collection<File> getRetrievedFiles() {\n Collection<File> result = new ArrayList<>(upToDateFiles.size() + copiedFiles.size());\n result.addAll(upToDateFiles);\n result.addAll(copiedFiles);\n return result;\n }",
"private Vector getProjectChangedListeners() {\r\n return this.projectChangedListeners;\r\n }",
"public Map<String,List<RevisionFile>> getSourceFiles();",
"public Collection<File> getUpToDateFiles() {\n return new ArrayList<>(upToDateFiles);\n }",
"public List<UpdateFile> getClientFileList() {\n List<UpdateFile> clientFileList = new ArrayList<>();\n listFilesFromDirectory(Paths.get(userLocalDirectory), clientFileList);\n return clientFileList;\n }",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);",
"GitFile[] getFilesImpl() throws Exception\n {\n TreeWalk twalk = new TreeWalk(getRepo()); twalk.addTree(_rev);\n List <GitFile> files = new ArrayList();\n while(twalk.next()) {\n ObjectId id = twalk.getObjectId(0);\n RevObject rid = getRevObject(id);\n String path = _path + (_path.length()>1? \"/\" : \"\") + twalk.getNameString();\n GitFile child = rid instanceof RevTree? new GitTree((RevTree)rid, path) : new GitBlob((RevBlob)rid, path);\n files.add(child);\n }\n return files.toArray(new GitFile[files.size()]);\n }",
"public java.util.List<entities.Torrent.FileInfo> getFilesList() {\n if (filesBuilder_ == null) {\n return java.util.Collections.unmodifiableList(files_);\n } else {\n return filesBuilder_.getMessageList();\n }\n }",
"@Override\n\tprotected HashSet<String> getAllChangedFileName(){\n\t\treturn null;\n\t}",
"public java.lang.String[] getNewFiles(){\r\n return localNewFiles;\r\n }",
"@Test\r\n public void testGetChangedFileList() throws IOException {\n helper.exportRevChangedFiles(PJ_ROOT, 1, LOCAL_ROOT);\r\n helper.exportRevChangedFiles(PJ_ROOT, 4, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(PJ_ROOT, -1, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(9, 9, true);\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<String> openDiffs() {\n\t\tString path = getCurrentPath()+slash+\"diffs.xml\";\n\t\tList<String> diffs = (List<String>) JavaIO.getObjectFromXML(path);\n\t\treturn diffs;\n\t}",
"private Changelist[] getChanges() {\n String depot = parent.getDepot();\n String counterName = parent.getCounter();\n Client client = Client.getClient();\n\n // Obtain the most recent changelist available on the client\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Obtain the lower boundary for the changelist results\n Counter counter = Counter.getCounter(counterName);\n int counterVal = 0;\n if (counter != null) {\n counterVal = counter.getValue();\n } else {\n counterVal = toChange.getNumber();\n }\n\n return Changelist.getChanges(depot, counterVal, toChange.getNumber());\n }",
"public GitFile[] getFiles() { return null; }",
"public Map<String, TranslationFile> getFiles() {\n\t\treturn files;\n\t}",
"public ArrayList<String> getPendingFiles() {\n\n\t\tif (m_db == null) {\n\t\t\t//\n\t\t\t// database not yet initialized\n\t\t\t//\n\t\t\treturn null;\n\t\t}\n\n\t\tCursor cursor = m_db.query(PENDING_FILE_TABLE_NAME,\n\t\t\t\tnew String[] { PENDING_FIELD_PATH }, null, null, null, null,\n\t\t\t\tPENDING_FIELD_PATH + \" DESC\");\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\n\t}",
"@Override\n\tpublic String getReferenceFiles() {\n\t\treturn model.getReferenceFiles();\n\t}",
"public List<FileObjects> getFiles() {\n\n\t\t\treturn files;\n\t\t}",
"protected File[] getFiles() {\r\n DirectoryScanner scanner = new DirectoryScanner(rootDir,true,\"*.xml\");\r\n List<File> files = scanner.list();\r\n return files.toArray(new File[files.size()]);\r\n }",
"List<Path> getFiles();",
"public void checkIfFilesHaveChanged(NSNotification n) {\n int checkPeriod = checkFilesPeriod();\n \n if (!developmentMode && (checkPeriod == 0 || System.currentTimeMillis() - lastCheckMillis < 1000 * checkPeriod)) {\n return;\n }\n \n lastCheckMillis = System.currentTimeMillis();\n \n log.debug(\"Checking if files have changed\");\n for (Enumeration e = _lastModifiedByFilePath.keyEnumerator(); e.hasMoreElements();) {\n File file = new File((String)e.nextElement());\n if (file.exists() && hasFileChanged(file)) {\n fileHasChanged(file);\n }\n }\n }",
"void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);",
"@Nullable\n synchronized Status getChangeFor(String filePath) {\n return records.get(filePath);\n }",
"public ArrayList<String> getFiles() {\n\t\t// Sort list\n\t\tCollections.sort(this.files);\n\t\t\n\t\treturn this.files;\n\t}",
"public ArrayList<String> getFiles() {\n\n\t\tif (m_db == null)\n\t\t\treturn new ArrayList<String>();\n\n\t\t//\n\t\t// query database\n\t\t//\n\t\tCursor cursor = m_db.query(FILE_TABLE_NAME,\n\t\t\t\tnew String[] { FILE_FIELD_PATH }, null, null, null, null, null);\n\n\t\t//\n\t\t// construct array list\n\t\t//\n\t\tArrayList<String> list = new ArrayList<String>();\n\n\t\t//\n\t\t// collect result set\n\t\t//\n\t\tcollectResultSet(cursor, list);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\t//\n\t\t// done\n\t\t//\n\t\treturn list;\n\t}",
"public List<File> getFiles();",
"public Set<FileRef> getSourceFiles() {\r\n return sourceFiles;\r\n }",
"public List<String> getFiles();",
"public List getChangedEvents() {\n return new ArrayList(originalDnr.keySet());\n }",
"public static ObservableList<TestFile> getFiles(){\n return emails;\n }",
"List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);",
"public java.lang.String[] getDeletedFiles(){\r\n return localDeletedFiles;\r\n }",
"public JSONObject getFileList(String projectID) throws Exception{\n\t\tif (projectID == null){\n\t\t\tthrow new Exception(\"Project ID must be non-null.\");\n\t\t}\n\t\tSBG getFileListRequest = new SBG(authToken, \"project/\" + projectID + \"/file\", \"GET\", null, null);\n\t\treturn getFileListRequest.checkAndRetrieveResponse(getFileListRequest.generateRequest());\n\t}",
"public Files getFiles() {\n\t\treturn this.files;\n\t}",
"public Map<String,ChangeData> diffFiles(final List<String> fl){\n \t\t\n \t\tList<String> working = new LinkedList<String>();\n \t\tList<String> snap = new LinkedList<String>();\n \t\tMap<String,ChangeData> cm = new HashMap<String,ChangeData>();\n \t\tList<String> files= fl;\n \t\t\n \t\tif(fl == null || fl.isEmpty())\n \t\t\tfiles=this.getFileNames();\n \t\t\n \t\tfor (String str : files){\n \t\tFile file = new File(this.getRoot()+ File.separatorChar +str);\n \t\t\n \t\tif(this.getFileNames().contains(str) && file.exists()){\n \t\t\tFile f = new File(this.getSnapshot().getRoot() + File.separatorChar +str);\n \t\t\tif(!f.exists())\n \t\t\t\tthis.pCreateFile(this.getSnapshot().getRoot() + File.separatorChar +str);\n \t\t\n \t\tcm.put(str, new ChangeData(str));\t\n \t\t\t\n \t\tworking = this.readFile(this.getRoot()+ File.separatorChar +str);\n \t\tsnap = this.readFile(this.getSnapshot().getRoot() + File.separatorChar +str);\n \t\t\n \t\tcm.get(str).getDifflist().add(this.getSnapshot().getDiff(snap, working));\n \t\t\n \t\tif(!cm.get(str).getDifflist().get(0).getDeltas().isEmpty())//addOfEmptyFile\n \t\t\tthis.getFilelist().get(str).put(this.getAddress(), this.getFilelist().get(str).get(this.getAddress()) + 1);\n \t\t\n \t\tcm.get(str).getLclock().putAll(this.getFilelist().get(str));\n \t\t\t\n \t\t\n \t\tthis.pCopyFile(this.getRoot()+ File.separatorChar +str, this.getSnapshot().getRoot() + File.separatorChar +str);\n \t\t\n \t\tworking.clear();\n \t\tsnap.clear();\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(String str : this.getFileNames()){\n \t\t\tif(!cm.containsKey(str)){\n \t\t\t\tcm.put(str, new ChangeData(str));\n \t\t\t\tcm.get(str).getLclock().putAll(this.getFilelist().get(str));\n \t\t\t}\n \t\t}\n \t\t\t\n \t\tfor(String str : this.dirRecursiveRel(this.getSnapshot().getRoot())){\n \t\t\t\n \t\t\tif(!this.getFileNames().contains(str)){\n //\t\t\t\tthis.pDeleteFile(this.getRoot()+ File.separatorChar +str);\n \t\t\t\tthis.pDeleteFile(this.getSnapshot().getRoot()+ File.separatorChar +str);\n \t\t\t}\n \t\t}\n \t\t\n \t\t\n \tthis.storeMetadata(this.getRoot());\t\n \t\t\n \treturn cm;\n \t\t\n \t}",
"java.util.List<entities.Torrent.FileInfo>\n getFilesList();",
"List<File> getSystemDescriptionFiles();",
"public\tList<ChangedJsMethod>\tgetChangedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.changedMethods);\n\t}",
"@java.lang.Override\n public java.util.List<entities.Torrent.FileInfo> getFilesList() {\n return files_;\n }",
"public static List<LogFileInfo> getLogFiles() {\n final LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n final List<LogFileInfo> logFileInfos = new ArrayList<>();\n final Logger logger = lc.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);\n final Iterator<Appender<ILoggingEvent>> it = logger.iteratorForAppenders();\n while (it.hasNext()) {\n final Appender<ILoggingEvent> appender = it.next();\n if (appender instanceof FileAppender) {\n final FileAppender<ILoggingEvent> fileAppender = (FileAppender<ILoggingEvent>) appender;\n final File logFile = new File(fileAppender.getFile());\n final LogFileInfo logFileInfo = new LogFileInfo();\n logFileInfo.setFileName(logFile.getName());\n logFileInfo.setFileLastChanged(new Date(logFile.lastModified()));\n logFileInfo.setFileSize(logFile.length());\n logFileInfos.add(logFileInfo);\n }\n }\n return logFileInfos;\n }",
"private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }",
"public boolean[] hasConflictsAndChanges(Project project);",
"IFileDiff[] getDiffs(String sourceFilter, String rightFilter);",
"private ArrayList<String> findchanged(Comm splitpoint, Comm comm) {\n ArrayList<String> changed = new ArrayList<String>();\n HashMap<String, Blob> original = splitpoint.getContents();\n HashMap<String, Blob> current = comm.getContents();\n\n for (String file :original.keySet()) {\n if (!(current.get(file) == null)) {\n if (!current.get(file).getContent()\n .equals(original.get(file).getContent())) {\n changed.add(file);\n }\n\n }\n\n }\n return changed;\n\n }",
"public static String[] getCacheFileList(Context context) {\n return context.fileList();\n }",
"public java.util.List<? extends entities.Torrent.FileInfoOrBuilder>\n getFilesOrBuilderList() {\n if (filesBuilder_ != null) {\n return filesBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(files_);\n }\n }",
"public ICompilationUnit[] getFiles() throws CoreException, JavaModelException\n {\n\tList<ICompilationUnit> files = new ArrayList<ICompilationUnit>();\n\tfor (final String projectName : ConfigurationSettings.projects)\n\t{\n\t IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);\n\t if (project.isNatureEnabled(\"org.eclipse.jdt.core.javanature\"))\n\t {\n\t\tIJavaProject javaProject = JavaCore.create(project);\n\t\tIPackageFragment[] packages = javaProject.getPackageFragments();\n\t\tfor (IPackageFragment p : packages)\n\t\t if (p.getKind() == IPackageFragmentRoot.K_SOURCE)\n\t\t\tfiles.addAll(packageFiles(p));\n\t }\n\t}\n\treturn files.toArray(new ICompilationUnit[0]);\n }",
"public Map<String, Integer> trackedFiles() {\r\n\t\treturn trackedFiles;\r\n\t}",
"public String[] getListOfFiles() {\n\t\treturn listOfFiles;\n\t}",
"@java.lang.Override\n public entities.Torrent.FileInfo getFiles(int index) {\n return files_.get(index);\n }",
"public IInifileChangeListener[] getListeners() {\n // make a copy, just in case there are adds/removes during iteration\n // Maybe a copy on/write implementation would be more efficient\n IInifileChangeListener[] newArray = new IInifileChangeListener[array.length];\n System.arraycopy(array, 0, newArray, 0, array.length);\n return newArray;\n }",
"public Collection<File> getCopiedFiles() {\n return new ArrayList<>(copiedFiles);\n }",
"public org.hpccsystems.ws.filespray.PhysicalFileStruct[] getFiles() {\n\t\t return files;\n\t }",
"public entities.Torrent.FileInfo getFiles(int index) {\n if (filesBuilder_ == null) {\n return files_.get(index);\n } else {\n return filesBuilder_.getMessage(index);\n }\n }",
"public List<TbomFile> getFileList() {\n\t\treturn fileList;\n\t}",
"public List<String> getAllNotComputedFilesPath() throws TBException {\r\n\t\treturn getNotComputedFilesPath(new File(rootTBFolder).getAbsolutePath());\r\n\t\t\r\n\t}",
"private File[] getFiles() {\n\n if (mPPTFilePath == null) {\n mPPTFilePath = getArguments().getString(PPTPathString);\n }\n\n String Path = mPPTFilePath;\n File mFile = new File(Path);\n if (mFile.exists() && mFile.isDirectory() && mFile.listFiles()!=null) {\n\n return mFile.listFiles();\n } else {\n Log.d(TAG, \"File==null\");\n return null;\n }\n }",
"public List<File> findAll() {\n\t\treturn files;\n\t}",
"public File[] listFiles() {\n\n\t\tFileFilter Ff = f -> true;\n\t\treturn this.listFiles(Ff);\n\t}",
"static List<PsiFile> findViewFiles(String relativePath, Project project) {\n PsiManager psiManager = PsiManager.getInstance(project);\n\n // If no extension is specified, it's a PHP file\n relativePath = PhpExtensionUtil.addIfMissing(relativePath);\n\n List<PsiFile> viewFiles = new ArrayList<>();\n for (PsiFileSystemItem fileSystemItem : getViewDirectories(project)) {\n VirtualFile viewDirectory = fileSystemItem.getVirtualFile();\n VirtualFile viewFile = viewDirectory.findFileByRelativePath(relativePath);\n if (viewFile != null && !viewFile.isDirectory()) {\n PsiFile psiFile = psiManager.findFile(viewFile);\n if (psiFile != null) {\n viewFiles.add(psiFile);\n }\n }\n }\n return viewFiles;\n }",
"private String[] getFileNames() {\n\t\tFile directory = new File(this.getClass().getClassLoader()\n\t\t\t\t.getResource(\"data\").getFile());\n\t\tList<String> fileNames = new ArrayList<String>();\n\n\t\tfor (File file : directory.listFiles())\n\t\t\tfileNames.add(file.getName());\n\n\t\treturn fileNames.toArray(new String[fileNames.size()]);\n\t}",
"public ClassFile[] getClassFiles() {\n\t\treturn getResult().getClassFiles();\n\t}",
"public List<FileManagerFile> getFiles() throws Exception {\n\n if (files == null) { // defer loading files list until requested.\n cacheFoldersFiles();\n }\n return files;\n }",
"public List<GitFileSystemEntry> getWorkingDirFiles() {\n return null;\n }",
"public String[] getFilesOnServer() {\n Log.i(\"getFilesFor\", \"Getting all files on server available to \"\n + new KeyGenerator(context).getPublicKeyAsString());\n Cursor resultSet = database.rawQuery(\n \"SELECT DISTINCT File FROM FileKeys WHERE UserPublicKey = \" +\n \"'\" + new KeyGenerator(context).getPublicKeyAsString() + \"'\", null);\n String[] fileNames = new String[resultSet.getCount()];\n resultSet.moveToFirst();\n int i = 0;\n while (!resultSet.isAfterLast()) {\n Log.i(\"getFilesFor\", \"File namme: \" + resultSet.getString(0));\n fileNames[i++] = resultSet.getString(0);\n resultSet.moveToNext();\n }\n resultSet.close();\n return fileNames;\n }",
"public static void setChangedFilesInProjectOption(int option) {\r\n\t\tProjectUIPlugin.setChangedFilesInProjectOption(option);\r\n\t}",
"private List<String> newChangNotStaged(HashMap<String, Blob> allFiles) {\n ArrayList<String> result = new ArrayList<>();\n for (String fileName: Utils.plainFilenamesIn(Main.CWD)) {\n Blob ourBlob = allFiles.get(fileName);\n File fileInCWD = new File(Main.CWD, fileName);\n String content = Utils.readContentsAsString(fileInCWD);\n if (ourBlob != null) {\n if (!ourBlob.getContent().equals(content)\n && !isStaged(fileName)) {\n String elem = fileName + \" (modified)\";\n result.add(elem);\n }\n allFiles.remove(fileName);\n }\n }\n return result;\n }",
"public java.util.List<entities.Torrent.FileInfo> getFileInfoList() {\n if (fileInfoBuilder_ == null) {\n return java.util.Collections.unmodifiableList(fileInfo_);\n } else {\n return fileInfoBuilder_.getMessageList();\n }\n }",
"private List<DataRecord> loadRefTableChanges() {\n \n final DataSource changesDataSource =\n ProjectUpdateWizardUtilities\n .createDataSourceForTable(ProjectUpdateWizardConstants.AFM_FLDS_TRANS);\n changesDataSource.addRestriction(Restrictions.in(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHANGE_TYPE, DifferenceMessage.NEW.name()\n + \",\" + DifferenceMessage.REF_TABLE.name()));\n changesDataSource.addRestriction(Restrictions.eq(\n ProjectUpdateWizardConstants.AFM_FLDS_TRANS, CHOSEN_ACTION,\n Actions.APPLY_CHANGE.getMessage()));\n\n return changesDataSource.getRecords();\n }",
"public HashMap<String, String> getAllFiles() {\n return _allFiles;\n }",
"@Override\n public Path getProjectListFilePath() {\n return projectListStorage.getProjectListFilePath();\n }",
"public ArrayList<File> getFileList(File file){\r\n\t\tFile dir = new File(file.getParent());\r\n\t\r\n\t\tString filename = file.getName();\r\n\t\t//get all files with the same beginning and end\r\n\t\tint index = filename.indexOf(\"Version\");\r\n\t\tString stringStart = filename.substring(0, index-1);\r\n\t\t\r\n\t\tArrayList<File> files = new ArrayList<File>();\r\n\t\t\r\n\t\tfor(File f:dir.listFiles()){\r\n\t\t\tif(f.getName().contains(stringStart))files.add(f);\r\n\t\t}\r\n\t\t\r\n\t\treturn files;\t\r\n\t}",
"public abstract List<LocalFile> getAllFiles();",
"public File[] getFiles() {\n waitPainted(-1);\n Component list = getFileList();\n if(list instanceof JList) {\n ListModel<?> listModel = ((JList)list).getModel();\n File[] result = new File[listModel.getSize()];\n for (int i = 0; i < listModel.getSize(); i++) {\n result[i] = (File) listModel.getElementAt(i);\n }\n return result;\n } else if(list instanceof JTable){\n TableModel listModel = ((JTable)list).getModel();\n File[] result = new File[listModel.getRowCount()];\n for (int i = 0; i < listModel.getRowCount(); i++) {\n result[i] = (File) listModel.getValueAt(i, 0);\n }\n return result;\n } else\n throw new IllegalStateException(\"Wrong component type\");\n }",
"public ArrayList<BatchFileModel> getFiles() {\n return this.files;\n }",
"public String getFiles() {\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tList<ItemObject> itemObjects = item.getItemObjects();\r\n\t\t\r\n\t\t// Sort item objects by order\r\n\t\tCollections.sort(itemObjects, new AscendingOrderComparator());\r\n\t\t\r\n\t\tcreateItemFileVersionForDisplay(itemObjects);\r\n\t\t\r\n\t\treturn SUCCESS;\r\n\t}",
"public CopyFile[] getFilesToCopy()\n\t{\n\t\treturn filesToCopy;\n\t}",
"ChangeData getChangeData(Project.NameKey projectName, Change.Id changeId);",
"public void getPeerFiles(){\n\t\t\n\t\tFile[] files = new File(path).listFiles();\n\t\tfor (File file : files) {\n\t\t\tfileNames.add(file.getName());\n\t\t}\n\t\tSystem.out.println(\"Number of Files Registerd to the server - \"+fileNames.size());\n\t\tSystem.out.println(\"To search for file give command: get <Filename>\");\n\t\tSystem.out.println(\"To refresh type command: refresh\");\n\t\tSystem.out.println(\"To disconnect type command: disconnect\");\n\t}",
"public List getAssociatedFiles()\n {\n return m_files;\n }",
"public ArrayList<Project> getProjects(){\n return this.projects;\n }",
"public HashMap<String,File> getFile(){\r\n\t\treturn files;\r\n\t}",
"public abstract List<String> getFiles( );",
"private List<ICompilationUnit> packageFiles(IPackageFragment p) throws JavaModelException\n {\n\tList<ICompilationUnit> files = new ArrayList<ICompilationUnit>();\n\tICompilationUnit[] compilationUnits = p.getCompilationUnits();\n\tfor (ICompilationUnit cu : compilationUnits)\n\t{\n\t files.add(cu);\n\t}\n\treturn files;\n }",
"public ArrayList<FileDesc> getAllFiles() {\n\n\t\tArrayList<FileDesc> result = new ArrayList<FileDesc>();\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement ps = ((org.inria.jdbc.Connection) db).prepareStatement(TCell_QEP_IDs.QEP.EP_getAllFiles);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tString query = \"SELECT FILEGID, TYPE, DESCRIPTION FROM FILE\";\n\t\t\tSystem.out.println(\"Executing query : \" + query);\t\t\t\n\n\t\t\t\n\t\t\twhile (rs.next() == true) {\n\t\t\t\tString fileGID = rs.getString(1);\n\t\t\t\tString type = rs.getString(2);\n\t\t\t\tString Description = rs.getString(3);\n\t\t\t\tresult.add(new FileDesc(fileGID, \"\", \"\", \"\", type, Description));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\t// Uncomment when the close function will be implemented\n\t\t\t// attemptToClose(ps);\n\t\t\t\n\t\t}\n\n\t\treturn result;\n\t}",
"String[] getCrashReportFilesList() {\r\n File dir = mContext.getFilesDir();\r\n \r\n Log.d(LOG_TAG, \"Looking for error files in \" + dir.getAbsolutePath());\r\n \r\n // Filter for \".stacktrace\" files\r\n FilenameFilter filter = new FilenameFilter() {\r\n public boolean accept(File dir, String name) {\r\n return name.endsWith(\".stacktrace\");\r\n }\r\n };\r\n return dir.list(filter);\r\n }",
"public static HashMap<String, String> changedFilesLoc(Commit split,\n TreeSet<Commit> commitsCheck) {\n HashMap<String, String> temp = new HashMap<String, String>();\n HashMap<String, String> splitMap = split.getFileLoc();\n for (Commit x : commitsCheck) {\n HashMap<String, String> commitMap = x.getFileLoc();\n for (String y : commitMap.keySet()) {\n if (!splitMap.containsKey(y)\n || !splitMap.get(y).equals(commitMap.get(y))) {\n temp.put(y, commitMap.get(y));\n }\n }\n }\n return temp;\n }",
"public List<String> checkFiles() {\n List<String> instances = new ArrayList<String>();\n if (StringUtils.isBlank(getPathOffset())) return instances;\n File[] directories = listFiles(new File(getPathOffset()), \"gcm_\");\n for (File dir : directories) {\n File[] files = listFiles(new File(dir.toString() + \"\\\\logs\"), \"GcmWebServices\");\n for (File file : files)\n instances.add(file.toString());\n }\n return instances;\n }",
"public File[] getRPFiles()\n\t{\n\t\treturn files;\n\t}",
"List<String> getConfigFilePaths();",
"java.util.List<ds.hdfs.generated.FileMetadata> \n getFilesList();",
"public List<IFile> getAllChildFiles() {\n return this.childFiles;\n }",
"Date getWorkfileLastChangedDate();",
"public String[] listFilesString() {\n\t\tFile[] FL = listFiles();\n\t\treturn FU.listFilesString(FL);\n\t}",
"@java.lang.Override\n public java.util.List<? extends entities.Torrent.FileInfoOrBuilder>\n getFilesOrBuilderList() {\n return files_;\n }"
] | [
"0.723599",
"0.650778",
"0.6378127",
"0.63429946",
"0.6208682",
"0.6185557",
"0.60870785",
"0.5996188",
"0.5950312",
"0.58644557",
"0.58588773",
"0.5825444",
"0.5802346",
"0.5758512",
"0.57443076",
"0.5725645",
"0.56918424",
"0.5678396",
"0.56749237",
"0.5646034",
"0.5640213",
"0.5630285",
"0.5609745",
"0.5605271",
"0.5605113",
"0.5598029",
"0.5596354",
"0.55811346",
"0.5577963",
"0.5574885",
"0.5566201",
"0.55615747",
"0.55544496",
"0.55446655",
"0.5525545",
"0.5524579",
"0.5501739",
"0.54659957",
"0.54564446",
"0.54332185",
"0.5419737",
"0.5418646",
"0.5412114",
"0.5402471",
"0.5401288",
"0.53978074",
"0.53727674",
"0.5364905",
"0.5361337",
"0.5356629",
"0.535101",
"0.5337644",
"0.5319607",
"0.5308421",
"0.5296272",
"0.5290779",
"0.52799004",
"0.52642995",
"0.52461034",
"0.5225013",
"0.5223358",
"0.52148074",
"0.5208561",
"0.5205926",
"0.51716405",
"0.51631945",
"0.51584744",
"0.51475096",
"0.5131976",
"0.5130352",
"0.5119574",
"0.5115679",
"0.51114506",
"0.50966126",
"0.508947",
"0.5088768",
"0.50883013",
"0.5087931",
"0.50841963",
"0.50777984",
"0.5068709",
"0.50658196",
"0.50605696",
"0.50521",
"0.5051551",
"0.50476754",
"0.50391763",
"0.50383866",
"0.50223285",
"0.50221264",
"0.50218314",
"0.50151",
"0.50150746",
"0.50106454",
"0.5007167",
"0.500062",
"0.5000319",
"0.49915865",
"0.49824664",
"0.49801585"
] | 0.87650365 | 0 |
Adds untracked files to index. | List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized static void addIndex(File fileName, TreeMap<String, TreeSet<Integer>> index) {\n if (!fileIndices.containsKey(fileName)) {\n fileIndices.put(fileName, index);\n } else {\n System.out.println(\"There exist files with the same name in the input location.\");\n }\n }",
"public void add(File toAdd, boolean alsoRemove)\n \tthrows Exception {\n \t\tValidate.notNull(toAdd, \"File toAdd must not be null!\");\n \t\t\n \t\tfinal File root = db.getWorkDir();\n \t\tfinal String toAddCanon = toAdd.getCanonicalPath();\n \t\tfinal String rootCanon = root.getCanonicalPath();\n \t\t\n \t\tValidate.isTrue(toAddCanon.startsWith(rootCanon),\n \t\t\t\t\"File toAdd must be within repository {0} but is {1}!\", root, toAdd);\n \n \t\tfinal ObjectWriter ow = new ObjectWriter(db);\n \t\tfinal DirCache dc = DirCache.lock(db);\n \t\tfinal DirCacheBuilder edit = dc.builder();\n \t\tfinal TreeWalk tw = new TreeWalk(db);\n \t\ttw.reset();\n \t\tif (toAddCanon.equals(rootCanon))\n \t\t\ttw.setFilter(TreeFilter.ALL);\n \t\telse\n \t\t\ttw.setFilter(PathFilter.create(toAddCanon.substring(\n \t\t\t\t\trootCanon.length() + 1).replace('\\\\', '/')));\n \t\ttw.addTree(new DirCacheBuildIterator(edit));\n \t\ttw.addTree(new FileTreeIterator(root));\n \t\twhile (tw.next()) {\n \t\t\tfinal DirCacheBuildIterator i;\n \t\t\tfinal FileTreeIterator d;\n \t\t\tfinal DirCacheEntry e;\n \t\t\t\n \t\t\tif (tw.getRawMode(0) == 0) {\n \t\t\t\t// Entry doesn't yet exist in the index. If its an ignored\n \t\t\t\t// path name, skip over the entry.\n \t\t\t\t//\n \t\t\t\tfinal File f = new File(root, tw.getPathString());\n \t\t\t\tif (ignores.isIgnored(f))\n \t\t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\tif (tw.isSubtree()) {\n \t\t\t\t// The index doesn't allow trees directly, we need to\n \t\t\t\t// recurse and process only leaf nodes.\n \t\t\t\t//\n \t\t\t\ttw.enterSubtree();\n \t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\ti = tw.getTree(0, DirCacheBuildIterator.class);\n \t\t\td = tw.getTree(1, FileTreeIterator.class);\n \n \t\t\tif (tw.getRawMode(0) == 0) {\n \t\t\t\te = new DirCacheEntry(tw.getRawPath());\n \t\t\t\tedit.add(e);\n \n \t\t\t} else if (tw.getRawMode(1) == 0) {\n \t\t\t\t// Entry is no longer in the directory, but is still in the\n \t\t\t\t// index. If we aren't supposed to process removals, keep\n \t\t\t\t// the entry in the cache.\n \t\t\t\t//\n \t\t\t\tif (!alsoRemove)\n \t\t\t\t\tedit.add(i.getDirCacheEntry());\n \t\t\t\tcontinue;\n \n \t\t\t} else if (FileMode.SYMLINK.equals(tw.getFileMode(0))) {\n \t\t\t\t// Entry exists as a symlink. We can't process that in Java.\n \t\t\t\t//\n \t\t\t\tedit.add(i.getDirCacheEntry());\n \t\t\t\tcontinue;\n \n \t\t\t} else {\n \t\t\t\te = i.getDirCacheEntry();\n \t\t\t\tedit.add(e);\n \t\t\t}\n \n \t\t\tfinal FileMode mode = d.getEntryFileMode();\n \t\t\tif (FileMode.GITLINK.equals(mode)) {\n \t\t\t\t// TODO: FileTreeIterator doesn't implement objectId right\n \t\t\t\t// for a GITLINK yet.\n \t\t\t\t//\n \t\t\t\te.setLength(0);\n \t\t\t\te.setLastModified(0);\n \t\t\t\te.setObjectId(d.getEntryObjectId());\n \n \t\t\t} else if (e.getLength() != d.getEntryLength()\n \t\t\t\t\t|| !timestampMatches(e, d)) {\n \t\t\t\tfinal File f = new File(root, tw.getPathString());\n \t\t\t\te.setLength((int) d.getEntryLength());\n \t\t\t\te.setLastModified(d.getEntryLastModified());\n \t\t\t\te.setObjectId(ow.writeBlob(f));\n \t\t\t}\n \t\t\te.setFileMode(mode);\n \t\t}\n \t\tif (!edit.commit())\n \t\t\tthrow new IOException(\"Can't update index\");\n \t}",
"public void printUntracked() {\n System.out.println(\"\\n\" + \"=== Untracked Files ===\");\n }",
"public void addFile(Path inputFile) throws IOException {\n\t\taddFile(inputFile, this.index);\n\t}",
"@Override\n protected void doOKAction() {\n super.doOKAction();\n\n HashMap<VcsRoot, ArrayList<VirtualFile>> checked = getCheckedFiles();\n for (Map.Entry<VcsRoot, ArrayList<VirtualFile>> entry : checked.entrySet()) {\n for (VirtualFile file : entry.getValue()) {\n ExternalExec.removeFileFromTracking(file, entry.getKey());\n }\n }\n\n project.getMessageBus().syncPublisher(TRACKED_IGNORED_REFRESH).refresh();\n }",
"public String addFile() throws NoIndexFoundException {\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tfileAdded = true;\r\n\t\t\r\n\t\t// assume most recent version \r\n\t\tif (versionedFileId != null) {\r\n\t\t\tVersionedFile vf = repositoryService.getVersionedFile(versionedFileId, false);\r\n\t\t\t\r\n\t\t\tfor(ItemFile itemFile:item.getItemFiles()) {\r\n\t\t\t\t\tif (vf.getNameWithExtension().equals(itemFile.getIrFile().getNameWithExtension())) {\r\n\t\t\t\t\t\tfileAdded = false;\r\n\t\t\t\t\t\tmessage = getText(\"fileNameExistInItemError\", \r\n\t\t\t\t\t\t\t\tnew String[]{vf.getName()});;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (fileAdded)\r\n\t\t\t{\r\n\t\t\t\tItemFile itemFile = item.addFile(vf.getCurrentVersion().getIrFile());\r\n\t\t\t\titemFile.setDescription(vf.getDescription());\r\n\t\t\t\titemFile.setVersionNumber(vf.getLargestVersion());\r\n\t\t\t\titemFile.setPublic(item.isPubliclyViewable());\r\n\t\t\t\titemService.makePersistent(item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (folderId != null) {\r\n\t\t\tPersonalFolder personalFolder = userFileSystemService.getPersonalFolder(folderId, false);\r\n\t\t\tList<PersonalFile> files = userFileSystemService.getAllFilesForFolder(personalFolder);\r\n\t\t\tList<VersionedFile> versionedFiles = repositoryService.getVersionedFilesForItem(item);\r\n\t\t\t\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\tfor (PersonalFile pf:files) {\r\n\t\t\t\tfileAdded = true;\r\n\r\n\t\t\t\tif (!versionedFiles.contains(pf.getVersionedFile())) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Add only if user is file owner\r\n\t\t\t\t\tif (pf.getVersionedFile().getOwner().getId().equals(userId)) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tfor(ItemFile itemFile:item.getItemFiles()) {\r\n\t\t\t\t\t\t\tif (pf.getVersionedFile().getName().equals(itemFile.getIrFile().getName())) {\r\n\t\t\t\t\t\t\t\tfileAdded = false;\r\n\t\t\t\t\t\t\t\tbuffer.append(pf.getName());\r\n\t\t\t\t\t\t\t\tbuffer.append(\",\");\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif(fileAdded) {\r\n\t\t\t\t\t\t\tItemFile itemFile = item.addFile(pf.getVersionedFile().getCurrentVersion().getIrFile());\r\n\t\t\t\t\t\t\tif (itemFile != null) {\r\n\t\t\t\t\t\t\t itemFile.setDescription(pf.getVersionedFile().getDescription());\r\n\t\t\t\t\t\t\t\titemFile.setVersionNumber(pf.getVersionedFile().getLargestVersion());\r\n\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}\r\n\t\t\t}\r\n\t\t\titemService.makePersistent(item);\r\n\r\n\t\t\tif (buffer.length() > 0) {\r\n\t\t\t\tbuffer.deleteCharAt(buffer.length() -1);\r\n\t\t\t\tmessage = getText(\"listOfFileNamesExist\", \r\n\t\t\t\t\t\tnew String[]{buffer.toString()});\r\n\t\t\t\tfileAdded = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Update personal item index\r\n\t\tPersonalItem personalItem = userPublishingFileSystemService.getPersonalItem(item);\r\n\r\n\t\t// Check if personal item exist for this generic item - if not it means that user is editing the institutional item\r\n\t\t// in which case we don't have to update personal item index\r\n\t\tif (personalItem != null) {\r\n\t\t\tuserWorkspaceIndexProcessingRecordService.save(personalItem.getOwner().getId(), personalItem, \r\n\t \tindexProcessingTypeService.get(IndexProcessingTypeService.UPDATE));\r\n\t\t}\r\n\t\t\r\n\t\tinstitutionalItemService.markAllInstitutionalItemsForIndexing(genericItemId, indexProcessingTypeService.get(IndexProcessingTypeService.UPDATE));\r\n\t\tinstitutionalItemVersionService.setAllVersionsAsUpdated(user, genericItemId, \"one or more files changed\");\r\n\r\n\t\treturn SUCCESS;\r\n\t}",
"private void updateFiles() {\n\t}",
"public static void addFile(Path inputFile, InvertedIndex index) throws IOException {\n\t\tStemmer stemmer = new SnowballStemmer(DEFAULT);\n\t\tint count = 0;\n\n\t\ttry(BufferedReader reader = Files.newBufferedReader(inputFile, StandardCharsets.UTF_8);){\n\t\t\tString line = reader.readLine();\n\t\t\tString result = inputFile.toString();\n\t\t\twhile(line != null){\n\t\t\t\tString[] parsed = TextParser.parse(line); //putting parsed words into new string array\n\t\t\t\tfor(String words : parsed) { //getting the words in the parsed line\n\t\t\t\t\tcount++;\n\t\t\t\t\tindex.add(stemmer.stem(words).toString(), result, count); //adds stemmed word into tree set\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void fileAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(vf);\n verifyStatus(added(AFILE));\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }",
"private List<String> newChangNotStaged(HashMap<String, Blob> allFiles) {\n ArrayList<String> result = new ArrayList<>();\n for (String fileName: Utils.plainFilenamesIn(Main.CWD)) {\n Blob ourBlob = allFiles.get(fileName);\n File fileInCWD = new File(Main.CWD, fileName);\n String content = Utils.readContentsAsString(fileInCWD);\n if (ourBlob != null) {\n if (!ourBlob.getContent().equals(content)\n && !isStaged(fileName)) {\n String elem = fileName + \" (modified)\";\n result.add(elem);\n }\n allFiles.remove(fileName);\n }\n }\n return result;\n }",
"public void indexFileOrDirectory(String fileName) {\r\n\r\n addFiles(new File(fileName));\r\n\r\n int originalNumDocs = writer.numRamDocs();\r\n for (File f : queue) {\r\n try {\r\n Document doc = new Document();\r\n\r\n // Creation of a simpledateformatter in order to print the last-modified-date of our files.\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n String date = sdf.format(f.lastModified());\r\n\r\n if (f.getName().endsWith(\".html\")) {\r\n\r\n // Creation of a jsoup document to help us with our html parsing.\r\n org.jsoup.nodes.Document htmlFile = Jsoup.parse(f, null);\r\n String body = htmlFile.body().text();\r\n String title = htmlFile.title();\r\n String summary = getSummary(htmlFile);\r\n\r\n\r\n doc.add(new TextField(\"contents\", body + \" \" + title + \" \" + date, Field.Store.YES));\r\n doc.add(new TextField(\"title\", title, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n doc.add(new StringField(\"summary\", summary, Field.Store.YES));\r\n\r\n }\r\n else {\r\n String content = FileUtils.readFileToString(f, StandardCharsets.UTF_8);\r\n\r\n doc.add(new TextField(\"contents\", content + \" \" + date, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n }\r\n doc.add(new StringField(\"filename\", f.getName(), Field.Store.YES));\r\n\r\n writer.addDocument(doc);\r\n System.out.println(\"Added: \" + f);\r\n } catch (Exception e) {\r\n System.out.println(\"Could not add: \" + f);\r\n }\r\n }\r\n\r\n int newNumDocs = writer.numDocs();\r\n System.out.println(\"\");\r\n System.out.println(\"************************\");\r\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\r\n System.out.println(\"************************\");\r\n\r\n queue.clear();\r\n }",
"public void printIndex() {\n System.out.println(\"\\n\" + \"=== Staged Files ===\");\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String filesName: addingStage) {\n File fileInIndex = new File(INDEX, filesName);\n File fileInCWD = new File(Main.CWD, filesName);\n if (Utils.readContentsAsString(fileInCWD)\n .equals(Utils.readContentsAsString(fileInIndex))) {\n System.out.println(filesName);\n }\n }\n }",
"public void checkUntracked(Commit givenCommit) {\n for (String fileName: givenCommit.getFile().keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n String contentInCWD = Utils.readContentsAsString(fileInCWD);\n Blob curBlob = getHeadCommit().getFile().get(fileName);\n if (curBlob == null) {\n if (!contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is an \"\n + \"untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n } else if (curBlob != null) {\n String contentInCurr = curBlob.getContent();\n if (!contentInCurr.equals(contentInCWD)\n && !contentInCWD.equals(givenCommit.getFile()\n .get(fileName))) {\n System.out.println(\"There is \"\n + \"an untracked file in the way; \"\n + \"delete it, or add and commit it first.\");\n System.exit(0);\n }\n }\n }\n }\n }",
"private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }",
"public void addAll(InvertedIndex other) {\n\t\tfor (String word : other.index.keySet()) {\n\t\t\tif (!this.index.containsKey(word)) {\n\t\t\t\tthis.index.put(word, other.index.get(word));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor (String path : other.index.get(word).keySet()) {\n\t\t\t\t\tif (!this.index.get(word).containsKey(path)) {\n\t\t\t\t\t\tthis.index.get(word).put(path, other.index.get(word).get(path));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.index.get(word).get(path).addAll(other.index.get(word).get(path));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void touchOne(File inFile)\n {\n mFiles.add(inFile);\n }",
"public void addAll(InvertedIndex other) {\n\t\tfor (String key : other.invertedIndex.keySet()) {\n\t\t\tif (this.invertedIndex.containsKey(key) == false) {\n\t\t\t\tthis.invertedIndex.put(key, other.invertedIndex.get(key));\n\t\t\t} else {\n\t\t\t\tfor (String path : other.invertedIndex.get(key).keySet()) {\n\t\t\t\t\tif (this.invertedIndex.get(key).containsKey(path) == false) {\n\t\t\t\t\t\tthis.invertedIndex.get(key).put(path, other.invertedIndex.get(key).get(path));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.invertedIndex.get(key).get(path).addAll(other.invertedIndex.get(key).get(path));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (String path : other.counts.keySet()) {\n\t\t\tif (this.counts.containsKey(path) == false) {\n\t\t\t\tthis.counts.put(path, other.counts.get(path));\n\t\t\t} else {\n\t\t\t\tthis.counts.put(path, Math.max(this.counts.get(path), other.counts.get(path)));\n\n\t\t\t}\n\t\t}\n\t}",
"protected void applyPendingAdds ()\n {\n while (!m_aAddStack.isEmpty ())\n addMonitoredFile (m_aAddStack.pop ());\n }",
"@SuppressWarnings(\"unused\")\n public void buildIndex() throws IOException {\n indexWriter = getIndexWriter(indexDir);\n ArrayList <JSONObject> jsonArrayList = parseJSONFiles(JSONdir);\n indexTweets(jsonArrayList, indexWriter);\n indexWriter.close();\n }",
"public void add(File file) throws IOException {\n File realFile = new File(Main.CWD, file.getName());\n File rmStage = new File(REMOVAL, file.getName());\n if (rmStage.exists()) {\n rmStage.delete();\n }\n if (realFile.exists()) {\n if (curAndCWDIdentical(file, realFile)) {\n File stagingFile = new File(INDEX, file.getName());\n if (stagingFile.exists()) {\n stagingFile.delete();\n }\n } else {\n File resultingFile = new File(INDEX, file.getName());\n if (!resultingFile.exists()) {\n resultingFile.createNewFile();\n }\n String content = Utils.readContentsAsString(realFile);\n Utils.writeContents(resultingFile, content);\n }\n }\n }",
"private void expungeAllHistoricFiles()\r\n {\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files\");\r\n\r\n java.io.File fileList = new java.io.File(\"./\");\r\n String rootName = getString(\"WatchListTableModule.edit.historic_details_basic_name\");\r\n String[] list = fileList.list(new MyFilter(rootName));\r\n for (int i = 0; i < list.length; i++)\r\n {\r\n StockMarketUtils.expungeListsFile(list[i]);\r\n }\r\n debug(\"expungeAllHistoricFiles() - Delete ALL HISTORIC Files - complete\");\r\n\r\n }",
"@Override\n public void addSingleFile(FileInfo file) {\n }",
"public void addIndex() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"index\",\n null,\n childrenNames());\n }",
"private void checkOutFiles(HashMap<String, Blob> allFiles,\n HashMap<String, Blob> curFile)\n throws IOException {\n for (String fileName: allFiles.keySet()) {\n File fileInCWD = new File(Main.CWD, fileName);\n String content = allFiles.get(fileName).getContent();\n checkUntracked(fileName, curFile);\n if (!fileInCWD.exists()) {\n fileInCWD.createNewFile();\n }\n Utils.writeContents(fileInCWD, content);\n }\n for (String fileName: curFile.keySet()) {\n Blob ourBlob = allFiles.get(fileName);\n if (ourBlob == null) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists()) {\n fileInCWD.delete();\n }\n }\n }\n }",
"IIndexFragmentFile[] getFiles(IIndexFileLocation location) throws CoreException;",
"@Test\n public void filesInDirsAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile afile = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n final VirtualFile bdir = createDirInCommand(myWorkingCopyDir, BDIR);\n final VirtualFile bfile = createFileInCommand(bdir, BFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(afile, bdir, bfile);\n verifyStatus(added(AFILE), added(BFILE_PATH));\n myChangeListManager.checkFilesAreInList(true, afile, bfile);\n }",
"public void finishedDirectIndexBuild()\n\t{\n\t\tif(logger.isInfoEnabled()){\n\t\t\tlogger.info(\"flushing utf block lexicon to disk after the direct index completed\");\n\t\t}\n\t\t//only write a temporary lexicon if there are any items in it\n\t\tif (TempLex.getNumberOfNodes() > 0)\n\t\t\twriteTemporaryLexicon();\n\n\t\t//merges the temporary lexicons\n\t\tif (tempLexFiles.size() > 0)\n\t\t{\n\t\t\ttry{\n\t\t\t\tmerge(tempLexFiles);\n\t\n\t\t\t\t//creates the offsets file\n\t\t\t\tfinal String lexiconFilename = \n\t\t\t\t\tindexPath + ApplicationSetup.FILE_SEPARATOR + \n\t\t\t\t\tindexPrefix + ApplicationSetup.LEXICONSUFFIX;\n\t\t\t\tLexiconInputStream lis = getLexInputStream(lexiconFilename);\n\t\t\t\tcreateLexiconIndex(\n\t\t\t\t\tlis,\n\t\t\t\t\tlis.numberOfEntries(),\n\t\t\t\t\t/* after inverted index is built, the lexicon will be transformed into a\n\t\t\t\t\t * normal lexicon, without block frequency */\n\t\t\t\t\tUTFLexicon.lexiconEntryLength\n\t\t\t\t\t); \n\t\t\t\tTermCount = lis.numberOfEntries();\n\t\t\t\tif (index != null)\n\t\t\t\t{\n\t\t\t\t\tindex.addIndexStructure(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexicon\");\n\t\t\t\t\tindex.addIndexStructureInputStream(\"lexicon\", \"uk.ac.gla.terrier.structures.UTFBlockLexiconInputStream\");\n\t\t\t\t\tindex.setIndexProperty(\"num.Terms\", \"\"+lis.numberOfEntries());\n\t\t\t\t\tindex.setIndexProperty(\"num.Pointers\", \"\"+lis.getNumberOfPointersRead());\n\t\t\t\t}\n\t\t\t} catch(IOException ioe){\n\t\t\t\tlogger.error(\"Indexing failed to write a lexicon index file to disk\", ioe);\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\tlogger.warn(\"No temporary lexicons to merge, skipping\");\n\t\t\n\t}",
"public void indexFileOrDirectory(String fileName) throws IOException {\n\t// gets the list of files in a folder (if user has submitted\n\t// the name of a folder) or gets a single file name (is user\n\t// has submitted only the file name)\n\t// ===================================================\n\taddFiles(new File(fileName));\n\n\tint originalNumDocs = writer.numDocs();\n\tfor (File f : queue) {\n\t FileReader fr = null;\n\t try {\n\t\tDocument doc = new Document();\n\n\t\t// ===================================================\n\t\t// add contents of file\n\t\t// ===================================================\n\t\tfr = new FileReader(f);\n\t\tdoc.add(new TextField(\"contents\", fr));\n\t\tdoc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\n\t\tdoc.add(new StringField(\"filename\", f.getName(),\n\t\t\tField.Store.YES));\n\n\t\twriter.addDocument(doc);\n\t\t//System.out.println(\"Added: \" + f);\n\t } catch (Exception e) {\n\t\tSystem.out.println(\"Could not add: \" + f);\n\t } finally {\n\t\tfr.close();\n\t }\n\t}\n\n\tint newNumDocs = writer.numDocs();\n\tSystem.out.println(\"\");\n\tSystem.out.println(\"************************\");\n\tSystem.out\n\t\t.println((newNumDocs - originalNumDocs) + \" documents added.\");\n\tSystem.out.println(\"************************\");\n\n\tqueue.clear();\n }",
"@Override\n\t\tpublic void add(File explodedAar) {\n if (!isShared(explodedAar))\n files.addAll(getJars(explodedAar));\n\t\t}",
"private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }",
"@Test\n public void fileAddedViaHgShouldBeAddedInChangeList() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n ProcessOutput processOutput = addAll();\n LOG.debug(processOutput.getStdout());\n LOG.debug(processOutput.getStderr());\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"public void add(String name) {\n File f = new File(name);\n if (!f.exists()) {\n Utils.message(\"File does not exist.\");\n throw new GitletException();\n }\n Blob blob = new Blob(f);\n untracked.remove(name);\n HashMap<String, Blob> files = head.getContents();\n if (files.containsKey(name)\n && files.get(name).getContent().equals(blob.getContent())) {\n return;\n } else if (!(files.containsKey(name) && files.get(name).equals(blob))) {\n stagingarea.put(blob.getName(), blob);\n File stagefile = Utils.join(staging, blob.getHash());\n Utils.writeObject(stagefile, blob);\n }\n\n }",
"protected final void addFileId(int index, int fileid) {\n getChildIds().add(index, fileid);\n getBTreeMetaData().setDirty(this);\n }",
"@Test\n public void notStoreIndexWithoutRequest() throws Exception {\n final String name = \"talk\";\n final Talks talks = new Talks.InDir();\n talks.create(\"\", name);\n talks.get(name).modify(\n new Directives()\n .xpath(\"/talk\")\n .push().xpath(\"wire\").remove().pop()\n .add(\"wire\").add(\"href\").set(\"#1\").up()\n );\n new IndexesRequests().execute(talks);\n MatcherAssert.assertThat(\n talks.get(name).read(),\n Matchers.not(\n XhtmlMatchers.hasXPaths(\"/talk/request\")\n )\n );\n }",
"@Override\n public void updateItemSearchIndex() {\n try {\n // all item IDs that don't have a search index yet\n int[] allMissingIds = mDatabaseAccess.itemsDAO().selectMissingSearchIndexIds();\n // Selects the item to the id, extract all parts of the item name to create the\n // search index (all ItemSearchEntity's) and insert them into the database\n for (int missingId : allMissingIds) {\n try {\n ItemEntity item = mDatabaseAccess.itemsDAO().selectItem(missingId);\n List<ItemSearchEntity> searchEntities = createItemSearchIndex(item);\n mDatabaseAccess.itemsDAO().insertItemSearchParts(searchEntities);\n } catch (Exception ex) {\n Log.e(TAG, \"An error occurred trying to create the search index to the id\" +\n missingId, ex);\n }\n }\n } catch (Exception ex) {\n Log.e(TAG, \"A general failure has occurred while trying to load and process all \" +\n \"item IDs to generate a search index\", ex);\n }\n }",
"private static void addOSMFilesToPersistedOSMFiles(Set<File> files) {\n for (File f : files) {\n persistedOSMFiles.add(f.getAbsolutePath());\n }\n updateSharedPreferences();\n }",
"protected void addEntries() {\r\n\t\t// default is to do nothing;\r\n\t}",
"public List<LsFileEntry> lsFiles() \n \tthrows CorruptObjectException, IOException {\n \t\tMap<String, LsFileEntry> cachedEntries = new TreeMap<String, LsFileEntry>(); \n \t\t\n \t\t//first read all the files which are the Index\n \t\tfinal DirCache cache = DirCache.read(db);\n \t\tfor (int i = 0; i < cache.getEntryCount(); i++) {\n \t\t\tfinal DirCacheEntry ent = cache.getEntry(i);\n \t\t\t\n \t\t\t//X TODO this is surely not enough ;)\n \t\t\tLsFileStatus fs = LsFileStatus.CACHED;\n \t\t\tLsFileEntry fileEntry = new LsFileEntry(ent.getPathString(), fs, ent.getObjectId());\n \t\t\tcachedEntries.put(ent.getPathString(), fileEntry);\n \t\t}\n \n \t\t// now read all the files on the disk\n \t\tSet<String> filesOnDisk = new TreeSet<String>(); \n \t\tFile workDir = db.getWorkDir();\n \t\taddFiles(filesOnDisk, \"\", workDir);\n \t\t\n \t\t// and now compare them. since both are already sorted because we used TreeMap and TreeSort\n \t\t// we can simply crawl over them end compare them. kind of a merge sort though...\n \t\tArrayList<LsFileEntry> fileEntries = new ArrayList<LsFileEntry>();\n \n \t\tIterator<String> cacheIt = cachedEntries.keySet().iterator();\n \t\tIterator<String> fileIt = filesOnDisk.iterator();\n \t\t\n \t\tString cachedPath = null;\n \t\tString fsPath = null;\n \t\twhile (cacheIt.hasNext() || fileIt.hasNext()) {\n \t\t\t\n \t\t\tif (cachedPath == null && cacheIt.hasNext()) {\n \t\t\t\tcachedPath = cacheIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath == null && fileIt.hasNext()) {\n \t\t\t\tfsPath = fileIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && cachedPath.equals(fsPath)) {\n \t\t\t\t// oh found in both systems\n \t\t\t\tfileEntries.add(cachedEntries.get(cachedPath));\n \t\t\t\tcachedPath = null;\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && !fileEntries.contains(cachedPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(cachedPath, LsFileStatus.REMOVED, null));\n \t\t\t\tcachedPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath != null && !cachedEntries.keySet().contains(fsPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(fsPath, LsFileStatus.OTHER, null));\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tcachedPath = null;\n \t\t\tfsPath = null;\n \t\t\t\n \t\t}\n \t\t\n \t\treturn fileEntries;\n \t}",
"private void updateFileList(String file, String word, String partition) {\n\t\tArrayList<String> fileList = indexedDir.get(partition).get(word);\n\t\tif (!fileList.contains(file)) {\n\t\t\tfileList.add(file);\n\t\t\tindexedDir.get(partition).put(word, fileList);\n\t\t}\n\t}",
"private void createInvertedIndex() {\n\t\tArrayList<Index> invertedIndex=new ArrayList<>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\part-r-00001\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\"\\t\");\n\t\t\t\tparts[1]=parts[1].replace(\"{\", \"\").replace(\"}\", \"\");\n\t\t\t\tString counts[]=parts[1].split(\",\");\n\t\t\t\tHashMap<String,Integer> fileList=new HashMap<String,Integer>();\n\t\t\t\tfor (String count : counts) {\n\t\t\t\t\tString file[]=count.split(\"=\");\n\t\t\t\t\tfileList.put(file[0].trim().replace(\".txt\", \"\"), Integer.parseInt(file[1].trim()));\n\t\t\t\t}\n\t\t\t\tIndex index=new Index();\n\t\t\t\tindex.setWord(parts[0]);\n\t\t\t\tindex.setFileList(fileList);\n\t\t\t\tinvertedIndex.add(index);\n\t\t\t}\n\t\t\tin.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertIndex(invertedIndex);\n\t}",
"public Builder addFiles(\n int index, entities.Torrent.FileInfo value) {\n if (filesBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFilesIsMutable();\n files_.add(index, value);\n onChanged();\n } else {\n filesBuilder_.addMessage(index, value);\n }\n return this;\n }",
"void addIndexForRepository(long repositoryId);",
"public void addNewFiles(java.lang.String param){\r\n if (localNewFiles == null){\r\n localNewFiles = new java.lang.String[]{};\r\n }\r\n\r\n \r\n //update the setting tracker\r\n localNewFilesTracker = true;\r\n \r\n\r\n java.util.List list =\r\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localNewFiles);\r\n list.add(param);\r\n this.localNewFiles =\r\n (java.lang.String[])list.toArray(\r\n new java.lang.String[list.size()]);\r\n\r\n }",
"private void checkUntracked(String fileName, HashMap<String, Blob> cur) {\n File fileInCWD = new File(Main.CWD, fileName);\n if (fileInCWD.exists() && (cur.get(fileName) == null\n || !cur.get(fileName).getContent()\n .equals(Utils.readContentsAsString(fileInCWD)))) {\n System.out.println(\"There is an untracked file in the way;\"\n + \" delete it, or add and commit it first.\");\n System.exit(0);\n }\n }",
"private static void addOSMFilesToModel(ArrayList<File> files) {\n if (files.size() < 1) {\n return;\n }\n for (File f : files) {\n String absPath = f.getAbsolutePath();\n // Don't add something that is either in progress\n // or already on the map.\n if (persistedOSMFiles.contains(absPath)) {\n continue;\n }\n ++totalFiles;\n persistedOSMFiles.add(absPath);\n File xmlFile = new File(absPath);\n OSMMapBuilder builder = new OSMMapBuilder(false);\n builder.executeOnExecutor(LARGE_STACK_THREAD_POOL_EXECUTOR, xmlFile);\n }\n setupProgressDialog(mapActivity);\n mapActivity.getMapView().invalidate();\n updateSharedPreferences();\n }",
"List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);",
"public void controlIndex(String path)\n { \t \n \t JSONParser parser = new JSONParser();\n \t \n \t try\n \t {\n \t\t JSONArray array = (JSONArray)parser.parse(new FileReader(path));\n \t\t \n \t\t JSONObject jsonObject = new JSONObject();\n \t\t JSONObject metaObj;\n \t\t \n \t\t for(Object obj : array)\n \t\t {\n \t\t\t jsonObject = (JSONObject) obj;\n \t\t\t String p = jsonObject.get(\"p\").toString().replaceAll(\"\\\\\\\\\", \"/\");\n \t\t\t metaObj = (JSONObject) jsonObject.get(\"metadata\");\n \t\t\t \n \t\t\t String title = \"\";\n \t\t\t String description = \"\"; \n \t\t\t if(metaObj.get(\"title\")!=null)\n \t\t\t {\n \t\t\t\t title = metaObj.get(\"title\").toString();\n \t\t\t }\n \t\t\t if(metaObj.get(\"description\")!=null)\n \t\t\t {\n \t\t\t\t description = metaObj.get(\"description\").toString();\n \t\t\t }\n \t\t\t \n \t\t\t String id = p.substring(p.lastIndexOf(\"/\")+1,p.lastIndexOf(\".\"));\n \t\t\t \n \t\t\t performIndex(p,id,title,description);\n \t\t\t performMetaIndex(jsonObject.get(\"metadata\"),id);\n \t\t }\n \t\t fileWriter();\n \t\t }\n \t catch(Exception e)\n \t { \t\n \t\t e.printStackTrace();\n \t }\n }",
"void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);",
"public void trackFile(String fileName, int id) {\r\n\t\ttrackedFiles.put(fileName, id);\r\n\t}",
"public void addFile(FileDiffFile file) {\n \t\tfiles.add(file);\n \t}",
"private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"private StupidContainer populateFileList() throws Exception {\n\n\t\tString root = getCodeRepo();\n\n\t\tif (root == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tArrayList<String> files = new ArrayList<String>();\n\t\tsearchDFS(new File(root).listFiles(), files);\n\n\t\tString dir = System.getProperty(\"user.dir\");\n\n\t\tif (gitDir == null)\n\t\t\treturn new StupidContainer(files, root);\n\n\t\tcommitCounts = new Hashtable<String, Integer>();\n\t\tProcess p = null;\n\n\t\tif (isOSWindows) {\n\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitlog.sh \" + gitDir);\n\t\t} else {\n\t\t\tp = Runtime.getRuntime().exec(\"./scripts/gitlog.sh \" + gitDir);\n\t\t}\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tp.getInputStream()));\n\n\t\tString line = null, name;\n\t\tInteger count;\n\t\twhile ((line = in.readLine()) != null) {\n\t\t\tif (line.contains(\".java\")) {\n\t\t\t\tname = extractName(line);\n\t\t\t\tcount = commitCounts.get(name);\n\t\t\t\tif (count == null)\n\t\t\t\t\tcount = new Integer(0);\n\t\t\t\tcommitCounts.put(name, count + 1);\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\t\treturn new StupidContainer(files, root, folderName, commitCounts);\n\t}",
"public void indexAssets() {\n\t\tString json = null;\n\t\tString assetUrl = minecraftVersion.getAssetIndex().getUrl().toString();\n\t\ttry {\n\t\t\tjson = JsonUtil.loadJSON(assetUrl);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tassetsList = (AssetIndex) JsonUtil.getGson().fromJson(json, AssetIndex.class);\n\t\t}\n\t}",
"private void processFile(final FilePath filePath, final ChangelistBuilder builder)\r\n {\r\n String path = filePath.getPath();\r\n\r\n // Files that match with the ignored patterns are processed separately.\r\n if( host.isFileIgnored( filePath.getVirtualFile() ) )\r\n {\r\n filesIgnored.add( path );\r\n return;\r\n }\r\n\r\n com.starbase.starteam.File file = host.findFile( getSTCanonicPath( filePath ) );\r\n\r\n try\r\n {\r\n if( file == null )\r\n {\r\n if( !isFileUnderRenamedDir( path ) && isProperNotification( filePath ) )\r\n {\r\n filesNew.add( path );\r\n }\r\n }\r\n else\r\n {\r\n // In certain cases we still get status \"UNKNOWN\" (int 6) after the\r\n // particular amount of time (even after full resync). Try to refresh.\r\n try { file.updateStatus(false, true); }\r\n catch( Exception e )\r\n {\r\n // Nothing to do - if <updateStatus> throws an exception then most\r\n // probably we deal with latest version\r\n }\r\n\r\n int status = file.getStatus();\r\n if( status == Status.NEW )\r\n filesNew.add( path );\r\n else\r\n if( status == Status.MERGE )\r\n builder.processChange( new Change( new STContentRevision(host, filePath ), new CurrentContentRevision( filePath ), FileStatus.MERGE ),\r\n StarteamVcs.getKey());\r\n else\r\n if( status == Status.MODIFIED )\r\n filesChanged.add( path );\r\n else\r\n if( status == Status.MISSING )\r\n {\r\n // We have two source of information on locally deleted files:\r\n // - one is stored in StarteamVcs host as a list controllable by VFS listener\r\n // - here, on folder traverse.\r\n // So do not duplicate files in the dirty lists.\r\n\r\n String normPath = filePath.getPath().replace( File.separatorChar, '/');\r\n if( !host.removedFiles.contains( normPath ))\r\n builder.processLocallyDeletedFile( filePath );\r\n }\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n // By default if any exception happens, we consider file status to be\r\n // \"unknown\" and do not indicate any change.\r\n }\r\n }",
"public void createIndex(String dirPath) throws IOException {\n\n\t\tFile[] files = new File(dirPath).listFiles();\n\n\t\tfor (File f : files) {\n\t\t\tindexDocument(f);\n\t\t}\n\n\t\tclose();\n\t\tprintStatistics();\n\t}",
"@Test\n public void filesInDirsAddedViaHgShouldBeAddedInChangeList() throws Exception {\n final VirtualFile afile = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n final VirtualFile bdir = createDirInCommand(myWorkingCopyDir, BDIR);\n final VirtualFile bfile = createFileInCommand(bdir, BFILE, INITIAL_FILE_CONTENT);\n ProcessOutput processOutput = addAll();\n LOG.debug(processOutput.getStdout());\n LOG.debug(processOutput.getStderr());\n verifyStatus(added(AFILE), added(BFILE_PATH));\n myChangeListManager.checkFilesAreInList(true, afile, bfile);\n }",
"void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);",
"public void createIndex() throws IOException {\n\t\tindexWriter.commit();\n\t\ttaxoWriter.commit();\n\n\t\t// categories\n\t\tfor (Article.Facets f : Article.Facets.values()) {\n\t\t\ttaxoWriter.addCategory(new CategoryPath(f.toString()));\n\t\t}\n\t\ttaxoWriter.commit();\n\n\t\tfinal Iterable<Article> articles = articleRepository.findAll();\n\t\tint c = 0;\n\t\tfor (Article article : articles) {\n\t\t\taddArticle(indexWriter, taxoWriter, article);\n\t\t\tc++;\n\t\t}\n\t\t// commit\n\t\ttaxoWriter.commit();\n\t\tindexWriter.commit();\n\n\t\ttaxoWriter.close();\n\t\tindexWriter.close();\n\n\t\ttaxoDirectory.close();\n\t\tindexDirectory.close();\n\t\tLOGGER.debug(\"{} articles indexed\", c);\n\t}",
"private void updateIndex() throws IOException {\n // maintain the document store (corpus) - if there is one\n if (currentMemoryIndex.containsPart(\"corpus\")) {\n // get all corpora + shove into document store\n ArrayList<DocumentReader> readers = new ArrayList<>();\n readers.add((DocumentReader) currentMemoryIndex.getIndexPart(\"corpus\"));\n for (String path : geometricParts.getAllShards().getBinPaths()) {\n String corpus = path + File.separator + \"corpus\";\n readers.add(new CorpusReader(corpus));\n }\n }\n // finally write new checkpointing data (checkpoints the disk indexes)\n Parameters checkpoint = createCheckpoint();\n this.checkpointer.saveCheckpoint(checkpoint);\n }",
"public void createIndex(String dataDirPath){\n\t\tFile[] files = new File(dataDirPath).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif(!file.isDirectory()\n\t\t\t\t\t&& !file.isHidden()\n\t\t\t\t\t&& file.exists()\n\t\t\t\t\t){\n\t\t\t\t//add to Map\n\t\t\t\t// m.put(file.getAbsolutePath(), new RankModel(file,0,getOutLinks(file.getAbsolutePath())));\n\t\t\t\tallFiles.add(file.getAbsolutePath());\n\t\t\t}else{\n\t\t\t\tcreateIndex(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\t// return writer.numDocs();\n\t}",
"public entities.Torrent.FileInfo.Builder addFilesBuilder(\n int index) {\n return getFilesFieldBuilder().addBuilder(\n index, entities.Torrent.FileInfo.getDefaultInstance());\n }",
"public abstract List<LocalFile> getAllFiles();",
"public Builder addFileInfo(\n int index, entities.Torrent.FileInfo value) {\n if (fileInfoBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFileInfoIsMutable();\n fileInfo_.add(index, value);\n onChanged();\n } else {\n fileInfoBuilder_.addMessage(index, value);\n }\n return this;\n }",
"ds.hdfs.generated.FileMetadata getFiles(int index);",
"private void addFile(String file){\r\n\t\ttry(\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t){\r\n\t\t\tString html = \"\";\r\n\t\t\tString line = \"\";\r\n\t\t\t// read in html from passed file argument\r\n\t\t\twhile((line=reader.readLine())!=null){\r\n\t\t\t\thtml += line;\r\n\t\t\t}\r\n\t\t\t// retrieve all text content elements from page\r\n\t\t\tElements paragraphs = Jsoup.parse(html).select(\"p\");\r\n\t\t\tString content = \"\";\r\n\t\t\tfor (Element i : paragraphs){\r\n\t\t\t\tcontent += i.text()+\" \";\r\n\t\t\t}\r\n\t\t\t// tokenize and log all unique words\r\n\t\t\tMatcher matcher = pattern.matcher(content);\r\n\t\t\tString[] results = matcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\tHashMap<String, Integer> count = new HashMap<String, Integer>();\r\n\t\t\tfor (int i = 0;i<results.length;++i){\r\n\t\t\t\tString word = results[i];\r\n\t\t\t\tif (count.get(word) != null){\r\n\t\t\t\t\tcount.put(word, count.get(word)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcount.put(word, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//create term objects with ids\r\n\t\t\tHashMap<Term, Integer> rCount = new HashMap<Term, Integer>();\r\n\t\t\tint id = 0;\r\n\t\t\tfor (Map.Entry<String, Integer> subset : count.entrySet()){\r\n\t\t\t\trCount.put(new Term(processWord(subset.getKey()),id), subset.getValue());\r\n\t\t\t}\r\n\t\t\t// store data from file\r\n\t\t\tindex.put(file, new IndexedDoc(rCount));\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void update() {\r\n \tthis.pathTextView.setText(this.currentPath);\r\n \tthis.fileListAdapter.clear();\r\n \tthis.fileListAdapter.add(\"[\"+getResources().getString(R.string.go_home)+\"]\");\r\n \tif (!this.currentPath.equals(\"/\"))\r\n \t\tthis.fileListAdapter.add(\"..\");\r\n \t\r\n \tFile files[] = new File(this.currentPath).listFiles(this.fileFilter);\r\n\r\n \tif (files != null) {\r\n\t \ttry {\r\n\t\t \tArrays.sort(files, new Comparator<File>() {\r\n\t\t \t\tpublic int compare(File f1, File f2) {\r\n\t\t \t\t\tif (f1 == null) throw new RuntimeException(\"f1 is null inside sort\");\r\n\t\t \t\t\tif (f2 == null) throw new RuntimeException(\"f2 is null inside sort\");\r\n\t\t \t\t\ttry {\r\n\t\t \t\t\t\tif (dirsFirst && f1.isDirectory() != f2.isDirectory()) {\r\n\t\t \t\t\t\t\tif (f1.isDirectory())\r\n\t\t \t\t\t\t\t\treturn -1;\r\n\t\t \t\t\t\t\telse\r\n\t\t \t\t\t\t\t\treturn 1;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\treturn f1.getName().toLowerCase().compareTo(f2.getName().toLowerCase());\r\n\t\t \t\t\t} catch (NullPointerException e) {\r\n\t\t \t\t\t\tthrow new RuntimeException(\"failed to compare \" + f1 + \" and \" + f2, e);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t \t});\r\n\t \t} catch (NullPointerException e) {\r\n\t \t\tthrow new RuntimeException(\"failed to sort file list \" + files + \" for path \" + this.currentPath, e);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i = 0; i < files.length; ++i) this.fileListAdapter.add(files[i].getName());\r\n \t}\r\n \t\r\n \tif (isHome(currentPath)) {\r\n \t\trecent = new Recent(this);\r\n \t\t\r\n \tfor (int i = 0; i < recent.size(); i++) {\r\n \t\tthis.fileListAdapter.insert(\"\"+(i+1)+\": \"+(new File(recent.get(i))).getName(), \r\n \t\t\t\tRECENT_START+i);\r\n \t}\r\n \t}\r\n \telse {\r\n \t\trecent = null;\r\n \t}\r\n \t\r\n \tthis.filesListView.setSelection(0);\r\n }",
"private static void peopleAndEventsCreate(File selectedFolder, File selectedFile, String nameOfLuceneIndex) throws Exception {\n\t\tStandardAnalyzer analyzer = new StandardAnalyzer();\n\n\t /* Where to store index */\n\t\tFile directoryOfIndex = new File(selectedFolder + nameOfLuceneIndex);\n\t\tdeleteDirectory(directoryOfIndex);\t\t\t\t\t\t\t\t\t\t\t\t\t\t// before creating new index, the old one is deleted\n\t Directory index = FSDirectory.open(directoryOfIndex);\n\n\t IndexWriterConfig config = new IndexWriterConfig(Version.LATEST, analyzer);\n\t IndexWriter w = new IndexWriter(index, config);\n\t \n\t\tBufferedReader in;\n\t\ttry {\n\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(selectedFile), \"UTF-8\"));\n\n\t\t\twhile (in.ready()) {\n\t\t\t\tString oneLine = in.readLine();\n\t\t\t\t\n\t\t\t\tString[] splittedString = oneLine.split(\";\");\n\t\t\t\t\n\t\t\t\tif(splittedString.length == 2) {\n\t\t\t\t\taddDoc(w, splittedString[0], splittedString[1], \"\");\n\t\t\t\t}\n\t\t\t\telse if(splittedString.length == 3) {\n\t\t\t\t\taddDoc(w, splittedString[0], splittedString[1], splittedString[2]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t w.close();\n\t}",
"@Override\n public Collection<LocalFile> referencedLocalFiles() {\n return ImmutableList.of(new LocalFile(queryOutputFilePath, LocalFileType.OUTPUT));\n }",
"public boolean hasIndexFile() {\r\n\t\t\treturn getIndexFile() != null;\r\n\t\t}",
"public Collection<File> getUpToDateFiles() {\n return new ArrayList<>(upToDateFiles);\n }",
"public void populateBinaryTrees(){\n\t\tIndex[] codeIndexes = readIndexes(new File(ApplicationConstants.CODE_INDEX_FILE));\n\t\tIndex[] nameIndexes = readIndexes(new File(ApplicationConstants.NAME_INDEX_FILE));\n\n\t\tcreateIndexBinaryTree(codeIndexes, MainScreen.codeIndexTree);\n\t\tcreateIndexBinaryTree(nameIndexes, MainScreen.nameIndexTree);\n\n\t}",
"public void UpdatePushIndex() {\n\t\tsetorgetState(true,false);\n\t}",
"public void add(File file) {\n\t\tfiles.add(file);\n\t}",
"public void testBasic() throws IOException {\n Set<String> fileExtensions = new HashSet<String>();\n fileExtensions.add(IndexFileNames.FIELDS_EXTENSION);\n fileExtensions.add(IndexFileNames.FIELDS_INDEX_EXTENSION);\n \n Directory primaryDir = new MockDirectoryWrapper(new RAMDirectory());\n Directory secondaryDir = new MockDirectoryWrapper(new RAMDirectory());\n \n FileSwitchDirectory fsd = new FileSwitchDirectory(fileExtensions, primaryDir, secondaryDir, true);\n IndexWriter writer = new IndexWriter(fsd, new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer()));\n ((LogMergePolicy) writer.getConfig().getMergePolicy()).setUseCompoundFile(false);\n ((LogMergePolicy) writer.getConfig().getMergePolicy()).setUseCompoundDocStore(false);\n TestIndexWriterReader.createIndexNoClose(true, \"ram\", writer);\n IndexReader reader = IndexReader.open(writer);\n assertEquals(100, reader.maxDoc());\n writer.commit();\n // we should see only fdx,fdt files here\n String[] files = primaryDir.listAll();\n assertTrue(files.length > 0);\n for (int x=0; x < files.length; x++) {\n String ext = FileSwitchDirectory.getExtension(files[x]);\n assertTrue(fileExtensions.contains(ext));\n }\n files = secondaryDir.listAll();\n assertTrue(files.length > 0);\n // we should not see fdx,fdt files here\n for (int x=0; x < files.length; x++) {\n String ext = FileSwitchDirectory.getExtension(files[x]);\n assertFalse(fileExtensions.contains(ext));\n }\n reader.close();\n writer.close();\n\n files = fsd.listAll();\n for(int i=0;i<files.length;i++) {\n assertNotNull(files[i]);\n }\n fsd.close();\n }",
"public Builder addFiles(\n int index, entities.Torrent.FileInfo.Builder builderForValue) {\n if (filesBuilder_ == null) {\n ensureFilesIsMutable();\n files_.add(index, builderForValue.build());\n onChanged();\n } else {\n filesBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }",
"@Test\n public void storesIndexIfNone() throws Exception {\n final String name = \"talk\";\n final Talks talks = new Talks.InDir();\n talks.create(\"\", name);\n talks.get(name).modify(\n new Directives()\n .xpath(\"/talk\").push().xpath(\"wire\").remove().pop()\n .add(\"wire\").add(\"href\").set(\"#1\").up().up()\n .add(\"request\").attr(\"id\", \"a12345\")\n .add(\"author\").set(\"yegor256\").up()\n .add(\"args\").up()\n .add(\"type\").set(\"deploy\").up()\n );\n new IndexesRequests().execute(talks);\n MatcherAssert.assertThat(\n talks.get(name).read(),\n XhtmlMatchers.hasXPaths(\"/talk/request[@index='1']\")\n );\n }",
"public Builder addEntry(\n int index, com.google.devtools.kythe.proto.Analysis.FileInfo value) {\n if (entryBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureEntryIsMutable();\n entry_.add(index, value);\n onChanged();\n } else {\n entryBuilder_.addMessage(index, value);\n }\n return this;\n }",
"public void addDeletedFiles(java.lang.String param){\r\n if (localDeletedFiles == null){\r\n localDeletedFiles = new java.lang.String[]{};\r\n }\r\n\r\n \r\n //update the setting tracker\r\n localDeletedFilesTracker = true;\r\n \r\n\r\n java.util.List list =\r\n org.apache.axis2.databinding.utils.ConverterUtil.toList(localDeletedFiles);\r\n list.add(param);\r\n this.localDeletedFiles =\r\n (java.lang.String[])list.toArray(\r\n new java.lang.String[list.size()]);\r\n\r\n }",
"public Builder removeFileInfo(int index) {\n if (fileInfoBuilder_ == null) {\n ensureFileInfoIsMutable();\n fileInfo_.remove(index);\n onChanged();\n } else {\n fileInfoBuilder_.remove(index);\n }\n return this;\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"protected final void addFileIds(IntList fileIds) {\n getChildIds().addAll(fileIds);\n getBTreeMetaData().setDirty(this);\n }",
"public void createIndex() throws IOException {\n\t\tLOGGER.info(\"creating photo index...\");\n\t\tCreateIndexRequest request = new CreateIndexRequest(\"files\");\n\t\tInputStream in = getClass().getClassLoader().getResourceAsStream(\"photo.json\");\n\t\tString mapping = new String(in.readAllBytes());\n\t\tin.close();\n\t\trequest.mapping(\"photo\", mapping, XContentType.JSON);\n\t\tCreateIndexResponse response = client.indices().create(request);\n\t\tLOGGER.info(\"photo index created: \" + response.toString());\n\t}",
"public static byte[] updateRepositoryMap(String repo, Map<String, String> add) {\n \t\tMap<String, String> repoMap = assetLoader.getRepositoryMap(repo);\n \t\trepoMap.putAll(add);\n \t\tbyte[] index = assetLoader.createIndexFile(repo);\n \t\ttry {\n \t\t\tassetLoader.storeIndexFile(repo, index);\n \t\t} catch (IOException e) {\n \t\t\tlog.error(\"Couldn't save updated index to local repository cache\", e);\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn index;\n \t}",
"private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}",
"public com.google.devtools.kythe.proto.Analysis.FileInfo.Builder addEntryBuilder(\n int index) {\n return getEntryFieldBuilder().addBuilder(\n index, com.google.devtools.kythe.proto.Analysis.FileInfo.getDefaultInstance());\n }",
"protected void addFiles(Vector v, ZipOutputStream zOut, String prefix)\n throws IOException {\n for (int i=0; i<v.size(); i++) {\n FileSet fs = (FileSet) v.elementAt(i);\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n addFiles(ds, zOut, prefix);\n }\n }",
"public synchronized void readFileTree() throws FileTreeReadingException {\n final Set<Path> missingFiles = new HashSet<>(projectFiles.keySet());\n\n final LinkedHashMap<Path, Boolean> newFiles = new LinkedHashMap<>();\n\n try {\n Files.walkFileTree(projectDirectoryPath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\n if (projectDirectoryPath.compareTo(path) == 0)\n return FileVisitResult.CONTINUE;\n\n if (!missingFiles.remove(path))\n newFiles.put(path, true);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) throws IOException {\n if (!missingFiles.remove(path))\n newFiles.put(path, false);\n return FileVisitResult.CONTINUE;\n }\n });\n\n projectFiles.keySet().removeAll(missingFiles);\n projectFiles.putAll(newFiles);\n globalEventManager.fireEventListeners(this,\n new ProjectFileListChangedEvent(newFiles, missingFiles));\n\n } catch (IOException e) {\n throw new FileTreeReadingException(projectDirectoryPath, e);\n }\n }",
"public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n void initExisting() throws IOException {\n LOG.info(\"Initializing Existing Jobs...\");\n List<FileStatus> timestampedDirList = findTimestampedDirectories();\n Collections.sort(timestampedDirList);\n for (FileStatus fs : timestampedDirList) {\n // TODO Could verify the correct format for these directories.\n addDirectoryToSerialNumberIndex(fs.getPath());\n addDirectoryToJobListCache(fs.getPath());\n }\n }",
"private boolean commitChecker() {\n\t\tFile file = new File(stagePath);\n\t\tFile[] files = file.listFiles();\n\t\tif (files.length == 0 && untrackedFiles.size() == 0) {\n\t\t\tSystem.out.println(\"No changes added to the commit.\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void forceUpdateSearchIndexes() throws InterruptedException {\n\t getFullTextEntityManager().createIndexer().startAndWait();\n\t}",
"@Override\r\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\treturn indexFilenames.contains(name.toLowerCase());\r\n\t\t}",
"@Override\r\n\tpublic List<FileMetaDataEntity> getAllFiles() {\n\t\treturn null;\r\n\t}",
"@Override\n public void fileStatusesChanged() {\n assertDispatchThread();\n LOG.debug(\"FileEditorManagerImpl.MyFileStatusListener.fileStatusesChanged()\");\n final VirtualFile[] openFiles = getOpenFiles();\n for (int i = openFiles.length - 1; i >= 0; i--) {\n final VirtualFile file = openFiles[i];\n LOG.assertTrue(file != null);\n ApplicationManager.getApplication().invokeLater(() -> {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"updating file status in tab for \" + file.getPath());\n }\n updateFileStatus(file);\n }, IdeaModalityState.NON_MODAL, myProject.getDisposed());\n }\n }",
"void addFile(RebaseJavaFile jf)\n{\n if (file_nodes.contains(jf)) return;\n\n file_nodes.add(jf);\n jf.setRoot(this);\n}",
"@Lock\n void markArchiveForIndexing(RepoPath searchPath);",
"@Override\n public void reindexImpl()\n {\n List<StoreRef> storeRefs = nodeService.getStores();\n int count = 0;\n for (StoreRef storeRef : storeRefs)\n {\n // prompt the FTS reindexing\n if (!ftsIndexerCalled)\n {\n ftsIndexer.requiresIndex(storeRef);\n }\n // reindex missing content\n count += reindexMissingContent(storeRef);\n // check if we have to break out\n if (isShuttingDown())\n {\n break;\n }\n }\n \n // The FTS indexer only needs to be prompted once\n ftsIndexerCalled = true;\n\n // done\n if (logger.isDebugEnabled())\n {\n logger.debug(\"Missing content indexing touched \" + count + \" content nodes\");\n }\n }",
"private static void indexFromJarFile(InputStream in) throws IOException {\n\n\t\tZipInputStream zis = new ZipInputStream(in);\n\t\tZipEntry e;\n\n\t\twhile((e = zis.getNextEntry()) != null) {\n\n\t\t\tString name = e.getName();\n\t\t\tzis.closeEntry();\n\n\t\t\tif(name.contains(relationRepositoryPath) && name.endsWith(classExtension)) {\n\n\t\t\t\taddToIndex(name.replace(jarFileRelationRepositoryPath, \"\"));\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t}",
"public void deleteIndex() throws IOException {\n synchronized (getLock()) {\n flush();\n if (ZimbraLog.index_add.isDebugEnabled()) {\n ZimbraLog.index_add.debug(\"Deleting index \" + luceneDirectory);\n }\n\n String[] files;\n try {\n files = luceneDirectory.listAll();\n } catch (NoSuchDirectoryException ignore) {\n return;\n } catch (IOException e) {\n ZimbraLog.index_add.warn(\"Failed to delete index: %s\",\n luceneDirectory, e);\n return;\n }\n\n for (String file : files) {\n luceneDirectory.deleteFile(file);\n }\n }\n }"
] | [
"0.58389735",
"0.5774886",
"0.5616337",
"0.55316085",
"0.5526397",
"0.5498273",
"0.5433057",
"0.5380276",
"0.5366191",
"0.5319509",
"0.5292478",
"0.5275227",
"0.5261001",
"0.5240389",
"0.52353543",
"0.5203538",
"0.51687783",
"0.5126074",
"0.5122524",
"0.51084894",
"0.5095962",
"0.5085352",
"0.50692797",
"0.506291",
"0.50613207",
"0.5049099",
"0.504123",
"0.5025271",
"0.5024278",
"0.5002043",
"0.49992594",
"0.4962335",
"0.49498057",
"0.49427375",
"0.4939377",
"0.49249703",
"0.49103725",
"0.4909779",
"0.4907518",
"0.490666",
"0.4896907",
"0.48792428",
"0.48750257",
"0.48524055",
"0.48362222",
"0.48306254",
"0.4817558",
"0.481285",
"0.47937378",
"0.4778319",
"0.47665855",
"0.47598857",
"0.47570398",
"0.47538793",
"0.47464263",
"0.4735156",
"0.47334427",
"0.4733001",
"0.4726189",
"0.4719902",
"0.47127613",
"0.47057328",
"0.46961266",
"0.46953705",
"0.4694777",
"0.46877718",
"0.4674347",
"0.46734405",
"0.4671539",
"0.46619907",
"0.46536732",
"0.4652885",
"0.46398252",
"0.46348333",
"0.46272713",
"0.46227154",
"0.4614976",
"0.46128917",
"0.46073872",
"0.46036986",
"0.45985267",
"0.45982662",
"0.45981213",
"0.4597151",
"0.459166",
"0.45902267",
"0.45867553",
"0.4584357",
"0.45817995",
"0.45814857",
"0.45749784",
"0.45742252",
"0.4573403",
"0.45729855",
"0.45630744",
"0.45612243",
"0.45586172",
"0.45545772",
"0.45533198",
"0.45521095"
] | 0.730305 | 0 |
Resets changed files to head | List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tbr.seek(0);\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"Files not found.\");\r\n\t\t}\r\n\t}",
"private void reset() {\n\t\tfiles = new HashMap<>();\n\t\tparams = new HashMap<>();\n\t}",
"public void reset()\n {\n \tthis.heapFiles.clear();\n }",
"private void updateFiles() {\n\t}",
"public synchronized void reset() {\n java.util.Arrays.fill(buffer, (byte) 0);\n writeHead = 0;\n cumulativeWritten = 0;\n synchronized (allReaders) {\n for (Reader reader : allReaders) {\n reader.reset();\n }\n }\n }",
"void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);",
"public void reset() {\n firstUpdate = true;\n }",
"public void resetPath();",
"public final void rewind() {\n branch = 0;\n }",
"void flush() {\r\n synchronized (sync) {\r\n updatedFiles.clear();\r\n }\r\n }",
"public void reset () {\n lastSave = count;\n count = 0;\n }",
"public void reset(String commID) {\n Comm comm = null;\n if (hasuntracked(head)) {\n Utils.message(\"There is an untracked file in the way;\"\n + \" delete it or add it first.\");\n throw new GitletException();\n }\n if (allcomms.containsKey(commID)) {\n comm = allcomms.get(commID);\n } else {\n for (String s : allcomms.keySet()) {\n if (s.substring(0, 8).equals(commID)) {\n comm = allcomms.get(s);\n break;\n }\n }\n\n }\n if (comm == null) {\n Utils.message(\"No commit with that id exists.\");\n } else {\n head = comm;\n for (Blob b: head.getContents().values()) {\n File f = new File(b.getName());\n Utils.writeContents(f,\n head.getContents().get(b.getName()).getContent());\n stagingarea.clear();\n }\n deleteuntracked(head);\n branches.put(branch, head);\n\n }\n }",
"@Override\n\tpublic void resetToExisting() {\n\t\t\n\t}",
"private void clearNewHeadpic() {\n \n newHeadpic_ = getDefaultInstance().getNewHeadpic();\n }",
"public synchronized void reset() throws IOException {\n\t\t\tdata.seek(firstPosition);\n\t\t}",
"public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}",
"public static void resetActiveDataFiles() {\n\t\tmDataFiles = new ArrayList<String>();\n\t\tmNumDataFiles = 0;\n\t\tsetNumDataFiles(mNumDataFiles);\n\t}",
"private void reset() {\n }",
"public void resetFileTitle()\n\t{\n\t\tif(currentFile.length() == 0)\n\t\t{\n\t\t\tfileTitle.setTitle(\"Editor\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfileTitle.setTitle(currentFile.toString());\n\t\t}\n\t\ttextEditor.repaint();\n\t}",
"public void reset() {\n noIndex= false;\n noFollow= false;\n noCache= false;\n baseHref= null;\n }",
"public void resetModification()\n {\n _modifiedSinceSave = false;\n }",
"public void reset(final File file) {\n if (file == null) {\n return;\n }\n final Source source = new Source(file);\n reset(source);\n }",
"@Override\n public void reset() throws IOException {\n setPosition(startPosition);\n }",
"@Override\n public void reset() throws IOException {\n lemmaListIndex = 0;\n lemmaList = Collections.emptyList();\n tagsList.clear();\n super.reset();\n }",
"public void reset() {\n\n\t}",
"private void setInitialSourceFile()\n\t{\n\t\tint largestAuthoredId = -1;\n\t\tSourceFile[] files = m_fileInfo.getFileList();\n\t\tfor (int i=0; i<files.length; ++i)\n\t\t{\n\t\t\tSourceFile sf = files[i];\n\t\t\tif (sf.getId() > largestAuthoredId && getFileType(sf) == AUTHORED_FILE)\n\t\t\t\tlargestAuthoredId = sf.getId();\n\t\t}\n\t\tif (largestAuthoredId != -1)\n\t\t\tsetListingPosition(largestAuthoredId, 1);\n\t}",
"public void reset() {\n logger.debug(\"Resetting {}\", this);\n for (final Source source : watchers.keySet()) {\n reset(source);\n }\n }",
"public void reset() {\n\t\t\t\t\r\n\t\t\t}",
"private void resetHead() {\n mHead.setMode(Head.MODE_SMOOTH_TACKING);\n mHead.setWorldYaw(0);\n mHead.setWorldPitch(0.7f);\n }",
"public void resetExtension()\r\n {\r\n this.extension = null;\r\n }",
"protected void reset() {\n\t\t}",
"public void reset(int commitId) throws IOException {\n\t\tif (!myCommit.containsKey(commitId)) {\n\t\t\tSystem.out.println(\"No commit with that id exists.\");\n\t\t} else {\n\t\t\tfor (String fileName : myCommit.get(commitId).file().keySet()) {\n\t\t\t\tFile before = new File(myCommit.get(commitId).file()\n\t\t\t\t\t\t.get(fileName));\n\t\t\t\tFile after = new File(\"./\" + fileName);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\tmyHead = myCommit.get(commitId);\n\t\t\tmyBranch.put(currentBranch, myHead);\n\t\t\ttracked = myHead.file();\n\t\t\tstagedFiles = new ArrayList<String>();\n\t\t\tSerialization();\n\t\t}\n\t}",
"void reset() throws IOException;",
"void reset() throws IOException;",
"public synchronized void reset() {\n }",
"public void reset () {}",
"public synchronized void refresh()\n {\n // Update the last modified time\n // This returns zero (i.e. Jan 1 1970) if the file does not exist\n this.lastModifiedTime = this.file.lastModified() / 1000;\n }",
"public void reset() {\n initEntries();\n }",
"public void resetAndTruncate()\n {\n rowIndexFile.resetAndTruncate(riMark);\n partitionIndexFile.resetAndTruncate(piMark);\n }",
"public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"public void reset() {\n\t}",
"private void resetMarked() {\n if(!data.isEmpty()) {\n data.getFirst().reset();\n }\n for(IoBuffer buf : resetCache) {\n buf.reset();\n data.addFirst(buf);\n }\n resetCache.clear();\n }",
"public void reset() {\n started = false;\n flushing = false;\n moreText = true;\n headerCount = 0;\n actualLen = 0;\n }",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public void resetRepository() {\n repository.clear();\n addDirectories( directory );\n }",
"@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }",
"public void reset() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"public void reset() {\n }",
"@Override\n public void reset() throws IOException {\n\td.numObjectsCached = 0;\n\td.reset();\n }",
"private void reset() throws IOException {\n }",
"private static void reset(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (args.length != 2) {\n System.out.println(\"Please input a commit ID\");\n\n } else if (!currCommit.tree.containsId(args[1])) {\n System.out.println(\"No commit with that id exists.\");\n\n } else {\n Commit commit = currCommit.tree.getCommitFromId(args[1]);\n HashMap<String, String> fileToLoc = commit.getUpdatedFileToLoc();\n for (String x : fileToLoc.keySet()) {\n FileManip origin = new FileManip(fileToLoc.get(x));\n origin.copyFile(x);\n }\n currCommit.tree.setCommit(Integer.parseInt(args[1]));\n currCommit.tree.setHeadCommit(commit);\n currCommit.tree.alterCommitSet(commit);\n addSerializeFile(currCommit);\n }\n }",
"public void reset() {\n\r\n\t}",
"public void reset()\n\t{\n\t}",
"public void reset()\n\t{\n\t}",
"void clearModifiedFlag();",
"public void reset()\n {\n total_frames = 0;\n total_messages = 0;\n total_size = 0;\n lost_frames = 0;\n lost_segments = 0;\n num_files = 0;\n start_time = System.nanoTime();\n m_lastFrames.clear();\n }",
"@Override\n\tpublic void reset() { // ? will it ever be reset before sorting?\n\t\tif(TR == null) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tTR.reset();\n\t\t} catch(Exception e) {\n\t\t\tSystem.err.println(\"Exception occurred for resetting the TupleReader on: \" + tempsubdir);\n\t\t\tSystem.err.println(e.toString());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}",
"void seekReset() {\n discardQueued(false);\n eofCond = false;\n stickyEofCond = false;\n blocked = false;\n sawCR = false;\n // FIXME: Change needed in Tcl\n //needNL = false;\n }",
"final void resetChanged() {\n this.changed = false;\n }",
"public void reset() {\n\n }",
"public void resetLines() throws IOException {\n counterSeveralLines = linesAfter;\n if (currentPath != null) {\n bufferReader.close();\n fileReader.close();\n fileReader = new FileReader(currentPath);\n bufferReader = new BufferedReader(fileReader);\n arrayPreviousLines = new String[prevSize];\n resetDateBefore();\n }\n }",
"@ManagedOperation(description = \"Reset and reloads the file store\")\n public synchronized void reset() throws IOException {\n synchronized (cache) {\n // trunk and clear, before we reload the store\n trunkStore();\n cache.clear();\n loadStore();\n }\n }",
"public void clearModifiedFlag();",
"public void reset(final Source source) {\n if (source == null) {\n return;\n }\n final ConfigurationMonitor monitor = watchers.get(source);\n if (monitor != null) {\n final Watcher watcher = monitor.getWatcher();\n if (watcher.isModified()) {\n final long lastModifiedMillis = watcher.getLastModified();\n if (logger.isDebugEnabled()) {\n logger.debug(\"Resetting file monitor for '{}' from {} ({}) to {} ({})\", source.getLocation(),\n millisToString(monitor.lastModifiedMillis), monitor.lastModifiedMillis,\n millisToString(lastModifiedMillis), lastModifiedMillis);\n }\n monitor.setLastModifiedMillis(lastModifiedMillis);\n }\n }\n }",
"public void reset() {\n\t\tdroppedFiles.clear();\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}",
"public void reset() {\r\n bop.reset();\r\n gzipOp = null;\r\n }",
"public void unReset () {\n count = lastSave;\n }",
"public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}",
"@Override\n public void resetStateOfSUT() {\n\n try {\n //FIXME: this fails due to locks on Neo4j. need way to reset it\n //deleteDir(new File(tmpFolder));\n if(!Files.exists(Path.of(tmpFolder))) {\n Files.createDirectories(Path.of(tmpFolder));\n }\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"users.json\"), Path.of(tmpFolder,\"users.json\"), StandardCopyOption.REPLACE_EXISTING);\n Files.copy(getClass().getClassLoader().getResourceAsStream(\"logins.json\"), Path.of(tmpFolder,\"logins.json\"), StandardCopyOption.REPLACE_EXISTING);\n }catch (Exception e){\n throw new RuntimeException(e);\n }\n }",
"public void reset ()\n {\n // position our buffer at the beginning of the frame data\n _buffer.position(getHeaderSize());\n }",
"public void resetChanges() {\n\t\tthis.resetStatus();\n\t\ttheStructures.resetStatus();\n\n\t\tfireDocumentInit();\n\t}",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"public void reset();",
"private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }",
"private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }",
"@Override\r\n\t\t\tpublic void reset() {\n\t\t\t\t\r\n\t\t\t}",
"private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }",
"private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }",
"private void clearHeadpic() {\n \n headpic_ = getDefaultInstance().getHeadpic();\n }",
"private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }"
] | [
"0.6956521",
"0.6553177",
"0.6449635",
"0.6393208",
"0.6332633",
"0.63142157",
"0.6288858",
"0.62619483",
"0.6237631",
"0.6231064",
"0.61786616",
"0.616332",
"0.6140498",
"0.61295885",
"0.61213535",
"0.6099013",
"0.60955286",
"0.6089574",
"0.6082406",
"0.60819876",
"0.60779494",
"0.6075269",
"0.60456085",
"0.6025395",
"0.600981",
"0.6009261",
"0.6005024",
"0.5995068",
"0.59947354",
"0.5992881",
"0.5988406",
"0.59856874",
"0.5978495",
"0.5978495",
"0.5976777",
"0.5967502",
"0.5963786",
"0.59434205",
"0.59336007",
"0.5932512",
"0.5929421",
"0.5929421",
"0.5929421",
"0.5929421",
"0.5923357",
"0.59197897",
"0.5911304",
"0.59102607",
"0.5908701",
"0.59022665",
"0.5891197",
"0.5891197",
"0.5891197",
"0.5891197",
"0.58844537",
"0.58781135",
"0.5870948",
"0.58703667",
"0.5858554",
"0.5858554",
"0.585431",
"0.5842806",
"0.5841753",
"0.5839874",
"0.58353716",
"0.5835151",
"0.5834983",
"0.5834363",
"0.58320814",
"0.58317167",
"0.5831267",
"0.5829855",
"0.5821385",
"0.5818771",
"0.58119214",
"0.5811912",
"0.5807421",
"0.58070296",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.5797062",
"0.579553",
"0.5764649",
"0.5762943",
"0.57589346",
"0.57589346",
"0.57589346",
"0.5758924"
] | 0.5938188 | 38 |
Gets branches of project | Set<Branch> getBranches(Collection<Project> projects, BranchType brType, boolean onlyCommon); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<String> branches();",
"public List<Branch> getBranchs()\r\n\t{\t\r\n\t\tif (branchs.size() == 0)\r\n\t\t{\r\n\t\t\t//Lacos abertos carga x terra (redes radiais)\r\n\t\t\tbranchs.addAll(findBranchs());\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn branchs; \r\n\t}",
"public String getTrackingBranch(Project project);",
"public List<Commit> getAllCommits(Project project, String branchName);",
"public List<Map<String, Object>> getAvailableBranches()\n {\n List<String> allTenants = getWikiSelector().getMptIdSelector().getTenants(GWikiWeb.getRootWiki());\n List<Map<String, Object>> branchProps = new ArrayList<Map<String, Object>>();\n\n // default new branch is selected\n this.selectedBranch = NEW_BRANCH;\n\n for (String tenantId : allTenants) {\n\n // if approve you have to copy the file in a branch other than draft\n if (PlcConstants.DRAFT_ID.equalsIgnoreCase(tenantId) == true\n && FileState.APPROVED_CHIEF_EDITOR.name().equals(newPageState) == true) {\n continue;\n }\n\n GWikiProps branchInfoProp = wikiContext.runInTenantContext(tenantId, getWikiSelector(),\n new CallableX<GWikiProps, RuntimeException>()\n {\n @Override\n public GWikiProps call() throws RuntimeException\n {\n return PlcUtils.getBranchInfo(wikiContext);\n }\n });\n\n if (branchInfoProp == null) {\n continue;\n }\n\n // only add offline branches\n if (BranchState.OFFLINE.name()\n .equals(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_STATE)) == true) {\n Map<String, Object> m = new HashMap<String, Object>();\n m.putAll(branchInfoProp.getMap());\n m.put(\"RELEASE_DATE_DATE\",\n GWikiProps.parseTimeStamp(branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE)));\n branchProps.add(m);\n\n // if branch release date matches article release date -> preselect branch\n String release = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_RELEASE_DATE);\n Date branchReleaseDate = GWikiProps.parseTimeStamp(release);\n if (branchReleaseDate != null && branchReleaseDate.equals(getStartDateOfArticle())) {\n selectedBranch = branchInfoProp.getStringValue(PlcConstants.BRANCH_INFO_BRANCH_ID);\n }\n }\n }\n return branchProps;\n }",
"public ArrayList<Branch> getBranches() {\r\n\t\ttry {\r\n\t\t\tbranchList.clear();\r\n \tFileInputStream fis = new FileInputStream(BRANCH_FILEPATH);\r\n \tObjectInputStream ois = new ObjectInputStream(fis);\r\n \tBranch obj = null;\r\n \r\n \twhile ((obj=(Branch)ois.readObject())!=null) {\r\n \t\tbranchList.add(obj);\r\n \t}\r\n \tois.close();\r\n }\r\n\t\tcatch (EOFException e) {\r\n\t\t\tSystem.out.println(\"End of file reached.\");\r\n }\r\n catch (ClassNotFoundException e) {\r\n \te.printStackTrace();\r\n }\r\n catch (IOException e) {\r\n \te.printStackTrace();\r\n }\r\n\t\treturn branchList;\r\n\t}",
"public Set<String> branches() {\r\n\t\treturn branchesPartOf;\r\n\t}",
"Set<String> getBranchNames(TRepo repo);",
"String getCurrentBranchName(Project project);",
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"public JsonArray getBranchesForRepo(String repoUrl, int repoId) {\n // get version labeled branches from db\n String url = \"/repo/branches\";\n JsonObject jsonObject = new JsonObject();\n jsonObject.addProperty(\"repoId\", repoId);\n JsonObject sendObject = sqlHandler.createPostDataObject(\"_post_repo_branches\", jsonObject);\n\n JsonElement returnElement = this.sqlHandler.post(url, sendObject);\n\n JsonArray branchJsonArray = new JsonArray();\n ProcessorCommon.checkValidResponseAndPopulateArray(returnElement, \"branches\", \"branch\", branchJsonArray);\n // get branch names from db\n ArrayList<String> dbBranchNameArray = new ArrayList<>();\n for (JsonElement branch : branchJsonArray) {\n JsonObject branchObject = branch.getAsJsonObject();\n dbBranchNameArray.add(ProcessorCommon.trimJsonElementString(branchObject.get(\"branchName\")));\n }\n\n String gitRepoName = ProcessorCommon.extractRepoName(repoUrl);\n\n\n// logger.debug(\"Extracting branch data for \" + repoName + \"from git\");\n // get branches from git\n url = gitBaseUrl + \"/repos/\" + gitRepoName + \"/branches\";\n JsonArray gitBranchArray = this.gitHandlerImplement.getJSONArrayFromGit(url);\n for (JsonElement branch : gitBranchArray) {\n JsonObject branchObject = branch.getAsJsonObject();\n String name = ProcessorCommon.trimJsonElementString(branchObject.get(\"name\"));\n if (!dbBranchNameArray.contains(name)) {\n JsonObject tempBranchObject = new JsonObject();\n tempBranchObject.addProperty(\"branchId\", -1);\n tempBranchObject.addProperty(\"branchName\", name);\n tempBranchObject.addProperty(\"versionId\", -1);\n tempBranchObject.addProperty(\"versionName\", \"null\");\n branchJsonArray.add(tempBranchObject);\n }\n }\n\n return branchJsonArray;\n\n }",
"HibBranch getBranch(InternalActionContext ac, HibProject project);",
"@GetMapping(\"/getAllBranches\")\n\tpublic ResponseEntity<List<BranchDto>> getAllBranches(){\n\t\tlogger.trace(\"Requested to get all branches\");\n\t\tList<BranchDto> branches= service.getAllBranches();\n\t\tlogger.trace(\"Completed request to get all branches\");\n\t\treturn ResponseEntity.ok(branches);\n\t}",
"public GitBranch getBranch() { return GitDir.this.getBranch(getName()); }",
"String getBranchName();",
"public List<Build> getBuildsForProject(int projectId);",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"private List<Branch> findBranchs()\r\n\t{\t\r\n\t\tList<Branch> localBranchs = new ArrayList<>();\r\n\t\tHashMap<String, Node> destinationNodes = new HashMap<>();\r\n\t\t\r\n\t\t// Percorre todos os arcos da rede\r\n\t\tfor (Edge edge: this.getEdges())\r\n\t\t{\t\r\n\t\t\t// Se ha carga no no destino do arco, este no � uma folha da rede\r\n\t\t\tif (edge != null && edge.getDestinationNode().getLoads().size() > 0) \r\n\t\t\t{\t\r\n\t\t\t\t// Verifica se h� mais de um arco com a mesma carga\r\n\t\t\t\tif (!destinationNodes.containsKey(edge.getDestinationNode().getLabel()))\r\n\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\tBranch branch = new Branch(edge.getDestinationNode().getLabel());\r\n\t\t\t\t\tbranch.addEdges(edge);\r\n\t\t\t\t\tEdge newEdge = edge.getReference();\r\n\t\t\t\t\tdestinationNodes.put(edge.getDestinationNode().getLabel(), edge.getDestinationNode());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// percorre os elementos amontantes do no e monta o laco\r\n\t\t\t\t\twhile (newEdge != null) \r\n\t\t\t\t\t{\t\t\r\n\t\t\t\t\t\tbranch.addEdges(newEdge.getReference());\r\n\t\t\t\t\t\tnewEdge = newEdge.getReference();\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tlocalBranchs.add(branch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\r\n\t\treturn localBranchs; \r\n\t}",
"public void updateBranches() throws VcsException {\n VirtualFile root = getSelectedRoot();\n GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);\n handler.addParameters(\"--no-color\", \"-a\", \"--no-merged\");\n String output = ProgressManager.getInstance().runProcessWithProgressSynchronously(\n () -> Git.getInstance().runCommand(handler).getOutputOrThrow(),\n \"Preparing List of Branches\", true, myProject);\n myBranchChooser.clear();\n for (StringTokenizer lines = new StringTokenizer(output, \"\\n\", false); lines.hasMoreTokens();) {\n String branch = lines.nextToken().substring(2);\n myBranchChooser.addElement(branch, false);\n }\n }",
"java.lang.String getBranchName();",
"boolean containsBranches(Project project, List<Branch> branches, boolean isCommon);",
"public List<Branch> getBranchListForBank(String name);",
"@Override\n public ListBranchesResult listBranches(ListBranchesRequest request) {\n request = beforeClientExecution(request);\n return executeListBranches(request);\n }",
"public List<String> getBranchTags() {\n\t\tCVSTag[] branches = logEntry.getBranches();\n\t\tArrayList<String> branchList = new ArrayList<String>(branches.length);\n\t\tfor (CVSTag br : branches) {\n\t\t\tbranchList.add(br.getName());\n\t\t}\n\t\treturn branchList;\n\t}",
"public Collection<Stmt> branches() {\n if(branches_computed) {\n return branches_value;\n }\n ASTNode$State state = state();\n int num = state.boundariesCrossed;\n boolean isFinal = this.is$Final();\n branches_value = branches_compute();\n if (isFinal && num == state().boundariesCrossed) {\n branches_computed = true;\n } else {\n }\n\n return branches_value;\n }",
"public List<PackerTreeNode<T>> getBranch() {\n final var result = new ArrayList<PackerTreeNode<T>>();\n result.add(this);\n if (parent != null) {\n result.addAll(parent.getBranch());\n }\n return result;\n }",
"public String getBranchName() {\n return branchName;\n }",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\tGitHub github = GitHub.connectUsingPassword(\"shashankmjain\", \"welcome1\");\n\t\t\n\t\tGHRepository repo=github.getRepository(\"twitter/algebird\");\n\t\t\n\t\tMap branches=repo.getBranches();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(branches);\n\t\t\n\n\t}",
"public String getBranchName() {\r\n return branchName;\r\n }",
"com.google.protobuf.ByteString\n getBranchNameBytes();",
"public String getBranchname() {\n return branchname;\n }",
"@Override\n public GetBranchResult getBranch(GetBranchRequest request) {\n request = beforeClientExecution(request);\n return executeGetBranch(request);\n }",
"List<BranchDto> getByRegion(int regionId) throws ServiceException;",
"public String getBranchName() {\n return branchName;\n }",
"public void printBranches() {\n System.out.println(\"=== Branches ===\");\n List<String> allBranchF = Utils.plainFilenamesIn(Main.ALL_BRANCHES);\n String commitInHead = Utils.readObject(HEADNAME, String.class);\n for (String branch: allBranchF) {\n if (branch.equals(commitInHead)) {\n System.out.println(\"*\" + branch);\n } else {\n System.out.println(branch);\n }\n }\n }",
"public List<Branch> getChildBranches() {\n return (childBranches != null) ? childBranches :\n Collections.emptyList();\n }",
"public String getBranchcode() {\n return branchcode;\n }",
"@Override\n\tpublic List<Object[]> findBranchByBrnCode(String brnCode) {\n\t\treturn brnRepo.findBranchByBrnCode(brnCode);\n\t}",
"public File getBranch() {\n return _branch;\n }",
"public List<LibraryBranch> readBranchesByName(String branchName) {\n\t\treturn null;\n\t}",
"public String getBranchno() {\n return branchno;\n }",
"public Integer getBranchNum() {\r\n return branchNum;\r\n }",
"public List<Project> getAllProjects();",
"public List<Branch> branchs(String owner, String repo) {\n return apiClient.deserializeAsList(apiClient.get(String.format(\"/repos/%s/%s/branchs\", owner, repo)), Branch.class);\n }",
"public String getBranchNo() {\r\n return branchNo;\r\n }",
"public String getBranchsByUser(User user) {\n\t\t\treturn null;\r\n\t\t}",
"public GitBranch getRemoteBranch()\n {\n if(getName().contains(\"/remotes/\")) return null;\n return getRemote().getBranch(getSimpleName());\n }",
"public String getBranchNo() {\n return branchNo;\n }",
"public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.BranchOfficeList getBranchOfficeList();",
"Git getGit();",
"public java.lang.String getBranchName() {\n return branchName;\n }",
"public String getBranchId() {\n return branchId;\n }",
"public void getBranchCommand() {\n\n }",
"public int getBranchCount() { return _brcnt; }",
"private void populateBranches() {\n\t\tStationsDTO[] station = null;\n\t\ttry {\n\t\t\tstation = handler.getAllBranches();\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoBranch.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}",
"java.lang.String getBranchId();",
"public BranchDetails getBranchDetails(){\n\t\n\tbranchD = BranchDetails.getBranchDetails();\t\n\treturn branchD;\n\t}",
"String branch();",
"public GitBranch getBranch(String aName) { return GitDir.this.getBranch(getName() + '/' + aName); }",
"com.google.protobuf.ByteString\n getBranchIdBytes();",
"public String getBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"getBranch()\");\n Via via=(Via)sipHeader;\n return via.getBranch();\n }",
"public abstract List<ProjectBean> getProjectList();",
"public String getMessageBranches()\n\t{\n\t\treturn messageBranches;\n\t}",
"public Integer getBranchId() {\n return branchId;\n }",
"public int getBranchCount() {\n return this.branchCount;\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public BigDecimal getBRANCH_CODE() {\r\n return BRANCH_CODE;\r\n }",
"public Optional<String> getBranch() {\n return Optional.fromNullable(branch);\n }",
"public ArrayList <Branch> createBranch(){\n\t\tPVector dir1 =PVector.sub(loc_end,loc_begin);\n\t\tPVector dir2 =PVector.sub(loc_end,loc_begin);\n\t\t//println(\"loc_newEnd1: \"+loc_end.x+\" : \"+loc_end.y);\n\t\t//println(\"loc_newEnd1: \"+dir1.x+\" : \"+dir1.y);\n\t\tdir1.rotate(random(PI/4,PI/5));\n\t\tdir1.mult(0.67f);\n\t\tPVector loc_newEnd1 = PVector.add(loc_end,dir1);\n\t\tBranch branch_a = new Branch(this.loc_end,loc_newEnd1);\n\t\t\n\t\tdir2.rotate(random(-PI/4,-PI/5));\n\t\tdir2.mult(0.67f);\n\t\tPVector loc_newEnd2 = PVector.add(loc_end,dir2);\n\t\tBranch branch_b = new Branch(this.loc_end,loc_newEnd2);\n\n\t\tArrayList<Branch> bs = new ArrayList<Branch>() ;\n\t\tbs.add(branch_a);\n\t\tbs.add(branch_b);\n\t\tcomplete=true;\n\n\t\t\n\t\t//println(\"loc_newEnd2: \"+loc_newEnd2.x+\" : \"+loc_newEnd2.y);\n\t\t\n\t\treturn bs;\n\n\t}",
"public String getBranchCode() {\n return normalizedBic.substring(BRANCH_CODE_INDEX, BRANCH_CODE_INDEX + BRANCH_CODE_LENGTH);\n }",
"public static String getBranch(@NotNull JSONObject jsonObject) {\n String ref = jsonObject.get(\"ref\").toString();\n return ref.split(\"^(refs/heads/)\")[1];\n }",
"private Branch getBranch(String branchId) {\n \t\tBranch result = null;\n\n \t\tif (branchId != null) {\n \t\t\t// if branch doesn't exist, create it\n \t\t\tif (!branches.containsKey(branchId)) {\n \t\t\t\tresult = new Branch();\n \t\t\t\tresult.setBranchId(branchId);\n \t\t\t\tbranches.put(branchId, result);\n \t\t\t} else {\n \t\t\t\tresult = branches.get(branchId);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}",
"public static String setDefaultBranch(Project project) {\n String defaultBranch = SourcegraphConfig.getInstance(project).getDefaultBranch();\n if (defaultBranch == null || defaultBranch.length() == 0) {\n Properties props = readProps();\n defaultBranch = props.getProperty(\"defaultBranch\", null);\n }\n return defaultBranch;\n }",
"Collection<BuildFilterResource<?>> getBuildFilters(ID branchId);",
"private Iterator<TraceLog> getBranchIterator(File logFile) {\n\t\treturn null;\n\t}",
"public static String gitBranch(String repoDir) throws IOException {\n return exec(\"git rev-parse --abbrev-ref HEAD\", repoDir).trim();\n }",
"private String getBranchForRevision(SVNLogEntry logEntry) {\n @SuppressWarnings(\"unchecked\")\n Set<String> paths = logEntry.getChangedPaths().keySet();\n // Finds the common path among all those paths\n String commonPath = null;\n for (String path : paths) {\n if (commonPath == null) {\n commonPath = path;\n } else {\n int diff = StringUtils.indexOfDifference(commonPath, path);\n commonPath = StringUtils.left(commonPath, diff);\n }\n }\n // Gets the branch for this path\n if (commonPath != null) {\n return extractBranch(commonPath);\n } else {\n // No path in the revision: no branch!\n return null;\n }\n }",
"public server.SayHello.shandong.ScenicBranchPictureBean[] getBranchPictures() {\n return branchPictures;\n }",
"public Branch getBranchById(int id){\n if( id==0 ) {\n return defaultBranch;\n } else {\n BranchDao bDAO = new BranchDao();\n Branch branch = null;\n try {\n branch = bDAO.findById(id);\n } catch (DaoException ex) {\n Logger.getLogger(BranchCtrl.class.getName()).log(Level.SEVERE, null, ex);\n ErrorMsg.setLastError(ErrorMsg.ERROR_SQL_ERROR);\n }\n return branch;\n }\n }",
"public String getBranchLabel() {\r\n\t\treturn branchLabel;\r\n\t}",
"public List<Book> branchBooks(int branchId){\n\t\treturn template.query(\"SELECT * FROM tbl_book JOIN tbl_book_copies ON tbl_book.bookId = tbl_book_copies.bookID\"\n\t\t\t\t+ \" WHERE branchId=? AND noOfCopies >=1\", new Object[] {branchId}, this);\n\t}",
"public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }",
"public String getBranchCd() {\r\n return branchCd;\r\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(example = \"feature/design-new-api\", value = \"The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).\")\n public String getBranch() {\n return branch;\n }",
"public String getConfigChangeSetBranchName() {\n return configChangeSetBranchName;\n }",
"public String f9Branch() throws Exception {\r\n\t\tString query = \" SELECT DISTINCT CENTER_ID,NVL(CENTER_NAME,' ') \"\r\n\t\t\t+ \" FROM HRMS_CENTER \"\r\n\t\t\t+ \" WHERE IS_ACTIVE='Y'\" \r\n\t\t\t+ \" ORDER BY CENTER_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"branch.code\"), getMessage(\"branch\") };\r\n\r\n\t\tString[] headerWidth = { \"30\", \"70\" };\r\n\r\n\t\tString[] fieldNames = { \"branchId\", \"branchName\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1 };\r\n\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\tString submitToMethod = \"\";\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}",
"private void populateSelectedBranches() {\n\t\ttry {\n\t\t\tStationsDTO[] stations = handler.getAllBranches();\n\t\t\tif (null != stations) {\n\t\t\t\tint len = stations.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcbSB.add(stations[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ stations[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"Collection<BuildFilterForm> getBuildFilterForms(ID branchId);",
"public List<Map<String, Object>> selectCounselBranchList(Map<String, Object> commandMap) throws Exception {\n\t\treturn defaultDAO.selectList(\"Support.selectCounselBranchList\", commandMap);\n\t}",
"public List<Commit> getAllCommits(Repository repo) throws Exception {\n List<Commit> commits = new ArrayList<>();\n RevWalk walk = this.createAllRevsWalk(repo, null);\n walk.markStart(walk.parseCommit(repo.resolve(\"HEAD\")));\n for (RevCommit r: walk){\n if(r.getParents().length>0){\n Commit c = getCommit(repo, r, r.getParent(0));\n commits.add(c);\n }else{\n Commit c = new Commit(r);\n commits.add(c);\n }\n\n }\n return commits;\n }",
"public GitCommit[] getCommits()\n {\n List <GitCommit> list = new ArrayList(); for(GitCommit c=getCommit(); c!=null; c = c.getParent()) list.add(c);\n return list.toArray(new GitCommit[list.size()]);\n }",
"@Override\n public Mono<List<GitLogDTO>> getCommitHistory(String defaultApplicationId, MultiValueMap<String, String> params) {\n\n String branchName = params.getFirst(FieldName.BRANCH_NAME);\n\n return applicationService.getApplicationByBranchNameAndDefaultApplication(branchName, defaultApplicationId, READ_APPLICATIONS)\n .flatMap(application -> {\n GitApplicationMetadata gitData = application.getGitApplicationMetadata();\n if (gitData == null || StringUtils.isEmptyOrNull(application.getGitApplicationMetadata().getBranchName())) {\n return Mono.error(new AppsmithException(\n AppsmithError.INVALID_GIT_CONFIGURATION,\n \"branch name is not available. Please reconfigure the application to connect to git repo\"\n ));\n }\n Path baseRepoSuffix = Paths.get(application.getOrganizationId(), gitData.getDefaultApplicationId(), gitData.getRepoName());\n // Checkout to branch\n return Mono.zip(\n gitExecutor.checkoutToBranch(baseRepoSuffix, gitData.getBranchName())\n .onErrorResume(e -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"checkout\", e.getMessage()))),\n Mono.just(baseRepoSuffix)\n );\n })\n .flatMap(tuple -> {\n Path baseRepoSuffix = tuple.getT2();\n return gitExecutor.getCommitHistory(baseRepoSuffix)\n .onErrorResume(e -> Mono.error(new AppsmithException(AppsmithError.GIT_ACTION_FAILED, \"log\", e.getMessage())));\n });\n }"
] | [
"0.75102884",
"0.7207165",
"0.68932974",
"0.6887881",
"0.67929584",
"0.6721241",
"0.6700384",
"0.6697747",
"0.66287833",
"0.64242554",
"0.6385924",
"0.63611716",
"0.6321244",
"0.6317346",
"0.6313405",
"0.6294952",
"0.62002105",
"0.6120489",
"0.61156815",
"0.61051136",
"0.60167706",
"0.6010389",
"0.60046244",
"0.5961739",
"0.5931651",
"0.5898857",
"0.58143544",
"0.580068",
"0.5797504",
"0.579698",
"0.5796192",
"0.5795161",
"0.5789524",
"0.5772382",
"0.5762242",
"0.57598144",
"0.5749243",
"0.5678683",
"0.5664771",
"0.5661205",
"0.5657334",
"0.56543905",
"0.5639322",
"0.5622594",
"0.5621478",
"0.560016",
"0.55945736",
"0.55944246",
"0.55915415",
"0.5518367",
"0.5493663",
"0.5484777",
"0.54789937",
"0.5472595",
"0.54584634",
"0.5406258",
"0.5402051",
"0.53835213",
"0.5374046",
"0.5370853",
"0.53285444",
"0.53136617",
"0.53062075",
"0.52757555",
"0.52729386",
"0.52680695",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52626187",
"0.52392024",
"0.5230126",
"0.5222994",
"0.5219644",
"0.51770526",
"0.5155894",
"0.5110732",
"0.5110614",
"0.5090549",
"0.5085219",
"0.50834376",
"0.5064419",
"0.5057297",
"0.5051596",
"0.5038851",
"0.5030372",
"0.50223595",
"0.50047743",
"0.50004417",
"0.49734846",
"0.4964274",
"0.4929567",
"0.49107146",
"0.49091503",
"0.48886195",
"0.4860309"
] | 0.70525914 | 2 |
Replaces changed files with HEAD revision | void replaceWithHEADRevision(Collection<ChangedFile> changedFiles); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void updateFiles(Gitlet currCommit) {\n HashMap<String, String> currHeadFiles = currCommit.tree.getHeadCommit()\n .getFileLoc();\n currCommit.tree.setMap(currHeadFiles);\n for (String fileName : currHeadFiles.keySet()) {\n FileManip temp = new FileManip(currHeadFiles.get(fileName));\n temp.copyFile(fileName);\n }\n\n }",
"void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }",
"private void updateFiles() {\n\t}",
"List<ChangedFile> resetChangedFiles(Map<Project, List<ChangedFile>> files);",
"public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }",
"@Test\r\n public void testGetChangedFileList() throws IOException {\n helper.exportRevChangedFiles(PJ_ROOT, 1, LOCAL_ROOT);\r\n helper.exportRevChangedFiles(PJ_ROOT, 4, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(PJ_ROOT, -1, LOCAL_ROOT);\r\n //helper.exportRevChangedFiles(9, 9, true);\r\n }",
"public void updateContent(Map<String, ContentChange> files);",
"List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);",
"long recalculateRevision();",
"private void rewriteRepHeader() {\r\n\t\t// assume that the value of headVersionNum has been \r\n\t\t// incremented before coming here\r\n\t\ttry {\r\n\t\t\t// 1. delete current header\r\n\t\t\tif (client==null) this.initAnnoteaClient();\r\n\t\t\tclient.delete(this.repHeaderLoc);\r\n\t\t\t// 2. post new header\r\n\t\t\tDescription header = new Description();\r\n\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\theaderURI[0] = new URI(this.repositoryURI.toString() + \"#header\");\r\n\t\t\theader.setAnnotates(headerURI);\r\n\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t// 3. update new header location URL\r\n\t\t\trepHeaderLoc = client.post(header);\r\n\t\t\t// 4. update value in versionDescriptions array and update swoopModel' versionRepository\r\n\t\t\tthis.versionDescriptions[0] = header;\r\n\t\t\tswoopModel.updateVersionRepository(this.repositoryURI, versionDescriptions);\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"void update(FileInfo fileInfo);",
"void findHistory(File f,IvyXmlWriter xw)\n{\n StringCommand cmd = new StringCommand(cvs_command + \" log \" + getRelativePath(f));\n String rslt = cmd.getContent();\n\n StringTokenizer tok = new StringTokenizer(rslt,\"\\n\");\n String rev = null;\n Date d = null;\n String auth = null;\n String msg = null;\n BvcrFileVersion prior = null;\n Collection<BvcrFileVersion> fvs = new ArrayList<BvcrFileVersion>();\n String headversion = null;\n\n while (tok.hasMoreTokens()) {\n String ln = tok.nextToken();\n if (rev == null) {\n\t if (ln.startsWith(\"revision \")) rev = ln.substring(9).trim();\n\t else if (ln.startsWith(\"head: \")) {\n\t headversion = ln.substring(6);\n\t }\n }\n else {\n\t if (ln.startsWith(\"date: \")) {\n\t StringTokenizer ltok = new StringTokenizer(ln,\";\");\n\t while (ltok.hasMoreTokens()) {\n\t String itm = ltok.nextToken();\n\t int idx = itm.indexOf(\":\");\n\t if (idx >= 0) {\n\t\t String what = itm.substring(0,idx).trim();\n\t\t String cnts = itm.substring(idx+1).trim();\n\t\t if (what.equals(\"date\")) {\n\t\t try {\n\t\t\td = CVS_DATE.parse(cnts);\n\t\t }\n\t\t catch (ParseException e) { }\n\t\t }\n\t\t else if (what.equals(\"author\")) auth = cnts;\n\t\t}\n\t }\n\t }\n\t else if (ln.startsWith(\"----------------------------\") ||\n\t\t ln.startsWith(\"===================================================\")) {\n\t if (auth != null && d != null) {\n\t BvcrFileVersion fv = new BvcrFileVersion(f,rev,d,auth,msg);\n\t if (headversion != null && headversion.equals(rev)) {\n\t\t fv.addAlternativeName(\"HEAD\");\n\t\t}\n\t if (prior != null) prior.addPriorVersion(fv);\n\t prior = fv;\n\t fvs.add(fv);\n\t }\n\t rev = null;\n\t d = null;\n\t msg = null;\n\t auth = null;\n\t }\n\t else if (msg == null) msg = ln;\n\t else msg = msg + \"\\n\" + ln;\n }\n }\n\n xw.begin(\"HISTORY\");\n xw.field(\"FILE\",f.getPath());\n for (BvcrFileVersion fv : fvs) {\n fv.outputXml(xw);\n }\n xw.end(\"HISTORY\");\n}",
"private boolean updateRepChanges(boolean sync) {\r\n\t\t\r\n\t\ttry {\t\t\t\t\r\n\t\t\t// get repository header since we need count of versions \r\n\t\t\t// i.e. headVersionNum\r\n\t\t\tString status = \"Status: [ACTION - Update Repository]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status+\"Loading repository header to find headVersionNumber\");\r\n\t\t\tboolean existsRep = this.loadRepositoryHeader();\r\n\t\t\tif (!existsRep) {\r\n\t\t\t\tif (DEBUG) System.out.println(\"NOT FOUND\");\r\n\t\t\t\t// update from local Swoop log anyway if uri matches ontURI\r\n\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"HeadVersionNum=\"+this.headVersionNumber);\r\n\t\t\r\n\t\t\t// note: all version commits have been made to URLs:\r\n\t\t\t// repositoryURL+\"#1\"...\"#headVersionNum\"\r\n\t\t\t// so iterate through versionCommits and see if value is null, implying it hasn't been updated\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tif (versionNodes[ctr]==null) {\r\n\t\t\t\t\t// form URI using ctr\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI+\"#\"+ctr);\r\n\t\t\t\t\tstatusBar.setText(status+\"Updating version at \"+versionURI);\r\n\t\t\t\t\tSet commitSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\t// get single Description (version) at URI\r\n\t\t\t\t\tDescription version = (Description) commitSet.iterator().next();\r\n\t\t\t\t\tversionDescriptions[ctr] = version;\r\n\t\t\t\t\tTreeTableNode mainNode = this.parseSingleCommit(version);\r\n\t\t\t\t\t// set params on mainNode\r\n\t\t\t\t\tmainNode.swoopChange.isOnRepository = true;\r\n\t\t\t\t\tmainNode.location = version.getLocation();\r\n\t\t\t\t\tversionNodes[ctr] = mainNode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// also if advanced is off, update from local copy as well\r\n//\t\t\tif (!advanced) {\r\n//\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\t// resort all nodes under root\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t\t\r\n\t\t\t// update version repository cache\r\n\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\r\n\t\t\t// if sync is true, commit all changes to the synchronized ontology\r\n\t\t\tif (sync) {\r\n\t\t\t\tstatusBar.setText(status+\"Synching with Local Swoop Ontology\");\r\n\t\t\t\tthis.commitOntChanges(true);\t\t\t\t\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void setNewStatusIfNeeded() {\n \t\tfor(FileDiffDirectory dir : directories ) {\n \t\t\tif (dir.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(FileDiffFile file : files ) {\n \t\t\tif (file.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}",
"public void testChanges(String filePath) {\n Object[] fileObjectArray = fetchTextFile(filePath);\n String newFile = prepareText(fileObjectArray);\n System.out.println(newFile);\n }",
"public void rebase(String branch) throws IOException {\n\t\t// failure cases\n\t\tif (!myBranch.containsKey(branch)) {\n\t\t\tSystem.out.println(\"A branch with that name does not exist.\");\n\t\t\treturn;\n\t\t}\n\t\tif (myBranch.get(branch).getID() == myHead.getID()) {\n\t\t\tSystem.out.println(\"Cannot rebase a branch onto itself.\");\n\t\t\treturn;\n\t\t}\n\t\tVersion splitPoint = splitHelper(myHead, myBranch.get(branch));\n\n\t\tif (splitPoint.getID() == myBranch.get(branch).getID()) {\n\t\t\tSystem.out.println(\"Already up-to-date.\");\n\t\t\treturn;\n\t\t} else if (splitPoint.getID() == myHead.getID()) {\n\t\t\t// move the pointer of the given branch to myHead b/c given branch\n\t\t\t// is in myHead's history\n\t\t\tmyBranch.put(myHead.branchName(), myBranch.get(branch));\n\t\t\tmyHead = myBranch.get(branch);\n\t\t\tfor (String f : myHead.file().keySet()) {\n\t\t\t\tFile before = new File(myHead.file().get(f));\n\t\t\t\tcheckoutHelper(f);\n\t\t\t\tFile after = new File(f);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t} else {\n\t\t\t// copy all the versions in current branch and attach them to given\n\t\t\t// branch, move myHead to the new myHead version\n\t\t\tVersion count = myHead;\n\t\t\tint Counter = 0;\n\t\t\tHashMap<String, String> propagate = new HashMap<String, String>();\n\t\t\t// get the propagated tracked files\n\t\t\tfor (String s : myBranch.get(branch).file().keySet()) {\n\t\t\t\tif (splitPoint.file().get(s) != myBranch.get(branch).file()\n\t\t\t\t\t\t.get(s)) {\n\t\t\t\t\tpropagate.put(s, myBranch.get(branch).file().get(s));\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile (splitPoint.getID() != count.getID()) {\n\t\t\t\tCounter++;\n\t\t\t\tcount = count.getParent();\n\t\t\t}// count the number of nodes to copy\n\t\t\tint finalID = ID + Counter - 1;\n\t\t\t// assigning ID in reverse order\n\t\t\tVersion curr = myHead;\n\t\t\tint i = 0;\n\t\t\tVersion result = new Version(finalID - i, curr.message(), null,\n\t\t\t\t\tcurr.isBranchHead(), curr.branchName());\n\t\t\tmyHead = result;// set myHead to the front of the rebased branch\n\t\t\tmyBranch.put(currentBranch, result);\n\t\t\trebaseCopyHelper(finalID - i, curr, result, propagate, splitPoint);\n\t\t\t// start to copy node\n\t\t\tfor (String f : result.file().keySet()) {\n\t\t\t\tFile before = new File(result.file().get(f));\n\t\t\t\tcheckoutHelper(f);\n\t\t\t\tFile after = new File(f);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\twhile (curr.getParent().getID() != splitPoint.getID()) {\n\t\t\t\ti++;\n\t\t\t\tcurr = curr.getParent();// iterate to the new version to be\n\t\t\t\t\t\t\t\t\t\t// copied\n\t\t\t\tVersion temp = new Version(finalID - i, curr.message(), null,\n\t\t\t\t\t\tcurr.isBranchHead(), curr.branchName());// initiate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// version(did\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not create\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// folder in the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// folder\n\t\t\t\trebaseCopyHelper(finalID - i, curr, temp, propagate, splitPoint);\n\t\t\t\tresult.setParent(temp);// make the newly created version the\n\t\t\t\t\t\t\t\t\t\t// parent of the old result\n\t\t\t\tresult = temp;// update the result to the new version\n\n\t\t\t}\n\t\t\tresult.setParent(myBranch.get(branch));\n\t\t\tID = finalID;// update ID in Gitlet\n\t\t}\n\n\t\tSerialization();\n\t}",
"private void generateConflict(String fileName,\n String headContent, String givenContent) {\n File theFile = new File(Main.CWD, fileName);\n if (givenContent == null) {\n givenContent = \"\";\n }\n if (headContent == null) {\n headContent = \"\";\n }\n String mes = \"<<<<<<< HEAD\\n\" + headContent\n + \"=======\\n\" + givenContent + \">>>>>>>\\n\";\n Utils.writeContents(theFile, mes);\n }",
"public void resolveRevisionStates() {\r\n\t\tboolean first = true;\r\n\t\tfor (Iterator i = getRevisions().iterator(); i.hasNext();) {\r\n\t\t\tPvcsRevision revision = (PvcsRevision) i.next();\r\n\t\t\tif (first) {\r\n\t\t\t\trevision.setState(PvcsRevisionState.ADD);\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\trevision.setState(PvcsRevisionState.CHANGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\r\n\tpublic void test_LastModified_HeadOK() throws IOException {\n\t\tDate now = new Date();\r\n\t\tFile file = fileUtil.getFileFromPath(\"/index.html\");\r\n\t\tfile.setLastModified(now.getTime());\r\n\t\t\r\n\t\tRawHttpResponse<?> response = executeRequest(\"HEAD\", \"/index.html\");\r\n\t\t// check the response code\r\n\t\tassertEquals(200, response.getStatusCode());\r\n\t\t// check content type\r\n\t\tOptional<String> lastModified = response.getHeaders().getFirst(\"Last-Modified\");\r\n\t\tassertTrue(lastModified.isPresent());\r\n\t\tassertEquals(now.toString(), lastModified.get());\r\n\t}",
"public static void sortFiles(List<File> files)\r\n\t{\r\n\t\t/*\r\n\t\t * bubblesort algorithm\r\n\t\t */\r\n\t\tboolean changesMade = true;\r\n\t\t\r\n\t\twhile (changesMade)\r\n\t\t{\r\n\t\t\tchangesMade = false;\r\n\t\t\t\r\n\t\t\tfor(int x=1; x<files.size(); x++)\r\n\t\t\t{\r\n\t\t\t\t/*\r\n\t\t\t\t * if file at index x has a lower number than the file\r\n\t\t\t\t * at index x-1\r\n\t\t\t\t */\r\n\t\t\t\tif(getFileNum(files.get(x)) < getFileNum(files.get(x-1)))\r\n\t\t\t\t{\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * put this file in the previous index\r\n\t\t\t\t\t */\r\n\t\t\t\t\tFile tempFile = files.get(x);\r\n\t\t\t\t\tfiles.remove(x);\r\n\t\t\t\t\tfiles.add(x-1, tempFile);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//indicate changes were made\r\n\t\t\t\t\tchangesMade = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}",
"void handleChanged(Collection<AGStoredFile> existingFiles, Collection<AGStoredFile> changedFiles);",
"private void setInitialSourceFile()\n\t{\n\t\tint largestAuthoredId = -1;\n\t\tSourceFile[] files = m_fileInfo.getFileList();\n\t\tfor (int i=0; i<files.length; ++i)\n\t\t{\n\t\t\tSourceFile sf = files[i];\n\t\t\tif (sf.getId() > largestAuthoredId && getFileType(sf) == AUTHORED_FILE)\n\t\t\t\tlargestAuthoredId = sf.getId();\n\t\t}\n\t\tif (largestAuthoredId != -1)\n\t\t\tsetListingPosition(largestAuthoredId, 1);\n\t}",
"@Test\n public void testApplyToOldFile() throws IOException, PatchFailedException {\n Path oldFile = scratch.file(\"/root/oldfile\", \"line one\");\n Path newFile = scratch.file(\"/root/newfile\", \"line one\");\n Path patchFile =\n scratch.file(\n \"/root/patchfile\",\n \"--- oldfile\",\n \"+++ newfile\",\n \"@@ -1,1 +1,2 @@\",\n \" line one\",\n \"+line two\");\n PatchUtil.apply(patchFile, 0, root);\n ImmutableList<String> newContent = ImmutableList.of(\"line one\", \"line two\");\n assertThat(FileSystemUtils.readLines(oldFile, UTF_8)).isEqualTo(newContent);\n // new file should not change\n assertThat(FileSystemUtils.readLines(newFile, UTF_8)).containsExactly(\"line one\");\n }",
"@Override\n public void fileStatusesChanged() {\n assertDispatchThread();\n LOG.debug(\"FileEditorManagerImpl.MyFileStatusListener.fileStatusesChanged()\");\n final VirtualFile[] openFiles = getOpenFiles();\n for (int i = openFiles.length - 1; i >= 0; i--) {\n final VirtualFile file = openFiles[i];\n LOG.assertTrue(file != null);\n ApplicationManager.getApplication().invokeLater(() -> {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"updating file status in tab for \" + file.getPath());\n }\n updateFileStatus(file);\n }, IdeaModalityState.NON_MODAL, myProject.getDisposed());\n }\n }",
"@Override\n public void onMasterBranchVersionChange(String newVersion, String oldVersion, JGitFlowInfo flow) throws MavenJGitFlowExtensionException\n {\n try\n {\n Git git = flow.git();\n\n //get the README.md file\n File readmeFile = new File(flow.getProjectRoot(), README_MD);\n\n //do the replacement\n //NOTE: This is not performant or scalable. It's only here for example purposes.\n String readmeContent = Files.toString(readmeFile, Charsets.UTF_8);\n String newContent = readmeContent.replace(oldVersion, newVersion);\n\n Files.write(newContent, readmeFile, Charsets.UTF_8);\n\n //now commit the change\n JGitFlowCommitHelper.commitAllChanges(flow, \"updating version in README.md\");\n\n }\n catch (Exception e)\n {\n throw new MavenJGitFlowExtensionException(\"Error updating \" + README_MD + \" file!\", e);\n }\n }",
"Response head(String repoName, String repoPath, UriInfo baseURI);",
"public void helperCommit(Commit newCommit) throws IOException {\n newCommit.setFiles(INDEX, REMOVAL);\n newCommit.changeStatus(true);\n addCommit(newCommit);\n Utils.writeObject(curHeadBranch(), newCommit.getShaCode());\n Utils.writeObject(HEADFILE, newCommit.getShaCode());\n clearStages();\n }",
"private List<String> newChangNotStaged(HashMap<String, Blob> allFiles) {\n ArrayList<String> result = new ArrayList<>();\n for (String fileName: Utils.plainFilenamesIn(Main.CWD)) {\n Blob ourBlob = allFiles.get(fileName);\n File fileInCWD = new File(Main.CWD, fileName);\n String content = Utils.readContentsAsString(fileInCWD);\n if (ourBlob != null) {\n if (!ourBlob.getContent().equals(content)\n && !isStaged(fileName)) {\n String elem = fileName + \" (modified)\";\n result.add(elem);\n }\n allFiles.remove(fileName);\n }\n }\n return result;\n }",
"void updateFile() throws IOException;",
"public void reload() {\n\t\tif (file.lastModified() <= fileModified)\n\t\t\treturn;\n\t\n\t\treadFile();\n\t}",
"public void merge(String branch) throws IOException {\n\t\tVersion splitPoint = splitHelper(myHead, myBranch.get(branch));\n\n\t\tfor (String s : myBranch.get(branch).file().keySet()) {\n\t\t\tString curr = myHead.file().get(s);\n\t\t\tString splitFile = splitPoint.file().get(s);\n\t\t\tString branchFile = myBranch.get(branch).file().get(s);\n\t\t\tif (!branchFile.equals(splitFile)) {\n\t\t\t\tif (curr == null) {\n\t\t\t\t\t// whether or not splitFile==null. we do the same thing:\n\t\t\t\t\t// copy the file in the branch to the working directory and\n\t\t\t\t\t// stage it!\n\t\t\t\t\tcheckout(myBranch.get(branch).getID(), s);\n\t\t\t\t\tadd(s);\n\t\t\t\t} else {\n\t\t\t\t\tif (curr.equals(splitFile)) {\n\t\t\t\t\t\t// current branch: unmodified,\n\t\t\t\t\t\tcheckout(myBranch.get(branch).getID(), s);\n\t\t\t\t\t\tadd(s);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// current:modified, branch: modified\n\t\t\t\t\t\tFile before = new File(myBranch.get(branch).file()\n\t\t\t\t\t\t\t\t.get(s));\n\t\t\t\t\t\tFile after = new File(\"./\" + s + \".conflicted\");\n\t\t\t\t\t\tconflictState = true;\n\t\t\t\t\t\tcopyFile(before.getCanonicalPath(),\n\t\t\t\t\t\t\t\tafter.getCanonicalPath());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// else branch is unmodified, do not do anything\n\t\t}\n\t\tif (!conflictState) {\n\t\t\t// if there is no conflicting files\n\t\t\tcommit(\"Merged [\" + myHead.branchName() + \"] with [\" + branch\n\t\t\t\t\t+ \"].\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Encountered a merge conflict.\");\n\t\t}\n\t\tSerialization();\n\t}",
"private static void rebase(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (!rebaseCheck(currCommit, args)) {\n return;\n } else if (sameHist(currCommit, args[1])) {\n Commit toChange = currCommit.tree.getHeadCommit(args[1]);\n currCommit.tree.setHeadCommit(toChange);\n currCommit.tree.setCommit(Integer.parseInt(toChange.getId()));\n } else {\n Commit split = findSplitBranch(currCommit, args);\n HashMap<String, String> splitMap = split.getFileLoc();\n TreeSet<Commit> tempCurr = currCommit.tree.getCommits();\n TreeSet<Commit> tempBranch = currCommit.tree.getCommits(args[1]);\n TreeSet<Commit> currCommits = (TreeSet<Commit>) tempCurr.subSet(\n currCommit.tree.getHeadCommit(), true, split, true);\n TreeSet<Commit> branchCommits = (TreeSet<Commit>) tempBranch\n .subSet(currCommit.tree.getHeadCommit(args[1]), true,\n split, true);\n for (Commit x : currCommits) {\n currCommit.tree.removeCommit(x);\n currCommit.tree.addSize();\n String newId = currCommit.tree.getSize().toString();\n Commit commitToAdd = x.commitCopy(x, newId);\n\n HashMap<String, String> newMap = propogate(x.getFileLoc(),\n currCommit.tree.getHeadCommit(args[1]).getFileLoc(),\n splitMap);\n commitToAdd.setFileLoc(newMap);\n\n currCommit.tree.addData(commitToAdd);\n if (currCommit.tree.getHeadCommit().same(x)) {\n currCommit.tree.setHeadCommit(commitToAdd);\n }\n }\n for (Commit x : branchCommits) {\n currCommit.tree.addCommit(x);\n }\n updateFiles(currCommit);\n }\n addSerializeFile(currCommit);\n }",
"public synchronized void refresh()\n {\n // Update the last modified time\n // This returns zero (i.e. Jan 1 1970) if the file does not exist\n this.lastModifiedTime = this.file.lastModified() / 1000;\n }",
"private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}",
"public void mergeConflictedFiles(final Map<String, NewData> conflictedFiles)\n \t{\n \t\tList<String> working = new LinkedList<String>();\n \t\tList<String> conflicted = new LinkedList<String>();\n \t\tString s=\"\";\n \t\tPatch diff = new Patch();\n \t\t\n \t\tfor(String str:conflictedFiles.keySet()){\n \t\t\n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(conflictedFiles.get(str).getFileContent()));\n \t\t\ttry {\n \t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\tconflicted.add(s);\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\t\n \t\tFile f = new File(this.getRoot() + File.separatorChar +str);\n \t\tif(!f.exists()){\n \t\t\tthis.pCreateFile(this.getRoot() + File.separatorChar +str);\t\n \t\t\tworking=conflicted;\n \t\t}\n \t\telse{\n \t\tworking = this.readFile(this.getRoot()+ File.separatorChar +str);\n \t\t\n \t\tdiff=this.getSnapshot().getDiff(working, conflicted);\n \t\t\n \t\tfor(Delta delta:diff.getDeltas()){\t\n \t\t\n\t\t\tfor(int i=delta.getRevised().getPosition(), j=0;j<delta.getRevised().getLines().size();++i,++j)\n\t\t\t\tworking.set(i, working.get(i)+\" <<<O==merge==R>>> \"+delta.getRevised().getLines().get(j));\n \t\t\t}\n \t\t}\n \t\tthis.getFilelist().get(str).putAll(conflictedFiles.get(str).getLclock());\n \t\t\n \t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, working);\n \t\t\n \t\tworking.clear();\n \t\tconflicted.clear();\n \t\t}\n \t}",
"public GitRef getHead() { return getRef(Constants.HEAD); }",
"@Test\n public void fileAddedViaChangeListShouldBeAddedToHg() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n myChangeListManager.ensureUpToDate();\n myChangeListManager.addUnversionedFilesToVcs(vf);\n verifyStatus(added(AFILE));\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"private DraftRevision putCodebase(Codebase c) {\n c.checkProjectSpace(config.getProjectSpace());\n\n // Filter out files that either start with .svn or have .svn after a slash, plus the repo\n // config's ignore_file_res.\n List<String> ignoreFilePatterns =\n ImmutableList.<String>builder()\n .addAll(config.getIgnoreFilePatterns())\n .add(\"(^|.*/)\\\\.svn(/.*|$)\")\n .build();\n\n Set<String> codebaseFiles =\n Utils.makeFilenamesRelative(filesystem.findFiles(c.root()), c.root());\n Set<String> writerFiles =\n Utils.filterByRegEx(\n Utils.makeFilenamesRelative(filesystem.findFiles(rootDirectory), rootDirectory),\n ignoreFilePatterns);\n Set<String> union = Sets.union(codebaseFiles, writerFiles);\n\n for (String filename : union) {\n putFile(filename, c);\n }\n\n return new SvnDraftRevision(rootDirectory);\n }",
"private void processModify(int fileId, int commitId) throws SQLException,\n \t\t\tIOException {\n \t\tint previousCommitId = commitGraph.findPreviousCommitId(fileId,\n \t\t\t\tcommitId);\n \t\tString newContent = FileUtils.getContent(fileId, commitId);\n \t\tString oldContent = getPreviousContent(fileId, previousCommitId);\n \t\tList<SourceCodeChange> changes = extractDiff(new FileRevision(\n \t\t\t\tpreviousCommitId, fileId, oldContent), new FileRevision(\n \t\t\t\tcommitId, fileId, newContent));\n \t\tif (changes == null || changes.size() == 0) {\n \t\t\tlogger.warning(\"No changes distilled for file \" + fileId\n \t\t\t\t\t+ \" at commit_id \" + commitId + \" from previous commit id \"\n \t\t\t\t\t+ previousCommitId);\n \t\t} else {\n \t\t\tthis.reducer.add(changes, fileId, commitId);\n \t\t}\n \t\tif (changes != null) { // can't check newcontent alone, as it can have\n \t\t\t\t\t\t\t\t// invalid syntax\n \t\t\tassert (newContent != null);\n \t\t\tfileContentCache.put(fileId, new FileRevision(commitId, fileId,\n \t\t\t\t\tnewContent));\n \t\t}\n \t}",
"@Override\n public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {\n PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> {\n updateHistoryEntry(event.getOldFile(), event.getOldEditor(), event.getOldProvider(), false);\n updateHistoryEntry(event.getNewFile(), true);\n });\n }",
"@Override\n\tprotected HashSet<String> getAllChangedFileName(){\n\t\treturn null;\n\t}",
"@Test\n public void local_state_restored_if_push_fails() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n byte[] bytes = \"test-content\".getBytes();\n patchBuilder.createFile(\"file-to-commit\", new ByteArrayInputStream(bytes));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Commit description\"));\n patchBuilder.dispose();\n\n GitSupportBuilder builder = gitSupport().withServerPaths(myPaths);\n builder.build();\n final ServerPluginConfig config = builder.getPluginConfig();\n final RepositoryManager repositoryManager = builder.getRepositoryManager();\n myCommitSupport = new GitCommitSupport(myGit, builder.getCommitLoader(), repositoryManager, new GitRepoOperationsImpl(config,\n builder.getTransportFactory(),\n r -> null,\n (a,b,c) -> {}) {\n @NotNull\n @Override\n public PushCommand pushCommand(@NotNull String repoUrl) {\n return new NativeGitCommands(config, GitCommitSupportTest::detectGitStub, r -> null, null) {\n @Override\n protected <R> R executeCommand(@NotNull Context ctx, @NotNull String action, @NotNull String debugInfo, @NotNull FuncThrow<R, VcsException> cmd, @NotNull GitFacade gitFacade) throws VcsException {\n throw new VcsException(\"Always fails\");\n }\n };\n }\n });\n\n final File mirror = repositoryManager.getMirrorDir(getRemoteRepositoryDir(\"merge\").getAbsolutePath());\n final String before = showRef(mirror, \"refs/heads/master\");\n final RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n bytes = \"new-test-content\".getBytes();\n patchBuilder.createFile(\"new-file-to-commit\", new ByteArrayInputStream(bytes));\n try {\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"New commit description\"));\n } catch (VcsException e) {\n //expected\n }\n patchBuilder.dispose();\n\n assertEquals(state1, myGit.getCurrentState(myRoot));\n assertEquals(before, showRef(mirror, \"refs/heads/master\"));\n }",
"public void reset(int commitId) throws IOException {\n\t\tif (!myCommit.containsKey(commitId)) {\n\t\t\tSystem.out.println(\"No commit with that id exists.\");\n\t\t} else {\n\t\t\tfor (String fileName : myCommit.get(commitId).file().keySet()) {\n\t\t\t\tFile before = new File(myCommit.get(commitId).file()\n\t\t\t\t\t\t.get(fileName));\n\t\t\t\tFile after = new File(\"./\" + fileName);\n\t\t\t\tcopyFile(before.getCanonicalPath(), after.getCanonicalPath());\n\t\t\t}\n\t\t\tmyHead = myCommit.get(commitId);\n\t\t\tmyBranch.put(currentBranch, myHead);\n\t\t\ttracked = myHead.file();\n\t\t\tstagedFiles = new ArrayList<String>();\n\t\t\tSerialization();\n\t\t}\n\t}",
"private void processFile(final FilePath filePath, final ChangelistBuilder builder)\r\n {\r\n String path = filePath.getPath();\r\n\r\n // Files that match with the ignored patterns are processed separately.\r\n if( host.isFileIgnored( filePath.getVirtualFile() ) )\r\n {\r\n filesIgnored.add( path );\r\n return;\r\n }\r\n\r\n com.starbase.starteam.File file = host.findFile( getSTCanonicPath( filePath ) );\r\n\r\n try\r\n {\r\n if( file == null )\r\n {\r\n if( !isFileUnderRenamedDir( path ) && isProperNotification( filePath ) )\r\n {\r\n filesNew.add( path );\r\n }\r\n }\r\n else\r\n {\r\n // In certain cases we still get status \"UNKNOWN\" (int 6) after the\r\n // particular amount of time (even after full resync). Try to refresh.\r\n try { file.updateStatus(false, true); }\r\n catch( Exception e )\r\n {\r\n // Nothing to do - if <updateStatus> throws an exception then most\r\n // probably we deal with latest version\r\n }\r\n\r\n int status = file.getStatus();\r\n if( status == Status.NEW )\r\n filesNew.add( path );\r\n else\r\n if( status == Status.MERGE )\r\n builder.processChange( new Change( new STContentRevision(host, filePath ), new CurrentContentRevision( filePath ), FileStatus.MERGE ),\r\n StarteamVcs.getKey());\r\n else\r\n if( status == Status.MODIFIED )\r\n filesChanged.add( path );\r\n else\r\n if( status == Status.MISSING )\r\n {\r\n // We have two source of information on locally deleted files:\r\n // - one is stored in StarteamVcs host as a list controllable by VFS listener\r\n // - here, on folder traverse.\r\n // So do not duplicate files in the dirty lists.\r\n\r\n String normPath = filePath.getPath().replace( File.separatorChar, '/');\r\n if( !host.removedFiles.contains( normPath ))\r\n builder.processLocallyDeletedFile( filePath );\r\n }\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n // By default if any exception happens, we consider file status to be\r\n // \"unknown\" and do not indicate any change.\r\n }\r\n }",
"@Override\n public int compare(File arg0, File arg1) {\n long diff = arg0.lastModified() - arg1.lastModified();\n if (diff > 0)\n return -1;\n else if (diff == 0)\n return 0;\n else\n return 1;\n }",
"public void testModifyFile() throws Exception {\n System.out.print(\".. Testing file modification ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current] (\" + userName + \")\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\"));\n writer.write(\"/** This is testing A_File.java file.\\n */\\n public class Testing_File {\\n int i;\\n }\\n\");\n writer.flush();\n writer.close();\n new OpenAction().perform(A_FileNode);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(A_FileNode);\n Thread.sleep(5000);\n A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n System.out.println(\". done !\");\n }",
"long getCurrentRevision();",
"public void reset(String commitID) throws IOException {\n File f = new File(Main.ALL_COMMITS, commitID);\n if (!f.exists()) {\n System.out.println(\"No commit with that id exists.\");\n System.exit(0);\n }\n Commit referencedCommit = getCommitFromID(commitID);\n checkUntracked(referencedCommit);\n Set<String> fls = referencedCommit.getFile().keySet();\n for (String file: getHeadCommit().getFile().keySet()) {\n if (referencedCommit.getFile().get(file) == null) {\n File theFile = new File(Main.CWD, file);\n if (theFile.exists()) {\n theFile.delete();\n }\n }\n }\n for (String elem: fls) {\n commitIDCheckout(commitID, elem);\n }\n String curBID = getHeadCommitID();\n String currBranchName = \"\";\n for (String branchName: Utils.plainFilenamesIn(Main.ALL_BRANCHES)) {\n File branchFile = new File(Main.ALL_BRANCHES, branchName);\n if (Utils.readObject(branchFile, String.class).equals(curBID)) {\n currBranchName = branchName;\n break;\n }\n }\n File branchFile = new File(Main.ALL_BRANCHES, currBranchName);\n Utils.writeObject(branchFile, commitID);\n Utils.writeObject(HEADFILE, commitID);\n Utils.writeObject(HEADNAME, currBranchName);\n clearStages();\n }",
"private void syncSources(String name) {\n TemplateSourceInfo info = (TemplateSourceInfo)mTemplateMap.get(name);\n Unit compUnit = (Unit)this.getCompilationUnit(name,null);\n File destFile = compUnit.getDestinationFile();\n if (destFile != null) {\n destFile.setLastModified(info.timestamp);\n }\n }",
"public void replaceFirstLine(String filename, String ar[]) {\n\t String oldFileName = filename;\n\t String tmpFileName = \"tmp_auto.txt\";\n\n\t BufferedReader br = null;\n\t BufferedWriter bw = null;\n\t try {\n\t br = new BufferedReader(new FileReader(oldFileName));\n\t bw = new BufferedWriter(new FileWriter(tmpFileName));\n\t String line;\n\t //read first line\n\t line = br.readLine(); //read and do nothing\n\t bw.write(ar[0]+\",\"+ar[1]+\",\"+ar[2]+\",\"+ar[3]+\",\"+ar[4]+\"\\n\");\n\t //read and write rest of file\n\t while ((line = br.readLine()) != null) {\n\t bw.write(line+\"\\n\");\n\t }\n\t } catch (Exception e) {\n\t return;\n\t } finally {\n\t try {\n\t if(br != null)\n\t br.close();\n\t } catch (IOException e) {\n\t //\n\t }\n\t try {\n\t if(bw != null)\n\t bw.close();\n\t } catch (IOException e) {\n\t //\n\t }\n\t }\n\t // Once everything is complete, delete old file..\n\t File oldFile = new File(oldFileName);\n\t oldFile.delete();\n\n\t // And rename tmp file's name to old file name\n\t File newFile = new File(tmpFileName);\n\t newFile.renameTo(oldFile);\n\t }",
"@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }",
"public void patch (File appdir, File patch, ProgressObserver obs)\n throws IOException\n {\n // save this information for later\n _obs = obs;\n _plength = patch.length();\n\n try (ZipFile file = new ZipFile(patch)) {\n Enumeration<? extends ZipEntry> entries = file.entries();\n while (entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n String path = entry.getName();\n long elength = entry.getCompressedSize();\n\n // depending on the suffix, we do The Right Thing (tm)\n if (path.endsWith(CREATE)) {\n path = strip(path, CREATE);\n log.info(\"Creating \" + path + \"...\");\n createFile(file, entry, new File(appdir, path));\n\n } else if (path.endsWith(PATCH)) {\n path = strip(path, PATCH);\n log.info(\"Patching \" + path + \"...\");\n patchFile(file, entry, appdir, path);\n\n } else if (path.endsWith(DELETE)) {\n path = strip(path, DELETE);\n log.info(\"Removing \" + path + \"...\");\n File target = new File(appdir, path);\n if (!FileUtil.deleteHarder(target)) {\n log.warning(\"Failure deleting '\" + target + \"'.\");\n }\n\n } else {\n log.warning(\"Skipping bogus patch file entry: \" + path);\n }\n\n // note that we've completed this entry\n _complete += elength;\n }\n }\n }",
"long currentRevision();",
"@Test\n public void testDeleteAllContentButNotFile() throws IOException, PatchFailedException {\n Path oldFile = scratch.file(\"/root/oldfile\", \"I'm an old file\", \"bye, world\");\n Path patchFile =\n scratch.file(\n \"/root/patchfile\",\n \"--- a/oldfile\",\n \"+++ b/oldfile\",\n \"@@ -1,2 +0,0 @@\",\n \"-I'm an old file\",\n \"-bye, world\");\n PatchUtil.apply(patchFile, 1, root);\n assertThat(oldFile.exists()).isTrue();\n assertThat(FileSystemUtils.readLines(oldFile, UTF_8)).isEmpty();\n }",
"private static void reset(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (args.length != 2) {\n System.out.println(\"Please input a commit ID\");\n\n } else if (!currCommit.tree.containsId(args[1])) {\n System.out.println(\"No commit with that id exists.\");\n\n } else {\n Commit commit = currCommit.tree.getCommitFromId(args[1]);\n HashMap<String, String> fileToLoc = commit.getUpdatedFileToLoc();\n for (String x : fileToLoc.keySet()) {\n FileManip origin = new FileManip(fileToLoc.get(x));\n origin.copyFile(x);\n }\n currCommit.tree.setCommit(Integer.parseInt(args[1]));\n currCommit.tree.setHeadCommit(commit);\n currCommit.tree.alterCommitSet(commit);\n addSerializeFile(currCommit);\n }\n }",
"public void reset(String commID) {\n Comm comm = null;\n if (hasuntracked(head)) {\n Utils.message(\"There is an untracked file in the way;\"\n + \" delete it or add it first.\");\n throw new GitletException();\n }\n if (allcomms.containsKey(commID)) {\n comm = allcomms.get(commID);\n } else {\n for (String s : allcomms.keySet()) {\n if (s.substring(0, 8).equals(commID)) {\n comm = allcomms.get(s);\n break;\n }\n }\n\n }\n if (comm == null) {\n Utils.message(\"No commit with that id exists.\");\n } else {\n head = comm;\n for (Blob b: head.getContents().values()) {\n File f = new File(b.getName());\n Utils.writeContents(f,\n head.getContents().get(b.getName()).getContent());\n stagingarea.clear();\n }\n deleteuntracked(head);\n branches.put(branch, head);\n\n }\n }",
"private void saveChange(final CVSChangeLogSet.File file, final CVSChangeLog change, final Map<String, String> branches,\n final List<CVSChangeLog> changes, final Map<String, CvsFile> files, final CvsRepositoryLocation location,\n final EnvVars envVars) {\n\n final String branch = getBranchNameForRevision(file.getRevision(), branches);\n\n // check we're on head if the branch name is null\n if (branch == null && !(location instanceof CvsRepositoryLocation.HeadRepositoryLocation)) {\n return;\n }\n\n if (branch != null && location instanceof CvsRepositoryLocation.HeadRepositoryLocation) {\n return;\n }\n\n // Check the branch/tag name matches the retrieved branch name\n if (!(location instanceof CvsRepositoryLocation.HeadRepositoryLocation)\n && !envVars.expand(location.getLocationName()).equals(branch)) {\n return;\n }\n\n CVSChangeLog currentChange = change;\n boolean addChange = true;\n\n // check the change isn't the same as any other change\n for (final CVSChangeLog existingChange : changes) {\n if (change.canBeMergedWith(existingChange)) {\n // equivalent to merging the new and existing change\n currentChange = existingChange;\n addChange = false;\n break;\n }\n }\n\n // we only want the first listing of this file since changes are\n // sorted in reverse order of when they were made\n if (!files.containsKey(file.getFullName())) {\n final CvsFile cvsFile = CvsFile.make(file.getFullName(), file.getRevision(), file.isDead());\n files.put(file.getFullName(), cvsFile);\n }\n\n if (addChange) {\n changes.add(currentChange);\n }\n\n // we have to copy the file and save the copy since the passed file gets internally\n // modified during following calls\n final CVSChangeLogSet.File localFile = new CVSChangeLogSet.File();\n localFile.setRevision(file.getRevision());\n localFile.setDead(file.isDead());\n localFile.setFullName(file.getFullName());\n localFile.setName(file.getName());\n localFile.setPrevrevision(file.getPrevrevision());\n\n currentChange.addFile(localFile);\n\n }",
"protected abstract void perform(VCSHistoryProvider.HistoryEntry entry, Set<VCSFileProxy> files);",
"public void testMoveFileWithReplace() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n IPackageFragment otherFragment = getRoot().createPackageFragment(\"org.test1\", true, null);\n IFile file = ((IFolder) fragment.getResource()).getFile(\"x.properties\");\n String content = \"A file with no references\";\n file.create(getStream(content), true, null);\n setReadOnly(file);\n IFile file2 = ((IFolder) otherFragment.getResource()).getFile(\"x.properties\");\n file2.create(getStream(content), true, null);\n setReadOnly(file2);\n IMovePolicy policy = ReorgPolicyFactory.createMovePolicy(new IResource[] { file }, new IJavaElement[] {});\n assertTrue(policy.canEnable());\n JavaMoveProcessor javaMoveProcessor = new JavaMoveProcessor(policy);\n javaMoveProcessor.setDestination(ReorgDestinationFactory.createDestination(otherFragment));\n javaMoveProcessor.setReorgQueries(new MockReorgQueries());\n RefactoringStatus status = performRefactoring(new MoveRefactoring(javaMoveProcessor), true);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(1, validatedEditPaths.size());\n // replaced\n assertTrue(validatedEditPaths.contains(file2.getFullPath()));\n }",
"@Test\n\tpublic void diffRevisions() throws Exception {\n\t\tRepository repo = new FileRepository(testRepo);\n\t\tRevCommit commit1 = add(\"test.txt\", \"content\");\n\t\tRevCommit commit2 = add(\"test.txt\", \"content2\");\n\t\tTreeWalk walk = TreeUtils.diffWithCommits(repo,\n\t\t\t\tConstants.MASTER + \"~1\", Constants.MASTER);\n\t\tassertNotNull(walk);\n\t\tassertEquals(2, walk.getTreeCount());\n\t\tassertTrue(walk.next());\n\t\tassertEquals(\"test.txt\", walk.getPathString());\n\t\tassertEquals(BlobUtils.getId(repo, commit1, \"test.txt\"),\n\t\t\t\twalk.getObjectId(0));\n\t\tassertEquals(BlobUtils.getId(repo, commit2, \"test.txt\"),\n\t\t\t\twalk.getObjectId(1));\n\t\tassertFalse(walk.next());\n\t}",
"public void setOriginalFilePath(String newValue);",
"public void onPathChanged(@Nullable File oldFile, @NonNull File newPath) {\n if (newPath.isDirectory()) {\n headmodel.setFile(new File(\"\"));\n model.body.set(newPath.getAbsolutePath());\n } else {\n headmodel.setFile(newPath);\n }\n }",
"public void markVersionReplace() throws JNCException {\n markLeafReplace(\"version\");\n }",
"@Override\r\n\tpublic void notifyJarChange(List<Jar> changedJars) {\n\r\n\t}",
"void merge(String revSpec) throws GitException, InterruptedException;",
"GitCommit(RevCommit anRC) { _rev = anRC; }",
"@Override\n public void notify(String newFileContent) {\n Repository.getRepositoryInstance().updateStockOrders(newFileContent);\n//end of modifiable zone..................E/a170c128-ca49-4fc4-abdd-43b714481007\n }",
"@Test\n public void fileAddedViaHgShouldBeAddedInChangeList() throws Exception {\n final VirtualFile vf = createFileInCommand(AFILE, INITIAL_FILE_CONTENT);\n ProcessOutput processOutput = addAll();\n LOG.debug(processOutput.getStdout());\n LOG.debug(processOutput.getStderr());\n myChangeListManager.checkFilesAreInList(true, vf);\n }",
"public void recoverFiles(final List<ChangeData> cd){\n \t\tList<String> ls = new LinkedList<String>();\n \t\t\n \t\tthis.clearFilelist();\n \n \t\tfor(int i=0;i<cd.size();++i){\n \t\t\tthis.pDeleteFile(this.getRoot() + File.separatorChar + cd.get(i).getFilename());\n \t\t\tthis.pCreateFile(this.getRoot() + File.separatorChar + cd.get(i).getFilename());\n \t\t\t\n \t\t\tfor(Patch patch: cd.get(i).getDifflist()){\n \t\t\t\ttry {\n \t\t\t\t\tls=this.snapshot.applyPatch(ls, patch);\n \t\t\t\t} catch (PatchFailedException 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\t\n \t\t\t}\n \t\t\t\n \t\t\tthis.getFilelist().put(cd.get(i).getFilename(), cd.get(i).getLclock());\t\n \t\t\tif(!this.getFilelist().get(cd.get(i).getFilename()).containsKey(this.getAddress()))\n \t\t\t\tthis.getFilelist().get(cd.get(i).getFilename()).put(this.getAddress(), 0);\n \t\t\t\n \t\t\tthis.writeFile(this.getRoot() + File.separatorChar + cd.get(i).getFilename(), ls);\n \t\t\tls.clear();\n \t\t}\n \t\tthis.storeMetadata(this.getRoot());\n \n \t}",
"private static void merge(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (args.length != 2) {\n System.out.println(\"Please input the branch name\");\n } else if (!currCommit.tree.hasBranch(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n } else if (args[1].equals(currCommit.tree.getCurrentBranch())) {\n System.out.println(\"Cannot merge a branch with itself.\");\n } else {\n HashMap<String, String> splitMap = findSplitBranch(currCommit, args)\n .getFileLoc();\n HashMap<String, String> headMap = currCommit.tree.getHeadCommit()\n .getFileLoc();\n HashMap<String, String> mergeMap = currCommit.tree.getHeadCommit(\n args[1]).getFileLoc();\n for (String mergeFile : mergeMap.keySet()) {\n if (splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n if (splitMap.get(mergeFile).equals(headMap.get(mergeFile))\n && !headMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile);\n } else if (!splitMap.get(mergeFile).equals(\n headMap.get(mergeFile))\n && !splitMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile + \".conflicted\");\n }\n } else if (!splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n FileManip origin = new FileManip(mergeMap.get(mergeFile));\n if (!origin.isSame(headMap.get(mergeFile))) {\n origin.copyFile(mergeFile + \".conflicted\");\n }\n }\n }\n }\n }",
"@Override\n\t\tpublic void setEditedContent(CGFile file) {\n\n\t\t}",
"@Test\n void testUpdateWhenLatestChanges() throws Exception {\n\n startMetadataTestServer(RC2);\n\n // Make the initial latestVersion call and validate the result\n\n assertInitialLatestVersionRequestPerformsUpdate(0, NANOSECONDS, VERSION_RC2, RC2_ETAG, false);\n\n // Now get the properties again and make sure we skip the zip download but still updated the latest version.\n // Note that the update is forced here because we used a zero frequency.\n\n LOG_RECORDER.clear();\n assertThat(meta.propertiesOf(latestVersion), is(not(nullValue())));\n assertLinesContainingAll(1, \"not modified\", RC2 + \"/\" + CLI_DATA_FILE_NAME);\n assertLinesContainingAll(1, \"updated\", RC2_LAST_UPDATE, \"etag \" + RC2_ETAG);\n assertLinesContainingAll(1, \"downloading\", LATEST_FILE_NAME);\n assertLinesContainingAll(1, \"connected\", LATEST_FILE_NAME);\n assertLinesContainingAll(1, \"wrote\", LATEST_FILE_NAME);\n\n // Now change the result of /latest and validate the result\n\n LOG_RECORDER.clear();\n Plugins.reset(true);\n testServer.latest(TestVersion.RC1);\n assertInitialLatestVersionRequestPerformsUpdate(0, NANOSECONDS, VERSION_RC1, RC1_ETAG, true);\n }",
"@Test\n @Ignore\n public void testFileTimestampChangeForManualTest() {\n \t// prepare test folder\n \tFile srcFolder = new File(\"C:\\\\bitlocker\\\\job_test\");\n \tFile targetFolder = new File(\"C:\\\\bitlocker\\\\job\");\n \ttry {\n \t\tif (targetFolder.exists()) FileUtils.cleanDirectory(targetFolder);\n\t\t\tFileUtils.copyDirectory(srcFolder, targetFolder);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tassertThat(targetFolder.exists(), is(true));\n \t\n \tint retentionDays = findAssetRetentionDays(META_INBOUNDFILE);\n \tassertThat(retentionDays, is(14));\n \t\n \t// change last modified date for testing files\n Date testingFileDate = getRetentionDate(retentionDays+1);\t// 1 day older\n for (File file: targetFolder.listFiles()) {\n \tfile.setLastModified(testingFileDate.getTime()); // update date\n }\n }",
"@Override\n public void fileChanged(FileChangeEvent fileChangeEvent) throws Exception {\n\n }",
"private void parsePreviousChangeVersion(final String line, final CVSChangeLogSet.File file, final CVSChangeLog change,\n final Map<String, String> branches, final List<CVSChangeLog> changes,\n final Map<String, CvsFile> files, final CvsRepositoryLocation location,\n final EnvVars envVars) {\n if (!line.startsWith(\"revision\")) {\n throw new IllegalStateException(\"Unexpected line from CVS log: \" + line);\n }\n\n final String revision = line.substring(9);\n file.setPrevrevision(revision);\n\n saveChange(file, change, branches, changes, files, location, envVars);\n\n file.setRevision(revision);\n }",
"private void update() {\r\n \tthis.pathTextView.setText(this.currentPath);\r\n \tthis.fileListAdapter.clear();\r\n \tthis.fileListAdapter.add(\"[\"+getResources().getString(R.string.go_home)+\"]\");\r\n \tif (!this.currentPath.equals(\"/\"))\r\n \t\tthis.fileListAdapter.add(\"..\");\r\n \t\r\n \tFile files[] = new File(this.currentPath).listFiles(this.fileFilter);\r\n\r\n \tif (files != null) {\r\n\t \ttry {\r\n\t\t \tArrays.sort(files, new Comparator<File>() {\r\n\t\t \t\tpublic int compare(File f1, File f2) {\r\n\t\t \t\t\tif (f1 == null) throw new RuntimeException(\"f1 is null inside sort\");\r\n\t\t \t\t\tif (f2 == null) throw new RuntimeException(\"f2 is null inside sort\");\r\n\t\t \t\t\ttry {\r\n\t\t \t\t\t\tif (dirsFirst && f1.isDirectory() != f2.isDirectory()) {\r\n\t\t \t\t\t\t\tif (f1.isDirectory())\r\n\t\t \t\t\t\t\t\treturn -1;\r\n\t\t \t\t\t\t\telse\r\n\t\t \t\t\t\t\t\treturn 1;\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\treturn f1.getName().toLowerCase().compareTo(f2.getName().toLowerCase());\r\n\t\t \t\t\t} catch (NullPointerException e) {\r\n\t\t \t\t\t\tthrow new RuntimeException(\"failed to compare \" + f1 + \" and \" + f2, e);\r\n\t\t \t\t\t}\r\n\t\t\t\t\t}\r\n\t\t \t});\r\n\t \t} catch (NullPointerException e) {\r\n\t \t\tthrow new RuntimeException(\"failed to sort file list \" + files + \" for path \" + this.currentPath, e);\r\n\t \t}\r\n\t \t\r\n\t \tfor(int i = 0; i < files.length; ++i) this.fileListAdapter.add(files[i].getName());\r\n \t}\r\n \t\r\n \tif (isHome(currentPath)) {\r\n \t\trecent = new Recent(this);\r\n \t\t\r\n \tfor (int i = 0; i < recent.size(); i++) {\r\n \t\tthis.fileListAdapter.insert(\"\"+(i+1)+\": \"+(new File(recent.get(i))).getName(), \r\n \t\t\t\tRECENT_START+i);\r\n \t}\r\n \t}\r\n \telse {\r\n \t\trecent = null;\r\n \t}\r\n \t\r\n \tthis.filesListView.setSelection(0);\r\n }",
"private void checkout(ObjectId headId, String refName) throws IOException {\n \t\tif (!Constants.HEAD.equals(refName))\n \t\t\tdb.writeSymref(Constants.HEAD, refName);\n \n \t\tfinal Commit commit = db.mapCommit(headId);\n \t\tfinal RefUpdate u = db.updateRef(Constants.HEAD);\n \t\tu.setNewObjectId(commit.getCommitId());\n \t\tResult result = u.forceUpdate();\n \t\t\n \t\t//X TODO REMOVE DEBUGGING OUTPUT and CHECK RESULT!\n \t\tSystem.out.println(\"updateRef \" + u + \" returned Result=\" + result);\n \n \t\tfinal GitIndex index = db.getIndex();\n \t\tfinal Tree tree = commit.getTree();\n \t\tfinal WorkDirCheckout co;\n \n \t\tco = new WorkDirCheckout(db, db.getWorkDir(), index, tree);\n \t\tco.checkout();\n \t\tindex.write();\n \t}",
"private void sort() {\n setFiles(getFileStreamFromView());\n }",
"public static void update(CommentModel updatedroot, Context context, String file){\n\t\tArrayList<CommentModel> rootlist = new ArrayList<CommentModel>();\n\t\tString dir = dir(file);\n\t\trootlist = loadFromFile(file, context);\n\t\t\n\t\tcheck_if_exist(file, context);\n\t\tfor(CommentModel r : rootlist){\n\t\t\tif(r.getPostId().toString().equals(updatedroot.getPostId().toString())){\n\t\t\t\tr = updatedroot;\n\t\t\t\t\n\t\t\t}\n\t\t\tSaveComment(r, context, dir);\n\t\t}\n\t\t\n\t}",
"private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }",
"public void reloadFiles()\n {\n for (Reloadable rel : reloadables)\n {\n rel.reload();\n }\n }",
"public int compare(File file, File file2) {\n int i = ((file.lastModified() - file2.lastModified()) > 0 ? 1 : ((file.lastModified() - file2.lastModified()) == 0 ? 0 : -1));\n if (i > 0) {\n return 1;\n }\n return i == 0 ? 0 : -1;\n }",
"@Test\n\tpublic void testIsConsistentModifiedFileRevert() throws Exception {\n\t\tIRodinFile rodinFile = createRodinFile(\"P/x.test\");\n\t\tRodinTestRoot root = (RodinTestRoot) rodinFile.getRoot();\n\t\tcreateNEPositive(root, \"foo\", null);\n\t\trodinFile.makeConsistent(null);\n\t\tassertTrue(\"reverted file should be consistent\", \n\t\t\t\trodinFile.isConsistent());\n\t}",
"void changeFilePath(String newFilePath);",
"public void preArchive() {\n // update version number\n setVersionNumber(CURRENT_VERSION_NO);\n }",
"@Override\n public void sortCurrentList(FileSortHelper sort) {\n }",
"public int compare(File file, File file2) {\n int i = ((file.lastModified() - file2.lastModified()) > 0 ? 1 : ((file.lastModified() - file2.lastModified()) == 0 ? 0 : -1));\n if (i > 0) {\n return 1;\n }\n return i == 0 ? 0 : -1;\n }",
"public int compare(File file, File file2) {\n int i = ((file.lastModified() - file2.lastModified()) > 0 ? 1 : ((file.lastModified() - file2.lastModified()) == 0 ? 0 : -1));\n if (i > 0) {\n return 1;\n }\n return i == 0 ? 0 : -1;\n }",
"@Nonnull\n private Observable<String> pushChangeToRevision(@Nonnull JsonObject changes) {\n Objects.requireNonNull(changes, \"missing change\");\n\n return Observable.from(changes.fieldNames())\n .flatMap(revision -> {\n JsonObject change = changes.getJsonObject(revision);\n return doUpdate(\n REVISIONS_CNAME,\n new JsonObject()\n .put(Revision.ID, revision)\n .put(Revision.STATE, Revision.State.PENDING),\n new JsonObject()\n .put(\"$push\", new JsonObject().put(Revision.CHANGES, change)))\n .map(res -> revision);\n });\n }",
"private ChangedFile getChangedFile(FileHeader header) {\n ChangedFile cf =new ChangedFile(header);\n List<? extends HunkHeader> hunks = header.getHunks();\n for (HunkHeader hunkHeader : hunks) {\n EditList var16 = hunkHeader.toEditList();\n cf.chunks = this.getChunks(var16);\n }\n cf.setLines();\n return cf;\n }",
"public interface Revision extends Comparable<Revision> {\n \n /**\n * Compares the revision to the given version string. Behaves like\n * {@link Comparable#compareTo(Object)}.\n */\n public int compareTo(String version);\n \n /**\n * Returns a string representation of the version of this revision. The\n * version is used by {@link #compareTo(String)} as well as to\n * serialize/deserialize revision information. Therefore it must be self\n * descriptive as well as be able to identify one revision from another.\n */\n public String getVersion();\n \n /**\n * Returns the files that comprise this revision, as a mapping from a source\n * to a list of files.\n */\n public Map<String,List<RevisionFile>> getSourceFiles();\n \n /**\n * Returns an {@link IndexInput} for the given fileName and source. It is the\n * caller's responsibility to close the {@link IndexInput} when it has been\n * consumed.\n */\n public InputStream open(String source, String fileName) throws IOException;\n \n /**\n * Called when this revision can be safely released, i.e. where there are no\n * more references to it.\n */\n public void release() throws IOException;\n \n}",
"List<ChangedFile> getChangedFiles(Project project);",
"private void checkSwitchedFile(final FilePath filePath, final ChangelistBuilder builder, final VirtualFile dir, final Entry entry) {\n if (!myVcsManager.isFileInContent(dir)) {\n return;\n }\n final String dirTag = myEntriesManager.getCvsInfoFor(dir).getStickyTag();\n final String dirStickyInfo = getStickyInfo(dirTag);\n if (entry != null && !Objects.equals(entry.getStickyInformation(), dirStickyInfo)) {\n final VirtualFile file = filePath.getVirtualFile();\n if (file != null) {\n if (entry.getStickyTag() != null) {\n builder.processSwitchedFile(file, CvsBundle.message(\"switched.tag.format\", entry.getStickyTag()), false);\n }\n else if (entry.getStickyDate() != null) {\n builder.processSwitchedFile(file, CvsBundle.message(\"switched.date.format\", entry.getStickyDate()), false);\n }\n else if (entry.getStickyRevision() != null) {\n builder.processSwitchedFile(file, CvsBundle.message(\"switched.revision.format\", entry.getStickyRevision()), false);\n }\n else {\n builder.processSwitchedFile(file, CvsUtil.HEAD, false);\n }\n }\n }\n }",
"public void setDirty() {\r\n\t\tif (LOG.isLoggable(Level.FINE)) { LOG.fine(\"setDirty\"); }\r\n\r\n \tif(clean) { fireFileCleanStatusChangedEvent(new FileChangeEvent(eventSource, false)); }\r\n \tfireFileChangedEvent(new FileChangeEvent(this, false));\r\n \tclean = false;\r\n }",
"public void commit()\n\t{\n\t\tif (committed)\n\t\t\treturn;\n\t\t// handle the error case first\n\t\tif (error)\n\t\t{\n//\t\t\tSystem.out.println(\"Error - removing \" + source + \" and \" + generates);\n\t\t\tif (source.exists())\n\t\t\t\tsource.delete();\n\t\t\tif (generates.exists())\n\t\t\t\tgenerates.delete();\n\t\t}\n\t\telse if (source.exists() && generates.exists()) // the typical something might have changed case\n\t\t{\n\t\t\tif (dirty)\n\t\t\t{ // they are different, move ...\n//\t\t\t\tSystem.out.println(\"Built - moving \" + generates + \" to \" + source);\n\t\t\t\tboolean fd = source.delete();\n\t\t\t\tif (!fd)\n\t\t\t\t\tthrow new UtilException(\"Could not delete the file \" + source + \" when renaming \" + generates);\n\t\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\t\tif (!renameWorked)\n\t\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n//\t\t\t\tSystem.out.println(\"No change - removing \" +generates);\n\t\t\t\t// they're the same, the new one is uninteresting\n\t\t\t\tgenerates.delete();\n\t\t\t}\n\t\t}\n\t\telse if (!source.exists() && generates.exists()) // we didn't have a comparison file\n\t\t{\n//\t\t\tSystem.out.println(\"Clean build - saving \" + generates + \" as \" + source);\n\t\t\tboolean renameWorked = generates.renameTo(source);\n\t\t\tif (!renameWorked)\n\t\t\t\tthrow new UtilException(\"Could not rename \" + generates + \" to \" + source);\n\t\t}\n\t\telse\n\t\t\tthrow new UtilException(\"I don't think this case should be able to happen: Comparing \" + source + (source.exists()?\"(exists)\":\"(missing)\") + \" \" + generates + (generates.exists()?\"(exists)\":\"(missing)\"));\n\t\tcommitted = true;\n\t}",
"void branch(String branchName) {\n File curr = new File(\".gitlet/current\");\n String path = null;\n File newBranch = new File(\".gitlet/heads/\" + branchName + \".ser\");\n for (File file: curr.listFiles()) {\n path = file.getName();\n }\n if (newBranch.exists()) {\n System.out.println(\"A branch with that name already exists.\");\n return;\n } else {\n Commit currCom = deserializeCommit(\".gitlet/current/\" + path);\n try {\n FileOutputStream fieOut = new FileOutputStream(newBranch);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(currCom);\n } catch (IOException e) {\n System.out.println(\"p\");\n }\n }\n }",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"public void fileReverted(OpenDefinitionsDocument doc) { }",
"private List<Integer> replaceRevisionRecords(boolean preview,\n PreparedStatement insert, ResultSet rs, Timestamp now, int revision)\n throws PSStringTemplateException, SQLException, NamingException\n {\n List<Integer> rval = new ArrayList<Integer>();\n Logger l = LogManager.getLogger(getClass());\n int nextid = getNextIdBlock(20, \"CONTENTSTATUSHISTORY\", preview);\n int end = nextid + 20 - 1;\n while (rs.next())\n {\n if (nextid >= end)\n {\n nextid = getNextIdBlock(20, \"CONTENTSTATUSHISTORY\", preview);\n end = nextid + 20 - 1;\n }\n int contentid = rs.getInt(1);\n if (!preview)\n {\n String title = rs.getString(2);\n int workflowappid = rs.getInt(3);\n l.debug(\"Inserting revision record for content id \" + contentid\n + \" rev \" + revision);\n insertContentStatusRecord(insert, now, \"RxFix\", null, \"Draft\",\n title, \"RxFix Inserted Revision History\", false,\n workflowappid, nextid++, contentid, revision);\n }\n else\n {\n l.debug(\"Would insert revision record for content id \" + contentid\n + \" rev \" + revision);\n }\n rval.add(new Integer(contentid));\n }\n return rval;\n }",
"public boolean updateLastModified( Project project )\n {\n long old = lastModified;\n lastModified = getFile( project ).lastModified();\n return( lastModified > old );\n }"
] | [
"0.62058717",
"0.6054818",
"0.6010858",
"0.5614157",
"0.5534377",
"0.5492312",
"0.5428835",
"0.54020125",
"0.5342583",
"0.5265385",
"0.5259496",
"0.52392197",
"0.52081984",
"0.5205029",
"0.51972425",
"0.51902443",
"0.51686805",
"0.5168662",
"0.51651543",
"0.5152304",
"0.515072",
"0.51349777",
"0.5106464",
"0.50851005",
"0.506413",
"0.5056165",
"0.5036871",
"0.5019731",
"0.49918228",
"0.49858028",
"0.49784273",
"0.49780592",
"0.4977932",
"0.4942506",
"0.4941652",
"0.49323803",
"0.4923236",
"0.48989642",
"0.48861694",
"0.48836926",
"0.4883557",
"0.48757628",
"0.48738018",
"0.48662347",
"0.48233488",
"0.4812038",
"0.4791053",
"0.47868314",
"0.47864786",
"0.47695026",
"0.47683614",
"0.47647828",
"0.47594196",
"0.47571304",
"0.47498912",
"0.47453603",
"0.4744254",
"0.47434634",
"0.4738995",
"0.47293708",
"0.4713561",
"0.47112387",
"0.47099617",
"0.47011513",
"0.46899897",
"0.4680205",
"0.46739754",
"0.4671998",
"0.4666792",
"0.46661428",
"0.46600497",
"0.46598008",
"0.46554247",
"0.46490836",
"0.46489838",
"0.46402302",
"0.46398422",
"0.46219176",
"0.46212298",
"0.4617914",
"0.45905793",
"0.45899677",
"0.458201",
"0.45794252",
"0.4579193",
"0.45739433",
"0.45730084",
"0.45730084",
"0.45684186",
"0.4568019",
"0.45676863",
"0.45584813",
"0.45553336",
"0.45497292",
"0.45320436",
"0.45295542",
"0.45286542",
"0.45286542",
"0.45279416",
"0.45216525"
] | 0.86384004 | 0 |
Creates stash for projects | Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<Project, Boolean> stashDrop(Stash stash);",
"List<Stash> getStashList(List<Project> projects);",
"public void createProject(Project newProject);",
"Project createProject();",
"Project createProject();",
"Project createProject();",
"void applyStashes(Stash stash, ProgressListener progressListener);",
"private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }",
"LectureProject createLectureProject();",
"void projectFound( String key ){\n projectInProgress = new Project();\n }",
"public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"public CreateProject() {\n\t\tsuper();\n\t}",
"@SystemSetup(type = Type.PROJECT, process = Process.ALL)\n\tpublic void createProjectData(final SystemSetupContext context)\n\t{\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_PROJECT_DATA))\n\t\t{\n\t\t\t\n\t\t\t//Store locator is out of scope for SBD b2b\t\n\t\t\timportStoreInitialData(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME, PROJECT_NAME,\n\t\t\t\t\tCollections.singletonList(PROJECT_NAME));\n\t\t\t\n\t\t}\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_SBD_SAMPLE_PRODUCT_DATA))\n\t\t{\n\t\t\timportCommonData(context, PROJECT_DATA_IMPORT_FOLDER);\n\t\t\timportProductCatalog(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME);\t\n\t\t\t\n\t\t}\n\t}",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"@Override\n\tpublic void createProject(ProjectCreate project) {\n\t\tprojectDao.createProject(project);\n\t}",
"static void stashSandbox(Path path, String mnemonic) {\n if (instance == null) {\n return;\n }\n instance.stashSandboxInternal(path, mnemonic);\n }",
"public static void init() {\n File dir = new File(\".gitlet\");\n if (dir.exists()) {\n System.out.println(\"a gitlet version-control system already exists in the current directory.\");\n return;\n } else {\n dir.mkdir();\n File next = new File(\".gitlet/heads/master.ser\");\n File currentBranch = new File(\".gitlet/current\");\n File heads = new File(\".gitlet/heads\");\n File currentname = new File(\".gitlet/current/master.ser\");\n File staged = new File(\".gitlet/staged\");\n File commits = new File(\".gitlet/commits\");\n File unstaged = new File(\".gitlet/unstaged\");\n File blobs = new File(\".gitlet/blobs\");\n try {\n heads.mkdir();\n staged.mkdir();\n commits.mkdir();\n unstaged.mkdir();\n currentBranch.mkdir();\n blobs.mkdir();\n Commit initial = new Commit(\"initial commit\", null, null);\n FileOutputStream fileOut = new FileOutputStream(next);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(initial);\n Files.copy(next.toPath(), currentname.toPath());\n } catch (IOException e) {\n return;\n }\n }}",
"Stone create();",
"public void assignAndStartInitialProjects() {\n\t\tfor(Player p:players) {\n\t\t\tSubproject sp=drawProject();\n\t\t\tSubprojectField result=sp.setChip(p.removeChip());\n\t\t\tp.raiseScore(result.getAmountSZT());\n\t\t}\n\t}",
"SandBox createSandBox(Site site, String sandBoxName, SandBoxType sandBoxType) throws Exception;",
"public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }",
"@RequestMapping(value = \"/create/project/{projectId}\", method = RequestMethod.GET)\r\n public ModelAndView create(@PathVariable(\"projectId\") String projectId) {\r\n ModelAndView mav = new ModelAndView(\"creates2\");\r\n int pid = -1;\r\n try {\r\n pid = Integer.parseInt(projectId);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n Project project = hibernateTemplate.get(Project.class, pid);\r\n if (!dataAccessService.isProjectAvailableToUser(project, user)) {\r\n return accessdenied();\r\n }\r\n List<SubProject> subProjects = dataAccessService.getResearcherSubProjectsForUserInProject(user, project);\r\n mav.addObject(\"projectId\", projectId);\r\n mav.addObject(\"methods\", project.getMethods());\r\n mav.addObject(\"subProjects\", subProjects);\r\n return mav;\r\n }",
"@Override\n\tpublic void createProjects(Projects proj) {\n\t\tString sql = \"INSERT INTO projects VALUES (?,?,?,?,?,?,now(),now(),?)\";\n\t\t\n\t\tthis.getJdbcTemplate().update(sql, new Object[] { \n\t\t\t\tproj.getProj_id(),\n\t\t\t\tproj.getProj_name(),\n\t\t\t\tproj.getProj_desc(),\n\t\t\t\tproj.getFile_id(),\n\t\t\t\tproj.getCus_id(),\n\t\t\t\tproj.getCretd_usr(),\n\t\t\t\tproj.getProj_currency()\n\t\t});\n\t\t\n\t\tUserDetailsApp user = UserLoginDetail.getUser();\n\t\t\n\t\tCustomer cus = new Customer();\n\t\tcus = getJdbcTemplate().queryForObject(\"select * from customer where cus_id=\"+proj.getCus_id(), new BeanPropertyRowMapper<Customer>(Customer.class));\n\t\tString file_name = \"\";\n\t\tif(proj.getFile_id() != 0){\n\t\t\tFileModel myFile = new FileModel();\n\t\t\tmyFile = getJdbcTemplate().queryForObject(\"select * from file where file_id=\"+proj.getFile_id(), new BeanPropertyRowMapper<FileModel>(FileModel.class));\n\t\t\tfile_name = myFile.getFile_name();\n\t\t}\n\t\t\n\t\tString audit = \"INSERT INTO audit_logging (aud_id,parent_id,parent_object,commit_by,commit_date,commit_desc,parent_ref) VALUES (default,?,?,?,now(),?,?)\";\n\t\tthis.getJdbcTemplate().update(audit, new Object[]{\n\t\t\t\t\n\t\t\t\tproj.getProj_id(),\n\t\t\t\t\"Projects\",\n\t\t\t\tuser.getUserModel().getUsr_name(),\n\t\t\t\t\"Created row on Projects name=\"+proj.getProj_name()+\", desc=\"+proj.getProj_desc()+\", file_name=\"+file_name\n\t\t\t\t+\", customer=\"+cus.getCus_code()+\", proj_currency=\"+proj.getProj_currency(),\n\t\t\t\tproj.getProj_name()\n\t\t});\n\t}",
"private Project(){}",
"private static void addToProjectStructure(IProject newProject, String[] paths) throws CoreException {\n for (String path : paths) {\n IFolder etcFolders = newProject.getFolder(path);\n createFolder(etcFolders);\n }\n }",
"private void registerProject(String projectName, String... importNames) {\n Project p = new Project(projectName);\n List<ModelImport<Project>> imps = null;\n if (null != importNames) {\n imps = new ArrayList<ModelImport<Project>>();\n for (int i = 0; i < importNames.length; i++) {\n if (null != importNames[i] && importNames[i].length() > 0) {\n ProjectImport imp = new ProjectImport(importNames[i], null);\n p.addImport(imp);\n imps.add(imp);\n }\n }\n if (imps.isEmpty()) {\n imps = null;\n }\n }\n File file = new File(BASE, projectName + \".ivml\");\n // don't care whether this exists or not\n ModelInfo<Project> info = new ModelInfo<Project>(p.getName(), p.getVersion(), this, file.toURI(), imps);\n data.put(info, p);\n name2Info.put(projectName, info);\n }",
"public void testAdd() throws TeamException, CoreException {\n IProject project = createProject(\"testAdd\", new String[] { });\n // add some resources\n buildResources(project, new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" }, false);\n // add them to CVS\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE));\n add(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO));\n add(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE));\n }",
"public UploadProjectAction() {\n\t\tsuper();\n\t}",
"public boolean insertProject(Project project) throws EmployeeManagementException;",
"@Override\r\n\tpublic List<TreeNodeTo> prepareSprintTreeNodes(String projectId) {\n\t\tTreeNodeTo rootNode=prepareRootNode();\r\n\t\tList sprintNodes=new ArrayList<TreeNodeTo>();\r\n\t\tsprintNodes.add(rootNode);\r\n\t\tList<SprintTo> sprints=sprintDao.getSprintForProject(projectId);\r\n\t\tif(sprints!=null&&sprints.size()>0){\r\n\t\t\tfor(SprintTo sprint : sprints){\r\n\t\t\t\tTreeNodeTo node=new TreeNodeTo();\r\n\t\t\t\tnode.setId(sprint.getId());\r\n\t\t\t\tnode.setName(\"<Strong>\"+sprint.getName()+\"</Strong>\"+\" : \"+dateFormat.format(sprint.getStartTime())+\"--\"+dateFormat.format(sprint.getEndTime()));\r\n\t\t\t\tif(sprint.getParentSprint()==null){\r\n\t\t\t\t\tnode.setpId(\"0\");\r\n\t\t\t\t\tnode.setOpen(true);\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\tnode.setpId(sprint.getParentSprint().getId());\r\n\t\t\t\t\tnode.setOpen(false);\r\n\t\t\t\t}\r\n\t\t\t\tsprintNodes.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sprintNodes;\r\n\t}",
"void createProject(IProjectDescription description, IProject proj,\n\t\t\tIProgressMonitor monitor) throws CoreException,\n\t\t\tOperationCanceledException {\n\t\ttry {\n\n\t\t\tmonitor.beginTask(\"\", 2000);\n\n\t\t\tproj.create(description, new SubProgressMonitor(monitor, 1000));\n\n\t\t\tif (monitor.isCanceled()) {\n\t\t\t\tthrow new OperationCanceledException();\n\t\t\t}\n\n\t\t\tproj.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(\n\t\t\t\t\tmonitor, 1000));\n\n\t\t\t/*\n\t\t\t * Okay, now we have the project and we can do more things with it\n\t\t\t * before updating the perspective.\n\t\t\t */\n\t\t\tIContainer container = (IContainer) proj;\n\n\t\t\t/* Add an XHTML file */\n\t\t\t/*addFileToProject(container, new Path(\"index.html\"),\n\t\t\t\t\tJ15NewModel.openContentStream(\"Welcome to \"\n\t\t\t\t\t\t\t+ proj.getName(),\"5\"),monitor);*/\n\n\t\t\t/* Create the admin folder */\n\t\t\tfinal IFolder adminFolder = container.getFolder(new Path(\"admin\"));\n\t\t\tadminFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminModels = adminFolder.getFolder(new Path(\"models\"));\n\t\t\tadminModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminControllers = adminFolder.getFolder(new Path(\"controllers\"));\n\t\t\tadminControllers.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminViews = adminFolder.getFolder(new Path(\"views\"));\n\t\t\tadminViews.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminTables = adminFolder.getFolder(new Path(\"tables\"));\n\t\t\tadminTables.create(true, true, monitor);\n\t\t\t\n\t\t\t/* Create the site folder */\n\t\t\tfinal IFolder siteFolder = container.getFolder(new Path(\"site\"));\n\t\t\tsiteFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteModels = siteFolder.getFolder(new Path(\"models\"));\n\t\t\tsiteModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteViews = siteFolder.getFolder(new Path(\"views\"));\n\t\t\tsiteViews.create(true, true, monitor);\n\n\t\t\tInputStream resourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\t/* Add blank HTML Files */\n\t\t\t\n\t\t\t/* Admin Folders first */\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminControllers.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminTables.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\t/* Now the site folders */\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\n\t\t\t/* All over! */\n\t\t} catch (IOException ioe) {\n\t\t\tIStatus status = new Status(IStatus.ERROR, \"J15Wizard\", IStatus.OK,\n\t\t\t\t\tioe.getLocalizedMessage(), null);\n\t\t\tthrow new CoreException(status);\n\t\t} finally {\n\t\t\tmonitor.done();\n\t\t}\n\t}",
"public void save(Project project) {\n\t\tcreate(project);\n\t}",
"@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }",
"@SubL(source = \"cycl/stacks.lisp\", position = 1818) \n public static final SubLObject create_stack() {\n return clear_stack(make_stack(UNPROVIDED));\n }",
"public void store() {\n \n try {\n ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction<Object>() {\n public Object run() {\n \n resolveProjectDependencies();\n \n // Some properties need special handling e.g. if the\n // property changes the project.xml files\n for(final PropertyInfo pi:properties.values()) {\n pi.encode();\n }\n \n final ProjectConfiguration configs[] = configHelper.getConfigurations().toArray(new ProjectConfiguration[0]);\n final HashSet<ProjectConfiguration> newConfigs = new HashSet<ProjectConfiguration>(Arrays.asList(devConfigs));\n for (int i=0; i<configs.length; i++) {\n if (!newConfigs.remove(configs[i])) {\n configHelper.removeConfiguration(configs[i]);\n }\n }\n for (ProjectConfiguration cfg:newConfigs) {\n configHelper.addConfiguration(cfg.getDisplayName());\n }\n \n \n // Reread the properties. It may have changed when\n // e.g. when setting references to another projects\n EditableProperties sharedProps = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties privateProps = antProjectHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n // Set the changed properties\n for( final PropertyInfo pi:properties.values()) {\n final PropertyDescriptor pd = pi.getPropertyDescriptor();\n if (pd != null && pi.isModified()) {\n final String newValueEncoded = pi.getNewValueEncoded();\n if ( newValueEncoded != null ) {\n (pd.isShared() ? sharedProps : privateProps).setProperty( pd.getName(), newValueEncoded );\n } else {\n // remove property\n (pd.isShared() ? sharedProps : privateProps).remove(pd.getName());\n }\n }\n }\n \n // Store the property changes into the project\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, sharedProps);\n antProjectHelper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, privateProps);\n \n // Invoke this method to perform cyclic dependencies check and potentionally show warning dilalog\n CustomizerGeneral cg = new CustomizerGeneral();\n cg.initValues(J2MEProjectProperties.this, null);\n cg.getSortedSubprojectsList();\n \n //storing global default encoding by dcurrent project (see issue #97855)\n String enc = sharedProps.getProperty(DefaultPropertiesDescriptor.JAVAC_ENCODING);\n if (enc != null) FileEncodingQuery.setDefaultEncoding(Charset.forName(enc));\n \n // save the project under write lock\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch (IOException ex) {\n ErrorManager.getDefault().notify(ex);\n }\n\n return null;\n }\n });\n } catch (MutexException e) {\n ErrorManager.getDefault().notify(e.getException());\n }\n \n }",
"private void archiveProject(final Project project) {\n\t\t// TODO RemoveWorkerFromProject löschen\n\t\tfinal ArrayList<Task> tasks = getProjectTasks(project);\n\t\tif (!tasks.isEmpty()) {\n\t\t\tfinal TaskController taskController = mainController.getTaskController();\n\t\t\ttaskController.removeWorker(tasks.get(0));\n\t\t\tfor (final Task task : tasks) {\n\t\t\t\tif (task.getCurrentWorker() != null) {\n\t\t\t\t\ttaskController.removeWorker(task);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinal ArrayList<Worker> team = project.getWorkers();\n\t\tif (!team.isEmpty()) {\n\t\t\tfinal TeamController teamController = mainController.getTeamController();\n\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\twhile (!team.isEmpty()) {\n\t\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\t}\n\t\t}\n\t\tproject.setActive(false);\n\t}",
"@POST\n @Path(\"accept\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Factory acceptFactory(final Factory factory) {\n final ProjectImporter importer = getGitProjectImporter();\n\n //try to check if factory contains project name value otherwise we set default project name to \"Unnamed\"\n ProjectAttributes projectAttributes = factory.getProjectattributes();\n if (projectAttributes == null) {\n projectAttributes = DtoFactory.getInstance().createDto(ProjectAttributes.class).withPname(DEFAULT_PROJECT_NAME);\n factory.setProjectattributes(projectAttributes);\n } else if (projectAttributes.getPname() == null || projectAttributes.getPname().isEmpty()) {\n projectAttributes = factory.getProjectattributes().withPname(DEFAULT_PROJECT_NAME);\n }\n\n List<FolderEntry> existedFolders = projectManager.getProjectsRoot(workspace).getChildFolders();\n\n //if project with the same name exist we should create new one with another name.\n for (FolderEntry existProject : existedFolders) {\n if (projectAttributes.getPname().equals(existProject.getName())) {\n projectAttributes.setPname(NameGenerator.generate(projectAttributes.getPname(), 4));\n break;\n }\n }\n\n //get newly created empty folder in which clone should be proceed\n FolderEntry projectFolder = projectManager.getProjectsRoot(workspace).createFolder(factory.getProjectattributes().getPname());\n\n try {\n importer.importSources(projectFolder, factory.getVcsurl());\n } catch (IOException e) {\n if (e.getCause() != null && e.getCause() instanceof NotAuthorizedException) {\n throw halt(UNAUTHORIZED, e.getMessage(), e);\n }\n throw halt(INTERNAL_SERVER_ERROR, e.getMessage());\n }\n\n //get physical path to project on file system to allow native git to work with repository\n String absoluteProjectPath;\n try {\n absoluteProjectPath = localPathResolver.resolve(projectFolder.getVirtualFile());\n } catch (VirtualFileSystemException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to resolve Git project directory.\", e);\n }\n\n GitConnection gitConnection;\n try {\n gitConnection = gitConnectionFactory.getConnection(absoluteProjectPath);\n } catch (GitException e) {\n removeInvalidClonedFolder(projectFolder);\n throw halt(INTERNAL_SERVER_ERROR, \"Unable to get Git connection to cloned project.\", e);\n }\n\n if (!Strings.isNullOrEmpty(factory.getCommitid())) {\n performCheckoutToCommitId(factory.getCommitid(), gitConnection);\n } else if (!Strings.isNullOrEmpty(factory.getVcsbranch())) {\n performCheckoutToBranch(factory.getVcsbranch(), gitConnection);\n }\n\n if (factory.getVariables() != null && factory.getVariables().size() > 0) {\n performReplaceVariables(factory.getVariables(), absoluteProjectPath);\n }\n\n if (!factory.getVcsinfo()) {\n AbstractVirtualFileEntry gitFolder = projectFolder.getChild(\".git\");\n if (gitFolder != null && gitFolder.isFolder()) {\n pushClientNotification(\"Git information erased.\");\n gitFolder.remove();\n }\n }\n\n return factory;\n }",
"protected static void createFiles(SessionState state)\n\t{\n\t\tSet alerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\tif(alerts == null)\n\t\t{\n\t\t\talerts = new HashSet();\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tString collectionId = (String) current_stack_frame.get(STATE_STACK_CREATE_COLLECTION_ID);\n\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t{\n\t\t\tcollectionId = (String) state.getAttribute(STATE_CREATE_COLLECTION_ID);\n\t\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t\t{\n\t\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_COLLECTION_ID, collectionId);\n\t\t}\n\n\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\tif(new_items == null)\n\t\t{\n\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t{\n\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t}\n\n\t\t\tString encoding = (String) state.getAttribute(STATE_ENCODING);\n\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\n\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\tif(defaultRetractDate == null)\n\t\t\t{\n\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t}\n\n\t\t\tnew_items = newEditItems(collectionId, TYPE_FOLDER, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\n\t\t}\n\t\tInteger number = (Integer) current_stack_frame.get(STATE_STACK_CREATE_NUMBER);\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = (Integer) state.getAttribute(STATE_CREATE_NUMBER);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = new Integer(1);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\n\t\tint numberOfItems = 1;\n\t\tnumberOfItems = number.intValue();\n\t\touterloop: for(int i = 0; i < numberOfItems; i++)\n\t\t{\n\t\t\tEditItem item = (EditItem) new_items.get(i);\n\t\t\tif(item.isBlank())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DISPLAY_NAME, item.getName());\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DESCRIPTION, item.getDescription());\n\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_COPYRIGHT, item.getCopyrightInfo());\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_COPYRIGHT_CHOICE, item.getCopyrightStatus());\n\t\t\tif (item.hasCopyrightAlert())\n\t\t\t{\n\t\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_COPYRIGHT_ALERT, Boolean.toString(item.hasCopyrightAlert()));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tresourceProperties.removeProperty (ResourceProperties.PROP_COPYRIGHT_ALERT);\n\t\t\t}\n\t\t\t\n\t\t\tBasicRightsAssignment rightsObj = item.getRights();\n\t\t\trightsObj.addResourceProperties(resourceProperties);\n\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_IS_COLLECTION, Boolean.FALSE.toString());\n\t\t\tif(item.isHtml())\n\t\t\t{\n\t\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_CONTENT_ENCODING, \"UTF-8\");\n\t\t\t}\n\t\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\t\t\tsaveMetadata(resourceProperties, metadataGroups, item);\n\t\t\tString filename = Validator.escapeResourceName(item.getFilename().trim());\n\t\t\tif(\"\".equals(filename))\n\t\t\t{\n\t\t\t\tfilename = Validator.escapeResourceName(item.getName().trim());\n\t\t\t}\n\n\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_ORIGINAL_FILENAME, filename);\n\t\t\t\n\t\t\tSortedSet groups = new TreeSet(item.getEntityGroupRefs());\n\t\t\tgroups.retainAll(item.getAllowedAddGroupRefs());\n\t\t\t\n\t\t\tboolean hidden = false;\n\n\t\t\tTime releaseDate = null;\n\t\t\tTime retractDate = null;\n\t\t\t\n\t\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t\t{\n\t\t\t\thidden = item.isHidden();\n\t\t\t\t\n\t\t\t\tif(item.useReleaseDate())\n\t\t\t\t{\n\t\t\t\t\treleaseDate = item.getReleaseDate();\n\t\t\t\t}\n\t\t\t\tif(item.useRetractDate())\n\t\t\t\t{\n\t\t\t\t\tretractDate = item.getRetractDate();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tContentResource resource = ContentHostingService.addResource (filename,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcollectionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMAXIMUM_ATTEMPTS_FOR_UNIQUENESS,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getMimeType(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getContent(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresourceProperties,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroups,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treleaseDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tretractDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getNotification());\n\n\t\t\t\titem.setAdded(true);\n\t\t\t\t\n\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t{\n\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!preventPublicDisplay.booleanValue() && item.isPubview())\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.setPubView(resource.getId(), true);\n\t\t\t\t}\n\n\t\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t\t{\n\t\t\t\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\t\t\t\tif(helper_mode != null && MODE_ATTACHMENT_NEW_ITEM_INIT.equals(helper_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t// add to the attachments vector\n\t\t\t\t\t\tList attachments = EntityManager.newReferenceList();\n\t\t\t\t\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(resource.getId()));\n\t\t\t\t\t\tattachments.add(ref);\n\t\t\t\t\t\tcleanupState(state);\n\t\t\t\t\t\tstate.setAttribute(STATE_ATTACHMENTS, attachments);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tObject attach_links = current_stack_frame.get(STATE_ATTACH_LINKS);\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattach_links = state.getAttribute(STATE_ATTACH_LINKS);\n\t\t\t\t\t\t\tif(attach_links != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_LINKS, attach_links);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachItem(resource.getId(), state);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachLink(resource.getId(), state);\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\tcatch(PermissionException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"notpermis12\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdInvalidException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdLengthException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"toolong\") + \" \" + e.getMessage());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdUniquenessException e)\n\t\t\t{\n\t\t\t\talerts.add(\"Could not add this item to this folder\");\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(InconsistentException e)\n\t\t\t{\n\t\t\t\talerts.add(RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(OverQuotaException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"overquota\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(ServerOverloadException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.warn(\"ResourcesAction.createFiles ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\n\t\t}\n\t\tSortedSet currentMap = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\tif(currentMap == null)\n\t\t{\n\t\t\tcurrentMap = new TreeSet();\n\t\t}\n\t\tcurrentMap.add(collectionId);\n\t\tstate.setAttribute(STATE_EXPANDED_COLLECTIONS, currentMap);\n\n\t\t// add this folder id into the set to be event-observed\n\t\taddObservingPattern(collectionId, state);\n\t\t\n\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\n\t}",
"@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }",
"public void createPrefixS(){\n\t \tprefixS = new Stack<Node>();\n\t \tprefixS.push(root);\n\t }",
"@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}",
"public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }",
"protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }",
"@When(\"5- the user creates a project with a valid name {string} identical to an existing project\")\n\tpublic void theUserCreatesAProjectWithNameIdenticalToAnExistisngProject(String projectName) throws ProjectNotFoundException, ProjectAlreadyExistsException, NotAuthorizedException, OutOfBoundsException {\n\t\tadmin.createProject(projectName);\n\t\ttry {\n\t\t\tadmin.createProject(projectName);\n\t\t}\n\t\tcatch(ProjectAlreadyExistsException e) {\n\t\t\terrorMessageHolder.setErrorMessage(e.getMessage());\n\t\t}\n\t}",
"public Project() {\n\n }",
"public static Project Create(String id)\n\t{\n\t\t// Need to use an ancestor query to do this inside a transaction.\n\t\t// But the ancestor of project is project.\n\t\t// So we just create a normal key with only the type and id\n\t\tproject = ofy().load().key(Key.create(Project.class, id)).now();\n\n\t\treturn project;\n\t}",
"private void initialDeploy() {\n }",
"public static Projects createEntity() {\n Projects projects = new Projects();\n projects = new Projects()\n .name(DEFAULT_NAME)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .status(DEFAULT_STATUS);\n return projects;\n }",
"public Project() {\n\t\t\n\t}",
"void createProjectForExercise(ProgrammingExercise programmingExercise) throws VersionControlException;",
"public static void main(String[] args) {\n\t\t\t\t\n\t\t//Displays assignment info\n\t\tSystem.out.println(\"COP3538 Project 3 - Xudong Liu\\n\\nStacks and Priority Queues\");\n\t\n\t\t//Locate file, must be in same directory\n\t\tScanner keyboard = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter the file Name: \");\n\t\tString file = keyboard.next();\n\t\tkeyboard.close();\n\t\t\n\t\t//Read file and parse for input\n\t\tint i = 0;//counter\n\t\tint newEngCount=0, midAtlCount=0, southCount=0;\n\t\tStack stateStackList=new Stack();\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = br.readLine(); //Reads and bypasses header\n\t\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\t\t\tString[] split = line.split(\",\");\n\t\t\t\t\t\tState nextState = new State(split[0], split[1], split[2], Integer.parseInt(split[3]), split[4], Integer.parseInt(split[5])); \t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (nextState.getRegion().equalsIgnoreCase(\"New England\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; newEngCount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"Middle Atlantic\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; midAtlCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (nextState.getRegion().equalsIgnoreCase(\"South\")) {\n\t\t\t\t\t\t\tstateStackList.push(nextState);\n\t\t\t\t\t\t\ti++; southCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\ti++;\n\t\t\t\t}\t\n\t\t\t\tbr.close();\n\t\t\t\t\n\t\t}\n\t\tcatch(IOException ioe) {\n\t\t\tSystem.out.format(\"\\nFile was not found. The application will terminate.\\n\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.format(\"\\nThere were %s state records put on the stack.\\n\", southCount + midAtlCount+ newEngCount);\n\t\tSystem.out.println(\"\\nStack Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tstateStackList.printStackedList();\n\t\tQueue queuedList = new Queue();\n\t\tint counter = 0;\n\t\twhile(!stateStackList.isEmpty()){\n\t\t\tif(counter %2 ==0 ){\n\t\t\t\tqueuedList.insertFront(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tqueuedList.insertEnd(stateStackList.pop());\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Queue Contents:\");\n\t\tSystem.out.printf(\"%-17s\", \"\\nState Name\");\n\t\tSystem.out.printf(\"%-16s\", \"Capital City\");\n\t\tSystem.out.printf(\"%-12s\", \"State Abbr\");\n\t\tSystem.out.printf(\"%-18s\", \"State Population\");\n\t\tSystem.out.printf(\"%-10s\", \"\\tRegion\");\n\t\tSystem.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t queuedList.printQueue();\n\t\t \n\t\t queuedList.findDelete(\"Massachusetts\");\n\t\t queuedList.findDelete(\"New Hampshire\");\n\t\t queuedList.findDelete(\"Rhode Island\");\n\t\t queuedList.findDelete(\"Maryland\");\n\t\t queuedList.findDelete(\"New Jersey\");\n\t\t queuedList.findDelete(\"Pennsylvania\");\n\t\t queuedList.findDelete(\"Alabama\");\n\t\t queuedList.findDelete(\"Kentucky\");\n\t\t queuedList.findDelete(\"North Carolina\");\n\t\t \n\t\t System.out.println(\"Queue Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t queuedList.printQueue();\n\t\t\t i=1;\n\t\t\t while(!queuedList.isEmpty()){\n\t\t\t\t\n\t\t\t\t if(i%2!=0){\n\t\t\t\t\tstateStackList.push(queuedList.removeFront().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tstateStackList.push(queuedList.removeEnd().stateObject);\n\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t}\t \n\t\t System.out.println(\"\\nStack Contents:\");\n\t\t System.out.printf(\"%-17s\", \"\\nState Name\");\n\t\t System.out.printf(\"%-16s\", \"Capital City\");\n\t\t System.out.printf(\"%-12s\", \"State Abbr\");\n\t\t System.out.printf(\"%-18s\", \"State Population\");\n\t\t System.out.printf(\"%-10s\", \"\\tRegion\");\n\t\t System.out.print(\"\\t\\tUS House Seats\\n\");\n\t\t\t\t System.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\t\t\tstateStackList.printStackedList();\n\t\t System.exit(0);\n\t}",
"@TaskAction\n public void createProject()\n throws IOException {\n String projectName = getProjectName();\n\n // Get the output directory\n String outputDir = \"build/\";\n String projectFolderPath = outputDir + PROJECT_PREFIX + PROJECT_PREFIX_INTEGRATION + projectName;\n Path outputPath = getProject().mkdir(new File(projectFolderPath)).toPath();\n\n // Build the project\n new ProjectBuilder(projectName, outputPath, getProject()).build();\n }",
"public Project() {\n\t}",
"public Project() {\n\t}",
"void projectName( String key, String value ){\n projectInProgress.projectName = value;\n if ( projectInProgress.fullProjectName == null ) {\n projectInProgress.fullProjectName = value;\n }\n }",
"public static final SubLObject setup_stacks_file() {\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_stack$.getGlobalValue(), Symbols.symbol_function($sym7$STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym8$STACK_STRUC_NUM, $sym9$_CSETF_STACK_STRUC_NUM);\n Structures.def_csetf($sym10$STACK_STRUC_ELEMENTS, $sym11$_CSETF_STACK_STRUC_ELEMENTS);\n Equality.identity($sym0$STACK);\n access_macros.register_macro_helper($sym24$DO_STACK_ELEMENTS_STACK_ELEMENTS, $sym25$DO_STACK_ELEMENTS);\n Structures.register_method(print_high.$print_object_method_table$.getGlobalValue(), $dtp_locked_stack$.getGlobalValue(), Symbols.symbol_function($sym36$LOCKED_STACK_PRINT_FUNCTION_TRAMPOLINE));\n Structures.def_csetf($sym37$LOCKED_STACK_STRUC_LOCK, $sym38$_CSETF_LOCKED_STACK_STRUC_LOCK);\n Structures.def_csetf($sym39$LOCKED_STACK_STRUC_STACK, $sym40$_CSETF_LOCKED_STACK_STRUC_STACK);\n Equality.identity($sym29$LOCKED_STACK);\n return NIL;\n }",
"protected void createProject(IProgressMonitor monitor)\n {\n monitor.beginTask(\"Creating the Totori project\", 50);\n try\n {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n monitor.subTask(\"Defining the nature of the project\");\n IProject project = root.getProject(page.getProjectName());\n IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());\n if(!Platform.getLocation().equals(page.getLocationPath()))\n description.setLocation(page.getLocationPath());\n project.create(description,monitor);\n monitor.worked(10);\n project.open(monitor);\n description = project.getDescription();\n description.setNatureIds(new String[] { TotoriNature.NATURE_ID });\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating subdirectories\");\n createFolderHelper(root.getFolder(project.getFullPath().append(\"config\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\").append(\"nircmd\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"plugins\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"steps\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"support\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"assets\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"screens\")), monitor);\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating files\");\n Vector<String> assets = new Vector<String>();\n assets.add(\"config/myconfig.yml\");\n assets.add(\"ext/nircmd/nircmd.chm\");\n assets.add(\"ext/nircmd/nircmd.exe\");\n assets.add(\"ext/nircmd/nircmdc.exe\");\n assets.add(\"features/support/env.rb\");\n assets.add(\"features/support/functions.rb\");\n assets.add(\"features/support/screenshots.rb\");\n assets.add(\"features/support/totori_formatter.rb\");\n assets.add(\"reports/assets/jquery-1.4.1.min.js\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.css\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.min.js\");\n assets.add(\"reports/assets/jquery.thumbs.js\");\n assets.add(\"reports/assets/lightbox-blank.gif\");\n assets.add(\"reports/assets/lightbox-btn-close.gif\");\n assets.add(\"reports/assets/lightbox-btn-next.gif\");\n assets.add(\"reports/assets/lightbox-btn-prev.gif\");\n assets.add(\"reports/assets/lightbox-ico-loading.gif\");\n assets.add(\"reports/assets/search.png\");\n assets.add(\"reports/assets/thumbs.css\");\n assets.add(\"reports/assets/totori.css\");\n for(String asset : assets) {\n \t String resource = \"/assets/\"+asset;\n \t InputStream stream = this.getClass().getResourceAsStream(resource);\n \t System.out.println(resource + \" : \" + stream);\n IPath path = project.getFullPath();\n for(String dir : asset.split(\"/\")) {\n \t path = path.append(dir);\n }\n IFile file = root.getFile(path);\n //file.getFullPath().toFile().mkdirs();\n //file.setCharset(\"utf-8\", monitor);\n file.create(stream, false, monitor);\n }\n monitor.worked(20);\n }\n catch(CoreException x)\n {\n reportError(x);\n }\n finally\n {\n monitor.done();\n }\n }",
"@Override\n public void run(String... args) throws Exception {\n\n TaskTemplate finalProjectDemo = new TaskTemplate(\"Final Project Demo\", \"Finishing the Demo\", 300, \"Tuesday\");\n taskTemplateStorage.save(finalProjectDemo);\n\n User mom = new User(\"Mom\", 300, \"rose\", \"/front-end/images/mom.png\");\n User dad = new User(\"Dad\", 600, \"apple\", \"/front-end/images/Dad.png\");\n User bro = new User(\"Bro\", 200, \"light-blue\", \"/front-end/images/Bro.png\");\n User sis = new User(\"Sis\", 200, \"magenta\", \"/front-end/images/sis.png\");\n\n\n// userStorage.save(testUser);\n userStorage.save(mom);\n userStorage.save(dad);\n userStorage.save(bro);\n userStorage.save(sis);\n\n\n\n TaskTemplate cleanCommonArea = new TaskTemplate(\"Clean Common Area\", \"Clean all common areas\", 30, 30, \"Monday\");\n TaskTemplate cleanGarage = new TaskTemplate(\"Clean Garage\", \"Sweep and organize the Garage\", 45, 45, \"Tuesday\");\n TaskTemplate cleanBathrooms = new TaskTemplate(\"Clean Bathrooms\", \"Wipe down sinks, scrub toilets, sweep and mop floors, and empty bathroom trash\", 30, 30, \"Wednesday\");\n TaskTemplate takeOutTrash = new TaskTemplate(\"Take Out Trash\", \"Take all trash to rolling bin outside and take the rolling bin to the road if today is a trash day\", 15,\"Wednesday\" );\n TaskTemplate washDishes = new TaskTemplate(\"Wash Dishes\", \"Wash and dry all dishes in the sink and empty/load the dishwasher\", 30, \"Wednesday\");\n TaskTemplate washAndDryLaundry = new TaskTemplate(\"Wash and Dry Laundry\", \"\", 30, 200, \"Monday\");\n TaskTemplate foldAndPutAwayLaundry = new TaskTemplate(\"Fold and Put Away Laundry\", \"\", 30, \"Monday\");\n TaskTemplate rakeLeaves = new TaskTemplate(\"Rake Leaves\", \"Rake and bag the leaves from the front, back, and sides of the house\", 45, \"Monday\");\n TaskTemplate mowLawn = new TaskTemplate(\"Mow Lawn\", \"Pick up rocks and sticks in the yards and mow the front and back lawn\", 45, \"Monday\");\n TaskTemplate cleanBedroom = new TaskTemplate(\"Clean Bedroom\", \"Clean your room\", 30, \"Tuesday\");\n TaskTemplate deepCleanKitchen = new TaskTemplate(\"Deep Clean Kitchen\", \"Clear off and wipe down all counter tops, wipe cabinet fronts, wipe behind sink, wipe trim boards under cabinets, sweep, and mop kitchen\", 90, \"Tuesday\");\n TaskTemplate tidyKitchen = new TaskTemplate(\"Tidy Kitchen\", \"Move dishes to sink, wipe down counter tops and table, and sweep floors\", 30, \"Tuesday\");\n TaskTemplate vacuumLivingRoom = new TaskTemplate(\"Vacuum Living Room\", \"Vacuum floors, crevases, and under furniture, and remove couch cushions to vacuum under cushions\", 30, \"Tuesday\");\n TaskTemplate mopAndSweepKitchen = new TaskTemplate(\"Mop and Sweep Kitchen\", \"Sweep and hot mop the kitchen floors\", 30, \"Thursday\");\n TaskTemplate changeLitterBox = new TaskTemplate(\"Change Litter Box\", \"Scoop the litter box and replace the litter if today is Friday\", 15, \"Thursday\");\n TaskTemplate walkDog = new TaskTemplate(\"Walk Dog\", \"Take the dogs for a walk around the block\", 20, \"Daily\");\n TaskTemplate cleanUpYard = new TaskTemplate(\"Clean Up Yard\", \"Pick up sticks and rocks in the front and back yard and pick up any trash that has blown in\", 20, \"Thursday\");\n TaskTemplate getMail = new TaskTemplate(\"Get Mail\", \"Get the mail from the mailbox\", 5, \"Daily\");\n TaskTemplate dustLivingRoom = new TaskTemplate(\"Dust Living Room\", \"Dust picture frames, end tables, coffee table, and door sills in the living room\", 20, \"Friday\");\n TaskTemplate dustFamilyRoom = new TaskTemplate(\"Dust Family Room\", \"Dust bookshelves, mantel over fireplace, stereo, and door sills in family room\", 20, \"Friday\");\n TaskTemplate vacuumFamilyRoom = new TaskTemplate(\"Vacuum Family Room\", \"Vacuum floors, crevases, and under furniture in the family room\", 20, \"Friday\");\n TaskTemplate dustCeilingFans = new TaskTemplate(\"Dust Ceiling Fans\", \"Wipe blades of ceiling fans down and ensure dust is blown out of fan motor housing\", 30, \"Friday\", bro, sis);\n\n taskTemplateStorage.save(cleanCommonArea);\n taskTemplateStorage.save(cleanGarage);\n taskTemplateStorage.save(cleanBathrooms);\n taskTemplateStorage.save(takeOutTrash);\n taskTemplateStorage.save(washDishes);\n taskTemplateStorage.save(washAndDryLaundry);\n taskTemplateStorage.save(foldAndPutAwayLaundry);\n taskTemplateStorage.save(rakeLeaves);\n taskTemplateStorage.save(mowLawn);\n taskTemplateStorage.save(cleanBedroom);\n taskTemplateStorage.save(deepCleanKitchen);\n taskTemplateStorage.save(tidyKitchen);\n taskTemplateStorage.save(vacuumLivingRoom);\n taskTemplateStorage.save(mopAndSweepKitchen);\n taskTemplateStorage.save(changeLitterBox);\n taskTemplateStorage.save(walkDog);\n taskTemplateStorage.save(cleanUpYard);\n taskTemplateStorage.save(getMail);\n taskTemplateStorage.save(dustLivingRoom);\n taskTemplateStorage.save(dustFamilyRoom);\n taskTemplateStorage.save(vacuumFamilyRoom);\n taskTemplateStorage.save(dustCeilingFans);\n\n resourceManager.allocateAllTasks();\n\n }",
"@Test\n\tpublic void saveProjects() throws ParseException {\n\t\tproject.setEstimates(5);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tDate parsed = format.parse(\"20110210\");\n\t\tjava.sql.Date sql = new java.sql.Date(parsed.getTime());\n\t\tproject.setdRequested(sql);\n\t\tproject.setdRequired(sql);\n\t\tproject.setCritical(true);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tProjectKeyContacts contacts = new ProjectKeyContacts();\n\t\tcontacts.setEmail(\"assdasd.gmail.com\");\n\t\tcontacts.setFname(\"sdsd\");\n\t\tcontacts.setLname(\"asdasd\");\n\t\tcontacts.setPhone(\"asd\");\n\t\tcontacts.setRole(\"asda\");\n\t\tcontacts.setTeam(\"saad\");\n\t\tproject.setContacts(contacts);\n\t\tProjectDetails det = new ProjectDetails();\n\t\tdet.setDescription(\"asdsd\");\n\t\tdet.setName(\"asd\");\n\t\tdet.setName(\"asdad\");\n\t\tdet.setSummary(\"asdd\");\n\t\tproject.setProjectDetails(det);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tassertEquals(controller.saveProject(project).getStatusCode(), HttpStatus.CREATED);\n\t}",
"private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}",
"public Project() { }",
"public Project()\n {\n\n }",
"public void createCurrentProjectVersion(String projectName, String versionName) throws Exception {\n\t\tDataManager.createFolderVersion(projectName, versionName);\n\t}",
"void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }",
"public StackRestaurant()\n\t{\n\t\ttickets = new Stack<Ticket>();\n\t}",
"public static void init() {\r\n if (MAIN_FOLDER.isDirectory()) {\r\n throw new GitletException(\"A Gitlet version-control system already \"\r\n + \"exists in the current directory.\");\r\n } else {\r\n MAIN_FOLDER.mkdirs();\r\n COMMIT_FOLDER.mkdirs();\r\n ADD_FOLDER.mkdirs();\r\n BLOB_FOLDER.mkdirs();\r\n Story story = new Story();\r\n story.saveStory();\r\n }\r\n }",
"private static void createProject(final ProjectProperties props, final Path projectDir) throws IOException\n {\n // Create and set the Freemarker configuration\n final Configuration freeMarkerConfig = new Configuration();\n final File templateDir = new File(props.getApiDirectory(), \"templates\");\n freeMarkerConfig.setDirectoryForTemplateLoading(templateDir);\n freeMarkerConfig.setObjectWrapper(new DefaultObjectWrapper());\n\n // Generate the project\n final Injector injector = Guice.createInjector(new UtilInjectionModule(), new LocalInjectionModule());\n final ProjectGenerator projectGen = injector.getInstance(ProjectGenerator.class);\n projectGen.initialize(freeMarkerConfig, OUT_STREAM);\n try\n {\n projectGen.create(props, projectDir.toFile());\n }\n catch (final Exception ex)\n {\n OUT_STREAM.println(\"Error generating the project: \" + ex.getMessage());\n }\n }",
"public static <T> LockFreeStack<T> createLockFreeStack() {\n \t\treturn new LockFreeStack<T>();\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 }",
"private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}",
"public TaskStack createTaskStack(WindowManagerService service, int stackId, ActivityStack stack) {\n return new TaskStack(service, stackId, stack);\n }",
"public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }",
"public void addFromProject() {\n btAddFromProject().push();\n }",
"@PostMapping(\"/projects\")\n @Timed\n public ResponseEntity<ProjectDTO> createProject(@Valid @RequestBody ProjectDTO projectDto)\n throws URISyntaxException, NotAuthorizedException {\n log.debug(\"REST request to save Project : {}\", projectDto);\n var org = projectDto.getOrganization();\n if (org == null || org.getName() == null) {\n throw new BadRequestException(\"Organization must be provided\",\n ENTITY_NAME, ERR_VALIDATION);\n }\n checkPermissionOnOrganization(token, PROJECT_CREATE, org.getName());\n\n if (projectDto.getId() != null) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"idexists\", \"A new project cannot already have an ID\"))\n .body(null);\n }\n if (projectRepository.findOneWithEagerRelationshipsByName(projectDto.getProjectName())\n .isPresent()) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"nameexists\", \"A project with this name already exists\"))\n .body(null);\n }\n ProjectDTO result = projectService.save(projectDto);\n return ResponseEntity.created(ResourceUriService.getUri(result))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getProjectName()))\n .body(result);\n }",
"void setProject(InternalActionContext ac, HibProject project);",
"private void createWorkSpace() {\n\t\tif(promptForWorkSpaceName() != null){\n\t\t\tmyWorkSpaceListener.createWorkSpace(promptForWorkSpaceName());\n\t\t}\n\t}",
"@Test\n public void testCreateDraftWithParent()\n {\n if (projects.size() > 0)\n {\n Project project = projects.get(0);\n Assert.assertNotNull(project);\n\n Set<Resource> all = resourcesManager.getDraftResources(project\n .getId());\n Assert.assertNotNull(all);\n\n if (all.isEmpty())\n {\n resourcesManager.createResource(project.getId(), -1,\n builder.buildResource(ResourceKind.FOLDER));\n all = resourcesManager.getResources(project.getId());\n }\n\n Resource parent = all.iterator().next();\n Assert.assertNotNull(parent);\n\n if (parent.getKind().equals(ResourceKind.FOLDER))\n {\n Set<Resource> childs = parent.getChilds();\n Assert.assertNotNull(childs);\n\n Resource newResource = builder.buildResource(ResourceKind.FILE);\n Assert.assertNotNull(newResource);\n\n Resource created = resourcesManager.createResource(\n project.getId(), parent.getId(), newResource);\n\n Assert.assertNotNull(created);\n Assert.assertNotNull(created.getId());\n Assert.assertNotNull(created.getUrl());\n\n Set<Resource> allNow = resourcesManager\n .getDraftResources(project.getId());\n\n Assert.assertNotNull(allNow);\n Assert.assertEquals(all.size(), allNow.size());\n\n parent = created.getParent();\n Assert.assertNotNull(parent);\n\n Assert.assertEquals(childs.size() + 1, parent.getChilds()\n .size());\n\n log.info(\"Check subversion url :\" + created.getUrl());\n }\n }\n else\n {\n fail(\"There is not projects.\");\n }\n\n }",
"@ApiMethod(\n \t\tname = \"createProject\", \n \t\tpath = \"createProject\", \n \t\thttpMethod = HttpMethod.POST)\n public Project createProject(final ProjectForm projectForm) {\n\n final Key<Project> projectKey = factory().allocateId(Project.class);\n final long projectId = projectKey.getId();\n final Queue queue = QueueFactory.getDefaultQueue();\n \n // Start transactions\n Project project = ofy().transact(new Work<Project>(){\n \t@Override\n \tpublic Project run(){\n \t\tProject project = new Project(projectId, projectForm);\n ofy().save().entities(project).now();\n \n return project;\n \t}\n }); \n return project;\n }",
"public int DSAddProject(String ProjectName, String ProjectLocation);",
"Strobo createStrobo();",
"public static void create(int steps) {\n\t\tlocalPlaces = 40;\n\t\toutPlaces = 3;\n\n\t\t// Initial marking: \n\t\tinitPlaces = new int[] {0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0};\n\t\ttileInitPlaces = 20;\n\n\t\t// Output mapping:\n\t\tint offs = 0;\n\t\ttOutMap = new OutMap[outPlaces];\n\t\ttOutMap[offs++] = new OutMap(-1, 37);\n\t\ttOutMap[offs++] = new OutMap(-1, 35);\n\t\ttOutMap[offs++] = new OutMap(1, 0);\n\n\t\t// Transitions:\n\t\toffs = 0;\n\t\ttransitions = 24; // (12 aligned to 4) x 2 steps\n\t\ttmap = new Transition[transitions];\n\n\t\t// {0xoi, inp-s, outp-s}\n\t\ttmap[offs++] = new Transition(0x22, 4, 1, 41 /* out */ , 40 /* out */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 4, 12, 9, 5); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 0, 1, 4); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 10, 11, 3); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 7, 10, 2, 8); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 9, 6, 8, 7); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 2, 4, 12); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 13, 20 /* next */ , 18, 14); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 11, 3, 5, 6); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 11, 16, 17, 19); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 18, 16, 11); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 14, 19, 15, 13); // 11: cw_start_eating\n\n\t\ttmap[offs++] = new Transition(0x22, 24, 21, 15 /* prev */ , 17 /* prev */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 24, 32, 29, 25); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 20, 21, 24); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 30, 31, 23); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 27, 30, 22, 28); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 29, 26, 28, 27); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 22, 24, 32); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 33, 42 /* out */ , 38, 34); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 31, 23, 25, 26); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 31, 36, 37, 39); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 38, 36, 31); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 34, 39, 35, 33); // 11: cw_start_eating\n\n\t\tif(PPNDevice.logMessages)\n\t\t\tSystem.out.printf(\"localPlaces: %d\\ntransitions: %d\\n\", localPlaces, transitions);\n\t}",
"private void saveProject()\n\t{\n\t\t\n\t\tint fileChooserReturnValue =\n\t\t\twindowTemplate\n\t\t\t\t.getFileChooser()\n\t\t\t\t.showSaveDialog(windowTemplate);\n\t\t\n\t\tif(fileChooserReturnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\t\n\t\t\t// Get the file that the user selected\n\t\t\tFile file = windowTemplate.getFileChooser().getSelectedFile();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t// Open the output streams\n\t\t\t\tFileOutputStream fileOutput = new FileOutputStream(file.getAbsolutePath());\n\t\t\t\tObjectOutputStream objectOutput = new ObjectOutputStream(fileOutput);\n\t\t\t\n\t\t\t\t// Write the objects\n\t\t\t\tfor(int i = 0; i < cards.size(); i++) {\n\t\t\t\t\tobjectOutput.writeObject(cards.get(i));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Close the output streams\n\t\t\t\tobjectOutput.close();\n\t\t\t\tfileOutput.close();\n\t\t\t\t\n\t\t\t\t// Update the title of the frame to reflect the file name\n\t\t\t\twindowTemplate.setTitle(file.getName());\n\t\t\t\t\n\t\t\t} catch (IOException e1) {\n\t\t\t\tJOptionPane.showMessageDialog(windowTemplate, \"Could not save the file.\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public static void init() throws IOException {\n\t\tGitlet myGit = new Gitlet();\n\t\tFile gitletFolder = new File(\".gitlet\");\n\t\tgitletFolder.mkdir();\n\t\tFile initialCommit = new File(\".gitlet/0\");\n\t\tinitialCommit.mkdir();\n\t\t// create a gitlet folder and an initial commit folder\n\t\tVersion initCommit = new Version(0, \"initial commit\", null, true,\n\t\t\t\t\"master\");\n\t\t// create Version object\n\t\tmyGit.myHead = initCommit;\n\t\tmyGit.currentBranch = \"master\";\n\t\tmyGit.myBranch.put(\"master\", initCommit);\n\t\tmyGit.myCommit.put(0, initCommit);\n\t\t// bind variables\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(0);\n\t\tmyGit.messageMap.put(\"initial commit\", a);\n\n\t\tFile stage = new File(\".gitlet/stage\");\n\t\tstage.mkdir();\n\t\tmyGit.stagePath = stage.getCanonicalPath();// create it and bind its\n\t\t\t\t\t\t\t\t\t\t\t\t\t// path to stagePath\n\t\tmyGit.Serialization();\n\n\t}",
"public static void createTempMapsetName() {\r\n UUID id;\r\n String tmpPrefix;\r\n String tmpSuffix;\r\n String tmpBase;\r\n String tmpFolder;\r\n\r\n id = UUID.randomUUID();\r\n tmpPrefix = new String(GrassUtils.TEMP_PREFIX);\r\n tmpSuffix = new String(\"_\" + id);\r\n tmpBase = new String(System.getProperty(\"java.io.tmpdir\"));\r\n if (tmpBase.endsWith(File.separator)) {\r\n tmpFolder = new String(tmpBase + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n else {\r\n tmpFolder = new String(tmpBase + File.separator + tmpPrefix + tmpSuffix.replace('-', '_') + File.separator + \"user\");\r\n }\r\n m_sGrassTempMapsetFolder = tmpFolder;\r\n\r\n }",
"Swarm createSwarm();",
"private void createConfigFile() {\n\t\tFile configFile = new File(projectRoot, SC_CONFIG_FILENAME);\n\t\tif (configFile.exists())\n\t\t\treturn;\n\n\t\tServiceCutterConfig config = createInitialServiceCutterConfig();\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(configFile);\n\t\t\twriter.write(new Yaml().dumpAs(config, Tag.MAP, FlowStyle.BLOCK));\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ContextMapperApplicationException(\"Could not create '.servicecutter.yml' file!\", e);\n\t\t}\n\t}",
"@Test\n public void putTemplateProgrammerProjectTest() throws ApiException {\n ProjectDTO request = null;\n TaskIdResult response = api.putTemplateProgrammerProject(request);\n\n // TODO: test validations\n }",
"@Test\n \tpublic void testCreateMindProject() throws Exception {\n \t\tString name = \"Test\" ; //call a generator which compute a new name\n \t\tGTMenu.clickItem(\"File\", \"New\", FRACTAL_MIND_PROJECT);\n \t\tGTShell shell = new GTShell(Messages.MindProjectWizard_window_title);\n \t\t//shell.findTree().selectNode(\"Mind\",FRACTAL_MIND_PROJECT);\n \t\t//shell.findButton(\"Next >\").click();\n \t\tshell.findTextWithLabel(\"Project name:\").typeText(name);\n \t\tshell.close();\n \t\t\n \t\tTestMindProject.assertMindProject(name);\t\t\n \t}",
"public interface ProjectService {\n\n void clone(String projectName);\n\n void switchBranch(String projectName,String branchName);\n\n void createNewBranch(String projectName,String oldBranchName,String newBranchName);\n\n String getAddressByProject(String projectName);\n\n File getLocalFileByProject(String projectName);\n\n}",
"public void addForkedProject( MavenProject project )\n {\n forkedProjectStack.push( currentProject );\n currentProject = project;\n }",
"Fog_Services createFog_Services();",
"void createRepository(String projectKey, String repoName, String parentProjectKey) throws VersionControlException;",
"SUT createSUT();",
"public Saver(String project) {\n\t\tthis.project = project;\n\t}",
"public void createBase(SpanningTree sptree_base) {\n int initLevel = 0;\n SpanningForests sp = new SpanningForests(initLevel);\n sp.trees.add(sptree_base);\n dforests.put(initLevel, sp);\n }",
"private ITaskCluster createTaskCluster(ITaskObject... taskObjects) {\n ITaskCluster taskCluster = getTaskManagerConfiguration().getTaskFactory().newTaskCluster();\n taskCluster = getTaskManagerConfiguration().getTaskManagerWriter().saveNewTaskCluster(taskCluster);\n\n return createTaskGraphForTaskCluster(taskCluster, taskObjects);\n }",
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"@PostMapping(value = \"/project\", consumes = \"application/json\", produces = \"application/json\")\n public ResponseEntity<?> addNewProject(@Valid @RequestBody Project newProject) throws URISyntaxException\n {\n newProject.setProjectid(0);\n newProject = projectService.save(newProject);\n\n // set the location header for the newly created resource\n HttpHeaders responseHeaders = new HttpHeaders();\n URI newProjectURI = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{projectid}\")\n .buildAndExpand(newProject.getProjectid())\n .toUri();\n responseHeaders.setLocation(newProjectURI);\n\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);\n }",
"DeployShard() {\n }"
] | [
"0.5901862",
"0.54751873",
"0.54387623",
"0.5410736",
"0.5410736",
"0.5410736",
"0.5318947",
"0.5076852",
"0.5012295",
"0.49762273",
"0.4960528",
"0.49371675",
"0.4929404",
"0.48686084",
"0.4832675",
"0.48008367",
"0.47912735",
"0.4789842",
"0.47606206",
"0.47409523",
"0.47196048",
"0.46965897",
"0.4653405",
"0.46396947",
"0.46382627",
"0.46362507",
"0.46157673",
"0.45855808",
"0.45848122",
"0.45786145",
"0.4577925",
"0.45699978",
"0.45606887",
"0.4555251",
"0.4550936",
"0.4545011",
"0.45323953",
"0.45181125",
"0.45087463",
"0.4504683",
"0.44966426",
"0.4495105",
"0.44911262",
"0.4488671",
"0.44847956",
"0.446653",
"0.4464438",
"0.44605735",
"0.4459031",
"0.4456916",
"0.44363084",
"0.44360054",
"0.44338095",
"0.4427851",
"0.4427851",
"0.44269413",
"0.44221812",
"0.44112343",
"0.44093198",
"0.44081753",
"0.4401061",
"0.43990597",
"0.43925372",
"0.4381381",
"0.43762997",
"0.4370277",
"0.43679684",
"0.43671614",
"0.436166",
"0.43443418",
"0.43362635",
"0.43326",
"0.43310893",
"0.43299213",
"0.43298852",
"0.43261442",
"0.43226397",
"0.43188322",
"0.4315572",
"0.43109104",
"0.43079567",
"0.43076938",
"0.4301545",
"0.43015236",
"0.43008336",
"0.42990947",
"0.4298957",
"0.42975175",
"0.4296633",
"0.4292758",
"0.42910546",
"0.42811555",
"0.42785078",
"0.42717212",
"0.42714155",
"0.42593518",
"0.425335",
"0.4252287",
"0.42441133",
"0.42387596"
] | 0.77037156 | 0 |
Gets list of stashes for projects | List<Stash> getStashList(List<Project> projects); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);",
"void applyStashes(Stash stash, ProgressListener progressListener);",
"public List<Sprint> getAllSprintDetails() {\n\t\tList<Sprint> sprints = (List<Sprint>) sprintRepository.findAll();\n\t\tif(sprints.isEmpty()){\n\t\t\tthrow new NotFoundException(Constant.NO_SPRINT);\n\t\t}else{\n\t\t\treturn sprints;\n\t\t}\n\t}",
"@Override\r\n\tpublic List<SprintTo> getSprintWithNoChildrenForProject(String projectId) {\n\t\treturn sprintDao.getSprintWithNoChildrenForProject(projectId);\r\n\t}",
"Map<Project, Boolean> stashDrop(Stash stash);",
"List<Work> getAllWorks();",
"@GetMapping(\"/stocksList\")\r\n\tpublic List<StockState> getMarketStocksList() {\t\r\n\t\treturn stockPortfolioService.getMarketStocksList();\r\n\t}",
"@RequestMapping(value = \"/project-hours\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<ProjectHour> getAllProjectHours() {\n log.debug(\"REST request to get all ProjectHours\");\n return projectHourService.findAll();\n }",
"@Override\r\n\tpublic List<SprintTo> getSprintsForProjectByStatus(String projectId,\r\n\t\t\tint status) {\n\t\treturn null;\r\n\t}",
"public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n return stocks_.get(index);\n }",
"public List<Project> getAllProjects();",
"public List<Statut> getListStatuts() {\n\t\t\treturn super.findWithNamedQuery(\"findAllStauts\");\n\t\t}",
"List<CacheHealth> getCacheHealth();",
"List<Project> getProjectsWithChanges(List<Project> projects);",
"@GetMapping(\"/stagiaires\")\n @Timed\n public List<StagiaireDTO> getAllStagiaires() {\n log.debug(\"REST request to get all Stagiaires\");\n return stagiaireService.findAll();\n }",
"@RequestMapping(value = \"/projectreleasesprints\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<Projectreleasesprint> getAllProjectreleasesprints() {\n log.debug(\"REST request to get all Projectreleasesprints\");\n List<Projectreleasesprint> projectreleasesprints = projectreleasesprintRepository.findAll();\n return projectreleasesprints;\n }",
"public double[] getStresses() {\n\t\treturn stresses_;\n\t}",
"public HashMap<String, JSONObject> getListProgramsAt(Long timestamp);",
"private List<ProjectModel> generateSummaryList() {\n return new LinkedList<>(projects.values());\n }",
"@Override\r\n\tpublic Collection<Sticker> list(Sticker sticker) {\n\t\treturn sst.selectList(\"stickerns.list\",sticker);\r\n\t}",
"public List<Statut> getListStatut() {\n\t\treturn super.findWithNamedQuery(\"findAllStaut\");\n\t\n\t\t }",
"public List<TaskMaster> retrieveAllTaskOfProject(Long projectId);",
"public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n return stocks_;\n }",
"List<StandardsEntity> STANDARDS_ENTITY_LIST() throws Exception;",
"@Override\r\n\tpublic List<BackStone> findAllBackStone() {\n\t\tLOGGER.info(\"查找所有的退石记录:>>\" );\r\n\t\treturn backStoneDao.findAllBackStone();\r\n\t}",
"public com.sbytestream.samples.grpc.stockservice.Stock getStocks(int index) {\n if (stocksBuilder_ == null) {\n return stocks_.get(index);\n } else {\n return stocksBuilder_.getMessage(index);\n }\n }",
"public abstract List<ProjectBean> getProjectList();",
"List<WorkingSchedule> getAll();",
"@VisibleForTesting\n public WindowList<TaskStack> getStacks() {\n return this.mTaskStackContainers.mChildren;\n }",
"public GMap<Integer, Stack> getStacks();",
"public List<Stadium> findAllStadiums(){\n\t\treturn stadiumRepository.findAll();\n\t}",
"List<Stock> retrieveAllStocks(String symbol);",
"public <T extends Host> List<T> getHostList(){\r\n\t\tMap<Integer,T> hosts = new HashMap<Integer,T>();\r\n\t\t\r\n\t\tfor(StorageDatacenter datacenter:this.getDatacenterList()){\r\n\t\t\tfor(T host:datacenter.<T>getHostList()){\r\n\t\t\t\thosts.put(host.getId(),host);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn new ArrayList<T>(hosts.values());\r\n\t}",
"@GetMapping(\"/getAll\")\r\n\tpublic List<Project> getAllProjects() {\r\n\t\treturn persistenceService.getAllProjects();\r\n\t}",
"@GetMapping(\"/{projectId}/students\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic @ResponseBody List<User> getAllStudentsOnProject(@PathVariable(\"projectId\") int projectId) {\n\t\treturn userService.findAllByProject(projectService.findByProjectId(projectId));\n\t}",
"public List<String[]> getAllProject() {\n String url = Host.getSonar() + \"api/projects/index\";\n String json = null;\n try {\n Object[] response = HttpUtils.sendGet(url, Authentication.getBasicAuth(\"sonar\"));\n if (Integer.parseInt(response[0].toString()) == 200) {\n json = response[1].toString();\n }\n } catch (Exception e) {\n logger.error(\"Get sonar project list: GET request error.\", e);\n }\n if (json == null) {\n logger.warn(\"Get sonar project list: response empty.\");\n return null;\n }\n List<Map<String, Object>> projects = JSONArray.fromObject(json);\n if (projects.size() == 0) {\n logger.warn(\"Get sonar project list: empty list.\");\n return null;\n }\n List<String[]> result = new ArrayList<>();\n for (Map<String, Object> oneProject : projects) {\n result.add(new String[]{oneProject.get(\"nm\").toString(), oneProject.get(\"k\").toString()});\n }\n return result;\n }",
"Set<ComputerSnapshot> getSnapshots();",
"@RequestMapping(value = \"/gradeSystems\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<GradeSystem> getAllGradeSystems() {\n log.debug(\"REST request to get all GradeSystems\");\n return gradeSystemRepository.findAll();\n }",
"public List<Stock> getAllStocks() {\n\n this.open();\n\n Cursor cursor = database.query(SQLiteHelper.TABLE_STOCK, allColumns, null, null, null, null, null);\n List<Stock> allStocks = new ArrayList<>();\n\n cursor.moveToLast();\n while (!cursor.isBeforeFirst()){\n allStocks.add(cursorToStock(cursor));\n cursor.moveToPrevious();\n }\n\n cursor.close();\n this.close();\n return allStocks;\n }",
"public List<Project> getAllProject(boolean isDeleted) throws EmployeeManagementException;",
"@Override\n public Set<Shelf> getShelves() {\n return new HashSet<>(shelves);\n }",
"String getAllPortfolio();",
"Collection<GameEnvironment> getPendingGames();",
"public java.util.List<com.sbytestream.samples.grpc.stockservice.Stock> getStocksList() {\n if (stocksBuilder_ == null) {\n return java.util.Collections.unmodifiableList(stocks_);\n } else {\n return stocksBuilder_.getMessageList();\n }\n }",
"public List getAllStu();",
"public static List<Stopwatch> getStopwatches() {\n synchronized (lock) {\n final List<Stopwatch> stopwatchList = new ArrayList<Stopwatch>(stopwatchMap.values());\n return stopwatchList;\n }\n }",
"public HashMap<String, ArrayList<String>> getStations() \n\t{\n\t\t//return stations hashMap\n\t\treturn stations;\n\t}",
"public List<DevStudio> findAll() {\n return getDevStudioRepository().findAll();\n }",
"@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }",
"@Override\n public KeySpace getKeyspaces(int index) {\n return keyspaces_.get(index);\n }",
"public Streak[] findStreaks() {\n List<Streak> streaks = new LinkedList<>();\n Streak s;\n Piece[][] arrs = new Piece[4][4];\n Piece[][] diagArr = new Piece[2][4];\n int f;\n for (int row = 0; row < 4; row++) {\n f = 4 * row;\n s = Streak.gotStreak(Arrays.copyOfRange(board, f, f + 4), Streak.Orientation.HORIZONTAL, row);\n if (s != null) {\n streaks.add(s);\n }\n arrs[0][row] = board[f];\n arrs[1][row] = board[f + 1];\n arrs[2][row] = board[f + 2];\n arrs[3][row] = board[f + 3];\n\n diagArr[0][row] = board[f + row];\n diagArr[1][row] = board[4 * (3 - row) + row];\n }\n for (int col = 0; col < 4; col++) {\n s = Streak.gotStreak(arrs[col], Streak.Orientation.VERTICAL, col);\n if (s != null) {\n streaks.add(s);\n }\n }\n for (int diag = 0; diag < 2; diag++) {\n s = Streak.gotStreak(diagArr[diag], Streak.Orientation.DIAGONAL, diag);\n if (s != null) {\n streaks.add(s);\n }\n }\n Streak[] st = new Streak[streaks.size()];\n return streaks.toArray(st);\n }",
"public Map<Integer, FlatShelf> getShelfs() {\n\treturn flatShelfs;\n }",
"public List<TaskMaster> retrieveTaskByProjectId(Long projectId);",
"public SoftHashMap<Integer,TimeEntry> getTimeEntries(SpentOn spentOn)\n throws RedmineException\n {\n return getTimeEntries(ID_ANY,ID_ANY,ownUserId,spentOn);\n }",
"public List<MyStockHist> getMystockHistAlltList(MyStockHist myStockHist) ;",
"@GetMapping(\"/get_stonk_list\")\n @ResponseBody\n public String getStonkList(){\n ArrayList<Stonk> stonks = new ArrayList<>(stonkMarket.getAliveStonks());\n String toReturn = \"{\\\"list\\\":[\";\n for(Stonk s : stonks){\n toReturn += \"{\\\"name\\\":\\\"\"+s.getName()+\"\\\",\\\"price\\\":\"+s.getValue()+\"},\";\n //toReturn += s.getName() + \",\" + Float.toString(s.getValue()) + \"#\";\n }\n toReturn = toReturn.substring(0, toReturn.length() - 1);\n toReturn += \"]}\";\n //Get rid of that last '#'\n toReturn.stripTrailing();\n return toReturn;\n }",
"public NSArray hoursWorked() {\n\t\tNSArray hoursWorked;\n\t\tNSDictionary resolutionBindings = new NSDictionary(new Object[] {bugId()}, new Object[] { \"bugId\",});\n\n\t\tEOFetchSpecification fs = EOFetchSpecification.fetchSpecificationNamed( \"hoursWorked\", \"BugsActivity\").fetchSpecificationWithQualifierBindings( resolutionBindings );\n\t\tfs.setRefreshesRefetchedObjects(true);\n\t\thoursWorked = (NSArray)editingContext().objectsWithFetchSpecification(fs);\n\t\t//System.out.println(\"\\tItem.hoursWorked() count - \" + hoursWorked.count());\n\n\t\treturn hoursWorked;\n\n }",
"Collection<S> getStories ();",
"@RequestMapping(value = \"/game/byStudio/{studio}\", method = RequestMethod.GET)\n @ResponseStatus(value = HttpStatus.OK)\n public List<Game> getGameByStudio(@PathVariable String studio) {\n return serviceLayer.getGameByStudio(studio);\n }",
"@Override\n\tpublic List<boardLIstDTO> serachListHashList(String hash_tag) throws Exception {\n\t\treturn sqlSession.selectList(namespace + \".share_Log_search_List\", hash_tag);\n\t}",
"@Override\r\n\tpublic List prodStockseach() {\n\t\treturn adminDAO.seachProdStock();\r\n\t}",
"public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);",
"@GetMapping(value = \"/projects\", produces = \"application/json\")\n public ResponseEntity<?> listAllProjects()\n {\n List<Project> projectList = projectService.findAllProjects();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"List<CacheHealth> getCacheHealth(Set<String> cacheNames);",
"ArrayList<String> getWorkspaceNames() {\n ArrayList<String> result = new ArrayList<String>();\n for (WorkspaceInfo ws : getCatalog().getWorkspaces()) {\n result.add(ws.getName());\n }\n Collections.sort(result);\n result.add(0, \"*\");\n return result;\n }",
"public abstract Map<Integer, Station> getStations(boolean includeSilent);",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @RolesAllowed({\"admin\", \"simple\"})\n public List<Task> listAll(@Context UriInfo uriInfo) {\n Long projectId = (uriInfo.getPathSegments().size() != 1?\n Long.valueOf(uriInfo.getPathSegments().get(1).getPath())\n :null);\n\n List<Task> results;\n\n if (projectId != null) {\n results = em.createQuery(\"SELECT t FROM Task t INNER JOIN t.project p WHERE p.id = :projId\", Task.class)\n .setParameter(\"projId\", projectId)\n .getResultList();\n } else {\n results = em.createQuery(\"SELECT t FROM Task t\", Task.class).getResultList();\n }\n\n return results;\n }",
"public WorkspaceCache getWorkspace();",
"@Override\r\n\tpublic List<BackStone> findBackStoneByStoneNo(String stoneNo) {\n\t\tLOGGER.info(\"根据石编查找所有的退石记录:>>\"+ stoneNo);\r\n\t\treturn backStoneDao.findBackStoneByStoneNo(stoneNo);\r\n\t}",
"public HashMap<String, JSONObject> getListPrograms();",
"@Override\n\tpublic List<JSONObject> studsWaiting(Map<String, Object> param) {\n\t\tString name = param.containsKey(\"name\") && param.get(\"name\") != null\n\t\t\t\t&& !param.get(\"name\").toString().isEmpty() ? param.get(\"name\")\n\t\t\t\t.toString() : \"\";\n\t\tExamManagement em = examManagementDao.getExamManagementListById(param,\n\t\t\t\tparam.get(\"termInfo\").toString());\n\t\tif (em == null) {\n\t\t\tthrow new CommonRunException(0, \"没有查询到相应的考试信息,请刷新页面!\");\n\t\t}\n\t\tInteger autoIncr = em.getAutoIncr();\n\t\tparam.put(\"autoIncr\", autoIncr);\n\t\tList<ExamPlan> eplist = examManagementDao.getExamPlanList(param, param\n\t\t\t\t.get(\"termInfo\").toString(), autoIncr);\n\t\tList<String> gralist = new ArrayList<String>();\n\t\tfor (ExamPlan ep : eplist) {\n\t\t\tgralist.add(ep.getUsedGrade());\n\t\t}\n\n\t\tHashMap<String, Account> stumap = new HashMap<String, Account>();\n\n\t\tif (!name.isEmpty()) {\n\t\t\tHashMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"schoolId\", param.get(\"schoolId\"));\n\t\t\tmap.put(\"termInfoId\", param.get(\"termInfo\"));\n\t\t\tmap.put(\"usedGradeId\", StringUtils.join(gralist, \",\"));\n\t\t\tList<Account> allStu = commonDataService.getStudentList(map);\n\n\t\t\tfor (Account a : allStu) {\n\t\t\t\tstumap.put(a.getId() + \"\", a);\n\t\t\t}\n\t\t\tIterator<Entry<String, Account>> it1 = stumap.entrySet().iterator();\n\t\t\tList<String> accountId = new ArrayList<String>();\n\t\t\twhile (it1.hasNext()) {\n\n\t\t\t\tEntry<String, Account> entry = it1.next();\n\n\t\t\t\tAccount ac = entry.getValue();\n\n\t\t\t\tif (ac.getName().contains(name)) {\n\t\t\t\t\taccountId.add(ac.getId() + \"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparam.put(\"accountId\", accountId.isEmpty() ? null : accountId);\n\t\t}\n\t\tList<JSONObject> stulist = examManagementSetDao.studsWaiting(param);\n\n\t\tif (name.isEmpty()) {\n\t\t\tList<Long> accountIds = new ArrayList<Long>();\n\t\t\tfor (JSONObject json : stulist) {\n\t\t\t\taccountIds.add(json.getLongValue(\"accountId\"));\n\t\t\t}\n\t\t\tList<Account> allStu = commonDataService.getAccountBatch(\n\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()), accountIds,\n\t\t\t\t\tparam.get(\"termInfo\").toString());\n\n\t\t\tfor (Account a : allStu) {\n\t\t\t\tstumap.put(a.getId() + \"\", a);\n\t\t\t}\n\t\t}\n\t\tString scheduleId = eplist.get(0).getScheduleId();\n\t\tString usedGrade = eplist.get(0).getUsedGrade();\n\t\tList<Long> ids = new ArrayList<Long>();\n\n\t\tif (scheduleId.isEmpty()) {\n\t\t\tfor (JSONObject es : stulist) {\n\t\t\t\tif (stumap.containsKey(es.getString(\"accountId\"))) {\n\t\t\t\t\tes.put(\"studName\", stumap.get(es.getString(\"accountId\"))\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t}\n\t\t\t\tids.add(Long.valueOf(es.getString(\"tClassId\")));\n\t\t\t}\n\t\t\tList<Classroom> classrooms = commonDataService.getClassroomBatch(\n\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()), ids, param\n\t\t\t\t\t\t\t.get(\"termInfo\").toString());\n\t\t\tMap<String, Classroom> classmap = new HashMap<String, Classroom>();\n\t\t\tfor (Classroom c : classrooms) {\n\t\t\t\tclassmap.put(c.getId() + \"\", c);\n\t\t\t}\n\t\t\tfor (JSONObject se : stulist) {\n\t\t\t\tif (classmap.containsKey(se.getString(\"tClassId\"))) {\n\t\t\t\t\tse.put(\"tClassName\", classmap.get(se.getString(\"tClassId\"))\n\t\t\t\t\t\t\t.getClassName());\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tList<TSchTClassInfoExternal> tClassInfoList = scheduleExternalService\n\t\t\t\t\t.getTClassInfoExternalNoAccount(scheduleId,\n\t\t\t\t\t\t\tLong.valueOf(param.get(\"schoolId\").toString()),\n\t\t\t\t\t\t\tparam.get(\"termInfo\").toString(), usedGrade, null);\n\t\t\tMap<String, TSchTClassInfoExternal> classmap = new HashMap<String, TSchTClassInfoExternal>();\n\t\t\tif (CollectionUtils.isNotEmpty(tClassInfoList)) {\n\t\t\t\tfor (TSchTClassInfoExternal classInfo : tClassInfoList) {\n\t\t\t\t\tclassmap.put(classInfo.getTclassId(), classInfo);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (JSONObject se : stulist) {\n\t\t\t\tif (stumap.containsKey(se.getString(\"accountId\"))) {\n\t\t\t\t\tse.put(\"studName\", stumap.get(se.getString(\"accountId\"))\n\t\t\t\t\t\t\t.getName());\n\t\t\t\t}\n\t\t\t\tif (classmap.containsKey(se.getString(\"tClassId\"))) {\n\t\t\t\t\tse.put(\"tClassName\", classmap.get(se.getString(\"tClassId\"))\n\t\t\t\t\t\t\t.getTclassName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn stulist;\n\t}",
"private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }",
"@GetMapping(\"/homes\")\n @Timed\n public List<HomeDTO> getAllHomes() {\n log.debug(\"REST request to get all Homes\");\n return homeService.findAll();\n }",
"@Override\n\tpublic List<boardLIstDTO> serachList() throws Exception {\n\t\treturn sqlSession.selectList(namespace + \".share_Log_all_List\");\n\t}",
"@Override\n\tpublic List<Stock_out> getStock_outs() {\n\t\tList<Stock_out> list = stock_outDao.selectAllStock_out();\n\t\treturn list;\n\t}",
"public ArrayList<String> getAllWorkoutItems() {\n\n ArrayList<String> items = new ArrayList<>();\n Cursor cursor = db.query(DATABASE_TABLE_WORKOUTS, new String[] {\n KEY_ID, KEY_WORKOUT}, null, null, null, null, null);\n\n if (cursor.moveToFirst()) {\n do {\n String workout = cursor.getString(COLUMN_WORKOUT_INDEX);\n\n items.add(workout);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n return items;\n }",
"public List<String> getDarkskyStations() {\n\t\treturn this.darkskyStations;\n\t}",
"Integer getProjectCount( String key ){\n return developer.projects.size();\n }",
"@Override\r\n\tpublic List<MySys> getAllSystems() {\n\t\tString sql = \"SELECT * FROM systems ORDER BY sgroup;\";\r\n\t\t\r\n\t\tList<MySys> list = new ArrayList<MySys>();\r\n\t\tList<Map<String,Object>> rows = this.jdbcTemplate.queryForList(sql);\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tMySys sys = new MySys();\r\n\t\t\tsys.setId((int)row.get(\"idsystems\"));\r\n\t\t\tsys.setName((String)row.get(\"sysname\"));\r\n\t\t\tsys.setAlias((String)row.get(\"sysalias\"));\r\n\t\t\tsys.setState((int)row.get(\"state\"));\r\n\t\t\tsys.setStatetime((Date)row.get(\"statetime\"));\r\n\t\t\tlist.add(sys);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"public ShelterList() {\n shelters = new HashMap<>();\n }",
"java.util.List<KeySpace>\n getKeyspacesList();",
"@GetMapping(value = \"/projectslist\", produces = \"application/json\")\n public ResponseEntity<?> findAllProjectsWithProblemName()\n {\n List<ProblemListGroupedByProject> projectList = projectService.findAllProjectsWithProblemName();\n\n return new ResponseEntity<>(projectList, HttpStatus.OK);\n }",
"@GetMapping(\"\")\n\t@CrossOrigin(origins = \"http://localhost:3000\")\n\tpublic List<Project> getProjects()\n\t{\n\t\treturn projectService.findAll();\n\t}",
"public Map<String, Stock> getStocks();",
"@Get\r\n\t@Options\r\n\tpublic String getSchoolsList(Representation entity) {\n\t\tif(this.getRequest().getMethod() == Method.OPTIONS)\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\treturn DBCommonOperations.getJsonSchools().toString();\r\n\t}",
"public void removeProjectEntries(String serviceName);",
"public List<String> getAllputs() {\n return this.allputs;\n }",
"public boolean needsStash() {\n return myNeedsStash;\n }",
"public ArrayList<Project> selectProject(String projectId) {\n\n try {\n ArrayList<Project> tasks = new ArrayList<Project>();\n\n String query = \"SELECT * FROM TASKS where PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(query);\n ps.setString(1, projectId);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n String hours = rs.getString(\"HOURS\");\n String hoursadded = rs.getString(\"HOURS_ADDED\");\n String description = rs.getString(\"DESCRIPTION\");\n Project p = new Project(description, hours, hoursadded,\n projectId);\n tasks.add(p);\n }\n rs.close();\n ps.close();\n return tasks;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"@RolesAllowed(\"user\")\n\t@GetMapping(\"/shortList/{wsid}\")\n\tpublic List<IIncidentModel> getSummeryAll(@PathVariable(\"wsid\") String workspaceId){\n\t\treturn service.getIncidentSummery(workspaceId);\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n public ResponseEntity<List<TranslationPackMetaInfo>> listStoredPacks() {\n\n var translationPacks = translationManagementService.retrieveAllTranslationPack()\n .stream()\n .map(translationPack -> conversionService.convert(translationPack, TranslationPackMetaInfo.class))\n .toList();\n\n return ResponseEntity\n .ok(translationPacks);\n }",
"public String GetGamesList()\n\t{\n\t\tString gameslist = \"\";\n\t\tfor (int i = 0; i < gametype.length; i++)\n\t\t{\n\t\t\tgameslist += \"Game Number \" + i + \"\\t\" + gametype[i].GetName() + \"\\n\";\n\t\t\tif (gametype[i].Game_Status())\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently a game in progress\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"No game is being played at the moment\\n\";\n\t\t\t}\n\n\t\t\tif (gametype[i].SizeofQueue() >= 2)\n\t\t\t{\n\t\t\t\tgameslist += \"Number of players in queue:\\t\" + gametype[i].SizeofQueue() + \"\\n\\n\";\n\t\t\t}\n\t\t\telse if (gametype[i].SizeofQueue() == 1)\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently one player waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgameslist += \"There is currently nobody waiting to play a game\\n\\n\";\n\t\t\t}\n\t\t}\n\t\treturn gameslist;\n\t}",
"@Override\n\t@Cacheable(value=\"searchCache\",key=\"#idProject\")\n\tpublic List<InsightDetailsDto> getInsightForProject(Integer idProject)\n\t\t\tthrows Exception {\n\t\t//InsightProject Entity Obtained from DB\n\t\tList<InsightProject> insightDetails = (List<InsightProject>) this.getHibernateTemplate().findByNamedQueryAndNamedParam(\"Project.getInsightForProject\", \"projectId\", idProject);\n\t\t\n\t\t//InsightList to be populated from InsightProject Entity\n\t\tList<InsightDetail> insightList = new ArrayList<InsightDetail>();\n\t\t\n\t\tfor(InsightProject insightProject : insightDetails){//Adding Insight to list from Persistence Object\n\t\t\tinsightList.add(insightProject.getInsightDetail());\n\t\t}\n\t\t\n\t\tList<InsightDetailsDto> insightDtoList = CommonUtils.copyProperties(insightList);\n\t\tthis.getHibernateTemplate().clear();//clearing session\n\t\t\n\t\treturn insightDtoList;\n\t}",
"@Override\n\tpublic List<TaskKeeper> getList() {\n\t\treturn (List<TaskKeeper>) taskKeeperRepositories.findAll();\n\t}",
"public java.util.List<org.landxml.schema.landXML11.WatershedsDocument.Watersheds> getWatershedsList()\r\n {\r\n final class WatershedsList extends java.util.AbstractList<org.landxml.schema.landXML11.WatershedsDocument.Watersheds>\r\n {\r\n public org.landxml.schema.landXML11.WatershedsDocument.Watersheds get(int i)\r\n { return SurfaceImpl.this.getWatershedsArray(i); }\r\n \r\n public org.landxml.schema.landXML11.WatershedsDocument.Watersheds set(int i, org.landxml.schema.landXML11.WatershedsDocument.Watersheds o)\r\n {\r\n org.landxml.schema.landXML11.WatershedsDocument.Watersheds old = SurfaceImpl.this.getWatershedsArray(i);\r\n SurfaceImpl.this.setWatershedsArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.WatershedsDocument.Watersheds o)\r\n { SurfaceImpl.this.insertNewWatersheds(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.WatershedsDocument.Watersheds remove(int i)\r\n {\r\n org.landxml.schema.landXML11.WatershedsDocument.Watersheds old = SurfaceImpl.this.getWatershedsArray(i);\r\n SurfaceImpl.this.removeWatersheds(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfWatershedsArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new WatershedsList();\r\n }\r\n }",
"public List<Build> getBuildsForProject(int projectId);",
"public List<ShelfItem> getAllShelf(String filter, String username, Integer from, Integer to);",
"void getAllProjectList(int id);",
"public List<Story> getStories()\r\n\t{\r\n\t\treturn fin;\r\n\t}",
"public List<ReplicaCatalogEntry> getSourceURLs(String site) {\n return (mSourceMap.containsKey(site)) ? mSourceMap.get(site) : new ArrayList();\n }"
] | [
"0.62344706",
"0.5484866",
"0.5400817",
"0.52502286",
"0.5152727",
"0.5123034",
"0.5088792",
"0.5077196",
"0.5039855",
"0.4969272",
"0.49262908",
"0.4914082",
"0.49016345",
"0.48865998",
"0.48557973",
"0.47994545",
"0.4789887",
"0.47713858",
"0.47628286",
"0.47369096",
"0.46946603",
"0.46882477",
"0.4683054",
"0.46704522",
"0.46505436",
"0.4626382",
"0.4624607",
"0.46231556",
"0.45986214",
"0.45815077",
"0.45758262",
"0.45676726",
"0.45656174",
"0.45580405",
"0.45465186",
"0.4544751",
"0.45445603",
"0.45404884",
"0.45331395",
"0.45309022",
"0.45275608",
"0.4524619",
"0.451384",
"0.4513205",
"0.45123774",
"0.45100233",
"0.45085624",
"0.45048487",
"0.45040557",
"0.45015293",
"0.449801",
"0.44895917",
"0.44835937",
"0.44780365",
"0.44760266",
"0.44751406",
"0.44724068",
"0.4468588",
"0.44674623",
"0.44519132",
"0.4450705",
"0.44491145",
"0.44447902",
"0.44437224",
"0.4442648",
"0.4438736",
"0.44263807",
"0.44233194",
"0.44225657",
"0.4416386",
"0.44161552",
"0.44139522",
"0.4404602",
"0.44022414",
"0.44017714",
"0.43991545",
"0.43933383",
"0.439239",
"0.43860245",
"0.43818492",
"0.43814525",
"0.43806994",
"0.43769115",
"0.43742472",
"0.43742096",
"0.4370381",
"0.4369739",
"0.4369562",
"0.43634394",
"0.4358641",
"0.43576932",
"0.4356478",
"0.43520936",
"0.43504828",
"0.4348934",
"0.43413168",
"0.4334992",
"0.4333887",
"0.43334877",
"0.4332478"
] | 0.7663325 | 0 |
Applies stash for the project | void applyStashes(Stash stash, ProgressListener progressListener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);",
"Map<Project, Boolean> stashDrop(Stash stash);",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"public void apply(Project project) {\n TaskContainer taskContainer = project.getTasks();\n\n TaskCacheTask taskCacheTask = taskContainer.create(\"cacheTaskList\", TaskCacheTask.class);\n taskContainer.getByName(\"assemble\").dependsOn(taskCacheTask);\n\n CommandlineFlagsTask flagsCacheTask = taskContainer.create(\"cacheCommandlineFlags\", CommandlineFlagsTask.class);\n taskContainer.getByName(\"assemble\").dependsOn(flagsCacheTask);\n\n taskContainer.create(\"installTabCompletion\", InstallerTask.class);\n\n //TODO: Add up-to-date checks for both\n }",
"@Override\n\tpublic void apply(Project project) {\n\t\tapplyToProject(project);\n\t}",
"@Override\n public void apply(Project project) {\n this.project = project;\n setupEnvironment();\n createTasks();\n setupInstallationTasks();\n }",
"static void stashSandbox(Path path, String mnemonic) {\n if (instance == null) {\n return;\n }\n instance.stashSandboxInternal(path, mnemonic);\n }",
"protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }",
"private void initialDeploy() {\n }",
"List<Stash> getStashList(List<Project> projects);",
"void scavenge();",
"public void store() {\n \n try {\n ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction<Object>() {\n public Object run() {\n \n resolveProjectDependencies();\n \n // Some properties need special handling e.g. if the\n // property changes the project.xml files\n for(final PropertyInfo pi:properties.values()) {\n pi.encode();\n }\n \n final ProjectConfiguration configs[] = configHelper.getConfigurations().toArray(new ProjectConfiguration[0]);\n final HashSet<ProjectConfiguration> newConfigs = new HashSet<ProjectConfiguration>(Arrays.asList(devConfigs));\n for (int i=0; i<configs.length; i++) {\n if (!newConfigs.remove(configs[i])) {\n configHelper.removeConfiguration(configs[i]);\n }\n }\n for (ProjectConfiguration cfg:newConfigs) {\n configHelper.addConfiguration(cfg.getDisplayName());\n }\n \n \n // Reread the properties. It may have changed when\n // e.g. when setting references to another projects\n EditableProperties sharedProps = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n EditableProperties privateProps = antProjectHelper.getProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH);\n\n // Set the changed properties\n for( final PropertyInfo pi:properties.values()) {\n final PropertyDescriptor pd = pi.getPropertyDescriptor();\n if (pd != null && pi.isModified()) {\n final String newValueEncoded = pi.getNewValueEncoded();\n if ( newValueEncoded != null ) {\n (pd.isShared() ? sharedProps : privateProps).setProperty( pd.getName(), newValueEncoded );\n } else {\n // remove property\n (pd.isShared() ? sharedProps : privateProps).remove(pd.getName());\n }\n }\n }\n \n // Store the property changes into the project\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, sharedProps);\n antProjectHelper.putProperties(AntProjectHelper.PRIVATE_PROPERTIES_PATH, privateProps);\n \n // Invoke this method to perform cyclic dependencies check and potentionally show warning dilalog\n CustomizerGeneral cg = new CustomizerGeneral();\n cg.initValues(J2MEProjectProperties.this, null);\n cg.getSortedSubprojectsList();\n \n //storing global default encoding by dcurrent project (see issue #97855)\n String enc = sharedProps.getProperty(DefaultPropertiesDescriptor.JAVAC_ENCODING);\n if (enc != null) FileEncodingQuery.setDefaultEncoding(Charset.forName(enc));\n \n // save the project under write lock\n try {\n ProjectManager.getDefault().saveProject(project);\n } catch (IOException ex) {\n ErrorManager.getDefault().notify(ex);\n }\n\n return null;\n }\n });\n } catch (MutexException e) {\n ErrorManager.getDefault().notify(e.getException());\n }\n \n }",
"private void archiveProject(final Project project) {\n\t\t// TODO RemoveWorkerFromProject löschen\n\t\tfinal ArrayList<Task> tasks = getProjectTasks(project);\n\t\tif (!tasks.isEmpty()) {\n\t\t\tfinal TaskController taskController = mainController.getTaskController();\n\t\t\ttaskController.removeWorker(tasks.get(0));\n\t\t\tfor (final Task task : tasks) {\n\t\t\t\tif (task.getCurrentWorker() != null) {\n\t\t\t\t\ttaskController.removeWorker(task);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinal ArrayList<Worker> team = project.getWorkers();\n\t\tif (!team.isEmpty()) {\n\t\t\tfinal TeamController teamController = mainController.getTeamController();\n\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\twhile (!team.isEmpty()) {\n\t\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\t}\n\t\t}\n\t\tproject.setActive(false);\n\t}",
"void writeStackToRecentsBlocking() {\n final ContentResolver resolver = getContentResolver();\n final ContentValues values = new ContentValues();\n\n final byte[] rawStack = DurableUtils.writeToArrayOrNull(mState.stack);\n\n // Remember location for next app launch\n final String packageName = getCallingPackageMaybeExtra();\n values.clear();\n values.put(ResumeColumns.STACK, rawStack);\n values.put(ResumeColumns.EXTERNAL, 0);\n resolver.insert(RecentsProvider.buildResume(packageName), values);\n }",
"@Override\n public void apply(Project project) {\n if (!project.getPlugins().hasPlugin(\"li-pegasus2\")) {\n project.getPlugins().apply(PegasusPlugin.class);\n }\n\n // Mimic the pegasus plugin behavior. It crawls through source sets.\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n\n javaPluginConvention.getSourceSets().all(sourceSet -> {\n setupTasks(project, sourceSet);\n });\n }",
"public void performApply(ILaunchConfigurationWorkingCopy configuration) {\n\r\n\t}",
"public void projectModified() { }",
"public void projectModified() { }",
"@Override\n\tpublic void applyObject(AppDeploymentRequest request, String appId) {\n\t\tif (client.builds().withLabels(labels).list().getItems().stream()\n\t\t\t\t.noneMatch(build -> {\n\t\t\t\t\tString phase = build.getStatus().getPhase();\n\t\t\t\t\treturn phase.equals(\"New\") || phase.equals(\"Pending\")\n\t\t\t\t\t\t\t|| phase.equals(\"Running\") || phase.equals(\"Failed\");\n\t\t\t\t})) {\n\t\t\t//@formatter:off\n client.deploymentConfigs()\n .withName(appId)\n .edit()\n .editMetadata()\n .addToAnnotations(SPRING_DEPLOYMENT_TIMESTAMP,\n\t\t\t\t\t\t\t\tString.valueOf(System.currentTimeMillis()))\n .endMetadata()\n .done();\n //@formatter:on\n\t\t}\n\t}",
"void syncFrom(final UserProjectCache cache);",
"public void sfDeploy() throws SmartFrogException, RemoteException {\n super.sfDeploy();\n sfLog().info(\"DEPLOYED \"+sfCompleteNameSafe().toString());\n }",
"public void gitThis(){\n\t}",
"public void apply(SoNode root) {\n\t\t\n//\t \t #ifdef DEBUG\n\t // Check for the common user error of applying an action to an\n\t // unreferenced root. This may save some grief.\n\t if (root.getRefCount() == 0)\n\t SoDebugError.postWarning(\"SoAction.apply\",\n\t \"Action applied to a node with a 0 \"+\n\t \"reference count. Did you forget to call \"+\n\t \"ref() on the node?\");\n//\t #endif /* DEBUG */\n//\t \n//\t // If we are already in the middle of being applied, save the\n//\t // current state of what we are applied to, so we can restore it\n//\t // afterwards. This happens, for example, when the\n//\t // SoGLRenderAction applies itself to traverse transparent paths\n//\t // after normal traversal.\n//\t boolean needToRestore = isBeingApplied;\n//\t final AppliedTo saveAppliedTo = new AppliedTo();\n//\t PathCode storedcurr = this.currentpathcode;\n//\t \n//\t if (isBeingApplied)\n//\t saveAppliedTo.copyFrom(appliedTo);\n//\t \n//\t isBeingApplied = true;\n//\t \n//\t appliedTo.code = AppliedCode.NODE;\n//\t appliedTo.node = node;\n//\t appliedTo.node.ref();\n//\t /*appliedTo.curPathCode*/currentpathcode = PathCode.NO_PATH;\n//\t \n//\t currentpath.setHead(node);\n//\t terminated = false;\n//\t \n//\t setUpState();\n//\t \n//\t beginTraversal(node);\n//\t endTraversal(node); // COIN3D\n//\t \n//\t cleanUp();\n//\t \n//\t // Restore to previous state if necessary\n//\t if (needToRestore)\n//\t appliedTo.copyFrom(saveAppliedTo);\n//\t \n//\t this.currentpathcode = storedcurr; // COIN3D\n//\t \n//\t isBeingApplied = needToRestore;\n\t \n\t SoDB.readlock();\n\t // need to store these in case action is re-applied\n\t AppliedCode storedcode = pimpl.appliedcode;\n\t SoActionP.AppliedData storeddata = new SoActionP.AppliedData();\n\t storeddata.copyFrom(pimpl.applieddata);\n\t PathCode storedcurr = this.currentpathcode;\n\n\t // This is a pretty good indicator on whether or not we remembered\n\t // to use the SO_ACTION_CONSTRUCTOR() macro in the constructor of\n\t // the SoAction subclass.\n\t assert(this.traversalMethods != null);\n\t this.traversalMethods.setUp();\n\n\t pimpl.terminated = false;\n\n\t this.currentpathcode = SoAction.PathCode.NO_PATH;\n\t pimpl.applieddata.node = root;\n\t pimpl.appliedcode = SoAction.AppliedCode.NODE;\n\n\t if (root != null) {\n\t //#if COIN_DEBUG\n\t if ((root.getRefCount() == 0) && first) {\n\n\t // This problem has turned out to be a FAQ, the reason probably\n\t // being that it \"works\" under SGI / TGS Inventor with no\n\t // warning that the client application code is actually buggy.\n\t //\n\t // We prefer to spit out a verbose warning to aid the\n\t // application programmer in finding the bug quickly instead of\n\t // her having to track down the bug due to some _really_ nasty\n\t // sideeffects later.\n\n\t SoDebugError.postWarning(\"SoAction::apply\",\n\n\t \"The root node that the \"+this.getTypeId().getName().getString()+\" was applied to \"+\n\t \"has a reference count equal to zero. \"+\n\n\t \"This is a bug in your application code which \"+\n\t \"you should rectify: you need to ref() (and \"+\n\t \"later unref()) the top-level root node to \"+\n\t \"make sure you avoid memory leaks (bad) and \"+\n\t \"/ or premature memory destruction (*really* \"+\n\t \"bad) under certain conditions. \"+\n\n\t \"Coin has an internal workaround to avoid \"+\n\t \"just responding with mysterious crashes, \"+\n\t \"but as it is not possible to cover _all_ \"+\n\t \"cases of what can go wrong with this \"+\n\t \"workaround you are *strongly* advised to \"+\n\t \"fix the bug in your application code.\"\n\n\t );\n\t first = false;\n\t }\n\t //#endif // COIN_DEBUG\n\t // So the graph is not deallocated during traversal.\n\t root.ref();\n\t this.currentpath.setHead(root);\n\n\t // make sure state is created before traversing\n\t this.getState();\n\n\t // send events to overlay graph first\n\t if (SoProfiler.isEnabled() &&\n\t SoProfiler.isOverlayActive() &&\n\t this.isOfType(SoHandleEventAction.getClassTypeId()))\n\t {\n\t // FIXME: also check that the scene graph view is actually enabled, or\n\t // else this is of no point - sending events to the overlay scene\n\t // graph.\n\n\t SoNode profileroverlay = SoActionP.getProfilerOverlay();\n\t if (profileroverlay != null) {\n\t SoProfiler.enable(false);\n\t this.beginTraversal(profileroverlay);\n\t this.endTraversal(profileroverlay);\n\t SoProfiler.enable(true);\n\t }\n\n\t // FIXME: if there was a hit on the overlay scene graph view and\n\t // the scene graph view is modified, then we should schedule a\n\t // redraw. However, the isHandled() flag isn't affected by that\n\t // change for now, so there's no way to detect it.\n\t //if (static_cast<SoHandleEventAction *>(this)->isHandled()) {\n\t // root->touch();\n\t //}\n\n\t }\n\n\t // start profiling\n\t if (SoProfiler.isEnabled() &&\n\t state.isElementEnabled(SoProfilerElement.getClassStackIndex(SoProfilerElement.class))) {\n\t SoProfilerElement elt = SoProfilerElement.get(state);\n\t assert(elt != null);\n\t SbProfilingData data = elt.getProfilingData();\n\t data.reset();\n\t data.setActionType(this.getTypeId());\n\t data.setActionStartTime(SbTime.getTimeOfDay());\n\t }\n\n\t this.beginTraversal(root);\n\t this.endTraversal(root);\n\n\t if (SoProfiler.isEnabled() &&\n\t state.isElementEnabled(SoProfilerElement.getClassStackIndex(SoProfilerElement.class))) {\n\t SoProfilerElement elt = SoProfilerElement.get(state);\n\t assert(elt != null);\n\t SbProfilingData data = elt.getProfilingData();\n\t data.setActionStopTime(SbTime.getTimeOfDay());\n\t }\n\n\t if (SoProfiler.isOverlayActive() &&\n\t !this.isOfType(SoGLRenderAction.getClassTypeId())) {\n\t // update profiler stats node with the profiling data from the traversal\n\t SoNode profilerstats = SoActionP.getProfilerStatsNode();\n\t SoProfiler.enable(false);\n\t this.traverse(profilerstats);\n\t SoProfiler.enable(true);\n\t }\n\n\t if (SoProfiler.isConsoleActive()) {\n\t SoType profileactiontype = SoProfilerP.getActionType();\n\t if (this.isOfType(SoProfilerP.getActionType())) {\n\t SoProfilerElement pelt = SoProfilerElement.get(state);\n\t if (pelt != null) {\n\t SbProfilingData pdata = pelt.getProfilingData();\n\t SoProfilerP.dumpToConsole(pdata);\n\t }\n\t }\n\t }\n\n\t pimpl.applieddata.node = null;\n\t root.unrefNoDelete();\n\t }\n\t pimpl.appliedcode = storedcode;\n\t pimpl.applieddata.copyFrom( storeddata);\n\t this.currentpathcode = storedcurr;\n\t SoDB.readunlock();\n\t \t}",
"public void setChipOnExistingProjectBurnSZTTwice(Subproject project) {\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT()*2);\n\t}",
"protected void loadAndSetProject() {\n final ApplicationMetadata meta = getSpeedmentApplicationMetadata();\n final Project project;\n \n if (meta != null) {\n project = DocumentTranscoder.load(meta.getMetadata());\n } else {\n final Map<String, Object> data = new ConcurrentHashMap<>();\n data.put(HasName.NAME, \"Project\");\n project = new ProjectImpl(data);\n }\n\n // Apply overidden item (if any) for all ConfigEntities of a given class\n withsAll.forEach(t2 -> {\n final Class<? extends Document> clazz = t2.get0();\n @SuppressWarnings(\"unchecked\")\n final Consumer<Document> consumer = (Consumer<Document>) t2.get1();\n DocumentDbUtil.traverseOver(project)\n .filter(clazz::isInstance)\n .map(Document.class::cast)\n .forEachOrdered(consumer::accept);\n });\n\n // Apply a named overidden item (if any) for all Entities of a given class\n withsNamed.forEach(t3 -> {\n final Class<? extends Document> clazz = t3.get0();\n final String name = t3.get1();\n\n @SuppressWarnings(\"unchecked\")\n final Consumer<Document> consumer = (Consumer<Document>) t3.get2();\n\n DocumentDbUtil.traverseOver(project)\n .filter(clazz::isInstance)\n .filter(HasName.class::isInstance)\n .map(HasName.class::cast)\n .filter(c -> name.equals(relativeName(c, Project.class, DATABASE_NAME)))\n .forEachOrdered(consumer::accept);\n });\n\n speedment.getProjectComponent().setProject(project);\n }",
"protected void applyPendingAdds ()\n {\n while (!m_aAddStack.isEmpty ())\n addMonitoredFile (m_aAddStack.pop ());\n }",
"public void assignStackOrdering() {\n this.mTaskStackContainers.assignStackOrdering(getPendingTransaction());\n }",
"public Model invoke(Model result) {\n if (result instanceof DefectStatus) {\n addCacheEntry(result.getClass().getName(), ((ProjectModel) result).project, result, templateDataCache);\n }\n return result;\n }",
"void reapplyBreakpoints()\n\t{\n\t\t// give us a bit of time to process the newly loaded swf\n\t\tif (propertyGet(METADATA_ATTEMPTS) > 0)\n\t\t\ttry { waitForMetaData(80); } catch(InProgressException ipe) { }\n\n\t\tint count = breakpointCount();\n\t\tfor(int i=0; i<count; i++)\n\t\t{\n\t\t\tBreakAction a = breakpointAt(i);\n\t\t\ta.clearHits();\n\t\t\ta.setStatus(BreakAction.UNRESOLVED);\n\t\t}\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tresolveBreakpoints(sb);\n\t\tout(sb.toString());\n\t}",
"void setWorkingProject(ProjectRepresentation projectRepresentation);",
"@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}",
"@Override\n public Game apply(AMove move, Game game) throws ApplyMoveException {\n PlayCardMove newMove = (PlayCardMove) move;\n\n // Retrieving the Player\n Player player = game.getPlayerByPlayerNr(game.getCurrentPlayer());\n // removing the current Player from the List of all Players\n game.getPlayers().remove(player);\n\n // Removing the marketCard from the players deck of cards\n player.getHandCards().remove(player.getMarketCardById(newMove.getCardId()));\n\n /* PART ONE: GET STONES */\n\n // Retrieving the SupplySled and the StoneQuarry of the current Player\n SupplySled supplySled = player.getSupplySled();\n StoneQuarry stoneQuarry = game.getStoneQuarry();\n\n // Calculating the number of Stones from the StoneQuarry to be moved to the SupplySled\n int stonesOnSupplySled = player.getSupplySled().getStones().size();\n int nrOfNewStones = GameConstants.MAX_STONES_SUPPLY_SLED - stonesOnSupplySled;\n\n // The current Stones on the SupplySled\n List<Stone> updatedStones = supplySled.getStones ();\n\n // Adding at most 3 stones to the SupplySled\n for (int i = 0; i < nrOfNewStones && i != GameConstants.MAX_STONES_ADDED_PER_MOVE; i++) {\n Stone stone = stoneQuarry.getStonesByPlayerNr(player.getPlayerNumber()).remove(0);\n updatedStones.add(stone);\n }\n\n // Adding the updated StoneQuarry to the Game\n game.setStoneQuarry(stoneQuarry);\n\n\n /* PART TWO: PLACE STONE */\n\n // removing one stone from players' sled\n Stone stone = updatedStones.remove(0);\n\n // Adding the position to selected stone\n stone.setPlaceOnShip(newMove.getPlaceOnShip());\n\n // Find the assigned ship\n Ship assignedShip = game.getRoundByRoundCounter().getShipById(newMove.getShipId());\n\n // Remove the assigned ship\n game.getRoundByRoundCounter().getShips().remove(assignedShip);\n\n // Adding stone on ship\n assignedShip.getStones().add(stone);\n\n // Adding the updated sled to the game\n supplySled.setStones(updatedStones);\n\n // Adding the updated ship back to the game\n game.getRoundByRoundCounter().getShips().add(assignedShip);\n\n // Adding the updated SupplySled to the Player\n player.setSupplySled(supplySled);\n\n // Adding the updated Player back to the Game\n game.getPlayers().add(player);\n\n return game;\n }",
"private static void craftStair(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addRecipe(output, new Object[] { \"# \", \"## \", \"###\", '#', input });\r\n\t}",
"@Override\n public void run() {\n setPointActions(host.getUnlockedStages());\n }",
"public ShBuilderApply () {\n\t\tsuper();\n\t}",
"public static void settleTsFilesAndMods(Map<String, TsFileResource> resourcesToBeSettled) {\n int successCount = 0;\n Map<String, List<TsFileResource>> newTsFileResources = new HashMap<>();\n SettleLog.createSettleLog();\n for (Map.Entry<String, TsFileResource> entry : resourcesToBeSettled.entrySet()) {\n TsFileResource resourceToBeSettled = entry.getValue();\n List<TsFileResource> settledTsFileResources = new ArrayList<>();\n try {\n TsFileAndModSettleTool tsFileAndModSettleTool = TsFileAndModSettleTool.getInstance();\n logger.info(\"Start settling for tsFile : {}\", resourceToBeSettled.getTsFilePath());\n if (tsFileAndModSettleTool.isSettledFileGenerated(resourceToBeSettled)) {\n settledTsFileResources = tsFileAndModSettleTool.findSettledFile(resourceToBeSettled);\n newTsFileResources.put(resourceToBeSettled.getTsFile().getName(), settledTsFileResources);\n } else {\n // Write Settle Log, Status 1\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.BEGIN_SETTLE_FILE);\n tsFileAndModSettleTool.settleOneTsFileAndMod(resourceToBeSettled, settledTsFileResources);\n // Write Settle Log, Status 2\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.AFTER_SETTLE_FILE);\n newTsFileResources.put(resourceToBeSettled.getTsFile().getName(), settledTsFileResources);\n }\n\n moveNewTsFile(resourceToBeSettled, settledTsFileResources);\n // Write Settle Log, Status 3\n SettleLog.writeSettleLog(\n resourceToBeSettled.getTsFilePath()\n + SettleLog.COMMA_SEPERATOR\n + SettleCheckStatus.SETTLE_SUCCESS);\n logger.info(\n \"Finish settling successfully for tsFile : {}\", resourceToBeSettled.getTsFilePath());\n successCount++;\n } catch (Exception e) {\n logger.info(\n \"Meet error while settling the tsFile : {}\", resourceToBeSettled.getTsFilePath());\n e.printStackTrace();\n }\n }\n if (resourcesToBeSettled.size() == successCount) {\n SettleLog.closeLogWriter();\n logger.info(\"Finish settling all tsfiles Successfully!\");\n } else {\n logger.info(\n \"Finish Settling, {} tsfiles meet errors.\", (resourcesToBeSettled.size() - successCount));\n }\n }",
"void projectFound( String key ){\n projectInProgress = new Project();\n }",
"public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}",
"private boolean maybeClearExistingStash(Path stashPath) {\n synchronized (stash) {\n if (stash.getAndIncrement() == 0) {\n try {\n for (Path directoryEntry : stashPath.getDirectoryEntries()) {\n directoryEntry.deleteTree();\n }\n } catch (IOException e) {\n turnOffReuse(\"Unable to clear old sandbox stash %s: %s\\n\", stashPath, e.getMessage());\n return false;\n }\n }\n }\n return true;\n }",
"public static void commit(Context context) {\n HashMap<String, Object> pending = new HashMap<>();\r\n synchronized(Cacher.class) {\r\n pending.putAll(Cacher.pending);\r\n Cacher.pending.clear();\r\n }\r\n Log.d(TAG, \"Starting commit of \" + pending.size() + \" changes\");\r\n // Prepare root dir\r\n File rootDir = new File(context.getCacheDir(), CACHE_NAME);\r\n if(!rootDir.exists())\r\n rootDir.mkdirs();\r\n // Write all\r\n for(Map.Entry<String, Object> e : pending.entrySet()) {\r\n String name = e.getKey();\r\n Object value = e.getValue();\r\n NamedLock lock = lock(name);\r\n File file = new File(context.getCacheDir(), CACHE_PREFIX + Integer.toHexString(name.hashCode()));\r\n try {\r\n HashMap<String, String> map;\r\n try {\r\n if(!file.exists())\r\n map = new HashMap<>();\r\n else {\r\n String data = readFile(file);\r\n if(data.length() == 0 || ((map = gson.fromJson(data, HashMap.class)) == null))\r\n map = new HashMap<>(); // new cache\r\n }\r\n } catch (Throwable t) {\r\n Log.e(TAG, \"Unable to open cache for writing: \" + file.getPath(), t);\r\n map = new HashMap<>(); // create empty cache\r\n }\r\n if (value == null) {\r\n if(map.remove(name) == null)\r\n return; // nothing was removed, no changes\r\n if (map.size() == 0) {\r\n if(lastCacheSize != -1)\r\n lastCacheSize -= file.length();\r\n file.delete(); // no more data here\r\n }\r\n } else {\r\n if(lastCacheSize != -1)\r\n lastCacheSize -= file.length();\r\n map.put(name, gson.toJson(value));\r\n writeFile(file, gson.toJson(map));\r\n file.setLastModified(System.currentTimeMillis());\r\n if(lastCacheSize != -1)\r\n lastCacheSize += file.length();\r\n }\r\n } catch (Throwable t) {\r\n Log.e(TAG, \"Unable to write cache \" + file.getPath() + \" for \" + name, t);\r\n // ignore\r\n } finally {\r\n lock.unlock();\r\n }\r\n }\r\n // Next cleanup cache\r\n if(lastCacheSize != -1 && lastCacheSize < CACHE_SIZE)\r\n return; // no need to cleanup cache\r\n lastCacheSize = 0; // reset\r\n File[] files = rootDir.listFiles();\r\n long[] timestamps = new long[files.length];\r\n long[] size = new long[files.length];\r\n // Collect all data\r\n for (int c = 0; c < files.length; c++) {\r\n File file = files[c];\r\n if (file.isDirectory()) {\r\n files[c] = null;\r\n timestamps[c] = Long.MAX_VALUE;\r\n size[c] = 0;\r\n } else {\r\n timestamps[c] = file.lastModified();\r\n size[c] = file.length();\r\n }\r\n lastCacheSize += size[c];\r\n }\r\n // Keep trimming as needed\r\n while (lastCacheSize > CACHE_SIZE) {\r\n // Select oldest file\r\n int oldest = -1;\r\n long oldestTimestamp = Long.MAX_VALUE;\r\n for (int c = 0; c < files.length; c++) {\r\n if (timestamps[c] < oldestTimestamp) {\r\n oldest = c;\r\n oldestTimestamp = timestamps[c];\r\n }\r\n }\r\n // Delete this file\r\n lastCacheSize -= size[oldest];\r\n files[oldest].delete();\r\n timestamps[oldest] = Long.MAX_VALUE;\r\n }\r\n Log.d(TAG, \"Trimmed cache to \" + lastCacheSize + \" bytes\");\r\n // Done\r\n }",
"void invalidateCache( Path project );",
"public SystemPackagingTask() {\n super();\n exten = new SystemPackagingExtension();\n parentExten = getProject().getExtensions().findByType(ProjectPackagingExtension.class);\n\n if (parentExten != null) {\n getRootSpec().with(parentExten.getDelegateCopySpec());\n }\n }",
"StackManipulation cached();",
"void setProject(InternalActionContext ac, HibProject project);",
"Snapshot apply();",
"private List<String> newChangNotStaged(HashMap<String, Blob> allFiles) {\n ArrayList<String> result = new ArrayList<>();\n for (String fileName: Utils.plainFilenamesIn(Main.CWD)) {\n Blob ourBlob = allFiles.get(fileName);\n File fileInCWD = new File(Main.CWD, fileName);\n String content = Utils.readContentsAsString(fileInCWD);\n if (ourBlob != null) {\n if (!ourBlob.getContent().equals(content)\n && !isStaged(fileName)) {\n String elem = fileName + \" (modified)\";\n result.add(elem);\n }\n allFiles.remove(fileName);\n }\n }\n return result;\n }",
"public void undo() throws ProvisioningException {\n try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(StateHistoryUtils.readUndoConfig(home, log), Collections.emptyMap())) {\n doProvision(layout, getFsDiff(), true);\n }\n }",
"@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n public void apply(Project project) {\n project.getPluginManager().apply(\"groovy-base\");\n\n RewindFrameworkExtension rewind = project.getObjects().newInstance(RewindFrameworkExtension.class, project);\n project.getExtensions().add(\"rewind\", rewind);\n\n rewind.getTests().all(name -> {\n SourceSetContainer sourceSets = project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets();\n SourceSet sourceSet = sourceSets.create(name, it -> it.setRuntimeClasspath(it.getRuntimeClasspath().add(it.getOutput()).add(it.getCompileClasspath())));\n\n\n Test test = project.getTasks().create(sourceSet.getName(), Test.class, task -> {\n task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);\n task.setTestClassesDirs(sourceSet.getOutput().getClassesDirs());\n task.setClasspath(sourceSet.getRuntimeClasspath());\n });\n\n project.getTasks().getByName(\"check\").dependsOn(test);\n\n Jar jar = project.getTasks().create(sourceSet.getName() + \"Jar\", ShadowJar.class, (ShadowJar task) -> {\n task.setClassifier(\"tests\");\n\n task.from(sourceSet.getOutput());\n task.setConfigurations(Arrays.asList(project.getConfigurations().getByName(sourceSet.getName() + \"RuntimeClasspath\")));\n task.dependencies((DependencyFilter filter) -> {\n for (Dependency d : project.getConfigurations().getByName(sourceSet.getName() + \"Implementation\").getDependencies()) {\n if (!(d instanceof ProjectDependency)) {\n filter.exclude(filter.dependency(d));\n }\n }\n });\n });\n\n RewindTest remoteTest = project.getTasks().create(sourceSet.getName() + \"Rewind\", RewindTest.class, (RewindTest task) -> {\n task.setGroup(LifecycleBasePlugin.VERIFICATION_GROUP);\n task.dependsOn(jar);\n task.getHostname().set(\"localhost\");\n task.getPort().set(5672);\n task.getTestJar().set(jar.getArchivePath());\n task.getBinaryResultsDirectory().set(project.getLayout().getBuildDirectory().dir(\"test-results/\" + sourceSet.getName() + \"Rewind/binary\"));\n task.getDependencies().set(\n project.provider(\n () -> project.getConfigurations().getByName(sourceSet.getName() + \"Implementation\").getDependencies().stream()\n .filter(((Dependency dependency) -> !(dependency instanceof ProjectDependency)))\n .collect(Collectors.toList())\n ));\n task.getRepositories().set(project.getRepositories());\n task.finalizedBy(sourceSet.getName() + \"RewindReport\");\n });\n\n project.getTasks().create(sourceSet.getName() + \"RewindReport\", TestReport.class, (TestReport task) -> {\n task.setTestResultDirs(Arrays.asList(remoteTest.getBinaryResultsDirectory().getAsFile().get()));\n task.setDestinationDir(new File(project.getBuildDir(), \"reports/tests/\" + sourceSet.getName() + \"Rewind\"));\n });\n });\n }",
"public void addFromProject() {\n btAddFromProject().push();\n }",
"public void applyCurrentStyle()\n\t{\n\t\tthis.getCurrentStyleTree().saveCurrentStyle();\n\t\tthis.guiController.rebuildStyle();\n\n\t\tThreadService.executeOnEDT(new Runnable()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tgetCurrentStyleTree().repaint();\n\t\t\t}\n\t\t});\n\t}",
"public static void reloadStackConfiguration() {\n \t\tdefaultStackProperties = new Properties();\n \t\tstackPropertyOverrides = new Properties();\n \t\trequiredProperties = new Properties();\n \t\t// Load the default properties from the classpath.\n \t\tloadPropertiesFromClasspath(DEFAULT_PROPERTIES_FILENAME, defaultStackProperties);\n \t\t// Load the required properties\n \t\tloadPropertiesFromClasspath(TEMPLATE_PROPERTIES, requiredProperties);\n \t\tstack = System.getProperty(STACK_SYSTEM_PROPERTY_KEY);\n \t\t// The URL containing any property overrides\n \t\tpropertyFileUrl = getPropertyFileURL();\n \t\t// Try to get the properties from the settings file\n \t\tif(propertyFileUrl == null){\n \t\t\taddSettingsPropertiesToSystem();\n \t\t\t// Try loading it again\n \t\t\tpropertyFileUrl = getPropertyFileURL();\n \t\t}\n \t\tif (null == propertyFileUrl) throw new IllegalArgumentException(\"Cannot find the System Property: \"+STACK_PROPERTY_FILE_URL);\n \t\t// If we have IAM id and key the load the properties using the Amazon client, else the URL shoudl be public.\n \t\tString iamId = getIAMUserId();\n \t\tString iamKey = getIAMUserKey();\n \t\tif(iamId != null && iamKey != null){\n \t\t\ttry {\n \t\t\t\tS3PropertyFileLoader.loadPropertiesFromS3(propertyFileUrl, iamId, iamKey, stackPropertyOverrides);\n \t\t\t} catch (IOException e) {\n \t\t\t\tthrow new RuntimeException(e); \n \t\t\t}\n \t\t}else{\n \t\t\tloadPropertiesFromURL(propertyFileUrl, stackPropertyOverrides);\n \t\t}\n \t\t// Validate the required properties\n \t\tStackUtils.validateRequiredProperties(requiredProperties, stackPropertyOverrides);\n \t}",
"public Model invoke(Model result) {\n if (result instanceof Project) {\n final Project project = (Project) result;\n YamlModelLoader.loadModels(\"project-data.yml\", new YamlModelLoader.Callback<Model>() {\n public Model invoke(Model result) {\n ProjectModel projectModel = (ProjectModel) result;\n projectModel.project = project;\n projectModel.account = project.account;\n return projectModel;\n }\n }, new YamlModelLoader.Callback<Model>() {\n public Model invoke(Model result) {\n // put template DefectStatus entities in the cache so we can use them later on\n if (result instanceof DefectStatus) {\n addCacheEntry(result.getClass().getName(), ((ProjectModel) result).project, result, templateDataCache);\n }\n return result;\n }\n }\n );\n \n return project;\n }\n return result;\n }",
"DeployShard() {\n }",
"public void add2ChipsOnTheSameProject(Subproject project) {\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT());\n\t\tcurrent.raiseScore(project.setChip(current.removeChip()).getAmountSZT());\n\t}",
"public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }",
"public void updateWorkspace()\n {\n workspace.update();\n }",
"@Override\n public void newBundlesRoot(Bundles new_root) {\n // Adjust state of super\n super.newBundlesRoot(new_root);\n // Save some state\n Map<String,Point2D> wxy_copy = entity_to_wxy;\n // Reset stateful variables for this class\n digraph = new SimpleMyGraph<Bundle>();\n graph = new SimpleMyGraph<Bundle>();\n entity_to_shape = new HashMap<String,Utils.Symbol>();\n entity_to_wxy = new HashMap<String,Point2D>();\n entity_to_sxy = new HashMap<String,String>();\n entity_to_sx = new HashMap<String,Integer>();\n entity_to_sy = new HashMap<String,Integer>();\n // Reapply all the relationships\n for (int i=0;i<active_relationships.size();i++) {\n // System.err.println(\"newBundlesRoot(): Adding In Relationship \\\"\" + active_relationships.get(i) + \"\\\"... bundles.size() = \" + new_root.size());\n addRelationship(active_relationships.get(i), false, new_root);\n }\n // Reapply the world coordinates\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (wxy_copy.containsKey(entity)) entity_to_wxy.put(entity, wxy_copy.get(entity));\n }\n transform();\n }",
"Map<Project, JGitStatus> push(List<Project> projects, ProgressListener progressListener);",
"@Override\r\n\tpublic int countApplyProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"@Override\n public void undo(TSPSolution solution) {\n apply(solution);\n }",
"@Override\n public TaskResult execute(CompilerContext context) {\n File intermediates = ExecutorUtils.createDir(context.getPaths().getBuildDir(), \"intermediates\");\n File resDir = ExecutorUtils.createDir(intermediates, \"res\");\n context.getPaths().setMergedResDir(ExecutorUtils.createDir(resDir, \"merged\"));\n context.getPaths().setTmpPackageName(new File(\n context.getPaths().getDeployDir().getAbsolutePath() + File.separator\n + context.getProject().getProjectName() + \"._ap\"));\n\n PngCruncher cruncher = new AaptCruncher(context.getResources().aapt(), null, null);\n if (!context.getComponentInfo().getExplodedAarLibs().mergeResources(\n context.getPaths().getMergedResDir(), context.getPaths().getResDir(), cruncher)) {\n return TaskResult.generateError(\"Could not merge resources\");\n }\n return TaskResult.generateSuccess();\n }",
"void applyMixims() {\n if (this.applied) {\n throw new IllegalStateException(\"Mixims already applied to target class \" + this.className);\n }\n this.applied = true;\n \n MiximApplicatorStandard applicator = this.createApplicator();\n applicator.apply(this.mixims);\n this.applySignature();\n this.upgradeMethods();\n this.checkMerges();\n }",
"private void storeViewState()\n\t{\n\t\tCommand lastCmd = project.getLastCommand();\n\t\tif (lastCmd != null)\n\t\t{\n\t\t\tlastCmd.setOptionalState(view.toJSONString(lastCmd.getProjectState()));\n\t\t}\n\t}",
"@Override\n public void \n buildPhase()\n throws PipelineException\n {\n pLog.log(LogMgr.Kind.Ops, LogMgr.Level.Fine, \"Checking Out: \" + pSubmitNode);\n frozenStomp(pSubmitNode);\n\n pLog.log(LogMgr.Kind.Ops, LogMgr.Level.Fine, \"Checking Out: \" + pApproveNode);\n pClient.checkOut(getAuthor(), getView(), pApproveNode, null, \n CheckOutMode.KeepModified, CheckOutMethod.PreserveFrozen);\n \n pFinalizeStages = new LinkedList<FinalizableStage>();\n \n String type = TaskType.Lighting.toString();\n \n \n String textureNode = pShotNamer.getLightingTextureNode();\n String textureProduct = pShotNamer.getLightingTextureProductNode();\n NodeID finalTexID = new NodeID(getAuthor(), getView(), textureProduct);\n NodeMod texMod = pClient.getWorkingVersion(getAuthor(), getView(), textureNode);\n NodeMod finalTexMod = pClient.getWorkingVersion(finalTexID);\n \n for (String source : finalTexMod.getSourceNames()) {\n pClient.unlink(finalTexID, source);\n }\n for (LinkMod link : texMod.getSources()) {\n pClient.link(finalTexID, link);\n }\n \n \n String prelgtNode = pShotNamer.getPreLightScene();\n NodeMod preLgtMod = pClient.getWorkingVersion(getAuthor(), getView(), prelgtNode);\n BaseAction preLgtAct = preLgtMod.getAction();\n \n TreeSet<String> lgtModels = new TreeSet<String>();\n for (String source : preLgtMod.getSourceNames()) {\n String sceneType = (String) preLgtAct.getSourceParamValue(source, \"SceneType\");\n if (sceneType != null && sceneType.equals(\"Model\")) {\n lgtModels.add(source);\n }\n }\n \n String lightingScene = pShotNamer.getLightingEditScene();\n String lightingProduct = pShotNamer.getLightingProductScene();\n \n StageInformation stageInfo = getStageInformation();\n stageInfo.setActionOnExistence(ActionOnExistence.Conform);\n {\n String script = pProjectNamer.getLightingProductMEL();\n LightingProductStage stage = \n new LightingProductStage\n (stageInfo, pContext, pClient,\n lightingProduct, lightingScene, script, lgtModels, textureProduct );\n addTaskAnnotation(stage, NodePurpose.Product, pProjectName, pTaskName, type);\n if (stage.build()) \n pFinalizeStages.add(stage);\n }\n\n addToQueueList(pApproveNode);\n addToCheckInList(pApproveNode);\n }",
"@Override\n public void start() {\n cache.start();\n patchReconciler.start();\n }",
"public void restoreAssets() {\r\n for (int i=0; i<myMaterials.size(); i++) {\r\n materials.put(myMaterials.get(i), materialAmounts.get(i));\r\n }\r\n for (int i=0; i<myCurrencies.size(); i++) {\r\n currencies.put(myCurrencies.get(i), currencyAmounts.get(i));\r\n }\r\n }",
"void commitShadowList() {\n int shadowNextIdx = 0;\n for(int i = 0, j = 0; i < nextIdx && j < shadowList.size(); i++){\n if(actualList.get(i).equals(shadowList.get(j))){\n // replace the shadow list's element with actual list's element to persist execution state\n shadowList.set(j, actualList.get(i));\n j++;\n shadowNextIdx++;\n } else if(j != 0){\n break;\n }\n }\n List<Action> tmpList = shadowList;\n shadowList = actualList;\n actualList = tmpList;\n nextIdx = shadowNextIdx;\n shadowList.clear();\n }",
"private void applyMerge() {\n try {\n SolutionTrajectory trajectory = solution.getShortestTrajectory();\n trajectory.setModel(this.scope);\n trajectory.doTransformation();\n applied = true;\n } catch (IncQueryException e) {\n logger.error(e.getMessage(), e);\n }\n }",
"void vcs( String key, String value ){\n projectInProgress.vcs = value;\n }",
"public void\n\t apply(SoPath path)\n\t //\n\t ////////////////////////////////////////////////////////////////////////\n\t {\n//\t #ifdef DEBUG\n\t // Check for the common user error of applying an action to an\n\t // unreferenced path. This may save some grief.\n\t if (path.getRefCount() == 0) {\n\t SoDebugError.postWarning(\"SoAction::apply\",\n\t \"Action applied to a path with a 0 \"+\n\t \"reference count. Did you forget to call \"+\n\t \"ref() on the path?\");\n\t }\n//\t #endif /* DEBUG */\n\t \n//\t // If we are already in the middle of being applied, save the\n//\t // current state of what we are applied to, so we can restore it\n//\t // afterwards. This happens, for example, when the\n//\t // SoGLRenderAction applies itself to traverse transparent paths\n//\t // after normal traversal.\n//\t boolean needToRestore = isBeingApplied;\n//\t final AppliedTo saveAppliedTo = new AppliedTo();\n//\t \n//\t if (isBeingApplied)\n//\t saveAppliedTo.copyFrom(appliedTo);\n//\t \n//\t PathCode storedcurr = this.currentpathcode;\t \n//\t \n//\t isBeingApplied = true;\n//\t \n//\t appliedTo.code = AppliedCode.PATH;\n//\t appliedTo.path = path;\n//\t appliedTo.path.ref();\n//\t /*appliedTo.curPathCode*/currentpathcode = ((SoFullPath.cast(path).getLength() == 1) ?\n//\t PathCode.BELOW_PATH : PathCode.IN_PATH);\n//\t \n//\t currentpath.setHead(path.getHead());\n//\t terminated = false;\n//\t \n//\t setUpState();\n//\t \n//\t beginTraversal(path.getHead());\n//\t endTraversal(path.getHead()); // COIN3D\n//\t \n//\t cleanUp();\n//\t \n//\t // Restore to previous state if necessary\n//\t if (needToRestore) {\n//\t appliedTo.copyFrom(saveAppliedTo);\n//\t \n//\t // Restore the head of the path - we assume this is what was\n//\t // in the current path when we got here. NOTE: This rules out\n//\t // the possibility that the action was in the middle of being\n//\t // applied to some graph; it requires that the recursive\n//\t // apply() was called after the graph was traversed, so the\n//\t // current path had only the head node in it (the cleanUp()\n//\t // for the first apply() was not yet called).\n//\t SoNode head = (appliedTo.code == AppliedCode.NODE ? appliedTo.node :\n//\t appliedTo.code == AppliedCode.PATH ? appliedTo.path.getHead() :\n//\t appliedTo.pathList.operator_square_bracket(0).getHead());\n//\t currentpath.setHead(head);\n//\t }\n//\t this.currentpathcode = storedcurr;\n//\t \n//\t isBeingApplied = needToRestore;\n\t SoDB.readlock();\n\t // need to store these in case action in reapplied\n\t AppliedCode storedcode = pimpl.appliedcode;\n\t SoActionP.AppliedData storeddata = new SoActionP.AppliedData();\n\t storeddata.copyFrom(pimpl.applieddata);\n\t PathCode storedcurr = this.currentpathcode;\n\n\t // This is a pretty good indicator on whether or not we remembered\n\t // to use the SO_ACTION_CONSTRUCTOR() macro in the constructor of\n\t // the SoAction subclass.\n\t assert(this.traversalMethods != null);\n\t this.traversalMethods.setUp();\n\n\t pimpl.terminated = false;\n\n\t //#if COIN_DEBUG\n\t if (path.getRefCount() == 0) {\n\t SoDebugError.postWarning(\"SoAction::apply\",\n\t \"path has reference count equal to zero\");\n\t }\n\t //#endif // COIN_DEBUG\n\n\t // So the path is not deallocated during traversal.\n\t path.ref();\n\n\t this.currentpathcode =\n\t path.getFullLength() > 1 ? SoAction.PathCode.IN_PATH : SoAction.PathCode.BELOW_PATH;\n\t pimpl.applieddata.path = path;\n\t pimpl.appliedcode = SoAction.AppliedCode.PATH;\n\n\t // make sure state is created before traversing\n\t this.getState();\n\n\t if (path.getLength() != 0 && path.getNode(0) != null) {\n\t SoNode node = path.getNode(0);\n\t this.currentpath.setHead(node);\n\t this.beginTraversal(node);\n\t this.endTraversal(node);\n\t }\n\n\t path.unrefNoDelete();\n\t pimpl.appliedcode = storedcode;\n\t pimpl.applieddata.copyFrom( storeddata);\n\t this.currentpathcode = storedcurr;\n\t SoDB.readunlock();\n\t }",
"public void execute() throws MojoExecutionException {\n deploy(service, dockerImage,Optional.ofNullable(kalixProject),Optional.ofNullable(kalixContext));\n }",
"private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }",
"void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}",
"void projectsFound( String key ) {\n developer.projects = new ArrayList<>();\n }",
"public void checkout() {\n\t}",
"private void weaveKnightApp(CtClass classToTransform) throws Exception {\n String body = String.format(\"{ %s.%s(this); }\", Class.INJECTOR, Method.INIT);\n log(\"Weaved: %s\", body);\n mAfterBurner.beforeOverrideMethod(classToTransform, Method.ON_CREATE, body);\n }",
"static void clean(TreeDeleter treeDeleter, Path outputBase) {\n Path stashDir = getStashBase(outputBase);\n if (!stashDir.isDirectory()) {\n return;\n }\n Path stashTrashDir = stashDir.getChild(\"__trash\");\n try {\n stashDir.renameTo(stashTrashDir);\n } catch (IOException e) {\n // If we couldn't move the stashdir away for deletion, we need to delete it synchronously\n // in place, so we can't use the treeDeleter.\n treeDeleter = null;\n stashTrashDir = stashDir;\n }\n try {\n if (treeDeleter != null) {\n treeDeleter.deleteTree(stashTrashDir);\n } else {\n stashTrashDir.deleteTree();\n }\n } catch (IOException e) {\n logger.atWarning().withCause(e).log(\"Failed to clean sandbox stash %s\", stashDir);\n }\n }",
"private void scanProject() {\n ProjectResources resources = ResourceManager.getInstance().getProjectResources(mProject);\n if (resources != null) {\n Collection<ResourceItem> layouts = resources.getResourceItemsOfType(LAYOUT);\n for (ResourceItem layout : layouts) {\n List<ResourceFile> sources = layout.getSourceFileList();\n for (ResourceFile source : sources) {\n updateFileIncludes(source, false);\n }\n }\n\n return;\n }\n }",
"@Override\n\tpublic void stablize() {\n\n\t}",
"private ArrayList<String> stagedButDiffInCWD() {\n ArrayList<String> result = new ArrayList<>();\n List<String> addingStage = Utils.plainFilenamesIn(INDEX);\n for (String file: addingStage) {\n File fileCWD = new File(Main.CWD, file);\n File stagedFile = new File(INDEX, file);\n if (!fileCWD.exists()) {\n String message = file + \" (deleted)\";\n result.add(message);\n } else {\n String contentOne = Utils.readContentsAsString(fileCWD);\n String contentTwo = Utils.readContentsAsString(stagedFile);\n if (!contentOne.equals(contentTwo)) {\n String message = file + \" (modified)\";\n result.add(message);\n }\n }\n }\n return result;\n }",
"private void configureOsgiManifest(Project project) {\n project.afterEvaluate(new Action<Project>() {\n @Override\n public void execute(Project project) {\n project.getTasks().withType(Jar.class, new Action<Jar>() {\n @Override\n public void execute(Jar jar) {\n if (jar.getManifest() instanceof OsgiManifest) {\n OsgiManifest manifest = (OsgiManifest) jar.getManifest();\n if (manifest.getInstructions().containsKey(\"Implementation-Version\")) {\n manifest.instructionReplace(\"Implementation-Version\", configurationStore.getProjectVersion());\n }\n if (manifest.getInstructions().containsKey(\"Specification-Version\")) {\n manifest.instructionReplace(\"Specification-Version\", configurationStore.getProjectVersion());\n }\n }\n }\n });\n }\n });\n }",
"@Override\n public void apply() {\n }",
"public void bake() {\n baked = true;\n\n this.registerItemsEffective();\n\n // Remove capability constructors for capabilities that are not initialized.\n removeNullCapabilities(capabilityConstructorsTile, capabilityConstructorsTileSuper, null);\n removeNullCapabilities(capabilityConstructorsEntity, capabilityConstructorsEntitySuper, null);\n removeNullCapabilities(capabilityConstructorsItem, capabilityConstructorsItemSuper, capabilityConstructorsItemInstance);\n\n // Bake all collections\n capabilityConstructorsTileSuper = ImmutableList.copyOf(capabilityConstructorsTileSuper);\n capabilityConstructorsEntitySuper = ImmutableList.copyOf(capabilityConstructorsEntitySuper);\n capabilityConstructorsItemSuper = ImmutableList.copyOf(capabilityConstructorsItemSuper);\n\n }",
"private void update() {\n\n\t\tthis.projects.clear();\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Infrastructure) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Social) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\t}",
"protected void branch(ResourceMapping mapping, CVSTag branch) throws CoreException, IOException {\n CVSTag version = new CVSTag(\"Root_\" + branch.getName(), CVSTag.VERSION);\n branch(new ResourceMapping[] { mapping }, version, branch, true /* update */);\n assertTagged(mapping, version);\n assertBranched(mapping, branch);\n }",
"void commit(String workspace);",
"public static void main(String[] args) {\n\n\t\tSystem.out.println(\"THis is my new claas in local repo\");\n\t\tSystem.out.println(\"Lets make some changes on local class and again we have to push that class in GIT\");\n\t}",
"public void updateSwarm();",
"public void apply() {\r\n\tif (currentEffect != null)\r\n\t currentEffect.removeFrom(kingdom);\r\n\r\n\tif (isVacant())\r\n\t currentEffect = penalty;\r\n\telse\r\n\t currentEffect = bonus;\r\n\r\n\tcurrentEffect.applyTo(kingdom);\r\n }",
"public Search<SolutionType> copy() throws CoreHunterException;",
"public boolean needsStash() {\n return myNeedsStash;\n }",
"@Override\n public Set<Project> applyChanges( final List<Project> projects )\n throws ManipulationException\n {\n final GroovyState state = session.getState( GroovyState.class );\n if ( !session.isEnabled() || !state.isEnabled() )\n {\n logger.debug( getClass().getSimpleName() + \": Nothing to do!\" );\n return Collections.emptySet();\n }\n\n final Set<Project> changed = new HashSet<>();\n\n for ( File groovyScript : parseGroovyScripts( state.getGroovyScripts() ))\n {\n GroovyShell shell = new GroovyShell( );\n Script script;\n\n for ( final Project project : projects )\n {\n if ( project.isExecutionRoot() )\n {\n logger.info (\"Executing {} on {}\", groovyScript, project);\n\n try\n {\n script = shell.parse( groovyScript );\n\n if ( script instanceof BaseScript )\n {\n ((BaseScript)script).setValues(session.getUserProperties(), projects, project);\n }\n else\n {\n throw new ManipulationException( \"Cannot cast \" + groovyScript + \" to a BaseScript to set values.\" );\n }\n }\n catch (MissingMethodException e)\n {\n try\n {\n logger.debug ( \"Failure when injecting into script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to inject values into base script\", e );\n }\n catch (CompilationFailedException e)\n {\n try\n {\n logger.debug ( \"Failure when parsing script {} \", FileUtils.readFileToString( groovyScript ), e );\n }\n catch ( IOException e1 )\n {\n logger.debug (\"Unable to read script file {} for debugging! {} \", groovyScript, e1);\n }\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n catch ( IOException e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n try\n {\n script.run();\n }\n catch ( Exception e )\n {\n throw new ManipulationException( \"Unable to parse script\", e );\n }\n\n changed.add( project );\n }\n }\n }\n return changed;\n }",
"protected void installThemeTemplate() throws CoreException\n {\n SDK sdk = getSDK();\n String themeName = this.masterModel.getStringProperty( THEME_NAME );\n String displayName = this.masterModel.getStringProperty( DISPLAY_NAME );\n IPath newThemePath = sdk.createNewThemeProject( themeName, displayName );\n\n processNewFiles( newThemePath.append( themeName + ISDKConstants.THEME_PLUGIN_PROJECT_SUFFIX ) );\n\n // cleanup portlet files\n newThemePath.toFile().delete();\n\n try\n {\n this.project.refreshLocal( IResource.DEPTH_INFINITE, monitor );\n }\n catch( Exception e )\n {\n ProjectCorePlugin.logError( e );\n }\n }",
"public void assignStackOrdering(SurfaceControl.Transaction t) {\n int layer;\n int layer2;\n SurfaceControl surfaceControl;\n SurfaceControl surfaceControl2;\n int HOME_STACK_STATE = 0;\n int layer3 = 0;\n int layerForAnimationLayer = 0;\n int layerForBoostedAnimationLayer = 0;\n int layerForHomeAnimationLayer = 0;\n boolean isInHwFreeFormAnimation = false;\n int layerForHwFreeFormAnimationLayer = 0;\n int layerForHwFreeFormAnimationImeLayer = 0;\n int layerForBoostedHwFreeFormAnimationLayer = 0;\n int state = 0;\n while (state <= 2) {\n int i = 0;\n while (i < this.mChildren.size()) {\n TaskStack s = (TaskStack) this.mChildren.get(i);\n boolean notFreeform = s.isAlwaysOnTop() && HwFreeFormUtils.isFreeFormEnable() && !s.inFreeformWindowingMode() && !s.inHwFreeFormWindowingMode();\n if ((state != 0 || s.isActivityTypeHome()) && ((state != 1 || (!s.isActivityTypeHome() && !notFreeform && !s.inHwFreeFormMoveBackState())) && (state != 2 || s.isAlwaysOnTop() || s.inHwFreeFormMoveBackState()))) {\n int layer4 = layer3 + 1;\n s.assignLayer(t, layer3);\n if ((s.inSplitScreenWindowingMode() || s.inHwSplitScreenWindowingMode() || s.inHwMagicWindowingMode()) && s.isVisible() && (surfaceControl2 = this.mSplitScreenDividerAnchor) != null) {\n t.setLayer(surfaceControl2, layer4);\n layer4++;\n }\n if (s.isTaskAnimating() || s.isAppAnimating()) {\n if (state != 2) {\n int layer5 = layer4 + 1;\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n if (!s.inHwMagicWindowingMode() || !s.isVisible() || (surfaceControl = this.mSplitScreenDividerAnchor) == null) {\n layer4 = layer5;\n } else {\n t.setLayer(surfaceControl, layer5);\n layer4 = layer5 + 1;\n }\n } else if (s.inHwFreeFormWindowingMode() && s.isAlwaysOnTop()) {\n int layer6 = layer4 + 1;\n layerForHwFreeFormAnimationLayer = layer4;\n layer4 = layer6 + 1;\n layerForHwFreeFormAnimationImeLayer = layer6;\n isInHwFreeFormAnimation = true;\n }\n }\n if (s.inHwFreeFormWindowingMode() && s.getTopChild() != null && ((Task) s.getTopChild()).isHwFreeFormScaleAnimating()) {\n layerForAnimationLayer = layer4;\n layerForHwFreeFormAnimationLayer = layerForAnimationLayer;\n layer4++;\n }\n layer2 = 2;\n if (state != 2) {\n layer = layer4 + 1;\n layerForBoostedAnimationLayer = layer4;\n layerForBoostedHwFreeFormAnimationLayer = layerForBoostedAnimationLayer;\n } else if (!s.inHwFreeFormWindowingMode() || !s.isAlwaysOnTop()) {\n layer = layer4;\n } else {\n layer = layer4 + 1;\n layerForBoostedHwFreeFormAnimationLayer = layer4;\n }\n } else {\n layer = layer3;\n layer2 = 2;\n }\n i++;\n layer3 = layer;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n if (state == 0) {\n layerForHomeAnimationLayer = layer3;\n layer3++;\n }\n state++;\n HOME_STACK_STATE = HOME_STACK_STATE;\n }\n SurfaceControl surfaceControl3 = this.mAppAnimationLayer;\n if (surfaceControl3 != null) {\n t.setLayer(surfaceControl3, layerForAnimationLayer);\n }\n SurfaceControl surfaceControl4 = this.mBoostedAppAnimationLayer;\n if (surfaceControl4 != null) {\n t.setLayer(surfaceControl4, layerForBoostedAnimationLayer);\n }\n SurfaceControl surfaceControl5 = this.mAppHwFreeFormAnimationLayer;\n if (surfaceControl5 != null) {\n t.setLayer(surfaceControl5, layerForHwFreeFormAnimationLayer);\n updateImeLayer(isInHwFreeFormAnimation, t, layerForHwFreeFormAnimationImeLayer);\n }\n SurfaceControl surfaceControl6 = this.mBoostedHwFreeFormAnimationLayer;\n if (surfaceControl6 != null) {\n t.setLayer(surfaceControl6, layerForBoostedHwFreeFormAnimationLayer);\n }\n SurfaceControl surfaceControl7 = this.mHomeAppAnimationLayer;\n if (surfaceControl7 != null) {\n t.setLayer(surfaceControl7, layerForHomeAnimationLayer);\n }\n }",
"public void apply(String cacheKey) {\n }",
"List<ChangedFile> addUntrackedFilesToIndex(Map<Project, List<ChangedFile>> files);",
"protected void reset(Project dto) {}",
"public void findMatchingFiles()\n {\n\t\t\n\t\t//Get Server name from the log directory path\n\t\t\t\t\t\t\n\t\tString server = path.substring(0, path.length()-2);\n\t\tserver = server.substring(0,server.lastIndexOf(\"/\"));\n\t\tserver = server.substring(server.lastIndexOf(\"/\") + 1);\n\t\tSystem.out.println(\"Server Name is : \" + server);\n\t\t\t\t\t\t\n Map <String, String> logPatternMap = new HashMap<>(); // Map of log stash config and RegEx\n List<String> fileList = new ArrayList<>(); // List of All files in Log Dir\n List<String> logStashCommandList = new ArrayList<>(); // List of commands to be executed for log stashing files\n String placeholder = \"FILE_PATH\";\n logPatternMap = fetchPropertyFromFile();\n fileList = getAllLogFileNames();\n\n for (String file : fileList) {\n\n for (Map.Entry<String, String> entry : logPatternMap.entrySet()) {\n String fileName = entry.getKey();\n String pattern = entry.getValue();\n\n if (Pattern.matches(pattern,file))\n {\n System.out.println( \"Found a matching file : \" + pattern + \" : \" + file );\n File source = new File(\"/slog/templates/\" + fileName);\n File dest = new File(\"/slog/configs/\" + fileName);\n File logFile = new File(path + file);\n try {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n //copy files from template directory to configs directory\n\t\t\t\t\t\tFiles.copy(source.toPath(), dest.toPath()); \n System.out.println(\"Destination path is : \" + dest.getPath());\n\n //Replace contents of the config file to match log file paths\n\n BufferedReader reader = new BufferedReader(new FileReader(dest));\n String line = \"\", oldtext = \"\";\n while((line = reader.readLine()) != null)\n {\n oldtext += line + \"\\r\\n\";\n }\n reader.close();\n\n String replacedtext = oldtext.replaceAll(placeholder, logFile.getPath().toString());\n\n FileWriter writer = new FileWriter(dest);\n writer.write(replacedtext);\n writer.close();\n\n //Form LogStash command and Execute it\n\n String command = \"/slog/bin/logstash -f \" + dest.getPath() + \" < \" + path + file;\n String[] cmd = { \"/bin/sh\", \"-c\", command};\n Process process = Runtime.getRuntime().exec(cmd);\n try {\n BufferedReader out = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n out.lines().forEach(System.out::println);\n process.waitFor();\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n //delete config file and log file after the work is done\n dest.delete();\n // logFile.delete();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n }\n }\n\n }"
] | [
"0.68972135",
"0.6576831",
"0.57331014",
"0.5602466",
"0.54190373",
"0.5032125",
"0.493117",
"0.4919555",
"0.4909164",
"0.4854395",
"0.47826585",
"0.47809753",
"0.47728512",
"0.45811138",
"0.4574212",
"0.45611244",
"0.45213014",
"0.45213014",
"0.4498556",
"0.44725916",
"0.44529092",
"0.44396922",
"0.44381687",
"0.44343585",
"0.44080138",
"0.44077167",
"0.44016013",
"0.43968534",
"0.43933594",
"0.43741688",
"0.4365786",
"0.43539998",
"0.4346849",
"0.43422025",
"0.43334967",
"0.43309057",
"0.4321748",
"0.43213302",
"0.43209425",
"0.43127686",
"0.43069273",
"0.43014243",
"0.42999774",
"0.42997107",
"0.42986527",
"0.42910114",
"0.42820194",
"0.4265029",
"0.42383197",
"0.4238265",
"0.4234487",
"0.42285135",
"0.4224627",
"0.42221308",
"0.4220575",
"0.4211608",
"0.4210289",
"0.4200686",
"0.4185651",
"0.41853356",
"0.417701",
"0.41760817",
"0.41716948",
"0.41676491",
"0.41656917",
"0.41603196",
"0.4159251",
"0.4158903",
"0.41518733",
"0.41505128",
"0.41383916",
"0.41366383",
"0.41326612",
"0.41255993",
"0.4122042",
"0.4118614",
"0.41174725",
"0.41163275",
"0.41151288",
"0.4114206",
"0.41137603",
"0.41134644",
"0.4110971",
"0.4108606",
"0.41085717",
"0.40992966",
"0.40939528",
"0.40876538",
"0.40844837",
"0.40802863",
"0.40712738",
"0.40698314",
"0.40635628",
"0.4062212",
"0.40555307",
"0.4054488",
"0.4034907",
"0.4028949",
"0.40281427",
"0.40220833"
] | 0.6452579 | 2 |
Drops stash from the project | Map<Project, Boolean> stashDrop(Stash stash); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void clean(TreeDeleter treeDeleter, Path outputBase) {\n Path stashDir = getStashBase(outputBase);\n if (!stashDir.isDirectory()) {\n return;\n }\n Path stashTrashDir = stashDir.getChild(\"__trash\");\n try {\n stashDir.renameTo(stashTrashDir);\n } catch (IOException e) {\n // If we couldn't move the stashdir away for deletion, we need to delete it synchronously\n // in place, so we can't use the treeDeleter.\n treeDeleter = null;\n stashTrashDir = stashDir;\n }\n try {\n if (treeDeleter != null) {\n treeDeleter.deleteTree(stashTrashDir);\n } else {\n stashTrashDir.deleteTree();\n }\n } catch (IOException e) {\n logger.atWarning().withCause(e).log(\"Failed to clean sandbox stash %s\", stashDir);\n }\n }",
"void discardBackupWorkspace(String projectId, String workspaceId, WorkspaceType workspaceType);",
"private boolean maybeClearExistingStash(Path stashPath) {\n synchronized (stash) {\n if (stash.getAndIncrement() == 0) {\n try {\n for (Path directoryEntry : stashPath.getDirectoryEntries()) {\n directoryEntry.deleteTree();\n }\n } catch (IOException e) {\n turnOffReuse(\"Unable to clear old sandbox stash %s: %s\\n\", stashPath, e.getMessage());\n return false;\n }\n }\n }\n return true;\n }",
"public void purge() {\n/*\nudanax-top.st:16722:FakePacker methodsFor: 'transactions'!\n{void} purge\n\t\"Flush everything out to disk and remove all purgeable imaged\n\t objects from memory. This doesn't clear the ShepherdMap table. \n\t This will have to be a weak table, and then the destruction of a \n\t shepherd or shepherdStub should remove it from myShepherdMap.\"!\n*/\n}",
"void purge();",
"public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }",
"void drop();",
"void drop();",
"private void archiveProject(final Project project) {\n\t\t// TODO RemoveWorkerFromProject löschen\n\t\tfinal ArrayList<Task> tasks = getProjectTasks(project);\n\t\tif (!tasks.isEmpty()) {\n\t\t\tfinal TaskController taskController = mainController.getTaskController();\n\t\t\ttaskController.removeWorker(tasks.get(0));\n\t\t\tfor (final Task task : tasks) {\n\t\t\t\tif (task.getCurrentWorker() != null) {\n\t\t\t\t\ttaskController.removeWorker(task);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinal ArrayList<Worker> team = project.getWorkers();\n\t\tif (!team.isEmpty()) {\n\t\t\tfinal TeamController teamController = mainController.getTeamController();\n\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\twhile (!team.isEmpty()) {\n\t\t\t\tteamController.removeWorkerFromProject(project, team.get(0));\n\t\t\t}\n\t\t}\n\t\tproject.setActive(false);\n\t}",
"@Override\n\tpublic void dropAndDestroy() {\n\n\t}",
"public void drop(){\r\n if(activeFish.isEmpty()) return;\r\n \r\n ArrayList<Fish> toremove = new ArrayList<Fish>();\r\n for(Fish bone : activeFish){\r\n bone.drop();\r\n\r\n if(!(bone.inBounds())){ // branch for out of bound fh\r\n toremove.add(bone);\r\n }\r\n }\r\n missedFish(toremove);\r\n\r\n update();\r\n }",
"Map<Project, Boolean> createStash(List<Project> projects, String stashMessage, boolean includeUntracked);",
"public void removeProjectEntries(String serviceName);",
"public void removeStage(PipelineStage stag) {\r\n\t\tSystem.out.println(\"Removing stage \" + stag);\r\n\t\tstages.remove(stag);\r\n\t}",
"void applyStashes(Stash stash, ProgressListener progressListener);",
"private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }",
"public static void kill() {\n Iterator<Recipe> recipes = tj.getServer().recipeIterator();\r\n Recipe recipe;\r\n\r\n while (recipes.hasNext()) {\r\n recipe = recipes.next();\r\n\r\n if (recipe != null && customItems.containsValue(recipe.getResult()))\r\n recipes.remove();\r\n }\r\n\r\n tj = null;\r\n messages = null;\r\n playerDataFolder = null;\r\n players = null;\r\n customItems = null;\r\n }",
"void clean();",
"void clean();",
"void clean();",
"@Override\n public void undeploy(DeploymentUnit context) {\n \n }",
"public static void deleteAndRevert(IProject project) throws CoreException {\n deleteAndRevert(new IProject[] { project });\n }",
"public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}",
"public static void doRemove(String fileName) {\n Stage fromSave = Utils.readObject(STAGED_FILES,\n Stage.class);\n HashSet<String> stagedFiles = fromSave.getStagedFiles();\n Commit currHead = Utils.readObject(TREE_DIR, Tree.class).\n getCurrHead();\n if (stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (stagedFiles.contains(fileName) && !currHead.getBlobs().\n containsKey(fileName)) {\n File stagedFile = Utils.join(STAGE_DIR, fileName);\n stagedFile.delete();\n\n stagedFiles.remove(fileName);\n Stage.save(fromSave);\n } else if (!stagedFiles.contains(fileName) && currHead.getBlobs().\n containsKey(fileName)) {\n if (!Utils.filesSet(WORKING_DIR).contains(fileName)) {\n File removedFile = Utils.join(STAGE_RM_DIR, fileName);\n try {\n removedFile.createNewFile();\n } catch (IOException ignored) {\n return;\n }\n String contents = currHead.getBlobs().get(fileName).\n getContents();\n Utils.writeContents(removedFile, contents);\n } else {\n addToStageRemoval(fileName);\n removeFromWorking(fileName);\n }\n } else {\n System.out.println(\"No reason to remove the file.\");\n System.exit(0);\n }\n }",
"public void clean();",
"public void clean();",
"public void clean();",
"public void clean();",
"private void tear() {\n\t\tthis.torn = true;\n\t\tthis.getContainer().addToContents(getDucatContent());\n\t\tthis.getContainer().removeFromContents(this);\n\t}",
"public void resetPacks() {\n user.resetPacks();\n saveData();\n }",
"private void cleanWarps(String name, FlatDB warpsDB) {\n List<OwnedWarp> plWarps = warps.get(name);\n List<String> warpNames = new ArrayList<String>();\n for(OwnedWarp warp : plWarps)\n warpNames.add(warp.getName());\n for(Row row : warpsDB.getAll())\n if(!warpNames.contains(row.getIndex()))\n warpsDB.removeRow(row.getIndex());\n warpsDB.update();\n }",
"public void remove_stage(String select) {\r\n\t\tcontroller.delete_stage(select);\r\n\t}",
"private static void cleanStatePrivate1(DropwizardTestSupport<DockstoreWebserviceConfiguration> support, String configPath)\n throws Exception {\n Application<DockstoreWebserviceConfiguration> application = support.getApplication();\n application.run(\"db\", \"drop-all\", \"--confirm-delete-everything\", configPath);\n\n List<String> migrationList = Arrays\n .asList(\"1.3.0.generated\", \"1.3.1.consistency\", \"test.confidential1\", \"1.4.0\", \"1.5.0\", \"test.confidential1_1.5.0\", \"1.6.0\",\n \"1.7.0\", \"1.8.0\", \"1.9.0\");\n runMigration(migrationList, application, configPath);\n }",
"private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }",
"@After\n\tpublic void setupClean() {\n\n\t\tString server = serverRequirement.getConfig().getName();\n\t\tif (FuseServerManipulator.isServerStarted(server)) {\n\t\t\tFuseServerManipulator.stopServer(server);\n\t\t}\n\t\tnew ProjectExplorer().deleteAllProjects();\n\t}",
"public void dropBackpack()\n {\n itemLimit = 1;\n haveBackpack = false;\n }",
"private void DropEverything() throws isisicatclient.IcatException_Exception {\n List<Object> allGroupsResults = port.search(sessionId, \"Grouping\");\r\n List tempGroups = allGroupsResults;\r\n List<EntityBaseBean> allGroups = (List<EntityBaseBean>) tempGroups;\r\n port.deleteMany(sessionId, allGroups);\r\n\r\n //Drop all rules\r\n List<Object> allRulesResults = port.search(sessionId, \"Rule\");\r\n List tempRules = allRulesResults;\r\n List<EntityBaseBean> allRules = (List<EntityBaseBean>) tempRules;\r\n port.deleteMany(sessionId, allRules);\r\n\r\n //Drop all public steps\r\n List<Object> allPublicStepResults = port.search(sessionId, \"PublicStep\");\r\n List tempPublicSteps = allPublicStepResults;\r\n List<EntityBaseBean> allPublicSteps = (List<EntityBaseBean>) tempPublicSteps;\r\n port.deleteMany(sessionId, allPublicSteps);\r\n }",
"public void removeLatestStage() {\n\t\tamountOfStages--;\n\t\tstage = amountOfStages; // Prevent editing a removed stage\n\n\t\tint removedStage = amountOfStages + 1;\n\t\tstageJsons.remove(removedStage);\n\t\tstagesOfActions.remove(removedStage);\n\t}",
"public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}",
"public void projectClosed() {\n finaliseToolWindow();\n this.project = null;\n }",
"protected void reset(Project dto) {}",
"protected void tryDeploy() {\n ComponentManager mgr = harness.getContext().getRuntime().getComponentManager();\n // the stash may already contains contribs (from @Setup methods)\n if (mgr.hasChanged()) { // first reset the registry if it was changed by the last test\n mgr.reset();\n // the registry is now stopped\n }\n // deploy current test contributions if any\n deploy(runner, harness);\n mgr.refresh(true);\n // now the stash is empty\n mgr.start(); // ensure components are started\n }",
"public void deleteSnippeFromDB(int id) {\r\n statsRepo.deleteById(id);\r\n }",
"void dropPkt();",
"public void clean(IProgressMonitor mon) throws CoreException{\r\n \t\tif (project!=null){\r\n \t\t\t/**\r\n \t\t\t * closes processes so they don't have locks on resources we'd like to delete\r\n \t\t\t * and they can then be restarted with the newly generated files\r\n \t\t\t */\r\n \t\t\tcloseAllProcesses();\r\n \t\t\tclean(true);\r\n \t\t\tproject.refreshLocal(IResource.DEPTH_ONE, mon);\r\n \t\t\tdeleteCabalProblems();\r\n \t\t\tBuildWrapperPlugin.deleteAllProblems(project);\r\n \t\t\tcabalFileChanged();\r\n \t\t\toutlines.clear();\r\n \t\t\tif (SandboxHelper.isSandboxed(this)){\r\n \t\t\t\ttry {\r\n \t\t\t\t\tSandboxHelper.installDeps(this);\r\n \t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_sandbox,ce);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tsynchronize(false);\r\n \t\t}\r\n \t}",
"void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}",
"public void drop() {\n process(4);\n }",
"private static void cleanStatePrivate2(DropwizardTestSupport<DockstoreWebserviceConfiguration> support, String configPath,\n boolean isNewApplication) throws Exception {\n Application<DockstoreWebserviceConfiguration> application;\n if (isNewApplication) {\n application = support.newApplication();\n } else {\n application = support.getApplication();\n }\n application.run(\"db\", \"drop-all\", \"--confirm-delete-everything\", configPath);\n\n List<String> migrationList = Arrays\n .asList(\"1.3.0.generated\", \"1.3.1.consistency\", \"test.confidential2\", \"1.4.0\", \"1.5.0\", \"test.confidential2_1.5.0\", \"1.6.0\",\n \"1.7.0\", \"1.8.0\", \"1.9.0\");\n runMigration(migrationList, application, configPath);\n }",
"public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }",
"public void clearProject()\n\t{\n\t\tstoreViewState();\n\t\tproject.clearProject();\n\t\tcheckStatus();\n\t}",
"public abstract void drop();",
"public void prune() {\n this.getTree().prune();\n }",
"public void undo() {\n compositionManager.ungroup(group);\n }",
"private void unWatchDir(Path path) {\n watcher_service.deRegisterAll(path);\n }",
"public static void removeSearchBase(Project project){\n searchBase.remove(project);\n // 223003 - memory leaked project instance \n fileNameSearchBase.remove(project); // prevent leak\n }",
"public void removeFromHashes() {\n getBrowser().getDrbdResHash().remove(getName());\n getBrowser().putDrbdResHash();\n for (final DrbdVolumeInfo dvi : drbdVolumes) {\n removeDrbdVolumeFromHashes(dvi);\n }\n }",
"public void clean(){\n preprocessorActionsPerFile.clear();\n }",
"public void removeFromSilkBag() {\r\n silkBag.remove(0);\r\n }",
"public void removeAllPackages() {\r\n myPackages.clear();\r\n }",
"void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public synchronized void dropChanges() {\n\t\tmPendingDeleteCount = 0;\n\t}",
"public ItemStack remove(int debug1) {\n/* 104 */ return this.container.removeItem(this.slot, debug1);\n/* */ }",
"public void discard();",
"protected void deleteStack(DBTraceStack stack) {\n\t\tstackStore.delete(stack);\n\t}",
"public FinishDeploy() {\n addSequential(new AbortAll());\n addSequential(new HatchEject());\n }",
"public void clean();",
"public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}",
"public static void main(String[] argv)\n {\n try\n {\n log.info(\"Cleaning up asset store\");\n \n // set up command line parser\n CommandLineParser parser = new PosixParser();\n CommandLine line = null;\n\n // create an options object and populate it\n Options options = new Options();\n\n options.addOption(\"l\", \"leave\", false, \"Leave database records but delete file from assetstore\");\n options.addOption(\"h\", \"help\", false, \"Help\");\n options.addOption(\"i\", \"identifier\", true, \"ONLY process bitstreams belonging to identifier\");\n \n try\n { \t\n line = parser.parse(options, argv);\n }\n catch (ParseException e)\n {\n log.fatal(e);\n System.exit(1);\n }\n \n // user asks for help\n if (line.hasOption('h'))\n {\n printHelp(options);\n System.exit(0);\n }\n\n boolean deleteDbRecords = true;\n // Prune stage\n if (line.hasOption('l'))\n {\n \tlog.debug(\"option l used setting flag to leave db records\");\n deleteDbRecords = false; \n }\n \n int identifierID = -1;\n if (line.hasOption('i'))\n {\n \tString id = line.getOptionValue('i');\n \ttry\n \t{\n \t\tidentifierID = Integer.parseInt(id);\n \t\tSystem.out.println(\"identifier bitstream id = \" + identifierID);\n \t\tlog.debug(\"identifier bitstream id = \" + identifierID);\n \t}\n \tcatch (Exception e) { \n \t\tSystem.out.println(\"cannot identify bitstream id: \" + identifierID);\n \t\tlog.debug(\"cannot identify bitstream id: \" + identifierID);\n \t}\n }\n \n \tlog.debug(\"leave db records = \" + deleteDbRecords);\n\n // 20130317 Pulipuli Chen\n // 不知為何會加這參數?\n //BitstreamStorageManager.cleanup(deleteDbRecords, identifierID);\n BitstreamStorageManager.cleanup(deleteDbRecords);\n \n System.exit(0);\n }\n catch (Exception e)\n {\n log.fatal(\"Caught exception:\", e);\n System.exit(1);\n }\n }",
"private void deleteStackOp( State state, int index)\n {\n StackOp[] oldOps = state.stackOps;\n StackOp[] newOps = new StackOp[ oldOps.length - 1];\n System.arraycopy( oldOps, 0, newOps, 0, index);\n System.arraycopy( oldOps, index+1, newOps, index, newOps.length - index);\n state.stackOps = newOps;\n }",
"public void deleteCopiedPendingLedgerEntries();",
"public static void lost() {\n\t\tPig.alterStorage(false);\n\t}",
"void reset() throws GitException, InterruptedException;",
"public void clearTombstones(Player p) {\n\t\tSet<Tile> tombstoneTiles = getTombstoneTiles(p);\n\t\tfor (Tile t : tombstoneTiles) {\n\t\t\t//Destroy tombstone and update land type to grass\n\t\t\tt.destroyStructure();\n\t\t\tt.updateLandType(LandType.Tree);\n\t\t}\n\t}",
"public void undo() throws ProvisioningException {\n try(ProvisioningLayout<FeaturePackRuntimeBuilder> layout = newConfigLayout(StateHistoryUtils.readUndoConfig(home, log), Collections.emptyMap())) {\n doProvision(layout, getFsDiff(), true);\n }\n }",
"void clear() {\n stacks.clear();\n }",
"public void deleteStack(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first create a stack\");\n return;\n }\n // if stack is present\n topOfStack=-1;\n arr=null;\n System.out.println(\"Stack deleted successfully\");\n }",
"void unsetDSTSavings();",
"boolean k2h_unset_debug_file();",
"@Override\n public void unstall() {\n registers.get(rdIndex).unstall(id);\n }",
"@Test\n public void removeFromAllTypesTest(){\n ResourceStack stack5 = new ResourceStack(50, 50, 50, 50);\n ResourceStack stack6 = new ResourceStack(10, 15, 20, 25);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(40, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(35, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(30, stack5.getResource(ResourceType.COINS));\n assertEquals(25, stack5.getResource(ResourceType.STONES));\n\n stack6 = new ResourceStack(123, 432235, 55, 1);\n stack5.removeFromAllTypes(stack6);\n\n assertEquals(0, stack5.getResource(ResourceType.SHIELDS));\n assertEquals(0, stack5.getResource(ResourceType.SERVANTS));\n assertEquals(0, stack5.getResource(ResourceType.COINS));\n assertEquals(24, stack5.getResource(ResourceType.STONES));\n }",
"void removeBomb();",
"void deleteUnusedTags();",
"void unsaveCurrentStation();",
"void dropDatabase();",
"public void clean() {\n coffeeMachine.setDefaultCupsBeforeClean();\n }",
"public void shutDown() {\n StunStack.shutDown();\n stunStack = null;\n stunProvider = null;\n requestSender = null;\n\n this.started = false;\n\n }",
"private static void removeDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n dropTable(\"myRooms\");\n dropTable(\"myReservations\");\n }",
"void unsetRoadTerrain();",
"public void unpin();",
"public void unpin();",
"public void discard() {\n }",
"public static void exit() {\n Context.exit(StackContext.class);\n }",
"@Override\r\n\tpublic void wipeWindShield() {\n\t\t\r\n\t}",
"public int deletePack(String name)\n {\n dbObj=new dbFlashCards(userId);\n \n return dbObj.deletePack(name);\n \n \n }",
"public static void main(String[] args) throws ParseException {\n\n\t\tSet<String> fileNames = new HashSet<>(12);\n\t\tfileNames.add(\".idea\");\n\t\tfileNames.add(\"target\");\n\t\tfileNames.add(\"cache\");\n\t\tfileNames.add(\"caches\");\n\t\tfileNames.add(\"logs\");\n\t\tfileNames.add(\"log\");\n\n\t\tFile file = new File(\"D:\\\\workspace\\\\keynes-workspace\");\n\t\tdelete(file, fileNames);\n\n\n\n\t}",
"@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}",
"@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}",
"void unsetLegs();",
"private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}",
"public void cleanSlate(View view) {\n Log.d(LOG, \"in cleanSlate\");\r\n dbh.deleteAllData();\r\n Log.d(LOG, \"all data deleted\");\r\n }"
] | [
"0.6144876",
"0.5702905",
"0.5667618",
"0.56537753",
"0.5583025",
"0.55692846",
"0.55446076",
"0.55446076",
"0.5496865",
"0.5413141",
"0.5402984",
"0.53688467",
"0.5355029",
"0.5305487",
"0.5276265",
"0.5249503",
"0.5248269",
"0.52482057",
"0.52482057",
"0.52482057",
"0.52399343",
"0.52162415",
"0.52161986",
"0.5215436",
"0.5188717",
"0.5188717",
"0.5188717",
"0.5188717",
"0.517129",
"0.5160147",
"0.5144988",
"0.5140699",
"0.51383156",
"0.5133212",
"0.51265275",
"0.51202494",
"0.512006",
"0.5102674",
"0.5085156",
"0.50810707",
"0.5054346",
"0.50446373",
"0.5020641",
"0.5017508",
"0.5007863",
"0.50028867",
"0.50006694",
"0.49961904",
"0.49957117",
"0.4994763",
"0.4985971",
"0.498499",
"0.497158",
"0.495707",
"0.49567863",
"0.49536648",
"0.4952336",
"0.49368432",
"0.4935721",
"0.49311152",
"0.4918903",
"0.4913546",
"0.49081868",
"0.48996446",
"0.48921967",
"0.489087",
"0.48814997",
"0.48810726",
"0.48711213",
"0.48580155",
"0.48445225",
"0.48429057",
"0.48366153",
"0.48346126",
"0.483299",
"0.4830724",
"0.4828036",
"0.48189157",
"0.4817955",
"0.4814116",
"0.48128134",
"0.48109016",
"0.4806265",
"0.48052454",
"0.4801177",
"0.47987998",
"0.47979912",
"0.47930324",
"0.47886127",
"0.47886127",
"0.47825554",
"0.47810572",
"0.47790456",
"0.47740516",
"0.47679654",
"0.4767181",
"0.47619393",
"0.475069",
"0.47504658",
"0.4749461"
] | 0.7424389 | 0 |
Deletes branch from projects | Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteBranch(String branch)\r\n \t{\r\n \t\tthis.deleteBranch(branch, false);\r\n \t}",
"void removeBranch(TRepo repo, String branchName);",
"public void delete(Integer branch_id) {\n branch_dao.delete(branch_id);\n }",
"public void deleteProject(Long projectId);",
"@Override\n\tpublic void deleteProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}",
"void deleteProject(String projectKey);",
"@Transactional\n\t@Override\n\tpublic void deleteBranch(Integer idBranch) {\n\t\tcall = new SimpleJdbcCall(jdbcTemplate).withProcedureName(\"delete_branch\");\n\t\tSqlParameterSource src = new MapSqlParameterSource()\n\t\t\t\t.addValue(\"Pid_branch\", idBranch);\n\t\t\n\t\tcall.execute(src);\n\t\t\n\t}",
"private static void removeBranch(Gitlet currCommit, String[] args) {\n if (args.length != 2) {\n System.out.println(\"Please input a branch name\");\n\n } else if (currCommit.tree.getCurrentBranch().equals(args[1])) {\n System.out.println(\"Cannot remove the current branch.\");\n\n } else if (!currCommit.tree.getBranches().contains(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n\n } else {\n currCommit.tree.removeBranch(args[1]);\n currCommit.status.removeBranch(args[1]);\n addSerializeFile(currCommit);\n }\n }",
"void deleteByProjectId(Long projectId);",
"public void removeBranch() {\n if (LogWriter.needsLogging(LogWriter.TRACE_DEBUG))\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"removeBranch()\");\n Via via=(Via)sipHeader;\n \n via.removeParameter(Via.BRANCH);\n }",
"void deleteTrackerProjects(final Integer id);",
"@Override\n\tpublic void deleteTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}",
"public void removeBranch(String branchName) {\n File removedBranch = new File(Main.ALL_BRANCHES, branchName);\n if (!removedBranch.exists()) {\n System.out.println(\"A branch with that name does not exist.\");\n } else {\n if (branchName.equals(Utils.readObject(HEADNAME, String.class))) {\n System.out.println(\"Cannot remove the current branch.\");\n } else {\n removedBranch.delete();\n }\n }\n }",
"@Override\n\tpublic Integer delProject(ProjectInfo project) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProject\", project);\n\t}",
"Map<Project, JGitStatus> checkoutBranch(List<Project> projects, Branch branch, ProgressListener progress);",
"public static void deleteAndRevert(IProject project) throws CoreException {\n deleteAndRevert(new IProject[] { project });\n }",
"@Override\r\n\tpublic int deleteProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"@DeleteMapping(\"/deleteProject/{projectId}\")\r\n\tpublic void deleteProject(@PathVariable String projectId) {\r\n\r\n\t\tpersistenceService.deleteProject(projectId);\r\n\t}",
"@Path (\"project/{repositoryId}/{groupId}/{projectId}\")\n @DELETE\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus deleteProject( @PathParam (\"groupId\") String groupId, @PathParam (\"projectId\") String projectId,\n @PathParam (\"repositoryId\") String repositoryId )\n throws ArchivaRestServiceException;",
"Ack deleteFilter(ID branchId, String name);",
"public void deleteBranch(int id) {\n Node<T> delNode = search(id);\n Node<T> parent = delNode.getParent();\n if (delNode.getParent() != null) {\n Collection<Node<T>> children = parent.getChildren();\n for (Node<T> child : children) {\n if (child.getId() == id) child = null;\n }\n }\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete TaskProject : {}\", id);\n taskProjectRepository.delete(id);\n taskProjectSearchRepository.delete(id);\n }",
"@Override\n\tpublic Integer delProjectBatch(List<ProjectInfo> projList) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProjectBatch\", projList);\n\t}",
"@Override\n\tpublic String deleteByPrimaryKey(Familybranch record, Model m) throws Exception {\n\t\treturn null;\n\t}",
"void deleteRepository(URL repositoryUrl);",
"public void rmBranch(String branchName) {\n\t\tif (branchName.equals(myHead.branchName())) {\n\t\t\tSystem.out.println(\"Cannot remove the current branch.\");\n\t\t} else if (myBranch.containsKey(branchName)) {\n\t\t\tmyBranch.remove(branchName);\n\t\t} else {\n\t\t\tSystem.out.println(\"A branch with that name does not exist.\");\n\t\t}\n\t\tSerialization();\n\t}",
"public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}",
"@Override\n\tpublic int boardDelete(SpringBoardVO bvo) {\n\t\treturn springBoardDAO.boardDelete(bvo);\n\t}",
"@Override\n public void removeProject(Project project) {\n TracCommand command = new TracRemoveProjectCommand(configuration, project);\n try {\n success = executor.executeSync(command);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n logger.error(e.getMessage(), e);\n }\n }",
"private void deleteRepository() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tint opt = JOptionPane.showConfirmDialog(this, \"Delete entire Repository (all change sets) at \"+ repURLFld.getText()+\" ?\", \"Delete All\", JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\r\n\t\t\t// delete repository header\r\n\t\t\tif (repHeaderLoc!=null) {\r\n\t\t\t\tclient.delete(this.repHeaderLoc);\r\n\t\t\t\tSystem.out.println(\"Deleted Repository Header at \" + repHeaderLoc);\r\n\t\t\t}\r\n\t\t\telse System.out.println(\"URL location of Repository Header not known\");\r\n\t\t\t\r\n\t\t\t// delete all commits at Version Controlled Repository\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tURL loc = null;\r\n\t\t\t\tif (versionNodes[ctr]!=null) {\r\n\t\t\t\t\tloc = versionNodes[ctr].location;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI.toString()+\"#\"+String.valueOf(ctr));\r\n\t\t\t\t\tSet versionSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\tloc = ((Description) versionSet.iterator().next()).getLocation();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tclient.delete(loc);\r\n\t\t\t\tSystem.out.println(\"Deleted Version at \"+loc);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}",
"public void testProjectDelete() {\n \t\t// create the project\n \t\tIProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\t// set some settings\n \t\tString qualifier = getUniqueString();\n \t\tString key = getUniqueString();\n \t\tString value = getUniqueString();\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tPreferences node = context.getNode(qualifier);\n \t\tPreferences parent = node.parent().parent();\n \t\tnode.put(key, value);\n \t\tassertEquals(\"1.0\", value, node.get(key, null));\n \n \t\ttry {\n \t\t\t// delete the project\n \t\t\tproject.delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"2.0\", e);\n \t\t}\n \n \t\ttry {\n \t\t\t// project pref should not exist\n \t\t\tassertTrue(\"3.0\", !parent.nodeExists(project.getName()));\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"3.1\", e);\n \t\t}\n \n \t\t// create a project with the same name\n \t\tensureExistsInWorkspace(project, true);\n \n \t\t// ensure that the preference value is not set\n \t\tassertNull(\"4.0\", context.getNode(qualifier).get(key, null));\n \t}",
"@Override\r\n\tpublic int delete(int cms_bno) throws Exception {\n\t\treturn sql.delete(\"cms_board.delete\", cms_bno);\r\n\t}",
"public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}",
"public void testBranch() throws Exception {\n IProject project = createProject(\"testBranch\", new String[] { \"changed.txt\", \"deleted.txt\", \"folder1/\", \"folder1/a.txt\", \"folder1/b.txt\", \"folder1/subfolder1/c.txt\" });\n \n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_ONE), new CVSTag(\"b1\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFolder(\"folder1\") }, IResource.DEPTH_ONE), new CVSTag(\"b2\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project.getFile(\"folder1/subfolder1/c.txt\") }, IResource.DEPTH_ZERO), new CVSTag(\"b3\", CVSTag.BRANCH));\n branch(asResourceMapping(new IResource[] { project }, IResource.DEPTH_INFINITE), new CVSTag(\"b4\", CVSTag.BRANCH));\n }",
"public void deleteTemporaryProject() throws CoreException{\n\t\tString versionName = DataManager.getProjectVersion();\n\t\tajdtHandler.deleteProject(versionName);\n\t\t\n\t\tif(versionName.contains(\"_Old\")){\n\t\t\tversionName = versionName.replace(\"_Old\", \"\");\n\t\t\tajdtHandler.deleteProject(versionName);\n\t\t}\n\t\t\n\t}",
"public boolean removeBranch(Integer e){\n\t\ttry{\n\t\t\tNode n = searchNodeRef(e);\n\t\t\tArrayList<Integer> lista = new ArrayList<>();\n\t\t\tpositionsPosAux(n, lista);\n\t\t\tcount = count - lista.size();\n\t\t\treturn n.father.removeSubtree(n);\n\t\t} catch (Exception exc) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Transactional\r\n public void delete(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".delete(long directProjectId)\";\r\n\r\n deleteEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }",
"public void deleteProject(String projectId) {\n\t\tString args[] = { projectId };\n\n\t\t// delete tasks\n\t\tdatabase.delete(Constants.TABLE_TASKS, Constants.COLUMN_PROJECTS_ID + \" = ?\", args);\n\n\t\t// delete the project\n\t\tdatabase.delete(Constants.TABLE_PROJECTS, Constants.COLUMN_ID + \" = ?\", args);\n\t}",
"@Override\n\tpublic String deleteByCondition(Familybranch con, Model m) throws Exception {\n\t\treturn null;\n\t}",
"public int delete(String id) {\n\treturn projectmapper.delete(id);\n}",
"public static void deleteAndRevert(IProject[] projects)\n throws CoreException {\n if (projects != null) {\n for (IProject project : projects) {\n if (project != null) {\n RevertAction revertAction = new RevertAction();\n revertAction.setAsync(false);\n revertAction.selectionChanged(null,\n new StructuredSelection(project));\n revertAction.runAction(false);\n\n if (project != null && project.exists()) {\n project.refreshLocal(IResource.DEPTH_INFINITE, null);\n project.accept(new IResourceVisitor() {\n\n public boolean visit(IResource resource)\n throws CoreException {\n ResourceAttributes attrs = resource\n .getResourceAttributes();\n if (attrs != null) {\n attrs.setReadOnly(false);\n try {\n resource.setResourceAttributes(attrs);\n } catch (CoreException e) {\n }\n }\n return true;\n }\n });\n project.delete(true, true, null);\n }\n }\n }\n }\n }",
"@RequestMapping(value = \"/project/{id}\", method = RequestMethod.DELETE)\n\tpublic Response deleteProject(@PathVariable Integer id) {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tBoolean isDelete = projectService.removeProjectData(id);\n\t\t\tif (isDelete) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"error while project delete \", e);\n\t\t}\n\t\treturn response;\n\t}",
"public void deleteProjectRecord(int pgId) {\n String sql = \"DELETE FROM Project_Commit_Record WHERE pgid=?\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n preStmt.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"void delete(String resourceGroupName, String hubName, String predictionName, Context context);",
"@RequestMapping(method = RequestMethod.DELETE, value = \"/branch/{branchCode}/accounts/{accountNumber}\")\n public void deleteAccountFromBranch(@PathVariable int accountNumber){\n accountService.deleteAccountFromBranch(accountNumber);\n }",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/projects\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionProject();",
"void delete(String resourceGroupName, String hubName, String predictionName);",
"void removeVersion(Workspace workspace, String absPath, String label)\n throws RepositoryException;",
"@Override\n\tpublic Integer removeProject(Integer projId) {\n\t\treturn sqlSession.delete(\"cn.sep.samp2.project.removeProject\", projId);\n\t}",
"public void deleteForum(Forum forum);",
"@Override\n\tpublic void deleteHashFile(boardDTO board) throws Exception {\n\t\tsqlSession.delete(namespace+\".deleteFile\",board);\n\t\tsqlSession.delete(namespace+\".deleteHashtag\",board);\n\t\tsqlSession.delete(namespace+\".likedelete\",board);\n\t}",
"public OperationReference queueDeleteProject(\r\n final UUID projectId) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final Map<String, Object> routeValues = new HashMap<String, Object>();\r\n routeValues.put(\"projectId\", projectId); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.DELETE,\r\n locationId,\r\n routeValues,\r\n apiVersion,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, OperationReference.class);\r\n }",
"public boolean deleteProject(Project p) {\n try {\n String delete = \"DELETE FROM PROJECTS WHERE PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(delete);\n ps.setString(1, p.getProjectId());\n\n ps.executeUpdate();\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return false;\n }\n }",
"void deleteAllCommentsOfProject(int projectId) throws SQLException;",
"public boolean deleteBuild(int buildId);",
"@Override\n public void delete(String id) {\n log.debug(\"Request to delete Projectproduct : {}\", id);\n projectproductRepository.delete(UUID.fromString(id));\n }",
"void discardBackupWorkspace(String projectId, String workspaceId, WorkspaceType workspaceType);",
"int deleteByExample(CliStaffProjectExample example);",
"@Test\n public void deleteMissingProjectTest() throws Exception {\n httpclient = HttpClients.createDefault();\n \n deleteUsers();\n \n String userId = createTestUser();\n\n //deleteProjects(userId);//all projects have already been deleted by server since deleteUsers();\n\n try {\n CloseableHttpResponse response = createProject(\"testProjectName1\", userId);\n // EntityUtils.consume(response.getEntity());\n String id1 = getIdFromResponse(response);\n response.close();\n\n response = createProject(\"testProjectName2\", userId);\n // EntityUtils.consume(response.getEntity());\n String id2 = getIdFromResponse(response);\n response.close();\n\n String missingId = id1 + id2; // making sure the ID is not present\n\n response = deleteProject(userId, missingId);\n\n int status = response.getStatusLine().getStatusCode();\n Assert.assertEquals(404, status);\n\n EntityUtils.consume(response.getEntity());\n response.close();\n } finally {\n httpclient.close();\n }\n }",
"@DeleteMapping(\"/project/{projectId}\")\n public Object doDelete(@PathVariable(\"projectId\") Long projectId) throws InvalidIdentifierException {\n service.deleteProjectById(projectId);\n return new ResponseTemplate(true, null);\n }",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/projects\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionProject(\n @QueryMap DeleteCollectionProject queryParameters);",
"@RequestMapping(value = \"/{branch}/stackRoom/{book}\", method = RequestMethod.DELETE)\n public String removeBookFromStock(@PathVariable String branch, @PathVariable String book) {\n branchBookService.removeBook(branch, book);\n return \"Success\";\n }",
"public UpdateandRemoveBranch() {\n initComponents();\n }",
"@DeleteMapping(\"/boards/{id}\")\n public ResponseEntity<Void> deleteBoard(@PathVariable Long id){\n boardRepository.deleteById(id);\n return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, false, ENTITY_NAME, id.toString())).build();\n }",
"@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}",
"@Override\r\n\tpublic int qaBoardDelete(QaBoardVO qavo) {\r\n\t\tSystem.out.println(\"QaBoardServiceImpl.qaBoardDelete SUCCESS >>> : \");\r\n\t\t\r\n\t\treturn qaBoardDao.qaBoardDelete(qavo);\r\n\t}",
"@Override\n public void deleteBacklog(String id) {\n backlogRepository.delete(id);\n }",
"@Override\r\n\tpublic ResponseEntity<String> deleteProject(String authToken , int projectId) throws ManualException{\r\n\t\tSession session=sessionFactory.openSession();\r\n\t\t\r\n\t\tResponseEntity<String> responseEntity=new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\r\n\t\t\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\t\tUser adminUser=session.get(User.class, authtable.getUser().getEmpId());\r\n\t\t\tif(adminUser.getUsertype().equals(\"Admin\")){\t\r\n\t\t\t\t\r\n\t\t\t\t\t/* get The Project */\r\n\t\t\t\t\tString hql = \"FROM project where projectId= \"+projectId ;\r\n\t\t\t\t\tQuery query = session.createQuery(hql);\r\n\t\t\t\t\tProject returnedProject=(Project)query.list().get(0);\r\n\t\t\t\t\r\n\t\t\t\t\t/* get user of that Project */\r\n\t\t\t\t\thql = \"FROM user where projectId=\"+returnedProject.getProjectId() ;\r\n\t\t\t\t\tquery = session.createQuery(hql);\r\n\t\t\t\t\tList<User> users=(List<User>)query.list();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Deleting project from users */\r\n\t\t\t\t\tfor(User user:users){\r\n\t\t\t\t\t\tuser.setProject(null);\r\n\t\t\t\t\t\tsession.persist(user);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t/* delete from project table */\r\n\t\t\t\t\tif(returnedProject!=null){\r\n\t\t\t\t\t\tsession.delete(returnedProject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* entry in operation table */\r\n\t\t\t\t\tOperationImpl operationImpl= new OperationImpl();\r\n\t\t\t\t\toperationImpl.addOperation(session, adminUser, \"Deleted Project \"+ returnedProject.getProjectName());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.OK);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.UNAUTHORIZED);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tresponseEntity=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn responseEntity;\r\n\t\t}\r\n\t}",
"void deleteBlogPost(BlogPost blogPost);",
"public static void deleteAzkabanJob(String sessionId, AzkabanProjectConfig azkabanProjectConfig)\n throws IOException {\n log.info(\"Deleting Azkaban project for: \" + azkabanProjectConfig.getAzkabanProjectName());\n\n // Delete project\n AzkabanAjaxAPIClient.deleteAzkabanProject(sessionId, azkabanProjectConfig);\n }",
"public static void deleteGitRepository(Git repo) throws IOException {\n if (repo != null\n && repo.getRepository() != null\n && repo.getRepository().getDirectory() != null\n && repo.getRepository().getDirectory().exists()) {\n // This is literally the git directory, i.e. /some/hierarchy/repository/.git,\n // but we want to delete its parent directory.\n File gitDirectory = repo.getRepository().getDirectory();\n org.apache.commons.io.FileUtils.forceDelete(gitDirectory.getParentFile());\n }\n }",
"@Override\n\tpublic Boolean DeleteProductProjectWithSuite(List<Integer> ids) {\n\t\treturn productProjectWithSuiteDAO.DeleteProductProjectWithSuite(ids);\n\t}",
"public void deleteProject(String token, String projectKey) throws JiraManagerException {\r\n Util.logEnter(log, \"deleteProject\", token, projectKey);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkString(log, \"projectKey\", projectKey);\r\n\r\n try {\r\n getJiraManagementServicePort().deleteProject(token, projectKey);\r\n Util.logExit(log, \"deleteProject\");\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\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\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}",
"int deleteByExample(ProjGroupExample example);",
"@Override\r\n\tpublic int deleteBoard(BoardVO board) {\n\t\treturn 0;\r\n\t}",
"@RequestMapping(value=\"/deleteproject/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView deleteProject(@PathVariable(\"id\") String projectId) {\n\n\t\tdreamHomeService.deleteProject(Integer.parseInt(projectId));\n\t\t//model.addObject(\"successMessage\",\"Project deleted successfully\");\n\t\treturn new ModelAndView(\"redirect:/project/homepage\");\n\n\t}",
"void deleteDag(Long id);",
"@DeleteMapping(\"/band-pruebas/{id}\")\n @Timed\n public ResponseEntity<Void> deleteBandPrueba(@PathVariable Long id) {\n log.debug(\"REST request to delete BandPrueba : {}\", id);\n bandPruebaService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void delete() throws Exception {\n\n getConnection().do_Delete(new URL(getConnection().getFilemanagerfolderendpoint() + \"/\" + getId()),\n getConnection().getApikey());\n }",
"@Override\n\tpublic void likedelete(boardDTO board) throws Exception {\n\t\tsqlSession.delete(namespace+\".likedelete\", board);\n\t}",
"public void updateBranches() throws VcsException {\n VirtualFile root = getSelectedRoot();\n GitLineHandler handler = new GitLineHandler(myProject, root, GitCommand.BRANCH);\n handler.addParameters(\"--no-color\", \"-a\", \"--no-merged\");\n String output = ProgressManager.getInstance().runProcessWithProgressSynchronously(\n () -> Git.getInstance().runCommand(handler).getOutputOrThrow(),\n \"Preparing List of Branches\", true, myProject);\n myBranchChooser.clear();\n for (StringTokenizer lines = new StringTokenizer(output, \"\\n\", false); lines.hasMoreTokens();) {\n String branch = lines.nextToken().substring(2);\n myBranchChooser.addElement(branch, false);\n }\n }",
"public void deleteProject(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException {\n User currentUser = getMandatoryCurrentUser();\n Project project = getMandatoryProject(projectId);\n guaranteeUserIsSupervisor(\n currentUser, project, \"delete project\", \"they are not the \" + \"supervisor\");\n commentRepository.deleteAllCommentsOfProject(projectId);\n projectRepository.deleteProject(projectId);\n support.firePropertyChange(\n ProjectChangeablePropertyName.DELETE_PROJECT.toString(), OLD_VALUE, NEW_VALUE);\n }",
"@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}",
"public void deleteByChainAndGroupAndPath(int chainId, int groupId, String path) {\n log.info(\"start deleteByChainAndGroupAndPath. chainId:{} groupId:{} path:{}\", chainId, groupId, path);\n if (chainId <= 0 || groupId <= 0 || StringUtils.isBlank(path))\n throw new BaseException(ConstantCode.INVALID_PARAM_INFO.attach(\"require chainId>0 and groupId>0 and path not empty\"));\n\n\n TbContractExample example = new TbContractExample();\n TbContractExample.Criteria criteria = example.createCriteria();\n criteria.andChainIdEqualTo(chainId);\n criteria.andGroupIdEqualTo(groupId);\n criteria.andContractPathEqualTo(path);\n\n List<TbContract> contractList = tbContractMapper.selectByExample(example);\n if (CollectionUtils.isEmpty(contractList))\n return;\n\n long deployCount = contractList.stream().filter(c -> ContractStatus.DEPLOYED.getValue() == c.getContractStatus()).count();\n if (deployCount > 0)\n throw new BaseException(ConstantCode.CONTRACT_HAS_BEAN_DEPLOYED);\n\n tbContractMapper.deleteByExample(example);\n }",
"@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tcomproRepository.deleteById(id);\n\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete ProjectTransactionRecord : {}\", id);\n projectTransactionRecordRepository.delete(id);\n }",
"int deleteByExample(UserOperateProjectExample example);",
"public void removeProject(Project item){\n\t\tCollection<Task> delTasks = new ArrayList<Task>();\n\t\tfor ( Task task : m_Tasks ){\n\t\t\tif( task.project.equals(item.m_Name) ) delTasks.add(task);\n\t\t}\n\t\t\n\t\tfor(Task task: delTasks){\n\t\t\tm_Tasks.remove(task);\n\t\t}\n\t\tm_Projects.remove(item);\n\t}",
"public void removeSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tfinal Project[] items = selectedItems.toArray(new Project[selectedItems.size()]);\n\t\t\tfinal Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t\t\talert.initOwner(getWindow());\n\t\t\tif (selectedItems.size() > 1) {\n\t\t\t\talert.setTitle(String.format(\"Remove selected Projects from list? - %s items selected\",\n\t\t\t\t\t\tselectedItems.size()));\n\t\t\t} else {\n\t\t\t\talert.setTitle(\"Remove selected Project from list? - 1 item selected\");\n\t\t\t}\n\t\t\talert.setHeaderText(\"\"\"\n\t\t\t Are you sure you want to remove the selected projects?\n\t\t\t This will not remove any files from the project.\n\t\t\t \"\"\");\n\t\t\tfinal Optional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\tfor (final Project p : items) {\n\t\t\t\t\tprojectService.deleteProject(p);\n\t\t\t\t\tprojectsObservable.remove(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean removeBranch(int branchId)\n\t{\n\t\tList<Branch> branches = this.company.getBranches();\n\t\tList<Stock> stocks = this.company.getStocks();\n\t\tint stockIndex;\n\n\t\t// find the branch with the id of branchId\n\t\tfor(int i=0; i<branches.length(); i++)\n\t\t{\n\t\t\tif(branches.get(i).getBranchId() == branchId)\n\t\t\t{\n\t\t\t\t// get stockId\n\t\t\t\tstockIndex = branches.get(i).getStockIndex();\n\t\t\t\t\n\t\t\t\t// remove stock\n\t\t\t\tfor(int j=0; j<stocks.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tif(stocks.get(j).getId() == stockIndex)\n\t\t\t\t\t{\n\t\t\t\t\t\t// stocks.remove(stockIndex);\n\t\t\t\t\t\tstocks.remove(j);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// remove branch\n\t\t\t\tbranches.remove(i);\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\n\t}",
"@DeleteMapping(\"/projects/{projectName:\" + Constants.ENTITY_ID_REGEX + \"}\")\n @Timed\n public ResponseEntity<?> deleteProject(@PathVariable String projectName)\n throws NotAuthorizedException {\n checkPermission(token, PROJECT_DELETE);\n log.debug(\"REST request to delete Project : {}\", projectName);\n ProjectDTO projectDto = projectService.findOneByName(projectName);\n checkPermissionOnOrganizationAndProject(token, PROJECT_DELETE,\n projectDto.getOrganization().getName(), projectDto.getProjectName());\n\n try {\n projectService.delete(projectDto.getId());\n return ResponseEntity.ok()\n .headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, projectName))\n .build();\n } catch (DataIntegrityViolationException ex) {\n return ResponseEntity.badRequest()\n .body(new ErrorVM(ERR_PROJECT_NOT_EMPTY, ex.getMessage()));\n }\n }",
"void removeFromMyProjects(String userId,\n String projectGUID) throws InvalidParameterException,\n PropertyServerException,\n UserNotAuthorizedException;",
"public int deleteByPrimaryKey(Long id) {\r\n ProjectFiles key = new ProjectFiles();\r\n key.setId(id);\r\n int rows = getSqlMapClientTemplate().delete(\"project_files.ibatorgenerated_deleteByPrimaryKey\", key);\r\n return rows;\r\n }",
"@Override\n\tpublic int deleteProject(int ownerAccountId, int id)\n\t\t\tthrows Exception {\n\t\tif (ownerAccountId <= 0 || id <= 0)\n\t\t\treturn 0;\n\t\ttry {\n\t\t\treturn deleteDomainObject(ownerAccountId, id);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\t\t}\n\t}",
"@RequestMapping(\"/deleteBoard/{board_id}\")\n public String deleteBoard(@PathVariable(value = \"board_id\") String board_id,\n Authentication auth)\n throws ResourceNotFoundException {\n ResponseEntity<Board> result = boardController.getBoardById(board_id);\n if(result.getStatusCode().is2xxSuccessful() && result.getBody() != null) {\n Board board = result.getBody();\n\n if (board != null && board.getUserId().equals(auth.getName())) {\n boardController.deleteBoard(board_id);\n return \"redirect:/\";\n }\n else\n return \"errorPages/403\";\n }\n\n return \"errorPages/404\";\n }",
"public void dydelete(int bno) {\n\t\t\n\t\tDBConn dbconn = DBConn.getDB();\n\t\tConnection conn=null;\n\t\ttry {\n\t\t\tconn=dbconn.getConn();\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\tDYBoardDAO dao = DYBoardDAO.getdao();\n\t\t\tdao.dydelete(conn,bno);\n\t\t\t\n\t\t\tconn.commit();\n\t\t}catch(NamingException | SQLException e) {\n\t\t\tSystem.out.println(e);\n\t\t}finally {\n\t\t\tif(conn!=null)try {conn.close();}catch(SQLException e) {}\n\t\t}\n\t}",
"@Path (\"projectVersion/{repositoryId}/{namespace}/{projectId}/{version}\")\n @DELETE\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus removeProjectVersion( @PathParam ( \"repositoryId\" ) String repositoryId,\n @PathParam ( \"namespace\" ) String namespace, @PathParam ( \"projectId\" ) String projectId,\n @PathParam ( \"version\" ) String version )\n throws ArchivaRestServiceException;",
"public boolean removeBranch(Integer element) {\n Node aux = searchNodeRef(element, root);\n if (aux == null) return false;\n\n Node pai = aux.father;\n pai.removeSubtree(aux);\n return true;\n }",
"public void delete(){\n if (shx!=null) shx.delete();\n if (shp!=null) shp.delete();\n if (dbf!=null) dbf.delete();\n if (prj!=null) prj.delete();\n }"
] | [
"0.7328947",
"0.72864825",
"0.69007176",
"0.6655381",
"0.6328135",
"0.62947273",
"0.62387097",
"0.62092924",
"0.61567557",
"0.6091449",
"0.60697395",
"0.6020866",
"0.59978914",
"0.5992192",
"0.5927874",
"0.58928293",
"0.5875343",
"0.58426034",
"0.58196044",
"0.57538927",
"0.5741527",
"0.57047164",
"0.56397593",
"0.5620653",
"0.5619201",
"0.5569229",
"0.5487984",
"0.5487099",
"0.5476603",
"0.54694045",
"0.5440409",
"0.5439098",
"0.5433183",
"0.541955",
"0.54167503",
"0.5392648",
"0.53890276",
"0.5381831",
"0.53787655",
"0.5372995",
"0.53625107",
"0.5350263",
"0.5348205",
"0.5342041",
"0.53357273",
"0.5315319",
"0.53059703",
"0.5271541",
"0.5260755",
"0.5258979",
"0.5252066",
"0.5235506",
"0.5217387",
"0.52168036",
"0.52106416",
"0.52045864",
"0.51890904",
"0.5187712",
"0.5187172",
"0.51834536",
"0.515755",
"0.5157035",
"0.51524776",
"0.5125659",
"0.5124355",
"0.5121315",
"0.5119988",
"0.510931",
"0.5102943",
"0.5093812",
"0.50920516",
"0.50850374",
"0.5083398",
"0.5081535",
"0.5069416",
"0.5063789",
"0.5052218",
"0.5048733",
"0.5046261",
"0.5027158",
"0.5022991",
"0.5022193",
"0.50115335",
"0.5001093",
"0.4999615",
"0.4992945",
"0.49919355",
"0.49911842",
"0.4991076",
"0.4989213",
"0.49862987",
"0.4981347",
"0.4975218",
"0.49570164",
"0.49531552",
"0.49525306",
"0.4950794",
"0.49504986",
"0.49488",
"0.49450704"
] | 0.7823044 | 0 |
/ GETTERS E SETTERS | public float getSalario() {
return salario;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Set method_1559();",
"public void setdat()\n {\n }",
"private void assignment() {\n\n\t\t\t}",
"String setValue();",
"void setParameters() {\n\t\t\n\t}",
"private void setUIFields(){\n setImage();\n setTitle();\n setLocation();\n setRatingBar();\n setDate();\n setISBN();\n setDescription();\n setPageCount();\n setNumRatings();\n }",
"private void setUserData(){\n }",
"private void setData() {\n\n }",
"@Test\n\tpublic void testSet() {\n\t}",
"public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }",
"private void setOtherParam(Settings set) {\n URL_SQL_RU = set.getValue(\"app.urlSqlRu\");\n NAME_DATA_BASE = set.getValue(\"app.nameDataBase\");\n DAT_NAME = set.getValue(\"app.datName\");\n VACANCY = set.getValue(\"app.vacancy\");\n TABLE_NAME = set.getValue(\"app.tableName\");\n ZERO = Integer.parseInt(set.getValue(\"app.zero\"));\n SKIP_ROW = Integer.parseInt(set.getValue(\"app.skipRow\"));\n CLASS = set.getValue(\"app.class\");\n POSTS_LIST_TOPIC = set.getValue(\"app.postsListTopic\");\n LAST_YEAR = set.getValue(\"app.lastYear\");\n }",
"@Override\n\tpublic void set() {\n\t\tSystem.out.println(\"A==========set\");\n\t}",
"@Test\r\n\tpublic void testGettersSetters()\r\n\t{\r\n\t\tPerson p = new Person(42);\r\n\t\tp.setDisplayName(\"Fred\");\r\n\t\tassertEquals(\"Fred\", p.getFullname());\r\n\t\tp.setPassword(\"hunter2\");\r\n\t\tassertEquals(\"hunter2\", p.getPassword());\r\n\t\tassertEquals(42, p.getID());\r\n\t}",
"public void setAge(int age) { this.age = age; }",
"public String setter() {\n\t\treturn prefix(\"set\");\n\t}",
"public void setValor(String valor)\n/* 22: */ {\n/* 23:34 */ this.valor = valor;\n/* 24: */ }",
"public void limpiarCampos() {\n\t\ttema = new Tema();\n\t\ttemaSeleccionado = new Tema();\n\t\tmultimedia = new Multimedia();\n\t}",
"public void setRes(){\r\n \r\n }",
"@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}",
"private void initValues() {\n \n }",
"public void setupProperties() {\n // left empty for subclass to override\n }",
"@Test\n public void testGetSets() {\n ref.setKey(\"test23\");\n assertEquals(\"test23\", ref.getKey());\n ref.setAuthor(\"test23\");\n assertEquals(\"test23\", ref.getAuthor());\n ref.setEditor(\"test23\");\n assertEquals(\"test23\", ref.getEditor());\n ref.setTitle(\"test23\");\n assertEquals(\"test23\", ref.getTitle());\n ref.setBooktitle(\"test23\");\n assertEquals(\"test23\", ref.getBooktitle());\n ref.setYear(\"1839\");\n assertEquals(\"1839\", ref.getYear());\n ref.setPublisher(\"Otava\");\n assertEquals(\"Otava\", ref.getPublisher());\n ref.setJournal(\"test23\");\n assertEquals(\"test23\", ref.getJournal());\n ref.setVolume(\"3\");\n assertEquals(\"3\", ref.getVolume());\n ref.setNumber(\"123\");\n assertEquals(\"123\", ref.getNumber());\n ref.setSeries(\"test23\");\n assertEquals(\"test23\", ref.getSeries());\n ref.setEdition(\"3rd\");\n assertEquals(\"3rd\", ref.getEdition());\n ref.setPages(\"12-35\");\n assertEquals(\"12-35\", ref.getPages());\n ref.setMonth(\"May\");\n assertEquals(\"May\", ref.getMonth());\n ref.setNote(\"test23\");\n assertEquals(\"test23\", ref.getNote());\n }",
"public void setX(int x) { this.x=x; }",
"public void set() {\r\n\t\tage = 19;\r\n\t\tname = \"ΎΛ·»\";\r\n\t\theight = 161;\r\n\t\tsetWeight(50);\r\n\t\tSystem.out.println(getWeight());\r\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t}",
"void set(T t);",
"@Override\n\tprotected void setParameterValues() {\n\t}",
"void set(Model model);",
"@Override\n\tpublic void set(T e) {\n\t\t\n\t}",
"@Override\npublic void setAttributes() {\n\t\n}",
"public void setEnqueteur(Enqueteur enqueteur)\r\n/* */ {\r\n/* 65 */ this.enqueteur = enqueteur;\r\n/* */ }",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"private void set(){\n resetBuffer();\n }",
"@Override\n\tprotected void setValueOnUi() {\n\n\t}",
"SetCommand getSetl();",
"public void setItems(){\n }",
"private void set(String sEmailTag, String sFirstNameTag, String sIdTag, String sLastNameTag)\r\n\t{\r\n\t\tthis.sEmailTag = sEmailTag;\r\n\t\tthis.sFirstNameTag = sFirstNameTag;\r\n\t\tthis.sIdTag = sIdTag;\r\n\t\tthis.sLastNameTag = sLastNameTag;\r\n\t\t\r\n\t}",
"public void setNombre(String nombre) {this.nombre = nombre;}",
"@Override\n\tpublic void setData() {\n\n\t}",
"public int getSet() {\n return set;\n }",
"public void setX(int x);",
"protected void setupParameters() {\n \n \n\n }",
"public abstract void set(DataType x, DataType y, DataType z);",
"@Test\n public void testSongGettersSetters() {\n Integer id = 4;\n String title=\"title\",uri = \"uri\";\n\n Song song = new Song();\n song.setId(id);\n song.setTitle(title);\n song.setUri(uri);\n\n assertEquals(\"Problem with id\",id, song.getId());\n assertEquals(\"Problem with title\",title, song.getTitle());\n assertEquals(\"Problem with uri\",uri, song.getUri());\n }",
"private void setValues() {\n textViewPrice = findViewById(R.id.textViewPrice);\n textViewStoreName = findViewById(R.id.textViewStoreName);\n textViewLocation = findViewById(R.id.textViewLocation);\n buttonAcceptOrder = findViewById(R.id.buttonAcceptOrder);\n\n order = Parcels.unwrap(getIntent().getParcelableExtra(Order.class.getSimpleName()));\n\n textViewPrice.setText(\"$\" + decimalFormat.format(order.getPrice()));\n textViewStoreName.setText(\"Store: \"+ order.getStore().getName());\n textViewLocation.setText(\"Address: \" + order.getStore().getAddress());\n }",
"public void setNewValues(){\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n time = simTime.getText();\n simulation.setTime(time);\n simulation.setD(doorT);\n simulation.setP(phoneT);\n simulation.setQ(questionT);\n }",
"@Override\r\n\tpublic void get() {\n\t\t\r\n\t}",
"protected void initVars() {}",
"@Test\r\n public void testSetValor() {\r\n \r\n }",
"@Override\n\tpublic void initializeValues() {\n\n\t}",
"void setAge(int age);",
"public void setAge(int age);",
"@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}",
"public abstract void set(M newValue);",
"@Test\n public void setterTest() {\n stack.setResource(10, ResourceType.SHIELDS);\n stack.setResource(20, ResourceType.SERVANTS);\n stack.setResource(30, ResourceType.COINS);\n stack.setResource(40, ResourceType.STONES);\n\n assertEquals(10, stack.getResource(ResourceType.SHIELDS));\n assertEquals(20, stack.getResource(ResourceType.SERVANTS));\n assertEquals(30, stack.getResource(ResourceType.COINS));\n assertEquals(40, stack.getResource(ResourceType.STONES));\n }",
"@Before\r\n\tpublic void set()\r\n\t{\n\t\tif (!Message.configure(\"wordsweeper.xsd\")) {\r\n\t\t\tfail (\"unable to configure protocol\");\r\n\t\t}\r\n\t\tModel.serverAccess = mockServer;\r\n\t\tModel.gameLayout = gameLayout;\r\n\t\tModel.GAME = game;\r\n\t\tModel.PLAYER = player;\r\n\t\tModel.BOARD = board;\r\n\t\tModel.gameLayout.setLayout();\r\n\t\tModel.gameLayout.addListener();\r\n\t}",
"public void setNombre(String nombre)\r\n/* 65: */ {\r\n/* 66: 76 */ this.nombre = nombre;\r\n/* 67: */ }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private void setValues() {\n //Calls for new assessment\n Assessment assessment = new Assessment();\n //Updates the local db assessmentDao with courseID and assessment ID\n assessment = db.assessmentDao().getAssessment(courseID, assessmentID);\n //Gets the assessment details name\n String name = assessment.getAssessment_name();\n //Gets the assessment details type\n String type = assessment.getAssessment_type();\n //Gets the assessment details status\n String status = assessment.getAssessment_status();\n //Gets the assessment details date\n String dDate = DateFormat.format(\"MM/dd/yyyy\", assessment.getAssessment_due_date()).toString();\n boolean alert1 = assessment.getAssessment_alert();\n //Gets the assessment details alert bar\n String alert = \"Off\";\n if (alert1) {\n alert = \"On\";\n }\n //Sets assessment details Name\n adName.setText(name);\n //Sets assessment details type\n adType.setText(type);\n //Sets assessment details status\n adStatus.setText(status);\n //Sets assessment details due date\n adDueDate.setText(dDate);\n //Sets assessment details alert\n adAlert.setText(alert);\n }",
"private SetProperty(Builder builder) {\n super(builder);\n }",
"@Override\n public void saveValues() {\n \n }",
"private void setData() {\n populateInterfaceElements();\n }",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void setNombre(String nombre) {\r\n\tthis.nombre = nombre;\r\n}",
"protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}",
"private void set(int x, int i) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"protected abstract void setSpl();",
"public void setName(String name){this.name=name;}",
"@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}",
"@Override\n\tpublic void setValue(String arg0, String arg1) {\n\t\t\n\t}",
"@Override\n\tprotected void initdata() {\n\n\t}",
"public void setU(String f){\n u = f;\n}",
"public Setparam() {\r\n super();\r\n }",
"public void setEjercicio(Ejercicio ejercicio)\r\n/* 150: */ {\r\n/* 151:193 */ this.ejercicio = ejercicio;\r\n/* 152: */ }",
"public void setProp(String key, String value){\t\t\n \t\t//Check which of property to set & set it accordingly\n \t\tif(key.equals(\"UMPD.latestReport\")){\n \t\t\tthis.setLatestReport(value);\n<<<<<<< HEAD\n\t\t} \n=======\n \t\t\treturn;\n \t\t} \n \t\tif (key.equals(\"UMPD.latestVideo\")) {\n \t\t\tthis.setLastestVideo(value);\n \t\t\treturn;\n \t\t}\n>>>>>>> 45a14c6cf04ac0844f8d8b43422597ae953e0c42\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return - a list of <code>FieldAndval</code> objects representing the set \n \t * properties\n \t */\n \tpublic ArrayList<FieldAndVal> getSetPropsList(){\n \t\tcreateSetPropsList();\n \t\treturn setPropsList;\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * \n \t */\n \tprivate void createSetPropsList(){\n \t\tif((this.latestReport).length()>0){\n \t\t\tsetPropsList.add(new FieldAndVal(\"UMPD.latestReport\", this.latestReport));\n \t\t}\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return lastestVideo - \n \t */\n \tpublic String getLastestVideo() {\n \t\treturn lastestVideo;\n \t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"public void setNumero(int numero)\r\n/* 195: */ {\r\n/* 196:206 */ this.numero = numero;\r\n/* 197: */ }",
"@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}",
"public void setModified();",
"@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupEndValues() {\n }",
"public void set(int i) {\n }",
"@Override\n public void afterPropertiesSet() {\n }",
"public T set(T obj);",
"public void set(boolean bol);",
"public void setAll()\r\n\t{\r\n\t\tthis.coderVersion = CaTIESProperties.getValue(\"caties.coder.version\");\r\n\t\tthis.gateHome = CaTIESProperties.getValue(\"caties.gate.home\");\r\n\t\tthis.creoleUrlName = CaTIESProperties.getValue(\"caties.creole.url.name\");\r\n\t\tthis.caseInsensitiveGazetteerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.case.insensitive.gazetteer.url.name\");\r\n\t\tthis.caseSensitiveGazetteerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.case.sensitive.gazetteer.url.name\");\r\n\t\tthis.sectionChunkerUrlName = CaTIESProperties.getValue(\"caties.section.chunker.url.name\");\r\n\t\tthis.conceptFilterUrlName = CaTIESProperties.getValue(\"caties.concept.filter.url.name\");\r\n\t\tthis.negExUrlName = CaTIESProperties.getValue(\"caties.neg.ex.url.name\");\r\n\t\tthis.conceptCategorizerUrlName = CaTIESProperties\r\n\t\t\t\t.getValue(\"caties.concept.categorizer.url.name\");\r\n\t}",
"public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }",
"protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t\tCursurIndex = 1;\n\t\t\n\t}",
"@Test\n public void testSetNombre() {\n System.out.println(\"setNombre\");\n String nombre = \"T-3\";\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setNombre(nombre);\n \n }",
"@Override\n protected void getExras() {\n }",
"public void set(int i);",
"@Override\n protected void updateProperties() {\n }",
"public void set(String s);",
"public Var_Act_Data(Action_Type type, Variable v1, Variable v2, int set_value) {\r\n super(type);\r\n var1 = v1;\r\n var2 = v2;\r\n set_val = set_value;\r\n }",
"public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }",
"@Override\n\tpublic void setAxioms() {\n\t\tthis.addTypeAxiom(vocabulary_ELSEWEB.getOWLClass_WCSCoverageSet());\n\t\taddDatasets();\n\t}",
"public void set(String name, Object value) {\n }",
"@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}"
] | [
"0.6995264",
"0.6628433",
"0.6313521",
"0.6295032",
"0.6219812",
"0.6118463",
"0.60684335",
"0.6044893",
"0.60216796",
"0.59746933",
"0.59573233",
"0.5939941",
"0.5925399",
"0.591699",
"0.58987266",
"0.5864009",
"0.5853081",
"0.58453995",
"0.581999",
"0.58108646",
"0.5809565",
"0.5783833",
"0.57796943",
"0.5779095",
"0.5761511",
"0.5755308",
"0.57537735",
"0.5751743",
"0.57502717",
"0.5748726",
"0.5731388",
"0.57213163",
"0.5720613",
"0.5699155",
"0.5693977",
"0.569306",
"0.568986",
"0.5687045",
"0.56848645",
"0.5683264",
"0.5679383",
"0.56768167",
"0.56752396",
"0.56745887",
"0.5671047",
"0.5656788",
"0.56552875",
"0.56446433",
"0.5643539",
"0.5630846",
"0.56305844",
"0.5625011",
"0.5621181",
"0.56133",
"0.56121486",
"0.56028",
"0.5599298",
"0.55955076",
"0.5587468",
"0.5584846",
"0.55804145",
"0.5576522",
"0.55759203",
"0.557257",
"0.55669236",
"0.5564471",
"0.55602586",
"0.5560066",
"0.55600595",
"0.55558157",
"0.5552785",
"0.5550964",
"0.55508447",
"0.5547347",
"0.5544286",
"0.55437255",
"0.55401266",
"0.55389565",
"0.553721",
"0.5530753",
"0.55247426",
"0.5519974",
"0.55195993",
"0.55149037",
"0.55121195",
"0.55106246",
"0.55064374",
"0.54991895",
"0.5498736",
"0.54966855",
"0.54936916",
"0.54927635",
"0.54859114",
"0.5485789",
"0.5485257",
"0.54756886",
"0.5473393",
"0.5470458",
"0.5467572",
"0.5467572",
"0.5467572"
] | 0.0 | -1 |
TODO: Warning this method won't work in the case the id fields are not set | @Override
public boolean equals(Object object) {
if (!(object instanceof Gerente)) {
return false;
}
Gerente other = (Gerente) object;
if ((this.id == null && other.getId() != null) || (this.id != null && !this.id.equals(other.getId()))) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setId(Integer id) { this.id = id; }",
"private Integer getId() { return this.id; }",
"public void setId(int id){ this.id = id; }",
"public void setId(Long id) {this.id = id;}",
"public void setId(Long id) {this.id = id;}",
"public void setID(String idIn) {this.id = idIn;}",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public int getId() { return id; }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public int getId(){ return id; }",
"public int getId() {return id;}",
"public int getId() {return Id;}",
"public int getId(){return id;}",
"public void setId(long id) {\n id_ = id;\n }",
"private int getId() {\r\n\t\treturn id;\r\n\t}",
"public Integer getId(){return id;}",
"public int id() {return id;}",
"public long getId(){return this.id;}",
"public int getId(){\r\n return this.id;\r\n }",
"@Override public String getID() { return id;}",
"public Long id() { return this.id; }",
"public Integer getId() { return id; }",
"@Override\n\tpublic Integer getId() {\n return id;\n }",
"@Override\n public Long getId () {\n return id;\n }",
"@Override\n public long getId() {\n return id;\n }",
"public Long getId() {return id;}",
"public Long getId() {return id;}",
"public String getId(){return id;}",
"@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}",
"public Integer getId() { return this.id; }",
"@Override\r\n public int getId() {\n return id;\r\n }",
"@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}",
"public int getId() {\n return id;\n }",
"public long getId() { return _id; }",
"public int getId() {\n/* 35 */ return this.id;\n/* */ }",
"public long getId() { return id; }",
"public long getId() { return id; }",
"public void setId(Long id) \n {\n this.id = id;\n }",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}",
"public void setId(String id) {\n this.id = id;\n }",
"@Override\n\tpublic void setId(Long id) {\n\t}",
"public Long getId() {\n return id;\n }",
"public long getId() { return this.id; }",
"public int getId()\n {\n return id;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"protected abstract String getId();",
"@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getID() {return id;}",
"public int getID() {return id;}",
"public int getId ()\r\n {\r\n return id;\r\n }",
"@Override\n public int getField(int id) {\n return 0;\n }",
"public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }",
"public int getId(){\r\n return localId;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"@Override\n public Integer getId() {\n return id;\n }",
"@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"@Override\n public int getId() {\n return id;\n }",
"@Override\n public int getId() {\n return id;\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}",
"public int getId()\r\n {\r\n return id;\r\n }",
"public void setId(Long id){\n this.id = id;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"@java.lang.Override\n public int getId() {\n return id_;\n }",
"public abstract Long getId();",
"final protected int getId() {\n\t\treturn id;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"public void setId(Long id) \r\n {\r\n this.id = id;\r\n }",
"@Override\n public long getId() {\n return this.id;\n }",
"public String getId(){ return id.get(); }",
"public void setId(long id){\n this.id = id;\n }",
"public void setId(long id){\n this.id = id;\n }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"public Long getId() \n {\n return id;\n }",
"@Override\n\tpublic void setId(int id) {\n\n\t}",
"public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }",
"@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}",
"public int getID(){\n return id;\n }",
"public int getId()\n {\n return id;\n }",
"public String getID(){\n return Id;\n }"
] | [
"0.6895531",
"0.683832",
"0.6704498",
"0.6640818",
"0.6640818",
"0.6591583",
"0.65777755",
"0.65777755",
"0.6574026",
"0.6574026",
"0.6574026",
"0.6574026",
"0.6574026",
"0.6574026",
"0.6561151",
"0.6561151",
"0.65438837",
"0.6523999",
"0.6515456",
"0.64872324",
"0.6476735",
"0.6425959",
"0.6419064",
"0.6416284",
"0.64015174",
"0.6366202",
"0.63541335",
"0.63513803",
"0.6347729",
"0.63240737",
"0.6318773",
"0.63010424",
"0.62935",
"0.62935",
"0.6283119",
"0.6270895",
"0.62663114",
"0.6264497",
"0.6261593",
"0.6259148",
"0.62556595",
"0.6250053",
"0.6247276",
"0.6247276",
"0.624403",
"0.62387586",
"0.62387586",
"0.62315154",
"0.62233275",
"0.6220683",
"0.62193316",
"0.6211494",
"0.6208408",
"0.62009174",
"0.6200242",
"0.6191948",
"0.61891806",
"0.61891806",
"0.61891806",
"0.6188825",
"0.6188825",
"0.6183854",
"0.61836964",
"0.61738634",
"0.6173392",
"0.61668235",
"0.6165668",
"0.6160432",
"0.61560154",
"0.61560154",
"0.61560154",
"0.61560154",
"0.61560154",
"0.61560154",
"0.61560154",
"0.6155016",
"0.6155016",
"0.6141666",
"0.61330503",
"0.6128255",
"0.61273634",
"0.6105127",
"0.61036265",
"0.61036265",
"0.6102233",
"0.61020017",
"0.610197",
"0.60997236",
"0.609885",
"0.6094554",
"0.60921603",
"0.60921603",
"0.60913926",
"0.608967",
"0.6089629",
"0.6075595",
"0.60716206",
"0.6070724",
"0.60699046",
"0.6069756",
"0.60694796"
] | 0.0 | -1 |
/Locators ID (amazon) LinkText PartialLinkText Xpath Name (facebook) Tagname CSS Selector Classname How to open the browser | public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\wnnar\\eclipse-workspace\\SeleniumS\\Drivers\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.amazon.com");
driver.manage().window().maximize();
WebElement Search = driver.findElement(By.id("twotabsearchtextbox"));
Search.sendKeys("Phones");
WebElement SButton = driver.findElement(By.id("nav-search-submit-text"));
SButton.click();
/* Absolute Path and Relative Xpath
* 1) Open the facebook page
* 2)Enter the email and password
* 3) Click login
* 4) Click forgot password
* 5) come back to login page
* 6) Clcik to create an account
*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"HtmlPage clickLink();",
"HtmlPage clickSiteLink();",
"@When(\"^Click on Compose hyperlink icon$\")\npublic void click_on_Compose_hyperlink_icon() throws Throwable \n{\n\tWebElement p=driver.findElement(By.partialLinkText(\"Compose\"));\n p.click();\n System.out.println(\"Page title after link click : \" + driver.getTitle());\n \n\n\n}",
"HtmlPage clickSiteName();",
"@Test()\n\tpublic static void Homep1() {\n\t\t\n\t\tdriver= CallingChrome();\ndriver.navigate().to(\"https://www.spicejet.com/\");\n\t\t\n\n\t\t\n\t\tSystem.out.println(driver.findElement(By.xpath(\"//a[text()='Book']\")).getText());\t\n\t}",
"@Override\n\t\t\tpublic WebElement apply(WebDriver t) {\n\t\t\t\treturn t.findElement(By.xpath(\"//h3[contains(text(),'Oracle Cloud Applications')]//following::a[1]\"));\n\t\t\t}",
"@Test(priority=1)\r\n\tpublic void OpenURLA() {\r\n\t WebDriverManager.chromedriver().setup();\r\n\t\t\r\n\t driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n \r\n\t\t driver = new ChromeDriver();\r\n\t\t driver.get(\"https://www.amazon.in/\"); // Open the url in chrome browser page\r\n\t }",
"@Test\n @When(\"I navigate to Market\")\n public void s04_MarketOpen(){\n WebElement marketLink = driver.findElementByLinkText(\"Маркет\");\n marketLink.click();\n System.out.println(\"Step04 PASSED\");\n }",
"public static void goTo() {\n Browser.driver.get(\"https://www.amazon.co.uk/\");\n Browser.driver.manage().window().maximize();\n }",
"public WebElement ProfileManagementLink()\n{\n return driver.findElement(By.xpath(\".//*[@id='ibm-primary-links']/li[2]/a\"));\n}",
"public static void main(String[] args) {\n WebDriver driver = WebDriverFactory.getDriver(\"chrome\");\n driver.get(\"https://www.amazon.com/\");\n\n WebElement searchBox = driver.findElement(By.id(\"twotabsearchtextbox\"));\n searchBox.sendKeys(\"selenium cookbook\" + Keys.ENTER);\n\n WebElement searchedItem = driver.findElement(By.xpath(\"//span[.=\\\"Selenium Testing Tools Cookbook - Second Edition\\\"]\"));\n System.out.println(searchedItem.getText());\n if(searchedItem.isDisplayed()){\n System.out.println(\"pass\");\n }else{\n System.out.println(\"fail\");\n }\n\n\n\n }",
"public HtmlPage clickContentPath();",
"public static void main(String[] args) throws InterruptedException {\n\r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"F:\\\\Selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\t\t\t\r\n\t\t\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.google.co.in/\");\r\n\t\tWebElement t = driver.findElement(By.cssSelector(\"#tsf > div:nth-child(2) > div > div.RNNXgb > div > div.a4bIc > input\"));\r\n\t\t\r\n\t\tt.sendKeys(\"yify\");\r\n\t\t\tThread.sleep(3000);\r\n\t\t\t\r\n\t\t\tList<WebElement>r = driver.findElements(By.xpath(\"//ul[@role='listbox']//li/descendant::div[@class='sbtc']\"));\r\n\t\t\t\tint y =r.size();\r\n\t\t\t\tSystem.out.println(\"No of suggestion is \" + y);\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<y; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tString p = r.get(i).getText();\r\n\t\t\t\t\tSystem.out.println(p);\r\n\t\t\t\t\tif(p.contains(\"yify\"));\r\n\t\t\t\t\t{\r\n\t\t\t\t\t r.get(i).click();\r\n\t\t\t\t\t break;\r\n\t\t\t\t\t}\r\n\t\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\tList<WebElement> allLinkname = driver.findElements(By.tagName(\"h3\"));\r\n\t\t\r\n\t\r\n\t\t//Print the size of no of linkname present in alllinkname\r\n\t\t\r\n\t\tint size = allLinkname.size();\r\n\t\tSystem.out.println(size);\r\n\t\t\r\n\t\t//Printing there names in console\r\n\t\tfor (WebElement Link : allLinkname) {\r\n\t\t\t\r\n\t\t\tString value = Link.getText();\r\n\t\t\tSystem.out.println(value);\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i =0; i<size; i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tString value2 = allLinkname.get(i).getText();\r\n\t\t\tif (value2.equals(\"YTS: The Official Home of YIFY Movies Torrent Download\"))\r\n\t\t\t{\r\n\t\t\t\tallLinkname.get(i).click();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Printing name of yify window\r\n\t\tString yifywindow = driver.getWindowHandle();\r\n\t\tSystem.out.println(yifywindow);\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t\t\r\n\t\t\r\n\t\t// Storing all tab or window value in allwindow variable\r\n\t\t\r\n\t\tSet<String> allwindow = driver.getWindowHandles();\r\n\t\t// Printing the no of window\r\n\t\tSystem.out.println(allwindow.size());\r\n\t\t\r\n\t\t//Proof that still first window has power\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//Printing the exact values of each window\r\n\t\tSystem.out.println(allwindow);\r\n\t\t\r\n\t\t//Switch to second window\r\n\t\tfor (String child : allwindow) {\r\n\t\t\tif(!child.equals(yifywindow))\r\n\t\t\t{\r\n\t\t\t\tdriver.switchTo().window(child);\r\n\t\t\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\t\tdriver.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Again switch to yify window\r\n\t\tdriver.switchTo().window(yifywindow);\r\n\t\tSystem.out.println(driver.getCurrentUrl());\r\n\t\t\r\n\t\t//closing unwanted popup\r\n\t\t//driver.findElement(By.cssSelector(\"#id5c2a23c1c4close-cross5c2a23c1c4\")).click();\r\n\t\t\r\n\t\t//Click on browse search box text box\r\n\t\tdriver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(\"captain marvel\");\r\n\t\t\r\n\t\t\r\n\t\t//driver.findElement(By.cssSelector(\"#quick-search-input\")).click();\r\n\t// driver.findElement(By.cssSelector(\"#quick-search-input\")).sendKeys(Keys.ENTER);\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n}",
"public static void main(String[] args) throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/Users/Melissa/Downloads/chromedriver\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(5,TimeUnit.SECONDS);\n\t\tdriver.get(\"http://www.ebay.com/\");\n\t\tint count = driver.findElements(By.xpath(\"//a\")).size();\n\t\tSystem.out.println(\"Number of link on the page\");\n\t\tSystem.out.println(count);\n\t\t//all links\n\t\t/*for(int i=0; i<count; i++)\n\t\t{\n\t\t\tSystem.out.println(driver.findElements(By.tagName(\"a\")).get(i).getText());\n\t\t\tSystem.out.println(driver.findElements(By.tagName(\"a\")).get(i).getAttribute(\"href\"));\n\t\t}*/\n\t\tWebElement col = driver.findElement(By.xpath(\"//div[@id='gf-BIG']/table/tbody/tr/td[2]\"));\n\t\tint colcount = col.findElements(By.tagName(\"a\")).size();\n\t\tSystem.out.println(\"Number of link on the footer column 2\");\n\t\tSystem.out.println(colcount);\n\t\t//links on column 2\n\t\tString beforeclicking =driver.getTitle();\n\t\tfor(int i=0;i<colcount;i++)\n\t\t{\n\t\t\t\n\t\t\t//System.out.println(col.findElements(By.tagName(\"a\")).get(i).getText());\n\t\t\tif(col.findElements(By.tagName(\"a\")).get(i).getText().contains(\"Desarrolladores\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcol.findElements(By.tagName(\"a\")).get(i).click();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\t//Thread.sleep(2000l);\n\t\tString afterclicking = driver.getTitle();\n\t\tif (beforeclicking != afterclicking)\n\t\t{\n\t\t\tboolean div = driver.findElement(By.xpath(\"//a[@href='/developer-sandbox']\")).isDisplayed();\n\t\t\tboolean text = driver.getPageSource().contains(\"Developer\\n\" + \n\t\t\t\t\t\" Sandbox\");\n\t\t\tif((text==true)&&(div==true))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"passed\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"failed\");\n\t\t\t\n\t\t}\n\t\tdriver.close();\n\t\t\n\n\t}",
"public static void main(String[] args) throws IOException {\n Document doc = Jsoup.connect(\"http://www.gewara.com/movie/searchCinema.xhtml?countycode=310115\").userAgent(\"Mozilla\").get();\n\n\n System.out.println(doc);\n\n\n Elements links = doc.select(\"a[href^=/movie][target=_blank][class=color3]\");\n// Document doc = Jsoup.connect(\"http://example.com\")\n// .data(\"query\", \"Java\")\n// .userAgent(\"Mozilla\")\n// .cookie(\"auth\", \"token\")\n// .timeout(3000)\n// .post();\n\n {\n// Element link = doc.select(\"a\").first();\n// String relHref = link.attr(\"href\"); // == \"/\"\n// String absHref = link.attr(\"abs:href\"); // \"http://www.open-open.com/\"\n//\n// System.out.println(relHref);\n// System.out.println(absHref);\n }\n\n\n// Element element = doc.select(\"div.chooseOpi_body\").first();\n// Elements lis = element.select(\"li\");\n//\n//\n// for (Element li : lis) {\n//\n// Movie movie = new Movie();\n// movie.setStartTime(li.select(\"span.opitime\").first().child(0).text());\n// movie.setPrice(li.select(\"span.opiPrice\").first().child(0).text());\n//// if (li.select(\"span.opiSales\").first() != null){\n//// movie.setSale(li.select(\"span.opiSales\").first().tagName(\"b\").child(1).text() +li.select(\"span.opiSales\").first().tagName(\"b\").child(1).text());\n//// }\n// System.out.println(movie.toString());\n// }\n\n\n }",
"public String findAndReturnFirstLink() {\n\t\tString xpath = \"//div[@id='search']/div/div/div/div/div/div[1]/div/div/h3/a\";\r\n\t\telement = webDriver.findElement(By.xpath(xpath));\r\n\t\t//element = webDriver.findElement(By.cssSelector(css));\r\n\t\treturn element.getText();\r\n\t}",
"@Given(\"^Open Book My Show Website$\")\r\n\tpublic void open_Book_My_Show_Website() {\n\t\twait=new WebDriverWait(driver, 20);\r\n\t\t driver.get(\"https://in.bookmyshow.com\");\r\n\t\t uimap = new UIMap(\"src//test//resources//locators.properties\");\r\n\t}",
"@Test\n\tpublic void verifycustomerSupportlink() {\n\t\tKeywords.clickOnElement(PropertiesFile.getLocator(\"Spportlink\")[0],PropertiesFile.getLocator(\"Spportlink\")[1]);\n\t\tSystem.out.println(\"24*7 goCare Support link is Displayed on Header\");\n\t\tConstants.driver.manage().timeouts().implicitlyWait(60,TimeUnit.SECONDS) ;\n\t\tKeywords.terminateBrowser();\n\n\t}",
"public static void main(String[] args) {\n \n\t\tWebDriverManager.chromedriver().setup();\n\t\t WebDriver driver=new ChromeDriver();\n\t\t driver.get(\"https://www.amazon.com/\");\n\t\t \n\t\tList<WebElement> linkslist= driver.findElements(By.tagName(\"a\"));\n\t\t\n\t\tSystem.out.println(\"Total no:of links: \" +linkslist.size());\n\t\t\n\t\tfor(int i=0;i<linkslist.size();i++)\n\t\t{\n\t\t\tString str=linkslist.get(i).getText();\n\t\t\t\n\t\t\tif(!str.isEmpty()) {\n\t\t\t\n\t\t\tSystem.out.println(i + \"----->\" +str.trim());\n\t\t\t\n\t\t\tString hrefdetails=linkslist.get(i).getAttribute(\"href\");\n\t\t\tSystem.out.println(hrefdetails);\n\t \t}\n\t\t\t\t\t\n\t\t}\t\n\t \n\t}",
"public Browser followRel(String rel);",
"public static void main(String[] args) throws InterruptedException {\nSystem.setProperty(\"webdriver.chrome.driver\", \"D:\\\\chromedriver.exe\");\nWebDriver driver=new ChromeDriver();\n\n\t//GET \t\n\t\t//driver.get(\"https://www.facebook.com/\");\n//driver.manage().window().maximize();\n//driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\t\n\t//NAVIGATE\n\t\tdriver.navigate().to(\"https://www.amazon.com/\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.findElement(By.xpath(\"//input[@type='text']\")).sendKeys(\"womenshoes\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit']\")).click();\n\t\tdriver.findElement(By.xpath(\"//span[text()='PUMA']\")).click();\n\t\tList<WebElement> shoes=driver.findElements(By.xpath(\"//span[@class='a-size-base-plus a-color-base a-text-normal']\"));\n\t\tSystem.out.println(shoes.size());\n\t\tfor(int i=0;i<shoes.size();i++) {\n\t\t\tif(shoes.get(i).getText().equals(\"PUMA Women's Vikky Sneaker\")) {\n\t\t\t\tshoes.get(i).click();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tThread.sleep(5000);\n\t\t\n\t\t\n\t\n//\t\tWebElement size=driver.findElement(By.xpath(\"//span[@class='a-dropdown-prompt']\"));\n//\t\tSelect sel=new Select(size);\n//\t\tsel.selectByIndex(1);\n//\t\tdriver.findElement(By.xpath(\"//input[@id='buy-now-button']\")).click();\n//\t\tdriver.findElement(By.xpath(\"//input[@id='ap_email']\")).sendKeys(\"[email protected]\");\n//\t\tdriver.findElement(By.xpath(\"//input[@id='continue']\")).click();\n\t\t\ndriver.quit();\n\t}",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\selenium driver\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t WebDriver driver= new ChromeDriver();\n\t driver.manage().window().maximize();\n\t driver.get(\"http://demoaut.com\");\n\t List<WebElement> linkNames = driver.findElements(By.tagName(\"a\"));\n\t System.out.println(\"Total No of links\"+linkNames.size());\n\t for(int i=0;i<linkNames.size();i++)\n\t {\n\t \t System.out.println(linkNames.get(i).getText());\n\t \t System.out.println(linkNames.get(i).getText());\n\t }\n\t \n\t driver.findElement(By.linkText(\"Hotels\")).click();\n\t String currentUrl=driver.getCurrentUrl();\n\t System.out.println(\"Current URL\"+currentUrl);\n\t \n\n\t}",
"public void clickLink(String link){\n\t\tSystem.out.println(\"CONTROLLER: LINK WAS CLICKED: \" + link);\n\t\tURL url_ = null;\n\t\ttry{\n\t\t\turl_ = new URL(new URL(this.url), link);\n\t\t\tthis.content = BrowsrDocumentValidator.assertIsValidBrowsrDocument(url_);\n\t\t\tthis.url = url_.toString();\n\t\t\tSystem.out.println(\"URL CONTROLLER:\" + this.url);\n\t\t} catch (Exception exception){\n\t\t\tthis.content = new Text(exception.toString());\n\t\t}\n\n\t}",
"public boolean clickMyWebinarsLink(){\n\t\tif(util.clickElementByLinkText(\"My Webinars\")==\"Pass\"){\n\t\t\tSystem.out.println(\"Left Frame >> My Webinar link clicked successfully...............\");\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n \t\t\n \t}",
"public static void main(String[] args) {\n\t\tWebDriver driver = new FirefoxDriver();\n\t\tdriver.get(\"http://www.icicibank.com\");\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t\t\n\t\tWebElement prod = driver.findElement(By.linkText(\"Products\"));\n\t\tActions myaction = new Actions(driver);\n\t\tmyaction.moveToElement(prod).perform();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\tWebElement homeloan = driver.findElement(By.linkText(\"Home Loan\"));\n\t\tmyaction.moveToElement(homeloan).click().perform();\n\t\t\n\t\tSystem.out.println(driver.getTitle());\n\t\t\n\t}",
"private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }",
"@When(\"user clicks on Careers link\")\n public void user_clicks_on_careers_link() throws InterruptedException {\n // bu.windowHandling();\n hp.search();\n }",
"public static void main(String[] args) {\n\t\tWebDriver driver= new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(40, TimeUnit.SECONDS);\r\n\t\tdriver.get(\"https://amazon.in\");\r\n\t\tWebElement sbc=driver.findElement(By.xpath(\"(//a[@class='nav-a nav-a-2'])[1]\")); //partialLinkText(\"Shop by\"));\r\n\t\tActions act = new Actions(driver);\r\n\t\tact.moveToElement(sbc).build().perform();\r\n\t\tact.pause(2000).moveToElement(driver.findElement(By.xpath(\"//span[text()='Amazon Prime Video']\"))).build().perform();\r\n\t\tact.keyDown(Keys.CONTROL)\r\n\t\t.pause(1000)\r\n\t\t.click(driver.findElement(By.partialLinkText(\"TV Shows\"))).pause(1000).keyUp(Keys.CONTROL)\r\n\t\t.build().perform();\r\n\t\tSystem.out.println(driver.getWindowHandles());\r\n\t\tSet<String> window_ids = driver.getWindowHandles();\r\n\t\tString parent = driver.getWindowHandle();\r\n\t\tdriver.switchTo().window(window_ids.toArray()[1].toString()); \r\n\t\tdriver.findElement(By.xpath(\"//img[@alt='Join Prime']\")).click();\r\n\t\tdriver.findElement(By.linkText(\"Sign In\")).click();\r\n\t\tdriver.switchTo().window(parent);\r\n\t\tdriver.close();\r\n\r\n\t}",
"public static void main(String[] args) {\n WebDriverManager.chromedriver().setup(); //change the browser if u want to aotumate\n // creating objoket using selenium driver\n WebDriver driver =new ChromeDriver();\n\n\n driver.get(\"http://amazon.com\");\n\n System.out.println(driver.getTitle());\n\n String d=driver.getTitle();\n String f=\"\";\n for(int i=0;i<d.length();i++){\n\n f=f+d.charAt(i);\n\n\n\n }\n System.out.println(f);\n if(f.equals(d)){\n System.out.println(true);\n }else{\n System.out.println(false);\n }\n\n\n }",
"public void openUrlInBrowser(String URL) {}",
"public void I_Should_click_My_Account_link(){\n\t MyAccountLink.click();\n\t \n}",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Vikrant Nandan\\\\Desktop\\\\SQT\\\\\"\r\n\t\t\t\t+ \"Selenium WebDriver\\\\Selenium Drivers\\\\Browser Driver\\\\chromedriver.exe\");\r\n\t\t\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tdriver.get(\"http://www.facebook.com\");\r\n\t\t\r\n\t\tWebElement link = driver.findElement(By.linkText(\"Facebook Lite\"));\r\n\t\t\r\n\t\tActions oAction=new Actions(driver);\r\n oAction.contextClick(link).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN)\r\n .sendKeys(Keys.RETURN).build().perform();\r\n\r\n\r\n\t}",
"public static void main(String[] args) {\n WebDriverManager.chromedriver().setup();\n\n // create object for using selenium driver;\n WebDriver driver=new ChromeDriver();\n\n //open browser\n driver.get(\"http://amazon.com\");// bumu exlaydu\n //driver.get(\"http://google.com\");\n // open website\n System.out.println(driver.getTitle());\n\n\n\n\n }",
"protected abstract Content getClassLink(LinkInfo linkInfo);",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\work\\\\chromedriver.exe\");\r\n\t\tWebDriver driver =new ChromeDriver();\r\n\t\tdriver.get(\"http://facebook.com\");\r\n//Generating customized css path from html attributes\r\n\t\t//tagname[attribute='value']\r\n\t\t\r\n\t\t//driver.findElement(By.cssSelector(\"input[name='email']\")).sendKeys(\"2346678\");\r\n\t\t//driver.findElement(By.cssSelector(\"[value='1']\")).click();\r\n\t\t\r\n\t\t//Generating customized xpath from html attributes \r\n\t\t ////tagname[@attribute= 'value']\r\n\t\tdriver.findElement(By.xpath(\"//*[@type='text']\")).sendKeys(\"myown xpath\");\r\n\t\tdriver.findElement(By.xpath(\"//input[@id='pass']\")).sendKeys(\"212355\");\r\n\t\tdriver.findElement(By.xpath(\"//button[@value='1']\")).click();\r\n\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\rafi\\\\eclipse-workspace\\\\Exercises\\\\Drive\\\\chromedriver.exe\");\n\t\tdriver= new ChromeDriver();\n\t\t\n\t\t//driver.get(\"https://www.amazon.com\");\n\t\tdriver.navigate().to(\"www.facebook.com\");\n\t\t\n\t\t\n\t\t\n\t\tThread.sleep(6000);//add wait time.\n\t\tdriver.navigate().refresh();//refresh the page.\n\t\tdriver.navigate().forward();\n\t\tdriver.navigate().back();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.close();\n\t\tdriver.quit();\n\t\t\n\t\tdriver.findElement(By.name(\"abc\")).click();\n\t\tdriver.findElement(By.className(\"abc\")).sendKeys(\"cba\");\n\t\tdriver.findElement(By.id(\"abc\")).click();\n\t\tdriver.findElement(By.linkText(\"abc\")).click();\n\t\tdriver.findElement(By.partialLinkText(\"abc\")).sendKeys(\"cba\");\n\t\t\n\t\t//Absulate xpath\n\t\tdriver.findElement(By.xpath(\"html/body/div/div/div/div/div/div/div/form/table/tbody/tr/td/input\")).click();\n\t\t\n\t\t//Relative xpath\n\t\t//syntaxes for relative xpath\n\t\tdriver.findElement(By.xpath(\"//Tag[@locator='value of locator'\"));\n\t\tdriver.findElement(By.xpath(\"//*[contains(@locator,' a part of locator value')]\"));\n\t\tdriver.findElement(By.xpath(\"//*starts-with(@locator,'first word or letter of locator value')\"));\n\t\tdriver.findElement(By.xpath(\"//*[@locator = 'value of locator']\"));\n\t\tdriver.findElement(By.xpath(\"//*[text()='word']\"));\n\t\t/*\n\t\t when we have many selection for a relative xpath then we use the grouping concept which is as following:\n\t\t we can use the grouping concept for all above syntaxes.\n\t\t (//*[locator = 'value of locator'])[number of your location]\n\t\t \n\t\t */\n\t\t\n\t\t//we use the following code for drop down and date selection.\n\t\t\n\t\tSelect month = new Select(driver.findElement(By.id(\"abc\")));\n\t\tmonth.selectByValue(\"10\");\n\t\t\n\t\tSelect day = new Select(driver.findElement(By.xpath(\"abc\")));\n\t\tday.selectByVisibleText(\"09\");\n\t\t\n\t\tSelect year = new Select(driver.findElement(By.className(\"abc\")));\n\t\tyear.selectByIndex(1990);\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}",
"public void clickContactUS() {\n\t\tSystem.out.println(\"Clicked contactus link\");\n\t}",
"public void clickFavoritieslink(){\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Favorities Link should be clicked\");\r\n\t\ttry{\r\n\r\n\t\t\twaitForElement(locator_split(\"lnkFavorities\"));\r\n\t\t\tclick(locator_split(\"lnkFavorities\")); \r\n\t\t\tsleep(1000);\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Favorities Link is clicked\");\r\n\t\t\tSystem.out.println(\"Favourites link clicked\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Favorities is not clicked \"+elementProperties.getProperty(\"lnkFavorities\"));\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkFavorities\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\t\t}\r\n\t}",
"private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }",
"public WebElement searchResultsLinks(String linkContaingText) {\r\n\t\treturn driver.findElement(By.xpath(\"//h2[contains(text(),'\"+linkContaingText+\"')]\"));\r\n\t}",
"public static void main(String asrgs[]) {\r\n\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\tWebDriver driver=new ChromeDriver();\r\n\tdriver.navigate().to(\"https://www.facebook.com/\");\r\n\tdriver.findElement(By.name(\"email\")).sendKeys(\"[email protected]\");\r\n\tdriver.findElement(By.name(\"pass\")).sendKeys(\"Sainaga@5\");\r\n\tdriver.findElement(By.name(\"login\")).click();\r\n\tdriver.findElement(By.className(\"_6s5d _71pn _-kb segoe\")).click();\r\n \r\n}",
"public static void main(String[] args) {\n\t\tWebDriver driver = new FirefoxDriver();\n\t\tdriver.navigate().to(\"https://www.infinitecampus.com/\");\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tWebElement HeaderBlock = driver.findElement(By.xpath(\".//*[@id='career_site_home_page']/header\"));\n\t\t\n\t\tList <WebElement> HeaderLinks = HeaderBlock.findElements(By.tagName(\"a\"));\n\t\tSystem.out.println(HeaderLinks.size());\n\t\t\n\t\tfor (int i=0; i<HeaderLinks.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(HeaderLinks.get(i).getText());\n\t\t\tString LinkName = HeaderLinks.get(i).getText();\n\t\t\tHeaderLinks.get(i).click();\n\t\t\tSystem.out.println(driver.getTitle());\n\t\t\tSystem.out.println(driver.getCurrentUrl());\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tdriver.navigate().back();\n\t\t\t//Sleeper.sleepTight(10);\n\t\t\t\n\t\t\tHeaderBlock = driver.findElement(By.xpath(\".//*[@id='career_site_home_page']/header\"));\n\t\t\tHeaderLinks= HeaderBlock.findElements(By.tagName(\"a\"));\n\t\t} \n\t\t\n\t\tdriver.close();\n\t}",
"public static void main(String[] args) throws InterruptedException, ClassNotFoundException, SQLException\n\t{\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\selenium\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t\t\tWebDriver driver = new ChromeDriver();\t\n\t\t // Navigate to amazon\n\t\t driver.get(\"https://www.amazon.in/\");\n\t\t driver.manage().window().maximize();\t\n\t\t \n\t\t //Create a new instance of the search page class\n\t\t AmazonBookPage searchBook = new AmazonBookPage(driver);\n\t\t \n\t\t // And now do the search with 2 parameters\n\t\t\t\tsearchBook.searchForCategory(\"Books\", \"Bestsellers\");\n\t\t\t\tsearchBook.printTitles();\n\t\n}",
"public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\"C:\\\\Users\\\\Harmanpreet Singh\\\\Desktop\\\\SELENIUM WorkSPace\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.ca/\");\n\t\tSystem.out.println(driver.getTitle());\n\t\tSystem.out.println(driver.getPageSource());\n\t\tSystem.out.println(driver.findElement(By.xpath(\"//span[@id='glow-ingress-line2']\")).getText());\n\t\tdriver.navigate().back();\n\t\tdriver.navigate().forward();\n\t\tdriver.navigate().refresh();\n\t\tdriver.close();\n\t\n\t}",
"public static void main(String[] args) {\n\t\t\tFind f=new Find();\n\t\t\tf.FindByHref(\"http://www.bestbuy.com/site/Global-Promotions/International+Orders/pcmcat176600050000.c?id=pcmcat176600050000\");\n\t}",
"public void testExamplePage() throws Exception\n\t{\n\t\tWebNavigator nav = new WebNavigator();\n\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().deep().id(\"randomLink\").activate();\n\n\t\t// Same as above, but the search for id \"randomLink\" starts at the page\n\t\t// level\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().id(\"randomLink\").activate();\n\n\t\t// Gets the first element whose id matches starts with \"random\" and\n\t\t// attempts to activate it.\n\t\t// Note that if we had, say, a BR tag earlier in the page that had an id\n\t\t// of \"randomBreak\",\n\t\t// the navigation would attempt to activate it and throw an exception.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().pattern().id(\"random.*\").activate();\n\n\t\t// Search for the anchor by href. Here you assume that the href will\n\t\t// always be \"goRandom.html\".\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().href(\"goRandom.html\").activate();\n\n\t\t// Do a step-by-step navigation down the dom. This assumes a lot about\n\t\t// the page layout,\n\t\t// and makes for a very brittle navigation.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.bodyChildren().div().id(\"section1\").children().div().id(\"subsectionA\").children().a().activate();\n\n\t\t// Do a deep search for an anchor that contains the exact text \"Click\n\t\t// here to go a random location\"\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().text(\"Click here to go a random location\").activate();\n\n\t\t// Do a deep search for an anchor whose text contains \"random\" at any\n\t\t// point.\n\t\tnav.gotoUrl(BASE_URL);\n\t\tnav.page().deep().a().pattern().text(\".*random.*\").activate();\n\t}",
"public static void main(String[] args) {\n String fileName = \"voca.html\";\n// String url = \"https://play.google.com/store/search?q=bcs&c=apps\";\n// String url = \"https://play.google.com/store/search?q=vocabulary&c=apps\";\n \n try {\n Document doc = Jsoup.parse(new File(fileName), \"utf-8\");\n Element divTag = doc.getElementById(\"mydiv\");\n Elements elements = divTag.getElementsByClass(\"card no-rationale square-cover apps small\");\n \n//this will print only 50 names\n// Document doc = Jsoup.connect(url).get();\n// Elements elements = doc.getElementsByClass(\"card no-rationale square-cover apps small\");\n \n for (Element element : elements) {\n// System.out.println(x++);\n name_link(element);\n }//for \n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"void openLink(Link target);",
"@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}",
"public void clickOnLaceBootsLink(){\n Reporter.log(\"clicking on boots \"+ bootsLink+\"<br>\");\n clickOnElement(bootsLink);\n }",
"public static void main(String[] args) throws InterruptedException{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \".\\\\driver\\\\chromedriver.exe\");\n\t\t\n\t\t//launch the browser\n\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\n\t\t// implicitwait - different loading times of web elements, so instead of throwing an error immediately we will wait for 15 sec. \n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\n\t\t\n\t\t//open the web app\n\t\tdriver.navigate().to(\"https://amazon.in\");\n\t\tString title = driver.getTitle();\n\t\t\n\t\tif(title.equalsIgnoreCase(\"Amazon.in\"))\n\t\t\tSystem.out.println(\"Title matches\");\n\t\telse\n\t\t\tSystem.out.println(title); \n\t\t\n\t\t//locate a web element\n\t\tString tagname = \" \";\n\t\ttagname = driver.findElement(By.cssSelector(\"#nav-link-shopall > span.nav-line-1\")).getText();\n\t\tSystem.out.println(tagname);\n\t\t\n\t\tWebElement category = driver.findElement(By.cssSelector(\"#nav-link-shopall > span.nav-line-2 > span\"));\n\t\tActions action = new Actions(driver);\n\t\taction.moveToElement(category).perform();\n\t\tThread.sleep(1000); //pervent too quick process\n\n\t\t\n\t\tWebElement books = driver.findElement(By.cssSelector(\"#nav-flyout-shopAll > div.nav-template.nav-flyout-content.nav-tpl-itemList > span:nth-child(16) > span.nav-text\"));\n\t\taction.moveToElement(books);\n\t\taction.click();\n\t\taction.perform();\n\t\tThread.sleep(50);\n\t\t\n\t\tWebElement myElement = driver.findElement(By.id(\"twotabsearchtextbox\"));\n\t\tmyElement.sendKeys(\"John Grisham\");\n\t\tThread.sleep(50);\n\t\t\n\t\tdriver.findElement(By.className(\"nav-input\")).click();\n\t\tThread.sleep(1000);\n\t\t\n\t\t//Select the book\n\t\tdriver.findElement(By.partialLinkText(\"Firm\")).click();\n\t\tThread.sleep(1000);\n\t\t\n\t\t\n\t\t//shift the tab control\n\t\tjava.util.Set<String> handles = driver.getWindowHandles();\n\t\tString winHandle1 = driver.getWindowHandle();\n\t\thandles.remove(winHandle1);\n\t\t\n\t\tString winHandle = handles.iterator().next();\n\t\tString winHandle2 = \" \";\n\t\t\n\t\tif(winHandle != winHandle1)\n\t\t{\n\t\t\twinHandle2 = winHandle;\n\t\t\tdriver.switchTo().window(winHandle2);\n\t\t\tSystem.out.println(winHandle2);\n\t\t}\n\t\t\n\t\tThread.sleep(1000);\n\t\t\t\n\t\t\n\t driver.findElement(By.cssSelector(\"#add-to-cart-button\")).click();\n\t Thread.sleep(3000);\n\t \n\t //scroll down until (end\\web element etc.)\n\t JavascriptExecutor js = (JavascriptExecutor) driver;\n\t js.executeScript(\"window.scrollTo(0,document.body.scrollHeight)\");\n\t Thread.sleep(1000);\n\t \n\t driver.close();\n\t driver.quit();\n\t}",
"public static void main(String[] args) {\n\t\tWebDriver driver = new FirefoxDriver();\n\t\tdriver.get(\"http://facebook.com\");\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tWebElement botton = driver.findElement(By.id(\"u_0_r\"));\n\t\t\n\t\tActions act = new Actions(driver);\n\t\t\n\t\tact.moveToElement(botton).contextClick().build().perform();\n\n\t}",
"@Test\n public void findFriends() {\n setupDriver(\"Mac\", \"https://www.facebook.com/\", \"chrome\");\n driver.findElement(By.linkText(\"Find Friends\")).click();\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void clickOnMoreLatesBookLink() {\n\t}",
"@Test(priority = 5)\n public void openDifferentElementsPageTest() {\n driver.findElement(new By.ByLinkText(\"SERVICE\")).click();\n driver.findElement(By.xpath(\"//a[contains(text(),'Different elements')]\")).click();\n }",
"public static void main(String[] args) throws InterruptedException {\nSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\NEERAJA\\\\chromedriver_win32\\\\chromedriver.exe\");\n \n\t\n\n //System.setProperty(\"webdriver.gecko.driver\", \"C:\\\\NEERAJA\\\\geckodriver-v0.16.1-win64\\\\geckodriver.exe\");\n\t\t\n\t\t//launch the browser\n\t\tWebDriver driver=new ChromeDriver();\n\t\t\n\t\t//maximise the window\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\t//open the url\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\t\n\t\t//verifythe page title\n\t\tnew WebDriverWait(driver,30).until(ExpectedConditions.titleContains(\"Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more\"));\n\t\tSystem.out.println(\"page titlle is verified\");\n\t\t\n\t\t//type the mobile keyword in search edit box\n\t\tdriver.findElement(By.id(\"twotabsearchtextbox\")).sendKeys(\"mobiles\");\n\t\t//create an object for actions class\n\t\tActions act=new Actions(driver);\n\t\tact.sendKeys(Keys.ENTER).perform();\n\t\t\n\t\t//page down\n\t\tact.sendKeys(Keys.PAGE_DOWN).perform();\n\t\tThread.sleep(3000);\n\t\t//page down\n\t\tact.sendKeys(Keys.PAGE_UP).perform();\n\t\tThread.sleep(3000);\n\t\t//close the browser\n\t\tdriver.quit();\n\t}",
"@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}",
"@Test\n public void testSearchBoxCategoriesList() throws InterruptedException {\n log.info(\"Go to Homepage \" );\n log.info(\"Go to Search Box in Header \" );\n log.info(\"Write urn \" );\n Actions builder = new Actions(driver);\n WebElement searchBox = driver.findElement(By.id(\"SearchInputs\")).findElement(By.tagName(\"input\"));\n searchBox.click();\n searchBox.sendKeys(\"urn\");\n WebElement categoryResults = driver.findElement(By.partialLinkText(\"category results\"));\n List<WebElement> categoryResultsList = driver.findElement(By.className(\"categories\")).findElements(By.tagName(\"a\"));\n WebDriverWait wait = new WebDriverWait(driver, 1000);\n wait.until(ExpectedConditions.elementToBeClickable(categoryResults));\n log.info(\"Click on first result from category suggestion list\" );\n categoryResultsList.get(0).click();\n log.info(\"Confirm that the link oppened contains searched term (urn in this case ) related results.\");\n assertTrue(driver.getCurrentUrl().contains(\"urn\"));\n }",
"public void navigateToWomanCategory(){\n a = new Actions(driver);\n a.moveToElement(driver.findElement(By.cssSelector(\"div[id ='block_top_menu'] a[title='Women']\"))).build().perform();\n driver.findElement(By.cssSelector(\"ul[class='submenu-container clearfix first-in-line-xs'] li a[title='Casual Dresses'] \")).click();\n }",
"private Link lnkViewDetails(final String productName) {\n return new Link(\n \"//span[@class='subhedcsb' and contains(., '\"\n + productName.trim() + \"')]/../following-sibling::td[3]//a\");\n }",
"@Then(\"^I see Product name displayed$\")\n public void i_see_Product_name_displayed() throws Throwable {\n \t driver.findElement(By.linkText(\"Product Name+\")).isDisplayed();\n \n }",
"public void clickAddressBookLink()\n\t{\n \telementUtils.performElementClick(wbAddressBookLink);\n\t}",
"public static void main(String[] args) throws Exception {\n\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"F:\\\\workspace\\\\geckodriver.exe\");\r\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\tdriver.get(\"https://qaclickacademy.com/practice.php/ \");\r\n\t\tThread.sleep(5000);\r\n\t\t\r\n\t\t//count of number of links on the page\r\n\t\tSystem.out.println(driver.findElements(By.tagName(\"a\")).size());\r\n\t\t\r\n\t\t\r\n\t\t//count of number of links on the footer section on the page\r\n\t\tWebElement footerdriver=driver.findElement(By.id(\"gf-BIG\"));\r\n\t\tSystem.out.println(footerdriver.findElements(By.tagName(\"a\")).size());\r\n\t\t\r\n\t\t\r\n\t\t//count the number links on the 1st coloumn in footer section\r\n\t\tWebElement coloumndriver=footerdriver.findElement(By.xpath(\"//*[@id=\\\"gf-BIG\\\"]/table/tbody/tr/td[1]/ul\"));\r\n\t\tSystem.out.println(coloumndriver.findElements(By.tagName(\"a\")).size());\r\n\t\t\r\n\t\t//click on each link in the coloumn check of the pages are opening\r\n\t\tfor(int i=1; i<coloumndriver.findElements(By.tagName(\"a\")).size(); i++)\r\n\t\t{\r\n\t\t\t//String clinkonlinkTab= Keys.chord(Keys.CONTROL , Keys.ENTER);\r\n\t\t\tcoloumndriver.findElements(By.tagName(\"a\")).get(i).sendKeys(Keys.CONTROL , Keys.ENTER);\r\n\t\t\tThread.sleep(5000);\r\n\t\t}\r\n\t\t\r\n\t\tSet<String> abc = driver.getWindowHandles();\r\n\t\tIterator<String> it = abc.iterator();\r\n\t\twhile(it.hasNext())\r\n\t\t{\r\n\t\t\tdriver.switchTo().window(it.next());\r\n\t\t\tSystem.out.println(driver.getTitle());\r\n\t\t}\r\n\t\t\r\n\t}",
"String nextLink();",
"public void goToPage(String xPathCustom) { \n seleniumDriver.findElement(By.xpath(xPathCustom)).click();\n }",
"private Element traverse_search(Element element) {\n \ttry {\n\t \tString userid = profile.getAttributeValue(\"personal\", \"id\");\n\t \tString course = profile.getAttributeValue(\"personal\", \"course\");\n\t \tString context = WOWStatic.config.Get(\"CONTEXTPATH\");\n\n\t \tElement a = doc.createElement(\"a\");\n\t \ta.setAttribute(\"href\", context + \"/Get?wndName=Search\");\n\t \ta.setAttribute(\"target\", userid + \"$\" + course);\n\t \ta.appendChild(doc.createTextNode(\"Search\"));\n\t \treturn (Element)replaceNode(element, a);\n \t}\n \tcatch(Throwable e) {\n \t\te.printStackTrace();\n \t\treturn (Element)replaceNode(element, createErrorElement(\"Error!\"));\n \t}\n }",
"@Test(priority = 7)\n @Parameters(\"browser\")\n public void TC07_VERIFY_LINK_TAOTK(String browser) throws IOException {\n String excel_Link_TaoTK = null;\n excel_Link_TaoTK = global.Read_Data_From_Excel(excelPath,\"ELEMENTS\",6,2);\n if(excel_Link_TaoTK == null){\n System.out.println(\"ERROR - Cell or Row No. is wrong.\");\n exTest.log(LogStatus.ERROR, \"ERROR - Cell or Row No. is wrong.\" );\n }\n // Locate element by Xpath\n WebElement ele_Link_TaoTK = null;\n ele_Link_TaoTK = global.Find_Element_By_XPath(driver,excel_Link_TaoTK);\n if(ele_Link_TaoTK == null){\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC07 - Link Tao Tai Khoan is not displayed.\");\n } else {\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC07 - Link Tao Tai Khoan is displayed.\");\n }\n // Get text from Element.\n String textTaoTK = \"Tạo tài khoản\";\n String textGetFromEle_LinkTaoTK = ele_Link_TaoTK.getText();\n System.out.println(\"DEBUG --- \" + textGetFromEle_LinkTaoTK);\n if(textGetFromEle_LinkTaoTK != null && textGetFromEle_LinkTaoTK.equalsIgnoreCase(textTaoTK)){\n exTest.log(LogStatus.PASS,\"::[\" + browser + \"]:: TC07.1 - Link Tao Tai Khoan is correct.\");\n } else {\n exTest.log(LogStatus.FAIL,\"::[\" + browser + \"]:: TC07.1 - Link Tao Tai Khoan is not correct.\");\n }\n global.Wait_For_Page_Loading(3);\n }",
"public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}",
"@Test\n public void articleSingleView()throws Exception{\n ChromeDriver driver = openChromeDriver();\n try {\n driver.get(\"https://www.knjizare-vulkan.rs\");\n clearCookies(driver);\n\n WebElement schoolProgram = driver.findElement(By.xpath(\"//a[@href='https://www.knjizare-vulkan.rs/program-za-skolu']\"));\n schoolProgram.click();\n\n WebElement childPencilBox = driver.findElement(By.xpath(\"/html/body/div[4]/div[1]/div/div/div/div[5]/div/div[2]/div/div/div[7]/div[1]/div[1]/a[2]\"));\n childPencilBox.click();\n\n\n\n Thread.sleep(3000);\n\n } finally {\n\n driver.quit();\n\n }\n\n }",
"@Test\n public void verifyLinksFromWebsite() throws InterruptedException {\n System.setProperty(\"webdriver.chrome.driver\", \"C://seleniumdrivers//chromedriver.exe\");\n WebDriver driver = new ChromeDriver();\n driver.navigate().to(\"http://www.trafic.ro/\");\n\n //initializare pagina\n TestarePage testarePage = PageFactory.initElements(driver, TestarePage.class);\n\n int categorySize = testarePage.getCategoryEntity().size();\n System.out.print(\"Numarul de categoirii: \" + categorySize + \"\\n\");\n List<WebElement> categoriesNameFromWebsite = testarePage.getCategoryEntity();\n for (int i = 0; i < categorySize; i++) {\n String categoryNameFromWebsite = testarePage.getCategoryNameFromWebsite(categoriesNameFromWebsite.get(i));\n System.out.print(\"Category name: \" + categoryNameFromWebsite + \"\\n\");\n }\n driver.close();\n driver.quit();\n }",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\Rajini Priya\\\\Desktop\\\\rrr\\\\chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\t\r\n\t\tdriver.get(\"https://www.amazon.com/\");\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\tActions a= new Actions(driver);\r\n\t\t//Moves to Specific element\r\n\t\ta.moveToElement(driver.findElement(By.cssSelector(\"a[id='nav-link-accountList']\"))).build().perform();\r\n\t\t\r\n\t\t//Enter text in search bar\r\n\t\ta.moveToElement(driver.findElement(By.id(\"twotabsearchtextbox\"))).click().keyDown(Keys.SHIFT).sendKeys(\"raghava\").build().perform();\r\n\t\t\r\n\t\t//To right-click on element\r\n\t\ta.moveToElement(driver.findElement(By.cssSelector(\"a[id='nav-link-accountList']\"))).contextClick().build().perform();\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers/chromedriver.exe\");\r\n\t\t//System.setProperty(\"webdriver.edge.driver\", \"drivers/msedgedriver.exe\");\r\n\t\t\r\n\t\t// 2. Create web driver object\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\t\r\n\t\t/*Steps we want to do:\r\n\t\t * open browser\r\n\t\t * visit website http://amazon.in\r\n\t\t * locate link with text \"Today's Deals\"\r\n\t\t * click on this link\r\n\t\t * print current url and title of the page\r\n\t\t * wait for 3 seconds\r\n\t\t * exit\r\n\t\t */\r\n\t\r\n\t\t// 3. LinkText Locator Strategy\r\n\tdriver.get(\"https://amazon.in\");\r\n\tWebElement element = driver.findElement(By.linkText(\"Today's Deals\"));\r\n\telement.click();\r\n\tSystem.out.println(\"Current URL is : \" + driver.getCurrentUrl() + \"\\nPage Title is : \" + driver.getTitle());\r\n\tThread.sleep(3000);\r\n\tdriver.quit();\r\n\t}",
"public String clickOnPresenternameLink() {\n String linkName=presenterNameLink.getText().substring(0, 21);\n waitAndClick(presenterNameLink);\n return linkName;\n\t}",
"public static WebElement lnk_clickMatchingProducts() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class,'showMorePP')]//a[contains(text(),'Matching products')])[position()=1]\"));\r\n \t\tAdd_Log.info(\"Matching products link is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Matching products link is NOT found on the page\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public static WebElement lnk_clickMoreEmagTitlesAvailable() throws Exception{\r\n \ttry{\r\n \t\telement = driver.findElement(By.xpath(\"//*[contains(text(),'More e-magazine titles available')]\"));\r\n \t\tAdd_Log.info(\"More e-magazine titles available hyperlink is click on the page.\");\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"More e-magazine titles available hyperlink is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public String clickLink_partialLinkText(String object, String data) {\n\n\t\tlogger.debug(\"Clicking on link \");\n\t\ttry {\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tdriver.findElement(By.partialLinkText(OR.getProperty(object))).click();\n\t\t\t//browserSpecificPause(object, data);\n\t\t\treturn Constants.KEYWORD_PASS;\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- \" + OR.getProperty(object) + \" link not present\";\n\t\t}\n\t}",
"public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }",
"private String findLink(BasicPanel panel, Element e)\n {\n String uri = null;\n\n for (Node node = e; node.getNodeType() == Node.ELEMENT_NODE; node = node.getParentNode())\n {\n uri = panel.getSharedContext().getNamespaceHandler().getLinkUri((Element) node);\n\n if (uri != null)\n {\n try\n {\n URI linkUri = getLinkUri(uri);\n String target = panel.getSharedContext().getNamespaceHandler().getAttributeValue((Element) node, \"target\");\n logger.debug(\"link target: \" + target);\n if (EXTERNAL_TARGET.equalsIgnoreCase(target))\n {\n logger.info(\"launch external browser for \" + uri);\n BareBonesBrowserLaunch.openURL(linkUri.toString());\n uri = null;\n }\n else if (EXTERNAL_MORE_ASSIGNMENT.equalsIgnoreCase(target))\n {\n if (showMoreInfo != null)\n {\n logger.info(\"show more assignment with \" + uri);\n showMoreInfo.showMoreInfo(linkUri, MoreInfoTypes.ASSIGNMENT, eloUri);\n }\n else\n {\n logger.info(\"could not show more assignment (showMoreInfo==null) with \" + uri);\n }\n uri = null;\n }\n else if (EXTERNAL_MORE_RESOURCES.equalsIgnoreCase(target))\n {\n if (showMoreInfo != null)\n {\n logger.info(\"show more resources with \" + uri);\n showMoreInfo.showMoreInfo(linkUri, MoreInfoTypes.RESOURCES, eloUri);\n }\n else\n {\n logger.info(\"could not show more resources (showMoreInfo==null) with \" + uri);\n }\n uri = null;\n }\n break;\n }\n catch (URISyntaxException ex)\n {\n logger.error(\"error in uri\", ex);\n }\n }\n }\n\n return uri;\n }",
"@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}",
"@Test\n\t\t public void testLocationOne() {\n\t\t \tdriver.get(\"http://mq-devhost-lm52.ihost.aol.com:9002/us/nj/upper-montclair/bellevue-ave-valley-rd\");\n\t\t \tAssertJUnit.assertEquals(Utils.getElementText(driver,PageLayoutSelectors.TOP_NAME),\"Bellevue Ave & Valley Rd\");\n\t\t }",
"public void viewContactDetails() {\n wd.findElement(By.xpath(\"//tr/td[7]/a\")).click();\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\tWebDriver driver;\n\nSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Selenium_Class\\\\geckodriver-v0.18.0-win32\\\\geckodriver.exe\");\ndriver=new FirefoxDriver();\ndriver.get(\"https://www.ebay.in/\");\n\ndriver.findElement(By.id(\"gh-ac\")).sendKeys(\"Apple Watches\");\ndriver.findElement(By.id(\"gh-btn\")).click();\ndriver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);\n//get all the products--\n\nList<WebElement> list= driver.findElements(By.xpath(\"//*[@id='ListViewInner')/li/h3/a]\"));\n/*\n Iterator<WebElement> itr= list.iterator();\nwhile(itr.hasNext()){\n\tSystem.out.println(itr.next().getText());\n}\n\t*/\n\t\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers/chromedriver.exe\");\r\n\t\tChromeDriver driver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\t\tdriver.get(\"https://www.facebook.com/\");\r\n\t\tdriver.findElementById(\"email\").sendKeys(\"[email protected]\");\r\n\t\tdriver.findElementById(\"pass\").sendKeys(\"\");\r\n\t\tdriver.findElementById(\"loginbutton\").click();\r\n\t\tThread.sleep(3000);\r\n\t\t// driver.switchTo().alert().dismiss();\r\n\t\tdriver.findElementByClassName(\"_1frb\").sendKeys(\"TestLeaf\", Keys.ENTER);\r\n\r\n\t\ttry {\r\n\t\t\tWebElement likeButton = driver.findElementByXPath(\"(//button[text()='Like'])[1]\");\r\n\t\t\tif (likeButton.isDisplayed()) {\r\n\t\t\t\t{\r\n\t\t\t\t\tlikeButton.click();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (WebDriverException e) {\r\n\r\n\t\t\tSystem.out.println(\"Already liked the TestLeaf page\");\r\n\t\t}\r\n\t\tWebDriverWait wait = new WebDriverWait(driver, 30);\r\n\t\twait.until(ExpectedConditions.elementToBeClickable(driver.findElementByLinkText(\"TestLeaf\"))).click();\r\n\t\tdriver.findElementByLinkText(\"Reviews\").click();\r\n\t\tString text = driver.findElementByXPath(\"(//div[@class=\\\"mvm uiP fsm\\\"])[2]\").getText();\r\n\t\tSystem.out.println(\"Total Number of Reviews for TestLeaf is: \" + text);\r\n\r\n\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n//\t\tWebDriverWait wait = new WebDriverWait(driver,30);\r\n\t\tdriver.get(\"http://demowebshop.tricentis.com\");\r\n\t\tActions act = new Actions(driver);\r\n \tact.moveToElement(driver.findElement(By.xpath(\"/html/body/div[4]/div[1]/div[2]/ul[1]/li[2]/a\"))).perform();\r\n\t\tdriver.findElement(By.xpath(\"/html/body/div[4]/div[1]/div[2]/ul[1]/li[2]/ul/li[3]/a\")).click();\r\n//\t\tact.contextClick(driver.findElement(By.linkText(\"Request a demo\"))).perform();\r\n\t\tdriver.close();\r\n\t\tSystem.out.println(\"As Expected\");\r\n\t}",
"public abstract String linkText();",
"public static void main(String[] args) {\n\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Downloads\\\\chromedriver.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\tdriver.get(\"https://www.facebook.com\");\n\t\t\n\t\t//String currentUrl = driver.getCurrentUrl();\n\t\t//System.out.println(currentUrl.contains(\"facebook\"));\n\t\t\n\t\tString currentTitle = driver.getTitle();\n\t\tSystem.out.println(currentTitle.contains(\"Facebook\"));\n\t\t\n\t\tif (currentTitle.contains(\"Facebook\"))\n\t\t{\n\t\t\tSystem.out.println(\"Validation 1: Passed - Title is working\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Validation 1: Failed - Title is not working\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n WebDriver driver= WebDriverFactory.getDriver(\"chrome\");\n\n driver.get(\"https://amazon.com\");\n driver.get(\"https://ebay.com\");\n\n WebElement searchBox=driver.findElement(By.xpath(\"//input[@type='text']\"));\n searchBox.sendKeys(\"books\");\n\n WebElement search=driver.findElement(By.xpath(\"//input[@type='submit']\"));\n search.click();\n\n String actualWord=driver.getTitle();\n\n System.out.println(\"title is: \"+ actualWord);\n\n String expectedWord=\"books\";\n\n if(actualWord.contains(expectedWord)){\n System.out.println(\"Pass\");\n }else{\n System.out.println(\"Fail\");\n System.out.println(\"actualWord = \" + actualWord);\n System.out.println(\"expectedWord = \" + expectedWord);\n }\n\n }",
"public void ClickDescinShoppinginsight(String Linktext){\r\n\t\tString LinkText = getValue(Linktext);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Description link should be clicked in shopping insight\");\r\n\t\ttry{\r\n\t\t\tclickbylinktext(LinkText);\r\n\t\t\tSystem.out.println(LinkText+\" is clicked in shopping insight\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:- \"+LinkText+\" is clicked in shopping insight\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- \"+LinkText+\" link is not clicked in shopping insight\");\r\n\t\t\tthrow new NoSuchElementException(\"The link text with\"\r\n\t\t\t\t\t+ LinkText\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}",
"@Given(\"^user visit homepage$\")\n\tpublic void user_visit_homepage() throws Throwable {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t//\"key\",\"value\"\n\t\t//\"driver name\",\"path of driver\"\n\t\tdriver= new ChromeDriver();\n\t\t\n\t\t//driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);\n\t\t\n\t\t\n\t\t//open URL\n\t\tdriver.get(\"https://demo.oscommerce.com/\");\n\t\t\n\t\t//driver.get(\"https://www.amazon.com/\");\n\t\t}",
"public void ClickAtDesireProduct(String product){ //clicarNoProdutoDesejado\n driver.findElement(By.xpath(\"//h3[contains(text(),'\" + product + \"')]\")).click();\n\n }",
"public void clickOnFindlocations() {\n\t\tsFunName = \"clickOnFindlocations\";\n\t\tLogger.info(\"Inside : clickOnFindlocations\");\n\t\tLogger.info(sFunName + \" : Verify and Click on Find Locations link\");\n\t\tbStatus = util.explicitlyWaitUntilElementIsPresent(findLlocationsLink);\n\t\tAssert.assertTrue(bStatus, \"Service Search Text field not Found\");\n\t\tfindLlocationsLink.click();\n\t}",
"@Test\n public void ebayTestSearchResults() throws Exception {\n driver.findElement(By.id(\"gh-ac\")).sendKeys(\"java book\");\n driver.findElement(By.id(\"gh-btn\")).click();\n\n Thread.sleep(4000);\n\n WebElement searchResults = driver.findElement(By.tagName(\"h1\"));\n //21,761 results for java book\n String resultActual = searchResults.getText();\n System.out.println(resultActual);\n }",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\r\n\t\t\t\t\"E:\\\\Pragati\\\\Selenium\\\\Exe files\\\\chromedriver_win32\\\\chromedriver.exe\");\r\n\t\r\n\t\tString baseUrl = \"https://www.amazon.com/\";\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(baseUrl);\r\n\t\tActions a=new Actions(driver);\r\n\t\ta.moveToElement(driver.findElement(By.xpath(\"//div[@id='nav-tools']/a[2]/span[2]\"))).build().perform();\r\n\t\ta.moveToElement(driver.findElement(By.cssSelector(\"#twotabsearchtextbox\")))\r\n\t\t.click()\r\n\t\t.keyDown(Keys.SHIFT)\r\n\t\t.sendKeys(\"hello\")\r\n\t\t.keyUp(Keys.SHIFT)\r\n\t\t.doubleClick()\r\n\t\t.contextClick()\r\n\t\t.build()\r\n\t\t.perform();\r\n\t\t\r\n\r\n\t}",
"@Given(\"^: search for different products$\")\r\n\tpublic void search_for_different_products() throws Throwable {\n\t\tobj.url(\"chrome\");\r\n\t}",
"@And(\"^user clicks on credit cards link$\")\r\n\t public void userclicksoncreditcardslink() {\r\n\t\t dbsdriver.findElement(By.xpath(\"//a[starts-with(@data-flk-success,'atNodeInserted') and text()='Credit Cards']\")).click();\r\n\t\t test.log(LogStatus.INFO, \"credit cards link is displayed\");\r\n\t }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Selenium\\\\Browser for selenium\\\\chromedriver_win32\\\\chromedriver1.exe\");\n\t\tWebDriver driver = new ChromeDriver();\n\t\t\n driver.get(\"https://www.google.com/\");\n Actions rclick= new Actions(driver);\n rclick.contextClick(driver.findElement(By.xpath(\"//*[@id=\\\"tsf\\\"]/div[2]/div/div[1]/div/div[2]/div/span\"))).perform();;\n \n\n\t}",
"public void navigateTo(String component){\n String locator = \"//a[text()='\" + component + \"']\"; //component is parameter of our method (on the below: navigateTo(String component))\n wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(locator))).click();\n }",
"public void clickOnEngagementLink() {\n getLogger().info(\"Click on engagement link\");\n try {\n waitForClickableOfElement(eleEngagementLink, \"Wait for click on engagement link\");\n clickElement(eleEngagementLink, \"Click on engagement\");\n NXGReports.addStep(\"Verify click on engagement link \", LogAs.PASSED, null);\n } catch (Exception ex) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Verify click on engagement link \", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"void openUrl (String url);",
"private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }"
] | [
"0.61579186",
"0.61325353",
"0.60688657",
"0.5952708",
"0.58247894",
"0.5770764",
"0.56177896",
"0.56149787",
"0.5589956",
"0.5582795",
"0.55660987",
"0.5548237",
"0.55354977",
"0.5493987",
"0.5474031",
"0.54556066",
"0.5425515",
"0.54245675",
"0.54141235",
"0.53836465",
"0.53712445",
"0.5360014",
"0.5319417",
"0.5317689",
"0.5313089",
"0.5312351",
"0.53107625",
"0.5294343",
"0.5287946",
"0.52784294",
"0.5263129",
"0.5256149",
"0.52408135",
"0.521219",
"0.52117497",
"0.52023995",
"0.5200983",
"0.51952904",
"0.5193656",
"0.5190867",
"0.5189581",
"0.5179254",
"0.51710093",
"0.5146932",
"0.5144228",
"0.51428384",
"0.5129731",
"0.5129091",
"0.5115074",
"0.51075387",
"0.51060724",
"0.5104372",
"0.5096777",
"0.50965166",
"0.5096263",
"0.50856483",
"0.50856274",
"0.5077917",
"0.5055233",
"0.5042236",
"0.50406647",
"0.5040339",
"0.5038466",
"0.5036917",
"0.5029568",
"0.502893",
"0.502793",
"0.5027348",
"0.5016856",
"0.50127715",
"0.50005496",
"0.49997348",
"0.49992692",
"0.49988392",
"0.49952847",
"0.49830443",
"0.49830136",
"0.497901",
"0.4968344",
"0.49603602",
"0.49544823",
"0.4954459",
"0.4953094",
"0.49489525",
"0.49467465",
"0.49462044",
"0.49430642",
"0.4936646",
"0.49323937",
"0.49285036",
"0.49220794",
"0.49201015",
"0.49174055",
"0.49166796",
"0.4909896",
"0.49078405",
"0.49013045",
"0.4892331",
"0.48886278",
"0.48885414"
] | 0.52259856 | 33 |
A primitives map from ints to floats. | public interface IntFloatMap extends Iterable<IntFloatEntry>, Serializable {
/** Gets the value at the specified index and returns an implementation specific default it's missing. */
float get(int idx);
/** Gets the value at the specified index and returns the given default if it's missing. */
float getWithDefault(int idx, float defaultVal);
/** Returns true iff the map contains the given index. */
// TODO: rename to containsKey.
boolean contains(int idx);
/** Puts the value with the specified index in the map, replacing the current value if it exists, and returning the previous value. */
float put(int idx, float val);
/** Removes the entry with the given index. */
void remove(int idx);
/** Removes all entries. */
void clear();
/** Increments the entry with the given index by the specified increment. */
// TODO: maybe rename to increment?
void add(int idx, float incr);
/** Applies the function to each entry in the map. */
void apply(FnIntFloatToFloat lambda);
/** Calls the function on each entry in the map. */
void iterate(FnIntFloatToVoid function);
/**
* Returns an iterator over the entries in the map. CAUTION: This tends to
* be slower than using the equivalent apply().
*/
Iterator<IntFloatEntry> iterator();
/** Returns the number of entries in the map. */
int size();
/**
* Returns the indices.
*/
int[] getIndices();
/**
* Returns the values.
*/
float[] getValues();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterable<Float> getFloats(String key);",
"public Float getFloat(String key, Float defaultValue);",
"public float getFloat(String key, float defaultValue);",
"public FloatByteMap(float[] f) {\n _clips = new Clips(f);\n }",
"public float getFloat(short dictionaryKey) {\n\t\treturn floatsMap.get(dictionaryKey);\n\t}",
"private synchronized static TreeMap<Integer, AbstractFloatDataType> getFloatTypes() {\n\t\tif (floatTypes == null) {\n\t\t\t// unsupported sizes filled-in with a null\n\t\t\tfloatTypes = new TreeMap<Integer, AbstractFloatDataType>();\n\t\t\tfloatTypes.put(2, Float2DataType.dataType);\n\t\t\tfloatTypes.put(4, Float4DataType.dataType);\n\t\t\tfloatTypes.put(8, Float8DataType.dataType);\n\t\t\tfloatTypes.put(10, Float10DataType.dataType);\n\t\t\tfloatTypes.put(16, Float16DataType.dataType);\n\t\t}\n\t\treturn floatTypes;\n\t}",
"public abstract float getasFloat(int tuple, int val);",
"void mo9696a(float f, float f2, int i);",
"public interface C5663B {\n\n /* renamed from: a */\n public static final Integer f9595a = Integer.valueOf(1);\n\n /* renamed from: b */\n public static final Integer f9596b = Integer.valueOf(2);\n\n /* renamed from: c */\n public static final Integer f9597c = Integer.valueOf(3);\n\n /* renamed from: d */\n public static final Integer f9598d = Integer.valueOf(4);\n\n /* renamed from: e */\n public static final PointF f9599e = new PointF();\n\n /* renamed from: f */\n public static final PointF f9600f = new PointF();\n\n /* renamed from: g */\n public static final PointF f9601g = new PointF();\n\n /* renamed from: h */\n public static final PointF f9602h = new PointF();\n\n /* renamed from: i */\n public static final C5834d f9603i = new C5834d();\n\n /* renamed from: j */\n public static final Float f9604j = Float.valueOf(1.0f);\n\n /* renamed from: k */\n public static final Float f9605k = Float.valueOf(2.0f);\n\n /* renamed from: l */\n public static final Float f9606l = Float.valueOf(3.0f);\n\n /* renamed from: m */\n public static final Float f9607m = Float.valueOf(4.0f);\n\n /* renamed from: n */\n public static final Float f9608n = Float.valueOf(5.0f);\n\n /* renamed from: o */\n public static final Float f9609o = Float.valueOf(6.0f);\n\n /* renamed from: p */\n public static final Float f9610p = Float.valueOf(7.0f);\n\n /* renamed from: q */\n public static final Float f9611q = Float.valueOf(8.0f);\n\n /* renamed from: r */\n public static final Float f9612r = Float.valueOf(9.0f);\n\n /* renamed from: s */\n public static final Float f9613s = Float.valueOf(10.0f);\n\n /* renamed from: t */\n public static final Float f9614t = Float.valueOf(11.0f);\n\n /* renamed from: u */\n public static final Float f9615u;\n\n /* renamed from: v */\n public static final Float f9616v;\n\n /* renamed from: w */\n public static final Float f9617w = Float.valueOf(13.0f);\n\n /* renamed from: x */\n public static final ColorFilter f9618x = new ColorFilter();\n\n static {\n Float valueOf = Float.valueOf(12.0f);\n f9615u = valueOf;\n f9616v = valueOf;\n }",
"public float getFloat(int pos) {\n return Tuples.toFloat(getObject(pos));\n }",
"public static java.util.Iterator<org.semanticwb.process.schema.Float> listFloats()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.schema.Float>(it, true);\r\n }",
"public abstract float getValue();",
"void apply(FnIntFloatToFloat lambda);",
"public FloatByteMap(double percMin, double percMax, float[] f) {\n _clips = new Clips(percMin,percMax,f);\n }",
"public FloatByteMap(float[][] f) {\n _clips = new Clips(f);\n }",
"public abstract float[] getasFloat(int tuple);",
"public abstract float read_float();",
"float applyAsFloat(T value);",
"private void mapValues() {\n\t\tmap.put(1, \"I\");\r\n\t\tmap.put(5, \"V\");\r\n\t\tmap.put(10, \"X\");\r\n\t\tmap.put(50, \"L\");\r\n\t\tmap.put(100, \"C\");\r\n\t\tmap.put(500, \"D\");\r\n\t\tmap.put(1000, \"M\");\r\n\t}",
"Iterator<IntFloatEntry> iterator();",
"java.util.List<java.lang.Float> getInList();",
"public Flt(float f) {this.f = new Float(f);}",
"float mo106364f();",
"public float getFloat(String key)\n {\n return getFloat(key, 0);\n }",
"float put(int idx, float val);",
"public FloatByteMap(double percMin, double percMax, float[][] f) {\n _clips = new Clips(percMin,percMax,f);\n }",
"private static float intToFloat(int x) {\n\t\treturn Float.intBitsToFloat(x);\n\t}",
"public Float getFloatAttribute();",
"public static float map(float x, float a1, float a2, float b1, float b2) {\r\n return b1 + (b2 - b1) * (x - a1) / (a2 - a1);\r\n }",
"public static float getFloatProperty(String key) {\r\n\t\treturn getFloatProperty(key, 0);\r\n\t}",
"protected static int hashCodeFloat(float value)\n {\n return floatToIntBits(value);\n }",
"float getValue();",
"float getValue();",
"float getValue();",
"public FloatByteMap(double percMin, double percMax, float[][][] f) {\n _clips = new Clips(percMin,percMax,f);\n }",
"void mo84656a(float f);",
"public Float getFloat(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Float) extGet(key);\n\t}",
"FloatValue createFloatValue();",
"FloatValue createFloatValue();",
"public FloatByteMap(float[][][] f) {\n _clips = new Clips(f);\n }",
"public FloatType asFloat() {\n return TypeFactory.getIntType(toInt(this.getValue())).asFloat();\n }",
"public T caseFloat(org.uis.lenguajegrafico.lenguajegrafico.Float object)\n {\n return null;\n }",
"float readFloat();",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate List<Entry<String, Float>> sortByValue(Map map) {\n\t List<Entry<String, Float>> list = new LinkedList(map.entrySet());\n\t Collections.sort(list, new Comparator() {\n\t public int compare(Object o1, Object o2) {\n\t return -((Comparable) ((Map.Entry) (o1)).getValue())\n\t \t\t .compareTo(((Map.Entry) (o2)).getValue());\n\t }\n\t });\n\t return list;\n\t}",
"@Override\n\tpublic Type getType() {\n\t\treturn Type.FLOAT;\n\t}",
"public Float getFloatData(String key) {\n return pref.getFloat(key, 0);\n }",
"public FloatByteMap(double percMin, double percMax, Float3 f3) {\n _clips = new Clips(percMin,percMax,f3);\n }",
"@Override\r\n public Class getClassType() {\r\n return float.class;\r\n }",
"public FloatFactory(FactoryRegistry factoryRegistry, char id) {\n super(factoryRegistry, id);\n }",
"public List<Float> getFloatList(final String key) {\n return getFloatList(key, new ArrayList<>());\n }",
"public FloatByteMap(Float3 f3) {\n _clips = new Clips(f3);\n }",
"public float getAsFloat(int index) {\n switch (type) {\n case TIFFTag.TIFF_BYTE: case TIFFTag.TIFF_UNDEFINED:\n return ((byte[])data)[index] & 0xff;\n case TIFFTag.TIFF_SBYTE:\n return ((byte[])data)[index];\n case TIFFTag.TIFF_SHORT:\n return ((char[])data)[index] & 0xffff;\n case TIFFTag.TIFF_SSHORT:\n return ((short[])data)[index];\n case TIFFTag.TIFF_SLONG:\n return ((int[])data)[index];\n case TIFFTag.TIFF_LONG: case TIFFTag.TIFF_IFD_POINTER:\n return ((long[])data)[index];\n case TIFFTag.TIFF_FLOAT:\n return ((float[])data)[index];\n case TIFFTag.TIFF_DOUBLE:\n return (float)((double[])data)[index];\n case TIFFTag.TIFF_SRATIONAL:\n int[] ivalue = getAsSRational(index);\n return (float)((double)ivalue[0]/ivalue[1]);\n case TIFFTag.TIFF_RATIONAL:\n long[] lvalue = getAsRational(index);\n return (float)((double)lvalue[0]/lvalue[1]);\n case TIFFTag.TIFF_ASCII:\n String s = ((String[])data)[index];\n return (float)Double.parseDouble(s);\n default:\n throw new ClassCastException();\n }\n }",
"public Float getFloat(String key)\n\t{\n\t\tDouble d = getDouble(key);\n\t\tif(d == null)\n\t\t\treturn null;\n\t\treturn d.floatValue();\n\t}",
"final float getFloatPropertyValue(int index) {\n return mFloatValues[index];\n }",
"public final void mo8765a(float f) {\n }",
"protected abstract float getValue(Entity e,FloatTrait t);",
"@SuppressWarnings(value=\"unchecked\")\n public void put(int field$, java.lang.Object value$) {\n switch (field$) {\n case 0: pt = (java.lang.Float)value$; break;\n case 1: eta = (java.lang.Float)value$; break;\n case 2: phi = (java.lang.Float)value$; break;\n case 3: m = (java.lang.Float)value$; break;\n case 4: e = (java.lang.Float)value$; break;\n case 5: q = (java.lang.Integer)value$; break;\n case 6: dzLeadChHad = (java.lang.Float)value$; break;\n case 7: nSignalChHad = (java.lang.Long)value$; break;\n case 8: nSignalGamma = (java.lang.Long)value$; break;\n case 9: antiEleMVA5 = (java.lang.Float)value$; break;\n case 10: antiEleMVA5Cat = (java.lang.Float)value$; break;\n case 11: rawMuonRejection = (java.lang.Float)value$; break;\n case 12: rawIso3Hits = (java.lang.Float)value$; break;\n case 13: rawIsoMVA3oldDMwoLT = (java.lang.Float)value$; break;\n case 14: rawIsoMVA3oldDMwLT = (java.lang.Float)value$; break;\n case 15: rawIsoMVA3newDMwoLT = (java.lang.Float)value$; break;\n case 16: rawIsoMVA3newDMwLT = (java.lang.Float)value$; break;\n case 17: puppiChHadIso = (java.lang.Float)value$; break;\n case 18: puppiGammaIso = (java.lang.Float)value$; break;\n case 19: puppiNeuHadIso = (java.lang.Float)value$; break;\n case 20: puppiChHadIsoNoLep = (java.lang.Float)value$; break;\n case 21: puppiGammaIsoNoLep = (java.lang.Float)value$; break;\n case 22: puppiNeuHadIsoNoLep = (java.lang.Float)value$; break;\n case 23: hpsDisc = (java.lang.Double)value$; break;\n default: throw new org.apache.avro.AvroRuntimeException(\"Bad index\");\n }\n }",
"public FloatColumn mapToFloatColumn(String name, Function<? super T, ? extends Float> function) {\n FloatColumn newColumn = FloatColumn.create(name, size());\n mapInto(function, newColumn);\n return newColumn;\n }",
"double getFloatingPointField();",
"public static java.util.Iterator<org.semanticwb.process.schema.Float> listFloats(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.schema.Float>(it, true);\r\n }",
"float getEFloat();",
"public interface FloatProvider {\n float get();\n}",
"@Nullable\r\n public Float getFloat(String key) {\r\n return getFloat(key, null);\r\n }",
"@RepeatedTest(20)\n void transformtoFloatTest(){\n assertEquals(f.transformtoFloat(), f);\n assertEquals(i.transformtoFloat(),new Float(seed));\n assertEquals(bi.transformtoFloat(), new Float(bi.toInt(bi.getBinary())));\n\n //Nulls\n assertEquals(st.transformtoFloat(),Null);\n assertEquals(bot.transformtoFloat(),Null);\n assertEquals(bof.transformtoFloat(),Null);\n assertEquals(Null.transformtoFloat(),Null);\n }",
"default DiscreteIntMap2D pushForwardToInt(DoubleToIntFunction function) {\r\n\t\treturn (x, y) -> function.applyAsInt(getValueAt(x, y));\r\n\t}",
"void mo72112a(float f);",
"public List<Float> getFloatList(final String key, final List<Float> defaultValue) {\n return getList(Float.class, key, defaultValue);\n }",
"void mo9704b(float f, float f2, int i);",
"public HashedVector(Map<Integer, Double> map) {\n\t\tthis.elements = new HashMap<Integer, Double>(map);\n\t}",
"FmprimitivesFactory getFmprimitivesFactory();",
"public Value(float f) {\n aFloat = f;\n itemClass = Float.class;\n type = DataType.FLOAT;\n }",
"void setFloat(int index, float value) throws SQLException;",
"private static float[] toFloats( int[] rgbs ) {\n float[] flut = new float[ rgbs.length * 3 ];\n for ( int i = 0; i < rgbs.length; i++ ) {\n int j = i * 3;\n int rgb = rgbs[ i ];\n flut[ j++ ] = ( ( rgb >> 16 ) & 0xff ) * FF1;\n flut[ j++ ] = ( ( rgb >> 8 ) & 0xff ) * FF1;\n flut[ j++ ] = ( ( rgb >> 0 ) & 0xff ) * FF1;\n }\n return flut;\n }",
"public ObjectMap put(String key, float value) throws JsonException {\r\n\t\tobjectMap.put(check_Key(key), value);\r\n\t\treturn this;\r\n\t}",
"@Override\n public FloatType multiplyToFloat(FloatType multiplicand) {\n double floatMultiplier = this.asFloat().getValue();\n double floatMultiplicand = multiplicand.getValue();\n return TypeFactory.getFloatType(floatMultiplicand * floatMultiplier);\n }",
"void mo56155a(float f);",
"public float floatValue() {\r\n return (float) intValue();\r\n }",
"@Override\r\n\tpublic float[] toFloats() {\n\t\treturn null;\r\n\t}",
"public static float fixedPointIntToFloatNBits(int intVal, long n) {\n return ((float) intVal / (float) (1 << n));\n }",
"public float f(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key).floatValue();\n\t}",
"public ArrayList<Float> leerMapaDesdeBaseDeDatos() {\n listaNumeros.add(2.0f);\r\n listaNumeros.add(3.0f);\r\n listaNumeros.add(4.0f);\r\n listaNumeros.add(5.0f);\r\n listaNumeros.add(1.0f);\r\n return listaNumeros;\r\n }",
"private Map<Integer, Integer> takeFloatInput() {\n\t Map<Integer, Integer> floatInput = new HashMap<>();\n\n\t\ttry {\n\t\t BufferedReader buff = new BufferedReader(new InputStreamReader(System.in));\n\n\t\t\tSystem.out.println(\"Enter coins (with spaces inbetween)\");\n\n\t\t String lines = buff.readLine(); \n\t\t String[] strings = lines.trim().split(\"\\\\s+\");\n\t\t \n\t\t for (int i = 0; i < strings.length; i++) {\n\t\t \tint coin = Integer.parseInt(strings[i]);\n\n \t\t\tif (floatInput.containsKey(coin)) {\n\t\t\t\t\tfloatInput.put(coin, floatInput.get(coin) + 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfloatInput.put(coin, 1);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Invalid input, please try again.\");\n\t\t}\n\n\t return floatInput;\n\t}",
"public static void main(String[] args){\n\t\tFloat f=new Float(12);\r\n\t}",
"void mo196b(float f) throws RemoteException;",
"GenericFloatSensor sensor();",
"private final float get_FLOAT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos()) {\n byte[] bytes = new byte[4];\n dataBuffer_.getBytes(columnDataPosition_[column - 1], bytes);\n return FloatingPoint.getFloat_hex(bytes, 0);\n// return dataBuffer_.getFloat(columnDataPosition_[column - 1]);\n } else {\n return dataBuffer_.getFloatLE(columnDataPosition_[column - 1]);\n// return FloatingPoint.getFloat(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }\n }",
"public static void add(float a,int b){ }",
"public float getFloat4(int columnIndex) {\n Float4Vector vector = (Float4Vector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }",
"private void initIDF2Map(List<Map<String, List<Double>>> mapPerGestureFile) {\n\t\tMap<String,Double> idf2PerDocument = new HashMap<String, Double>(); // per univariate series\n\t\t\n\t\tfor (int i = 0; i < mapPerGestureFile.size(); i++) {\n\t\t\tMap<String,List<Double>> tmpMap = mapPerGestureFile.get(i);\n\t\t\tIterator<Entry<String, List<Double>>> iterator = tmpMap.entrySet().iterator();\n\t\t\twhile(iterator.hasNext()) {\n\t\t\t\tMap.Entry<String, List<Double>> pairs = (Entry<String, List<Double>>) iterator.next();\n\t\t\t\tif(idf2PerDocument.containsKey(pairs.getKey()))\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), idf2PerDocument.get(pairs.getKey())+1.0); \n\t\t\t\telse\n\t\t\t\t\t\tidf2PerDocument.put(pairs.getKey(), 1.0);\n\t\t\t}\n\t\t}\n\t\tgetTfMapArrayIDF2().add(idf2PerDocument);\n\t}",
"public float[] getAsFloats() {\n return (float[])data;\n }",
"public static void add(int a,float b){ }",
"public Float F(String key) throws AgentBuilderRuntimeException {\n\t\treturn getFloat(key);\n\t}",
"public Float getFloat(final int index) {\n Object returnable = this.get(index);\n if (returnable == null) {\n return null;\n }\n if (returnable instanceof String) {\n /* A String can be used to construct a BigDecimal. */\n returnable = new BigDecimal((String) returnable);\n }\n return ((Number) returnable).floatValue();\n }",
"private Data[] getFloats(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataFloat((float) value)\n\t\t: new DataArrayOfFloats(new float[] { (float) value,\n\t\t\t\t(float) value });\n\t\t\treturn data;\n\t}",
"protected static float toPoints(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_CM:\n \t\t\treturn (value * 72 / 2.54f);\n \t\tcase CSSPrimitiveValue.CSS_MM:\n \t\t\treturn (value * 72 / 25.4f);\n \t\tcase CSSPrimitiveValue.CSS_IN:\n \t\t\treturn (value * 72);\n \t\tcase CSSPrimitiveValue.CSS_PT:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_PC:\n \t\t\treturn (value * 12);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}",
"@Override\r\n\tpublic String toString() {\n\t\treturn \"float\";\r\n\t}",
"public abstract float mo9744i();",
"public Vector2f (float[] values)\n {\n set(values);\n }",
"@Override\n public final int hashCode() {\n\t\n \treturn Float.floatToIntBits(this.m00) ^\n \t\t Float.floatToIntBits(this.m01) ^\n \t\t Float.floatToIntBits(this.m02) ^\n Float.floatToIntBits(this.m10) ^\n Float.floatToIntBits(this.m11) ^\n Float.floatToIntBits(this.m12) ^\n Float.floatToIntBits(this.m20) ^\n Float.floatToIntBits(this.m21) ^\n Float.floatToIntBits(this.m22);\n }",
"@FunctionalInterface\npublic interface ToFloatFunction<T> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param value the function argument\n * @return the function result\n */\n float applyAsFloat(T value);\n\n}"
] | [
"0.58501345",
"0.56852055",
"0.5668455",
"0.5652864",
"0.5633015",
"0.5591788",
"0.5581424",
"0.5527238",
"0.5515421",
"0.5459848",
"0.5452812",
"0.54256576",
"0.5359363",
"0.5353768",
"0.5352006",
"0.5345216",
"0.5342963",
"0.5321871",
"0.5315167",
"0.5306346",
"0.52944237",
"0.52425534",
"0.5217993",
"0.52107316",
"0.5209443",
"0.5208502",
"0.52056205",
"0.5200892",
"0.5191523",
"0.51841813",
"0.51668906",
"0.5161782",
"0.5161782",
"0.5161782",
"0.5157551",
"0.5149213",
"0.5117966",
"0.51142925",
"0.51142925",
"0.5106497",
"0.5100604",
"0.51003873",
"0.50969356",
"0.5095568",
"0.5090982",
"0.50839996",
"0.50785404",
"0.50752807",
"0.5073784",
"0.5069316",
"0.50684714",
"0.5067283",
"0.506347",
"0.5059706",
"0.5058165",
"0.5052102",
"0.50478816",
"0.5046586",
"0.50380623",
"0.50287807",
"0.5022732",
"0.50164354",
"0.500008",
"0.49991244",
"0.49983588",
"0.49978152",
"0.49912032",
"0.49842858",
"0.49779683",
"0.49775502",
"0.49712116",
"0.49695736",
"0.4958176",
"0.4954897",
"0.49451712",
"0.49390173",
"0.49350137",
"0.49318412",
"0.4930988",
"0.49275038",
"0.48920563",
"0.48827934",
"0.48795173",
"0.48717755",
"0.48656994",
"0.48544216",
"0.48477137",
"0.4847398",
"0.4843158",
"0.4819298",
"0.48175356",
"0.48142323",
"0.48017126",
"0.48010448",
"0.47928473",
"0.476745",
"0.47658443",
"0.47646895",
"0.47639215",
"0.47541812"
] | 0.6781222 | 0 |
Gets the value at the specified index and returns an implementation specific default it's missing. | float get(int idx); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getWithDefault(int idx, float defaultVal);",
"@Override\n protected Object onGetDefaultValue(TypedArray a, int index) {\n return a.getInt(index, 0);\n }",
"abstract int get(int index);",
"private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }",
"@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }",
"@Override\n\tpublic E get(int index) {\n\t\treturn null;\n\t}",
"default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }",
"public int get(int index);",
"Object opt(int index) {\n return (index < 0 || index >= this.length()) ? null : this.myArrayList.get(index);\n }",
"abstract public Object getValue(int index);",
"public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 4}, optParamIndex = {1, 2, 3}, javaType = {java.lang.Object.class, java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index);",
"public T get(int index);",
"public T get(int index);",
"public T get(int index);",
"Object getDefaultValue(String key);",
"int getInfoOrDefault(\n int key,\n int defaultValue);",
"public double get(int index) {\n\t\treturn _elements.getOrDefault(index, 0.0);\n\t}",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"@Override\n public int get(int index) {\n checkIndex(index);\n return getEntry(index).value;\n }",
"public Object getValue(int index);",
"public abstract T get(int index);",
"@Override\n public E get(int index) {\n this.rangeCheck(index);\n return (E) this.values[index];\n }",
"Object get(int index);",
"Object get(int index);",
"public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }",
"public double get(int index) {\n\t\treturn 0;\n\t}",
"public E get(int index) {\r\n\t\tif (indices.get(index) == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(index).data;\t\t\r\n\t\t}\r\n\t}",
"T getDefaultValue();",
"public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}",
"public T get(int aIndex);",
"@Override\n\tpublic Double getFrom(int index) {\n\t\treturn null;\n\t}",
"E get( int index );",
"public T get(int index) {\n return v.get(index);\n }",
"public E get(int index)\n { \n if(index >= size() || index < 0)\n {\n return null; \n }\n Node<E> n = getNode(index);\n return n.getValue();\n }",
"public Object get(final int index) {\n return super.get(index);\n }",
"@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupportedOperator(OperatorType.INDEXGET);\n }",
"V getOrDefault(final K key, final V defaultValue);",
"@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}",
"public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}",
"boolean optBoolean(int index, boolean defaultValue) {\n try {\n return this.getBoolean(index);\n } catch (Exception e) {\n return defaultValue;\n }\n }",
"int get(int idx);",
"public T get(int index) {\n return (index >= 0 && index < this.list.size()) ? this.list.get(index) : null;\n }",
"@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }",
"public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }",
"public abstract E get(int index);",
"@Override\n public E get(final int index) {\n ensureValidIndex(size, index);\n return super.get(index + lower);\n }",
"public T get(int index) {\n if (index >= size) {\n return null;\n }\n\n int i = 0;\n Node<T> n = sentinel.next;\n\n while (true) {\n if (i == index || n == sentinel) {\n break;\n }\n n = n.next;\n i++;\n }\n\n return n.value;\n }",
"@Override\n public Object get(int index) {\n switch (index) {\n case 0:\n return this.options;\n\n default:\n throw new IndexOutOfBoundsException(\"Invalid index specified.\");\n }\n }",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 1, 4}, optParamIndex = {2, 3}, javaType = {java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal);",
"@Override\n public T get(final int index) {\n this.checkIndex(index);\n return this.data[index];\n }",
"public Object get(int index);",
"public Object get(int index);",
"@Override\n public T get(int index) {\n if (index < 0 || index >= size) {\n return null;\n }\n int position = index + plusOne(nextFirst);\n if (position >= array.length) {\n position -= array.length;\n return array[position];\n } else {\n return array[position];\n }\n }",
"@Override\n\tpublic T get(int idx) throws IndexOutOfBoundsException {\n\t\tboolean found = false;\n\t\tint n = 0;\n\t\tListNode current = head;\n\t\t\n\t\tif (idx < 0 || idx > size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\twhile (!found) {\n\t\t\t\tif (n == idx) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\treturn current.datum;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null; // Due to index checking, this should never be reached.\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <T> T get(int index) {\n return (T)this.values[index];\n }",
"protected Object getOptionalValue(Node node, int idx,\n InternalContextAdapter context)\n throws MethodInvocationException\n {\n Node target = getOptionalNode(node, idx);\n if (target == null) {\n return null;\n }\n return target.value(context);\n }",
"public E get(int index);",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"@Override\n\tpublic int get(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\treturn values[index]; //return the value at index\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"public Object get(int index) {\n if (index==0) {\n return t;\n } else if (index==1) {\n return u;\n }\n throw new IndexOutOfBoundsException();\n }",
"public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}",
"public Integer getInteger(String key, Integer defaultValue);",
"String getDefaultValue();",
"String getDefaultValue();",
"@Override\n public T get(int index) {\n return list.get(index);\n }",
"@Override\n @SuppressWarnings(\"fallthrough\")\n public Date get(final int index) {\n long date = date1;\n switch (index) {\n case 1: date = date2; // Fall through\n case 0: if (date != Long.MIN_VALUE) return new Date(date); // else fallthrough.\n default: throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.IndexOutOfBounds_1, index));\n }\n }",
"public Type get(int index);",
"@Override\n // worst-case complexity: O(1), it's basically just an array access\n public T get(int index) {\n if (index < size && index >= 0)\n return arr[index];\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }",
"E get(int i) throws IndexOutOfBoundsException;",
"public T getDefault() {\n List<T> defaultValues = this.defaultValues;\n return defaultValues.get(defaultValues.size() - 1);\n }",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 4}, optParamIndex = {3}, javaType = {int.class}, nativeType = {NativeType.Int32}, variantType = {Variant.Type.VT_I4}, literal = {\"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo);",
"public T get(int i) {\n return null;\n }",
"public T get(int index) {\n return list.get(index);\n }",
"@Override\n public T get(int idx) {\n //if item is within the bounds of the array list, it is returned others null is returned\n if (idx >= 0 && idx<=size){\n return arr[idx+1];\n } else {\n return null;\n }\n\n }",
"@Override\n\tpublic E get(int i) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}",
"@Nonnull\r\n\tpublic static <T> Observable<T> elementAt(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tint index,\r\n\t\t\tT defaultValue\r\n\t\t\t) {\r\n\t\treturn elementAt(source, index, Functions.constant0(defaultValue));\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n public E get(int index) {\n checkIndex(index);\n return (E) list[index];\n }",
"public Item getElse(int slot){\r\n try{\r\n return get(slot);\r\n }catch(IndexOutOfBoundsException e){\r\n return null;\r\n }\r\n }",
"String get(int index);",
"public T get(int index){ return this.isUpgraded ? this.linkArray.get(index) : this.nativeArray.get(index); }",
"public E get(int idx, E b) {\n assert idx >= 0;\n\n if(v == array[idx]){\n\t\treturn v;\n\t}\n\t\n\tif(array[idx] == null){\n\t\treturn b;\n\t}\n\treturn b;\n }",
"@Override\n public final Integer get(final int index) {\n if (!checkRange(index)) {\n throw new IndexOutOfBoundsException();\n } else {\n return arrayList[index];\n }\n }",
"public Integer get(int index){\n return list.get(index);\n }",
"public E get(int index) {\r\n return items.get(index);\r\n }",
"public E atIndex(int index) {\n\t\tif(index < numElements) {\n\t\t\treturn elements[index];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public abstract Object get(int pos) throws IndexOutOfBoundsException;",
"public int getDefault(){\n return number;\n }",
"public T get(int index) {\n if (size == 0) {\n return null;\n }\n if (index < 0 || index > size - 1) {\n return null;\n }\n index = Math.floorMod(index + front, array.length);\n return array[index];\n }",
"String optString(int index, String defaultValue) {\n Object object = this.opt(index);\n return PropertyObject.NULL.equals(object) ? defaultValue : object.toString();\n }",
"public T get(int index) throws IndexOutOfBoundsException {\n checkException(index);\n return arr[index];\n }",
"public T get(int index) {\n return this.list[index];\n }",
"@Override\n protected Object onGetDefaultValue(TypedArray a, int index) {\n return Long.valueOf(a.getString(index));\n }",
"@Override\n public E get(final int index) {\n return array[index];\n }",
"public int getInt(String key, int defaultValue);"
] | [
"0.7572702",
"0.6775109",
"0.6555975",
"0.65393305",
"0.64911115",
"0.6477117",
"0.6456251",
"0.6456118",
"0.64560497",
"0.6438392",
"0.64262736",
"0.64048886",
"0.63999677",
"0.63999677",
"0.63999677",
"0.6398893",
"0.63803333",
"0.6372719",
"0.63669187",
"0.63669187",
"0.63669187",
"0.63669187",
"0.63669187",
"0.6359008",
"0.6344421",
"0.63434577",
"0.63369113",
"0.6332343",
"0.6332343",
"0.6319479",
"0.630291",
"0.6297957",
"0.6288524",
"0.62613803",
"0.6255456",
"0.62542737",
"0.62430227",
"0.6233939",
"0.6222202",
"0.62180555",
"0.6216138",
"0.6202182",
"0.6183729",
"0.61779594",
"0.6173348",
"0.6172471",
"0.6168982",
"0.61663634",
"0.6160271",
"0.6153017",
"0.6149952",
"0.61467403",
"0.61430454",
"0.61396104",
"0.61334914",
"0.6128056",
"0.61195046",
"0.61195046",
"0.610109",
"0.60950994",
"0.60927737",
"0.608394",
"0.60816085",
"0.60759515",
"0.60759515",
"0.6069614",
"0.6069008",
"0.60424083",
"0.6033763",
"0.60334635",
"0.60334635",
"0.6032993",
"0.6024493",
"0.602398",
"0.6018984",
"0.6017525",
"0.6007123",
"0.59997314",
"0.5990288",
"0.5986028",
"0.59774745",
"0.5976015",
"0.59736896",
"0.5973533",
"0.59593296",
"0.5947223",
"0.59396607",
"0.59212554",
"0.59198046",
"0.59104276",
"0.58889645",
"0.5887024",
"0.58826596",
"0.5871018",
"0.5864658",
"0.5863279",
"0.58597434",
"0.58595914",
"0.58588773",
"0.58520925",
"0.58515966"
] | 0.0 | -1 |
Gets the value at the specified index and returns the given default if it's missing. | float getWithDefault(int idx, float defaultVal); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }",
"V getOrDefault(final K key, final V defaultValue);",
"@Override\n protected Object onGetDefaultValue(TypedArray a, int index) {\n return a.getInt(index, 0);\n }",
"Object getDefaultValue(String key);",
"int getInfoOrDefault(\n int key,\n int defaultValue);",
"public V getOrDefault(K key, V defaultValue) {\r\n V value = get(key);\r\n if (value == null) {\r\n return defaultValue;\r\n }\r\n return value;\r\n }",
"boolean optBoolean(int index, boolean defaultValue) {\n try {\n return this.getBoolean(index);\n } catch (Exception e) {\n return defaultValue;\n }\n }",
"public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}",
"public Integer getInteger(String key, Integer defaultValue);",
"@Nonnull\r\n\tpublic static <T> Observable<T> elementAt(\r\n\t\t\t@Nonnull final Observable<? extends T> source,\r\n\t\t\tint index,\r\n\t\t\tT defaultValue\r\n\t\t\t) {\r\n\t\treturn elementAt(source, index, Functions.constant0(defaultValue));\r\n\t}",
"protected <T> T getValue(String key, T defaultVal) {\r\n return getValue(key, defaultVal, RestartReqs.NONE);\r\n }",
"public double get(int index) {\n\t\treturn _elements.getOrDefault(index, 0.0);\n\t}",
"public T getDefault() {\n List<T> defaultValues = this.defaultValues;\n return defaultValues.get(defaultValues.size() - 1);\n }",
"public int get(int index);",
"T getDefaultValue();",
"public T get(int index) {\n if (index >= size) {\n return null;\n }\n\n int i = 0;\n Node<T> n = sentinel.next;\n\n while (true) {\n if (i == index || n == sentinel) {\n break;\n }\n n = n.next;\n i++;\n }\n\n return n.value;\n }",
"public int getInt(String key, int defaultValue);",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 4}, optParamIndex = {1, 2, 3}, javaType = {java.lang.Object.class, java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index);",
"public T get(int index) {\n return (index >= 0 && index < this.list.size()) ? this.list.get(index) : null;\n }",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"T get(int index);",
"public E get(int index)\n { \n if(index >= size() || index < 0)\n {\n return null; \n }\n Node<E> n = getNode(index);\n return n.getValue();\n }",
"public E get(int idx) {\n assert idx >= 0;\n \n if(v == array[idx]){\n\t\tv = array[idx];\n\t}\n\t\n\tif(array[idx] == null){\n\t\tv = null;\n\t}\n\treturn v;\n }",
"Object get(int index);",
"Object get(int index);",
"public Object getValue(int index);",
"public T get(int index);",
"public T get(int index);",
"public T get(int index);",
"public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}",
"Object opt(int index) {\n return (index < 0 || index >= this.length()) ? null : this.myArrayList.get(index);\n }",
"public T get(int index){\n if(!rangeCheck(index)){\n return null;\n }\n return (T)data[index];\n }",
"protected <T> T getValue(Property prop, T defaultVal) {\r\n return getValue(prop, defaultVal, null);\r\n }",
"@Override\n public T get(int index) {\n return indexCheck(index) ? (T) data[index] : null;\n }",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 1, 2, 4}, optParamIndex = {3}, javaType = {int.class}, nativeType = {NativeType.Int32}, variantType = {Variant.Type.VT_I4}, literal = {\"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object refersTo);",
"String optString(int index, String defaultValue) {\n Object object = this.opt(index);\n return PropertyObject.NULL.equals(object) ? defaultValue : object.toString();\n }",
"abstract int get(int index);",
"public Object get(int index) {\n\t\tif(index <= arr.length-1) return arr[index];\n\t\treturn null;\n\t}",
"int get(int idx);",
"public T get(int index) {\n return v.get(index);\n }",
"int getInt(String key, int defaultValue);",
"public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"@VTID(12)\n @DefaultMethod\n @UseDefaultValues(paramIndexMapping = {0, 1, 4}, optParamIndex = {2, 3}, javaType = {java.lang.Object.class, int.class}, nativeType = {NativeType.VARIANT, NativeType.Int32}, variantType = {Variant.Type.VT_ERROR, Variant.Type.VT_I4}, literal = {\"80020004\", \"1033\"})\n @ReturnValue(index=4)\n com.exceljava.com4j.excel.Name _Default(\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object index,\n @Optional @MarshalAs(NativeType.VARIANT) java.lang.Object indexLocal);",
"public T get(int index) {\n \n if(head == null) {\n return null;\n }\n \n int i = 0;\n Node<T> node = head;\n while(i < index && node.getNext() != null) {\n node = node.getNext();\n i++;\n }\n \n if(i == index) {\n return node.getValue();\n } else {\n return null;\n }\n }",
"public E get(int index) {\r\n\t\tif (indices.get(index) == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(index).data;\t\t\r\n\t\t}\r\n\t}",
"default V get() {\n V item = orElseNull();\n if ( item == null )\n throw new IllegalArgumentException(\"No item at the targeted position!\");\n return item;\n }",
"protected Object getOptionalValue(Node node, int idx,\n InternalContextAdapter context)\n throws MethodInvocationException\n {\n Node target = getOptionalNode(node, idx);\n if (target == null) {\n return null;\n }\n return target.value(context);\n }",
"@Override\n\tpublic T get(int idx) throws IndexOutOfBoundsException {\n\t\tboolean found = false;\n\t\tint n = 0;\n\t\tListNode current = head;\n\t\t\n\t\tif (idx < 0 || idx > size()) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\telse {\n\t\t\twhile (!found) {\n\t\t\t\tif (n == idx) {\n\t\t\t\t\tfound = true;\n\t\t\t\t\treturn current.datum;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null; // Due to index checking, this should never be reached.\n\t}",
"public T get(int aIndex);",
"@Override\n public int get(int index) {\n checkIndex(index);\n return getEntry(index).value;\n }",
"public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"public double get(int index) {\n\t\treturn 0;\n\t}",
"abstract public Object getValue(int index);",
"protected <T> T getValue(String key, T defaultVal, Bound<? extends Number> bound) {\r\n return getValue(key, null, defaultVal, bound);\r\n }",
"@Override\n public T get(int index) {\n if (index < 0 || index >= size) {\n return null;\n }\n int position = index + plusOne(nextFirst);\n if (position >= array.length) {\n position -= array.length;\n return array[position];\n } else {\n return array[position];\n }\n }",
"protected <T> T getValue(String key, String comment, T defaultVal) {\r\n return getValue(key, comment, defaultVal, RestartReqs.NONE);\r\n }",
"protected <T> T getValue(String key, T defaultVal, RestartReqs req) {\r\n return getValue(key, null, defaultVal, req);\r\n }",
"public String getOrElse(String key, String defaultValue) {\n\t\tInstant start = Instant.now();\n\t\tString result;\n\t\ttry {\n\t\t\tresult = get(key);\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: the default value {} will be returned\", key, defaultValue);\n\t\t\tresult = defaultValue;\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to getOrElse {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn result;\t\t\n\t}",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXGET)\n default IData getAt(int index) {\n \n return notSupportedOperator(OperatorType.INDEXGET);\n }",
"public Integer get(int index){\n return list.get(index);\n }",
"public T get(int index) {\n return list.get(index);\n }",
"public int getPropertyInt(String key, int defaultValue);",
"@Override\n\tpublic T get(int index) {\n\t\tif (index >= 0 && index < size) {\n\t\t\treturn data[index];\n\t\t}\n\t\treturn null;\n\t}",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"public int getAsInt(String key, int defaultVal) {\n String val = entries.getProperty(key);\n return val == null ? defaultVal : Integer.parseInt(val);\n }",
"public T getDefaultValue() {\n return defaultValue.orNull();\n }",
"public Object get(int index);",
"public Object get(int index);",
"E get( int index );",
"float get(int idx);",
"public T get(int index) {\n if (index < length()) {\n return (T) list[startIndex + index];\n }\n return null;\n }",
"String getDefaultValue();",
"String getDefaultValue();",
"@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}",
"java.lang.String getFieldOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);",
"public E get(int idx, E b) {\n assert idx >= 0;\n\n if(v == array[idx]){\n\t\treturn v;\n\t}\n\t\n\tif(array[idx] == null){\n\t\treturn b;\n\t}\n\treturn b;\n }",
"@Override\n\tpublic int get(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\treturn values[index]; //return the value at index\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"@Override\n\tpublic Double getFrom(int index) {\n\t\treturn null;\n\t}",
"@Override\n public T get(int idx) {\n //if item is within the bounds of the array list, it is returned others null is returned\n if (idx >= 0 && idx<=size){\n return arr[idx+1];\n } else {\n return null;\n }\n\n }",
"<S> S getSetting(Setting<S> setting, S defaultValue);",
"public T get(int index) {\n return this.list[index];\n }",
"@Override\n @SuppressWarnings(\"fallthrough\")\n public Date get(final int index) {\n long date = date1;\n switch (index) {\n case 1: date = date2; // Fall through\n case 0: if (date != Long.MIN_VALUE) return new Date(date); // else fallthrough.\n default: throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.IndexOutOfBounds_1, index));\n }\n }",
"public abstract T get(int index);",
"public V getOrDefault(T keySummary, V defaultValue) {\n // there is a possibility that the key is not present\n if (keySummary.isEmptyVS()) {\n return defaultValue;\n }\n if (!containsKey(keySummary).getGuardFor(false).isFalse()) {\n return defaultValue.restrict(keySummary.getUniverse());\n }\n\n V merger = null;\n List<V> toMerge = new ArrayList<>();\n for (GuardedValue<?> key : ValueSummary.getGuardedValues(keySummary)) {\n V val = entries.getOrDefault(key.getValue(), defaultValue);\n if (merger == null) merger = val.restrict(key.getGuard());\n toMerge.add(val.restrict(key.getGuard()));\n }\n\n assert merger != null;\n return merger.merge(toMerge);\n }",
"public double get(int idx) {\n\t\tswitch (idx) {\n\t\tcase 0: \n\t\t\treturn x;\n\t\tcase 1: \n\t\t\treturn y;\n\t\tcase 2:\n\t\t\treturn z;\n\t\tcase 3: \n\t\t\treturn w;\n\t\tdefault:\t\n\t\t\tthrow new IndexOutOfBoundsException(\"index must be between 0 and 3, got \" + idx);\n\t\t}\n\t}",
"@Override\n protected Object onGetDefaultValue(TypedArray a, int index) {\n return Long.valueOf(a.getString(index));\n }",
"public int get(int index) {\n\t\treturn r[index];\n\t}",
"public T get(int index) {\n\t\tint at = 1;\n\t\tfor (Node<T> current = start; current != null; current = current.next) {\n\t\t\tif (at == index) {\n\t\t\t\treturn current.value;\n\t\t\t}\n\t\t\tat++;\n\t\t}\n\t\t// We couldn't find it, throw an exception!\n\t\tthrow new IndexOutOfBoundsException();\n\t}",
"String get(int index);",
"public Object getTargetValue(int idx, Object def);",
"public T get(int index) {\n\t\tfor (int i = 0; i < lists.size(); i++) {\n\t\t\tList<? extends T> list = lists.get(i);\n\t\t\tif (index < list.size()) return list.get(index);\n\t\t\tindex -= list.size();\n\t\t}\n\t\tthrow new IndexOutOfBoundsException();\n\t}",
"public Type get(int index);",
"T defaultValue();",
"public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }",
"public Integer getAsInteger(String itemName, Integer defaultValue);",
"public T get(int index) {\n if (size == 0) {\n return null;\n }\n if (index < 0 || index > size - 1) {\n return null;\n }\n index = Math.floorMod(index + front, array.length);\n return array[index];\n }"
] | [
"0.6951957",
"0.66234195",
"0.6437382",
"0.63716924",
"0.6362194",
"0.63337314",
"0.62276953",
"0.6215265",
"0.62098086",
"0.6175151",
"0.61612666",
"0.61044407",
"0.6096742",
"0.60951865",
"0.6094661",
"0.6088636",
"0.60532135",
"0.6034274",
"0.6033419",
"0.6021587",
"0.6021587",
"0.6021587",
"0.6021587",
"0.6021587",
"0.59730405",
"0.5969487",
"0.5967145",
"0.5967145",
"0.5964901",
"0.59587234",
"0.59587234",
"0.59587234",
"0.5946427",
"0.59344715",
"0.59081584",
"0.5899705",
"0.58991575",
"0.58783823",
"0.5876215",
"0.5873854",
"0.58733237",
"0.5872884",
"0.5860947",
"0.5858342",
"0.58425575",
"0.5842188",
"0.5838468",
"0.5820252",
"0.5806497",
"0.5793424",
"0.5778875",
"0.5777201",
"0.57733345",
"0.5773127",
"0.5737927",
"0.573736",
"0.5733393",
"0.57318425",
"0.57315606",
"0.5727955",
"0.5727866",
"0.57269937",
"0.57230157",
"0.5722979",
"0.57225704",
"0.5715125",
"0.571344",
"0.571344",
"0.57132536",
"0.5712118",
"0.57083267",
"0.57083267",
"0.5705169",
"0.56964666",
"0.56902665",
"0.5689124",
"0.5689124",
"0.5675007",
"0.5670242",
"0.5666744",
"0.56622475",
"0.56527454",
"0.5652293",
"0.5635138",
"0.5612574",
"0.56119794",
"0.56102014",
"0.56049365",
"0.5597767",
"0.55968213",
"0.5590521",
"0.55887336",
"0.55850494",
"0.5577975",
"0.5576438",
"0.55643845",
"0.55618894",
"0.55525416",
"0.55491024",
"0.5546425"
] | 0.8015229 | 0 |
Returns true iff the map contains the given index. TODO: rename to containsKey. | boolean contains(int idx); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean containsKey(Object index) {\n int i;\n return (i = ((Number) index).intValue()) >= 0 && i + start < size;\n }",
"public boolean contains(int key) {\n return map.containsKey(key);\n }",
"public boolean contains(int key) {\n\t\tint index = getIndex(key);\n\t\tint pos = getPos(key, index);\n\t\treturn pos >= 0;\n\t}",
"public boolean contains(int key) {\n\t\tint hashkey = hash(key);\n\t\treturn table[hashkey] != null && table[hashkey][pos(key)];\n\t}",
"public boolean contains(int key) {\n int index = getIndex(key);\n int index2 = getIndex2(key);\n if(buckets[index] != null){\n return buckets[index][index2] == true; \n }\n return false;\n }",
"public boolean contains(Key key);",
"public boolean contains(K key) \n {\n boolean result = false;\n int keyIndex = locateIndex(key);\n if ((keyIndex < numberOfEntries) && \n key.equals(dictionary[keyIndex].getKey()))\n result = true;\n return result;\n }",
"public boolean containsKey(String key) {\n if (!index.containsKey(key)) return false;\n else if (index.get(key).isEmpty()) return false;\n else return true;\n }",
"public boolean contains(K key);",
"public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }",
"public boolean contains(K key){\r\n int loc = find(key);\r\n if((hashTable[loc]!= null) && hashTable[loc].equals(key))\r\n return true;\r\n else\r\n return false;\r\n }",
"public boolean contains(int key) {\n int h = hash(key);\n Iterator<Integer> iterator = data[h].iterator();\n while (iterator.hasNext()) {\n Integer element = iterator.next();\n if (element == key) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(int key) { return contains(root, key); }",
"public boolean contains(int key) {\n \tfor(int k:set){\n \tif(k==key){\n \t\treturn true;\n \t}\n }\n\t\treturn false;\n }",
"public boolean contains (int k) {\n\t\treturn contains[k];\n\t}",
"public boolean contains(String key);",
"public boolean containsKey(Key key) ;",
"public boolean contains(int key) {\n if(entry[hashCode(key)]==null) return false;\n return entry[hashCode(key)].contains(key);\n }",
"public boolean contains(int key) {\n int index1 = hashfunc1(key);\n int index2 = hashfunc2(key);\n \n if(hset[index1] != null){\n return hset[index1][index2];\n }\n return false; \n }",
"@Override\n\tpublic boolean contains(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains (String key) {\r\n int arrIndex = hash(key);\r\n\r\n if (hashTableArray[arrIndex] == null) {\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n\r\n for (int i = 0; i < hashTableArray[arrIndex].size(); i++) {\r\n if (hashTableArray[arrIndex].get(i).key.equals(key)){\r\n return true; // returns true when a key already exists\r\n }\r\n }\r\n return false; // returns false when a key does not yet exist\r\n }",
"public boolean contains(int key) {\n return s.contains(key);\n }",
"@Override\n\tpublic boolean containsKey(Object key) {\n\t\treturn map.containsKey(key);\n\t}",
"public boolean contains( T key )\n {\n if (key == null) return false;\n for ( int i=0 ; i < size() ; ++i )\n if ( get(i).equals( key ) ) \n return true;\n \n return false;\n }",
"public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n int size = al.size();\n for (int i = 0; i < size; ++i)\n {\n if (al.get(i) == key)\n {\n return true;\n }\n }\n return false;\n }\n }",
"private boolean isKeyAtIndex(String key, int index) {\n return index >= 0 && index < size() && mDataSnapshots.get(index).getKey().equals(key);\n }",
"public boolean has(int index) {\n\t\treturn index >= 0 && index < values.size();\n\t}",
"public boolean contains(int key) {\n int h=hash(key);\n if(arr[h]!=null)\n return arr[h].contains(key);\n return false;\n }",
"@Override\n public boolean contains(Object o) {\n return theMap.keySet().contains(o);\n }",
"public native Boolean has(K key);",
"boolean contains(String key);",
"boolean contains(String key);",
"public boolean containsKey(String key);",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(Object key) {\n return map.containsKey(key);\n }",
"public boolean containsKey(int key) {\n return getElement(key) != null;\n }",
"public boolean contains(Object o) {\n\t\treturn map.containsKey(o);\n\t}",
"public boolean contains(int key) {\n Entry tab[] = table;\n int index = (key & 0x7FFFFFFF) % tab.length;\n for (Entry e = tab[index]; e != null; e = e.next) {\n if (e.key == key) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(String key)\r\n { return get(key) != null; }",
"boolean containsInfo(\n int key);",
"boolean exists(Integer key);",
"@Override\n public boolean contains(Object o) {\n return map.containsKey(o);\n }",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean containsKey(K key);",
"boolean containsKey(K key);",
"public boolean contains(N node)\r\n/* 56: */ {\r\n/* 57:105 */ assert (checkRep());\r\n/* 58:106 */ return this.map.containsKey(node);\r\n/* 59: */ }",
"boolean containsKey(long key);",
"boolean containsKey(int key) throws ContentStoreException;",
"public boolean contains(Object o) {\r\n return this.map.containsKey(o.hashCode());\r\n }",
"public abstract boolean containsKey(K key);",
"private static <T> boolean containsInMap(Map<Class, Set<T>> map, Class key, T element) {\n Set<T> set = map.get(key);\n\n if (set == null) {\n return false;\n }\n\n return set.contains(element);\n }",
"public boolean containsInfo(\n int key) {\n \n return internalGetInfo().getMap().containsKey(key);\n }",
"@Override\n public boolean contains(T item) {\n return itemMap.containsKey(item);\n }",
"@Override\n\tpublic boolean contains(K key) {\n\t\treturn false;\n\t}",
"public boolean has(byte[] key) throws IOException {\n assert (RAMIndex == true);\r\n return index.geti(key) >= 0;\r\n }",
"boolean has(String key);",
"public boolean contains(int key) {\n int hash1 = key % buckets;\n int hash2 = key / buckets;\n if(arr[hash1] == null)\n return false;\n return arr[hash1][hash2];\n }",
"boolean containsKey(CoreLabel key);",
"private boolean contains(String key) {\n return contains(dict, key);\n }",
"boolean contains(KeyType key);",
"public boolean containsKey(K key) {\n\t\t\n\t\t\n\t\treturn keySet.contains(key);\n }",
"@Override\n\tpublic boolean containsKey(Key k) {\n\t\treturn bst.has(k);\n\t}",
"public boolean contains(long key){\n for (int i = 0; i < numKeys; i++){\n if (keys[i].key == key){\n return true;\n }\n }\n return false;\n }",
"public boolean containsInfo(\n int key) {\n \n return internalGetInfo().getMap().containsKey(key);\n }",
"public final synchronized boolean containsKey(final K key) {\n\t\treturn map.containsKey(key);\n\t}",
"public boolean contains(K key)\n\t{\n\t\tcheckForNulls(key);\n\t\tint n = Math.abs(key.hashCode() % entries.length);\n\t\t\n\t\treturn (entries[n] == null) ? false : entries[n].contains(new Entry(key, null));\n\t}",
"public boolean contains(Key key) {\n return auxContains(root, key);\n }",
"@Test\n public void testCoh3710_keySetContains()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().contains(Integer.valueOf(1)));\n validateIndex(cache);\n }\n });\n }",
"private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }",
"public boolean contains( AnyType x )\n {\n int currentPos = findPos( x );\n if (array[currentPos] != null && array[currentPos].key.equals(x))\n \treturn true;\t\t//TODO : Test this method\n else\n \treturn false;\n \n }",
"@Override\n public boolean containsKey(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return false;\n }\n for (Entry<K,V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(Key key) {\n\t\treturn get(key) != null;\n\t}",
"private boolean checkIndices(int i, String key) {\n return i == genericServiceResult.getMap().get(key);\n }",
"public boolean contains(Key key) {\n return get(key) != null;\n }",
"public boolean containsKey(Object key) {\n\t\treturn false;\r\n\t}",
"public boolean\tcontains(String e) {\n\t\treturn map.containsKey(e);\n\t}",
"public boolean existsKey(String inKey);",
"boolean contains(int i);",
"public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}",
"public int contains(T anEntry);",
"@Override\n public boolean contains(String key) {\n if (key == null) {\n throw new IllegalArgumentException(\"argument to contains() is null\");\n }\n return get(root, key, 0) != null;\n }",
"public boolean containsKey(K key) {\n return keys[findIndex(key)] != null;\n }",
"@Override\n public boolean containsKey(Object key) {\n return entries.containsKey(key);\n }",
"@Override\n public boolean contains(Object item) {\n if (item == null)\n return false;\n return map.containsKey(item);\n }",
"public boolean containsKey(int key) {\r\n\t\ttry {\r\n\t\t\tthis.hashlock.readLock().lock();\r\n\t\t\tint index = index(key);\r\n\t\t\tif (index >= 0) {\r\n\t\t\t\tint pos = (index / FREE.length);\r\n\t\t\t\tthis.claims.position(pos);\r\n\t\t\t\tthis.claims.put((byte) 1);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t} catch (Exception e) {\r\n\t\t\tSDFSLogger.getLog().fatal(\"error getting record\", e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\tthis.hashlock.readLock().unlock();\r\n\t\t}\r\n\t}",
"public boolean contains(int key) throws SharedUtil.MapMarkerInvalidStateException\r\n\t{\r\n\t\tif(state!=STATE.ITERATE)\r\n\t\t\tthrow new SharedUtil.MapMarkerInvalidStateException(\"invalid mapMarker manager state: contains() only allow state of STATE.ITERATE\");\r\n\t\treturn dellist.containsKey(key);\r\n\t}",
"public boolean containsId(String key, Long userId) {\n if(index.containsKey(key)) {\n return index.get(key).contains(userId);\n }\n return false;\n }",
"public synchronized boolean has(byte[] key) throws IOException {\n if ((kelondroAbstractRecords.debugmode) && (RAMIndex != true)) serverLog.logWarning(\"kelondroFlexTable\", \"RAM index warning in file \" + super.tablename);\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n return index.geti(key) >= 0;\r\n }",
"boolean contains(KeyType key, ValueType value);",
"public boolean contains(String key) {\r\n\t\treturn getValue(key) != null;\r\n\t}",
"public boolean containsValue(Object value) {\n return map.containsValue(value);\n }",
"@org.junit.Test\n public void contains() throws Exception {\n assertEquals(true, hashTable.contains(\"Blue\"));\n assertEquals(false, hashTable.contains(\"blue\"));\n }",
"@Override\r\n\tpublic boolean containsKey(Object key) {\r\n\t\tif (key == null) throw new NullPointerException();\r\n\t\treturn get(key) != null;\r\n\t}",
"public boolean contains(int k) {\n // YOUR CODE HERE\n return true;\n }",
"public boolean containsKey(K key) {\n int index = getIndex(getHash(key));\n Entry<K, V> entry = (Entry<K, V>) table[index];\n\n if (entry == null) {\n return false;\n }\n\n while (entry.hasNext()) {\n if (entry.getKey().equals(key))\n return true;\n entry = entry.getNext();\n }\n\n return entry.getKey().equals(key);\n }"
] | [
"0.73866844",
"0.72436726",
"0.71927816",
"0.6939732",
"0.6906332",
"0.688147",
"0.6878956",
"0.6871754",
"0.68667644",
"0.6858722",
"0.68357563",
"0.6794759",
"0.6787112",
"0.6770115",
"0.67461085",
"0.6739906",
"0.6735256",
"0.6734155",
"0.67214864",
"0.66876674",
"0.6655875",
"0.6648075",
"0.6639094",
"0.6637545",
"0.6608807",
"0.6586247",
"0.65815485",
"0.657593",
"0.65717685",
"0.6518222",
"0.6517819",
"0.6517819",
"0.6515144",
"0.6510534",
"0.6510534",
"0.6473368",
"0.6462603",
"0.64587706",
"0.64530885",
"0.6450262",
"0.64476",
"0.6442009",
"0.64413226",
"0.64413226",
"0.64413226",
"0.64413226",
"0.64413226",
"0.64413226",
"0.6426419",
"0.6426419",
"0.6424652",
"0.6412864",
"0.63959026",
"0.6393377",
"0.6389496",
"0.63828754",
"0.6378618",
"0.6366185",
"0.63453704",
"0.6317829",
"0.63147974",
"0.6311797",
"0.6302233",
"0.6294422",
"0.6292967",
"0.62923604",
"0.6287627",
"0.62705964",
"0.6265741",
"0.6241926",
"0.6240227",
"0.62367266",
"0.62106997",
"0.61948556",
"0.6189941",
"0.617708",
"0.61493784",
"0.6142004",
"0.61339456",
"0.61318845",
"0.61277634",
"0.61224514",
"0.6118088",
"0.61157393",
"0.61154974",
"0.6108073",
"0.6106403",
"0.60921276",
"0.6086088",
"0.6082974",
"0.608277",
"0.6079761",
"0.6065267",
"0.60568374",
"0.6055032",
"0.60513175",
"0.6051222",
"0.60433936",
"0.60380554",
"0.6032686"
] | 0.726992 | 1 |
Puts the value with the specified index in the map, replacing the current value if it exists, and returning the previous value. | float put(int idx, float val); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T put(int index, T t);",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic V put(K key, V value) {\n\t/* TCJ\n\t * Binary search operation: log n\n\t * Iterate through new collection: n\n\t */\n\t\t//.getKey().compareTo(null) == 0\n\t\tV oldValue;\n\t\tint j = findIndex(key);\n\t\tif ( map.get(j) == null ) {\n\t\t\toldValue = null;\n\t\t} else {\n\t\t\toldValue = map.get(j).getValue();\n\t\t}\n\t\t\n\t\tif ( j < size() && key.compareTo(map.get(j).getKey()) == 0) {\n\t\t\tmap.get(j).setValue(value);\n\t\t\treturn oldValue;\n\t\t}\n\t\tmap.add(j, new mapEntry<K, V>(key, value));\n\t\treturn null;\n\t}",
"protected Object putElement(int key, Object value) {\n int index = key % capacity;\n if (index < 0) {\n index = -index;\n }\n if (map[index] == null) {\n //.... This is a new key since no bucket exists\n objectCounter++;\n map[index] = create(key, value);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n //.... A bucket already exists for this index: check whether \n // we already have a mapping for this key\n MapElement me = map[index];\n while (true) {\n if (me.getKey() == key) {\n return me.atInsert(value);\n } else {\n if (me.getNext() == null) {\n // No next element: so we have no mapping for this key\n objectCounter++;\n MapElement result = create(key, value);\n me.setNext(result);\n contents++;\n if (contents > maxLoad) {\n rehash();\n }\n return null;\n } else {\n me = me.getNext();\n }\n }\n }\n }\n }",
"public void replaceValueInEntry(int i, @NullableDecl V v, boolean z) {\n Preconditions.checkArgument(i != -1);\n int smearedHash = Hashing.smearedHash(v);\n int findEntryByValue = findEntryByValue(v, smearedHash);\n if (findEntryByValue != -1) {\n if (z) {\n removeEntryValueHashKnown(findEntryByValue, smearedHash);\n if (i == this.size) {\n i = findEntryByValue;\n }\n } else {\n throw new IllegalArgumentException(\"Value already present in map: \" + v);\n }\n }\n deleteFromTableVToK(i, Hashing.smearedHash(this.values[i]));\n this.values[i] = v;\n insertIntoTableVToK(i, smearedHash);\n }",
"public Object put(Object index, Object value) {\n int i;\n if ((i = ((Number) index).intValue()) < 0)\n throw new NoSuchKeyException(i, size - start);\n if ((i += start) >= size)\n throw new NoSuchKeyException(i - start, size - start);\n array[i] = value;\n return null;\n }",
"Value replaceValue(Entry<Key, Value> entry, Value value);",
"public void put(int key, int value) {\n\n int index = key % n;\n MapNode node = keys[index];\n// System.out.println(key + \" \" + value + \" \" + (node == null));\n for (int i =0; i < node.list.size(); ++i) {\n if (node.list.get(i) == key) {\n node.list.remove(i);\n vals[index].list.remove(i);\n }\n }\n\n node.list.add(key);\n vals[index].list.add(value);\n }",
"public T setVal(int idx, T val) {\n\t\tint index = (idx << 1) + 1;\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tT old = (T) nvPairs.get(index);\n\t\tnvPairs.set(index, val);\n\t\treturn old;\n\t}",
"private void put(Map<T, Integer> state, T key, int val) {\n if (val == 0)\n state.remove(key);\n else\n state.put(key, val);\n }",
"@ZenCodeType.Method\n @ZenCodeType.Operator(ZenCodeType.OperatorType.INDEXSET)\n default void put(String index, @ZenCodeType.Nullable IData value) {\n \n notSupportedOperator(OperatorType.INDEXSET);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public void put(int index, Object value) {\n switch (index) {\n case 0:\n this.options = (Map<String, String>) value;\n break;\n\n default:\n throw new IndexOutOfBoundsException(\"Invalid index specified.\");\n }\n }",
"@Override\n public V put(K key, V value) {\n\n \tV tempValue = get(key);\n \t\n \tLinkedList<Entry> tempBucket = chooseBucket(key);\n \t\n \tif(tempValue != null) {\n \t\tfor(int i=0;i<tempBucket.size();i++) {\n\t \t\tEntry tempEntry = tempBucket.get(i);\n\t \t\t\n\t \t\tif(tempEntry.getKey() == key) {\n\t \t\t\tV returnValue = tempEntry.getValue();\n\t \t\t\ttempEntry.setValue(value);\n\t \t\t\treturn returnValue;\n\t \t\t}\n\t \t}\n \t} else {\n \t\tsize ++;\n \t\ttempBucket.add(new Entry(key, value));\n \t}\n \t\n \tif(size > buckets.length*ALPHA) {\n \t\trehash(GROWTH_FACTOR);\n \t}\n \t\n return tempValue;\n }",
"public synchronized Object put( Object key, Object object ) {\n\t\tObject oldPos = mapKeyPos.get(key);\n\t\tif ( oldPos != null ) {\n\t\t\tint pos = ((Integer)oldPos).intValue();\n\t\t\tObject oldObject = values[pos];\n\t\t\tvalues[pos] = object;\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t} else {\n\t\t\t// skip to new pos -- for Cache, change walkStatus() to get lock....\n\t\t\twhile (walkStatus() != LRU_OLD) {}\n\n\t\t\tObject intvalue;// = null;\n\t\t\tif ( keys[cur] != null ) {\n\t\t\t\tintvalue = mapKeyPos.remove(keys[cur]);\n//\t\t\t\tif ( intvalue == null )\n//\t\t\t\t\tintvalue = new Integer(cur);\n\t\t\t} else {\n\t\t\t\tintvalue = new Integer(cur);\n\t\t\t}\n\t\t\tObject oldObject = values[cur];\n\t\t\tkeys[cur] = key;\n\t\t\tvalues[cur] = object;\n\t\t\tstatus[cur] = LRU_NEW;\n\t\t\t//System.out.println(\"mapKeyPos, key: \"+key+\" intvalue: \"+intvalue);\n\t\t\tmapKeyPos.put(key, intvalue);\n\t\t\tcur++;\n\t\t\tif ( cur >= size ) cur = 0;\n\t\t\tif ( oldObject != null )\n\t\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t}\n\t}",
"public Object set(int index, Object element) {\r\n Entry e = entry(index);\r\n Object oldVal = e.element;\r\n e.element = element;\r\n return oldVal;\r\n }",
"@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }",
"@Override\n public int set(int index, int element) {\n checkIndex(index);\n int result = getEntry(index).value;\n getEntry(index).value = element;\n return result;\n }",
"@SuppressWarnings(\"unchecked\")\n public T put(int key, T value) {\n resizeTables(count);\n int bucketIndex = findBucketIndex(key, true /* returnLast */);\n\n if(bucketIndex != -1) {\n long bucket = buckets[bucketIndex];\n int bucketKey = extractKey(bucket);\n\n if(bucketKey == key) {\n // The same key has been found.\n T oldValue = (T)data[bucketIndex];\n data[bucketIndex] = value;\n return oldValue;\n }\n else {\n // A new entry must be added at the end of the bucket.\n int dataIndex = appendData(key, value);\n buckets[bucketIndex] = replaceNext(dataIndex, bucket);\n }\n }\n else {\n // No bucket is associated with the hash code yet.\n int dataIndex = appendData(key, value);\n int keyHash = computeHash(key);\n table[keyHash] = dataIndex;\n }\n\n return null;\n }",
"@Override\n // worst-case complexity: O(1), only assignments and array accesses\n public T set(int index, T item) {\n if (index < size && index >= 0) {\n T prev = arr[index];\n // replace the item\n arr[index] = item;\n // return the previous item at this index\n return prev;\n }\n // else throw an exception\n throw new IndexOutOfBoundsException();\n }",
"public void put(int key, int value) {\n if (get(key) == -1)\n hashMap.add(new int[]{key, value});\n else {\n hashMap.stream().filter(pair -> pair[0] == key)\n .findAny()\n .map(pair -> pair[1] = value);\n }\n }",
"@Override\n public T set(int index, T element) {\n if (indexCheck(index)) {\n T previousValue = (T) data[index];\n data[index] = element;\n return previousValue;\n }\n return null;\n }",
"@Override\r\n\tpublic V putElement(K key, V value) {\n\t\t\r\n\t\tif (capacity == 0)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (hashMap.isEmpty()) {\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t\treturn value;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tV element = getElement(key);\r\n\t\tV returnValue = hashMap.get(que.get(0));\r\n\t\t\r\n\t\tif (element == null) {\r\n\t\t\tif (hashMap.size() == capacity){\r\n\t\t\t\tremoveElement(que.get(0));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\thashMap.put(key, value);\r\n\t\t\tque.add(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnValue;\r\n\t}",
"public void put(int key, int value) {\n if(map.containsKey(key)) \n removeNode(map.get(key));\n \n if(map.size() == cap)\n removeNode(tail.prev);\n \n insertNode(new Node(key, value));\n }",
"public void put(int key, int value) {\n Node n = map.get(key);\n if(n == null){\n n = new Node(key, value);\n add(n);\n map.put(key, n);\n }\n else{\n n.val = value;\n update(n);\n }\n if(map.size() > this.capacity ){\n //we need to remove a stale node now\n Node removeNode = tail.prev;\n remove(removeNode);\n map.remove(removeNode.key);\n return;\n }\n return;\n }",
"protected V bucketPut(int h, K k, V v) {\n int j = findSlot(h, k);\n if (j >= 0) // this key has an existing entry\n return table[j].setValue(v);\n table[-(j + 1)] = new MapEntry<>(k, v); // convert to proper index\n n++;\n return null;\n }",
"public void put(int key, int value) {\n if(map.get(key) != null){\n Node node = map.get(key);\n node.value = value;\n deleteNode(node);\n addToHead(node);\n } else {\n Node node = new Node(key, value);\n map.put(key, node);\n if(size < capacity){\n size++;\n addToHead(node);\n } else {\n map.remove(tail.prev.key);\n deleteNode(tail.prev);\n addToHead(node);\n }\n }\n }",
"@Override\n public V put(K key, V value) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n // Create a new linked list at table[index].\n table[index] = new LinkedList<Entry<K, V>>();\n }\n\n // Search the list at table[index] to find the key.\n for (Entry<K, V> nextItem : table[index]) {\n // If the search is successful, replace the old value.\n if (nextItem.key.equals(key)) {\n // Replace value for this key.\n V oldVal = nextItem.value;\n nextItem.setValue(value);\n return oldVal;\n }\n }\n\n // assert: key is not in the table, add new item.\n table[index].addFirst(new Entry<K, V>(key, value));\n numKeys++;\n if (numKeys > (LOAD_THRESHOLD * table.length)) {\n rehash();\n }\n return null;\n }",
"void put(Object indexedKey, Object key);",
"public synchronized V putIfAbsent(K k, V v) {\n final int h = getHash(k), hash = h % buckets.length;\n ItemNode<K,V> node = ItemNode.search(buckets[hash], k);\n if (node != null)\n return node.v;\n else {\n buckets[hash] = new ItemNode<K,V>(k, v, buckets[hash]);\n cachedSize++;\n return null;\n }\n }",
"public synchronized Integer put(Integer key, Integer val) {\n Integer replacedVal = null;\n Node existing = cache.get(key);\n if (existing == null) { // new key\n if (cache.size() >= capacity) {\n existing = evict(key, val);\n } else {\n existing = new Node(key, val);\n addNewNodeToFront(existing);\n }\n cache.put(key, existing);\n } else { // replace exiting key\n replacedVal = existing.val;\n existing.key = key;\n existing.val = val;\n moveOldNodeToFront(existing);\n }\n return replacedVal;\n }",
"public synchronized V put(K k, V v) {\n final int h = getHash(k), hash = h % buckets.length;\n ItemNode<K,V> node = ItemNode.search(buckets[hash], k);\n if (node != null) {\n V old = node.v;\n node.v = v;\n return old;\n } else {\n buckets[hash] = new ItemNode<K,V>(k, v, buckets[hash]);\n cachedSize++;\n return null;\n }\n }",
"public void put(int key, int value) {\n store[key] = value; // update operation= overwritten \n }",
"public void put(int key, int value) {\n Node n = null;\n \n if (map.containsKey(key)) {\n n = map.get(key);\n if (n.next != tail) // IMPORTANT!\n putToTail(n);\n n.val = value;\n return;\n }\n \n n = new Node(key, value);\n map.put(key, n);\n putToTail(n);\n \n // if full, remove from head first\n if (size == 0) {\n removeHead();\n } else {\n size--;\n }\n\n }",
"public void put(int key, int value) {\n map.put(key,value);\n }",
"public V put(String key, V value) {\n int index = hashOf(key);\n while (index > capacity) grow();\n Object oldValue = values[index];\n values[index] = value;\n if (oldValue == null) size++;\n return (V) oldValue;\n }",
"public void put(int key, int value) {\n if(value == 0)\n arr[key] = -1;\n else\n arr[key] = value;\n }",
"public V put(K key, V value) {\n\t\tint pos = key.hashCode() / numCub;\n\t\tV valor = this.get(key);\n\t\tif (pos < tam) {\n\t\t\tint indice = tabla.get(pos).keySet().indexOf(key);\n\t\t\tif (indice == -1) {\n\t\t\t\ttabla.get(pos).valueSet().add(value);\n\t\t\t\ttabla.get(pos).keySet().add(key);\n\t\t\t} else {\n\t\t\t\ttabla.get(pos).valueSet().set(indice, value);\n\t\t\t\ttabla.get(pos).keySet().set(indice, key);\n\t\t\t}\n\t\t} else { //Mapa demasiado pequeno, redimensiona y vuelve a intentarlo\n\t\t\tthis.redimensionar();\n\t\t\tthis.put(key, value);\n\t\t}\n\t\treturn valor;\n\t}",
"public V put(K key, V value) {\r\n\t\t// if (this.contains(key)){\r\n\t\t// return this.changeValue(key, value);\r\n\t\t// } else {\r\n\t\treturn linearProbing(key, value);\r\n\t}",
"public Value putIfExists(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < data.size(); i++) {\r\n\t\t\t\tif (data.get().getKey().compareTo(key) == 0) {\r\n\t\t\t\t\tValue ret = data.get().getValue();\r\n\t\t\t\t\tdata.get().setValue(value);\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\t\t\t\tdata.next();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}",
"public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }",
"public V put(K key, V value) {\r\n\t\tint place = hash(key.hashCode());\r\n\t\tif (get(key) != null) {\r\n\t\t\tLinkedList<KVPair> temp = hashMapArray[place];\r\n\t\t\tfor (KVPair i : temp) {\r\n\t\t\t\tif (i.getKey().equals(key)) {\r\n\t\t\t\t\tV oldKey = i.getValue();\r\n\t\t\t\t\ti.setValue(value);\r\n\t\t\t\t\treturn oldKey;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ((capacity * loadFactor) <= (size)) {\r\n\t\t\t\texpand(capacity + 10);\r\n\t\t\t\treturn put(key, value);\r\n\t\t\t} else if (hashMapArray[place] == null) {\r\n\t\t\t\thashMapArray[place] = new LinkedList<KVPair>();\r\n\t\t\t}\r\n\t\t\thashMapArray[place].add(new KVPair(key, value));\r\n\t\t\tsize++;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"@Override\n public E set(int index, E value) {\n // todo: Students must code\n checkRange(index);\n int pos = calculate(index);\n E oldVal = data[pos];\n data[pos] = value;\n return oldVal;\n }",
"public void put(int key, int value) {\n if(!map.contains(key)){\n // If the cache is full, remove from the end of the deque and the map\n if(deque.size() == cacheSize){\n int lastElement = deque.removeLast();\n map.remove(lastElement);\n }else{\n // The data is found in the cache, but it could be anywhere\n // So iterate the queue and push it forward\n int index = 0, i = 0;\n Iterator<Integer> itr = deque.iterator();\n while(itr.hasNext()){\n if(itr.next() == key){\n index = i;\n break;\n }\n i++;\n }\n // Now index position locates the key in the deque. Remove it and add it\n // to the front of the queue\n deque.remove(index);\n }\n deque.push(key);\n // Add also the key to the map\n map.add(key);\n } \n }",
"T put(CharSequence key, int pos, T addValue)\n\t\t{\n\t\t\tNode<T> nextNode;\n\t\t\tCharacter ch;\n\t\t\tT old;\n\n\t\t\tif(key.length() == pos)\n\t\t\t{\t// at terminating node\n\t\t\t\told = value;\n\t\t\t\tsetValue(addValue);\n\t\t\t\treturn old;\n\t\t\t}\n\t\t\tch = key.charAt(pos);\n\t\t\tif(nextMap == null)\n\t\t\t{\n\t\t\t\tnextMap = newNodeMap();\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch, nextNode);\n\t\t\t}\n\t\t\telse if((nextNode = nextMap.get(ch))==null)\n\t\t\t{\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch,nextNode);\n\t\t\t}\n\t\t\treturn nextNode.put(key,pos+1,addValue);\n\t\t}",
"@Override\n public E set(int index, E value) {\n this.rangeCheck(index);\n E oldValue = (E) this.values[index];\n this.values[index] = value;\n return oldValue;\n }",
"@Override\n public T put(String key, T value) {\n T old = null;\n // Do I have an entry for it already?\n Map.Entry<String, T> entry = entries.get(key);\n // Was it already there?\n if (entry != null) {\n // Yes. Just update it.\n old = entry.setValue(value);\n } else {\n // Add it to the map.\n map.put(prefix + key, value);\n // Rebuild.\n rebuildEntries();\n }\n return old;\n }",
"<T> void put(String variable, T newValue, int... indexes) throws ClassCastException, ArrayIndexOutOfBoundsException;",
"public V put(final K key, final V value) {\n expunge();\n final int hash = hash(key);\n final int index = index(hash, entries.length);\n\n for (Entry<K, V> entry = entries[index]; entry != null; entry = entry.nextEntry) {\n if (hash == entry.hash && key == entry.get()) {\n final V oldentry = entry.value;\n if (value != oldentry) {\n entry.value = value;\n }\n return oldentry;\n }\n }\n\n entries[index] = new Entry<K, V>(key, value, refqueue, hash, entries[index]);\n if (++size >= threshold) {\n resize(entries.length * 2);\n }\n return null;\n }",
"public void put(K key, V val) {\n int index = findIndex(key);\n // the real reason we bother to check is \n // to know whether or not to increment pairs.\n if (keys[index] == null) {\n keys[index] = key;\n values[index] = val;\n }\n else\n values[index] = val;\n }",
"@Override\n public int get(int index) {\n checkIndex(index);\n return getEntry(index).value;\n }",
"public V put(K key, V value) {\n if (null == key) {\n return isertNullKey(key, value);\n } else {\n // inserting other keys\n int location = hashFunction(key.hashCode());\n if (location / capacity >= loadFactor) {\n resize();\n }\n MyEntry<K, V> entry = null;\n entry = bucket[location];\n //if a value exists with same key, we are not overriding that value, just returning the same,\n //in hashMap they actually override the new value\n if (entry != null && key == entry.getKey()) {\n return entry.getValue();\n } else {\n MyEntry ent = new MyEntry();\n ent.setKey(key);\n ent.setValue(value);\n bucket[location] = ent;\n return value;\n }\n\n }\n }",
"private void collisionProcessing(K key, V value, int index) {\n Entry<K, V> current = (Entry<K, V>) table[index];\n\n while (current.hasNext()) {\n if (current.getKey().equals(key)) {\n current.setValue(value);\n return;\n }\n\n current = current.getNext();\n }\n\n if (current.getKey().equals(key)) {\n current.setValue(value);\n return;\n }\n\n current.setNext(new Entry<>(key, value));\n }",
"@Override\r\n\tpublic V put(K key, V value) {\r\n\t\tint index = key.hashCode() % numBuckets;\r\n\t\treturn ((Bucket) buckets[index]).put(key, value);\r\n\t}",
"public Integer mutate(int index);",
"public void put(int key, int value) {\n int hashedKey = hash(key);\n Entry entry = map.get(hashedKey);\n if (entry.key == -1){\n // empty entry, insert entry\n entry.key = key;\n entry.value = value;\n }else if (entry.key == key){\n // target entry\n entry.value = value;\n }else{\n // in list, find target entry\n while(entry.key != key && entry.next!=null){\n entry = entry.next;\n }\n if (entry.key == key)\n entry.value = value;\n else\n entry.next = new Entry(key, value);\n }\n }",
"private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}",
"@Override\n\tpublic V put(K key, V value) {\n\t\tV v = map.put(key, value);\n\t\tif (map.containsKey(key))\n\t\t\tkeys.add(key);\n\t\t\n\t\treturn v;\n\t}",
"public static void set(int key, int value) {\n\t\t// your code here\n\t\tif (!map.containsKey(key)) {\n\t\t\tif (map.size() == size) {\n\t\t\t\tfor (Integer i : map.keySet()) {\n\t\t\t\t\tmap.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmap.put(key, value);\n\t\t\t}\n\t\t\telse\n\t\t\t\tmap.put(key, value);\n\t\t} else {\n\t\t\tmap.remove(key);\n\t\t\tmap.put(key, value);\n\t\t}\n\n\t}",
"@Override\n public E set(int index, E elem) {\n\t E first = _store[index];\n\t _store[index] =elem;\n\t return first;\n }",
"public void put(int key, int value) {\n int index = keys.indexOf(key);\n if(index >= 0) {\n values.set(index, value);\n } else {\n keys.add(key);\n values.add(value);\n }\n }",
"@Override\n\tpublic V put(K key, V value) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// caut daca cheya mai este folosita si inlocuiesc elementul entry .\n\t\t\tif (b.get(h).e.get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tremove(key);\n\t\t\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\tb.get(h).e.add(new Entry<K, V>(key, value));\n\t\treturn null;\n\t}",
"public void set(int index, int val) {\n boolean exists = arr.get(index).get(arr.get(index).size() - 1).id == id;\n if (exists) {\n arr.get(index).get(arr.get(index).size() - 1).val = val;\n } else {\n List<Pair> list = arr.get(index);\n list.add(new Pair(id, val));\n arr.set(index, list);\n } \n }",
"public V putIfAbsent(K k, V v) {\n final int h = getHash(k), stripe = h % lockCount;\n synchronized(locks[stripe]){\n final int hash = h % buckets.length;\n ItemNode<K,V> node = ItemNode.search(buckets[hash], k);\n if (node != null)\n return node.v;\n else {\n buckets[hash] = new ItemNode<K,V>(k, v, buckets[hash]);\n sizes[stripe]++;\n if (sizes[stripe] > buckets.length / lockCount)\n reallocateBuckets();\n\n return null;\n }\n }\n }",
"@NullableDecl\n public V put(@NullableDecl K k, @NullableDecl V v, boolean z) {\n int smearedHash = Hashing.smearedHash(k);\n int findEntryByKey = findEntryByKey(k, smearedHash);\n if (findEntryByKey != -1) {\n V v2 = this.values[findEntryByKey];\n if (Objects.equal(v2, v)) {\n return v;\n }\n replaceValueInEntry(findEntryByKey, v, z);\n return v2;\n }\n int smearedHash2 = Hashing.smearedHash(v);\n int findEntryByValue = findEntryByValue(v, smearedHash2);\n if (!z) {\n Preconditions.checkArgument(findEntryByValue == -1, \"Value already present: %s\", (Object) v);\n } else if (findEntryByValue != -1) {\n removeEntryValueHashKnown(findEntryByValue, smearedHash2);\n }\n ensureCapacity(this.size + 1);\n K[] kArr = this.keys;\n int i = this.size;\n kArr[i] = k;\n this.values[i] = v;\n insertIntoTableKToV(i, smearedHash);\n insertIntoTableVToK(this.size, smearedHash2);\n setSucceeds(this.lastInInsertionOrder, this.size);\n setSucceeds(this.size, -2);\n this.size++;\n this.modCount++;\n return null;\n }",
"public int putElement(Object key, int value)\r\n {\r\n return put(key, value);\r\n }",
"private void setSeenInfo(\n int index, SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.set(index, value);\n }",
"public V add(K key, V value)\r\n\t{\r\n\t\tint slot = findSlot(key, false); // check if key already exists\r\n\t\tV oldVal = null;\r\n\t\t\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = table[slot];\r\n\t\t\toldVal = e.setValue(value);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tslot = findSlot(key, true); // find empty slot for adding\r\n\t\t\ttable[slot] = new MapEntry<>(key, value);\r\n\t\t\tcount++;\r\n\t\t\tif (count >= maxCount)\r\n\t\t\t{\r\n\t\t\t\trehash();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}",
"private Node put(Node x, String key,Value val,int index){\n\t\t\n\t\tif(x==null) x=new Node();\n\t\t//check if you have hit the end\n\t\tif(index==key.length()){\n\t\t\tx.val=val;\n\t\t\treturn x;\n\t\t}\n\t\t\n\t\t//int pos=key.charAt(index)-48; // jaffa !! we are not just dealing with decimals.\n\t\tint pos=key.charAt(index);\n\t\tx.array[pos]=new Node();\n\t\tx.array[pos]=put(x.array[pos],key,val,(index+1));\n\t\treturn x;\n\t}",
"public V put(K k, V v) {\n final int h = getHash(k), stripe = h % lockCount;\n synchronized (locks[stripe]) {\n final int hash = h % buckets.length;\n final ItemNode<K,V> node = ItemNode.search(buckets[hash], k);\n if (node != null) {\n V old = node.v;\n node.v = v;\n return old;\n } else {\n buckets[hash] = new ItemNode<K,V>(k, v, buckets[hash]);\n sizes[stripe]++;\n return null;\n }\n }\n }",
"public V bubbaPut(K key, V value) {\n int idx = hash(key);\n int hashVal = idx;\n var entry = new Entry(key, value, 0);\n\n while (table[idx] != null) {\n if (table[idx].offset == calcOff(hashVal, idx) && table[idx].key.equals(key)) {\n V oldVal = table[idx].value;\n table[idx].value = value;\n return oldVal;\n } else if (table[idx].offset < calcOff(hashVal, idx)) {\n var temp = table[idx];\n table[idx] = entry;\n entry.offset = calcOff(hashVal, idx);\n entry = temp;\n hashVal = hash(entry.key);\n }\n idx = increment(idx);\n }\n table[idx] = entry;\n entry.offset = calcOff(hashVal, idx);\n size++;\n if (size >= loadFactor * table.length) {\n rehash(table.length * 2);\n }\n return value;\n }",
"public int getOrAdd(T val) {\n Integer idx = hmap.get(val);\n if (idx == null) {\n int i = list.size();\n idx = new Integer(i);\n list.add(val);\n hmap.put(val, idx);\n }\n return idx.intValue();\n }",
"@Override\n public Object put(int k, Object v) {\n long startTime, endTime;\n int attempts = 0;\n startTime = System.currentTimeMillis();\n Object value = hashTable[super.hashCode(k)];\n if (value == null) {\n value = super.put(k, v);\n endTime = System.currentTimeMillis();\n } else {\n startTime = System.currentTimeMillis();\n collisions++;\n for (int i = 1; i < super.size() && value != null; i++) {\n attempts++;\n int hash = (k + i) % size();\n MapElement me = hashTable[hash];\n if (me == null) {\n hashTable[hash] = new MapElement(k, v);\n value = null;\n }\n }\n endTime = System.currentTimeMillis();\n }\n elements++;\n if (value != null) {\n System.out.println(\"HASHTABLE IS FULL\");\n }\n System.out.println(\"------PUT------\");\n System.out.println(\"Size: \" + super.size());\n System.out.println(\"Elements: \" + elements);\n System.out.println(\"Collisions: \" + (collisions));\n System.out.println(\"Attempts: \" + attempts);\n System.out.println(\"TIME: \" + (endTime - startTime));\n reSize();\n return value;\n }",
"public void put(int key, int value) {\n if (hashmap.containsKey(key)){\n\t\t\tEntry entry = hashmap.get(key);\n\t\t\tentry.value = value;\n\t\t\tremoveNode(entry);\n\t\t\taddAtTop(entry);\n\t\t} else {\n\t\t\tEntry newnode = new Entry();\n\t\t\tnewnode.left = null;\n\t\t\tnewnode.right = null;\n\t\t\tnewnode.value = value;\n\t\t\tnewnode.key = key;\n\t\t\tif (hashmap.size() == LRU_SIZE) {\n\t\t\t\thashmap.remove(end.key);\n\t\t\t\tremoveNode(end);\t\t\t\t\n\t\t\t\taddAtTop(newnode);\n\n\t\t\t} else {\n\t\t\t\taddAtTop(newnode);\n\t\t\t}\n\n\t\t\thashmap.put(key, newnode);\n\t\t}\n }",
"public V put(K key, V value);",
"public void put(int key, int value) {\n newkey = hashfunc(key);\n arr[newkey]= value;\n \n }",
"V put(K key, V value);",
"public void put(K key, V value) {\n int hash = getHash(key.hashCode());\n Entry<K, V> existing = buckets[hash];\n Entry<K, V> entry = new Entry<>(key, value);\n\n if (existing == null) {\n buckets[hash] = entry;\n } else { // using separating chaining collision resolution. Another way is open addressing, resizing the array to reducing collision.\n while(existing.next != null) {\n if (existing.key.equals(key)) {\n existing.value = value;\n return;\n }\n existing = existing.next;\n }\n if (existing.key.equals(key)) {\n existing.value = value;\n } else {\n existing.next = entry;\n }\n }\n }",
"public V put(K k, V v) {\n final int h = getHash(k), stripe = h % lockCount;\n final Holder<V> old = new Holder<V>();\n ItemNode<K,V>[] bs;\n int afterSize; \n synchronized (locks[stripe]) {\n bs = buckets;\n final int hash = h % bs.length;\n final ItemNode<K,V> node = bs[hash], \n newNode = ItemNode.delete(node, k, old);\n bs[hash] = new ItemNode<K,V>(k, v, newNode);\n // Write for visibility; increment if k was not already in map\n afterSize = sizes.addAndGet(stripe, newNode == node ? 1 : 0);\n }\n if (afterSize * lockCount > bs.length)\n reallocateBuckets(bs);\n return old.get();\n }",
"Object put(Object key, Object value);",
"void put(ThreadLocal<?> key, Object value) {\n cleanUp();\n\n // Keep track of first tombstone. That's where we want to go back\n // and add an entry if necessary.\n int firstTombstone = -1;\n\n for (int index = key.hash & mask;; index = next(index)) {\n Object k = table[index];\n\n if (k == key.reference) {\n // Replace existing entry.\n table[index + 1] = value;\n return;\n }\n\n if (k == null) {\n if (firstTombstone == -1) {\n // Fill in null slot.\n table[index] = key.reference;\n table[index + 1] = value;\n size++;\n return;\n }\n\n // Go back and replace first tombstone.\n table[firstTombstone] = key.reference;\n table[firstTombstone + 1] = value;\n tombstones--;\n size++;\n return;\n }\n\n // Remember first tombstone.\n if (firstTombstone == -1 && k == TOMBSTONE) {\n firstTombstone = index;\n }\n }\n }",
"public V put(final K key, final V value) {\r\n if (key == null) {\r\n return null;\r\n }\r\n\r\n // find the place to put it and stuff it in, overwriting what was\r\n // previously there\r\n int pos = getKeyPosition(key);\r\n V prevValue = null;\r\n CacheData<K, V> cacheData = getCacheData(pos);\r\n if (cacheData != null) {\r\n prevValue = cacheData.getValue();\r\n cacheData.setKeyValue(key,value);\r\n } else {\r\n setCacheData(pos, factory.createPair(key, value));\r\n }\r\n\r\n return (cacheData == null) ? null : prevValue;\r\n }",
"ValueType put(long key, ValueType entry);",
"void set(int idx, int val);",
"public void put(int key, int value) {\n int index = getIndexForKey(key);\n Entry entries = table[index];\n\n for(Entry entry = entries; entry != null; entry = entry.next){\n if(entry.key == key){\n entry.value = value;\n entry.removeEntry();\n entry.addBefore(header);\n return;\n }\n }\n if(size >= capacity){\n removeEldestEntry();\n }\n addEntry(key, value, index);\n }",
"public void put(int key, int value) {\n // 普通的取模\n int pos = key % this.size;\n Bucket bucket = this.buckets[pos];\n bucket.update(key, value);\n }",
"@Override\n @SuppressWarnings(\"unchecked\")\n public void put(int index, Object value) {\n switch (index) {\n case 0:\n this.tableName = (String)value;\n break;\n\n case 1:\n this.filepaths = (List<String>)value;\n break;\n\n case 2:\n this.modifyColumns = (Map<String, Map<String, String>>)value;\n break;\n\n case 3:\n this.createTableOptions = (Map<String, String>)value;\n break;\n\n case 4:\n this.options = (Map<String, String>)value;\n break;\n\n default:\n throw new IndexOutOfBoundsException(\"Invalid index specified.\");\n }\n }",
"public void replace(K key, V value) {\r\n int hash = key.hashCode() % data.length;\r\n if (hash < 0){\r\n hash *= -1;\r\n }\r\n if (data[hash] == null) {\r\n throw new NullPointerException(\"no such key in the HashMap\" + key);\r\n } else {\r\n Node currentNode = data[hash];\r\n while (currentNode != null) {\r\n if (currentNode.key == key || currentNode.key.equals(key)) {\r\n currentNode.value = value;\r\n break;\r\n }\r\n currentNode = currentNode.next;\r\n }\r\n }\r\n }",
"public void put(int key, int value) {\n if (hashMap.getOrDefault(key,-1) == -1 && linkedList.size() == maxCapacity) {\n // evict oldest from linked list & mark deleted in hashmap\n int k = linkedList.removeLast();\n hashMap.put(k,-1);\n }\n\n hashMap.put(key,value);\n linkedList.remove(Integer.valueOf(key));\n linkedList.addFirst(key);\n }",
"public void putObject(long index, T value) {\n\t\tValueStoragePage<T> page = getOrCreatePage(getPageID(index));\n\t\tint n = page.getSize();\n\t\tpage.addObject(getPageOffset(index), value);\n\t\tnumProperties += page.getSize() - n;\n\t}",
"private void setElement(int index, E element) {\n// if (getElement(index) != null) {\n// setContents.remove(getElement(index));\n// }\n while (index >= contents.size()) {\n contents.add(null);\n }\n contents.set(index, element);\n// contents.put(index, element);\n backwards.put(element, index);\n\n// if (element != null) {\n// setContents.add(getElement(index));\n// }\n }",
"private void addSeenInfo(\n int index, SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.add(index, value);\n }",
"public void put(K key, V value) {\n int keyBucket = hash(key);\n \n HashMapEntry<K, V> temp = table[keyBucket];\n while (temp != null) {\n if ((temp.key == null && key == null) \n || (temp.key != null && temp.key.equals(key))) {\n temp.value = value;\n return;\n }\n temp = temp.next;\n }\n \n table[keyBucket] = new HashMapEntry<K, V>(key, value, table[keyBucket]);\n size++;\n }",
"private void hashMapPutPlusOne(Map<String, Integer> map, String key) {\n Integer value = map.get(key);\n if (value == null)\n map.put(key, 1);\n else\n map.put(key, value + 1);\n }",
"public void put(int key, int value) {\n Node node = cache.get(key);\n // Check if the node already exists\n if (node != null) {\n node.value = value;\n // Accessing a node is considered to update LRU cache\n // Remove the node\n remove(node);\n // Add the node\n add(node);\n } else {\n if (cache.size() == capacity) {\n // Remove from the map\n cache.remove(tail.previous.key);\n // Remove from the linked list\n remove(tail.previous);\n }\n // Create a new node\n Node newNode = new Node();\n newNode.key = key;\n newNode.value = value;\n // Add to map\n cache.put(key, newNode);\n // Add to linked list\n add(newNode);\n }\n }",
"public V put(K key,V value) {\n\tif(key==null||value==null) {\n\t throw new NullPointerException();\n\t}\n\telse {\n\tMyEntry addvalue=new MyEntry();\n\taddvalue.key=key;\n\taddvalue.value=value;\n\t\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t\n\t\n\t//what happens if the same key already exists\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].add(addvalue);\n\t\tsize++;\n\t\tif(((float)size/(float)capacity)>loadFactor) {\n\t\t resize();\n\t\t}\n\t\treturn previousvalue;\n\t }\n\t}\n\t\n\t//what happens if the key does not exist\n\ttable[bucket].add(addvalue);\n\tsize++;\n\tif(((float)size/(float)capacity)>loadFactor) {\n\t resize();\n\t}\n\treturn null;\n\t}\n }",
"@Override\n public void put(K key, V value) {\n int index = Math.floorMod(key.hashCode(), entryArr.length);\n if(containsKey(key)) {\n LinkedList<Entry<K, V>> pointer = entryArr[index];\n for(int i = 0; i < pointer.size(); i++) {\n if(pointer.get(i).keyEquals(new Entry<K, V>(key, null))) {\n pointer.get(i).value = value;\n break;\n }\n }\n } else {\n if(loadFactor()>maxLoad) {\n resize();\n }\n if (entryArr[index] == null) {\n entryArr[index] = new LinkedList<Entry<K, V>>();\n }\n entryArr[index].addLast(new Entry<K, V>(key, value));\n size++;\n }\n }",
"public void set(long index);",
"public void put(Key key, Value val){\n int i = rank(key,0,N-1);\n if(i < N && keys[i].compareTo(key) == 0) { vals[i] = val; return;}\n for(int j = N;j>i;j--){\n keys[j] = keys[j-1];\n vals[j] = vals[j-1];\n }\n keys[i] = key; vals[i]= val;\n N++;\n }",
"public V putIfAbsent(K k, V v) {\n final int h = getHash(k), stripe = h % lockCount, hash = h % buckets.length;\n final Holder<V> current = new Holder<V>();\n ItemNode<K,V>[] bs;\n int afterSize; \n synchronized(locks[stripe]){\n bs = buckets;\n boolean found = ItemNode.search(bs[hash], k, current);\n if (found) return current.get();\n final ItemNode<K,V> node = bs[hash], \n newNode = ItemNode.delete(node, k, current);\n bs[hash] = new ItemNode<K,V>(k, v, node);\n afterSize = sizes.addAndGet(stripe, newNode == node ? 1 : 0);\n }\n\n if (afterSize * lockCount > bs.length)\n reallocateBuckets(bs);\n\n return current.get();\n }",
"T set(int index, T element);"
] | [
"0.6678626",
"0.6641469",
"0.63791615",
"0.6219652",
"0.6115584",
"0.6107008",
"0.59375286",
"0.5899673",
"0.58796453",
"0.5792451",
"0.5778498",
"0.57350993",
"0.5723605",
"0.5718798",
"0.57128114",
"0.5694164",
"0.5691301",
"0.56903976",
"0.56734544",
"0.5617124",
"0.56148386",
"0.5610508",
"0.56080145",
"0.55917424",
"0.55849534",
"0.5579021",
"0.5525176",
"0.55142975",
"0.5493853",
"0.54928404",
"0.5492623",
"0.5482114",
"0.547266",
"0.5472369",
"0.5462175",
"0.54583186",
"0.54565847",
"0.5454095",
"0.54455096",
"0.5445244",
"0.54327095",
"0.54289585",
"0.5428607",
"0.5409881",
"0.5395909",
"0.53927654",
"0.5362502",
"0.5360293",
"0.535697",
"0.53516406",
"0.5346316",
"0.53449833",
"0.5332707",
"0.53225607",
"0.52942765",
"0.5289539",
"0.5283122",
"0.5257828",
"0.5254966",
"0.5254372",
"0.52505034",
"0.5242067",
"0.52319026",
"0.5231493",
"0.5229517",
"0.5228865",
"0.5226486",
"0.5224471",
"0.5221296",
"0.5205049",
"0.519917",
"0.519338",
"0.5192678",
"0.5188257",
"0.5178941",
"0.51724684",
"0.5169772",
"0.51645714",
"0.51594955",
"0.51571965",
"0.5157152",
"0.5156754",
"0.51506287",
"0.5146081",
"0.51345724",
"0.5121325",
"0.51183283",
"0.51121163",
"0.51103276",
"0.51073754",
"0.51072556",
"0.5106244",
"0.5100254",
"0.5097714",
"0.50964785",
"0.50852776",
"0.50709873",
"0.50695187",
"0.5047516",
"0.5042965"
] | 0.54712695 | 34 |
Removes the entry with the given index. | void remove(int idx); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void remove(int index);",
"public void remove(int index) {\n\n\t}",
"@ZenCodeType.Method\n default void remove(int index) {\n \n doesNot(\"support removal by index\");\n }",
"public Object remove(int index) {\r\n Entry e = entry(index);\r\n remove(e);\r\n return e.element;\r\n }",
"void remove( int index );",
"private void remove(int index){\r\n \tkeys[index] = null;\r\n \tvals[index] = null;\r\n deleteCheck(index);\r\n }",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"void remove(int index);",
"public void removeElementAt(int index);",
"@Override\r\n\tpublic void removeToIndex(int index) {\n\t}",
"public void remove(int index) {\n items.remove(index);\n }",
"public void remove( int index ) {\n\tif (index > _lastPos)\n\t System.out.println(\"No meaningful value at index\");\n\telse {for (int i= index; i < _lastPos; i++){\n\t\t_data[i]= _data[i+1];\n\t }\n\t _size--;\n\t _lastPos--;\n\t}\n }",
"public void remove(int index)\n {\n numItems--;\n items[index] = null;\n }",
"@Override\n\tpublic void removeAt(final int index) {\n\t\tremoveFromInsertionOrder(index);\n\t\tsuper.removeAt(index); // clear key, state, value; adjust size\n\t}",
"@Override\n public int remove(int index) {\n checkIndex(index);\n Entry tmp = getEntry(index);\n int result = tmp.value;\n tmp.previous.next = tmp.next;\n tmp.next.previous = tmp.previous;\n size--;\n return result;\n }",
"public E remove(int index);",
"public T remove(int index) {\n chk();\n return list.remove(index);\n }",
"public Type remove(int index);",
"public native String removeItem(Number index);",
"public Builder removeEntry(int index) {\n if (entryBuilder_ == null) {\n ensureEntryIsMutable();\n entry_.remove(index);\n onChanged();\n } else {\n entryBuilder_.remove(index);\n }\n return this;\n }",
"@Override\r\n\tpublic T remove(int index) {\n\t\treturn this._list.remove(index);\r\n\t}",
"abstract void remove(int index);",
"public T remove(int index) {\n return null;\n }",
"public void removeAt(int index) {\r\n\t\tSystem.arraycopy(keys, index + 1, keys, index, size - (index + 1));\r\n\t\tsize--;\r\n\t}",
"public void deleteItem(int index) {\n this.items.remove(index);\n }",
"public E remove(int index)\r\n {\r\n checkValidIndex(index);\r\n ListIterator<E> itr = listIterator(index);\r\n E result = itr.next();\r\n itr.remove();\r\n return result;\r\n }",
"@Override\n\tpublic E remove(int index) {\n\t\trangeCheck(index);\n\t\t\n\t\treturn remove(node(index));\n\t}",
"T remove(int index);",
"T remove(int index);",
"public U remove(int index) throws IndexOutOfBoundsException {\n\t\t\tif (index >= mLength || index < 0) {\n\t\t\t\tthrow new IndexOutOfBoundsException(\"Supplied index is invalid.\");\n\t\t\t}\n\n\t\t\tNode<U> node = getNodeAtIndex(index);\n\t\t\tU value = node.getValue();\n\t\t\tunlinkNode(node);\n\n\t\t\treturn value;\n\t\t}",
"public void remove(int index) {\n\t\t\tcheckIndex(index);\n\t\t\tfor(int i = index; i < size - 1; i++) {\n\t\t\t\telementData[i] = elementData[i + 1];\n\t\t\t}\n\t\t}",
"public E remove (int index)\n { E item;\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n if (index == 0)\n item = removeFirst( );\n else {\n Node<E> node = getNode(index - 1);\n item = removeAfter(node);\n }\n return item; // return the deleted value\n }",
"public void remove(int index) {\r\n\t\tstmts.remove(index);\r\n\t}",
"public void remove(int index) {\n for (int i = index; i < this.list.length-1; i++) {\n this.list[i]=this.list[i+1];\n }\n this.size--;\n }",
"@Override\n public T remove(final int index) {\n this.checkIndex(index);\n T object = this.data[index];\n this.remove(object);\n return object;\n }",
"public abstract T remove(int index);",
"public void remove(int index)\r\n\t{\r\n\t\tif(index<0 || index >=n)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Invalid index\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i=index;i<n;i++)\r\n\t\t\t{\r\n\t\t\t\ta[i]=a[i+1];\r\n\t\t\t}\r\n\t\t\tn--;\r\n\t\t}\t\t\r\n\t}",
"@Override\n public T remove(int index) {\n if (index < 0 || index > size) {\n throw new IndexOutOfBoundsException(\"Index out of bounds exception.\");\n }\n\n T oldValue = (T) data[index];\n int move = index - size - 1;\n if (move > 0) {\n System.arraycopy(data, index + 1, data, index, move);\n }\n\n data[--size] = null;\n return oldValue;\n }",
"public AnyType remove( int index ) throws IndexOutOfBoundsException {\n \n return removeNode( index ).getData();\n \n }",
"public Object remove(int index) {\r\n return deref(refs.remove(index));\r\n }",
"private void removeSeenInfo(int index) {\n ensureSeenInfoIsMutable();\n seenInfo_.remove(index);\n }",
"public void remove(int index) {\n\t\tpoints.remove(index);\n\t}",
"public void deleteKey(int index) {\n decreaseKey(index, Integer.MIN_VALUE);\n extractMinimum();\n }",
"public String removeAt(int index) {\n\t\tif (index == 0) {\n\t\t\tString result = head.value;\n\t\t\thead = head.next;\n\t\t\treturn result;\n\t\t} else\n\t\t\treturn recRemove(head, index).value;\n\t}",
"private void removeAtIndex(int index) {\n // save the last item\n FoodItem toMoveBack = this._stock[this._noOfItems-1];\n // make it null\n this._stock[this._noOfItems-1] = null;\n // for each item until the index to remove from:\n for (int i = this._noOfItems-2; i > index-1; i--) {\n // save the last moved back temporarily\n FoodItem tempToMoveBack = toMoveBack;\n // assign to the next iteration item to move back\n toMoveBack = this._stock[i];\n // move back the item for current iteration\n this._stock[i] = tempToMoveBack;\n }\n // we removed an item - so let's decrease the item counter.\n this._noOfItems--;\n }",
"@Override\n public synchronized E remove(int index) {\n E result = this.get(index);\n if (index < this.size() - 1) {\n System.arraycopy(this.container, index + 1, this.container, index, this.size() - (index + 1));\n }\n this.container[--this.pointer] = null;\n return result;\n }",
"public void remove(int index) {\n\t\t// checks range\n\t\tcheckRange(index);\n\t\t// creates new JS array\n\t\tarray.remove(index);\n\t}",
"@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }",
"public CoreResourceHandle remove(int index) {\n if (index >= 0 && index < doSize()) {\n return doRemove(index);\n }\n throw new IndexOutOfBoundsException();\n }",
"public void removeItemAt(int theIndex) {\n\t\tList<Item> keys = new ArrayList<Item>(inventory.keySet());\t\n\t\tItem item = keys.get(theIndex);\n\t\tinventory.remove(item);\t\t\n\t}",
"public int remove(int index) {\n // Gracefully handle items beyond end\n final int size = mItems.size();\n index = constrain(index, 0, size - 1);\n\n mItems.remove(index);\n return index;\n }",
"public Object remove(int index) {\n\n\t\tif (index < 0 || index >= this.size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"the index [\" + index\n\t\t\t\t\t+ \"] is not valid for this list with the size [\"\n\t\t\t\t\t+ this.size + \"].\");\n\t\t}\n\t\tObject removed = this.storedObjects[index];\n\t\tfor (int i = index + 1; i < this.size; i++) {\n\t\t\tthis.storedObjects[i - 1] = this.storedObjects[i];\n\t\t}\n\t\tthis.size--;\n\t\tthis.storedObjects[this.size] = null;\n\n\t\treturn removed;\n\t}",
"public void deleteEntry(int entryIndex) {\n\t\ttoDoList.remove(entryIndex);\n\t}",
"public abstract E remove(int index);",
"@Override\n\tpublic T remove(int index) {\n\t\t// TODO check if index is withing the correct range\n\t\t// If not, return null\n\t\t// otherwise , do the same as above\n\t\tif (index >= 0 && index < size) {\n\t\t\tT item = data[index];\n\t \t\tfor(int i=index;i<size-1;i++)\n\t \t\t\tdata[i] = data[i+1];\n\t \t\tsize--;\n\t \t\treturn item;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}",
"private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }",
"public void remove(int index) {\n \tmData.remove(index);\n notifyDataSetChanged();\n }",
"@Override\n\tpublic void remove(int index) throws IndexOutOfBoundsException {\n\t\tif(checkIndex(index, size)) { //check if index is valid\n\t\t\tfor (int i=index; i<size; i++) {\n\t\t\t\tvalues[i] = values[i+1]; //move every value one step left until index (which is overwritten)\n\t\t\t}\n\t\t\tsize--; //decrement size\t\t\t\n\t\t}else {\n\t\t\tthrow new IndexOutOfBoundsException(\"Highest index: \" + size);\n\t\t}\t\n\t}",
"public void remove(String patient, String index) {\n database.get(patient).remove(Integer.parseInt(index));\n }",
"public void remove(int index) {\n\t\tif ((index < 1) || (index > size))\n\t\t\tthrow new IllegalArgumentException();\n\t\telse{\n\t\t\tremove(getNode(index));\n\t\t\t}\n\t}",
"public void remove(int index){\n tasks.remove(index);\n }",
"protected void removeByIndex(int index) {\n int h = head;\n int t = tail;\n size = size - 1;\n int present = dequeue.length - 1;\n int offset = (index - h) & present;\n int finish = (tail - index) & present;\n\n if (offset < finish) {\n if (h <= index) {\n System.arraycopy(dequeue, h, dequeue, h + 1, offset);\n } else {\n System.arraycopy(dequeue, 0, dequeue, 1, index);\n dequeue[0] = dequeue[present];\n System.arraycopy(dequeue, h, dequeue, h + 1, present - h);\n }\n dequeue[h] = null;\n head = (h + 1) & present;\n } else {\n if (index < t) {\n System.arraycopy(dequeue, index + 1, dequeue, index, finish);\n tail = t - 1;\n } else {\n System.arraycopy(dequeue, index + 1, dequeue, index, present - index);\n dequeue[present] = dequeue[0];\n System.arraycopy(dequeue, 1, dequeue, 0, t);\n tail = (t - 1) & present;\n }\n }\n }",
"public void removeCard(int index) {\n cards.remove(index);\n }",
"@Override\n\tpublic E remove(int index) {\n\t\treturn null;\n\t}",
"@Override\n public E remove(int index) {\n // todo: Students must code\n int pos = calculate(index);\n\n E temp = data[pos];\n data[pos] = null;\n if(pos == head)\n head = (head+1) % data.length;\n else if(pos == tail)\n tail = (tail-1) % data.length;\n else {\n // shift all array contents after pos left 1\n for(int i = pos; i < (pos + curSize-index-1); i++)\n data[calculate(i)] = data[calculate(i+1)];\n tail = (tail-1) % data.length;\n }\n curSize--;\n return temp;\n }",
"public void remove(final int index) {\r\n\t\tif (index<0 || index>=names.size()) return;\r\n\t\tnames.remove(index);\r\n\t\timagesHashes.remove(index);\r\n\t\timages.remove(index);\r\n\t}",
"public void removeIndex(Index index) {\n\t\tRegistration remove = null;\n\t\tfor (Registration reg : registrations) {\n\t\t\tif (reg.getIndex() == index) {\n\t\t\t\tremove = reg;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (remove == null) {\n\t\t\treturn;\n\t\t}\n\t\tregistrations.remove(remove);\n\t\tau -= remove.getIndex().getCourse().getAu();\n\t}",
"@Override\n\t\tpublic void deleteItem(int index) {\n\t\t\tmGuanzhuList.remove(index);\n\t\t}",
"private void removeEntity(int index)\n\t{\n\t\tthis.entities.get(index).onDespawn();\n\t\tthis.spatialHashGrid.remove(this.entities.get(index).getSpatialHashGridHandle());\n\t\t\n\t\tthis.entities.set(index, this.entities.get(this.entities.size() - 1));\n\t\tthis.entities.remove(this.entities.size() - 1);\n\t}",
"@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }",
"public void removeAt(int index){\n E[] array2 = (E[]) new Object[capacity*2];\n int j=0;\n for(int i=0;i<size;i++){\n if(i!=index) {\n array2[j] = array[i];\n j++;\n }\n }\n array=array2;\n size--;\n }",
"public void deleteAtIndex(int index) {\n if (index < 0 || index >= size) throw new IllegalArgumentException(\"Add filed, index is illegal\");\n Node prev = dummyHead;\n for (int i = 0; i < index; i++) {\n prev = prev.next;\n }\n Node retNode = prev.next;\n prev.next = retNode.next;\n retNode.next = null; //loitering object != memory leak\n size--;\n }",
"public E remove(int index){\n if (index < 0 || index >= size){\n throw new ArrayIndexOutOfBoundsException(index);\n }\n E returnValue = theData[index];\n for (int i = index + 1; i < size; i++) {\n theData[i - 1] = theData[i];\n }\n size--;\n return returnValue;\n }",
"public void removeAt(int index) {\n\n // Exceptional case\n if (index >= dataSize)\n throw new IllegalStateException();\n\n moveLeft(index);\n dataSize -= 1;\n }",
"@Override\n public T remove(int index) {\n T removed = array[index];\n for (int i = index + 1; i < array.length; i++) {\n array[i] = array[i + 1];\n }\n this.size = size - 1;\n return removed;\n }",
"public Object remove(final int index) {\n if (checkIfInvalidIndex(index)) {\n throw new IndexOutOfBoundsException();\n }\n Node<T> iterator = head;\n if (index == 0) {\n head = head.getNext();\n } else {\n Node<T> previous = null;\n for (int currentIndex = 0; currentIndex < index; currentIndex++) {\n previous = iterator;\n iterator = iterator.getNext();\n }\n if (previous != null) {\n previous.setNext(iterator.getNext());\n }\n }\n numElement--;\n return iterator.getData();\n }",
"public void remove(int index) {\r\n\t\t//Das Element am Index soll weg:\r\n\t\t//1. Alle Elemente davor sollen erhalten bleiben\r\n\t\t//2. Alle Elemente dahinter sollen erhalten bleiben\r\n\t\t//und der Index 1 kleiner werden\r\n\t\tfor(int i=index+1;i < geheim.length; i++) {\r\n\t\t\tgeheim[i-1] = geheim[i];\r\n\t\t}\r\n\t\t//3. Das Array soll um eins kleiner sein\r\n\t\tresize(-1);\r\n\t}",
"private final void fastRemove(final int index) {\r\n\t\tfinal int numMoved = this.size - index - 1;\r\n\t\tif (numMoved > 0) {\r\n\t\t\tSystem.arraycopy( this.elementData, index + 1, this.elementData, index, numMoved );\r\n\t\t}\r\n\t\tthis.elementData[--this.size] = null; // Let gc do its work\r\n\t}",
"public E remove(int index) throws IndexOutOfBoundsException\n {\n if(index < 0 || index > size() - 1)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n E retData = currNode.data;\n currNode.remove();\n return retData; \n }",
"public E remove(int index)\n {\n if (index >= 0 && index < size) {\n E temp = data[index]; // element to return\n\n // shift all elements to the right down by 1 index\n for (int i = index; i < size - 1; i++)\n data[i] = data[i+1];\n \n size--;\n return temp;\n } else\n throw new NoSuchElementException();\n }",
"public void removeChild(int index)\n {\n children.remove(index);\n }",
"public Object remove(int index){\n\t\tif(index < listSize){\n\t\t\tObject o = myArrayList[index];\n\t\t\tmyArrayList[index] = null;\n\t\t\tint temp = index;\n\t\t\twhile(temp < listSize){\n\t\t\t\tmyArrayList[temp] = myArrayList[temp+1];\n\t\t\t\tmyArrayList[temp+1] = 0;\n\t\t\t\ttemp++;\n\t\t\t}\n\t\t\tlistSize --;\n\t\t\treturn o;\n\t\t}else{\n\t\t\tthrow new ArrayIndexOutOfBoundsException();\n\t\t}\n\t}",
"private void removeRefundTo(int index) {\n ensureRefundToIsMutable();\n refundTo_.remove(index);\n }",
"public void removeCell(int index) {\r\n cells.remove(index);\r\n if(DEBUG) IJ.log(\"Cell \" + (index+1) + \" is gone. Now record has \" + size() + \" cells.\");\r\n }",
"public E remove(int index){\n if (index > maxIndex || index < 0){\n return null;\n }\n\n E res = (E) array[index];\n\n //deleting element\n array[index] = null;\n\n //shifting other elements\n for (int i = index; i < maxIndex ; i++) {\n array[i] = array[i+1];\n }\n\n --maxIndex;\n\n return res;\n }",
"@Override\n\t\tpublic void deleteItem(int index) {\n\t\t\tmFiles.remove(index);\n\t\t}",
"Object remove(int index) {\n return index >= 0 && index < this.length() ? this.myArrayList.remove(index) : null;\n }",
"public void remove(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Cannot remove value with invalid index.\");\n\t\t}\n\n\t\tshiftBackArray(index);\n\t\tsize--;\n\t}",
"public void removeTuple(int index) throws IOException {\n Table thisTable = Database.tableMeta.get(tableName);\n tuples.get(index).setDeleted(true);\n System.out.println(\"Removed Item \" + tuples.remove(index));\n save();\n }",
"public void removeRowAt(int index) {\n ((DefaultTableModel) getModel()).removeRow(index);\n }",
"@Override\n\tpublic void remove(int index) {\n\t\tListNode<L> current=this.first;\n\t\tif(index < 0 || index >= this.size) throw new IndexOutOfBoundsException();\n\t\tfor(int i=0;i<index;i++) {\n\t\t\tcurrent=current.next;\n\t\t}\n\t\tif (index == 0) {\n\t first = current.next;\n\t } else {\n\t current.previous.next = current.next;\n\t }\n\t this.size--;\n\t\tthis.modificationCount++;\n\t}",
"@Override\n // average-case complexity: O(n), since it always needs to shift n-amount\n // of element, where n is propotional to the list/input size\n public void remove(int index) {\n if (arr.length * SHRINK_THRESHOLD > size)\n arr = resize(arr, SHRINK_FACTOR);\n \n // remove the item at the specified index and shift everything right of\n // the given index 1 step to the left\n for (int i = index; i < size-1; i++) {\n arr[i] = arr[i+1];\n }\n // remove the previous last item and then decrement the size\n arr[--size] = null;\n }",
"public ReturnObject remove(int index) {\n ReturnObjectImpl rtn = (ReturnObjectImpl) get(index);\n if (size() == 0) {\n rtn.setError(ErrorMessage.EMPTY_STRUCTURE);\n } else if (index < 0 || index >= size()) {\n rtn.setError(ErrorMessage.INDEX_OUT_OF_BOUNDS);\n } else {\n\n Object[] temp = new Object[size() - 1];\n for (int i=0; i < index; i++) {\n temp[i] = AL[i];\n }\n for (int j = index+1; j < size(); j++) {\n temp[j-1] = AL[j];\n }\n AL = temp;\n }\n return rtn;\n\n }",
"public static void remove(int index) {\n tasks.remove(index);\n tasksCount--;\n }",
"public void removeRecord(int index) {\r\n\t\tsuper.removeRecord(index);\r\n\t\ttrackPointOverlay.removeWayPoint(index);\r\n\t}",
"public E remove(int index) {\n\t\tif (index < 0 || index >= this.size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t}\n\t\tE removed = get(index);\n\t\t// Loop to shift elements left\n\t\tfor (int i = index; i < size(); i++) {\n\t\t\tlist[i] = list[i + 1];\n\t\t}\n\t\treturn removed;\n\t}",
"public TrajectoryTableRow removeByIndex(int index){\r\n\t\treturn this.data.remove(index);\r\n\t}",
"public T remove(int index) {\n\n if (index >= size) {\n throw new IndexOutOfBoundsException(\"Index: \" + index + \", Size: \" + size);\n }\n\n T oldValue = myList[index];\n int value = size - index - 1;\n\n if (value > 0) {\n System.arraycopy(myList, index + 1, myList, index, value);\n }\n System.out.println(\"one \" + size);\n myList[--size] = null;\n System.out.println(\"two \" + size);\n\n return oldValue;\n }"
] | [
"0.809753",
"0.79900515",
"0.7945353",
"0.7922346",
"0.7890907",
"0.78253186",
"0.77067703",
"0.77067703",
"0.77067703",
"0.77067703",
"0.7669434",
"0.75960404",
"0.7594226",
"0.7570521",
"0.7549359",
"0.7538459",
"0.75262004",
"0.74901193",
"0.747978",
"0.7471781",
"0.7384994",
"0.7365786",
"0.7350191",
"0.7336779",
"0.73247004",
"0.73199165",
"0.7297863",
"0.7287822",
"0.72847146",
"0.7234689",
"0.7234689",
"0.7209905",
"0.7189279",
"0.7186388",
"0.717974",
"0.7179671",
"0.7168031",
"0.71663654",
"0.71631706",
"0.71549696",
"0.7140931",
"0.7129707",
"0.7100672",
"0.70862186",
"0.7080116",
"0.707952",
"0.7069623",
"0.7061417",
"0.7058506",
"0.70516247",
"0.7044278",
"0.7043076",
"0.7043067",
"0.7027149",
"0.70251024",
"0.7022704",
"0.70208126",
"0.70104146",
"0.7010345",
"0.6994349",
"0.6990467",
"0.6988725",
"0.69816303",
"0.69792306",
"0.6978814",
"0.69722116",
"0.6966826",
"0.69626594",
"0.69591004",
"0.6955326",
"0.6939452",
"0.69333845",
"0.6929521",
"0.6919314",
"0.69190997",
"0.69180906",
"0.69158965",
"0.69130707",
"0.69080704",
"0.6885487",
"0.6885028",
"0.68832755",
"0.6879179",
"0.68730545",
"0.6866178",
"0.68618107",
"0.6860408",
"0.68595535",
"0.6858318",
"0.68538296",
"0.68534225",
"0.68391407",
"0.68371797",
"0.68336016",
"0.68266934",
"0.6811515",
"0.68075997",
"0.68066794",
"0.679767",
"0.67920005"
] | 0.7237947 | 29 |
Increments the entry with the given index by the specified increment. TODO: maybe rename to increment? | void add(int idx, float incr); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void incrementIndex() {\n\t\tindex++;\n\t\tif (nextItem != null) {\n\t\t\tnextItem.incrementIndex();\n\t\t}\n\t}",
"private int increment(int index) {\n\t\treturn (++index < this.capacity) ? index : 0;\n\t}",
"public void incOffset( Integer increment ) {\n offset += increment;\n }",
"public void increment() {\n increment(1);\n }",
"public void setIncrement(Integer increment) {\n this.increment = increment;\n }",
"public void increment(int index) {\n // int prevVal = registers.get(index);\n int prevVal = this.registers[index];\n if (prevVal == 255) {\n // this.registers.set(index, 0);\n this.registers[index] = 0;\n } else {\n // this.registers.set(index, prevVal + 1);\n this.registers[index]++;\n }\n }",
"public void inc(int index) {\r\n\t\tthis.vclock.set(index, this.vclock.get(index)+1);\r\n\t}",
"public void setIncrement(double increment) {\n this.increment = increment;\n }",
"public void absIncrementRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n va[index] = va[index + 1];\n va[index + 1] = vTemp;\n\n setRows(va);\n }",
"public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }",
"public void inc(){\n this.current += 1;\n }",
"public DocumentMutation increment(FieldPath path, byte inc);",
"public void increment() {\n sync.increment();\n }",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"private synchronized void increment() {\n count++;\n atomicInteger.incrementAndGet();\n }",
"public void inc() {\n inc(1);\n }",
"private int plusOne(int index) {\n if (index + 1 >= array.length) {\n return 0;\n } else {\n return index + 1;\n }\n }",
"public void inc(String key);",
"public void increment(){\n value+=1;\n }",
"public void inc(String name) {\n inc(name, 1);\n }",
"@Override\n public int incrementFirstValue(int key) {\n return array.incrementEntry(key << 1, 1);\n }",
"public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}",
"public void increment() {\n this.data++;\n }",
"private void inc_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() + 1); }\n }",
"public void increaseCounter(UltraSearchSessions.Session session,\n HugeType type, long increment) {\n\n\n JSONObject result = session.get(TABLE, type.name());\n if(null == result){\n putCounter(session, type, increment);\n return;\n }\n\n\n JSONObject obj = new JSONObject();\n\n JSONObject fields = new JSONObject();\n JSONObject id = new JSONObject();\n id.put(\"increment\", increment);\n fields.put(\"ID\", id);\n\n obj.put(\"fields\", fields);\n session.putDoc(TABLE, type.name(), obj.toString());\n\n\n }",
"public void increment() {\n items++;\n }",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public void increment(int symbol);",
"public void increase()\n {\n setCount(getCount() + 1);\n }",
"public void increment(double n) {\r\n\t\tthis.value += n;\r\n\t}",
"public void incrementCurrentIndex() {\n currentIndex++;\n }",
"void increase();",
"void increase();",
"public abstract void increment(int delta);",
"public static synchronized void increment() {\r\n\t\tcount++;\r\n\t}",
"public void incrank() {\n\t\trank++;\n\t}",
"public void increase(int number) {\r\n this.count += number;\r\n }",
"public void increase(int number) {\r\n this.count += number;\r\n }",
"public static synchronized void increment() {\n counter++;\n }",
"public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }",
"public void incrementStat(AbstractStat stat, long increment) {\n stats.add(stat, increment);\n }",
"private synchronized void increment() {\n ++count;\n }",
"public int increase() {\r\n return ++value;\r\n }",
"public int increment( K key ) {\n Integer i = map.get( key );\n if ( i == null ) i = 0;\n map.put( key, ++i );\n return i;\n }",
"void incrementColumnIndex();",
"void incrementColumnIndex();",
"public static void SetIncrement(int increment){\n\t\tm_Incrementer = increment;\n\t\tSystem.out.println(\"m_Incrementer set to: \"+ m_Incrementer);\n\t}",
"@Override\n public synchronized void increment() {\n count++;\n }",
"public long inc(final String key) {\n String c = get(key);\n if (c == null) c = \"0\";\n final long l = Long.parseLong(c) + 1;\n put(key, Long.toString(l));\n return l;\n }",
"public void update(final long key, final long increment) {\n this.update_sum += increment;\n for (int i = 0; i < this.rows; i++) {\n final int index = indexForKey(key, i);\n counts[index] += increment;\n }\n }",
"public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}",
"public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }",
"public void Increase()\n {\n Increase(1);\n }",
"public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}",
"public void inc(String name, long count) {\n counters.addTo(name, count);\n }",
"public void incrementScore(int increment) {\n score = score + increment;\n }",
"public void increment() {\n mNewNotificationCount.setValue(mNewNotificationCount.getValue() + 1);\n }",
"private int plusOne(int i) {\n return (i + 1) % capacity;\n }",
"@Override\n public void visitIINC(IINC obj) {\n int v = obj.getIndex();\n int amount = obj.getIncrement();\n ConstantFrame f = getFrame();\n Constant c = f.getValue(v);\n if (c.isConstantInteger())\n f.setValue(v, new Constant(c.getConstantInt() + amount));\n else\n f.setValue(v, Constant.NOT_CONSTANT);\n // System.out.println(\"after iinc: \" + getFrame());\n }",
"public void Increase(int key, int incVal){\n\t\tNode res = increaseKey(root,key,incVal);\n\t\tif(res==nil){\n\t\t\tinsert(key,incVal);\n\t\t\tres = getNode(root,key);\n\t\t\tSystem.out.println(res.count);\n\t\t}else{\n\t\t\n\t\t\tSystem.out.println(res.count);\n\t\t}\n\t}",
"@Override\r\n public void increment(String metricId, int incrementValue) {\r\n route(metricId, metricAggregator -> metricAggregator.increment(resolve(metricId), incrementValue));\r\n }",
"public void increment() { this.progressBar.setValue(++this.progressValue); }",
"public /*synchronized*/ void increment() {\n counter++;\n }",
"private static void increasePrimitive(int value) {\n value++;\n }",
"private void incrementCounter()\r\n\t{\r\n\t\tthis.counter++;\r\n\t}",
"public void increment(int bin) {\n this.increment(bin, 1);\n }",
"public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}",
"public void bumpItemQuantity(int index, boolean increase) {\n if (index >= 0 && index < mQuantityOrdered.length) {\n if (increase) {\n mQuantityOrdered[index]++;\n mTotalOrdered++;\n mTotalItemsChangedListener.onTotalItemsChanged(mTotalOrdered);\n } else if(mQuantityOrdered[index] > 0) {\n mQuantityOrdered[index]--;\n mTotalOrdered--;\n mTotalItemsChangedListener.onTotalItemsChanged(mTotalOrdered);\n }\n }\n notifyDataSetChanged();\n }",
"void incrementCount();",
"void incrementCardPositionsInArgumentAtOrPastIndex(@NonNull UUID argumentId, short index);",
"public void increment(Object incValue) {\r\n\t\t\r\n\t\tNumberOperation operator = new NumberOperation(this.value, incValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() + getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() + getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}",
"private static void increaseReference(Counter counter) {\n counter.advance(1);\n }",
"public Integer mutate(int index);",
"@Override\n public int incrementSecondValue(int key, int delta) {\n return array.incrementEntry((key << 1) + 1, delta);\n }",
"public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}",
"default void inc(long value) {\n\t\tcount(Math.abs(value));\n\t}",
"private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }",
"@Override\n public void update(int i, E value) {\n if(!hasWork()) {\n throw new NoSuchElementException();\n }\n if(i < 0 || i >= size()) {\n throw new IndexOutOfBoundsException();\n }\n array[(front + i) % capacity()] = value;\n }",
"public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}",
"@Override\n public void add(int index, E value) {\n this.rangeCheck(index);\n if (this.values.length == this.index) {\n this.grow();\n }\n this.modCount++;\n System.arraycopy(this.values, index, this.values, index + 1, this.size() - index);\n this.values[index] = value;\n this.index++;\n }",
"private void incTag() {\n long id = tagId(tag[th()]); // 1\n tag[th()] = newTag(id+1); // 2\n }",
"void increment(String[] tags, Double amount, String name, String description);",
"public void incrementVersion() {\n this.version += 1;\n }",
"public void setGrowIncrement(int inc) { growInc = inc; }",
"void incrementColumnIndex(int size);",
"void incrementColumnIndex(int size);",
"public void incCount() { }",
"@Override\n\tpublic boolean incrementEntry(final int bucket, final int solnIdx, final int choice) {\n\t\tint baseIndex = getEntriesIndex(bucket, solnIdx);\n\t\tentries[baseIndex + choice] += 1;\n\t\tif ( entries[baseIndex + choice] <= 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void increaseStock(int i, int a){\n stock.get(i).increaseQuantity(a);\n }",
"@Override\n public void updateToNextDoc() {\n if(idx < postingList.size())\n idx += postingList.get(idx+1)+2;\n }",
"@CallSuper\n public long incrementAndGet() {\n return addAndGet(1);\n }",
"default void increment(String tagKey, String tagValue, Double amount, String name, String description) {\n increment(new String[]{tagKey, tagValue}, amount, name, description);\n }",
"public void put_next_index(long next_index, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0] + 13), next_index);\n }",
"private int adjustIndex(int index)\n {\n int max = values.length;\n return ((index % max) + max) % max;\n }",
"@Override\n public void add(int index, int element) {\n Entry newElement = new Entry(element);\n Entry tmp = getEntry(index);\n newElement.next = tmp;\n newElement.previous = tmp.previous;\n tmp.previous.next = newElement;\n tmp.previous = newElement;\n size++;\n }",
"public void add()\n {\n set(++ current);\n }",
"public void add( int index, Comparable newVal ) { \n \t//checks if there is a meaningful value at index\n \tif (index> _lastPos){\n\t System.out.println(\"No meaningful int at index\");\n \t} else {\n\t //If _data is full, increase length of _data\n\t if (_size == _data.length) {\n\t\texpand();\n\t }\t\t\n\t //copies everything before index from _data to temp \n\t for (int i = _lastPos; i >= index; i--) {\n\t\t_data[i+1]= _data[i];\n\t }\n\t _data[index]= newVal;\n\t _size++;\n\t _lastPos++;\n\t}//end else\n\t \n }",
"public void incrementAmount() { amount++; }",
"public void addValue(int v) {\n ++totalCount;\n int i = calBucketIndex(v);\n ++buckets[i];\n }",
"public void incCounter()\n {\n counter++;\n }"
] | [
"0.7131558",
"0.6933169",
"0.69154924",
"0.68048084",
"0.67429954",
"0.6725369",
"0.65618354",
"0.65490043",
"0.6480274",
"0.6476953",
"0.6436446",
"0.64261925",
"0.64122236",
"0.63889784",
"0.63223755",
"0.63084257",
"0.6298481",
"0.62760776",
"0.6262672",
"0.62383527",
"0.62354094",
"0.62345505",
"0.6233463",
"0.6174413",
"0.61716837",
"0.6144065",
"0.6138669",
"0.61235917",
"0.6119304",
"0.61005574",
"0.60493547",
"0.6027872",
"0.6027872",
"0.6021396",
"0.59931064",
"0.59706503",
"0.5964905",
"0.5964905",
"0.59571624",
"0.5953703",
"0.5935711",
"0.5930687",
"0.59223264",
"0.591553",
"0.5874255",
"0.5874255",
"0.58641374",
"0.5863277",
"0.58531356",
"0.5849881",
"0.58350885",
"0.58323956",
"0.58240616",
"0.5815598",
"0.5807916",
"0.58007485",
"0.57864916",
"0.5781468",
"0.57735765",
"0.5770753",
"0.5768759",
"0.57486814",
"0.57405263",
"0.5738606",
"0.5731243",
"0.572699",
"0.57063764",
"0.5695496",
"0.5688517",
"0.56878626",
"0.56787837",
"0.5678776",
"0.56762266",
"0.5669374",
"0.5668338",
"0.56594723",
"0.56396365",
"0.5639515",
"0.56391203",
"0.56343013",
"0.5630855",
"0.56280303",
"0.56139636",
"0.55957997",
"0.55920196",
"0.55920196",
"0.558942",
"0.55893624",
"0.55881923",
"0.5576003",
"0.55586207",
"0.5556375",
"0.5553777",
"0.55531216",
"0.5551594",
"0.5548179",
"0.5546616",
"0.55441636",
"0.554211",
"0.5540347"
] | 0.6441584 | 10 |
Applies the function to each entry in the map. | void apply(FnIntFloatToFloat lambda); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",
"public native void forEach(Action3<V, K, Map<K, V>> callbackfn);",
"default void forEach(BiConsumer<? super K, ? super V> action) {\n Objects.requireNonNull(action);\n for (Node<K, V> node : entrySet()) {\n action.accept(node.getKey(), node.getValue());\n }\n }",
"public void applyToArticles(Function<Artikel, Artikel> func){\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n func.apply(integerArtikelEntry.getValue());\n }\n }",
"public static <T> void indexedMap(T[][] matrix, TriFunction<T, Integer, Integer, T> mapFunction){\n for (int i = 0; i != matrix.length; ++i) {\n for (int j = 0; j != matrix[0].length; ++i) {\n T value = matrix[i][j];\n matrix[i][j] = mapFunction.apply(value, i, j);\n }\n }\n }",
"public static <E, F> Iterable<F> apply(Function<? super E, ? extends F> f, Iterable<? extends E> iter) {\r\n \treturn new MappedIterable<E, F>(iter, f);\n }",
"@Override\n public void putAll(Map<? extends String, ? extends T> m) {\n for (Map.Entry<? extends String, ? extends T> e : m.entrySet()) {\n put(e.getKey(), e.getValue());\n }\n }",
"public static <K, V> void fastForEach(Reference2ObjectMap<K, V> map, Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 70 */ ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 71 */ if (entries instanceof Reference2ObjectMap.FastEntrySet) {\n/* 72 */ ((Reference2ObjectMap.FastEntrySet)entries).fastForEach(consumer);\n/* */ } else {\n/* 74 */ entries.forEach(consumer);\n/* */ } \n/* */ }",
"public static <E, F> Iterator<F> apply(Function<? super E, ? extends F> f, Iterator<? extends E> iter) {\r\n \treturn new MappedIterator<E, F>(iter, f);\n }",
"private List<EventInfo> map(List<EventLog> entries) {\n List<EventInfo> events = new ArrayList<>();\n for (EventLog entry : entries) {\n events.add(map(entry));\n }\n return events;\n }",
"public void putAll(Map<?, ? extends Action> map) {\n\t\tObject key;\n\t\tAction action;\n\t\tfor (Map.Entry<?, ? extends Action> entry : map.entrySet()) {\n\t\t\tkey = entry.getKey();\n\t\t\taction = entry.getValue();\n\t\t\tif (key != null && action != null)\n\t\t\t\tput(key, action);\n\t\t}\n\t}",
"void updateMap(MapData map);",
"@Override\n public void putAll(Map<? extends K, ? extends V> m) {\n for(Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {\n put(entry.getKey(), entry.getValue());\n }\n }",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\n for (Map.Entry<? extends K, ? extends V> e : m.entrySet())\n put(e.getKey(), e.getValue());\n\t}",
"public abstract void map(String key, String value) throws Exception;",
"public abstract void putAll(AbstractIntHashMap map);",
"private static void mapReplace(@Nonnull final StringBuilder sb, @Nonnull final LinkedHashMap<String, String> map,\r\n final FormatFunction f) {\r\n int indexOf = 0;\r\n for (final Entry<String, String> entry : map.entrySet()) {\r\n final String key = entry.getKey();\r\n final String value = f.format(entry.getValue());\r\n while ((indexOf = sb.indexOf(key, indexOf)) > -1) {\r\n sb.replace(indexOf, indexOf + key.length(), value);\r\n indexOf += value.length();\r\n }\r\n }\r\n }",
"public static <T> void map(T[][] matrix, Function<T, T> mapFunction){\n indexedMap(matrix, (value, i, j) -> mapFunction.apply(value));\n }",
"@Override\n public void process(HashMap<K, V> tuple)\n {\n for (Map.Entry<K, V> e: tuple.entrySet()) {\n MutableDouble val = basemap.get(e.getKey());\n if (!doprocessKey(e.getKey())) {\n continue;\n }\n if (val == null) { // Only process keys that are in the basemap\n val = new MutableDouble(e.getValue().doubleValue());\n basemap.put(cloneKey(e.getKey()), val);\n continue;\n }\n double change = e.getValue().doubleValue() - val.value;\n double percent = (change/val.value)*100;\n if (percent < 0.0) {\n percent = 0.0 - percent;\n }\n if (percent > percentThreshold) {\n HashMap<V,Double> dmap = new HashMap<V,Double>(1);\n dmap.put(cloneValue(e.getValue()), percent);\n HashMap<K,HashMap<V,Double>> otuple = new HashMap<K,HashMap<V,Double>>(1);\n otuple.put(cloneKey(e.getKey()), dmap);\n alert.emit(otuple);\n }\n val.value = e.getValue().doubleValue();\n }\n }",
"public Object map(String key, Object input);",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\n\t}",
"@Override\r\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\r\n\t\tfor (K key : m.keySet()) {\r\n\t\t\tput(key, m.get(key));\r\n\t\t}\r\n\t}",
"public static final Iterator map(final Iterator it, final Function fn) {\n return new Iterator() {\n\n public final boolean hasNext() {\n return it.hasNext();\n }\n\n public final Object next() {\n return fn.fn(it.next());\n }\n\n public final void remove() {\n throw new RuntimeException(\"Not implemented\");\n }\n\n };\n }",
"public static <T, S> Iterable<S> map(Iterable<T> baseIterable, MapFunction<T, S> mapFunction) {\n return new MapIterable<T, S>(baseIterable, mapFunction);\n }",
"ProcessOperation<Map<String, Object>> map();",
"public void applyUpdates() {\r\n synchronized (visualItemMap) {\r\n adder.execute(parentGroup);\r\n for (VisualItem3D item : visualItemMap.values()) {\r\n item.applyTransform();\r\n }\r\n }\r\n }",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\n\t\t\n\t}",
"public static <E, F> Iterable<F> apply(Iterable<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }",
"public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }",
"public void putAll(Map<? extends E, ? extends V> m) {\n\t\t\r\n\t}",
"public synchronized void apply(Lambda<TurtleBody> function) {\n\t\tfor (TurtleBody body : this.bodies.values()) {\n\t\t\tfunction.apply(body);\n\t\t}\n\t}",
"public static void transform(IntIndexedContainer arr, IntIndexedContainer map) {\n for (int i = 0; i < arr.size(); ++i)\n arr.set(i, map.get(arr.get(i)));\n }",
"private static void simpleMapExamples() {\n\t\tSystem.out.println(\"simpleMapExamples Start ----\");\n\t\t\n\t\tMap<String,Integer> mapEx1 = new HashMap<>();\n\t\t\n\t\tmapEx1.put(\"Amit\", 35);\n\t\tmapEx1.put(\"Gunjan\", 45);\n\t\tmapEx1.put(\"Vidut\", 55);\n\t\t\n\t\t//Loop over Map\n\t\tfor(Entry<String, Integer> entry : mapEx1.entrySet()) {\n\t\t\t\n\t\t\tString key = entry.getKey();\n\t\t\tInteger val = entry.getValue();\n\t\t\t\n\t\t\tSystem.out.println(\"KEY : \" + key + \" : VAL : \" + val);\n\t\t\t\n\t\t}\n\t\t\n\t\t//API to get collection of values from the map\n\t\tCollection<Integer> values = mapEx1.values();\n\t\t\n\t\t//Now browse over collection values using java8 lambda\n\t\tSystem.out.println(\"Printing values ...\");\n\t\tvalues.forEach((val) -> System.out.println(val));\n\t\t\n\t\t//Replace values in the map using \n\t\t//Here we are replacing each key's value to 46\n\t\tmapEx1.replaceAll(( s, i) -> {\n\t\t\treturn 46;\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Printing after firing replaceAll...\");\n\t\t//Now print the key/value pair of map using lambda\n\t\tmapEx1.forEach((k,v) -> {\n\t\t\tSystem.out.println(\"Key : \" + k + \" Val \" + v);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"simpleMapExamples End ----\");\n\t}",
"@Override\n\t\tpublic void map(Text key, Text value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tfor (String word : words) {\n\t\t\t\tif (key.toString().equals(word)) {\n\t\t\t\t\tString[] outVals = parseOutValue(value.toString(), filemap)\n\t\t\t\t\t\t\t.split(\"\\n\");\n\t\t\t\t\tfor (String val : outVals) {\n\t\t\t\t\t\tString outkey = val.substring(0, val.indexOf('['));\n\t\t\t\t\t\tString outval = word + \"::\"\n\t\t\t\t\t\t\t\t+ val.substring(val.indexOf(':') + 1);\n\t\t\t\t\t\toutput.collect(new Text(outkey), new Text(outval));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void addHistogram2map(HashMap<String, double[][]> map, double[] histValues, String key, int iteration) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new double[nRandomisations][]);\r\n }\r\n double[][] values = map.get(key);\r\n values[iteration] = histValues;\r\n }",
"default <U> void forEach(TryFunction<T, U> fn) {\n if (isSuccess()) {\n try {\n fn.apply(get());\n } catch (Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }",
"public void putAll(Map arg0)\r\n {\r\n throw new RuntimeException(\"Cannot modify the display data.\");\r\n }",
"public WeirdList map(IntUnaryFunction func) {\n return null; // REPLACE THIS LINE WITH THE RIGHT ANSWER.\n }",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public void a(d dVar, Map<K, V> map) {\r\n if (map == null) {\r\n dVar.h();\r\n } else if (!C0128k.this.f1575b) {\r\n dVar.b();\r\n for (Map.Entry<K, V> entry : map.entrySet()) {\r\n dVar.a(String.valueOf(entry.getKey()));\r\n this.f1577b.a(dVar, entry.getValue());\r\n }\r\n dVar.d();\r\n } else {\r\n ArrayList arrayList = new ArrayList(map.size());\r\n ArrayList arrayList2 = new ArrayList(map.size());\r\n int i = 0;\r\n boolean z = false;\r\n for (Map.Entry<K, V> entry2 : map.entrySet()) {\r\n v a2 = this.f1576a.a(entry2.getKey());\r\n arrayList.add(a2);\r\n arrayList2.add(entry2.getValue());\r\n z |= a2.e() || a2.g();\r\n }\r\n if (z) {\r\n dVar.a();\r\n while (i < arrayList.size()) {\r\n dVar.a();\r\n c.a.a.b.A.a((v) arrayList.get(i), dVar);\r\n this.f1577b.a(dVar, arrayList2.get(i));\r\n dVar.c();\r\n i++;\r\n }\r\n dVar.c();\r\n return;\r\n }\r\n dVar.b();\r\n while (i < arrayList.size()) {\r\n dVar.a(a((v) arrayList.get(i)));\r\n this.f1577b.a(dVar, arrayList2.get(i));\r\n i++;\r\n }\r\n dVar.d();\r\n }\r\n }",
"private static void iterateThroughHashMapJava8(Map<String, Integer> crunchifyMap) {\n\t\tcrunchifyMap.forEach((k, v) -> {\n\t\t\tSystem.out.println(\"Key: \" + k + \"\\t\\t Value: \" + v);\n\t\t});\n \n\t}",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"private static void addEntriesToMap(\n\t\tMap<Character,Integer> map,String toSort, String poolOfOccurances\n\t\t){\n\n\t\t//Loop the toStort\n\t\tfor(int i=0;i<toSort.length();i++){\n\t\t\tmap.put(toSort.charAt(i),new Integer(getCharacterFrequence(toSort.charAt(i),poolOfOccurances)));\n\t\t}\n\n\t}",
"public void addEntries(Collection<T> values, Function<T, Double> weightFunction, double totalWeight, int priority) {\n\n double summedWeight = values.stream()\n .collect(Collectors.summingDouble(weightFunction::apply));\n\n double scale = totalWeight / summedWeight;\n values.forEach(value -> {addEntry(value, scale*weightFunction.apply(value), priority);});\n }",
"@Override\n\t\t\tpublic void putAll(Map<? extends PathwayImpl, ? extends AnalysisResult> m) {\n\t\t\t\t\n\t\t\t}",
"private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }",
"public void forEach(Consumer<GeometricalObject> action);",
"public <T> void putAll(Map<String,T> attr) {\r\n attributeMap.putAll(attr);\r\n fireStateChanged();\r\n }",
"Object visitMapOfValues(MapOfValuesNode node, Object state);",
"public void m1253a(Map<C0206k, Object> map) {\n if (map == null) {\n return;\n }\n if (this.f776a == null) {\n this.f776a = map;\n } else {\n this.f776a.putAll(map);\n }\n }",
"public void putAll(Map m) {\n\tIterator iter = m.entrySet().iterator();\n\twhile (iter.hasNext()) {\n @SuppressWarnings(\"unchecked\")\n\t Map.Entry e = (Map.Entry) iter.next();\n\t put(e.getKey(), e.getValue());\n\t}\n }",
"private static void fillListFromMap(List<Integer> bucketContents, Map<Double, List<Integer>> m) {\r\n\t\tIterator<Double> iter = m.keySet().iterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tDouble key = iter.next();\r\n\t\t\tbucketContents.addAll(m.get(key));\r\n\t\t}\r\n\t}",
"public static <T, U> Array<T> map(Iterable<U> iterable, Function<? super U, ? extends T> f)\n {\n Array<T> out = new Array<>();\n\n for (U u: iterable)\n out.add(f.apply(u));\n\n return out;\n }",
"private void processLayerMap() {\r\n for (int l = 0; l < layers.size(); l++) {\r\n Layer layer = layers.get(l);\r\n this.layerNameToIDMap.put(layer.name, l);\r\n }\r\n }",
"private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }",
"<R> MultiSet<R> map(Function<X, R> f);",
"public void doToEachCell(Consumer<Cell> func) {\n for(Cell c: this) {\n func.accept(c);\n }\n }",
"public void doToEachCell(Consumer<Cell> func) {\n for(int i = 0; i < cells.length; i++) {\n for(int j = 0; j < cells[i].length; j++) { \n func.accept(cells[i][j]);\n }\n } \n }",
"public static <E, F> Iterator<F> apply(Iterator<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }",
"public String evaluate (Map entryMap, String contents);",
"@Override\n\t\t\t\t\tpublic void forEach(BiConsumer<Var, Node> action) {\n\t\t\t\t\t\tfor (Var v : bins.keySet()) {\n\t\t\t\t\t\t\tNode n = bins.get(v);\n\t\t\t\t\t\t\taction.accept(v, n);\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\n public MultiMap<String, SeriesACLTransition> xapply(MultiMap<String, SeriesACLTransition> mmap,\n String id) throws Exception {\n final TransitionQuery q = TransitionQuery.query().withId(id).withScope(AclScope.Series)\n .withDone(done);\n return mmap.putAll(id, aclService.getTransitions(q).getSeriesTransistions());\n }",
"void writeAll(Map<? extends K, ? extends V> map);",
"public void m() {\n for (Map.Entry key : this.f80656a.a().entrySet()) {\n List list = (List) key.getKey();\n if (!this.l.contains(list)) {\n this.l.add(d.a(list));\n }\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n }",
"@NotNull\n <U> LightFuture<U> thenApply(Function<? super T, U> mapping) throws InterruptedException, LightExecutionException;",
"@SuppressWarnings(\"unchecked\")\n public void putAll(Map t) {\n map.putAll(t);\n }",
"public void forEachFlatMap(TriConsumer<Biome, NamespacedKey, Optional<Config>> consumer) {\n cache.forEach((biome, part) -> part.forEach((featureKey, config) -> consumer.accept(biome, featureKey, config)));\n }",
"@Override\n public void putAll(Map<? extends K, ? extends V> map) {\n throw new UnsupportedOperationException();\n }",
"@Override\n protected Map<Object, R> apply(List<?> values) {\n Map<Object, ? extends PreparedTransformer<? extends R>> transformers =\n (Map<Object, ? extends PreparedTransformer<? extends R>>) values.get(0);\n\n // the values to pass to those transformers are the rest of our inputs\n Object[] passedValues = values.subList(1, values.size()).toArray();\n\n // results is an Object[] array containing elements of type R\n Object[] results = transformers.values()\n .stream()\n .map(preparedTransformer -> preparedTransformer.internalAPI()\n .applyUnsafe(preparedTransformer.internalAPI().createExecutionCache(1), passedValues))\n .toArray();\n\n // we use an Object2ObjectArrayMap because it's *very* cheap to construct (once you have the key & value arrays)\n return new Object2ObjectArrayMap<>(transformers.keySet().toArray(), results);\n }",
"public final void g(@NonNull Map<z, Map<String, Object>> map) {\n a((Map) map, true);\n }",
"public static <T extends Object> void applySubstitutionToWeights(Map<String, HashMap<T, Double>> weightMap, PatriciaTrie<HashMap<String, Double>> substitutionMap) {\n\t\tHashMap<String, HashMap<T, Double>> mapChanges = new HashMap<>();\r\n\t\t\r\n\t\tfor(Entry<String, HashMap<T, Double>> entry : weightMap.entrySet()) {\r\n\t\t\tString word = entry.getKey();\r\n\t\t\tfor(int i = 0; i < word.length(); i++) {\r\n\t\t\t\t// Search for entries that apply to this sentence (use first letter in prefix map to speed up the search)\r\n\t\t\t\tMap<String, HashMap<String, Double>> potentialSubstitutionMap = substitutionMap.prefixMap(word.substring(i, i+1));\r\n\t\t\t\tfor(Entry<String, HashMap<String, Double>> subEntry : potentialSubstitutionMap.entrySet() ) {\r\n\t\t\t\t\tString from = subEntry.getKey();\r\n\t\t\t\t\tif(word.length() - i >= from.length()) {\r\n\t\t\t\t\t\tif(word.substring(i, i+from.length()).equals(from)) {\r\n\t\t\t\t\t\t\t// We have a confirmed substitution\r\n\t\t\t\t\t\t\tfor(Entry<String, Double> substitution : subEntry.getValue().entrySet()) {\r\n\t\t\t\t\t\t\t\tString newWord = word.substring(0, i) + substitution.getKey() + word.substring(i+from.length());\r\n\t\t\t\t\t\t\t\tmapChanges.put(newWord, returnScaledMap(weightMap.get(word), substitution.getValue()));\r\n\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}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Merge substitutions\r\n\t\tfor(Entry<String, HashMap<T, Double>> entry : mapChanges.entrySet()) {\r\n\t\t\tString word = entry.getKey();\r\n\t\t\tHashMap<T, Double> map = entry.getValue();\r\n\t\t\t// If the weight map didn't already contain the modified word, add the word to it\r\n\t\t\tif(!weightMap.containsKey(word)) {\r\n\t\t\t\tweightMap.put(word, map);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tHashMap<T, Double> currentMap = weightMap.get(word);\r\n\t\t\t\tfor(Entry<T, Double> weightEntry : map.entrySet()) {\r\n\t\t\t\t\tT key = weightEntry.getKey();\r\n\t\t\t\t\tif(currentMap.containsKey(key)) {\r\n\t\t\t\t\t\t// Add the old weight and new weight together if already exists\r\n\t\t\t\t\t\tcurrentMap.put(key, currentMap.get(key) + weightEntry.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tcurrentMap.put(key, weightEntry.getValue());\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}",
"public static <R, T> List<R> map(Function<R, ? super T> f, Collection<T> c) {\r\n List<R> res = new ArrayList<>();\r\n\r\n for (T item : c) {\r\n res.add(f.apply(item));\r\n }\r\n\r\n return res;\r\n }",
"private static double exerciseMap(int threadCount, int perThread, int range, \n final OurMap<Integer, String> map) {\n Thread[] threads = new Thread[threadCount];\n for (int t=0; t<threadCount; t++) {\n final int myThread = t;\n threads[t] = new Thread(() -> {\n Random random = new Random(37 * myThread + 78);\n for (int i=0; i<perThread; i++) {\n Integer key = random.nextInt(range);\n if (!map.containsKey(key)) {\n // Add key with probability 60%\n if (random.nextDouble() < 0.60) \n map.put(key, Integer.toString(key));\n } \n else // Remove key with probability 2% and reinsert\n if (random.nextDouble() < 0.02) {\n map.remove(key);\n map.putIfAbsent(key, Integer.toString(key));\n }\n }\n final AtomicInteger ai = new AtomicInteger();\n map.forEach(new Consumer<Integer,String>() { \n public void accept(Integer k, String v) {\n ai.getAndIncrement();\n }});\n // System.out.println(ai.intValue() + \" \" + map.size());\n });\n }\n for (int t=0; t<threadCount; t++) \n threads[t].start();\n map.reallocateBuckets();\n try {\n for (int t=0; t<threadCount; t++) \n threads[t].join();\n } catch (InterruptedException exn) { }\n return map.size();\n }",
"@Override\r\n protected void reduce(Text key, Iterable<MapWritable> values,\r\n Context context)\r\n throws IOException, InterruptedException {\r\n super.reduce(key, values, context);\r\n\r\n }",
"public QueryCore mapping(BiFunction<T,V,K> map)\n {\n response = map.apply((T) rs,(V) c);\n return this;\n }",
"protected void updateAll() {\n for (String key : listenerMap.keySet()) {\n updateValueForKey(key, true);\n }\n }",
"public void forEach(Processor processor) {\n\n\t}",
"protected static void addArgToResultsMap(String sArg, Object oValue, Map map)\n {\n Object oValuePrev = map.get(sArg);\n if (oValuePrev == null)\n {\n map.put(sArg, oValue);\n return;\n }\n\n List listVals;\n if (oValuePrev instanceof List)\n {\n listVals = (List) oValuePrev;\n }\n else\n {\n map.put(sArg, listVals = new LinkedList());\n listVals.add(oValuePrev);\n }\n listVals.add(oValue);\n }",
"public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}",
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n private void populateMap(Map map, Node node) {\n Map.Entry entry = getMapEntry(node);\n if (entry != null) {\n map.put(entry.getKey(), entry.getValue());\n }\n }",
"@Override\n\tpublic void forEach(Processor processor) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tprocessor.process(elements[i]);\n\t\t}\n\t}",
"public void process(Element element, Map<String, Type> localMap) {\r\n\t\r\n\t\tinspectHybrid(element, localMap);\r\n\t \r\n\t List content = element.getContent();\r\n\t Iterator iterator = content.iterator();\r\n\t \r\n\t while (iterator.hasNext()) {\r\n\t Object o = iterator.next();\r\n\t if (o instanceof Element) {\r\n\t Element child = (Element) o;\r\n\t process(child, localMap); \r\n\t }\r\n\t }\r\n\t}",
"public final /* bridge */ /* synthetic */ void mo6480a(Object obj) {\n this.f9049c.mo6949a((Map) obj, this.f9047a, this.f9048b);\n }",
"public void applyToSomeArticles(Predicate<Artikel> predicate, Function<Artikel, Artikel> func){\n for (int i = 0; i < key; i++) {\n if (predicate.test(getArtikel(i))){\n func.apply(getArtikel(i));\n }\n }\n }",
"public static void main(String[] args) {\n\n Map<Integer, String> map = new HashMap<>();\n\n for (int i = 0; i < 10; i++) {\n map.putIfAbsent(i, \"val\" + i);\n }\n\n map.forEach((id, val) -> System.out.println(id + \": \" + val));\n\n// This example shows how to compute code on the map by utilizing functions:\n\n map.computeIfPresent(3, (num, val) -> val + num);\n map.get(3); // val33\n\n map.computeIfPresent(9, (num, val) -> null);\n map.containsKey(9); // false\n\n map.computeIfAbsent(23, num -> \"val\" + num);\n map.containsKey(23); // true\n\n map.computeIfAbsent(3, num -> \"bam\");\n map.get(3); // val33\n\n\n// Next, we learn how to remove entries for a given key, only if it's currently mapped to a given value:\n\n map.remove(3, \"val3\");\n map.get(3); // val33\n\n map.remove(3, \"val33\");\n map.get(3); // null\n\n\n// Another helpful method:\n\n map.getOrDefault(42, \"not found\"); // not found\n\n\n// Merging entries of a map is quite easy:\n\n map.merge(9, \"val9\", (value, newValue) -> value.concat(newValue));\n map.get(9); // val9\n\n map.merge(9, \"concat\", (value, newValue) -> value.concat(newValue));\n map.get(9); // val9concat\n// Merge either put the key/value into the map if no entry for the key exists, or the merging function will be called to change the existing value.\n\n\n }",
"public void map(Object key, Text value, Context context\n ) throws IOException, InterruptedException {\n String[] temp = new String[10];\n temp = value.toString().split(\",\");\n if ((temp[2].equals(\"TMAX\") || temp[2].equals(\"TMIN\") && !temp[3].equals(\"\"))){\n HashMap<String,Double[]> h= new HashMap<String, Double[]>();\n Double[] d = new Double[2];\n d[0] = Double.parseDouble(temp[3]);\n d[1] = 1.0;\n if (results.containsKey(temp[0])){\n if (results.get(temp[0]).containsKey(temp[2])){\n results.get(temp[0]).get(temp[2])[0] += Double.parseDouble(temp[3]);\n results.get(temp[0]).get(temp[2])[1] += 1.0;\n }\n else{\n results.get(temp[0]).put(temp[2],d);\n }\n }\n else{\n h.put(temp[2],d);\n results.put(temp[0], h);\n }\n }\n }",
"@Override\n\tpublic void putAll(Map<? extends String, ? extends String> m) {\n\t}",
"@Override\n public void forEach(Consumer<? super T> action) {\n items.forEach(action);\n }",
"@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }",
"public void setAll(Map<String, String> values)\r\n/* 360: */ {\r\n/* 361:532 */ for (Map.Entry<String, String> entry : values.entrySet()) {\r\n/* 362:533 */ set((String)entry.getKey(), (String)entry.getValue());\r\n/* 363: */ }\r\n/* 364: */ }",
"private void addValueToStatMap(HashMap<String, ArrayList<Double>> map, String key, Double value) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new ArrayList<Double>());\r\n }\r\n map.get(key).add(value);\r\n }",
"private void execute(Map<Class, Map<Method, Object>> map, Object entity) {\n if (entity.getClass().isAnnotationPresent(Entity.class)) {\n\n // check for hits on this class or its superclasses.\n for (Class c = entity.getClass(); c != null && c != Object.class; c = c.getSuperclass()) {\n if (map.containsKey(c)) {\n for (Map.Entry<Method, Object> entry : map.get(c).entrySet()) {\n try {\n entry.getKey().invoke(entry.getValue(), entity);\n } catch (InvocationTargetException e) {\n // log it\n } catch (IllegalAccessException e) {\n // log it\n }\n }\n }\n }\n\n // check for hits on interfaces.\n for (Class c : entity.getClass().getInterfaces()) {\n if (map.containsKey(c)) {\n for (Map.Entry<Method, Object> entry : map.get(c).entrySet()) {\n try {\n entry.getKey().invoke(entry.getValue(), entity);\n } catch (InvocationTargetException e) {\n // log it\n } catch (IllegalAccessException e) {\n // log it\n }\n }\n }\n }\n }\n }",
"static void updateMap(Map um, Iterator i, Map m) {\n while (i.hasNext()) {\n java.util.Map.Entry e = (java.util.Map.Entry)i.next();\n Object f = e.getKey();\n Object o = e.getValue();\n if (o == null) continue;\n if (o instanceof Node) {\n Object q = um.get(o);\n if (o instanceof UnknownTypeNode) q = o;\n if (o == GlobalNode.GLOBAL) q = o;\n if (VERIFY_ASSERTIONS) Assert._assert(q != null, o+\" is missing from map\");\n if (TRACE_INTRA) out.println(\"Updated edge \"+f+\" \"+o+\" to \"+q);\n m.put(f, q);\n } else {\n Set lhs = NodeSet.FACTORY.makeSet();\n m.put(f, lhs);\n for (Iterator j=((Set)o).iterator(); j.hasNext(); ) {\n Object r = j.next();\n Assert._assert(r != null);\n Object q = um.get(r);\n if (r instanceof UnknownTypeNode) q = r;\n if (r == GlobalNode.GLOBAL) q = o;\n if (VERIFY_ASSERTIONS) Assert._assert(q != null, r+\" is missing from map\");\n if (TRACE_INTRA) out.println(\"Updated edge \"+f+\" \"+r+\" to \"+q);\n lhs.add(q);\n }\n }\n }\n }",
"void remap()\n\t\t{\n\t\t\tif(nextMap == null)\n\t\t\t\treturn;\n\t\t\tnextMap = newNodeMap(nextMap);\n\t\t\tfor(Node<T> node : nextMap.values())\n\t\t\t\tnode.remap();\n\t\t}",
"@Override\n public final void operate(Map<String, ?> yamlValues, int patternData) {\n throw new IllegalStateException(\"Called operate with a map on a single translator\");\n }",
"public void normalization(Map <String,ArrayList<Point>> map){\r\n \t/*First Translation*/\r\n \tint minX,minY,x,y,i = 0;\r\n \tminX = minXValue(map);\r\n \tminY = minYValue(map);\r\n \tint indexTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexTrans).getX() - minX);\r\n \t\ty = (int) (map.get(key).get(indexTrans).getY()- minY);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexTrans++;\r\n \t\t}\r\n \t/*Scaling */\r\n \t/*x = x*s ; y = y*s */\r\n \t/*initialize s*/\r\n \tint xMaxWindow= 600,yMaxWindow = 600,s;\r\n \tif ((xMaxWindow/maxXValue(map)) < (yMaxWindow/maxYValue(map)))\r\n \t{\r\n \t\t\ts = (int) (0.8*(xMaxWindow/maxXValue(map)));\r\n \t}\r\n \t\telse\r\n \t\t{\r\n \t\ts = (int) (0.8*(yMaxWindow/maxYValue(map)));\r\n \t\t}\r\n \tint indexScaling = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(indexScaling).getX()*s);\r\n \t\ty = (int) (map.get(key).get(indexScaling).getY()*s);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tindexScaling++;\r\n \t\t}\r\n \t/*Translation Back*/\r\n \t/* x = x + 0.1*xMaxWindow ; y = y + 0.1*yMaxWindow */\r\n \tint iSecTrans = 0;\r\n \tfor (String key : map.keySet()) {\r\n \t\tx = (int) (map.get(key).get(i).getX() + 0.1*xMaxWindow);\r\n \t\ty = (int) (map.get(key).get(i).getY() + 0.1*yMaxWindow);\r\n \t\t/*set new x and y*/\r\n \t\tmap.get(key).set(i, new Point(x,y));\r\n \t\tiSecTrans++;\r\n \t\t}\r\n \r\n \t\r\n \t\r\n }",
"public void apply();",
"public void apply();",
"public void apply();",
"private void updateCountersOfMap(final Map<String, Integer> map, final String key) {\n Integer visitTimes = map.get(key);\n visitTimes = (visitTimes != null ? visitTimes : 0);\n map.put(key, visitTimes + 1);\n }"
] | [
"0.6342935",
"0.6158491",
"0.6027055",
"0.59647524",
"0.5899159",
"0.58856696",
"0.56981975",
"0.5692958",
"0.5676126",
"0.56427497",
"0.5640697",
"0.56285316",
"0.56058043",
"0.5603492",
"0.55512637",
"0.554225",
"0.5533985",
"0.55103076",
"0.5498754",
"0.5487702",
"0.54756147",
"0.5469491",
"0.5466997",
"0.5456709",
"0.5448514",
"0.54442227",
"0.54289454",
"0.5412017",
"0.5387511",
"0.53775007",
"0.5372686",
"0.53489196",
"0.5338014",
"0.53374773",
"0.5330558",
"0.52898914",
"0.5253371",
"0.5244378",
"0.52308077",
"0.5227716",
"0.52268153",
"0.52089006",
"0.5205179",
"0.51867867",
"0.5182215",
"0.51807344",
"0.51746035",
"0.51698244",
"0.5168821",
"0.5165599",
"0.5160598",
"0.51299775",
"0.51277703",
"0.51235276",
"0.5120734",
"0.511226",
"0.5104645",
"0.510412",
"0.50816715",
"0.5072178",
"0.5071931",
"0.50702333",
"0.50699496",
"0.50668633",
"0.5054187",
"0.504988",
"0.50492716",
"0.5042808",
"0.5039482",
"0.5037439",
"0.50177944",
"0.50159985",
"0.5015919",
"0.5014017",
"0.5011129",
"0.5011123",
"0.50082386",
"0.49990475",
"0.49917305",
"0.4987021",
"0.49858546",
"0.49781507",
"0.4977608",
"0.49747643",
"0.49668667",
"0.4961145",
"0.49537554",
"0.4947448",
"0.4943831",
"0.49420533",
"0.49361542",
"0.4934555",
"0.49284124",
"0.49255583",
"0.4919119",
"0.49178594",
"0.49125648",
"0.4911736",
"0.4911736",
"0.4911736",
"0.49068955"
] | 0.0 | -1 |
Calls the function on each entry in the map. | void iterate(FnIntFloatToVoid function); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public native void forEach(Action3<V, K, Map<K, V>> callbackfn);",
"public static <K, V> void fastForEach(Reference2ObjectMap<K, V> map, Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 70 */ ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 71 */ if (entries instanceof Reference2ObjectMap.FastEntrySet) {\n/* 72 */ ((Reference2ObjectMap.FastEntrySet)entries).fastForEach(consumer);\n/* */ } else {\n/* 74 */ entries.forEach(consumer);\n/* */ } \n/* */ }",
"@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",
"default void forEach(BiConsumer<? super K, ? super V> action) {\n Objects.requireNonNull(action);\n for (Node<K, V> node : entrySet()) {\n action.accept(node.getKey(), node.getValue());\n }\n }",
"public static <T> void indexedMap(T[][] matrix, TriFunction<T, Integer, Integer, T> mapFunction){\n for (int i = 0; i != matrix.length; ++i) {\n for (int j = 0; j != matrix[0].length; ++i) {\n T value = matrix[i][j];\n matrix[i][j] = mapFunction.apply(value, i, j);\n }\n }\n }",
"public abstract void map(String key, String value) throws Exception;",
"public void forEach(Consumer<GeometricalObject> action);",
"ProcessOperation<Map<String, Object>> map();",
"public void doToEachCell(Consumer<Cell> func) {\n for(Cell c: this) {\n func.accept(c);\n }\n }",
"private List<EventInfo> map(List<EventLog> entries) {\n List<EventInfo> events = new ArrayList<>();\n for (EventLog entry : entries) {\n events.add(map(entry));\n }\n return events;\n }",
"public void applyToArticles(Function<Artikel, Artikel> func){\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n func.apply(integerArtikelEntry.getValue());\n }\n }",
"Object visitMapOfValues(MapOfValuesNode node, Object state);",
"public void doToEachCell(Consumer<Cell> func) {\n for(int i = 0; i < cells.length; i++) {\n for(int j = 0; j < cells[i].length; j++) { \n func.accept(cells[i][j]);\n }\n } \n }",
"@Override\n public void process(HashMap<K, V> tuple)\n {\n for (Map.Entry<K, V> e: tuple.entrySet()) {\n MutableDouble val = basemap.get(e.getKey());\n if (!doprocessKey(e.getKey())) {\n continue;\n }\n if (val == null) { // Only process keys that are in the basemap\n val = new MutableDouble(e.getValue().doubleValue());\n basemap.put(cloneKey(e.getKey()), val);\n continue;\n }\n double change = e.getValue().doubleValue() - val.value;\n double percent = (change/val.value)*100;\n if (percent < 0.0) {\n percent = 0.0 - percent;\n }\n if (percent > percentThreshold) {\n HashMap<V,Double> dmap = new HashMap<V,Double>(1);\n dmap.put(cloneValue(e.getValue()), percent);\n HashMap<K,HashMap<V,Double>> otuple = new HashMap<K,HashMap<V,Double>>(1);\n otuple.put(cloneKey(e.getKey()), dmap);\n alert.emit(otuple);\n }\n val.value = e.getValue().doubleValue();\n }\n }",
"public static <T> void map(T[][] matrix, Function<T, T> mapFunction){\n indexedMap(matrix, (value, i, j) -> mapFunction.apply(value));\n }",
"@Override\n\tpublic void getStat(Map<String, String> map) {\n\t\t\n\t}",
"private void processTilesetMap() {\r\n for (int t = 0; t < this.getTileSetCount(); t++) {\r\n TileSet tileSet = this.getTileSet(t);\r\n this.tilesetNameToIDMap.put(tileSet.name, t);\r\n }\r\n }",
"private static void iterateThroughHashMapJava8(Map<String, Integer> crunchifyMap) {\n\t\tcrunchifyMap.forEach((k, v) -> {\n\t\t\tSystem.out.println(\"Key: \" + k + \"\\t\\t Value: \" + v);\n\t\t});\n \n\t}",
"public static <E, F> Iterable<F> apply(Function<? super E, ? extends F> f, Iterable<? extends E> iter) {\r\n \treturn new MappedIterable<E, F>(iter, f);\n }",
"@Override\n\tpublic void run() {\n\t\tlong start = System.nanoTime();\n\t\tfor (int j = 0; j < keymap.length; j++) {\n\t\t\ttry {\n\t\t\t\tkvstore.put(keymap[j][0] + ID, keymap[j][1]);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"keymap ist falsch!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tlong end = System.nanoTime();\n\t\tlong duration = end - start;\n\t\te.durationMapPut.replace(this, e.durationMapPut.get(this).doubleValue() + (double) duration);\n\t\t\n\t\t//start evaluation of get calls\n\t\tstart = System.nanoTime();\n\t\tfor (int j = 0; j < keymap.length; j++) {\n\t\t\ttry {\n\t\t\t\tkvstore.get(keymap[j][0] + ID);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"keymap ist falsch!\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tend = System.nanoTime();\n\t\tlong duration2 = end - start;\n\t\te.durationMapPut.replace(this, e.durationMapGet.get(this).doubleValue() + (double) duration2);\n\t}",
"void updateMap(MapData map);",
"private static void simpleMapExamples() {\n\t\tSystem.out.println(\"simpleMapExamples Start ----\");\n\t\t\n\t\tMap<String,Integer> mapEx1 = new HashMap<>();\n\t\t\n\t\tmapEx1.put(\"Amit\", 35);\n\t\tmapEx1.put(\"Gunjan\", 45);\n\t\tmapEx1.put(\"Vidut\", 55);\n\t\t\n\t\t//Loop over Map\n\t\tfor(Entry<String, Integer> entry : mapEx1.entrySet()) {\n\t\t\t\n\t\t\tString key = entry.getKey();\n\t\t\tInteger val = entry.getValue();\n\t\t\t\n\t\t\tSystem.out.println(\"KEY : \" + key + \" : VAL : \" + val);\n\t\t\t\n\t\t}\n\t\t\n\t\t//API to get collection of values from the map\n\t\tCollection<Integer> values = mapEx1.values();\n\t\t\n\t\t//Now browse over collection values using java8 lambda\n\t\tSystem.out.println(\"Printing values ...\");\n\t\tvalues.forEach((val) -> System.out.println(val));\n\t\t\n\t\t//Replace values in the map using \n\t\t//Here we are replacing each key's value to 46\n\t\tmapEx1.replaceAll(( s, i) -> {\n\t\t\treturn 46;\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Printing after firing replaceAll...\");\n\t\t//Now print the key/value pair of map using lambda\n\t\tmapEx1.forEach((k,v) -> {\n\t\t\tSystem.out.println(\"Key : \" + k + \" Val \" + v);\n\t\t});\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"simpleMapExamples End ----\");\n\t}",
"Object visitMapOfObjects(MapOfObjectsNode node, Object state);",
"public Object map(String key, Object input);",
"default <U> void forEach(TryFunction<T, U> fn) {\n if (isSuccess()) {\n try {\n fn.apply(get());\n } catch (Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }",
"@Override\r\n public void run() {\r\n try {\r\n /* For each record, map it. */\r\n while (reader.hasNextRecord()) {\r\n Map.Entry<String, String> read = reader.readNextRecord();\r\n map(read.getKey(), read.getValue());\r\n }\r\n } catch (Exception e) {\r\n success = false;\r\n e.printStackTrace();\r\n } finally {\r\n reader.close();\r\n writer.close();\r\n }\r\n }",
"public static <T, S> Iterable<S> map(Iterable<T> baseIterable, MapFunction<T, S> mapFunction) {\n return new MapIterable<T, S>(baseIterable, mapFunction);\n }",
"@Override\n\tpublic boolean on(GetMapObjectsEvent t) {\n\t\t\n\t\tPlayer player = t.getPlayer();\n\t\tS2LatLng pos = player.s2LatLngPos();\n\t\tWorld world = t.getGame().getWorld();\n\t\tGameSettings settings = t.getGame().getSettings();\n\t\tlong ts = System.currentTimeMillis();\n\t\tFunction<UniqueLocatable, MapObjectInfo> f = u -> getMapObjectInfo(u, settings, ts, player, pos);\n\t\t\n\t\tfor(int i=0;i<t.size();i++){\n\t\t\tWorldCell cell = world.getCell(t.cellIds[i]);\n\t\t\tif(cell == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Don't let them scan cells too far away\n\t\t\t// TODO: Make the limit configurable!\n\t\t\tif(cell.distanceTo(pos) > 1000)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tt.cells[i] = new CellInfo(ts, Iterators.filter(Iterators.transform(cell.objects().iterator(), f), e -> e != null));\n\t\t}\n\t\t\n\t\tt.status = MapObjectsStatus.SUCCESS;\n\t\treturn true;\n\t}",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries);\n }",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries, this.size);\n }",
"public int askMap();",
"public static final Iterator map(final Iterator it, final Function fn) {\n return new Iterator() {\n\n public final boolean hasNext() {\n return it.hasNext();\n }\n\n public final Object next() {\n return fn.fn(it.next());\n }\n\n public final void remove() {\n throw new RuntimeException(\"Not implemented\");\n }\n\n };\n }",
"@Override\n\t\tpublic void map(Text key, Text value,\n\t\t\t\tOutputCollector<Text, Text> output, Reporter reporter)\n\t\t\t\tthrows IOException {\n\t\t\tfor (String word : words) {\n\t\t\t\tif (key.toString().equals(word)) {\n\t\t\t\t\tString[] outVals = parseOutValue(value.toString(), filemap)\n\t\t\t\t\t\t\t.split(\"\\n\");\n\t\t\t\t\tfor (String val : outVals) {\n\t\t\t\t\t\tString outkey = val.substring(0, val.indexOf('['));\n\t\t\t\t\t\tString outval = word + \"::\"\n\t\t\t\t\t\t\t\t+ val.substring(val.indexOf(':') + 1);\n\t\t\t\t\t\toutput.collect(new Text(outkey), new Text(outval));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public abstract void putAll(AbstractIntHashMap map);",
"public void forEach(Processor processor) {\n\n\t}",
"@Override\n public void putAll(Map<? extends String, ? extends T> m) {\n for (Map.Entry<? extends String, ? extends T> e : m.entrySet()) {\n put(e.getKey(), e.getValue());\n }\n }",
"public void a(d dVar, Map<K, V> map) {\r\n if (map == null) {\r\n dVar.h();\r\n } else if (!C0128k.this.f1575b) {\r\n dVar.b();\r\n for (Map.Entry<K, V> entry : map.entrySet()) {\r\n dVar.a(String.valueOf(entry.getKey()));\r\n this.f1577b.a(dVar, entry.getValue());\r\n }\r\n dVar.d();\r\n } else {\r\n ArrayList arrayList = new ArrayList(map.size());\r\n ArrayList arrayList2 = new ArrayList(map.size());\r\n int i = 0;\r\n boolean z = false;\r\n for (Map.Entry<K, V> entry2 : map.entrySet()) {\r\n v a2 = this.f1576a.a(entry2.getKey());\r\n arrayList.add(a2);\r\n arrayList2.add(entry2.getValue());\r\n z |= a2.e() || a2.g();\r\n }\r\n if (z) {\r\n dVar.a();\r\n while (i < arrayList.size()) {\r\n dVar.a();\r\n c.a.a.b.A.a((v) arrayList.get(i), dVar);\r\n this.f1577b.a(dVar, arrayList2.get(i));\r\n dVar.c();\r\n i++;\r\n }\r\n dVar.c();\r\n return;\r\n }\r\n dVar.b();\r\n while (i < arrayList.size()) {\r\n dVar.a(a((v) arrayList.get(i)));\r\n this.f1577b.a(dVar, arrayList2.get(i));\r\n i++;\r\n }\r\n dVar.d();\r\n }\r\n }",
"@Override\n\tpublic void convertitMap(Map<String, Object> map) {\n\t\t\n\t}",
"protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}",
"public final /* bridge */ /* synthetic */ void mo6480a(Object obj) {\n this.f9049c.mo6949a((Map) obj, this.f9047a, this.f9048b);\n }",
"private void processLayerMap() {\r\n for (int l = 0; l < layers.size(); l++) {\r\n Layer layer = layers.get(l);\r\n this.layerNameToIDMap.put(layer.name, l);\r\n }\r\n }",
"@Override\n public void putAll(Map<? extends K, ? extends V> m) {\n for(Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {\n put(entry.getKey(), entry.getValue());\n }\n }",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\n for (Map.Entry<? extends K, ? extends V> e : m.entrySet())\n put(e.getKey(), e.getValue());\n\t}",
"private void execute(Map<Class, Map<Method, Object>> map, Object entity) {\n if (entity.getClass().isAnnotationPresent(Entity.class)) {\n\n // check for hits on this class or its superclasses.\n for (Class c = entity.getClass(); c != null && c != Object.class; c = c.getSuperclass()) {\n if (map.containsKey(c)) {\n for (Map.Entry<Method, Object> entry : map.get(c).entrySet()) {\n try {\n entry.getKey().invoke(entry.getValue(), entity);\n } catch (InvocationTargetException e) {\n // log it\n } catch (IllegalAccessException e) {\n // log it\n }\n }\n }\n }\n\n // check for hits on interfaces.\n for (Class c : entity.getClass().getInterfaces()) {\n if (map.containsKey(c)) {\n for (Map.Entry<Method, Object> entry : map.get(c).entrySet()) {\n try {\n entry.getKey().invoke(entry.getValue(), entity);\n } catch (InvocationTargetException e) {\n // log it\n } catch (IllegalAccessException e) {\n // log it\n }\n }\n }\n }\n }\n }",
"public String evaluate (Map entryMap, String contents);",
"public static void mapUtil(HashMap<Integer, String> map)\n\t{\n\t\tmap.put(101, \"Shawn\");\n\t\tmap.put(123, \"Holly\");\n\t\tmap.put(346, \"Michael\");\n\t\tmap.put(45, \"Kelly\");\n\t\tmap.put(24, \"Kobe\");\n\t\t\n\t\tSystem.out.println(\"See all of the keys \" + map.keySet());\n\t\tSystem.out.println(\"See all of the key value pairs: \" + map);\n\t\tSystem.out.println(map.get(45));\n\t\t\n\t\tfor(int key : map.keySet())\n\t\t{\n\t\t\tSystem.out.println(\"[ KEY: \" + key + \". VALUE: \" + map.get(key) + \"]\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public void run() {\n try {\n handler.process( client, map );\n }\n catch ( java.io.IOException ioe ) {\n System.err.println( ioe );\n }\n }",
"private static double exerciseMap(int threadCount, int perThread, int range, \n final OurMap<Integer, String> map) {\n Thread[] threads = new Thread[threadCount];\n for (int t=0; t<threadCount; t++) {\n final int myThread = t;\n threads[t] = new Thread(() -> {\n Random random = new Random(37 * myThread + 78);\n for (int i=0; i<perThread; i++) {\n Integer key = random.nextInt(range);\n if (!map.containsKey(key)) {\n // Add key with probability 60%\n if (random.nextDouble() < 0.60) \n map.put(key, Integer.toString(key));\n } \n else // Remove key with probability 2% and reinsert\n if (random.nextDouble() < 0.02) {\n map.remove(key);\n map.putIfAbsent(key, Integer.toString(key));\n }\n }\n final AtomicInteger ai = new AtomicInteger();\n map.forEach(new Consumer<Integer,String>() { \n public void accept(Integer k, String v) {\n ai.getAndIncrement();\n }});\n // System.out.println(ai.intValue() + \" \" + map.size());\n });\n }\n for (int t=0; t<threadCount; t++) \n threads[t].start();\n map.reallocateBuckets();\n try {\n for (int t=0; t<threadCount; t++) \n threads[t].join();\n } catch (InterruptedException exn) { }\n return map.size();\n }",
"public void putAll(Map arg0)\r\n {\r\n throw new RuntimeException(\"Cannot modify the display data.\");\r\n }",
"public void onChangeMap(String arg0) {\n\t\t\r\n\t}",
"@ScheduledMethod(start = 1, interval = 1, priority = -5)\n\tpublic void react() {\n\t\tfor (int i = 0; i < 1; i++) { \n\n\t\t\tfor (Entry<String, Reaction> entry : reactionMap.entrySet()) {\n\n\t\t\t\tlong startTime = System.currentTimeMillis();\n\n\t\t\t\tString key = entry.getKey();\n\t\t\t\tReaction value = entry.getValue();\n\t\t\t\tvalue.react(1.0);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\n\t\t\t\tSystem.out.println(\"reaction, \" + key + \":\");\n\t\t\t\tSystem.out.println(endTime - startTime);\n\n\t\t\t}\n\t\t}\n\t}",
"public void run() {\n\t\tfor(int Index=0;Index<pac.getPath().size();Index++) { //run on the path arraylist of every pacman\n\t\t\tfullGamePath(pac, pac.getPath().get(Index).getFruit(),Index); //call the function\n\t\t\tpac.getPath().get(Index).setTime();\n\t\t}\n\t\t\n\t}",
"@Override\n public void notifyMapObservers() {\n for(MapObserver mapObserver : mapObservers){\n // needs all the renderInformation to calculate fogOfWar\n System.out.println(\"player map: \" +playerMap);\n mapObserver.update(this.playerNumber, playerMap.returnRenderInformation(), entities.returnUnitRenderInformation(), entities.returnStructureRenderInformation());\n entities.setMapObserver(mapObserver);\n }\n }",
"public static <T, U> Array<T> map(Iterable<U> iterable, Function<? super U, ? extends T> f)\n {\n Array<T> out = new Array<>();\n\n for (U u: iterable)\n out.add(f.apply(u));\n\n return out;\n }",
"private void storeValues(int source,\n Map<VWBetw, Double> map,\n DiskBufferDriver output) throws DriverException {\n for (Entry<VWBetw, Double> e : map.entrySet()) {\n storeValue(source, e.getKey().getID(), e.getValue(), output);\n }\n }",
"public void map( Chunk c ) { }",
"public void callBack(HashMap<String, String> info);",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> arg0) {\n\t\t\n\t}",
"public void iterate() {\n\t\t// iterator\n\t\tQueue<NDLMapEntryNode<T>> nodes = new LinkedList<NDLMapEntryNode<T>>();\n\t\tnodes.add(rootNode);\n\t\twhile(!nodes.isEmpty()) {\n\t\t\t// iterate BFSwise\n\t\t\tNDLMapEntryNode<T> node = nodes.poll();\n\t\t\tif(node.end) {\n\t\t\t\t// end of entry, call processor\n\t\t\t\tif(keyProcessor != null) {\n\t\t\t\t\tkeyProcessor.process(node.data);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.keys != null) {\n\t\t\t\t// if available\n\t\t\t\tnodes.addAll(node.keys.values()); // next nodes to traverse\n\t\t\t}\n\t\t}\n\t}",
"public static <E, F> Iterator<F> apply(Function<? super E, ? extends F> f, Iterator<? extends E> iter) {\r\n \treturn new MappedIterator<E, F>(iter, f);\n }",
"@Override\n\tpublic void forEach(Processor processor) {\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tprocessor.process(elements[i]);\n\t\t}\n\t}",
"public void notifyMapLoaded();",
"public void putAll(Map<?, ? extends Action> map) {\n\t\tObject key;\n\t\tAction action;\n\t\tfor (Map.Entry<?, ? extends Action> entry : map.entrySet()) {\n\t\t\tkey = entry.getKey();\n\t\t\taction = entry.getValue();\n\t\t\tif (key != null && action != null)\n\t\t\t\tput(key, action);\n\t\t}\n\t}",
"public static <K, V> ObjectIterable<Reference2ObjectMap.Entry<K, V>> fastIterable(Reference2ObjectMap<K, V> map) {\n/* 90 */ final ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 91 */ return (entries instanceof Reference2ObjectMap.FastEntrySet) ? \n/* 92 */ (ObjectIterable)new ObjectIterable<Reference2ObjectMap.Entry<Reference2ObjectMap.Entry<K, V>, V>>() {\n/* */ public ObjectIterator<Reference2ObjectMap.Entry<K, V>> iterator() {\n/* 94 */ return ((Reference2ObjectMap.FastEntrySet<K, V>)entries).fastIterator();\n/* */ }\n/* */ public void forEach(Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 97 */ ((Reference2ObjectMap.FastEntrySet<K, V>)entries).fastForEach(consumer);\n/* */ }\n/* 100 */ } : entries;\n/* */ }",
"public void forEachFlatMap(TriConsumer<Biome, NamespacedKey, Optional<Config>> consumer) {\n cache.forEach((biome, part) -> part.forEach((featureKey, config) -> consumer.accept(biome, featureKey, config)));\n }",
"public final void g(@NonNull Map<z, Map<String, Object>> map) {\n a((Map) map, true);\n }",
"public void m() {\n for (Map.Entry key : this.f80656a.a().entrySet()) {\n List list = (List) key.getKey();\n if (!this.l.contains(list)) {\n this.l.add(d.a(list));\n }\n }\n if (this.l.size() > 0) {\n this.f80657b.a(new f(), this.l);\n }\n }",
"public void process(Element element, Map<String, Type> localMap) {\r\n\t\r\n\t\tinspectHybrid(element, localMap);\r\n\t \r\n\t List content = element.getContent();\r\n\t Iterator iterator = content.iterator();\r\n\t \r\n\t while (iterator.hasNext()) {\r\n\t Object o = iterator.next();\r\n\t if (o instanceof Element) {\r\n\t Element child = (Element) o;\r\n\t process(child, localMap); \r\n\t }\r\n\t }\r\n\t}",
"public synchronized void apply(Lambda<TurtleBody> function) {\n\t\tfor (TurtleBody body : this.bodies.values()) {\n\t\t\tfunction.apply(body);\n\t\t}\n\t}",
"public WeirdList map(IntUnaryFunction func) {\n return null; // REPLACE THIS LINE WITH THE RIGHT ANSWER.\n }",
"private void addHistogram2map(HashMap<String, double[][]> map, double[] histValues, String key, int iteration) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new double[nRandomisations][]);\r\n }\r\n double[][] values = map.get(key);\r\n values[iteration] = histValues;\r\n }",
"public void map() {\n\t\tfor(GameObject object : gameObject)\n\t\t\tSystem.out.println(object);\n\t}",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tfillWithDictionaries();\n\t\t\t\t\t}",
"void processMiniMap(KeyEvent event, Level level, MiniMap mini, Canvas miniMapCanvas) {\r\n mini.drawMap(level, miniMapCanvas);\r\n event.consume();\r\n }",
"<R> MultiSet<R> map(Function<X, R> f);",
"private static void mapReplace(@Nonnull final StringBuilder sb, @Nonnull final LinkedHashMap<String, String> map,\r\n final FormatFunction f) {\r\n int indexOf = 0;\r\n for (final Entry<String, String> entry : map.entrySet()) {\r\n final String key = entry.getKey();\r\n final String value = f.format(entry.getValue());\r\n while ((indexOf = sb.indexOf(key, indexOf)) > -1) {\r\n sb.replace(indexOf, indexOf + key.length(), value);\r\n indexOf += value.length();\r\n }\r\n }\r\n }",
"@Override\r\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\r\n\t\tfor (K key : m.keySet()) {\r\n\t\t\tput(key, m.get(key));\r\n\t\t}\r\n\t}",
"@Test\n public void mapKeys() {\n check(MAPKEYS);\n query(\"for $i in \" + MAPKEYS.args(\n MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i+1\"))) + \" order by $i return $i\", \"1 2 3\");\n query(\"let $map := \" + MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i + 1\")) +\n \"for $k in \" + MAPKEYS.args(\"$map\") + \" order by $k return \" +\n MAPGET.args(\"$map\", \"$k\"), \"2 3 4\");\n }",
"public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }",
"@Override\n public Iterator<Entry<Integer, T>> iterator() {\n List<Entry<Integer, T>> pairs = new ArrayList<Entry<Integer, T>>(count);\n\n for(int i = 0; i < count; i++) {\n pairs.add(new MapEntry<T>(extractKey(buckets[i]), (T)data[i]));\n }\n\n return pairs.iterator();\n }",
"private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }",
"public void map( Chunk cs[] ) { }",
"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n private void populateMap(Map map, Node node) {\n Map.Entry entry = getMapEntry(node);\n if (entry != null) {\n map.put(entry.getKey(), entry.getValue());\n }\n }",
"public static <E, F> Iterable<F> apply(Iterable<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }",
"@Override\n public boolean execute(final long key, @NonNull final MapTile tile) {\n synchronized (unchecked) {\n unchecked.add(key);\n }\n \n return true;\n }",
"public static void test2(Map<Object,Object> map) \n\t{\n\t\tprint(map.getClass().getSimpleName()+\"~~~~~~~~~~~~\");\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Map has 'Set' behavior for keys:\n\t\tmap.putAll(new CountingMapData(25));\n\t\tprintKeys2(map);\n\t\t// Producing a collection of the values:\n\t\tprintnb(\"Values: \");\n\t\tprint(map.values());\n\t\tprint(map);\n\t\tprint(\"map.containsKey(11): \" + map.containsKey(11));\n\t\tprint(\"map.get(11): \" + map.get(11));\n\t\tprint(\"map.containsValue(\\\"F0\\\"): \" + map.containsValue(\"F0\"));\n\t\tObject key = map.keySet().iterator().next();\n\t\tprint(\"First key in map: \" + key);\n\t\tmap.remove(key);\n\t\tprintKeys2(map);\n\t\tmap.clear();\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t\tmap.putAll(new CountingMapData(25));\n\t\t// Operations on the Set change the Map:\n\t\tmap.keySet().removeAll(map.keySet());\n\t\tprint(\"map.isEmpty(): \" + map.isEmpty());\n\t}",
"public static void main(String[] args) {\n\t\n\tHashMap<Integer, String> map=new HashMap<Integer, String>();\n\tmap.put(0, \"X\");\n\tmap.put(1, \"X\");\n\tmap.put(2, \"Y\");\n\tmap.put(3, \"Z\");\n\t\n\tSystem.out.println(map.get(2));\n\t\n\tfor(int i=0;i<=map.size();i++) {\n\t\tSystem.out.println(map.get(i));\n\t}\n\t\n\t//for(String s:li)\n\tfor (Map.Entry<Integer, String> entry : map.entrySet()) {\n\t System.out.println(entry.getKey() + \" = \" + entry.getValue());\n\t}\n\t\n\tmap.forEach((key,value) -> System.out.println(key + \" = \" + value));\n\t\n\t\n\tmap.forEach((key,value) -> System.out.println(key +\"=\"+value));\n\t\n\t\n}",
"@Override\n public final void operate(Map<String, ?> yamlValues, int patternData) {\n throw new IllegalStateException(\"Called operate with a map on a single translator\");\n }",
"@Override\n\tpublic void putAll(Map<? extends K, ? extends V> m) {\n\t\t\n\t}",
"protected static void addArgToResultsMap(String sArg, Object oValue, Map map)\n {\n Object oValuePrev = map.get(sArg);\n if (oValuePrev == null)\n {\n map.put(sArg, oValue);\n return;\n }\n\n List listVals;\n if (oValuePrev instanceof List)\n {\n listVals = (List) oValuePrev;\n }\n else\n {\n map.put(sArg, listVals = new LinkedList());\n listVals.add(oValuePrev);\n }\n listVals.add(oValue);\n }",
"public abstract Map<K, V> a();",
"@Override\n\tpublic void SuccessCallBack(Map<String, Object> map) {\n\t\t\n\t}",
"private void updateCountersOfMap(final Map<String, Integer> map, final String key) {\n Integer visitTimes = map.get(key);\n visitTimes = (visitTimes != null ? visitTimes : 0);\n map.put(key, visitTimes + 1);\n }",
"@Override\n public void handle(Map<String, Object> map) {\n String param = map.get(CoreType.param.toString()).toString();\n\n\n String sessionId = map.get(CoreType.sessionId.toString()).toString();\n AVLTree<Integer, Integer> avl = UtilTREE.getAVL(sessionId);\n\n avl.eachLeft();\n map.put(CoreType.result.toString(), JSON.toJSON(avl).toString());\n }",
"static /* synthetic */ void m4645a(C1960g c1960g, List list, Map map) {\n if (list != null && !list.isEmpty()) {\n for (String str : list) {\n new C2613e(c1960g.b, map).execute(new String[]{str});\n }\n }\n }",
"private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }",
"@Override\n public void forEach(Consumer<? super T> action) {\n items.forEach(action);\n }",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);",
"@Override\n\t\t\t\t\tpublic void forEach(BiConsumer<Var, Node> action) {\n\t\t\t\t\t\tfor (Var v : bins.keySet()) {\n\t\t\t\t\t\t\tNode n = bins.get(v);\n\t\t\t\t\t\t\taction.accept(v, n);\n\t\t\t\t\t\t}\n\t\t\t\t\t}"
] | [
"0.6249996",
"0.590353",
"0.58628404",
"0.58362764",
"0.5726488",
"0.571879",
"0.56772184",
"0.559598",
"0.5583812",
"0.55727875",
"0.5559413",
"0.55305344",
"0.55024487",
"0.54939276",
"0.54709035",
"0.54653454",
"0.5445916",
"0.5440751",
"0.54377335",
"0.54261345",
"0.5425245",
"0.54179716",
"0.54098773",
"0.5360621",
"0.5353885",
"0.53505147",
"0.5326737",
"0.5323413",
"0.529506",
"0.5236248",
"0.5222193",
"0.5221405",
"0.5213349",
"0.5208937",
"0.519776",
"0.51975363",
"0.51952636",
"0.5180317",
"0.51786876",
"0.51746345",
"0.5166211",
"0.5162813",
"0.51466054",
"0.51365185",
"0.5136477",
"0.5135907",
"0.5134444",
"0.51245844",
"0.5123656",
"0.5108206",
"0.5103189",
"0.5102754",
"0.50991553",
"0.5094291",
"0.5094261",
"0.50700253",
"0.50691855",
"0.50668514",
"0.5063632",
"0.506349",
"0.50513834",
"0.50502807",
"0.50368947",
"0.50321704",
"0.50300527",
"0.50240964",
"0.5021197",
"0.5020709",
"0.5012601",
"0.49826455",
"0.49757585",
"0.49755105",
"0.4967686",
"0.49594358",
"0.4956907",
"0.49561584",
"0.49547026",
"0.4948747",
"0.49462944",
"0.49453515",
"0.4943615",
"0.49435487",
"0.49389756",
"0.492732",
"0.49248844",
"0.4923988",
"0.49235538",
"0.49190402",
"0.4914625",
"0.49138337",
"0.49102196",
"0.48977703",
"0.48973688",
"0.4896321",
"0.48960063",
"0.48945668",
"0.4882089",
"0.48792496",
"0.48771623",
"0.48766613"
] | 0.52437633 | 29 |
Returns an iterator over the entries in the map. CAUTION: This tends to be slower than using the equivalent apply(). | Iterator<IntFloatEntry> iterator(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@VisibleForTesting\n public Iterator<Entry<ClientRequest, CacheEntry>> iterator() {\n return map.entrySet().iterator();\n }",
"public Iterator iterator() {\n\t\treturn map.keySet().iterator();\n\t}",
"public Iterator<X> iterator() {\n return map.keySet().iterator();\n }",
"public native IterableIterator<Tuple<K, V>> entries();",
"public Iterator<E> iterator() {\r\n return this.map.values().iterator();\r\n }",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries);\n }",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new ArrayMapIterator<>(this.entries, this.size);\n }",
"private Iterator getEntries(){\r\n\t\tSet entries = items.entrySet();\r\n\t\treturn entries.iterator();\r\n\t}",
"@Override\n public Iterator<Entry<Integer, T>> iterator() {\n List<Entry<Integer, T>> pairs = new ArrayList<Entry<Integer, T>>(count);\n\n for(int i = 0; i < count; i++) {\n pairs.add(new MapEntry<T>(extractKey(buckets[i]), (T)data[i]));\n }\n\n return pairs.iterator();\n }",
"public static final Iterator iter (Map map, Object ... keys) {\r\n return new MapIterator(map, iter(keys));\r\n }",
"@Override\n public Iterator<E> iterator() {\n return new HashBagIterator<>(this, map.entrySet().iterator());\n }",
"public Iterator<K> iterator() {\r\n\t\treturn new HashMapIterator();\r\n\t}",
"public UnmodifiableIterator<Entry<K, V>> iterator() {\n return mo8403b().iterator();\n }",
"public Iterator<MapElement> iterator() {\n return this;\n }",
"public Iterator<Entry<Integer, HashMap<String, Double>>> iterator() {\r\n\t\treturn structure.entrySet().iterator();\r\n\t}",
"public Iterator<String> getKeyIterator(){\r\n\t\treturn map.keySet().iterator();\r\n\t}",
"public Iterator<String> keyIterator() {\n \treturn new MapIter(first);\n }",
"public Iterable<Entry<K, V>> entries();",
"Iterator<K> iterator();",
"public Iterator iterator() {\n\t return new EntryIterator(set.iterator());\n\t}",
"@Override\r\n\tpublic Iterator<K> iterator() {\n\t\treturn keys.iterator();\r\n\t}",
"public Iterable<MapElement> elements() {\n return new MapIterator() {\n\n @Override\n public MapElement next() {\n return findNext(true);\n }\n \n };\n }",
"@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",
"public static <K, V> ObjectIterable<Reference2ObjectMap.Entry<K, V>> fastIterable(Reference2ObjectMap<K, V> map) {\n/* 90 */ final ObjectSet<Reference2ObjectMap.Entry<K, V>> entries = map.reference2ObjectEntrySet();\n/* 91 */ return (entries instanceof Reference2ObjectMap.FastEntrySet) ? \n/* 92 */ (ObjectIterable)new ObjectIterable<Reference2ObjectMap.Entry<Reference2ObjectMap.Entry<K, V>, V>>() {\n/* */ public ObjectIterator<Reference2ObjectMap.Entry<K, V>> iterator() {\n/* 94 */ return ((Reference2ObjectMap.FastEntrySet<K, V>)entries).fastIterator();\n/* */ }\n/* */ public void forEach(Consumer<? super Reference2ObjectMap.Entry<K, V>> consumer) {\n/* 97 */ ((Reference2ObjectMap.FastEntrySet<K, V>)entries).fastForEach(consumer);\n/* */ }\n/* 100 */ } : entries;\n/* */ }",
"public Iterator<Entry> iterator() {\n return new ArrayIterator<Entry>(fEntries);\n }",
"public Iterator<K> iterator() {\n Set keySet = RBT.keySet();\n Iterator itr = keySet.iterator();\n return itr;\n }",
"@Override\n public Iterator<Map.Entry<K, V>> iterator() {\n return new SetIterator();\n }",
"public Iterator<Map.Entry<String, T>> iterator() {\n\n\t\tfinal NamedList<T> list = this;\n\n\t\tIterator<Map.Entry<String, T>> iter = new Iterator<Map.Entry<String, T>>() {\n\n\t\t\tint idx = 0;\n\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn idx < list.size();\n\t\t\t}\n\n\t\t\tpublic Map.Entry<String, T> next() {\n\t\t\t\tfinal int index = idx++;\n\t\t\t\tMap.Entry<String, T> nv = new Map.Entry<String, T>() {\n\t\t\t\t\tpublic String getKey() {\n\t\t\t\t\t\treturn list.getName(index);\n\t\t\t\t\t}\n\n\t\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\t\tpublic T getValue() {\n\t\t\t\t\t\treturn list.getVal(index);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String toString() {\n\t\t\t\t\t\treturn getKey() + \"=\" + getValue();\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic T setValue(T value) {\n\t\t\t\t\t\treturn list.setVal(index, value);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treturn nv;\n\t\t\t}\n\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}\n\t\t};\n\t\treturn iter;\n\t}",
"public static void main(String[] args) {\n\t\tMap<Integer , String> mapitr = new HashMap<>();\r\n\t\t//enter values\r\n\t\tmapitr.put(0, \"hi\");\r\n\t\tmapitr.put(1, \"hello\");\r\n\t\tmapitr.put(2, \"welcome\");\r\n\t\tmapitr.put(3, \"hey\");\r\n\t\t\r\n\t\tIterator<Entry<Integer, String>> iterator= mapitr.entrySet().iterator();\r\n\t\t\r\nwhile(iterator.hasNext()){\r\n\tEntry<Integer ,String> entry=iterator.next();\r\n\tSystem.out.println(entry.getValue());\r\n\tSystem.out.println(entry.getKey());\r\n\t\r\n\t\t\r\n\t}\r\n\t\t\t\r\n\t\t}",
"public static <K> ObjectBidirectionalIterable<Object2DoubleMap.Entry<K>> fastIterable(Object2DoubleSortedMap<K> map) {\n/* 80 */ ObjectSortedSet<Object2DoubleMap.Entry<K>> entries = map.object2DoubleEntrySet();\n/* */ \n/* 82 */ Objects.requireNonNull((Object2DoubleSortedMap.FastSortedEntrySet)entries); return (entries instanceof Object2DoubleSortedMap.FastSortedEntrySet) ? (Object2DoubleSortedMap.FastSortedEntrySet)entries::fastIterator : \n/* 83 */ entries;\n/* */ }",
"Iterator<Map.Entry<String, Integer>> getNextPair(){\r\n return entrySet.iterator();\r\n }",
"@Override\n public Iterator<Pair<K, V>> iterator() {\n return new Iterator<Pair<K, V>>() {\n private int i = 0, j = -1;\n private boolean _hasNext = true;\n\n @Override\n public boolean hasNext() {\n return _hasNext;\n }\n\n @Override\n public Pair<K, V> next() {\n Pair<K, V> r = null;\n if (j >= 0) {\n List<Pair<K, V>> inl = l.get(i);\n r = inl.get(j++);\n if (j > inl.size())\n j = -1;\n }\n else {\n for (; i < l.size(); ++i) {\n List<Pair<K, V>> inl = l.get(i);\n if (inl == null)\n continue;\n r = inl.get(0);\n j = 1;\n }\n }\n if (r == null)\n _hasNext = false;\n return r;\n }\n };\n }",
"public Iterator<Multiset.Entry<E>> entryIterator() {\n return new EnumMultiset<E>.Itr<Multiset.Entry<E>>() {\n /* access modifiers changed from: package-private */\n public Multiset.Entry<E> output(final int i) {\n return new Multisets.AbstractEntry<E>() {\n public E getElement() {\n return EnumMultiset.this.enumConstants[i];\n }\n\n public int getCount() {\n return EnumMultiset.this.counts[i];\n }\n };\n }\n };\n }",
"public Iterator<Map.Entry<String, AbstractNode>> getPairIterator()\n\t{\n\t\treturn pairs.entrySet().iterator();\n\t}",
"public Iterator<Range> iterator(ValueMapper mapper) {\n return new Trie2Iterator(mapper);\n }",
"Iterator<Entry<String, Var>> getIterator() {\n\t\treturn iter;\n\t}",
"public native IterableIterator<K> keys();",
"public static <K> ObjectBidirectionalIterator<Object2DoubleMap.Entry<K>> fastIterator(Object2DoubleSortedMap<K> map) {\n/* 60 */ ObjectSortedSet<Object2DoubleMap.Entry<K>> entries = map.object2DoubleEntrySet();\n/* 61 */ return (entries instanceof Object2DoubleSortedMap.FastSortedEntrySet) ? (\n/* 62 */ (Object2DoubleSortedMap.FastSortedEntrySet)entries).fastIterator() : \n/* 63 */ entries.iterator();\n/* */ }",
"public Iterable<Key> iterator() {\n Queue<Key> queue = new LinkedList<>();\n inorder(root, queue);\n return queue;\n }",
"public static <E, F> Iterator<F> apply(Function<? super E, ? extends F> f, Iterator<? extends E> iter) {\r\n \treturn new MappedIterator<E, F>(iter, f);\n }",
"Iterator<T> iterator();",
"public static <E, F> Iterable<F> apply(Function<? super E, ? extends F> f, Iterable<? extends E> iter) {\r\n \treturn new MappedIterable<E, F>(iter, f);\n }",
"@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn graph.keySet().iterator();\n\t}",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public Iterator<T> iterator();",
"public MapIterator() {\n findNext(false);\n }",
"public Iterator iterator()\n {\n // optimization\n if (OldOldCache.this.isEmpty())\n {\n return NullImplementation.getIterator();\n }\n\n // complete entry set iterator\n Iterator iter = instantiateIterator();\n\n // filter to get rid of expired objects\n Filter filter = new Filter()\n {\n public boolean evaluate(Object o)\n {\n Entry entry = (Entry) o;\n boolean fExpired = entry.isExpired();\n if (fExpired)\n {\n OldOldCache.this.removeExpired(entry, true);\n }\n return !fExpired;\n }\n };\n\n return new FilterEnumerator(iter, filter);\n }",
"public Iterator iterator ( ) {\n\t\tArrayList<String> it= new ArrayList();\n\t\tfor(Map.Entry<String, String> i : pwds.entrySet()) {\n\t\t\tit.add(pwds.get(i));\n\t\t\tit.add(salts.get(i));\n\t\t}\n\t\treturn it.iterator();\n\t}",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"public Iterator<E> iterator();",
"@Override public java.util.Iterator<Function> iterator() {return new JavaIterator(begin(), end()); }",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleConcurrentHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"public T iterator();",
"Iterator<E> iterator();",
"Iterator<E> iterator();",
"public UnmodifiableIterator<K> iterator() {\n return mo8403b().iterator();\n }",
"public java.util.Iterator<Entry> iterator(){\n\t\treturn new ContentIterator();\n\t}",
"public Iterable<HashNode> iterator() {\n\t\treturn bucket;\n\t\t//for(HashTable<Character, Integer>.HashNode x : HT.iterator()) {\n\t}",
"public Iterator<String> iterator();",
"public static final Iterator map(final Iterator it, final Function fn) {\n return new Iterator() {\n\n public final boolean hasNext() {\n return it.hasNext();\n }\n\n public final Object next() {\n return fn.fn(it.next());\n }\n\n public final void remove() {\n throw new RuntimeException(\"Not implemented\");\n }\n\n };\n }",
"@Override\n public Iterator<Value> iterator()\n {\n return values.iterator();\n }",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleHashMap.entrySet()\");\n return mMap.entrySet();\n }",
"public Iterator<Type> iterator();",
"@Override\r\n\tpublic Iterator<TableEntry<K, V>> iterator() {\r\n\t\treturn new IteratorImpl();\r\n\t}",
"@Override\r\n\tpublic Iterator<Key> iterator() {\n\t\treturn new ListIterator();\r\n\t}",
"public Iterator<Key> iterator() {\n\t\treturn null;\n\t}",
"public native IterableIterator<V> values();",
"public Iterator iterator() {\n\n return new EnumerationIterator(elements.keys());\n }",
"@Test\n public void testCoh3710_entrySetIterator()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet().iterator();\n assertFalse(iter.hasNext());\n validateIndex(cache);\n }\n });\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tMap mapA = new HashMap();\r\n\t\tmapA.put(\"key1\", \"element 1\");\r\n\t\tmapA.put(\"key2\", \"element 2\");\r\n\t\tmapA.put(\"key3\", \"element 3\");\t\t\r\n\t\t\r\n\t\t// key iterator\r\n\t\tIterator iterator1 = mapA.keySet().iterator();\r\n\t\t// value iterator\r\n\t\tIterator iterator2 = mapA.values().iterator();\r\n\t}",
"@Override\n\tpublic Set<Entry<K, V>> entrySet() {\n\t\tSet<Entry<K, V>> entrySet = map.entrySet();\n\t\tListSet<Entry<K, V>> listSet = new ListSet<Map.Entry<K,V>>();\n\t\tfor (K key : keys) {\n\t\t\t\n\t\t\tfor (Entry<K, V> entry : entrySet) {\n\t\t\t\tif (entry.getKey().equals(key)) {\n\t\t\t\t\tlistSet.add(entry);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn listSet;\n\t}",
"public void iterate() {\n\t\t// iterator\n\t\tQueue<NDLMapEntryNode<T>> nodes = new LinkedList<NDLMapEntryNode<T>>();\n\t\tnodes.add(rootNode);\n\t\twhile(!nodes.isEmpty()) {\n\t\t\t// iterate BFSwise\n\t\t\tNDLMapEntryNode<T> node = nodes.poll();\n\t\t\tif(node.end) {\n\t\t\t\t// end of entry, call processor\n\t\t\t\tif(keyProcessor != null) {\n\t\t\t\t\tkeyProcessor.process(node.data);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(node.keys != null) {\n\t\t\t\t// if available\n\t\t\t\tnodes.addAll(node.keys.values()); // next nodes to traverse\n\t\t\t}\n\t\t}\n\t}",
"Iterator<TrieEntry<T, U>> trieIterator();",
"public DelegatingMapIterator(MapIterator iter) {\n this.iter = iter;\n }",
"public Iterator<K> keys();",
"public Iterator<K> keys();",
"public Iterator<ArchiveEntry> getEnumerator ()\n\t{\n\t\treturn entries.values ().iterator ();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n public Iterator<Tuple<T>> iterator() {\n Iterator<Tuple<T>> fi = (Iterator<Tuple<T>>) new FilteredIterator<T>(resultTable.iterator(), filterOn);\r\n return fi;\r\n }",
"public static void main(String[] args) {\n\t\tMap<Integer, Integer> myMap = new HashMap<Integer, Integer>();\n\t\t\n\t\tmyMap.put(1, 5);\n\t\tmyMap.put(2, 4);\n\t\tmyMap.put(3, 3);\n\t\tmyMap.put(4, 2);\n\t\tmyMap.put(5, 1);\n\t\t\n\t\tIterator<Map.Entry<Integer, Integer>> iterator =myMap.entrySet().iterator();\n\t\t\n\t\twhile(iterator.hasNext()) {\n\t\t\tMap.Entry<Integer, Integer> entry =iterator.next();\n\t\t\tSystem.out.println(\"key : \"+entry.getKey()\n\t\t\t+\" value : \"+entry.getValue());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"-----------\");\n\t\t\n\t\tfor(Map.Entry<Integer, Integer> iteratoor : myMap.entrySet()) {\n\t\t\tSystem.out.println(iteratoor);\n\t\t}\n\t\t\n\t\tmyMap.forEach((k,v) -> System.out.println(k+\"-\"+v));\n\t}",
"public Set<Map.Entry<String, Collection<V>>> entrySet() {\n return map.entrySet();\n }",
"public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }",
"@Override\r\n public Iterator<KVPair<K, V>> iterator() {\n return new ChainedIterator<>(this.chains, load);\r\n }",
"@Override\r\n Iterator<E> iterator();",
"public Iterator<K> iterator()\n {\n return (new HashSet<K>(verts)).iterator();\n }",
"@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }",
"public Iterator<T> getIterator();",
"@Override\n\t@TimeComplexity(\"O(n)\")\n\tpublic Iterable<Entry<K, V>> entrySet() {\n\t/* TCJ\n\t * Iterates through potentially entire collection: O(n)\n\t */\n\t\treturn snapShot(0, null);\n\t}",
"public Iterator nodeIterator() { return nodes.keySet().iterator(); }",
"public Set<Map.Entry<K, V>> entrySet() {\n System.out.println(\"SimpleTreeMap.entrySet()\");\n return mMap.entrySet();\n }",
"@Override\n public Iterator<Range> iterator() {\n return iterator(defaultValueMapper);\n }",
"public Iterator<String> getDictionary() {\r\n return index.keySet().iterator();\r\n }",
"@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn new Iterator<E>() {\n\n\t\t\tprivate final Iterator<Map.Entry<Integer, String>> idsByQueuePosIterator = idsByQueuePosition.entrySet().iterator();\n\n\t\t\tprivate Integer currentPos = null;\n\t\t\tprivate String currentId = null;\n\n\t\t\t@Override\n\t\t\tpublic boolean hasNext() {\n\t\t\t\treturn idsByQueuePosIterator.hasNext();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic E next() {\n\t\t\t\tfinal Map.Entry<Integer, String> currEntry = idsByQueuePosIterator.next();\n\t\t\t\tcurrentPos = currEntry.getKey();\n\t\t\t\tcurrentId = currEntry.getValue();\n\t\t\t\treturn beansById.get(currentId);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void remove() {\n\t\t\t\tidsByQueuePosition.remove(currentPos);\n\t\t\t\tbeansById.remove(currentId);\n\t\t\t}\n\n\t\t};\n\t}",
"@Override\n @Nonnull Iterator<T> iterator();",
"public Iterator<V> Values(){\n\treturn new Iterator<V>() {\n\t int iteratorbucket = 0;\n\t Iterator<MyEntry> itr = table[iteratorbucket].iterator();\n\t int nextCount = 0;\n\n\t public boolean hasNext() {\n\t // can just check nextCount and size\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }\n\n\t public V next() {\n\t // if my hasNext() is false, I should throw a NoSuchElementException\n\t if(hasNext()==false) {\n\t \tthrow new NoSuchElementException();\n\t }\n\t // while itr.hasNext() is false, increment bucket and get the next iterator\n\t while(itr.hasNext()==false) {\n\t \titeratorbucket++;\n\t \titr=table[iteratorbucket].iterator();\n\t }\n\t // now increment nextCount and return the key from the item itr.next() returns\n\t \tnextCount++;\n\t \treturn itr.next().value;\n\t \n\t }\n\n\t public void remove() {\n\t // just ask itr to remove, but I need to update my size and nextCount\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }\n\t };\n }",
"public Iterator<K> getKeyIterator() \n { \n Iterator<K> myIterator = new KeyIterator(this);\n return myIterator; \n }",
"public Iterator<K> iterator()\n {\n\treturn (new HashSet<K>(verts)).iterator();\n }",
"public final Iterator<Entry<K, V>> mo7887a() {\n if (this.f6747g == null) {\n this.f6747g = this.f6748h.f6577g.entrySet().iterator();\n }\n return this.f6747g;\n }"
] | [
"0.7727087",
"0.7414552",
"0.7274912",
"0.72202855",
"0.71797335",
"0.71661496",
"0.711398",
"0.68959814",
"0.6852063",
"0.6817523",
"0.6726236",
"0.66636264",
"0.65793747",
"0.6566028",
"0.6541285",
"0.65288377",
"0.64466864",
"0.6415482",
"0.6396727",
"0.6371562",
"0.6356967",
"0.63085604",
"0.6296721",
"0.6241455",
"0.62410766",
"0.61545753",
"0.61101335",
"0.6097072",
"0.6088546",
"0.59880596",
"0.5973991",
"0.59388244",
"0.5924663",
"0.58991563",
"0.5887768",
"0.5887343",
"0.588128",
"0.5875615",
"0.5853668",
"0.5823472",
"0.58197063",
"0.5781573",
"0.5751956",
"0.57414114",
"0.57414114",
"0.57414114",
"0.57414114",
"0.57298344",
"0.5728366",
"0.5727451",
"0.5711582",
"0.5711582",
"0.5711582",
"0.57093424",
"0.56971806",
"0.567882",
"0.5676146",
"0.5676146",
"0.5655726",
"0.565492",
"0.5651693",
"0.5648606",
"0.5640768",
"0.56176704",
"0.5616188",
"0.56143",
"0.55988187",
"0.55797666",
"0.5575142",
"0.55644715",
"0.5547879",
"0.5547011",
"0.5532522",
"0.55216765",
"0.5515601",
"0.5502989",
"0.5492659",
"0.547331",
"0.547331",
"0.546556",
"0.5463368",
"0.54604596",
"0.5440081",
"0.5430749",
"0.5424385",
"0.54067856",
"0.54059863",
"0.54031223",
"0.53966516",
"0.53911966",
"0.53886753",
"0.53687835",
"0.536671",
"0.53501964",
"0.53272545",
"0.5323858",
"0.5321822",
"0.532135",
"0.5311338",
"0.53084826"
] | 0.6066071 | 29 |
Returns the number of entries in the map. | int size(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"public int size() {\n return map.size();\n }",
"public int size() {\n return map.size();\n }",
"public int size ()\n {\n return this.entryMap.size ();\n }",
"public final synchronized int size() {\n\t\treturn map.size();\n\t}",
"public int getNumElements() {\n return theMap.size();\n }",
"public int size() {\n\t\treturn map.size();\n\t}",
"public int getNumEntries ()\n\t{\n\t\treturn entries.size ();\n\t}",
"public int\tsize() {\n\t\treturn map.size();\n\t}",
"@Override\n public int size() {\n int count = 0;\n for (Counter c : map.values())\n count += c.value();\n return count;\n }",
"public int getNumEntries() {\n return entries.size();\n }",
"public int size() {\r\n return this.map.size();\r\n }",
"public int numberOfEntries();",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"@Override\n\tpublic int size() {\n\t\treturn map.size();\n\t}",
"public int getNumberOfEntries();",
"int getEntryCount();",
"@Override\n public int size() {\n return map.size();\n }",
"@Override\r\n public int size() {\r\n return map.size();\r\n }",
"public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}",
"public int mapCount(){\r\n\t\treturn this.mapCount;\r\n\t}",
"public int getNumEntries() {\n return numEntries;\n }",
"@Override\n\tpublic int size() \n\t{\n\t\treturn this.map.size();\n\t}",
"public int total_maps() {\r\n\t\tcheck( 1 );\r\n\r\n\t\treturn total_maps;\r\n\t}",
"public int countPoolMaps(){\n\n\t\treturn poolMaps.size();\n\t}",
"public int size()\r\n/* 106: */ {\r\n/* 107:194 */ assert (checkRep());\r\n/* 108:195 */ return this.map.keySet().size();\r\n/* 109: */ }",
"public int getEntryCount() {\n return entry_.size();\n }",
"public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}",
"public int size() {\n\t\treturn numEntries;\n\t}",
"public int getNumberOfEntries() ;",
"public int count( K key ) {\n Integer i = map.get( key );\n return i == null ? 0 : i;\n }",
"@Override\n public int getSize() {\n return map.size();\n }",
"public int size(){\r\n return cjtMap.size();\r\n }",
"public int getEntryCount() {\n return mem.getChar(34);\n }",
"public int sizeOfMap(){return size;}",
"public int getEntryCount() {\n if (entryBuilder_ == null) {\n return entry_.size();\n } else {\n return entryBuilder_.getCount();\n }\n }",
"public Integer size() { return this.entries.length(); }",
"public Integer getNumberOfEntries() {\n return this.numberOfEntries;\n }",
"public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}",
"public int size() {\n synchronized (cacheMap) {\n return cacheMap.size();\n }\n }",
"public int getCount(HashMap map) {\n\t\treturn GoodsManager.getCount(map);\n\t}",
"public int size()\n\t{\n\t\tint size = 0;\n\t\t\n\t\tfor (LinkedList<Entry> list : entries)\n\t\t\tsize += (list == null) ? 0 : list.size();\n\t\t\n\t\treturn size;\n\t}",
"public int getTotalMaps() {\r\n\t\treturn total_maps;\r\n\t}",
"@Override\n\tpublic int getSize() {\n\t\treturn numberOfEntries;\n\t}",
"public int count()\r\n {\r\n return this.classNameToJavaSourceFileMap.size();\r\n }",
"public int getSize() {\n return fEntries.length;\n }",
"static public int numberOfPersons() {\n return personMap.size();\n }",
"@Override\n\tpublic int count(HashMap<String, String> map) {\n\t\treturn dao.count(map);\n\t}",
"@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.G2_HASH_TABLE_NUMBER_OF_ENTRIES_);\n return ((Integer)retnValue).intValue ();\n }",
"int entryCount() {\n return settings.size();\n }",
"int entryCount() {\n return settings.size();\n }",
"public int getCount() {\n\t\t\treturn maplist2.size();\n\t\t}",
"public int getKeyCount() {\n return associationCountMap.size();\n }",
"public static int size() {\n\t\treturn anisLookup.size();\n\t}",
"public int getFieldCount()\n {\n return this.fieldMap.size();\n }",
"public static synchronized int size() {\n\t\treturn ClassRegistry.dictionary.size();\n\t}",
"public int getSize() \n { \n return numberOfEntries;\n }",
"public int getVertexCount() {\n return map.keySet().size();\n }",
"public int size() {\n return keys.length;\n }",
"public int size() \n\t{\n\t\treturn numKeys;\n\t}",
"public int getEntryCount() {\n return wordFrequency.size();\n }",
"@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}",
"public int size() {\n return configMap.size();\n }",
"public Map<String,Integer> getNumKeysMapping(){\n\t\treturn num_keys;\n\t}",
"public int size() {\r\n return numberOfKeys;\r\n }",
"@Override\r\n\tpublic int dataCount(Map<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"private int getVariablesNumberInMap() {\n\t\tSet<String> variables = KeyValue.getFirstLevelKeys();\n\t\tint count = 0;\n\t\tfor (String name : variables) {\n\t\t\tif (!name.contains(\"~\")) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"@Override\r\n\tpublic int listCount(Map<String, Object> map) throws SQLException {\n\t\treturn 0;\r\n\t}",
"public long numPostingEntries();",
"public int size() {\n int size = 0;\n\n Collection<CacheableObject> values = new HashSet<CacheableObject>();\n synchronized(theLock) {\n values.addAll(valueMap.values());\n }\n\n for (CacheableObject cObj : values) {\n if (! this.isExpired(cObj)) {\n size++;\n }\n }\n\n return size;\n }",
"public static int getSize(HashMap<Integer, String> students) {\n\t\treturn students.size();\n\t}",
"public int GetMapSize() {\n\t\treturn m_mapSize;\n\t}",
"public int size() {\n if (hasKeys) {\n return keys.size();\n } else {\n return objects.size();\n }\n }",
"public int getMapSize() {\n return mapSize;\n }",
"int getWordCount() {\r\n return entrySet.size();\r\n }",
"@Override\r\n\tpublic int size() {\r\n\t\treturn keySet().size();\r\n\t}",
"public int size() {\n\t\treturn this.articleIdToReferenceIdMap.size();\r\n\t}",
"public int sizeOfMappingFieldsArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(MAPPINGFIELDS$28);\n }\n }",
"public static int size() \r\n\t{\r\n\t\treturn m_count;\r\n }",
"public int size()\r\n\t{\r\n\t\treturn _tiles.size();\r\n\t}",
"public int size() {\r\n\t\treturn cache.size();\r\n\t}",
"@Override\r\n\tpublic int size() {\n\t\treturn keys.size();\r\n\t}",
"int getMapEntrySize() {\n if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {\n return 1;\n }\n if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME && frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {\n return 1 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {\n return 3 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX || frameType == Const.SAME_FRAME_EXTENDED) {\n return 3;\n }\n if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {\n int len = 3;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n return len;\n }\n if (frameType != Const.FULL_FRAME) {\n throw new IllegalStateException(\"Invalid StackMap frameType: \" + frameType);\n }\n int len = 7;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n for (final StackMapType typesOfStackItem : typesOfStackItems) {\n len += typesOfStackItem.hasIndex() ? 3 : 1;\n }\n return len;\n }",
"public int pageCount(Map map) {\n\t\treturn iSBookMapper.pageCount(map);\n\t}",
"public int sizeOfTypekeyArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TYPEKEY$16);\r\n }\r\n }",
"public int size()\r\n\t{\r\n\t\treturn count;\r\n\t}",
"@Override\n public int size() {\n return numKeys;\n }",
"public int getNumMarkers() {\n if ( dofs == null ) return 0;\n return dofs[0].length/3;\n }",
"@Override\n public int size() {\n return numKeys;\n }",
"private int lineCount() throws IOException\n {\n //This integer will hold the amount of lines\n int lines = 0;\n\n //Create a temporary scanner to iterate through the map file\n Scanner lineCounter = new Scanner(new File(mapFile));\n\n //Iterate through the map file and increment the counter per each line\n while(lineCounter.hasNextLine())\n {\n lineCounter.nextLine();\n lines++;\n //System.out.println(\"I am at line\" + lines);\n }\n \n //Close lineCounter\n lineCounter.close();\n\n //Spit out the amount of lines\n return lines;\n }",
"public int size() {\n return cache.size();\n }",
"Integer countForKey(String key);",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size() {\n\t\treturn count;\n\t}",
"public int size()\r\n {\r\n return count;\r\n }",
"int sizeOfKeyArray();",
"private int numNodes()\r\n\t{\r\n\t return nodeMap.size();\r\n\t}",
"public int size() {\n int size = 0;\n for (Map<Number160, PeerStatistic> map : peerMapVerified) {\n synchronized (map) {\n size += map.size();\n }\n }\n return size;\n }",
"public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}",
"@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}"
] | [
"0.8425707",
"0.8391447",
"0.8380929",
"0.83674085",
"0.83539987",
"0.83522856",
"0.8339907",
"0.8241287",
"0.8237898",
"0.81736165",
"0.8166124",
"0.81323403",
"0.8122009",
"0.8116481",
"0.8109883",
"0.8093662",
"0.80666155",
"0.80006766",
"0.7983986",
"0.7940761",
"0.7901532",
"0.7897115",
"0.78886163",
"0.7852166",
"0.784545",
"0.7844652",
"0.7797703",
"0.77778506",
"0.77575463",
"0.77507836",
"0.77467847",
"0.77141386",
"0.77125096",
"0.76320857",
"0.76186705",
"0.7574207",
"0.75538576",
"0.75349265",
"0.75222796",
"0.75090885",
"0.742662",
"0.74089766",
"0.72664565",
"0.7237441",
"0.72186613",
"0.7214694",
"0.7211168",
"0.7200854",
"0.7180482",
"0.7175919",
"0.7175919",
"0.7137317",
"0.7135509",
"0.71180516",
"0.7117714",
"0.7098515",
"0.7095429",
"0.7093788",
"0.70405215",
"0.70358247",
"0.7017114",
"0.69929695",
"0.6992529",
"0.6970011",
"0.696415",
"0.6963951",
"0.69637406",
"0.69568825",
"0.6898089",
"0.6868409",
"0.6867381",
"0.6860832",
"0.6859967",
"0.6856053",
"0.6851492",
"0.6850278",
"0.68488276",
"0.6830931",
"0.6820025",
"0.6819601",
"0.67841595",
"0.67829394",
"0.67809296",
"0.6774793",
"0.6747247",
"0.67381483",
"0.67128605",
"0.67026824",
"0.66983455",
"0.66969794",
"0.6696574",
"0.6695307",
"0.6693848",
"0.6693848",
"0.6693848",
"0.6689777",
"0.6687305",
"0.6686014",
"0.66829795",
"0.6673998",
"0.66729033"
] | 0.0 | -1 |
This Method will Add the Product to Wishlist | public boolean addProductToWishlist(String productId) throws WishListException {
// TODO Auto-generated method stub
boolean result=false;
if(ProductRepository.productList.get(productId) != null)
{ if(WishlistDaoImpl.wlist.containsKey(productId))
{
throw new WishListException("WishList already contain this PRODUCT");
}
else {
result=WishlistDaoImplObj.addProductToWishlist(productId);
return result;
}
}
else
{
throw new WishListException("Product ID not Found in Product List to Add in WishList\n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addToWish( String product_id, String product_name,String product_brand, String product_img,\n String product_price,String product_desc, String product_discount, String product_varieties )\n {\n boolean isAdded = mDatabaseFavorite.insert(product_id, product_name,product_brand, product_img,\n product_price,product_discount);\n\n if (isAdded == true)\n {\n Toast.makeText(DetailActivity.this,\"Added to Favorite\",Toast.LENGTH_SHORT).show();\n\n }\n\n else {\n\n Toast.makeText(DetailActivity.this,\"Already present in favoriteList\",Toast.LENGTH_SHORT).show();\n\n }\n\n }",
"public void addProductToWishlist(Product product, long accountId) {\n wishlistService.addProduct(product, accountId);\n }",
"public void addProduct(Product product);",
"public void addProduct(Product p){\n stock.add(p);\n }",
"@Override\n\tpublic WishList addProductToWishList(List<String> productName, Long userId) {\n\t\tList<Product> allProduct = productDAO.getallProduct();\n\t\t\n\t\t\n\t\t\n\t\tfor(String p : productName) {\n\t\t\tProduct product = productDAO.getProductByName(p).get(0);\n\t\t\t\n\t\t\t\n\t\t\tif(allProduct.contains(p)) {\n\t\t\t\tUserDetail user = userDetailDAO.getUserById(userId).get(0);\n\t\t\t\tif(user.getWishList().getProducts().contains(p)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tWishList wishList = new WishList();\n\t\t\t\t\tList<Product> prod = new ArrayList<>();\n\t\t\t\t\tprod.add(product);\n\t\t\t\t\twishList.setProducts(prod);\n\t\t\t\t\tuser.setWishList(wishList);\n\t\t\t\t\tuserDetailDAO.save(user);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn userDetailDAO.getUserById(userId).get(0).getWishList();\n\t}",
"public boolean insertWishlist(ProductDetail productDetail) {\n\n db = helper.getWritableDatabase();\n ContentValues v = new ContentValues();\n v.put(DatabaseConstant.TABLE_WISHLIST_ID, productDetail.getId());\n v.put(DatabaseConstant.TABLE_WISHLIST_TITLE, productDetail.getTitle());\n v.put(DatabaseConstant.TABLE_WISHLIST_PRICE, productDetail.getPrice());\n v.put(DatabaseConstant.TABLE_WISHLIST_ORDER_QUANTITY, productDetail.getOrder_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY_TYPE, productDetail.getQuantity_type());\n v.put(DatabaseConstant.TABLE_WISHLIST_MIN_QUAITITY, productDetail.getMin_quantity());\n v.put(DatabaseConstant.TABLE_WISHLIST_AVAILABILITY, productDetail.getAvailability());\n v.put(DatabaseConstant.TABLE_WISHLIST_DISCOUNT, productDetail.getDiscount());\n v.put(DatabaseConstant.TABLE_WISHLIST_IMAGE, productDetail.getImage());\n v.put(DatabaseConstant.TABLE_WISHLIST_RATING, productDetail.getRating());\n v.put(DatabaseConstant.TABLE_WISHLIST_DESCRIPTION, productDetail.getDescription());\n v.put(DatabaseConstant.TABLE_WISHLIST_TYPE, productDetail.getType());\n v.put(DatabaseConstant.TABLE_WISHLIST_QUANTITY, productDetail.getQuantity());\n long isCheck = db.insert(DatabaseConstant.TABLE_NAME_WISHLIST, null, v);\n if (isCheck > 0) {\n return true;\n } else {\n return false;\n }\n }",
"void addProduct(Product product);",
"public void Addproduct(Product objproduct) {\n\t\t\n\t}",
"Product addNewProductInStore(Product newProduct);",
"public void addProduct(Product item)\n {\n stock.add(item);\n }",
"public void createWishlist(Customer customer, Product product) {\n wishlistService.createWishlist(customerRepository.findByID(customer.getAccountID()), product);\n }",
"public void addProduct() {\n Product result;\n String prodName = getToken(\"Enter product name: \");\n double price = getDouble(\"Enter price per unit: $\");\n result = warehouse.addProduct(prodName, price);\n if (result != null) {\n System.out.println(result);\n }\n else {\n System.out.println(\"Product could not be added.\");\n }\n }",
"public void addProduct(Product p) {\n c.addProduct(p);\n }",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public void addProduct(Product product) {\n allProducts.add(product);\n }",
"private void getWishListInfo(final long productId) {\n User user = SettingsMy.getActiveUser();\n if (user != null) {\n // determine if product is in wishlist\n //String wishlistUrl = String.format(EndPoints.WISHLIST_IS_IN_WISHLIST, SettingsMy.getActualNonNullShop(getActivity()).getId(), productId);\n String wishlistUrl = String.format(EndPoints.WISHLIST);\n GsonRequest<WishlistResponse> getWishlistInfo = new GsonRequest<WishlistResponse>(Request.Method.GET, wishlistUrl, null, WishlistResponse.class, new Response.Listener<WishlistResponse>() {\n @Override\n public void onResponse(@NonNull WishlistResponse response) {\n if(response != null) {\n if(response.getStatusText() != null && response.getStatusCode() != null) {\n if (response.getStatusCode().toLowerCase().equals(CONST.RESPONSE_CODE) || response.getStatusText().toLowerCase().equals(CONST.RESPONSE_UNAUTHORIZED)) {\n LoginDialogFragment.logoutUser(true);\n DialogFragment loginExpiredDialogFragment = new LoginExpiredDialogFragment();\n loginExpiredDialogFragment.show(getFragmentManager(), LoginExpiredDialogFragment.class.getSimpleName());\n }\n }\n else\n prepareWishListButton(response, productId);\n }\n else\n Timber.d(\"returned null response during getWishListInfo\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n MsgUtils.logAndShowErrorMessage(getActivity(), error);\n }\n }, getFragmentManager(), \"\");\n getWishlistInfo.setRetryPolicy(MyApplication.getDefaultRetryPolice());\n getWishlistInfo.setShouldCache(false);\n MyApplication.getInstance().addToRequestQueue(getWishlistInfo, CONST.PRODUCT_REQUESTS_TAG);\n }\n }",
"public void addProduct(Product pProduct)\n\t{\n\t\tmyProductInventory.add(pProduct);\n\n\n\t}",
"public void addToBasket(Product product){\n\n Purchaseitem purchaseitem = new Purchaseitem();\n purchaseitem.setProduct(product.getId());\n purchaseitem.setProductByProduct(product);\n boolean toAdd = false;\n if(basket.isEmpty()){\n purchaseitem.setQuantity(1);\n basket.add(purchaseitem);\n }else {\n for(int i = 0; i < basket.size(); i++){\n if(basket.get(i).getProduct() == product.getId()){\n basket.get(i).setQuantity(basket.get(i).getQuantity() + 1);\n return;\n } else {\n purchaseitem.setQuantity(1);\n toAdd = true;\n }\n }\n }\n if(toAdd){\n basket.add(purchaseitem);\n }\n }",
"public void addProductToList(Product aProduct){\n listOfProduct.add(aProduct);\n }",
"private void addProduct()\n {\n System.out.println(\"|➕| Add new Product:\\n\");\n System.out.println(\"|➕| Enter ID\\n\");\n int id = Integer.parseInt(reader.getInput());\n System.out.println(\"|➕| Enter Name\\n\");\n String name = reader.getInput();\n manager.addProduct(id, name);\n }",
"public void addProduct(Product p) {\n\t\tthis.productList.add(p);\n\t}",
"public void addProduct(Product product){\n // Adding new contact\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_PRODUCT_NAME, product.getName_product());\n values.put(IS_STRIKE_OUT, product.IsStrikeout());\n values.put(KEY_UUID_PRODUCT_NAME, String.valueOf(product.getId()));\n\n\n // Inserting Row\n db.insert(TABLE_PRODUCTS, null, values);\n Log.d(LOG_TAG_ERROR, \"addProduct OK \" + \" \" + product.getName_product() + \" \" + product.getId());\n\n db.close(); // Closing database connection\n }",
"public addproduct() {\n\t\tsuper();\n\t}",
"public void addProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n\n values.put(ShoppingListTable.KEY_TPNB, product.getTPNB());\n values.put(ShoppingListTable.KEY_NAME, product.getName());\n values.put(ShoppingListTable.KEY_DESCRIPTION, product.getDescription());\n values.put(ShoppingListTable.KEY_COST, product.getCost());\n values.put(ShoppingListTable.KEY_QUANTITY, product.getQuantity());\n values.put(ShoppingListTable.KEY_SUPER_DEPARTMENT, product.getSuperDepartment());\n values.put(ShoppingListTable.KEY_DEPARTMENT, product.getDepartment());\n values.put(ShoppingListTable.KEY_IMAGE_URL, product.getImageURL());\n values.put(ShoppingListTable.KEY_CHECKED, product.isChecked());\n values.put(ShoppingListTable.KEY_AMOUNT, product.getAmount());\n values.put(ShoppingListTable.KEY_POSITION, product.getAmount());\n\n db.insert(ShoppingListTable.TABLE_NAME, null, values);\n\n db.close();\n }",
"public void insertIntoProduct() {\n\t\ttry {\n\t\t\tPreparedStatement statement = connect.prepareStatement(addProduct);\n\t\t\tstatement.setString(1, productName);\n\t\t\tstatement.setString(2, quantity);\n\t\t\t\n\t\t\tstatement.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public void addProductToBuyBasket(Product product, int count) {\n if (buyBasket.containsKey(product.getId()))\n buyBasket.replace(product.getId(), buyBasket.get(product.getId() + count));\n else\n buyBasket.put(product.getId(), count);\n }",
"@Override\n\tpublic boolean addProduct(Product p) {\n\t\treturn false;\n\t}",
"public void addWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).set(wishItem).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n }\n });\n }",
"public void addProduct(Product newProduct) {\n System.out.println(\"addProduct(): \" + newProduct.getName());\n allProducts.add(newProduct);\n }",
"public HashMap<String, ProductDTO> displayProductInWishlist() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\treturn WishlistDaoImpl.wlist ;\n\t}",
"public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }",
"@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }",
"public void addProductToBuyBasket(int productId, int count) {\n if (buyBasket.containsKey(productId))\n buyBasket.replace(productId, buyBasket.get(productId + count));\n else\n buyBasket.put(productId, count);\n }",
"public void addProduct(String c, String p){\n\t\ttry {\n\t\t\tif(!hasProduct(c, p)){\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().add(p);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Customer\" + c + \"is not in the datavase.\");\n\t\t}\n\t}",
"public void rbListAddElement() {\n rbProductType.clear();\n rbProductType.add(rbScs);\n rbProductType.add(rbSko);\n rbProductType.add(rbMko);\n rbProductType.add(rbZko);\n }",
"ProductView addProduct(ProductBinding productToAdd) throws ProductException;",
"public static void addProduct(Product newProduct) {\n allProducts.add(newProduct);\n }",
"public long addProductShoppingList(String name, int quality, double quantity, String unit) {\n long pid = addNewProduct(name);\n Cursor c = null;\n\n SQLiteDatabase db = DBHelper.getWritableDatabase();\n if (pid == -1) {\n\n String[] args = new String[1];\n args[0] = name;\n c = db.rawQuery(\"SELECT * FROM Products WHERE pname=?\", args);\n c.moveToFirst();\n while (!c.isAfterLast()) {\n pid=c.getInt(c.getColumnIndex(\"_id\"));\n c.moveToNext();\n }\n }\n ContentValues cv = new ContentValues();\n cv.put(DBHelper.SHOPPINGLIST_PID, (int) pid);\n cv.put(DBHelper.SHOPPINGLIST_QUALITY, quality);\n cv.put(DBHelper.SHOPPINGLIST_QUANTITY, quantity);\n cv.put(DBHelper.SHOPPINGLIST_UNIT, unit);\n\n long _id = db.insert(DBHelper.TABLE_SHOPPINGLIST, null, cv);\n\n if (_id > 0) {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: _id:\" + String.valueOf(_id) + \", pid:\" + String.valueOf(pid) + \", pname:\" + name);\n } else {\n Log.d(DatabaseHelper.class.getName(), \"AddProductShoppingList: pname:'\" + name + \"', But already in ShoppingList table.\");\n }\n db.close();\n return _id;\n }",
"public void add(Product product) {\r\n sessionFactory.getCurrentSession()\r\n .save(product);\r\n }",
"public static void addProduct(Product product){\r\n \r\n System.out.println(\"Adding Product \" + product.getProductName());\r\n productInvMap.put(productInvMap.size(),product);\r\n }",
"public void addProduct(Product item){\n inventory.add(item);\n }",
"private void save_to_wishlist(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\t\n\t\tSystem.out.println(\"inside save to wishlist\");\n\t\tString cart_type = request.getParameter(\"cart_type\");\n\t\tSystem.out.println(cart_type);\n\t\tString quantity[] = request.getParameterValues(\"qty_name\");\n\t\tList lqty = new ArrayList();\n\t\tfor(int i=0;i<quantity.length;i++)\n\t\t{\n\t\t\tSystem.out.println(quantity[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tUaddToCartMstVO mstVO = new UaddToCartMstVO();\n\t\tSystem.out.println(\"cart typw3333333333333333333333333333333\"+cart_type);\n\t\tmstVO.setCart_type(cart_type);\n\t\t\n\t\tHttpSession hs = request.getSession();\n\t\tint user_id=Integer.parseInt(hs.getAttribute(\"userID\").toString());\n\t\tSystem.out.println(\"User............\"+user_id);\n\t\t\n\t\tUaddToCartDAO addCartDAO;\n\t\taddCartDAO=new UaddToCartDAO();\n\n\t\tint BuyerregId = -1;\n\t\tloginVO logVo=new loginVO();\n\t\tlogVo.setLogin_id(user_id);\n\t\tList luser=addCartDAO.search_user_id(logVo);\n\t\tif(luser!=null && luser.size()>0)\n\t\t{\n\t\t\tUregistrationVO regVo=(UregistrationVO)luser.get(0);\n\t\t\tBuyerregId=regVo.getBuyer_user_id();\n\t\t\tSystem.out.println(\"Buyer user Id======================================================\"+BuyerregId);\n\t\t}\n\t\t\n\t\tUregistrationVO regVo=new UregistrationVO();\n\t\tregVo.setBuyer_user_id(BuyerregId);\n\t\t//System.out.println(\"User login id....\"+ regVo.getLoginVoObj().getLogin_id());\n\t\t\n\t\tmstVO.setBuyer_user_id(regVo);\n\t\t\n\t\t\t\t\n\t\taddCartDAO.save_to_wishlist(mstVO);\n\t\t\n\t\tSystem.out.println(\"--------------------------------------------------child Data insertion---------------------------------\");\n\t\t\n\t\t\n\t\tList l= (List)hs.getAttribute(\"product_data_wishlist\");\n\t\t\n\t\tSystem.out.println(\"LIST value::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"+l.toString());\n\t\t\n\t\t\n\t\tUaddToCartVO addCartVO[]=new UaddToCartVO[l.size()];\n\t\t\n\t\tUaddToCartVO temp=new UaddToCartVO();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<l.size();i++)\n\t\t{\n\t\t\t\n\t\t\ttemp=(UaddToCartVO)l.get(i);\n\t\t\taddCartVO[i]=new UaddToCartVO();\n\t\t\taddCartVO[i].setCloth_id(temp.getCloth_id());\n\t\t\taddCartVO[i].setColor_code(temp.getColor_code());\n\t\t\taddCartVO[i].setPrice(temp.getPrice());\n\t\t\taddCartVO[i].setProduct_name(temp.getProduct_name());\n\t\t\taddCartVO[i].setSize(temp.getSize());\n\t\t\taddCartVO[i].setQuantity(Integer.parseInt(quantity[i]));\n\t\t\taddCartVO[i].setDesigner_user_id(temp.getDesigner_user_id());\n\t\t\taddCartVO[i].setCartMstVOObj(mstVO);\n\t\t\taddCartDAO.save_to_cart(addCartVO[i]);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*String type=mstVO.getCart_type();\n\t\tint userId=((UregistrationVO)mstVO.getBuyer_user_id()).getBuyer_user_id();\n\t\t\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"TYPE value is ::::::::::::::\"+type);\n\t\tSystem.out.println(\"USERID value is ::::::::::::::\"+userId);\n\n\t\tSystem.out.println(\"---------------------------------------------------------------------------------------------------------------\");\n\t\t\n*/\t\t\n\t\tresponse.sendRedirect(request.getContextPath()+\"/user/add_to_wishlist.jsp\");\n\t}",
"public void addProduct(CartProduct p) throws InsufficientQuantityException {\n\t\tfor (CartProduct product : Admin.products) {\n\t\t\tif (product.getDescription().equals(p.getDescription()) && (product.getQuantity() >= 1)) {\n\t\t\t\tcart.addToCart(p);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tthrow new InsufficientQuantityException(\"Out of Stock\");\n\t\t\t}\n\t\t}\n\t}",
"public void productsToBuy(Product purchase){\n bill.getProducts().add(purchase);\n }",
"public boolean addProductToBasket(Product product, Order order) {\n \tint quantity = orderService.getQuanity(product);\n \treturn orderService.addProductToBasket(order, product, quantity);\n }",
"public boolean addProduct(Product p) {\n// products.add(p);\n boolean prodExists = false;\n for(Product prod: products){\n if(prod.getId() == p.getId()){\n prodExists = true;\n break;\n }\n }\n if(!prodExists){\n products.add(p);\n return true;\n }\n return false;\n }",
"public void insert(Product product) {\n this.products.add(product);\n }",
"Product addOneProduct(String name, String imgNameBarcode, String imgName, String barcode) throws Exception;",
"public synchronized void addItem(Product product){\n \n ShoppingCartItem item = carrito.get(product.getId());\n int new_quantity;\n \n if(item==null){\n carrito.set(product.getId(), new ShoppingCartItem(product));\n new_quantity = 1;\n }else{\n new_quantity = item.getQuantity()+1;\n }\n //even if it's added or not, we call update method to update the quantity of the product\n this.update(product,Integer.toString(new_quantity));\n }",
"@Override\r\n\tpublic boolean addProduct(Product product) {\n\t\treturn dao.addProduct(product);\r\n\t}",
"public void buyProduct(String productName) throws ProductNotFoundException {\r\n\r\n if (doesRecentOrderExist(productName)) {\r\n reorderProduct(productName);\r\n } else {\r\n //Create a new order to be given to the WebMarket\r\n Order newOrder = new Order(this, productName, \"buy\", \"pending\");\r\n\r\n //Acknowlegement print statment\r\n System.out.println(\"CUSTOMER: Request NEW purchase of - \" + newOrder.getProductName());\r\n\r\n //Send the order to WebMarket via placeNewOrder()\r\n market.placeNewOrder(newOrder);\r\n\r\n //Add this order to the customers personel list of orders\r\n orderHistory.add(newOrder);\r\n }\r\n }",
"public void addProduct(MarketObject<?> product) throws IllegalStateException{\n\t\tPlayer sellingPlayer=game.getCurrentPlayer();\n\n\t\tif(product.getObject().getClass().getSuperclass().equals(PoliticsCard.class))\n\t\t\tif(sellingPlayer.getCardsOwned().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getCardsOwned().remove((PoliticsCard)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+PoliticsCard.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\telse if(product.getObject().getClass().equals(Assistant.class))\n\t\t\tif(sellingPlayer.checkAssistants(((Assistant)product.getObject()).getNumber()))\n\t\t\t\tthis.products.add(product);\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+Assistant.class.getSimpleName()+\n\t\t\t\t\t\t\". You own just \"+sellingPlayer.getAssistants()+\" \"+Assistant.class.getSimpleName());\n\t\telse if(product.getObject().getClass().equals(BuildingPermit.class))\n\t\t\tif(sellingPlayer.getAllPermits().contains(product.getObject()))\n\t\t\t{\n\t\t\t\tsellingPlayer.getBuildingPermits().remove((BuildingPermit)product.getObject());\n\t\t\t\tthis.products.add(product);\n\t\t\t}\n\t\t\telse \n\t\t\t\tthrow new IllegalStateException(\"Impossible to add \"+BuildingPermit.class.getSimpleName()+\n\t\t\t\t\t\t\". You don't own one.\");\n\t\tgame.notifyObservers(new ModelChange(game));\n\t}",
"@Override\n\tpublic boolean addProduct(Products productInfoBean) {\n\t\treturn dao.addProduct(productInfoBean);\n\t}",
"public void addItem(Product p) {\n\t\t_items.add(p);\n\t}",
"public void add(int index){\n int i = 0;\n boolean isFound = false;\n for (Product product:inventory.getProducts().keySet())\n {\n i++;\n if (i == index && inventory.getProducts().get(product) > 0)\n {\n if (myBasket.containsKey(product))\n {\n System.out.println(\"One more of this product added.\");\n myBasket.replace(product , myBasket.get(product) + 1);\n }\n else {\n System.out.println(\"Product added to your basket.\");\n myBasket.put(product , 1);\n }\n totalCost = totalCost + product.getPrice();\n isFound = true;\n inventory.updateStock(product , '-');\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index or not enough product in stock!\");\n }",
"public void addProduct(String product, int quantity) {\n if (shoppingBasket.containsKey(product) != true) {\n shoppingBasket.put(product, quantity);\n } else {\n shoppingBasket.put(product, shoppingBasket.get(product) + quantity);\n }\n }",
"@FXML\r\n\tpublic void addToShoppingCart() {\r\n\t\t\r\n\t\tWatch w = listView.getSelectionModel().getSelectedItem();\r\n\t\tboolean add = controller.addWatchToShoppingCart(w);\r\n\t\tcontroller.deleteWishlistItem(w.getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t\tcheckSelected();\r\n\t}",
"public void addProduct(Product toAdd) {\n\t\tthis.products.add(toAdd);\n\t}",
"@Override\n public void onClick(View view) {\n String name = getResources().getString(R.string.stock_shopping_list) + \": \" + productList.getName();\n StockShoppingList stockShoppingList = ((Stock)productList).generateShoppingList(name);\n StockShoppingListDao dao = new StockShoppingListDao(getDaoProductList().getBDConnection());\n if(((Stock)productList).getAssociatedListId() != -1) {\n // Si ya tiene una lista de la compra asociada la eliminamos para crear la nueva\n stockShoppingList.setID(((Stock) productList).getAssociatedListId());\n dao.remove(stockShoppingList);\n }\n int shoppingListId = dao.insert(stockShoppingList);\n\n // Actualizamos el id del stock\n ((Stock) productList).setAssociatedListId(shoppingListId);\n getDaoProductList().update((Stock)productList);\n\n // Mostramos un mensaje de exito\n Toast.makeText(getContext(),String.format(getResources().getString(R.string.info_msg_stock_shopping_list_created),name),Toast.LENGTH_LONG).show();\n }",
"@Override\n\tpublic void add(Entity entity) throws Exception {\n\t\tsuper.add(entity);\n\t\tProduct prod = (Product) entity;\n\n\t\tSQLiteStatement st = db\n\t\t\t\t.prepare(\"INSERT INTO products(sessionID, name, priceMin, priceMax, quantity, category)\"\n\t\t\t\t\t\t+\"VALUES (?, ?, ?, ?, ?, ?)\");\n\t\tst.bind(1, sessionId).bind(2, prod.getName()).bind(3, prod.getPriceMin())\n\t\t\t\t.bind(4, prod.getPriceMin()).bind(5, prod.getQuantity())\n\t\t\t\t.bind(6, prod.getCategory());\n\t\tst.step();\n\t\ttotalQuantity += prod.quantity;\n\t\tif (!categoryList.containsKey(prod.getCategory())) {\n\t\t\tcategoryList.put(prod.getCategory(), new ArrayList<Product>());\n\t\t}\n\t\tcategoryList.get(prod.getCategory()).add(prod);\n\t\tif (availableProducts.get(entity.getName())==null) {\n\t\t\tavailableProducts.put(entity.getName(), \" \");\n\t\t}\n\t}",
"public void addProduct(Product p) {\n\t\t\n\t\tString manufacturer = p.getManufacturer().toLowerCase();\n\t\t\n\t\tSet<Product> productsForThisManufacturer = productsByManufacturer.get(manufacturer);\n\t\t\n\t\tif (productsForThisManufacturer == null) {\n\t\t\tproductsForThisManufacturer = new HashSet<Product>();\n\t\t\tproductsByManufacturer.put(manufacturer, productsForThisManufacturer);\n\t\t}\n\t\t\n\t\tproductsForThisManufacturer.add(p);\n\n\t}",
"public void addProduct(Product p) {\n if(products.size() != 0 && products.get(0).getPricingDetails().equals(p.getPricingDetails()))\n return;\n\n products.add(p);\n quantity++;\n price = price.add(p.getPricingDetails());\n }",
"public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }",
"@RequestMapping(\n method = RequestMethod.POST,\n consumes = MediaType.APPLICATION_JSON_VALUE,\n path = \"{productId}\"\n )\n public void addProductToShoppingCart(@PathVariable(\"productId\") UUID productId){\n shoppingCartService.insertProduct(productId);\n }",
"@FXML void but_AddProduct(ActionEvent event) {\n\n productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(),\n choiceType.getValue())); //Adding test product in observable list\n\n productTable.setItems(productLine); //Adds product to table\n listProduce.setItems(productLine); //Adds product to produce list\n\n addToDatabaseProduct();\n\n System.out.println(\"Product added\");\n }",
"public boolean addProduct(Product product) {\n\t\treturn false;\n\t}",
"public String addProduct() throws Exception {\r\n\t\t\r\n\t\t//content spot entity\r\n\t\tSpotBean spotBean = new SpotBean();\r\n\t\tspotBean.setId(this.getContentSpot().getId());\r\n\t\tspotBean = contentSpotService.load(spotBean);\r\n\t\t\r\n\t\t//main content spot\r\n\t\tContentSpot content = spotBean.getContentSpot();\r\n\t\tthis.products = content.getProducts();\r\n\r\n\t\t//configure products list attribute\r\n\t\tcontent.setProducts(extractProducts());\r\n\t\t\r\n\t\treturn update(spotBean);\r\n\t}",
"@PostMapping(\"/addproduct\")\n\t\tpublic ResponseEntity<List<Product>> insertProduct(@RequestBody Product product) {\n\t\t\tlogger.info(\"product inserted\");\n\t\t\tList<Product> sq = productService.saveProduct(product);\n\n\t\t\treturn new ResponseEntity<List<Product>>(sq, HttpStatus.OK);\n\t\t}",
"public void add(Product product) {\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_NAME, product.getName());\n values.put(KEY_URL, product.getURL());\n values.put(KEY_CURRENT, product.getCurrentPrice());\n values.put(KEY_CHANGE, product.getChange());\n values.put(KEY_DATE, product.getDate());\n values.put(KEY_INITIAL, product.getInitialPrice());\n long id = database.insert(PRODUCT_TABLE, null, values);\n product.setId((int) id);\n database.close();\n }",
"public void saveNewProduct(Product product) throws BackendException;",
"@Override\n public void onAddToCart(Product product) {\n }",
"public void addProduct(Product product) {\n int newQuantity = product.getQuantity();\n try {\n Product productInCart = getProductInCartCorrespondentTo(product);\n int previousQuantity = productInCart.getQuantity();\n productInCart.setQuantity(newQuantity + previousQuantity);\n this.amount += newQuantity * product.getPrice();\n } catch (NoSuchProductException e) {\n // the product isn't already in the list -> add it\n int index;\n try {\n index = getCategoryIndex(product.getCategory().name());\n } catch (NoSuchCategoryException e2) {\n index = categoryNames.indexOf(Category.OTHER.name());\n }\n shoppingCart.get(index).add(product);\n float price = product.getPrice() * newQuantity;\n this.amount += price;\n }\n for (int i = 0; i < newQuantity; i ++)\n lastProductList.add(product);\n }",
"@Override\n public void onClick(View v) {\n if (productName.getText().toString().isEmpty()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.need_product_name), Toast.LENGTH_SHORT).show();\n //add product\n } else if (productQuantity.getText().toString().isEmpty()) {\n // add with capitalized name\n productList.add(new Product(WordUtils.capitalize(productName.getText().toString())));\n //update user\n user.setShoppingLists(shoppingLists);\n dataController.saveUser(user);\n } else if (!productQuantity.getText().toString().isEmpty()) {\n productList.add(new Product(WordUtils.capitalize(productName.getText().toString()), Integer.parseInt(productQuantity.getText().toString()), quantityType.getSelectedItemPosition()));\n //update user\n user.setShoppingLists(shoppingLists);\n dataController.saveUser(user);\n }\n //update list\n adapter.notifyDataSetChanged();\n //close dialog\n dialog.dismiss();\n }",
"public CategoryIPhone AddProductToCartAndContinue(String strProductName)\n\t{\n\t\t\n\t\twaittillResultload(\".//*[@name='\"+strProductName+\"']/div[2]/div/span/input\", \"xpath\");\n\t\t\n\t\tinputAddToCart.click();\n\t\t\n\t\twaittillResultload(\".continue_shopping\", \"css\");\n\t\t\n\t\tbuttonContinueShopping.click();\n\t\t\n\t\treturn this;\n\t\t\n\t}",
"@Override\n\tpublic void addProduct(ProductEntity product)\n\t{\n\t\tsave(product);\n\t\tlogger.debug(\"The user added is \" + product.getProductUuid());\n\t}",
"@Then(\"I click on Add to WishList button for the Leica T Mirrorless Digital camara product.\")\n public void i_click_on_add_to_wish_list_button_for_the_leica_t_mirrorless_digital_camara_product() {\n BasePage.driverUtils.waitForWebElementToBeClickable(BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton());\n BasePage.leicaTMirrorlessDigitalCamPage.getLeicaTMirrorlessCamAddToWishListButton().click();\n }",
"public static ArrayList<Product> addProduct() {\r\n\r\n\t\tboolean proDiscontinued = false;\r\n\t\tboolean proInStock = false;\r\n\t\tint proQtyAvailable = 0;\r\n\r\n\t\tArrayList<Product> newProductArray = new ArrayList<Product>();\r\n\r\n\t\tSystem.out.println(\"---Product details---\");\r\n\r\n\t\tRandom proCodeRandom = new Random();\t\t\t\t\t\t\t\r\n\t\tint proCode = proCodeRandom.nextInt(100);\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the make of the product:\");\t\t\r\n\r\n\t\tString proMake = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the model of the product:\");\r\n\r\n\t\tString proModel = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tSystem.out.println(\"Please enter the price of the product:\");\r\n\t\tdouble proPrice = Validation.doubleValidation();\r\n\r\n\t\tSystem.out.println(\"Is the product discontinued? y/n \");\r\n\r\n\t\tString answer = Validation.stringNoIntsValidation();\r\n\r\n\r\n\t\tif(answer.equals(\"y\") || answer.equals(\"Y\")) {\r\n\t\t\tproDiscontinued = true;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}else if(answer.equals(\"n\") || answer.equals(\"N\")) {\r\n\t\t\tproDiscontinued = false;\r\n\t\t\tSystem.out.println(\"How many products are available?\");\r\n\t\t\tproQtyAvailable = Validation.intValidation();\r\n\t\t\tif(proQtyAvailable <= 0) {\r\n\t\t\t\tproInStock = false;\r\n\t\t\t}else {\r\n\t\t\t\tproInStock = true;\r\n\t\t\t}\r\n\t\t}\t\r\n\r\n\t\tProduct newProduct = new Product(proCode, proMake, proModel, proPrice, proInStock);\r\n\t\tnewProduct.setProQtyAvailable(proQtyAvailable);\r\n\t\tnewProduct.setProDiscontinued(proDiscontinued);\r\n\r\n\t\tnewProductArray.add(newProduct);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//The product is then added to the array list for the specified supplier\r\n\r\n\t\tSystem.out.println();\r\n\r\n\t\treturn newProductArray;\r\n\t}",
"public void addProduct() throws Throwable\r\n\t{\r\n\t\tgoToProductsSection();\r\n\t\tverifyProduct();\r\n\t\tselPproductBtn.click();\r\n\t\twdlib.verify(wdlib.getPageTitle(),flib.getPropKeyValue(PROP_PATH, \"ProductsPage\") , \"Products Page \");\r\n\t\tProductsPage pdpage=new ProductsPage();\r\n\t\tpdpage.selectProducts();\r\n\t}",
"@Override\n\tpublic void add(Product p) {\n\t\tproductRepository.save(p);\n\t}",
"public boolean addProduct(Product p) {\n\t\t\n\t\treturn products.add(p);\n\t}",
"public void addProduct(Product product) {\n\t\tSystem.out.println(\"Before inserting product \" + product.getProductID());\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(product);// permanently store the product object in database,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// session.sav\n\t\tSystem.out.println(\"After inserting product \" + product.getProductID());\n\n\t}",
"private void addNameToShoppingCartPgeArrayList(String productName) {\n productName = productName.replace(\"?\", \"\");\n productName = productName.replace(\"®\", \"\");\n productName = productName.replace(\"™\", \"\");\n listOfShoppingCardItem.add(productName);\n }",
"Product storeProduct(Product product);",
"public boolean AddUpdateProduct(Product product)\r\n {\r\n boolean isSuccess = false;\r\n // if the product already exists, update it\r\n for (int i = 0; i < productArrayList.size(); i++)\r\n {\r\n if (product.getId() == productArrayList.get(i).getId())\r\n {\r\n // update the value of the product\r\n productArrayList.set(i, product);\r\n isSuccess = true;\r\n System.out.println(\"Product updated\");\r\n }\r\n }\r\n\r\n // if product does not exist, add it to the list\r\n if (!isSuccess)\r\n {\r\n productArrayList.add(product);\r\n isSuccess = true;\r\n System.out.println(\"Product added to inventory\");\r\n }\r\n\r\n // print arrayList to the file\r\n File inventoryFile = new File(\"Inventory.txt\");\r\n try (PrintWriter fileWriter = new PrintWriter(inventoryFile))\r\n {\r\n for (Product product1: productArrayList) {\r\n fileWriter.print(product1.getId() + \", \" + product1.getName() + \", \" +\r\n product1.getCost() + \", \" + product1.getQuantity() + \", \" + product1.getMargin() + \"\\n\");\r\n }\r\n } catch (FileNotFoundException ex)\r\n {\r\n System.out.println(\"File not found\");\r\n }\r\n // if method was not able to add the product, isSuccess stays false\r\n return isSuccess;\r\n }",
"public void add(Product p) {\r\n\t\tparts.add(p);\r\n\t}",
"public void onAddButtonClick(View view) {\n\n if (view.getId() == R.id.Badd) {\n\n EditText a = (EditText) findViewById(R.id.TFenterName);\n\n String b = a.getText().toString();\n product.setProductName(b);\n\n a = (EditText) findViewById(R.id.TFenterPrice);\n b = a.getText().toString();\n product.setPrice(b);\n\n a = (EditText) findViewById(R.id.TFenterQuantity);\n b = a.getText().toString();\n product.setQuantity(b);\n\n a = (EditText) findViewById(R.id.TFLocation);\n b = a.getText().toString();\n product.setLocation(b);\n\n a = (EditText) findViewById(R.id.TFExpiration);\n b = a.getText().toString();\n product.setExpiration(b);\n\n helper.insertProduct(product);\n\n Intent i = new Intent(AddProduct.this, WasAdded.class);\n i.putExtra(\"product\", product.getProductName());\n startActivity(i);\n\n }\n }",
"Product updateProductInStore(Product product);",
"@PostMapping(\"/add\")\r\n\tpublic ProductDetails addProduct(@Valid @RequestBody AddProduct request) {\r\n\r\n\t\tProduct product = productUtil.getProduct();\r\n\t\tproduct.setProduct_Id(productUtil.generateId());\r\n\t\tproduct.setProduct_Name(request.getProduct_Name());\r\n\t\tproduct.setProduct_Price(request.getProduct_Price());\r\n\t\tproduct.setProduct_Quantity(request.getProduct_Quantity());\r\n\t\tproduct.setProduct_Availability(request.isProduct_Availability());\r\n\t\tproduct = productService.addProduct(product);\r\n\t\treturn productUtil.toProductDetails(product);\r\n\r\n\t}",
"public boolean addProduct(Product product) \r\n\t{\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\tboolean feedback=pDoa.addProductDoa(product);\r\n\t\t\tif(feedback) {\r\n\t\t\t\t\r\n\t\t\t\t\t\t\treturn true;\t\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\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\treturn false;\r\n\t\t\r\n\t}",
"public boolean removeProductFromWishlist(String productId) {\n\t\t// TODO Auto-generated method stub\n\t\tboolean result=false;\n\t\tif(WishlistDaoImpl.wlist.get(productId) != null)\n\t\t{\n\t\t\n\t\t\tresult=WishlistDaoImplObj.removeProductFromWishlist(productId);\n\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{ \n\t\t\tint x=3;\n\t\t\tint y=0;\n\t\t\tint z=x/y;\n\t\t\treturn false;\n\t\t\n\t\t\t//throw new WishListException(\"Product ID not found in Wishlist to REMOVE\");\n\t\t}\n\t\n}",
"public com.mozu.api.contracts.productadmin.Product addProduct(com.mozu.api.contracts.productadmin.Product product) throws Exception\r\n\t{\r\n\t\treturn addProduct( product, null);\r\n\t}",
"@Override\n\tpublic void addProduct(Product product) throws ProductNotFoundException {\n\t\tif (productRepository.findByName(product.getName()) == null){\n\t\t\tproductRepository.addProduct(product);\n\t\t}\n\n\t}",
"public static ArrayList<Product> addNewProduct() {\r\n\r\n\t\tSupplier selectedSup = Part02Tester.getSupplier();\r\n\r\n\t\tArrayList<Product> newProductArray = addProduct();\r\n\r\n\t\tProduct newProduct = newProductArray.get(0);\r\n\r\n\t\tArrayList<Product> prodList = selectedSup.getSupProducts();\r\n\r\n\t\tprodList.add(newProduct);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//The product is then added to the array list for the specified supplier\r\n\t\treturn newProductArray;\r\n\r\n\t}",
"protected static void addBook(Book toAdd)\n {\n if (toAdd == null) // if product is null, becuase the formatting wasnt correct, then dont go forward and print out that the book wasnt added\n ProductGUI.Display(\"Book not added\\n\");\n else{\n try{\n if (!(toAdd.isAvailable(toAdd.getID(), productList))) // if the product id alrady exists, dont go forard towards adding it\n {\n ProductGUI.Display(\"Sorry. this product already exists\\n\");\n return;\n }\n else\n ProductGUI.Display(\"New book product\\n\");\n \n myProduct = new Book(toAdd.getID(), toAdd.getName(), toAdd.getYear(), toAdd.getPrice(), toAdd.getAuthor(), toAdd.getPublisher()); // make new product using this object\n productList.add(myProduct); // add product to arraylist\n \n addToMap(toAdd.getName()); // adding the product name to the hashmap\n System.out.println(\"book added to all\");\n ProductGUI.fieldReset(); // reset the fields to being blank\n } catch (Exception e){\n ProductGUI.Display(e.getMessage()+\"errorrorror\\n\");\n }\n }\n }",
"private void addProductToCart(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String productID = request.getParameter(\"ProductID\");\n\n HttpSession session = request.getSession();\n\n List<Product> cartProducts = (List<Product>) session.getAttribute(\"cartProducts\");\n\n if (productID != null) {\n\n int id = Integer.parseInt(productID);\n\n if (cartProducts != null) {\n\n if (getCartSize(cartProducts) < Constants.CART_LIMIT) {\n\n if (!productIsAlreadyInCart(id, cartProducts))\n cartProducts.add(productDAO.getProduct(id));\n else\n increaseProductCountInCart(id, cartProducts);\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n response.sendRedirect(Constants.PATH_CATALOG);\n } else\n response.getWriter().write(notifyCartIsFull());\n\n } else {\n cartProducts = new ArrayList<>();\n cartProducts.add(productDAO.getProduct(Integer.parseInt(productID)));\n\n logger.info(\"Product (ID=\" + productID + \") has been added to the cart\");\n session.setAttribute(\"cartProducts\", cartProducts);\n response.sendRedirect(Constants.PATH_CATALOG);\n }\n }\n }",
"@Override\r\n public void addProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n this.productQuantity.set(i, stock + quantity);\r\n break;\r\n }\r\n i++;\r\n }\r\n this.productList.add(product);\r\n this.productQuantity.add(quantity);\r\n }",
"private void buyProduct() {\n\t\tSystem.out.println(\"Enter Number of Product :- \");\n\t\tint numberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\twhile (!StoreController.getInstance().isValidNumberOfProduct(\n\t\t\t\tnumberOfProduct)) {\n\t\t\tSystem.out.println(\"Enter Valid Number of Product :- \");\n\t\t\tnumberOfProduct = getValidInteger(\"Enter Number of Product :- \");\n\t\t}\n\t\tfor (int number = 1; number <= numberOfProduct; number++) {\n\t\t\tSystem.out.println(\"Enter \" + number + \" Product Id\");\n\t\t\tint productId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\twhile (!StoreController.getInstance().isValidProductId(productId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id\");\n\t\t\t\tproductId = getValidInteger(\"Enter \" + number + \" Product Id\");\n\t\t\t}\n\t\t\tSystem.out.println(\"Enter product Quantity\");\n\t\t\tint quantity = getValidInteger(\"Enter product Quantity\");\n\t\t\tCartController.getInstance().addProductToCart(productId, quantity);\n\t\t}\n\t}",
"public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }",
"@Override\r\n\tpublic int add(Product product) throws Exception {\n\t\treturn this.dao.add(product);\r\n\t}",
"public void add_item_button(View v){\n if(expiry_date==0){ //if no expiry date was chosen,\n if(product_name.equals(\"Milk\")){//and if the product is milk, \n expiry_date=7; //set it to the default of 7 days until expiry\n }else{//If the product is bread,\n expiry_date=3;//set it to the default of 7 days until expiry\n }\n }\n Product added_p=new Product(product_name,expiry_date); //added_p : product chosen by the user that they currently own\n added_list.add(added_p); //this product is added to the list \n text=(TextView) findViewById(R.id.added_list);\n String content=\"\";\n for(Product p:added_list){\n content=content+(p.getProduct_name()+\" \"+p.getProduct_exp()+\" days \\n\"); //then displayed to show the user \n }\n text.setText(content);\n }"
] | [
"0.76813227",
"0.7161505",
"0.6972327",
"0.6947102",
"0.691983",
"0.688544",
"0.6878062",
"0.6825888",
"0.67712027",
"0.6743076",
"0.6718964",
"0.6704453",
"0.66815674",
"0.66772777",
"0.6667509",
"0.6607967",
"0.65972066",
"0.65950465",
"0.65904474",
"0.65866894",
"0.6559056",
"0.65450054",
"0.65193135",
"0.6507086",
"0.64900213",
"0.6463573",
"0.64350015",
"0.6429994",
"0.6406921",
"0.640145",
"0.63852966",
"0.63635874",
"0.63490766",
"0.6336848",
"0.63357425",
"0.6321286",
"0.63146836",
"0.6314196",
"0.63112664",
"0.6291548",
"0.6287869",
"0.62686163",
"0.62558895",
"0.6255801",
"0.6255336",
"0.6253341",
"0.6241067",
"0.6236681",
"0.62269235",
"0.62237287",
"0.62230736",
"0.62122566",
"0.62032104",
"0.6186678",
"0.61778075",
"0.61739707",
"0.6170449",
"0.61663425",
"0.61634904",
"0.61560595",
"0.61535025",
"0.61340475",
"0.61308324",
"0.6130435",
"0.6129117",
"0.6129014",
"0.6107902",
"0.60975564",
"0.6091168",
"0.60885817",
"0.60871416",
"0.60745496",
"0.6071639",
"0.60628396",
"0.6058666",
"0.60511696",
"0.6035088",
"0.60269904",
"0.6026367",
"0.60166276",
"0.6011929",
"0.6005566",
"0.6000748",
"0.59982085",
"0.5984205",
"0.5969896",
"0.5961669",
"0.5956551",
"0.59540296",
"0.5952929",
"0.5941219",
"0.5939107",
"0.59375155",
"0.5937018",
"0.5935529",
"0.59330094",
"0.5926558",
"0.5920927",
"0.58909076",
"0.5883589"
] | 0.7721395 | 0 |
This Method will remove the Particular Product from wishlist | public boolean removeProductFromWishlist(String productId) {
// TODO Auto-generated method stub
boolean result=false;
if(WishlistDaoImpl.wlist.get(productId) != null)
{
result=WishlistDaoImplObj.removeProductFromWishlist(productId);
return result;
}
else
{
int x=3;
int y=0;
int z=x/y;
return false;
//throw new WishListException("Product ID not found in Wishlist to REMOVE");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removeProduct(Product product);",
"public void removeProductFromWishlist(ProductItem product, User user) {\n this.removeProductFromWishlist(product, this.getWishlistByUser(user));\r\n }",
"public void deletesingleWishlist(ProductDetail productDetail) {\n SQLiteDatabase db = helper.getWritableDatabase();\n db.delete(DatabaseConstant.TABLE_NAME_WISHLIST, DatabaseConstant.TABLE_WISHLIST_ID + \" = ?\",\n new String[]{String.valueOf(productDetail.getId())});\n db.close();\n }",
"public void RemoveproductCartSaucedemo() {\n\t\t\t\t\tdriver.findElement(RemoveProduct).click();\n\t\t\n\t\t\t\t}",
"public void removeProductFromWishlist(Product product, long accountId) {\n wishlistService.removeProduct(product, accountId);\n }",
"@Override\r\n\tpublic void deleteWishList(int wishNo) throws Exception {\n\r\n\t}",
"@Test\r\n\tpublic void test_9and10_DeleteItemFromWishList() throws Exception {\n\t\tdriver.findElement(By.name(\"submit.deleteItem\")).click();\r\n\t\tThread.sleep(3000);\r\n\t\t\r\n\t\t// check whether the item exists on g-items removed class\r\n\t\tboolean itemExists = false;\r\n\t\t\r\n\t\t// create an array of product titles under g-item-sortable removed\r\n\t\t// get the product title in this list and compare it with selected item\r\n\t\tList<WebElement> productTitles = driver.findElements(By.xpath(\"//div[@id='g-items']//div[@class = 'a-section a-spacing-none g-item-sortable g-item-sortable-removed']/div/div[1]\"));\r\n\t\tfor(WebElement productTitle : productTitles) {\r\n\t\t\t// compare selected item and any item in wish list\r\n\t\t\t// try to find selected item in the list of removed items\r\n\t\t\tString listedItem = productTitle.getText();\r\n\t\t\tif (listedItem.equals(selectedItem)) {\r\n\t\t\t\titemExists = true;\r\n\t\t\t\tSystem.out.println(selectedItem + \" is deleted from wish list\");\r\n\t\t\t\tAssert.assertTrue(itemExists);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void removeAllWeightBasedProduct(Product product){\n total-= cartItems.get(product.name).cost();\n noOfItems--;\n cartItems.remove(product.name);\n }",
"private void removeProduct() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter Product Id - \");\n\t\t\tint productId = getValidInteger(\"Enter Product Id - \");\n\t\t\twhile (!CartController.getInstance().isProductPresentInCart(\n\t\t\t\t\tproductId)) {\n\t\t\t\tSystem.out.println(\"Enter Valid Product Id - \");\n\t\t\t\tproductId = getValidInteger(\"Enter Product Id - \");\n\t\t\t}\n\t\t\tCartController.getInstance().removeProductFromCart(productId);\n\t\t} else {\n\t\t\tDisplayOutput.getInstance().displayOutput(\n\t\t\t\t\t\"\\n-----Cart Is Empty----\\n\");\n\t\t}\n\t}",
"public void remove(int index){\n if (myBasket.size() == 0)\n System.out.println(\"List is empty.\");\n int i = 0 ;\n boolean isFound = false;\n Product toRemove = null;\n for (Product product: myBasket.keySet())\n {\n i++;\n if (i == index && myBasket.get(product) > 0)\n {\n isFound = true;\n toRemove = product;\n break;\n\n }\n }\n if (!isFound)\n System.out.println(\"Sorry. Invalid index!\");\n\n // now , checking how many of this product is in the basket\n\n else if (myBasket.get(toRemove) > 1){\n System.out.println(\"How many of this product do you want to give back?\");\n Scanner scanner = new Scanner(System.in);\n int num = scanner.nextInt();\n if (num < myBasket.get(toRemove)) {\n totalCost -= toRemove.getPrice() * num;\n myBasket.replace(toRemove,myBasket.get(toRemove) - num);\n for (int j = 0 ; j < num ; j++)\n inventory.updateStock(toRemove , '+');\n }\n else {\n totalCost -= toRemove.getPrice() * myBasket.get(toRemove);\n myBasket.remove(toRemove);\n for (int j = 0 ; j < myBasket.get(toRemove) ; j++)\n inventory.updateStock(toRemove,'+');\n }\n System.out.println(\"Product removed.\");\n }\n\n // there is just one of this product in basket\n\n else {\n totalCost -= toRemove.getPrice();\n myBasket.remove(toRemove);\n System.out.println(\"Product removed.\");\n inventory.updateStock(toRemove , '+');\n }\n }",
"void removeProduct(int position) throws ProductNotFoundException;",
"public boolean removeProduct(String p){\n\t\tif(containsProduct(p)){\n\t\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\t\tfor (int j = 0; j < list.get(i).getWishlist().size(); j++) {\n\t\t\t\t\tif( p.equals(list.get(i).getWishlist().get(j)) ){\n\t\t\t\t\t\tlist.get(i).getWishlist().remove(j);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public void Remove_button() {\n\t\tProduct product = (Product) lsvProduct.getSelectionModel().getSelectedItem();\n\t\tif (product!=null) {\n\t\t\tint ind = lsvProduct.getSelectionModel().getSelectedIndex();\n\t\t\tcart.removeProduct(product);\n\t\t\tcart.removePrice(ind);\n\t\t\tcart.removeUnit(ind);\n\t\t}\n\t\tthis.defaultSetup();\n\t}",
"public static void removeProduct(Scanner input) {\n\n\t\tif (basket.isEmpty()) {\n\t\t\tSystem.out.println(\"No products in you basket yet.\");\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tSystem.out.println(\"In your basket you have:\");\n\n\t\t\tshowBasket();\n\n\t\t\tSystem.out.println(\"Enter the ID of the product you don't want.\");\n\n\t\t\tint productId = productValidation(input, basket);\n\n\t\t\tint productQuantity = 0;\n\n\t\t\tif (basket.get(productId).getQuantity() > 1) {\n\n\t\t\t\tSystem.out.printf(\"You have more than one %s.%n\", basket.get(productId).getName());\n\t\t\t\tSystem.out.println(\"Press 1 to remove all or 2 to remove some.\");\n\n\t\t\t\tif (TwoOptiosValidation.check(input) == 1) {\n\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"How many would you like to remove?\");\n\t\t\t\t\tproductQuantity = quantityValidation(input, productId, basket);\n\t\t\t\t\tif (productQuantity == basket.get(productId).getQuantity()) {\n\t\t\t\t\t\tbasket.remove(productId);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbasket.get(productId).setQuantity(basket.get(productId).getQuantity() - productQuantity);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbasket.remove(productId);\n\t\t\t}\n\n\t\t\tProductsList.cancelOrder(productId, productQuantity);\n\n\t\t\tSystem.out.println(\"Done\");\n\n\t\t}\n\n\t\tSystem.out.println();\n\n\t}",
"public void clickDeleteProductandApply()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.wishListItemDeleteButton,Constant.explicitTime);\r\n clickElement(pageFactory.wishListItemDeleteOkButton,Constant.explicitTime);\r\n }",
"@Test\r\n\tpublic void remove_items() {\r\n//Go to http://www.automationpractice.com\r\n//Mouse hover on product one\r\n//Click 'Add to Cart'\r\n//Click 'Continue shopping' button\r\n//Verify Cart has text '1 Product'\r\n//Mouse hover over 'Cart 1 product' button\r\n//Verify product listed\r\n//Now mouse hover on another product\r\n//click 'Add to cart' button\r\n//Click on Porceed to checkout\r\n//Mouse hover over 'Cart 2 product' button\r\n//Verify 2 product listed now\r\n//click 'X'button for first product\r\n//Verify 1 product deleted and other remain\r\n\r\n\t}",
"public void removeTopProductFromCart() {\n\t\tWebElement result=null;\n\t\tString xpath=buildXPathToRemove(1);\n\t\tresult = selenium.findElement(By.xpath(xpath));\n\t\tresult.click();\n\t}",
"private void removeProduct(int id)\n {\n manager.removeProduct(id);\n }",
"public void unlinkProduct() {\n Product result;\n String supplierID = getToken(\"Enter supplier ID: \");\n if (warehouse.searchSupplier(supplierID) == null) {\n System.out.println(\"No such supplier!\");\n return;\n }\n do {\n String productID = getToken(\"Enter product ID: \");\n result = warehouse.unlinkProduct(supplierID, productID);\n if (result != null) {\n System.out.println(\"Product [\" + productID + \"] unassigned from supplier: [\" + supplierID + \"]\");\n }\n else {\n System.out.println(\"Product could not be unassigned\");\n }\n if (!yesOrNo(\"unassign more products from supplier: [\"+ supplierID + \"]\")) {\n break;\n }\n } while (true);\n }",
"public void Deleteproduct(Product objproduct) {\n\t\t\n\t}",
"ShoppingBasket removeProductItem(Long shoppingBasketId, Long productItemId);",
"public void removeProduct(ProductBarcode code) throws NoSuchElementException;",
"@Override\r\n\tpublic int deleteProduct(Product product) {\n\t\treturn 0;\r\n\t}",
"public void removeProduct(SiteProduct product) {\n dataProvider.delete(product);\n }",
"public void removeItem(Product p) throws IOException {\n for(Product l: this.cartContents)\n System.out.println(l.getProductName());\n this.cartContents.remove(p);\n this.saveCart();\n }",
"public void deleteProduct(Product product_1) {\n\r\n\t}",
"public void clickRemoveButton_SPOItem(int noitemremove) {\n for (int i = 1; i <= noitemremove; i++) {\n WebElement clickremove = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//a[text()='Remove']\"));\n String nameofproduct = getDriver().findElement(By.xpath(\"//*[@id='productGroup_2']/li[\" + i + \"]//*[@class='product_name']/span\")).getText();\n clickremove.click();\n System.out.println(\"=== Name of the product Removed: \" + nameofproduct);\n listOfDeletedItemNameShoppingCart.add(nameofproduct);\n }\n }",
"@Override\r\n public void removeProduct(ProductBarcode code) throws NoSuchElementException\r\n {\r\n \tif (products.contains(code))\r\n {\r\n products.remove(code);\r\n }\r\n else\r\n {\r\n throw new NoSuchElementException(\"Product not in this container!\");\r\n }\r\n }",
"@Override\r\n\tpublic List<Product> deleteProduct(String name, List<Product> custlist) {\n\t\t{\r\n\t\t\tfor (Product x:custlist)\r\n\t\t\t{\r\n\t\t\t\tif(name.equals(x.getName()))\r\n\t\t\t\t{\r\n\t\t\t\t\tcustlist.remove(x);\r\n\t\t\t\t\t break;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn custlist;\r\n\t}\r\n\t\r\n\t}",
"public void deleteWishlistItem(WishlistItem wishItem){\n fStore.collection(\"user_profiles\").document(fUser.getUid()).collection(\"wishlist\").document(wishItem.getWishID()).delete().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n return;\n }\n });\n }",
"@Override\n\tpublic void deleteProduct(int product_id) {\n\n\t}",
"public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}",
"public void deleteBasketItem(String sku) { \n Iterator<BasketItem> iter = basketItems.iterator();\n \n while(iter.hasNext()) {\n BasketItem basketItem = (BasketItem) iter.next();\n if(basketItem.getVariant().getSku().equals(sku)) {\n iter.remove();\n }\n }\n }",
"public void deleteProduct(Product product)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Sets up the WHERE condition of the SQL statement\n String condition = String.format(\" %s = ?\", ShoppingListTable.KEY_TPNB);\n\n // Stores the values of the WHERE condition\n String[] conditionArgs = { String.valueOf(product.getTPNB()) };\n\n db.delete(ShoppingListTable.TABLE_NAME, condition, conditionArgs);\n }",
"private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }",
"public void removeItem(Product p) throws ProductNotFoundException {\n\t\tif (!_items.remove(p)) {\n\t\t\tthrow new ProductNotFoundException(\"No existeix producte\");\n\t\t}\n\t}",
"void removeList(ShoppingList _ShoppingList);",
"public void deleteProduct()\n {\n ObservableList<Product> productRowSelected;\n productRowSelected = productTableView.getSelectionModel().getSelectedItems();\n int index = productTableView.getSelectionModel().getFocusedIndex();\n Product product = productTableView.getItems().get(index);\n if(productRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Product you want to delete.\");\n alert.show();\n } else if (!product.getAllAssociatedParts().isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"This Product still has a Part associated with it. \\n\" +\n \"Please modify the Product and remove the Part.\");\n alert.show();\n } else {\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Product?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if(result == ButtonType.OK)\n {\n Inventory.deleteProduct(product);\n }\n }\n }",
"public void removeProduct(Product item) {\n inventory.remove(item);\n }",
"public int removeProduct(String product) {\n Collection<String> collection = shoppingBasket.keySet();\n\n for (String key : collection) {\n if (key != null) {\n if (product.equals(key) == true) {\n // нашли наше значение равное ключу\n shoppingBasket.remove(product);\n return 1;\n } else {\n return 0;\n }\n }\n }\n return 0;\n }",
"void deleteProduct(Integer productId);",
"public SimpleProductWithSpecialPriceDetailPage removeProductGalleryFromSimpleProducttWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProductWithSpecialPriceDetailPage();\n }",
"@Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n\n if(wishlistModelList.size() !=0 ){\n wishlistModelList.remove(index);\n MyWishlistFragment.wishlistAdapter.notifyDataSetChanged();\n }\n ProductDetailsActivity.ALREADY_ADDED_TO_WISHLIST = false;\n Toast.makeText(context, \"removed successfully!!\", Toast.LENGTH_SHORT).show();\n\n }\n else{\n if (ProductDetailsActivity.addToWishListBtn != null) {\n ProductDetailsActivity.addToWishListBtn.setSupportImageTintList(context.getResources().getColorStateList(R.color.colorPrimary));\n }\n wishList.add(index,removedProductId);\n String error = task.getException().getMessage();\n Toast.makeText(context, error, Toast.LENGTH_SHORT).show();\n }\n// if (ProductDetailsActivity.addToWishListBtn != null) {\n// ProductDetailsActivity.addToWishListBtn.setEnabled(true);\n// }\n\n ProductDetailsActivity.running_wishlist_query = false;\n }",
"public void removeByProductType(String productType);",
"@Override\n\tpublic int deleteProduct(String productNo) {\n\t\treturn 0;\n\t}",
"public ConfigProductWithSpecialPriceDetailPage removeProductGalleryFromConfigProductWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithSpecialPriceDetailPage();\n }",
"public void removeProduct(int id)\n {\n Product product = findProduct(id);\n \n System.out.println(\"Removing product \" + product.getName() +\n \" from the stock list\");\n \n if(product != null)\n {\n stock.remove(product);\n }\n }",
"public void removeAllVariantBasedProduct(Product product){\n /*\n Using for loop because we want to delete all the variants of that particular product\n */\n for(Variant variant : product.variants){\n String key = product.name + \" \" + variant.name;\n if(cartItems.containsKey(key)){\n total-= cartItems.get(key).cost();\n noOfItems--;\n cartItems.remove(key);\n }\n }\n }",
"public void deleteProduct(Product product) throws BackendException;",
"private void deleteProduct() {\n // Only perform the delete if this is an existing Product.\n if (mCurrentProductUri != null) {\n // Call the ContentResolver to delete the pet at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentProductUri\n // content URI already identifies the pet that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentProductUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_product_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }",
"private JButton createButtonRemoveProduct() {\n\n this.buttonRemoveProduct = new JButton(\"Remove product\");\n this.buttonRemoveProduct.setEnabled(false);\n\n this.buttonRemoveProduct.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n\n try {\n int index = jListProduct.getSelectedIndex();\n boolean removedProduct = removeProduct(index);\n if (removedProduct) {\n buttonRemoveProduct.setEnabled(false);\n JOptionPane.showMessageDialog(rootPane,\n \"Product removed sucessfully.!\",\n \"Product removal\",\n JOptionPane.INFORMATION_MESSAGE);\n }\n\n } catch (IllegalArgumentException ex) {\n\n JOptionPane.showMessageDialog(DemonstrationApplication.this,\n ex.getMessage(),\n \"Erro a remover produto\",\n JOptionPane.WARNING_MESSAGE);\n }\n }\n });\n\n return this.buttonRemoveProduct;\n }",
"public void eliminar(Producto producto) throws IWDaoException;",
"public SimpleProduct3WithSpecialPriceDetailPage removeProductGalleryFromSimpleProduct3tWithSpecialPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProduct3WithSpecialPriceDetailPage();\n }",
"private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}",
"void deleteProduct(int productId) throws ProductException;",
"public void eliminar(Producto producto) throws BusinessErrorHelper;",
"public void clickRemoveButton_CNCItem(int noitemremove) {\n for (int i = 1; i <= noitemremove; i++) {\n WebElement clickremove = getDriver().findElement(By.xpath(\"//*[@id='productGroup_1']/li[\" + i + \"]//a[text()='Remove']\"));\n String nameofproduct = getDriver().findElement(By.xpath(\"//*[@id='productGroup_1']/li[\" + i + \"]//*[@class='product_name']/span\")).getText();\n clickremove.click();\n System.out.println(\"=== Name of the product Removed: \" + nameofproduct);\n listOfDeletedItemNameShoppingCart.add(nameofproduct);\n }\n }",
"public void removeOrderItem(int prodID)\r\n\t{\r\n\t\t//create temporary variables\r\n\t\tOrderItem temp;\r\n\t\tint test = 0;\r\n\r\n\t\t//iterate through list and compare product ID of each item against the \r\n\t\t//parameter, then remove any items that match\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++) \r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttest = temp.getProductID();\r\n\t\t\tif (test == prodID) \r\n\t\t\t{\r\n\t\t\t\torderItemList.remove(x);\r\n\t\t\t} //end if\r\n\t\t} //end for\t\t\r\n\t}",
"public synchronized void deleteItem(Product product){\n carrito.set(product.getId(), null);\n }",
"public boolean removeProduct(Product p) {\n\tsynchronized (this.productList) {\n\t boolean returned = this.productList.remove(p);\n\t this.setChanged();\n\t this.notifyObservers();\n\t return returned;\n\t}\n }",
"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}",
"@FXML\r\n\tpublic void deleteItem() {\r\n\t\tcontroller.deleteWishlistItem(listView.getSelectionModel().getSelectedItem().getId());\r\n\t\tlistView.setItems(controller.getWishlistWatchesForCurrentUser());\r\n\t\tlistView.getSelectionModel().select(-1);\r\n\t}",
"private void deleteProduct() {\n // Only perform the delete if this is an existing product.\n if (currentProductUri != null) {\n // Call the ContentResolver to delete the product at the given content URI.\n // Pass in null for the selection and selection args because the currentProductUri\n // content URI already identifies the product that we want.\n int rowsDeleted = getContentResolver().delete(currentProductUri, null, null);\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.no_deleted_products),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_product_successful), Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }",
"public void deleteProduct(Supplier entity) {\n\t\t\r\n\t}",
"public void deleteProduct(Product product) {\n allProducts.remove(product);\n }",
"void deleteProduct(Long id);",
"@Test\n public void testRemoveItem() throws Exception {\n \n System.out.println(\"RemoveItem\");\n \n /*ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n Product p2 = new Product(\"Raton\", 85.6);\n Product p3 = new Product(\"Teclado\", 5.5);\n Product p4 = new Product(\"Monitor 4K\", 550.6);\n \n instance.addItem(p1);\n instance.addItem(p2);\n instance.addItem(p3);\n instance.addItem(p4);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n fail(\"No existe\");\n \n }*/\n \n /*---------------------------------------------*/\n \n ShoppingCart instance = new ShoppingCart();\n Product p1 = new Product(\"Galletas\", 1.2);\n \n instance.addItem(p1);\n \n try{\n \n instance.removeItem(p1);\n \n } catch(Exception e){\n \n assertTrue(instance.isEmpty());\n \n }\n \n }",
"public boolean removeAndCheck(String product) {\n\t\tif(this.product.contains(product)) {\n\t\t\tthis.product.remove(product);\n\t\t\tif(!this.product.isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"This item is not in the cart.\");\n\t\t\treturn false;\n\t\t}\n\t\t//TODO Create a new method that will check for it.\n\t}",
"private void removeProducto(int position) {\n losproductos.remove(position);\n // Notificamos de un item borrado en nuestro array\n eladaptador.notifyItemRemoved(position);\n }",
"public void removeItem(Word w)\r\n {\n currentDB.deleteWord(w);\r\n finish();\r\n startActivity(getIntent());\r\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.str_removed_word)+\": \"+w.strNative, Toast.LENGTH_SHORT).show();\r\n }",
"public void removeAll(Product product){\n if(product.type == ProductType.TYPE_WB){\n removeAllWeightBasedProduct(product);\n }else{\n removeAllVariantBasedProduct(product);\n }\n }",
"void remove(String installedAppId);",
"Boolean remover(String userName, Long idProducto);",
"@Override\n\tpublic void deleteProduct(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Products where id=:productId\");\n\t\t\n\t\ttheQuery.setParameter(\"productId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t\t\n\t}",
"void delete(Product product) throws IllegalArgumentException;",
"private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}",
"public void removeJpmProductSaleNew(final Long uniNo);",
"private void deleteProduct(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString theProduct=request.getParameter(\"deleteProduct\");\n\t\tdaoPageAdmin.DeleteProduct(theProduct);\n\t\tloadProduct(request, response);\n\t}",
"private void btnRemoveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveActionPerformed\n if(tblOrders.getSelectedRow() == -1)\n {\n lblMessage.setText(\"Select Product First\");\n }\n else\n {\n DefaultTableModel model = (DefaultTableModel)tblOrders.getModel();\n int productId = \n Integer.parseInt(String.valueOf(model.getValueAt(tblOrders.getSelectedRow(), 0)));\n \n loggedInCustomer.findLatestOrder().removeOrderLine(productId);\n \n model.removeRow(tblOrders.getSelectedRow());\n \n lblMessage.setText(\"Product Has Been Removed\");\n lblTotalCost.setText(\"£\" + String.format(\"%.02f\",loggedInCustomer.findLatestOrder().getOrderTotal()));\n }\n }",
"public void delete(Product product) {\n\t\tif (playerMap.containsKey(product.getOwner())) {\n\t\t\tplayerMap.get(product.getOwner())[product.getSlot()] = null;\n\t\t}\n\t\tMap<Integer, Set<Product>> itemMap = typeMap.get(product.getType()).get(product.getState());\n\t\tif (itemMap.containsKey(product.getItemId())) {\n\t\t\titemMap.get(product.getItemId()).remove(product);\n\t\t}\n\t}",
"public boolean removeProduct(int productToRemove_id) \n\t{\n\t\treturn false;\n\t}",
"void removePizza(Pizza p) {\n pizzas.remove(p);\n }",
"public void deleteProduct(int tpnb)\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Sets up the WHERE condition of the SQL statement\n String condition = String.format(\" %s = ?\", ShoppingListTable.KEY_TPNB);\n\n // Stores the values of the WHERE condition\n String[] conditionArgs = { String.valueOf(tpnb) };\n\n db.delete(ShoppingListTable.TABLE_NAME, condition, conditionArgs);\n }",
"public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }",
"@Override\n\tpublic void removeItem(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Items here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id\n\t\t\tSystem.out.print(\"Enter Item Id to delete the item: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeItem(session,itemId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Items Exception: \" +e.getMessage());\n\t\t}\n\t}",
"private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}",
"public SimpleProduct4WithOriginalPriceDetailPage removeProductGalleryFromSimpleProduct4tWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProduct4WithOriginalPriceDetailPage();\n }",
"@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}",
"@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}",
"public boolean removeProduct(int warehouseNumber, String productToRemove) {\n boolean removedProduct = false;\n if (findProduct(warehouseNumber, productToRemove)) {\n ArrayList<Product> warehouseProducts = getProducts(warehouseNumber);\n //System.out.println(\"REMOVING: \" + getProduct(warehouseNumber, productToRemove).getName());\n warehouseProducts.remove(getProduct(warehouseNumber, productToRemove));\n //System.out.println(\"WAREHOUSE AFTER REMOVING: \" + warehouseProducts);\n db.update_warehouse(warehouseNumber, warehouseProducts);\n removedProduct = true;\n }\n return removedProduct;\n }",
"public ConfigProductWithOriginalPriceDetailPage removeProductGalleryFromConfigProductWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new ConfigProductWithOriginalPriceDetailPage();\n }",
"@Override\n\tpublic void doDelete(String product) throws SQLException {\n\t\t\n\t}",
"public SimpleProduct1WithOriginalPriceDetailPage removeProductGalleryFromSimpleProduct1tWithOriginalPrice() {\n SpriiTestFramework.getInstance().waitForElement(By.xpath(firstImageElement), 20);\n Actions actions = new Actions(driver);\n WebElement target = driver.findElement(By.xpath(firstImageElement));\n actions.moveToElement(target).perform();\n SpriiTestFramework.getInstance().waitForElement(By.xpath(removeElement), 20);\n driver.findElement(By.xpath(removeElement)).click();\n return new SimpleProduct1WithOriginalPriceDetailPage();\n }",
"public boolean RemoveProduct(String name)\r\n {\r\n boolean isSuccess = false;\r\n\r\n // check if product exists, if yes, remove it from the list\r\n for (int i = 0; i < productArrayList.size(); i++)\r\n {\r\n if (name.equals(productArrayList.get(i).getName()))\r\n {\r\n // remove product from list\r\n productArrayList.remove(productArrayList.get(i));\r\n isSuccess = true;\r\n System.out.println(\"Product removed\");\r\n }\r\n }\r\n // print arrayList to the file\r\n File inventoryFile = new File(\"Inventory.txt\");\r\n try (PrintWriter fileWriter = new PrintWriter(inventoryFile))\r\n {\r\n for (Product product1: productArrayList) {\r\n fileWriter.print(product1.getId() + \", \" + product1.getName() + \", \" +\r\n product1.getCost() + \", \" + product1.getQuantity() + \", \" + product1.getMargin()+ \"\\n\");\r\n }\r\n } catch (FileNotFoundException ex)\r\n {\r\n System.out.println(\"File not found\");\r\n }\r\n // if product was not found, isSuccess will stay false\r\n return isSuccess;\r\n }",
"public void deleteWish(long wish_id) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_WISH, KEY_ID + \" = ?\",\n new String[] { String.valueOf(wish_id) });\n }",
"@Override\r\n public boolean removeProductQuantity(Product product, int quantity) {\r\n int stock;\r\n int i = 0;\r\n for (Product p : this.productList) {\r\n if (p.getId() == product.getId()) {\r\n stock = this.productQuantity.get(i);\r\n\r\n //checks if quantity value is invalid or if not enough stocks\r\n if (quantity <= 0 || stock < quantity) {\r\n this.productQuantity.set(i, 0);\r\n return true;\r\n }\r\n this.productQuantity.set(i, stock - quantity);\r\n return true;\r\n }\r\n i++;\r\n }\r\n return false;\r\n }",
"public boolean deleteProduct(Product s) {\n for (int i = 0; i < products.size(); i++) {\n if (products.get(i).equals(s)){\n products.remove(i);\n return true;\n }\n }\n return false;\n }",
"@Override\n public void onClick(View v) {\n for (ObjectStock s : product.getStocks()) {\n stockDataSource.deleteStock(s);\n }\n\n productDataSource.deleteProduct(product);\n popupWindowIsOn = false;\n popupWindow.dismiss();\n Toast toast = Toast.makeText(getBaseContext(),\n R.string.product_deleted, Toast.LENGTH_LONG);\n\n toast.show();\n\n finish();\n Intent i = new Intent(getBaseContext(), MyProducts.class);\n startActivity(i);\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t\t\t\t\t\troot.getChildren().remove(product);\r\n\t\t\t\t\t\t\t}",
"public void AddSpecificProduct(String productName) {\n\t\t\n\t\ttest = report.startTest(\"TC: AddSpecificProduct\");\n\t\t\n\t\t// -- Step 1: Ensure we're in the right page after login\n\t\tif (!verifyInProductPage()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// -- Step 2: Construct Dynamic XPath & Add the item\n\t\t\n\t\t// construct dynamic xpath\n\t\tString dynXpath = new String();\n\n\t\t/* method 1\n\t\t\t// Example: //button[@data-test=\"add-to-cart-sauce-labs-bike-light\"]\n\t\t\tproductName.toLowerCase();\n\t\t\tdynXpath=\"//button[@data-test=\\\"add-to-cart-\" + productName.toLowerCase().replace(\" \", \"-\") +\"\\\"]\";\n\t\t*/\n\n\t\t/* method 2 */\n\t\tdynXpath=\"//*[text()='\"+ productName +\"']//following::button[1]\";\n\n\t\t\n\t\t// Check if product listed in the page? If yes, click ADD TO CART button\n\t try {\n\t \twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(dynXpath)));\n\t \tdriver.findElement(By.xpath(dynXpath)).click();\n\t\t\ttest.log(LogStatus.INFO, \"Product [\" + productName + \"] found, clicked ADD TO CART button.\");\t\n\t } catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Product [\" + productName + \"] not found\");\n\t\t\treturn;\n\t }\n\t\t\n\n\t\t// -- Step 3: Verify item added via number(s) of item in Cart Badge\n\t \n\t\t// Perform simple verification using the Cart Badge on Top Right of the page\n\t\t// Now we update the dynXpath to remove pattern\n\t\tdynXpath=\"//button[@data-test=\\\"remove-\" + productName.toLowerCase().replace(\" \", \"-\") +\"\\\"]\";\n\t\t\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(dynXpath)));\n\t try {\n\t \tdriver.findElement(By.xpath(dynXpath));\n\t\t\ttest.log(LogStatus.PASS, \"Successful added [\" + productName + \"] to cart\");\t\n\t } catch (TimeoutException e) {\n\t\t\ttest.log(LogStatus.FAIL, \"Fail to add [\" + productName + \"] to cart\");\n\t\t\tsoft.fail(\"Failed to add item to cart!\");\t\n\t }\n\t\t\n\t\t\n\t}"
] | [
"0.758194",
"0.737113",
"0.7047973",
"0.70151186",
"0.69827646",
"0.69122636",
"0.6903516",
"0.69032866",
"0.69021994",
"0.68392307",
"0.67567134",
"0.6724216",
"0.6684805",
"0.6648781",
"0.6555549",
"0.65369236",
"0.6522542",
"0.65165716",
"0.6514341",
"0.6485707",
"0.64291143",
"0.6420527",
"0.64151627",
"0.64143944",
"0.6408183",
"0.6378012",
"0.635134",
"0.6351049",
"0.6337829",
"0.63236177",
"0.62899643",
"0.6278301",
"0.6205199",
"0.61851716",
"0.6184439",
"0.6182745",
"0.6173359",
"0.6171938",
"0.6161866",
"0.6125667",
"0.61216515",
"0.6121182",
"0.61177105",
"0.6094314",
"0.6083936",
"0.60839117",
"0.6058648",
"0.6048363",
"0.60418016",
"0.60396314",
"0.602905",
"0.60277003",
"0.6023561",
"0.6015507",
"0.60124284",
"0.6011797",
"0.59880006",
"0.59775144",
"0.59703034",
"0.59629357",
"0.5961696",
"0.5949229",
"0.59480065",
"0.5937752",
"0.5932938",
"0.5928986",
"0.59196514",
"0.59087956",
"0.58984846",
"0.58965373",
"0.5896057",
"0.5896014",
"0.5889613",
"0.58709854",
"0.586769",
"0.5865386",
"0.5863825",
"0.58574003",
"0.5854009",
"0.5845311",
"0.5831893",
"0.58188796",
"0.58121437",
"0.5807501",
"0.5804788",
"0.580425",
"0.5804099",
"0.5803653",
"0.58002424",
"0.57876295",
"0.57698435",
"0.5762174",
"0.5754624",
"0.57546085",
"0.574432",
"0.5740379",
"0.5730713",
"0.57274246",
"0.57154775",
"0.57049185"
] | 0.7588949 | 0 |
This Method will Return all the Product of wishlist | public HashMap<String, ProductDTO> displayProductInWishlist() {
// TODO Auto-generated method stub
return WishlistDaoImpl.wlist ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<ProductDetail> readAllWishlist() {\n db = helper.getReadableDatabase();\n ArrayList<ProductDetail> list = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"select * from \" + DatabaseConstant.TABLE_NAME_WISHLIST, null);\n while (cursor.moveToNext()) {\n String id = cursor.getString(0);\n String title = cursor.getString(1);\n String price = cursor.getString(2);\n String order_quantity = cursor.getString(3);\n String quantity_type = cursor.getString(4);\n String min_quantity = cursor.getString(5);\n String availability = cursor.getString(6);\n String discount = cursor.getString(7);\n String image = cursor.getString(8);\n String rating = cursor.getString(9);\n String description = cursor.getString(10);\n String type = cursor.getString(11);\n int qty = cursor.getInt(12);\n\n list.add(new ProductDetail(id, title, price, order_quantity, quantity_type, min_quantity, availability, discount, image, rating, description\n ,type, qty));\n }\n return list;\n }",
"public List<WebElement> getProductHeaderInWishList()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n List<WebElement> productList = pageFactory.wishListProductList;\r\n return productList;\r\n }",
"List<Product> getProductsList();",
"Product getPProducts();",
"public List<Product> getProducts();",
"public List<Product> getProducts();",
"public List<Product> getProductList(){\n List<Product> productList = mongoDbConnector.getProducts();\n return productList;\n }",
"private List<Product> extractProducts() {\r\n\t\t//load products from hidden fields\r\n\t\tif (this.getListProduct() != null){\r\n\t\t\tfor(String p : this.getListProduct()){\r\n\t\t\t\tProduct product = new Product();\r\n\t\t\t\tproduct.setId(Long.valueOf(p));\r\n\t\t\t\tthis.products.add(product);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.products;\r\n\t}",
"List<Product> list();",
"public ObservableList<Product> getProduct(){\n ObservableList<Product> products = FXCollections.observableArrayList();\n products.add(new Product(\"Laptop\", 859.00, 20));\n products.add(new Product(\"Bouncy Ball\", 2.49, 198));\n products.add(new Product(\"Toilet\", 99.00, 74));\n products.add(new Product(\"The Notebook DVD\", 19.99, 12));\n products.add(new Product(\"Corn\", 1.49, 856));\n return products;\n }",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> getAllProducts();",
"List<Product> retrieveProducts();",
"public List<Product> getAllProducts() {\n List<Product> listProduct= productBean.getAllProducts();\n return listProduct;\n }",
"private void getWishListInfo(final long productId) {\n User user = SettingsMy.getActiveUser();\n if (user != null) {\n // determine if product is in wishlist\n //String wishlistUrl = String.format(EndPoints.WISHLIST_IS_IN_WISHLIST, SettingsMy.getActualNonNullShop(getActivity()).getId(), productId);\n String wishlistUrl = String.format(EndPoints.WISHLIST);\n GsonRequest<WishlistResponse> getWishlistInfo = new GsonRequest<WishlistResponse>(Request.Method.GET, wishlistUrl, null, WishlistResponse.class, new Response.Listener<WishlistResponse>() {\n @Override\n public void onResponse(@NonNull WishlistResponse response) {\n if(response != null) {\n if(response.getStatusText() != null && response.getStatusCode() != null) {\n if (response.getStatusCode().toLowerCase().equals(CONST.RESPONSE_CODE) || response.getStatusText().toLowerCase().equals(CONST.RESPONSE_UNAUTHORIZED)) {\n LoginDialogFragment.logoutUser(true);\n DialogFragment loginExpiredDialogFragment = new LoginExpiredDialogFragment();\n loginExpiredDialogFragment.show(getFragmentManager(), LoginExpiredDialogFragment.class.getSimpleName());\n }\n }\n else\n prepareWishListButton(response, productId);\n }\n else\n Timber.d(\"returned null response during getWishListInfo\");\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n MsgUtils.logAndShowErrorMessage(getActivity(), error);\n }\n }, getFragmentManager(), \"\");\n getWishlistInfo.setRetryPolicy(MyApplication.getDefaultRetryPolice());\n getWishlistInfo.setShouldCache(false);\n MyApplication.getInstance().addToRequestQueue(getWishlistInfo, CONST.PRODUCT_REQUESTS_TAG);\n }\n }",
"ArrayList<Product> ListOfProducts();",
"@Override\n\tpublic List<Products> getAllProduct() {\n\t\treturn dao.getAllProduct();\n\t}",
"@GetMapping(\"/getproduct\")\n\t\tpublic List<Product> getAllProduct() {\n\t\t\tlogger.info(\"products displayed\");\n\t\t\treturn productService.getAllProduct();\n\t\t}",
"public List<Product> list();",
"private void getAllProducts() {\n }",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"@Override\n\tpublic List<Product> getAllProduct() {\n\t\treturn productRepository.findAll();\n\t}",
"public static List<Product> getProductList() {\n\n ArrayList<Product> list = new ArrayList<>();\n\n //Creating Products\n Product product1 = new Product(1, \"Call of Duty 1\");\n Product product2 = new Product(2, \"Call of Duty 2\");\n Product product3 = new Product(3, \"Final Fantasy XVI\");\n Product product4 = new Product(5, \"Final Fantasy X\");\n Product product5 = new Product(6, \"XCOM\");\n Product product6 = new Product(7, \"Borderland 2\");\n Product product7 = new Product(8, \"Red Dead Redemption 2\");\n Product product8 = new Product(9, \"Uncharted: The Lost Legacy\");\n\n //Populating the ArrayList with Product objects\n list.add(product1);\n list.add(product2);\n list.add(product3);\n list.add(product4);\n list.add(product5);\n list.add(product6);\n list.add(product7);\n list.add(product8);\n\n return list;\n }",
"public void showAllProducts() {\n try {\n System.out.println(Constants.DECOR+\"ALL PRODUCTS IN STORE\"+Constants.DECOR_END);\n List<Product> products = productService.getProducts();\n System.out.println(Constants.PRODUCT_HEADER);\n for (Product product : products) { \n System.out.println((product.getName()).concat(\"\\t\\t\").concat(product.getDescription()).concat(\"\\t\\t\")\n .concat(String.valueOf(product.getId()))\n .concat(\"\\t\\t\").concat(product.getSKU()).concat(\"\\t\").concat(String.valueOf(product.getPrice()))\n .concat(\"\\t\").concat(String.valueOf(product.getMaxPrice())).concat(\"\\t\")\n .concat(String.valueOf(product.getStatus()))\n .concat(\"\\t\").concat(product.getCreated()).concat(\"\\t\\t\").concat(product.getModified())\n .concat(\"\\t\\t\").concat(String.valueOf(product.getUser().getUserId())));\n }\n } catch (ProductException ex) {\n System.out.println(ex);\n }\n }",
"private List<FreeShopProduct> getProductList() {\n\n productList = new ArrayList<>();\n productList.add(new FreeShopProduct(R.drawable.db_school_small, getResources().getString(R.string.shopItem0)));\n productList.add(new FreeShopProduct(R.drawable.db_clothes_small, getResources().getString(R.string.shopItem1)));\n productList.add(new FreeShopProduct(R.drawable.db_emotions_small, getResources().getString(R.string.shopItem2)));\n productList.add(new FreeShopProduct(R.drawable.db_etiquette_small, getResources().getString(R.string.shopItem3)));\n productList.add(new FreeShopProduct(R.drawable.db_landforms_small, getResources().getString(R.string.shopItem4)));\n productList.add(new FreeShopProduct(R.drawable.db_fruits_small, getResources().getString(R.string.shopItem5)));\n productList.add(new FreeShopProduct(R.drawable.db_kingdom_small, getResources().getString(R.string.shopItem6)));\n productList.add(new FreeShopProduct(R.drawable.db_outerspace_small, getResources().getString(R.string.shopItem7)));\n productList.add(new FreeShopProduct(R.drawable.db_festival_small, getResources().getString(R.string.shopItem8)));\n productList.add(new FreeShopProduct(R.drawable.db_music_small, getResources().getString(R.string.shopItem9)));\n\n return productList;\n }",
"@Override\n public Iterable<Product> findAllProduct() {\n return productRepository.findAll();\n }",
"@Override\r\n\tpublic List<Product> getallProducts() {\n\t\treturn dao.getallProducts();\r\n\t}",
"public List<Product> getProductByName() {\n \n List<Product> listProduct= productBean.getProductByName(productName);\n return listProduct;\n }",
"public List<Product> getAllProducts()\n {\n SQLiteDatabase db = this.database.getWritableDatabase();\n\n // Creates a comma-separated string of all columns in the shopping list table\n String values = TextUtils.join(\", \", ShoppingListTable.COLUMNS);\n\n // Constructs the SQL query\n String sql = String.format(\"SELECT %s FROM %s\", values, ShoppingListTable.TABLE_NAME);\n\n Cursor query = db.rawQuery(sql, null);\n\n Product product = null;\n List<Product> products = new ArrayList<>();\n\n // Check whether there are any products\n if (query.moveToFirst())\n {\n do\n {\n int tpnb = Integer.parseInt(query.getString(0));\n String name = query.getString(1);\n String description = query.getString(2);\n float cost = Float.parseFloat(query.getString(3));\n float quantity = Float.parseFloat(query.getString(4));\n String superDepartment = query.getString(5);\n String department = query.getString(6);\n String imageURL = query.getString(7);\n Boolean isChecked = query.getString(8).equals(\"1\");\n int amount = Integer.parseInt(query.getString(9));\n int position = Integer.parseInt(query.getString(10));\n\n product = new Product(tpnb, name, description, cost, quantity, superDepartment, department, imageURL);\n\n product.setChecked(isChecked);\n product.setAmount(amount);\n product.setPosition(position);\n\n products.add(product);\n }\n while (query.moveToNext());\n }\n\n return products;\n }",
"public List<Product> getAll() {\n List<Product> list = new ArrayList<>();\n String selectQuery = \"SELECT * FROM \" + PRODUCT_TABLE;\n SQLiteDatabase database = this.getReadableDatabase();\n try (Cursor cursor = database.rawQuery(selectQuery, null)) {\n if (cursor.moveToFirst()) {\n do {\n int id = cursor.getInt(0);\n String name = cursor.getString(1);\n String url = cursor.getString(2);\n double current = cursor.getDouble(3);\n double change = cursor.getDouble(4);\n String date = cursor.getString(5);\n double initial = cursor.getDouble(6);\n Product item = new Product(name, url, current, change, date, initial, id);\n list.add(item);\n }\n while (cursor.moveToNext());\n }\n }\n return list;\n }",
"@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}",
"@Override\r\n public void getProduct() {\r\n\r\n InventoryList.add(new Product(\"Prod1\", \"Shirt\", \"Each\", 10.0, LocalDate.of(2021,03,19)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,21)));\r\n InventoryList.add(new Product(\"Prod1\", \"Trousers\", \"Each\", 20.0, LocalDate.of(2021,03,29)));\r\n }",
"@POST\n\t@Path(\"/getWishlist\")\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\tpublic String getWishlist(WishlistProduct user_data) {\n\t\t\n\t\tWishlistProductDAO WishlistProductDao = new WishlistProductDAO();\n\t\tList<WishlistProduct> wishlistedProducts = WishlistProductDao.getWishlistProductsByWishlistID(user_data.getWishlist_id());\n\t\t\n\t\tWishlistDAO WishlistDao = new WishlistDAO();\n\t\tWishlist wishlist = WishlistDao.getWishlistDetailsByID(user_data.getWishlist_id());\n\t\t\n\t\tJSONArray products = new JSONArray();\n\t\t\n\t\tfor(int i=0; i<wishlistedProducts.size();i++)\n\t\t{\n\t\t\tJSONObject product = new JSONObject();\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tproduct.put(\"wishlist_name\", wishlist.getName());\n\t\t\t\tproduct.put(\"req_qty\", wishlistedProducts.get(i).getQuantity());\n\t\t\t\tproduct.put(\"remaining_qty\", wishlistedProducts.get(i).getRemaining_qty());\n\t\t\t\tproduct.put(\"address\", wishlistedProducts.get(i).getAddress());\n\t\t\t\tproduct.put(\"reason\", wishlistedProducts.get(i).getReason());\n\t\t\t\t\t\n\t\t\t\tCatalogDAO CatalogDao = new CatalogDAO();\n\t\t\t\tCatalog productDetails = CatalogDao.getProductByID(wishlistedProducts.get(i).getProduct_id());\n\t\t\t\t\n\t\t\t\tproduct.put(\"product_id\", productDetails.getProduct_id());\n\t\t\t\tproduct.put(\"product_name\", productDetails.getProduct_name());\n\t\t\t\tproduct.put(\"product_qty\", productDetails.getQuantity());\n\t\t\t\tproduct.put(\"brand\", productDetails.getBrand());\n\t\t\t\tproduct.put(\"description\", productDetails.getDescription());\n\t\t\t\tproduct.put(\"price\", productDetails.getPrice());\n\t\t\t\tproduct.put(\"pic_location\", productDetails.getPic_location());\n\t\t\t\t\n\t\t\t\tproducts.put(product);\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn products.toString();\n\t\t\n\t}",
"public List<Product> getAll() {\n\t\treturn productRepository.findAll();\n\n\t}",
"public List<Product> getProducts() {\n return products;\n }",
"public List<Product> getAllProducts() {\n return new ArrayList<Product>(this.products.values());\n }",
"public List<Wish> getAllWishes() {\n List<Wish> wishes = new ArrayList<Wish>();\n String selectQuery = \"SELECT * FROM \" + TABLE_WISH;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Wish wh = new Wish();\n wh.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n wh.setWishName((c.getString(c.getColumnIndex(KEY_WISHNAME))));\n wh.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to wish list\n wishes.add(wh);\n } while (c.moveToNext());\n }\n c.close();\n return wishes;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic ProductResponseModel getAllProduct() {\n\r\n\t\tProductResponseModel productResponseModel = new ProductResponseModel();\r\n\r\n\t\tMap<String, Object> map = productRepositoryImpl.getAllProduct();\r\n\r\n\t\t// productResponseModel.setCount((long) map.get(\"count\"));\r\n\t\tList<Product> product = (List<Product>) map.get(\"data\");\r\n\t\tList<ProductModel> productList = product.stream().map(p -> new ProductModel(p.getId(), p.getProName(),\r\n\t\t\t\tp.getProPrice(), p.getProQuantity(), p.getProDescription(), p.getProSize()))\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tproductResponseModel.setData(productList);\r\n\r\n\t\treturn productResponseModel;\r\n\t}",
"public ArrayList<Product> getProducts() {\n\t\tArrayList<Product> scannedItems = new ArrayList<>();\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\tProduct possibleProductToShow = this.getProductFromItem(item);\n\t\t\tif (possibleProductToShow != null) {\n\t\t\t\tscannedItems.add(possibleProductToShow);\n\t\t\t}\n\t\t}\n\n\t\treturn scannedItems;\n\t}",
"public ArrayList<Product> getAllProducts(){\r\n\t\tArrayList<Product> prods = new ArrayList<Product>();\r\n\t\tIterator<Integer> productCodes = inventory.keySet().iterator();\r\n\t\twhile(productCodes.hasNext()) {\r\n\t\t\tint code = productCodes.next();\r\n\t\t\tfor(Product currProduct : Data.productArr) {\r\n\t\t\t\tif(currProduct.getID() == code) {\r\n\t\t\t\t\tprods.add(currProduct);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn prods;\r\n\t}",
"@Override\n\tpublic List<ProductInfo> getProducts() {\n\t\treturn shoppercnetproducts;\n\t}",
"public List<Product> getPurchases() {\n return purchases;\n }",
"public ArrayList<ItemModel> getAllProducts() {\n ArrayList<ItemModel> products = new ArrayList<ItemModel>();\n SQLiteDatabase db = DBHelper.getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + DBHelper.TABLE_SHOPPINGLIST, null);\n\n c.moveToFirst();\n Log.d(DatabaseHelper.class.getName(), \"getAllProducts:\");\n\n while (!c.isAfterLast()) {\n String product = String.valueOf(c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_PID)));\n String quantity=String.valueOf(c.getDouble(c.getColumnIndex(DBHelper.SHOPPINGLIST_QUANTITY)));\n String unit = String.valueOf(c.getString(c.getColumnIndex(DBHelper.SHOPPINGLIST_UNIT)));\n int che = c.getInt(c.getColumnIndex(DBHelper.SHOPPINGLIST_CHECKMARK));\n boolean check;\n if (che==0) {check=Boolean.FALSE;} else {check = Boolean.TRUE;}\n\n ItemModel model = new ItemModel(product, quantity, unit, check);\n products.add(model);\n\n\n c.moveToNext();\n }\n\n db.close();\n\n for (ItemModel ph: products) {\n ph.setProduct(getNameByPID(Integer.parseInt(ph.getProductName())));\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllProducts:\" + ph.toString());\n }\n\n return products;\n }",
"@Override\n public List getAllSharingProduct() {\n \n List sharingProducts = new ArrayList();\n SharingProduct sharingProduct = null;\n Connection connection = null;\n PreparedStatement preparedStatement = null;\n ResultSet result = null;\n try {\n connection = MySQLDAOFactory.createConnection();\n preparedStatement = connection.prepareStatement(Read_All_Query);\n preparedStatement.execute();\n result = preparedStatement.getResultSet();\n \n while (result.next()) {\n sharingProduct = new SharingProduct(result.getString(1), result.getInt(2) );\n sharingProducts.add(sharingProduct);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n try {\n result.close();\n } catch (Exception rse) {\n rse.printStackTrace();\n }\n try {\n preparedStatement.close();\n } catch (Exception sse) {\n sse.printStackTrace();\n }\n try {\n connection.close();\n } catch (Exception cse) {\n cse.printStackTrace();\n }\n }\n \n return sharingProducts;\n }",
"public List<productmodel> getproductbyname(String name);",
"public ArrayList<ShowProductLIstBean> showProductlist() {\n\n\t\tArrayList<ShowProductLIstBean> productdetails = new ArrayList<ShowProductLIstBean>();\n\n\t\tString driverClass = \"com.mysql.jdbc.Driver\";\n\t\tString dbUrl = \"jdbc:mysql://localhost:3306/pmsdb\";\n\t\tString dbUser = \"root\";\n\t\tString dbPswd = \"root\";\n\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\ttry {\n\t\t\tClass.forName(driverClass);\n\t\t\tcon = DriverManager.getConnection(dbUrl, dbUser, dbPswd);\n\n\t\t\tpstmt = con.prepareStatement(\"SELECT * FROM `pms_prd_details`\");\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tShowProductLIstBean spd = null;\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tspd = new ShowProductLIstBean();\n\t\t\t\tspd.setProductId(rs.getInt(\"producid\"));\n\t\t\t\tspd.setProductName(rs.getString(\"productname\"));\n\t\t\t\tspd.setQuantity(rs.getInt(\"quantity\"));\n\t\t\t\tspd.setPrice(rs.getFloat(\"price\"));\n\t\t\t\tspd.setVname(rs.getString(\"vendorname\"));\n\n\t\t\t\tproductdetails.add(spd);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tif (con != null) {\n\t\t\t\ttry {\n\t\t\t\t\tcon.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (pstmt != null) {\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn productdetails;\n\t}",
"public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}",
"@Override\r\n\tpublic List prodAllseach() {\n\t\treturn adminDAO.seachProdAll();\r\n\t}",
"public List<Product> get() {\r\n return sessionFactory.getCurrentSession()\r\n .createCriteria(Product.class)\r\n .addOrder(Order.asc(\"name\"))\r\n .list();\r\n }",
"public ArrayList<Product> getProducts(int warehouseNumber) { return db.retrieve_warehouse(warehouseNumber); }",
"@Override\r\n\tpublic List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\r\n\t}",
"public List<Product> returnProducts() throws FlooringMasteryDaoException {\n\n List<Product> products = dao.loadProductInfo();\n return products;\n\n }",
"@Override\n\tpublic List<Product> getByHot() throws SQLException {\n\t\treturn productDao.getByHot();\n\t}",
"public ArrayList<ItemModel> getAllCheckedProduct() {\n ArrayList<ItemModel> allProducts;\n ArrayList<ItemModel> checkedProducts = new ArrayList<ItemModel>();\n allProducts = getAllProducts();\n Log.d(DatabaseHelper.class.getName(), \"getAllCheckedProducts:\");\n for (ItemModel item : allProducts) {\n if (item.isAcquired()) {\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllCheckedProducts:\" + item.toString());\n\n checkedProducts.add(item);\n }\n }\n\n return checkedProducts;\n }",
"List<transactionsProducts> purchasedProducts();",
"List<Product> getProducts(Order order);",
"public List<Product> getFilteredRecommendedProductsList() {\n return filteredRecommendedProductsList;\n }",
"public String productList(ProductDetails p);",
"@Override\r\n\tpublic List<Product> showAll() throws Exception {\n\t\treturn this.dao.showAll();\r\n\t}",
"@Override\n\tpublic List<Product> selectAllProduct() {\n\t\treturn productMapper.selectAllProduct();\n\t}",
"public List<Product> findHot() {\n\t\t\treturn productDao.findHot();\n\t\t}",
"@Override\r\n\tpublic List<PayedProduct> getAllInfoProduct(String pname) {\n\t\tList<PayedProduct> list=null;\r\n\t\ttry {\r\n\t\t\tString sql=\"SELECT * FROM payedproduct WHERE payedproduct_name LIKE CONCAT('%',?,'%')\";\r\n\t\t\treturn qr.query(sql, new BeanListHandler<PayedProduct>(PayedProduct.class),pname);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public static ObservableList<Product> getAllProducts() {\n return allProducts;\n }",
"@Override\r\n\tpublic List<Product> findAllProducts() {\n\t\treturn productRepository.findAllProducts();\r\n\t}",
"public String clickWishListProductListAndGetProductHeader()throws Exception{\r\n SearchPageFactory pageFactory = new SearchPageFactory(driver);\r\n clickElement(pageFactory.openWishlistProductList,Constant.explicitTime);\r\n String wishlistProductItemHeader = getElementText(pageFactory.wishListRelatedItemHeader);\r\n return wishlistProductItemHeader;\r\n }",
"public List<ProductDto> getProducts() {\n\t\tString url = URL_BASE + \"/list\";\n\n\t\tResponseEntity<List<ProductDto>> responseEntity = restTemplate.exchange(url, HttpMethod.GET, HttpEntity.EMPTY,\n\t\t\t\tnew ParameterizedTypeReference<List<ProductDto>>() {\n\t\t\t\t});\n\t\tList<ProductDto> playerList = responseEntity.getBody();\n\t\treturn playerList;\n\t}",
"public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }",
"public List<Product> getAllProducts() {\n\t\treturn dao.getAllProducts();\n\t}",
"public List<Product> getAllProducts() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = (Query) session.createQuery(\"from Product\");\r\n\t\tList<Product> products = query.list();\r\n\t\treturn products;\r\n\t}",
"@NonNull\n public List<Product> findAll() {\n return productRepository.findAll();\n }",
"@Override\r\n public List<Product> findAll() {\r\n return productRepository.findAll();\r\n }",
"public static List<AddCollection> findAllProduct() {\n\t\treturn null;\n\t}",
"public List<Product> getProductByID() {\n List<Product> listProduct= productBean.getProductByID(productId);\n return listProduct;\n }",
"public List<Product> getProducts() {\n\t\treturn productRepository.findAll();\n\t}",
"@GetMapping(\"/product/ratings\")\n\tpublic List<Product> getProductsByRatingsAndCategoryAndFeatured(){\n\t\tList<Product> list = productRepository.getProductsByRatingsAndCategoryAndFeatured(\"MOBILE\",true);\n\t\treturn list;\n\t}",
"public void listarProducto() {\n }",
"public ObservableList<Product> getAllProducts() {\n return allProducts;\n }",
"public ArrayList<Product> getProductList() {\r\n return this.productList;\r\n }",
"@Override\n\tpublic List<Product> getProducts() {\n\t\treturn productDao.getProducts();\n\t}",
"@Override\n\tpublic List<Product> findAll() {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\tResultSet rs=null;\n\t\t\n\t\tList<Product> list=new ArrayList<Product>();\n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"select id,category_id,name,Subtitle,main_image,sub_images,detail,price,stock,status,create_time,update_time from product\");\n\t\t\t\n\t\t\trs=pst.executeQuery();\n\t\t while(rs.next()) {\n\t\t \t Product product =new Product(rs.getInt(\"id\"),rs.getInt(\"category_id\"),rs.getString(\"name\"),rs.getString(\"Subtitle\"),rs.getString(\"main_image\"),rs.getString(\"sub_images\"),rs.getString(\"detail\"),rs.getBigDecimal(\"price\"),rs.getInt(\"stock\"),rs.getInt(\"status\"),rs.getDate(\"create_time\"),rs.getDate(\"update_time\"));\n\t\t \t list.add(product);\n\t\t \t \n\t\t } \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst, rs);\n\t\t\t} catch (SQLException 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\n\t\treturn list;\n\t}",
"@GetMapping(\"/sysadm/product\")\n public String showAllProduct() {\n return \"admin/sysadm/productList\";\n }",
"@Override\n\t\tpublic List<ProductInfo> getProducts() {\n\t\t\treturn TargetProducts;\n\t\t}",
"@Override\n\tpublic List<Products> getProducts() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Products> theQuery = currentSession.createQuery(\"from Products order by id\", Products.class);\n\n\t\t// execute query and get result list\n\t\tList<Products> products = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn products;\n\n\t}",
"public ArrayList<Product> viewAllProduct() throws ProductException{\r\n\t\t\tArrayList<Product> products=new ArrayList<Product>();\r\n\t\t\tif(ProductRepository.productsList.isEmpty()) {\r\n\t\t\t\tthrow new ProductException(\"there are no products in the store\");\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\r\n\t\t\tproducts.addAll(pDoa.viewProductsDoa());\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn products;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic List<Product> getAllProductByName(String name) {\n\t\treturn productRepository.findByName(name);\n\t}",
"@Override\r\n\tpublic List<Product> getProducts() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<Product> getAll() throws SQLException {\n\t\treturn null;\n\t}",
"public List<Product> getProducten() {\n\t\treturn productKeus;\n\t}",
"public List<Product> getProductList() {\n\t\treturn productList;\n\t}",
"public ShowProductListLimited() {\n initComponents();\n List<Product> products = WinkelApplication.getQueryManager().getProductList();\n DefaultTableModel model = (DefaultTableModel) this.jTable1.getModel();\n for (Product product : products) {\n model.addRow(new Object[]{new Integer(product.getProductId()),\n product.getCategorieId(),\n product.getName(),\n product.getPrice(),\n product.getDescription()});\n }\n }",
"List<Product> getAllProducts() throws DataBaseException;",
"public ObservableList<Product> getAllProduct()\n {\n ObservableList<Product> product =FXCollections.observableArrayList();\n try {\n state = ConnectionDB.openConnection().createStatement();\n ResultSet result = state.executeQuery(\"SELECT * FROM product\");\n \n \n \n while(result.next())\n {\n // if define object out while will store last row n time\n Product pr = new Product(); \n pr.setId(result.getInt(1));\n pr.setName(result.getString(2));\n pr.setNumber(result.getInt(3));\n pr.setPrice(result.getInt(4));\n product.add(pr); \n }\n } catch (SQLException ex) {\n Logger.getLogger(ProductControl.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return product;\n }",
"public List<Product> scrapeProducts() {\n\n // Create empty list for the products that are going to be fetched\n List<Product> foundProducts = new ArrayList<>();\n\n // Open the url\n getDriver().get(getWebStore().getURL());\n\n // Locate the overview of all products\n System.out.println(getWebStore().getURL());\n WebElement productsOverview = getDriver().findElement(By.cssSelector(getWebStore().getProductsOverviewSelector()));\n\n // Get all products per class\n List<WebElement> products = productsOverview.findElements(By.className(getWebStore().getProductSelector().substring(1)));\n\n // Create a new webScraper\n WebScraper productPage = new WebScraper();\n productPage.setDriver(new HtmlUnitDriver());\n\n // Loop thru all found products and scrape information that is needed\n for (WebElement product : products) {\n Product newProduct = new Product();\n\n try {\n // Set up the information that is already visible\n newProduct.setBrand(new Brand(webStore.getBrand()));\n\n // Find the redirect link\n newProduct.setRedirectURL(\n product.findElement(By.cssSelector(webStore.getProductURLSelector())).getAttribute(\"href\")\n );\n\n foundProducts.add(newProduct);\n } catch (Exception e) {\n // Show error message when something goes wrong\n System.out.printf(\"Something went wrong while fetching the products of the brand: %s\\n\", getWebStore().getBrand());\n e.printStackTrace();\n }\n }\n\n // Add additional data to the products by visiting their individual page\n for (Product foundProduct : foundProducts) {\n try {\n scrapeAdditionalDataOfProduct(foundProduct);\n } catch (Exception e) {\n System.out.printf(\"Something went wrong while fetching the products of the brand: %s\\n\", getWebStore().getBrand());\n }\n }\n\n for (int i = 0; i < foundProducts.size(); i++) {\n if (foundProducts.get(i).getName() == null) {\n foundProducts.remove(foundProducts.get(i));\n }\n }\n\n return foundProducts;\n }",
"List<CheckoutProduct> findAll();",
"@Override\n public ArrayList<ProductType> loadProducts() {\n ProductType product = new ProductType(\"TestProduct\", new BigDecimal(\"5.00\"), new BigDecimal(\"10.00\"));\n ArrayList<ProductType> list = new ArrayList<>();\n list.add(product);\n return list;\n }",
"public List<Product> readAll() {\n\t\treturn null;\n\t}",
"public List<ProductDto> getProducts() {\n return tradingSystemFacade.getProducts();\n }",
"public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }",
"public Set<JavaproductModel> getproductList(Set<JavaproductModel> SetOfproductList){\n\n /* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Retrieve the list of product resources that are needed.*/\n String strHibernateQuery = \"FROM JavaproductModel\";\n Query hibernateQuery = hibernateSession.createQuery(strHibernateQuery);\n SetOfproductList = new HashSet(hibernateQuery.list());\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n return SetOfproductList;\n }"
] | [
"0.7600301",
"0.7218668",
"0.7068378",
"0.6966116",
"0.69275635",
"0.69275635",
"0.6824801",
"0.6803957",
"0.68029636",
"0.6769073",
"0.6758213",
"0.6758213",
"0.6758213",
"0.670208",
"0.66994214",
"0.664461",
"0.66284287",
"0.66283643",
"0.66280794",
"0.65832496",
"0.6546762",
"0.65466094",
"0.65466094",
"0.6509737",
"0.65036845",
"0.64893585",
"0.648723",
"0.6459669",
"0.6457782",
"0.6455642",
"0.6434565",
"0.6434292",
"0.64054793",
"0.63989055",
"0.63985157",
"0.63935316",
"0.6392679",
"0.6388489",
"0.6371001",
"0.63630277",
"0.6345512",
"0.63384616",
"0.6333529",
"0.6326584",
"0.6325965",
"0.6322482",
"0.6305453",
"0.6303881",
"0.62981445",
"0.62936866",
"0.62867725",
"0.6286008",
"0.6284472",
"0.627548",
"0.62623",
"0.62416285",
"0.62298006",
"0.62296414",
"0.62171143",
"0.6216035",
"0.62063223",
"0.61950666",
"0.6180778",
"0.6176312",
"0.6171919",
"0.61646956",
"0.61611944",
"0.6160657",
"0.6157373",
"0.6154872",
"0.61537415",
"0.61390626",
"0.61285186",
"0.61252755",
"0.6103386",
"0.60990554",
"0.60963094",
"0.60883105",
"0.6082212",
"0.605381",
"0.6043948",
"0.60424066",
"0.60407096",
"0.60360944",
"0.6035461",
"0.60315555",
"0.60289025",
"0.60270476",
"0.6025828",
"0.6025259",
"0.60143405",
"0.60052115",
"0.5996395",
"0.599441",
"0.59926236",
"0.5990881",
"0.5986419",
"0.5984385",
"0.5979816",
"0.59762555"
] | 0.75958145 | 1 |
The update() method is an abstract method that is called whenever the notifyObservers() method is called by the Observable class First we check to see if the NotificationNumber is equal to this thread's RegistrationNumber. If they are, then we execute. | public void update(Observable thing, Object notificationNumber) {
if (registrationNumber.compareTo((Integer) notificationNumber) == 0) {
Displays display = new Displays();
display.displayDeliveryNotAssigned(CommonData.theListOfDeliveries
.getListOfDeliveries());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void notifyUpdate() {\n if (mObserver != null) {\n synchronized (mObserver) {\n mNotified = true;\n mObserver.notify();\n }\n }\n }",
"@Override\n public void doUpdate(NotificationMessage notification) {\n \n }",
"private void notifyObservers() {\n\t\tfor (Observer observer : subscribers) {\n\t\t\tobserver.update(theInterestingValue); // we can send whole object, or just value of interest\n\t\t\t// using a pull variant, the update method will ask for the information from the observer\n\t\t\t// observer.update(this)\n\t\t}\n\t}",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer1 has received update!\");\r\n\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}",
"public void notifyObservers() {}",
"private void notifyObservers() {\n\t\tIterator<Observer> i = observers.iterator();\r\n\t\twhile( i.hasNext() ) {\r\n\t\t\tObserver o = ( Observer ) i.next();\r\n\t\t\to.update( this );\r\n\t\t}\r\n\t}",
"public void updateObserver();",
"@Override\n\tpublic void notifyObservers() {\n\t\tfor (Observer obs : this.observers)\n\t\t{\n\t\t\tobs.update();\n\t\t}\n\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t\tfor (Observer o : this.observers) {\r\n\t\t\to.update();\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void notifyObservers() {\n\t for(Observer o : observers){\r\n\t\t o.update();\r\n\t }\r\n\t}",
"private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer2 has received update!\");\r\n\t}",
"@Override\r\n\tpublic void update(Observable observable, Object data) {\n\t\tfinal int eventID = ((NotificationInfoObject) data).actionID;\r\n\r\n\t\tif ((nwrap.getApplicationState() == ApplicationState.IDLE) || (nwrap.getApplicationState() == ApplicationState.INST_SERVICE)) {\r\n\r\n\t\t\tswitch (eventID) {\r\n\t\t\tcase EventIDs.EVENT_INST_STARTED:\r\n\t\t\t\tLog.d(TAG, \"EVENT_INST_STARTED \");\r\n\t\t\t\tbroadcastIntent(\"org.droidtv.euinstallertc.CHANNEL_INSTALL_START\");\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase EventIDs.EVENT_INST_STOPPED:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase EventIDs.EVENT_INST_COMPLETED:\r\n\t\t\t\tLog.d(TAG, \"EVENT_INST_COMPLETED \");\r\n\t\t\t\t// check if channels added /removed\r\n\t\t\t\tnwrap.commitDatabaseToTvProvider(false);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase EventIDs.EVENT_NETWORK_UPDATE_DETECTED:\r\n\t\t\t\tLog.d(TAG, \"EVENT_NETWORK_UPDATE_DETECTED \");\r\n\t\t\t\t// The Update dialog is only needed for UPC operator : CR AN-717\r\n\t\t\t\tLog.d(TAG, \"Current Operator\" + nwrap.getOperatorFromMW());\r\n\t\t\t\tif (nwrap.getOperatorFromMW() == NativeAPIEnums.Operators.UPC){\r\n\t\t\t\t\tLog.d(TAG, \"UPC operator or APMEAbackgroundNWupdateDVBT\\n\");\r\n\t\t\t\t\tif (mContext != null) {\r\n\t\t\t\t\t\t// unregister service from notification framework\r\n\t\t\t\t\t\tntf.unregisterForNotification(thisInstance);\r\n\t\t\t\t\t\tLog.d(TAG, \"service context not null\");\r\n\t\t\t\t\t\t// stop installation if in progress\r\n\t\t\t\t\t\t// nwrap.stopInstallation(false); instead of doing this\r\n\t\t\t\t\t\t// we\r\n\t\t\t\t\t\t// will call stop-restart api in nativeapiwrapper\r\n\t\t\t\t\t\tif (nwrap.ifNetworkChangeDetected() == false) { // AN-49771\r\n\t\t\t\t\t\t\tIntent l_intent = new Intent(mContext, NetworkUpdateDialogActivity.class);\r\n\t\t\t\t\t\t\tl_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\t\t\t\tmContext.startActivity(l_intent);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tLog.d(TAG, \"User has already selected Later\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if(nwrap.IsAPMEAbackgroundNWupdate() && (DVBTOrDVBC.DVBT == nwrap.getSelectedDVBTOrDVBCFromTVS())){\r\n\t\t\t\t\tLog.d(TAG,\"APMEA network update\");\r\n\t\t\t\t\t// requirement APMEA Smitha TF515PHIALLMTK01-17521\r\n\t\t\t\t\tif (nwrap.ifNetworkChangeDetected() == false) {\r\n\t\t\t\t\t\tnwrap.showTVNofification(mContext, mContext.getString(org.droidtv.ui.strings.R.string.MAIN_MSG_CHANNEL_UPDATE_NEEDED));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnwrap.networkChangeDetected(true);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t// for all other non UPC countries\r\n\t\t\t\t\tnwrap.networkChangeDetected(true);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_DIGIT_CH_FOUND:\r\n\t\t\t\tLog.d(TAG, \"EventIDs.EVENT_DIGIT_CH_FOUND\");\r\n\t\t\t\t// query mw for digital channel count\r\n\t\t\t\t// update digit channels count\r\n\t\t\t\tnwrap.getDigitalChannelCount();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_DIGIT_CH_ADDED:\r\n\t\t\t\tLog.d(TAG, \"EventIDs.EVENT_DIGIT_CH_ADDED\");\r\n\t\t\t\tnwrap.getDigitalChannelCount();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_DIGIT_CH_REMOVED:\r\n\t\t\t\tLog.d(TAG, \"EventIDs.EVENT_DIGIT_CH_REMOVED\");\r\n\t\t\t\tnwrap.getDigitalChannelsRemoved();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_MAJORVERSION_UPDATE:\r\n\t\t\t\tLog.d(TAG, \"EventIDs.EVENT_MAJORVERSION_UPDATE\");\r\n\t\t\t\tnwrap.setMajorVersion();\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_NEWPRESETNUMBER:\r\n\t\t\t\tint presetNum = -1;\r\n\t\t\t\tString l_msg1 = (String) ((NotificationInfoObject) data).message; \r\n\t\t\t\tpresetNum = Integer.parseInt(l_msg1);\r\n presetAfterBackgroundUpdate = presetNum;\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase EventIDs.EVENT_COMMIT_FINISHED:\r\n\t\t\t\tnwrap.startLogoAssociation(nwrap.getSelectedDVBTOrDVBCFromTVS(), null);\r\n\t\t\t\tbroadcastIntent(\"org.droidtv.euinstallertc.CHANNEL_INSTALL_COMPLETE\");\r\n \tif (presetAfterBackgroundUpdate != -1) { \r\n\t\t\t\t nwrap.HandleTuneToLowestPreset (presetAfterBackgroundUpdate);\r\n }\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_TELENET_NAME_UPDATE:\r\n\t\t\t\tint presetNbr = -1, CABLE_MEDIUM = 1;\r\n\t\t\t\tString l_msg2 = (String) ((NotificationInfoObject) data).message; \r\n\t\t\t\tpresetNbr = Integer.parseInt(l_msg2);\r\n\t\t\t\t/* Currently this will happen only for Telenet */\r\n nwrap.SyncSingleChannelToDatabase (CABLE_MEDIUM, presetNbr);\r\n\t\t\t\tbreak;\r\n\t\t\tcase EventIDs.EVENT_TELENET_MAJOR_VERSION_UPDATE:\r\n\t\t\t\tnwrap.mUpdateDatabaseVersion(true);\r\n\t\t\t\tbroadcastIntent(\"org.droidtv.euinstallertc.CHANNEL_INSTALL_COMPLETE\");\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void notifyObservers();",
"public void notifyObservers();",
"public void notifyObservers();",
"static void NotifyCorrespondingObservers() {}",
"void notifyObservers();",
"void notifyObservers();",
"public void notifyObservers(int UPDATE_VALUE){\n\t\tfor(int i = 0; i < observerNodes.size();i++){\n\t\t\tNode currentNode = observerNodes.get(i);\n\t\t\tif(currentNode.filterType.filter(UPDATE_VALUE)) {\n\t\t\t\t\tcurrentNode.listen(UPDATE_VALUE);\n\t\t }\n\t\t}\n\t}",
"public void notifyObservers(){\n for (GameObserver g: observers){\n g.handleUpdate(new GameEvent(this,\n currentPlayer,\n genericWorldMap,\n gameState,\n currentTerritoriesOfInterest,\n currentMessage));\n }\n }",
"@Override\r\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer3 has received update!\");\r\n\t}",
"@Override\n void notifys() {\n for (Observer o : observers) {\n o.update();\n }\n }",
"public void notifyObservers() {\r\n for (Observer observer: this.observers) {\r\n observer.update(this);\r\n }\r\n\r\n// System.out.println(this);\r\n }",
"@Override\n public void notifyObservers() {\n for (Observer observer : observers){\n // observers will pull the data from the observer when notified\n observer.update(this, null);\n }\n }",
"public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}",
"protected void notifyObservers() {\n os.notify(this, null);\n }",
"private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\n }",
"public void notifyObservers() {\n for (int i = 0; i < observers.size(); i++) {\n Observer observer = (Observer)observers.get(i);\n observer.update(this.durum);\n }\n }",
"@Override\r\n\tpublic void notifyObservers() {\n\t\tfor(Observer o : list) {\r\n\t\t\t// Atualiza a informacao no observador\r\n\t\t\to.update(this, this);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void notifys() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update(this);\n\t\t}\n\t}",
"void notifyObserver();",
"private void m145784n() {\n nativeSetUpdateNotification(this.f119482o, this.f119477j.f119584j, this.f119477j.f119585k);\n }",
"@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}",
"@Override\n\tpublic void Notify() {\n\t\tfor (Observer observer : obs) {\n\t\t\tobserver.update();\n\t\t}\n\t}",
"public void update () {\n synchronized (this) {\n messagesWaiting.add\n (new OleThreadRequest(UPDATE,\n 0, 0, 0, 0));\n notify();\n }\n }",
"public void notifyUpdate(String publicID) {\n }",
"@Override\n public void run() {\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }",
"protected void notifyObservers()\n\t{\n\t Trace.println(Trace.EXEC_PLUS);\n\n\t for (TestGroupResultObserver observer : myObserverCollection)\n\t {\n\t \tobserver.notify(this);\n\t }\n\t}",
"@Override\n\tpublic void NotifyObserver() {\n\n\t}",
"public void notify1();",
"public void scheduledUpdate() {\n\n if (isUpdating.compareAndSet(false, true)) {\n\n if (getCurrentChannel() != null) {\n\n updateData();\n }\n }\n\n timer.cancel();\n timer.purge();\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new UpdateTask(), 3600000,\n 3600000);\n\n }",
"@Override\r\n\tpublic void Update() {\n\t\tSystem.out.println(name+\",¹Ø±ÕNBA£¬¼ÌÐø¹¤×÷£¡\"+abstractNotify.getAction());\r\n\t}",
"private static void notify(String fully_qualified_classname) {\n // notify the observers\n Iterator i = observers.iterator();\n while (i.hasNext()) {\n VerifierFactoryObserver vfo = (VerifierFactoryObserver) i.next();\n vfo.update(fully_qualified_classname);\n }\n }",
"@Override\n public void execute() {\n System.out.println(\"---------- OBSERVER PATTERN ----------\");\n Subject subject = new Subject();\n\n //create observers and pass in subject they want to observe (constructor code will add them as observers to the subject)\n new ObserverA(subject);\n new ObserverB(subject);\n\n //subject data changes and automatically updates all observers...triggering their souts (reporting the changed number)\n subject.changeUnstableInt();\n }",
"@Override\n public void update(Observable observable, Object o) {\n if (o instanceof ObserverFlag){\n ObserverFlag observerFlag=(ObserverFlag) o;\n // Si on reçoit un packet on notifie nos observers en leur donnant le packet\n if (observerFlag.getFlag() == ObserverFlag.Flag.packetReceived){\n String received=observerFlag.getPacket().getClass().toString();\n System.out.println(\"Unicast : \"+received+\" from \"+observerFlag.getPacket().getSource().getPseudo()+\" at \"+observerFlag.getPacket().getSource().getAddress().toString());\n notifyObservers(observerFlag.getPacket());\n }else{\n // Sinon on supprime le Thread de notre liste.\n observable.deleteObserver(this);\n Discussion t=(Discussion) observable;\n chatRooms.remove(t.distant.getInetAddress());\n }\n }\n }",
"@Override\n public void run() {\n if (needRefreshRegistration(registrationUri, resolvedDeployment)) {\n sendRegistrationEvent(resolvedDeployment);\n }\n }",
"@Override\n public void notifyObserver() {\n for(Observer o:list){\n o.update(w);\n }\n }",
"public void notifyObserver() {\n\r\n for (Observer observer : observers) {\r\n\r\n observer.update(stockName, price);\r\n\r\n }\r\n }",
"public void notifyObservers(){\r\n\t\tif (this.lastNews != null)\r\n\t\t\tfor (Observer ob: observers){\r\n\t\t\t\tob.updateFromLobby(lastNews);\r\n\t\t\t}\r\n\t}",
"@Override\n\t\t\tpublic void notify(Notification n) {\n\t\t\t\tif (isActive()) handleModelChanged();\n\t\t\t\trefreshAdapters();\n\t\t\t}",
"public void updateTask() {}",
"@Override\r\n\tpublic void notifyObservers() {\n\t\tEnumeration<Observer> enumo = vector.elements();\r\n\t\twhile(enumo.hasMoreElements()){\r\n\t\t\tenumo.nextElement().update();\r\n\t\t}\r\n\t}",
"public void notifyAllObservers() {\n\t\tfor(Observer observer : observers) {\n\t\t\tobserver.update();\n\t\t}\n\t}",
"@Override\n public void notify(Object event){\n }",
"@Test\n public void testNotifyObservers() {\n System.out.println(\"notifyObservers\");\n final Information i = null;\n final Notifier instance = new Notifier();\n final ObservingView o = new ObservingViewImpl();\n instance.addObservingView(o);\n instance.notifyObservers(i);\n }",
"private synchronized void notifyUpdatedProperty(String key, String value) {\n Observer[] observers = observersTable.get(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.updatedProperty(this, key, value);\n }\n }\n }",
"private void refreshNotification() {\n String str = this.mCurrentAddedNotiSsid;\n if (str != null) {\n showNotification(str, true, true);\n }\n String str2 = this.mCurrentDeletedNotiSsid;\n if (str2 != null) {\n showNotification(str2, false, true);\n }\n }",
"public void notifyObservers(String info){\r\n\t\tfor (Observer ob: observers){\r\n\t\t\tob.updateFromLobby(info);\r\n\t\t}\r\n\t}",
"public void update(Observable o, Object arg) {\n\n if (!(arg instanceof NodeChange)) {\n logger.severe(\"received unknown notification, ignore...\");\n return;\n }\n\n NodeChange nodeChange = (NodeChange) arg;\n if ((nodeChange.getCause() != NodeChange.MEMBER_JOINED) &&\n (nodeChange.getCause() != NodeChange.MEMBER_LEFT)) {\n // Ignore.\n return;\n }\n\n synchronized(cmmNotifications) {\n cmmNotifications.add(nodeChange);\n }\n }",
"public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void update(Observable observable, Object o) {\n javafx.application.Platform.runLater(this::refresh);\n }",
"@Override\r\n public void notify(Object arg) {\n }",
"private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }",
"@Override\r\n\tpublic void update(Observable arg0, Object arg1) {\n\t\t\r\n\t}",
"public void notifyObservers(Object... args)\n {\n for (IObserver observer : observers)\n {\n observer.update(this, args);\n }\n }",
"@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer Pattern on Room Reservation Notification: \");\n\t\tSystem.out.println(\"Your room is \" + reserve.getState()+\"\\n\");\n\t}",
"@Override\n public void notifySubscribers(Bundle notification) {\n for (ISubscriber subscriber : subscribers) {\n List<SubscriberFilter> filters = subscriber.getFilters();\n\n if (notification.getString(\"notificationType\").equals(subscriber.getNotificationType())) {\n if (notification.getString(\"userId\").equals(subscriber.getUser().getAuthUserID())) {\n if (!filters.isEmpty()) {\n List<Boolean> filterResults = new ArrayList<>();\n\n Object entity = notification.getSerializable(\"entity\");\n HashMap entityHashMap = (HashMap)entity;\n\n for (int index = 0; index < filters.size(); index++) {\n Object entityValue = entityHashMap.get(filters.get(index).getField());\n\n if (entityValue != null) {\n filterResults.add(filters.get(index).getValues().contains(entityValue));\n }\n }\n\n if (!filterResults.contains(false)) {\n entityHashMap.put(\"notificationId\", notification.getString(\"notificationId\"));\n entityHashMap.put(\"userId\", notification.getString(\"userId\"));\n subscriber.update(notification);\n }\n } else {\n subscriber.update(notification);\n }\n }\n }\n }\n }",
"public void notifyObserver(boolean result) {\r\n\t\tfor(Observer o : observers) {\r\n\t\t\to.updateStats(result);\r\n\t\t}\r\n\t}",
"protected abstract void registerObserver();",
"private void handleSimSubscriptionInfoChanged() {\n if (!this.mIsSimBindEnable) {\n Assert.isMainThread();\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged()\");\n List completeActiveSubscriptionInfoList = this.mSubscriptionManager.getCompleteActiveSubscriptionInfoList();\n if (completeActiveSubscriptionInfoList != null) {\n Iterator it = completeActiveSubscriptionInfoList.iterator();\n while (it.hasNext()) {\n Log.v(\"KeyguardUpdateMonitor\", \"SubInfo:\" + ((SubscriptionInfo) it.next()));\n }\n } else {\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged: list is null\");\n }\n List<SubscriptionInfo> subscriptionInfo = getSubscriptionInfo(true);\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < subscriptionInfo.size(); i++) {\n SubscriptionInfo subscriptionInfo2 = subscriptionInfo.get(i);\n if (refreshSimState(subscriptionInfo2.getSubscriptionId(), subscriptionInfo2.getSimSlotIndex())) {\n arrayList.add(subscriptionInfo2);\n }\n }\n for (int i2 = 0; i2 < arrayList.size(); i2++) {\n SimData simData = this.mSimDatas.get(Integer.valueOf(((SubscriptionInfo) arrayList.get(i2)).getSubscriptionId()));\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onSimStateChanged(simData.subId, simData.slotId, simData.simState);\n }\n }\n }\n callbacksRefreshCarrierInfo();\n }\n }",
"@Override\n\tpublic void update(Observable arg0, Object arg1) {\n\t\t\n\t}",
"public void notifyObservers(Observable observable,Board board) { \n\t\tGame.ui.get(0).update(observable,board); \n\t}",
"public void doNotify(){\n\t\tsynchronized(m){\n\t\t\tm.notifyAll();\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void update(Observable arg0, Object arg1) {\n\t\t}",
"@Override\n\tpublic void update(Observable observable, Object data) {\n\n\t}",
"@Override\n public void update(Observable arg0, Object arg1) {\n \n }",
"public void notifyObservers(){\n\t\tfor (ModelObserver c : controllers){\n\t\t\tc.update();\n\t\t}\n\t}",
"public void notifyBaseObservers(Object arg) {\n /*\n * a temporary array buffer, used as a snapshot of the state of\n * current BaseObservers.\n */\n Object[] arrLocal;\n\n synchronized (this) {\n /* We don't want the BaseBaseObserver doing callbacks into\n * arbitrary code while holding its own Monitor.\n * The code where we extract each Observable from\n * the Vector and store the state of the BaseBaseObserver\n * needs synchronization, but notifying observers\n * does not (should not). The worst result of any\n * potential race-condition here is that:\n * 1) a newly-added BaseBaseObserver will miss a\n * notification in progress\n * 2) a recently unregistered BaseBaseObserver will be\n * wrongly notified when it doesn't care\n */\n if (!changed) {\n return;\n }\n arrLocal = obs.toArray();\n clearChanged();\n }\n\n for (int i = arrLocal.length - 1; i >= 0; i--) {\n ((BaseObserver<M, T>) arrLocal[i]).update(this, arg);\n }\n }",
"@Override\r\n\tpublic void notifyObservers(){\r\n\t\tfor(IObserver obs : observers){\r\n\t\t\tobs.update(this, selectedEntity);\r\n\t\t}\r\n\t\tselectedEntity = null;\r\n\t}",
"private void sendNotification() {\n }",
"public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }",
"public void update(Observable observable, Object data) {\n if (observable instanceof StoreWorkerModel) {\n mNamesLayout.removeAllViews();\n fillNamesLayout(getActivity());\n mOverallView.onWorkersChanged();\n }\n\n // the store model has changed, notifying the overall view\n else if (observable instanceof StoreModel) {\n mOverallView.onWorkingTimesChanged();\n }\n }",
"public /* synthetic */ void lambda$new$1$KeyguardUpdateMonitor() {\n Intent registerReceiver;\n int defaultSubscriptionId = SubscriptionManager.getDefaultSubscriptionId();\n ServiceState serviceStateForSubscriber = ((TelephonyManager) this.mContext.getSystemService(TelephonyManager.class)).getServiceStateForSubscriber(defaultSubscriptionId);\n Handler handler = this.mHandler;\n handler.sendMessage(handler.obtainMessage(330, defaultSubscriptionId, 0, serviceStateForSubscriber));\n if (this.mBatteryStatus == null && (registerReceiver = this.mContext.registerReceiver(null, new IntentFilter(\"android.intent.action.BATTERY_CHANGED\"))) != null && this.mBatteryStatus == null) {\n this.mBroadcastReceiver.onReceive(this.mContext, registerReceiver);\n }\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tLog.d(TAG, \"Observer Looper enter()\");\n\t\t\t\t\tLooper.prepare();\n\t\t\t\t\tmLocalContactObserverLooper = Looper.myLooper();\n\t\t\t\t\tfinal Handler handler = new Handler();\n\t\t\t\t\thandler.post(new Runnable() { // Observer thread. Will allow us to get notifications even if the application is on background\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tmLocalContactObserver = new ContentObserver(handler) {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onChange(boolean selfChange) {\n\t\t\t\t\t\t\t\t\tsuper.onChange(selfChange);\n\t\t\t\t\t\t\t\t\tLog.d(TAG, \"Native address book changed\");\n\t\t\t\t\t\t\t\t\tload();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tNgnApplication.getContext().getContentResolver().registerContentObserver(CommonDataKinds.Phone.CONTENT_URI, \n\t\t\t\t\t\t\t\t\ttrue, mLocalContactObserver);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tLooper.loop();// loop() until quit() is called\n\t\t\t\t\tLog.d(TAG, \"Observer Looper exit()\");\n\t\t\t\t}",
"public void notifyObservers()\n\t{\n\t\tsetChanged();\n\t\tnotifyObservers(new GameWorldProxy(this));\n\t}",
"public final void update(){\n if(waitingToExecute){\n execute();\n waitingToExecute = false;\n }\n }",
"@Override\n public void run() {\n synchronized(_registries) {\n _udpServer.bcast(resp, _registries);\n }\n\n // Update each of the registration lists to remove outdated listeners\n updateRegistrations(_poseListeners);\n updateRegistrations(_imageListeners);\n updateRegistrations(_cameraListeners);\n updateRegistrations(_velocityListeners);\n updateRegistrations(_waypointListeners);\n synchronized(_sensorListeners) {\n for (Map<SocketAddress, Integer> sensorListener : _sensorListeners.values())\n updateRegistrations(sensorListener);\n }\n }",
"@Override\n public synchronized boolean update() {\n final UIMessageRequest req = UIMessageRequest.newBuilder()\n .setCode(UIMessageRequestCode.REQ_UPDATE)\n .setSleeptime(this.sleepTime)\n .build();\n\n final SwingWorker<UIMessageReply, Object> worker = new SwingWorker<UIMessageReply, Object>() {\n @Override\n public UIMessageReply doInBackground() {\n debug.println(\"update: send REQ_UPDATE message\");\n final UIMessageReply msg = ss.sendRecv(req);\n lastUpdate = new MJD().mjd;\n return msg;\n }\n\n @Override\n public void done() {\n try {\n final UIMessageReply msg = get();\n if (msg != null)\n processReply(msg);\n } catch (Exception ex) {\n System.err.println(\"Exception during RtDisplay.update()\");\n ex.printStackTrace();\n }\n }\n };\n\n worker.execute();\n return true;\n }",
"public void notifyObservers() {\r\n\t\tDoctorEvent evt;\r\n\t\tif (loggedIn) {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGIN, doctor);\r\n\t\t} else {\r\n\t\t\tevt = new DoctorEvent(DoctorEventType.LOGOUT, doctor);\r\n\t\t}\r\n\t\tfor (Iterator<IObserver> it = observers.iterator(); it.hasNext();) {\r\n\t\t\tIObserver observer = (IObserver) it.next();\r\n\t\t\tobserver.onNotify(evt);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void update(Observable arg0, Object arg1) {\n\t\tif (arg1 instanceof Object[]) {\n\t\t\tObject[] arg2 = (Object[]) arg1;\n\t\t\tConnectionToClient client = (ConnectionToClient) arg2[0];\n\t\t\tif (arg2[1] instanceof Object[]) {\n\t\t\t\tObject[] arg3 = (Object[]) arg2[1];\n\t\t\t\tString keymessage = (String) arg3[0];\n\t\t\t\tif (keymessage.equals(\"send the report\")) {\n\t\t\t\t\tEvaluationReport er = (EvaluationReport) arg3[1];\n\t\t\t\t\tConnection con = mysqlConnection.makeAndReturnConnection();\n\t\t\t\t\tmysqlConnection.insertReport(con, er);\n\t\t\t\t\tObject[] send = new Object[2];\n\t\t\t\t\tsend[0] = \"send the report\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\tclient.sendToClient(send);\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tEmployee chairman = mysqlConnection.getChairman(con);\n\t\t\t\t\tArrayList<Employee> committeMember = mysqlConnection.getEmployees(con, \"comittee member\");\n\t\t\t\t\tlong millis = System.currentTimeMillis();\n\t\t\t\t\tString notifcation = \"you have new Request: request with id \" + \" \" + er.getRequestID()\n\t\t\t\t\t\t\t+ \" start work\";\n\t\t\t\t\tNotification not = new Notification(notifcation, new java.sql.Date(millis),\n\t\t\t\t\t\t\t\"new request for committe\");\n\t\t\t\t\tnot = mysqlConnection.insertNotificationToDB(con, not);\n\t\t\t\t\tmysqlConnection.insertNotificationForUserToDB(con, not, chairman);\n\t\t\t\t\tmysqlConnection.insertNotificationForUserToDB(con, not, committeMember.get(0));\n\t\t\t\t\tmysqlConnection.insertNotificationForUserToDB(con, not, committeMember.get(1));\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void periodicUpdate();",
"public void notifyObservers() {\n\t\tfor(ElevatorObserver obs: observers) {\n\t\t\tobs.elevatorDidFinishTask(this);\n\t\t}\n\t}",
"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 }",
"@Override\n public void update(Observable observable, Object data) {\n Toast.makeText(this, \"I am notified\" + myBase.getObserver().getValue(), 0).show();\n btn.setText(\"value: \" + myBase.getObserver().getValue());\n\n }",
"@Override\n public void update(Observable o, Object arg) {\n setChanged();\n notifyObservers();\n }",
"@Override\n\tpublic void run() {\n\t\tsynchronized(this){\n\t\t\tSystem.out.println(Thread.currentThread().getName()+\" call notify()\");\n\t\t\tthis.notify();\n\t\t}\n\t}",
"@Override\n public void notifyUnitObservers() {\n for(UnitObserver unitObserver : unitObservers){\n unitObserver.update(entities.returnUnitRenderInformation());\n entities.setUnitObserver(unitObserver);\n }\n }",
"@Scheduled\n\tpublic void executeNotification();"
] | [
"0.6690349",
"0.63872164",
"0.6373696",
"0.62889004",
"0.62653935",
"0.61939675",
"0.6179152",
"0.61476797",
"0.6109253",
"0.610664",
"0.6093273",
"0.6088758",
"0.6071861",
"0.6053213",
"0.60509384",
"0.60509384",
"0.60509384",
"0.60349023",
"0.59960294",
"0.59960294",
"0.597803",
"0.59729654",
"0.5964838",
"0.5930778",
"0.59221697",
"0.5913386",
"0.5908891",
"0.5908688",
"0.5891487",
"0.5871504",
"0.5848149",
"0.58479786",
"0.5834246",
"0.57975215",
"0.57947665",
"0.57830215",
"0.5722868",
"0.5706578",
"0.570592",
"0.5696102",
"0.5679179",
"0.5661973",
"0.5657816",
"0.5657175",
"0.56545806",
"0.56341666",
"0.56230533",
"0.5592988",
"0.5576755",
"0.55669546",
"0.55612993",
"0.5558376",
"0.55464715",
"0.5537324",
"0.55092734",
"0.55068505",
"0.5491958",
"0.5489743",
"0.5470421",
"0.5462588",
"0.5454847",
"0.54542696",
"0.54508954",
"0.545076",
"0.54502684",
"0.54398817",
"0.5433626",
"0.5430634",
"0.5424088",
"0.5414322",
"0.5413877",
"0.5406347",
"0.54014266",
"0.53995925",
"0.53948784",
"0.5388623",
"0.538388",
"0.538249",
"0.5352345",
"0.5347206",
"0.5342276",
"0.5339383",
"0.5325854",
"0.53179365",
"0.5317704",
"0.5308176",
"0.53063405",
"0.5304345",
"0.5296305",
"0.52919024",
"0.5289248",
"0.52838933",
"0.52816504",
"0.5280887",
"0.5280169",
"0.5277403",
"0.5266382",
"0.5258386",
"0.52552575",
"0.52525604"
] | 0.68008095 | 0 |
Created by Subramanyam on 21Jan2017. | @PerActivity
@Component(dependencies = ApplicationComponent.class,
modules = {CarSelectionModule.class})
public interface CarSelectionComponent {
void inject(CarTypesActivity activity);
void inject(CarTypesFragment fragment);
void inject(MainTypesActivity activity);
void inject(MainTypesFragment fragment);
void inject(BuiltDatesActivity activity);
void inject(BuiltDatesFragment fragment);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"public final void mo51373a() {\n }",
"@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\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"protected boolean func_70814_o() { return true; }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n public void memoria() {\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}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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 int describeContents() { return 0; }",
"public Pitonyak_09_02() {\r\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public void init() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"private void m50366E() {\n }",
"@Override\n void init() {\n }",
"@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\tpublic void nefesAl() {\n\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"Petunia() {\r\n\t\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private void kk12() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\n\tpublic void ligar() {\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\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"private void strin() {\n\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() {\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\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\n public void init() {}",
"public void mo6081a() {\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\n protected void initialize() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n protected void init() {\n }",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"public void mo21877s() {\n }"
] | [
"0.61014944",
"0.59701324",
"0.5802099",
"0.5764976",
"0.575987",
"0.575987",
"0.57594764",
"0.57346386",
"0.5717253",
"0.5701476",
"0.56969076",
"0.56749713",
"0.5669782",
"0.56645274",
"0.56478226",
"0.5639882",
"0.5622419",
"0.5595247",
"0.5587931",
"0.5578902",
"0.5550493",
"0.55407137",
"0.5534055",
"0.55319464",
"0.5528674",
"0.5528198",
"0.55153126",
"0.55153126",
"0.55153126",
"0.55153126",
"0.55153126",
"0.54953927",
"0.5482834",
"0.54787785",
"0.54787785",
"0.54787785",
"0.54787785",
"0.54787785",
"0.54787785",
"0.54787785",
"0.5476432",
"0.5475208",
"0.54726166",
"0.54651713",
"0.54612416",
"0.54561436",
"0.54289013",
"0.54201925",
"0.5420055",
"0.5419503",
"0.54068035",
"0.54068035",
"0.54068035",
"0.5402674",
"0.5402609",
"0.5398559",
"0.5396411",
"0.5394569",
"0.53884274",
"0.5387411",
"0.5385533",
"0.5381484",
"0.53782964",
"0.53782964",
"0.53770435",
"0.53770435",
"0.53768617",
"0.53726935",
"0.53726935",
"0.53726935",
"0.5369967",
"0.5366443",
"0.53644353",
"0.53644353",
"0.5363755",
"0.5363755",
"0.5363755",
"0.53632253",
"0.536122",
"0.53544456",
"0.5347107",
"0.5347107",
"0.5347107",
"0.5347107",
"0.5347107",
"0.5347107",
"0.53454226",
"0.5340424",
"0.5339751",
"0.53289217",
"0.5326515",
"0.532129",
"0.5321059",
"0.53204465",
"0.5316107",
"0.53137267",
"0.5306095",
"0.5292186",
"0.5287692",
"0.527854",
"0.5276822"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void finish() {
super.finish();
if(!s.isClosed()){
try {
s.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} | {
"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 |
Test Source and Node as well as Parser. | public static void main(String[] args) {
if (args.length == 0) Category.main(args);
if (args.length == 0) Node.main(args);
Test.run(new Parser(), args);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n void testParser() {\n VmParsingHelper.DEFAULT.parse(VM_SRC);\n }",
"@Test\n public void testParse()\n {\n System.out.println(\"parse\");\n System.out.println(\" Test simple case\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n Model model = token.parse();\n assertTrue(model.isCompiled());\n System.out.println(\" Test complex case\");\n final File complexFile = new File(\"src/test/data/balancer.example.txt\");\n final Token complexToken = lexer.analyze(complexFile);\n model = complexToken.parse();\n assertTrue(model.isCompiled());\n }",
"@Test\n public void sourceTest() {\n // TODO: test source\n }",
"@Test\n public void sourceTest() {\n // TODO: test source\n }",
"private static void configureParser_1_2(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI1G2 visitor = new TypeVisitorI1G2(type);\n\t\tcu.accept(visitor);\n\n\t\tint decl_count = 0;\n\t\tint ref_count = 0;\n\t\ttry {\n\t\t\tdecl_count = visitor.typeDecCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\tref_count = visitor.typeRefCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, decl_count);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, ref_count);\n\n\t}",
"protected static void configureParser(boolean debug, String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedAnonymousDeclarations, int expectedLocalDeclarations, int expectedNestedDeclarations,\n\t\t\tint expectedReferenceCount, int expectedLocalReferences, int expectedNestedReferences) {\n\t\tswitch (CURRENT_VISITOR_TO_TEST) {\n\t\tcase MAIN:\n\t\t\tconfigureParserMain(debug, source, type, expectedDeclarationCount, expectedAnonymousDeclarations,\n\t\t\t\t\texpectedLocalDeclarations, expectedNestedDeclarations, expectedReferenceCount,\n\t\t\t\t\texpectedLocalReferences, expectedNestedReferences);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconfigureParser(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t}\n\t}",
"protected static void configureParser(boolean debug, String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount, int expectedAnonymousDeclarations, int expectedLocalDeclarations,\n\t\t\tint expectedNestedDeclarations) {\n\t\tswitch (CURRENT_VISITOR_TO_TEST) {\n\t\tcase MAIN:\n\t\t\tconfigureParserMain(debug, source, type, expectedDeclarationCount, expectedAnonymousDeclarations,\n\t\t\t\t\texpectedLocalDeclarations, expectedNestedDeclarations, expectedReferenceCount, 0, 0);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tconfigureParser(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t}\n\t}",
"protected static void configureParser_2_8(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\tparser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tCompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\t\t// ASTParser parser = ASTParser.newParser(AST.JLS9);\n\t\t// parser.setSource(source.toCharArray());\n\t\t// parser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\t// Hashtable<String, String> options = JavaCore.getOptions();\n\t\t// options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5);\n\t\t// parser.setCompilerOptions(options);\n\t\t// parser.setResolveBindings(true);\n\t\t// parser.setBindingsRecovery(true);\n\t\t// //\n\t\t// String tempClassPath = new File(\"\").getAbsolutePath();\n\t\t// String[] tempClassPathArray = { tempClassPath };\n\t\t// //\n\t\t// parser.setEnvironment(tempClassPathArray, null, null, false);\n\t\t// parser.setUnitName(\"temp.java\");\n\n\t\t// Adding bindings\n\t\t// CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G8 visitor = new TypeVisitorI2G8();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.logDeclarations.get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.logReferences.get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"protected static void configureParserMain(boolean debug, String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedAnonymousDeclarations, int expectedLocaDeclarations, int expectedNestedDeclarations,\n\t\t\tint expectedReferenceCount, int expectedLocalReferences, int expectedNestedReferences) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tHashtable<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitor visitor = new TypeVisitor(debug);\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = visitor.getNamedDeclarations().count(type);\n\t\tint referenceCount = visitor.getReferences().count(type);\n\n\t\t// Since anonymous class declarations don't have names, the only relevant thing\n\t\t// to check is the total quantity of anonymous class declarations\n\t\tint anonymousDeclarations = visitor.getAnonymousDeclarations().getElementCount();\n\t\tint localDeclarations = visitor.getLocalDeclarations().count(type);\n\t\tint nestedDeclarations = visitor.getNestedDeclarations().count(type);\n\n\t\tint localReferences = visitor.getLocalReferences().count(type);\n\t\tint nestedReferences = visitor.getNestedReferences().count(type);\n\n\t\tif (debug) {\n\t\t\tSystem.out.println(\"VISIT RESULTS:\");\n\t\t\tSystem.out.println(\"Declarations: \" + visitor.getNamedDeclarations());\n\t\t\tSystem.out.println(\"Anonymous: \" + visitor.getAnonymousDeclarations());\n\t\t\tSystem.out.println(\"Local: \" + visitor.getLocalDeclarations());\n\t\t\tSystem.out.println(\"Nested: \" + visitor.getNestedDeclarations());\n\t\t\tSystem.out.println(\"References: \" + visitor.getReferences());\n\t\t\tSystem.out.println(\"Local: \" + visitor.getLocalReferences());\n\t\t\tSystem.out.println(\"Nested: \" + visitor.getNestedReferences());\n\t\t\tSystem.out.println(FileManager.lineSeparator + FileManager.lineSeparator);\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Anonymous declarations\", expectedAnonymousDeclarations, anonymousDeclarations);\n\t\tassertEquals(\"Local declarations\", expectedLocaDeclarations, localDeclarations);\n\t\tassertEquals(\"Nested declarations\", expectedNestedDeclarations, nestedDeclarations);\n\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\t\tassertEquals(\"Local references\", expectedLocalReferences, localReferences);\n\t\tassertEquals(\"Nested reference\", expectedNestedReferences, nestedReferences);\n\n\t}",
"@Test\n public void jUnitTest02(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest02.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private static void test1() throws ParseException, IOException {\n\t\n\tFile classFile = new File(\"/home/sebastian/workspace3.7/yuigwt/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");\n\t\n// InputStream in = ParserTest.class.getClassLoader().getResourceAsStream(\"/java-tools/org/sgx/gwtjavatools/delegate/JYUIDelegateMethods.java\");//new FileInputStream(\"test.java\");\n\n\tFileInputStream in = new FileInputStream(classFile); \n\t\n CompilationUnit cu;\n try {\n // parse the file\n cu = JavaParser.parse(in);\n } finally {\n in.close();\n }\n\n // visit and print the methods names\n new MethodVisitor().visit(cu, null);\n\n // prints the resulting compilation unit to default system output\n// System.out.println(cu.toString());\n}",
"@Test\n public void jUnitTest10(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest10.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected static void configureParser_2_1(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G1 visitor = new TypeVisitorI2G1();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.countMap.get(type).getDeclarationCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.countMap.get(type).getReferenceCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"@Test\n public void jUnitTest04(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest04.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest01(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest01.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest05(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest05.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest07(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest07.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"void Parse(Source source);",
"@Test\n public void jUnitTest09(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest09.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest03(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest03.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Test\n public void jUnitTest06(){\n TigerLexer lex;\n try {\n lex = new TigerLexer(new ANTLRFileStream(\"test/jUnitTests/jUnitTest06.tig\", \"UTF8\"));\n CommonTokenStream tokens = new CommonTokenStream(lex);\n TigerParser parser = new TigerParser(tokens);\n SemantVisitor visitor = new SemantVisitor();\n parser.prog();\n boolean resp = (parser.getNumberOfSyntaxErrors() == 0 && visitor.getNumberOfSemanticErrors() == 0);\n assertTrue(resp);\n } catch (IOException ex) {\n Logger.getLogger(TesteGlobal.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"protected static void configureParser(boolean debug, String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tswitch (CURRENT_VISITOR_TO_TEST) {\n\t\tcase MAIN:\n\t\t\tconfigureParserMain(debug, source, type, expectedDeclarationCount, 0, 0, 0, expectedReferenceCount, 0, 0);\n\t\t\tbreak;\n\t\tcase I1G2:\n\t\t\tconfigureParser_1_2(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\tcase I1G7:\n\t\t\tconfigureParser_1_7(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I1G8:\n\t\t\tconfigureParser_1_8(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I1G11:\n\t\t\tconfigureParser_1_11(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I1G12:\n\t\t\tconfigureParser_1_12(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G1:\n\t\t\tconfigureParser_2_1(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G2:\n\t\t\tconfigureParser_2_2(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G3:\n\t\t\tconfigureParser_2_3(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G4:\n\t\t\tconfigureParser_2_4(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G7:\n\t\t\tconfigureParser_2_7(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G8:\n\t\t\tconfigureParser_2_8(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tcase I2G9:\n\t\t\tconfigureParser_2_9(source, type, expectedDeclarationCount, expectedReferenceCount);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new IllegalArgumentException(\"Invalid visitor type\");\n\t\t}\n\t}",
"protected static void configureParser_2_2(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G2 visitor = new TypeVisitorI2G2();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.getDeclarations().count(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.getReferences().count(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"@Test\n\tpublic void testIsTest() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"7\";\n\t\tString file = \"test/dank.java\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"@Test public void testNode() {\n \n }",
"@Before\n public void setUp() {\n source = SParser.parse(\"public class MainClass\\n{\\n \"\n + \"public static void main( String args[] )\\n \"\n + \"{ \\n GradeBook myGradeBook = new GradeBook();\"\n + \" \\n\\n String courseName = \\\"Java \\\";\\n \"\n + \" myGradeBook.displayMessage( courseName );\\n \"\n + \" }\\n\\n}\\npublic class Foo{ public boolean bar(){\"\n + \" super.foo(); return false;}}\");\n }",
"TestNode createTestNode();",
"protected static void configureParser_1_11(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tCompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI1G11 visitor = new TypeVisitorI1G11(type);\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.declarationCount;\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.referenceCount;\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"protected static void configureParserMain(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedAnonymousDeclarations, int expectedLocaDeclarations, int expectedNestedDeclarations,\n\t\t\tint expectedReferenceCount, int expectedLocalReferences, int expectedNestedReferences) {\n\t\t\tconfigureParserMain(false, source, type, expectedDeclarationCount,\n\t\t\texpectedAnonymousDeclarations, expectedLocaDeclarations, expectedNestedDeclarations,\n\t\t\texpectedReferenceCount, expectedLocalReferences, expectedNestedReferences);\n\t}",
"@Test\n\tpublic void testPhase2() throws SemanticError{\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Simple Test\");\n\t\tParseDriver driver = new ParseDriver(\"resources/pascal_files/simple.pas\");\n\t\tdriver.run();\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Mod Test\");\n\t\tdriver = new ParseDriver(\"resources/pascal_files/mod.pas\");\n\t\tdriver.run();\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Expression Test\");\n\t\tdriver = new ParseDriver(\"resources/pascal_files/expression.pas\");\n\t\tdriver.run();\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"Exp Test\");\n\t\tdriver = new ParseDriver(\"resources/pascal_files/exptest.pas\");\n\t\tdriver.run();\n\t}",
"protected static void configureParser_1_12(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tCompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI1G12 visitor = new TypeVisitorI1G12(type);\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.declarationCounter;\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.referenceCounter;\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Delcaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"@Test\r\n public void testParse() {\r\n System.out.println(\"parse\");\r\n assertEquals(true,true);\r\n }",
"protected static void configureParser_2_9(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G9 visitor = new TypeVisitorI2G9();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.typeMap.get(type).get(1);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.typeMap.get(type).get(0);\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"protected static void configureParser(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedAnonymousDeclarations, int expectedLocalDeclarations, int expectedNestedDeclarations,\n\t\t\tint expectedReferenceCount, int expectedLocalReferences, int expectedNestedReferences) {\n\t\tconfigureParser(false, source, type, expectedDeclarationCount,\n\t\t\texpectedAnonymousDeclarations, expectedLocalDeclarations, expectedNestedDeclarations,\n\t\t\texpectedReferenceCount, expectedLocalReferences, expectedNestedReferences);\n\t}",
"@Test\n void parser_Test() throws IOException {\n Parser test_parse = new Parser();\n List<Employee> test_list;\n test_list = test_parse.parseInput(\"data\\\\exercise42_test_input.txt\");\n assertEquals(\"Hideo\",test_list.get(1).getFirstName());\n }",
"public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}",
"private static void configureParser_1_8(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI1G8 visitor = new TypeVisitorI1G8();\n\t\tcu.accept(visitor);\n\n\t\tint decl_count = 0;\n\t\tint ref_count = 0;\n\t\ttry {\n\t\t\tdecl_count = visitor.getDecCount().get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\tref_count = visitor.getRefCount().get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, decl_count);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, ref_count);\n\n\t}",
"@Test\n public void testAllConstructions() throws IOException, LexerException, ParseException {\n TreeNode<ASTNode> tree = getTree(\"all.txt\");\n System.out.println(tree);\n }",
"protected static void configureParser(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount, int expectedAnonymousDeclarations, int expectedLocalDeclarations,\n\t\t\tint expectedNestedDeclarations) {\n\t\t\tconfigureParser(false, source, type, expectedDeclarationCount,\n\t\t\texpectedReferenceCount, expectedAnonymousDeclarations, expectedLocalDeclarations,\n\t\t\texpectedNestedDeclarations);\n\t}",
"@Before\n public void setUp()\n {\n Parser.resetParser();\n }",
"protected static void configureParser_2_7(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\t// String[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\t// String[] classPath = { _TestSuite.BIN_DIR };\n\t\t// parser.setEnvironment(classPath, srcPath, null, true);\n\t\tparser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G7 visitor = new TypeVisitorI2G7();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.getDecCount().get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.getRefCount().get(type);\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"@Test\n public void parse() throws Exception {\n MOPSpecFile specFile = SpecExtractor.parse(new File(this.mopFilePath));\n\n MOPSpecFile expectedSpecFileAST = MOP_Serialization.\n readMOPSpecObjectFromFile(this.expected_AST_Path);\n\n assertTrue(\"The MOPSpecFile object of \" + this.mopFilePath + \" is not as expected.\",\n NodeEquivalenceChecker.equalMOPSpecFiles(specFile, expectedSpecFileAST));\n }",
"@Test\n @Ignore\n public void testParse() {\n System.out.println(\"parse\");\n byte[] bytes = null;\n SntParser instance = new SntParser();\n Object expResult = null;\n Object result = instance.parse(bytes);\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\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}",
"@Test\n\tpublic void probandoConParser() {\n\t\tString dBoxUrl = \"/home/julio/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_4_text_mining/material/tp3/\";\n\t\tString modelUrl = dBoxUrl + \"NER/models/es-ner-person.bin\";\n\t\tString filesUrl = dBoxUrl + \"NER/archivoPrueba\";\n\t\tString sampleFile = filesUrl + \"/viernes-23-05-14-alan-fitzpatrick-gala-cordoba.html\";\n\t\tList<String> docs = getMyDocsFromSomewhere(filesUrl);\n\n\t\ttry {\n\t\t\t// detecting the file type\n\t\t\tBodyContentHandler handler = new BodyContentHandler();\n\t\t\tMetadata metadata = new Metadata();\n\t\t\tFileInputStream inputstream = new FileInputStream(new File(sampleFile));\n\t\t\tParseContext pcontext = new ParseContext();\n\n\t\t\t// Html parser\n\t\t\tHtmlParser htmlparser = new HtmlParser();\n\t\t\thtmlparser.parse(inputstream, handler, metadata, pcontext);\n\t\t\tSystem.out.println(\"Contents of the document:\" + handler.toString());\n\t\t\tSystem.out.println(\"Metadata of the document:\");\n\t\t\tString[] metadataNames = metadata.names();\n\n\t\t\tfor (String name : metadataNames) {\n\t\t\t\tSystem.out.println(name + \": \" + metadata.get(name));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\n\t}",
"public void runTest() throws Exception {\n\n System.out.println(schemaFile.getPath());\n \n\t\t\tDriver driver = new Driver();\t// generator instance.\n\t\t\t\t\n\t\t\t// parse parameters\n\t\t\tdriver.parseArguments(new String[]{\"-seed\",\"0\", \"-n\",\"30\", \"-quiet\"});\n\t\t\t\t\n\t\t\t// parse example documents\n Iterator itr = examples.iterator();\n\t\t\twhile( itr.hasNext() ) {\n\t\t\t\tFile example = (File)itr.next();\n \n reader.setContentHandler( new ExampleReader(driver.exampleTokens) );\n reader.parse( com.sun.msv.util.Util.getInputSource(example.getAbsolutePath()) );\n\t\t\t}\n\t\t\t\t\n\t\t\t// set the grammar\n\t\t\tISchema schema = validator.parseSchema(schemaFile);\n\t\t\tassertNotNull( \"failed to parse the schema\", schema );\n\t\t\tdriver.grammar = schema.asGrammar();\n\t\t\tdriver.outputName = \"NUL\";\n\t\t\t\t\n\t\t\t// run the test\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t\t\t\n\t\t\t\t\n\t\t\t// parse additional parameter\n\t\t\t// generally, calling the parseArguments method more than once\n\t\t\t// is not supported. So this is a hack.\n\t\t\tdriver.parseArguments(new String[]{\"-error\",\"10/100\"});\n\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t}",
"protected static void configureParser_2_3(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tfinal CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI2G3 visitor = new TypeVisitorI2G3();\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\n\t\tArrayList<String> types = visitor.getFoundTypes();\n\n\t\tfor (int i = 0; i < types.size(); i++) {\n\t\t\tif (types.get(i).equals(type)) {\n\t\t\t\tdeclarationCount += visitor.getDeclarationsArray().get(i);\n\t\t\t\treferenceCount += visitor.getReferencesArray().get(i);\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }",
"protected static void configureParser_1_7(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tCompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeVisitorI1G7 visitor = new TypeVisitorI1G7(cu, type);\n\t\tcu.accept(visitor);\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\t\ttry {\n\t\t\tdeclarationCount = visitor.getDeclarationCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\ttry {\n\t\t\treferenceCount = visitor.getReferenceCount();\n\t\t} catch (Exception e) {\n\n\t\t}\n\n\t\tassertEquals(\"Declaration count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\t}",
"public void startParsing(InputSource source) {\r\n\t\ttry {\r\n\t\t\t_parser.parse(source, this);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tLoggerUtilsServlet.logErrors(e);\r\n\t\t}\r\n\t}",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(0);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, true, false);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \">\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n simpleNode0.setIdentifier(\"<<\");\n simpleNode0.setIdentifier(\"y\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"<<\");\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n simpleNode0.dump(\"}\", stringWriter0);\n assertEquals(\"<CompilationUnit>\\n <identifier>*lshft</identifier>\\n <identifier>y</identifier>\\n</CompilationUnit>\\n\", stringWriter0.toString());\n }",
"@Test\n public void testFromXMLFile() {\n }",
"protected static void configureParser_2_4(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tASTParser parser = ASTParser.newParser(AST.JLS8);\n\t\tparser.setSource(source.toCharArray());\n\t\tparser.setKind(ASTParser.K_COMPILATION_UNIT);\n\t\tparser.setResolveBindings(true);\n\t\tparser.setBindingsRecovery(true);\n\t\t// these are needed for binding to be resolved due to SOURCE is a char[]\n\t\tString[] srcPath = { _TestSuite.SOURCE_DIR };\n\t\tString[] classPath = { _TestSuite.BIN_DIR };\n\t\tparser.setEnvironment(classPath, srcPath, null, true);\n\t\t// parser.setEnvironment(null, null, null, true);\n\t\t// TODO: Fix up the name to be something other than name?\n\t\tparser.setUnitName(\"Name\");\n\n\t\t// ensures nodes are being parsed properly\n\t\tMap<String, String> options = JavaCore.getOptions();\n\t\toptions.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);\n\t\toptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);\n\t\tparser.setCompilerOptions(options);\n\n\t\tCompilationUnit cu = (CompilationUnit) parser.createAST(null);\n\n\t\tTypeCounterI2G4 counter = new TypeCounterI2G4();\n\n\t\tint declarationCount = 0;\n\t\tint referenceCount = 0;\n\n\t\tArrayList<TargetType> types = counter.count(cu);\n\n\t\tfor (TargetType t : types) {\n\t\t\tif (t.getType().equals(type)) {\n\t\t\t\tdeclarationCount = t.getDec();\n\t\t\t\treferenceCount = t.getRef();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tassertEquals(\"Declaraction count\", expectedDeclarationCount, declarationCount);\n\t\tassertEquals(\"Reference count\", expectedReferenceCount, referenceCount);\n\n\t}",
"protected static void configureParser(String source, String type, int expectedDeclarationCount,\n\t\t\tint expectedReferenceCount) {\n\t\tconfigureParser(false, source, type, expectedDeclarationCount,\n\t\t\texpectedReferenceCount);\n\t}",
"public void testContentsParsing() throws Throwable {\n long start = System.currentTimeMillis();\n PluginTokenizer tokenizer = new PluginTokenizer();\n\n System.out.println(\"\\nStart extracting contents in \\\"\" + _path + \"\\\"\");\n \n tokenizer.setSource(new InputStreamSource(_reader));\n tokenizer.setParseFlags(Tokenizer.F_NO_CASE | Tokenizer.F_TOKEN_POS_ONLY);\n tokenizer.setWhitespaceHandler(this);\n tokenizer.setSequenceHandler(this);\n\n while (tokenizer.hasMoreToken()) {\n tokenizer.nextToken();\n System.out.println(tokenizer.current());\n assertTrue(\"Method current() returned null.\", tokenizer.current() != null);\n }\n \n long diff = System.currentTimeMillis() - start;\n System.out.println(\"Finished after \" + diff + \" milliseconds\");\n }",
"public static void main(String[] args) {\r\n if (args.length == 0) Stacker.main(args);\r\n Evaluator evaluator = new Evaluator();\r\n evaluator.switchTest = true;\r\n for (Op op : Op.values()) {\r\n Node node = new Node(op, null, null);\r\n evaluator.parse(node);\r\n }\r\n evaluator.switchTest = false;\r\n Test.run(evaluator, args);\r\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 }",
"public Results(Node source) {\n\t\tinorder(source);\n\t}",
"public NodeTest(String name) {\n\t\tsuper(name);\n\t}",
"@Test\n public void testAdd()\n {\n System.out.println(\"add\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n assertTrue(token.size() == 159);\n }",
"@Override\n public void runTest() {\n }",
"@Test(timeout = 4000)\n public void test006() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"com.werken.saxpath.XPathLexer\");\n xPathLexer0.pipe();\n Token token0 = xPathLexer0.mod();\n assertNull(token0);\n }",
"@ParameterizedTest\n\t@CsvSource({\"/inhrt.wl\", // Detects correct inheritance\n\t\t\"/inhrtVar.wl\", // Detects correct inheritance of variables\n\t\t\"/classVarInit.wl\", // Test referencing class variables.\n\t\t\"/assignExprRef.wl\", // Test referencing class variables from assign expression.\n\t\t\"/vnm.wl\", // Test method and class variable having the same name\n\t\t\"/methRedef.wl\", // Test inheritance method redefinition\n\t\t\"/methVarRef.wl\", // Test referencing variables in a method\n\t\t\"/objMethExpr.wl\", // Test referencing methods with . operator\n\t\t\"/locMethRef.wl\", // Test that using local method references is correct\n\t\t\"/objInstance.wl\",// Create instance of object correctly\n\t\t\"/copy.wl\", // Check the overriding of SELF_TYPE methods\n\t\t\"/ref.wl\",\n\t\t\"/methClassVarRedef.wl\", // check referenced class vars in methods before they are redefed in method\n\t\t\"/forwardAttributeReference1.wl\"\n\t\t})\n\tvoid posTests(String file) throws IOException {\n\t\tParseTree tree;\n\t\t\n\t\tWoolRunnerImpl imp = WoolFactory.makeParserRunner(\n\t\t\t\tCharStreams.fromFileName(posFilesLoc+file));\n\t\ttree = imp.parse();\n\t\t\n\t\ttree.accept(stb);\n\t\ttree.accept(stc);\n\t\t\n\t\tassertTrue(true);\n\t}",
"@Test\n public void testParseString() {\n /** Create a UIParser and string to test\n * \n */\n UIParser uiParserTest = new UIParser();\n String input = \"<html><head></head><body>test message</body></html>\";\n \n /**Use UIParser to parse string and test test that it is not null.\n * \n * \n */\n Document doc = uiParserTest.parse(input);\n assertNotNull(doc);\n \n /**Use doc to get documentElement and test that it is not null.\n * \n */\n Element html = doc.documentElement();\n assertNotNull(html);\n \n /** Test whether the tag Name is correct\n * \n */\n assertEquals(\"tagName of root element should be <html>\", \"html\", html.tagName());\n \n /**Get the child list of documentElement and test whether the child count correct \n * \n */\n NodeList list = html.childNodes();\n assertEquals(\"list length should be one\",list.length(),2);\n \n /**Get the first child and test whether the node name is correct.\n * \n */\n Node head = list.item(0);\n assertEquals(\"first child of <html> should be <head>\", \"head\", head.nodeName());\n \n /**Get the second child and test whether the node name is correct.\n * \n */\n Node body = list.item(1);\n assertEquals(\"second child of <html> should be <body>\", \"body\", body.nodeName()); \n \n /**Get the childlist of second component and test whether the count of list is correct.\n * \n */\n NodeList bodyChildList = body.childNodes();\n assertEquals(\"list length should be one\",bodyChildList.length(),1);\n \n /**Get the grandchild of second child and test whether the nodeType and node Value are correct. \n * \n */\n Node bodyChild = bodyChildList.item(0);\n assertEquals(\"type of first child of <body> should be TEXT_NODE\", Node.TEXT_NODE, bodyChild.nodeType());\n assertEquals(\"value of first child of <employ> should be test message\", \"test message\", bodyChild.nodeValue());\n \n }",
"public void testParser() throws Exception {\n assertEquals(\"http://util.java/HashMap\", parse(HashMap.class));\n assertEquals(\"http://simpleframework.org/xml/Element\", parse(Element.class));\n assertEquals(\"http://simpleframework.org/xml/ElementList\", parse(ElementList.class));\n assertEquals(\"http://w3c.org/dom/Node\", parse(Node.class));\n assertEquals(\"http://simpleframework.org/xml/strategy/PackageParser\", parse(PackageParser.class));\n \n assertEquals(HashMap.class, revert(\"http://util.java/HashMap\"));\n assertEquals(Element.class, revert(\"http://simpleframework.org/xml/Element\"));\n assertEquals(ElementList.class, revert(\"http://simpleframework.org/xml/ElementList\"));\n assertEquals(Node.class, revert(\"http://w3c.org/dom/Node\"));\n assertEquals(PackageParser.class, revert(\"http://simpleframework.org/xml/strategy/PackageParser\"));\n \n long start = System.currentTimeMillis();\n for(int i = 0; i < ITERATIONS; i++) {\n fastParse(ElementList.class);\n }\n long fast = System.currentTimeMillis() - start;\n start = System.currentTimeMillis();\n for(int i = 0; i < ITERATIONS; i++) {\n parse(ElementList.class);\n }\n long normal = System.currentTimeMillis() - start;\n System.out.printf(\"fast=%sms normal=%sms diff=%s%n\", fast, normal, normal / fast);\n }",
"protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }",
"@Test\n public void testODTXHTMLIsParseable() throws Exception {\n int filesTested = 0;\n for (Path p : getAllTestFiles()) {\n String fileName = p.getFileName().toString();\n if (fileName.endsWith(\".odt\") || fileName.endsWith(\"odp\") || fileName.endsWith(\"odf\") ||\n fileName.endsWith(\".ods\")) {\n\n XMLResult xmlResult = null;\n try (InputStream is = TikaInputStream.get(p)) {\n xmlResult = getXML(is, AUTO_DETECT_PARSER, new Metadata());\n } catch (Exception e) {\n continue;\n }\n try {\n //just make sure this doesn't throw any exceptions\n XMLReaderUtils.parseSAX(new ByteArrayInputStream(xmlResult.xml.getBytes(StandardCharsets.UTF_8)),\n new DefaultHandler(), new ParseContext());\n filesTested++;\n } catch (Exception e) {\n fail(p.getFileName().toString(), e);\n }\n }\n }\n assertTrue(filesTested > 10);\n }",
"public interface Source {\n /** NewTextSource creates a new Source from the input text string. */\n static Source newTextSource(String text) {\n return newStringSource(text, \"<input>\");\n }\n\n /** NewStringSource creates a new Source from the given contents and description. */\n static Source newStringSource(String contents, String description) {\n // Compute line offsets up front as they are referred to frequently.\n IntArrayList offsets = new IntArrayList();\n for (int i = 0; i <= contents.length(); ) {\n if (i > 0) {\n // don't add '0' for the first line, it's implicit\n offsets.add(i);\n }\n int nl = contents.indexOf('\\n', i);\n if (nl == -1) {\n offsets.add(contents.length() + 1);\n break;\n } else {\n i = nl + 1;\n }\n }\n\n return new SourceImpl(contents, description, offsets);\n }\n\n /** NewInfoSource creates a new Source from a SourceInfo. */\n static Source newInfoSource(SourceInfo info) {\n return new SourceImpl(\n \"\", info.getLocation(), info.getLineOffsetsList(), info.getPositionsMap());\n }\n\n /**\n * Content returns the source content represented as a string. Examples contents are the single\n * file contents, textbox field, or url parameter.\n */\n String content();\n\n /**\n * Description gives a brief description of the source. Example descriptions are a file name or ui\n * element.\n */\n String description();\n\n /**\n * LineOffsets gives the character offsets at which lines occur. The zero-th entry should refer to\n * the break between the first and second line, or EOF if there is only one line of source.\n */\n List<Integer> lineOffsets();\n\n /**\n * LocationOffset translates a Location to an offset. Given the line and column of the Location\n * returns the Location's character offset in the Source, and a bool indicating whether the\n * Location was found.\n */\n int locationOffset(Location location);\n\n /**\n * OffsetLocation translates a character offset to a Location, or false if the conversion was not\n * feasible.\n */\n Location offsetLocation(int offset);\n\n /**\n * NewLocation takes an input line and column and produces a Location. The default behavior is to\n * treat the line and column as absolute, but concrete derivations may use this method to convert\n * a relative line and column position into an absolute location.\n */\n Location newLocation(int line, int col);\n\n /** Snippet returns a line of content and whether the line was found. */\n String snippet(int line);\n}",
"@Test\n\tpublic void testSingleSourceSelect() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\t\texecute(\"/tests/basic/query_singleSource01.rq\", \"/tests/basic/query_singleSource01.srx\", false);\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 }",
"@Test\n public void testGetSyntax()\n {\n System.out.println(\"getSyntax\");\n final File file = new File(\"src/test/data/test.example.txt\");\n final Lexer lexer = new Lexer();\n final Token token = lexer.analyze(file);\n final Token next = token.getNext();\n assertEquals(Syntax.OPEN, next.getSyntax());\n assertEquals(2, next.getLine());\n assertEquals(1, next.getPosition());\n assertEquals(\"{\", next.getValue());\n }",
"public String run(Source source) {\r\n if (grammar == null) {\r\n System.err.println(\"Error: No grammar has been set up\");\r\n System.exit(1);\r\n }\r\n prepare(source);\r\n return runParser();\r\n }",
"public interface IXMLDataProvider {\r\n \r\n /**\r\n * Returns the root node of the XML file.\r\n * @return\tthe root node of the XML file\r\n * @throws TestDataException\tthrown, when parsing errors occur\r\n */\r\n public Node getRootNode() throws Exception;\r\n \r\n /**\r\n * Returns the number of XML data nodes matching the given node name\r\n * @param parent the parent node where to look for child nodes with the specified name\r\n * @param nodeName\tthe node name\r\n * @return\tthe number of nodes in the XML file\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public int countNodesByName(Node parent, String nodeName) throws Exception;\r\n \r\n /**\r\n * Returns an array containing all nodes matching thi given node name\r\n * @param parent\tthe parent node where to look for nodes with the specified node name\r\n * @param nodeName\tthe name of the node\r\n * @return\tan array containing all node names, if there are no nodes matching the geven name, NULL is returned\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public Node [] getNodesByName(Node parent, String nodeName) throws Exception;\r\n \r\n /**\r\n * Returns the node value of a given node.\r\n * @param node\tthe requested node\r\n * @return\ta string representing the node value\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public String getNodeValue(Node node) throws Exception;\r\n \r\n \r\n /**\r\n * Returns the attribute value of a given attribute name within the provided node.\r\n * @param node\tthe node where to look for the attribute\r\n * @param attributeName\tthe name of the attribute to look for\r\n * @return\ta string representing the attribute value\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public String getAttributeValue(Node node, String attributeName) throws Exception;\r\n \r\n public int getNumAttributes(Node node) throws Exception ;\r\n \r\n /**\r\n * Parses an XML file specified by the given file name.\r\n * @param fileName\tthe file name of the XML file\r\n * @throws TestDataException\tusually thrown when parsing errors occur\r\n */\r\n public void parse(String fileName) throws Exception;\r\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 }",
"@Test\n public void testRead_Reader() {\n //System.out.println(\"read\");\n Reader source = new StringReader(testXMLDoc);\n LemonSerializerImpl instance = new LemonSerializerImpl(null);\n instance.read(source);\n //System.out.println(\"XML read OK\");\n source = new StringReader(testTurtleDoc);\n instance.read(source);\n //System.out.println(\"Turtle read OK\");\n }",
"public void testFragmentWrapping() throws Exception {\n \t\tsource.afterPropertiesSet();\n \t\tsource.open(executionContext);\n \t\t// see asserts in the mock deserializer\n \t\tassertNotNull(source.read());\n \t\tassertNotNull(source.read());\n \t\tassertNull(source.read()); // there are only two fragments\n \n \t\tsource.close(executionContext);\n \t}",
"private void parse() {\n try {\n SimpleNode rootNode = jmm.parseClass(sourcefile);\n assert rootNode.is(JJTPROGRAM);\n\n SimpleNode classNode = rootNode.jjtGetChild(0);\n assert classNode.is(JJTCLASSDECLARATION);\n\n data.classNode = classNode;\n } catch (FileNotFoundException e) {\n throw new CompilationException(e);\n } catch (ParseException e) {\n throw new CompilationException(\"Parsing Error: \" + e.getMessage(), e);\n }\n }",
"@Test\n void parse() throws ParseException {\n }",
"@Test(timeout = 4000)\n public void test27() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, false);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"<\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"*ge\");\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"?SZ:=fMlSuF'5A7G0L\");\n SimpleNode simpleNode0 = null;\n try {\n simpleNode0 = new SimpleNode((JavaParser) null, (-1734));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"@Test \r\n\tpublic void testQParse() throws ParseError, IOException {\n\t\t\r\n\r\n\r\n\t}",
"private Parser () { }",
"public void testParse() throws Exception\r\n {\r\n System.out.println(\"parse\");\r\n \r\n String context1 = \"package test.testpack;\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n String context2 = \"package test.test.testpack;\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n String context3 = \"\\npack age test.test.testpack ;\\n class TestClass \\n{\\n\\tdouble d;\\n}\";\r\n String context4 = \"package test.test.testpack\\n class TestClass\\n{\\n\\tdouble d;\\n}\";\r\n \r\n String context5 = \"package test.test.testpack;\\n class TestClass {\\n\\tdouble d;\\n}\";\r\n String context6 = \"package test.test.testpack;\\n class Test Class{\\n\\tdouble d;\\n}\";\r\n String context7 = \"package test.test.testpack;\\n class TestClass\\n{\\n\" +\r\n \"\\t//Det här är en double\\n\" +\r\n \"\\tdouble d;\\n\" +\r\n \"\\tdouble[] ds;\\n\" +\r\n \"\\tidltype test.test2.Test2Class idlTestObject;\" +\r\n \"\\n}\";\r\n \r\n \r\n FileParser instance = new FileParser();\r\n \r\n IDLClass expResult = null;\r\n \r\n IDLClass result = instance.parse(context1);\r\n assertEquals(result.getPackageName(), \"test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n result = instance.parse(context2);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context3);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 2: Invalid package declaration.\", ex.getMessage());\r\n }\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context4);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 1: Missing ; .\", ex.getMessage());\r\n }\r\n \r\n result = instance.parse(context5);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n \r\n try\r\n {\r\n \r\n result = instance.parse(context6);\r\n fail(\"Should through\");\r\n } \r\n catch (ParseException ex)\r\n {\r\n assertEquals(\"At line 2: Invalid class declaration.\", ex.getMessage());\r\n }\r\n \r\n result = instance.parse(context7);\r\n assertEquals(result.getPackageName(), \"test.test.testpack\");\r\n assertEquals(result.getClassName(), \"TestClass\");\r\n assertEquals(result.getFields().get(0).getComment(), \"//Det här är en double\");\r\n \r\n \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(timeout = 4000)\n public void test22() throws Throwable {\n JavaParser javaParser0 = new JavaParser((JavaParserTokenManager) null);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager((JavaCharStream) null);\n javaParser0.ReInit(javaParserTokenManager0);\n SimpleNode simpleNode0 = new SimpleNode(26);\n int int0 = simpleNode0.jjtGetNumChildren();\n assertEquals(0, int0);\n }",
"@Test\n\tpublic void testGetSourceDifference() {\n\t\t\n\t\t// Setup\n\t\tString added = \"1\";\n\t\tString removed = \"1\";\n\t\tLine line = new Line(added, removed, \"dank.java\");\n\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"java\");\n\t\t\n\t\t// Exercise\n\t\tint diff = line.getSourceDifference(types);\n\n\t\t// Verify\n\t\tassertEquals(2, diff);\n\n\t\tint test = line.getTestDiff(types);\n\t\tassertEquals(0, test);\n\t}",
"private void passOne() {\r\n\t\t// clearDoc(docListing);\r\n\r\n\t\tint lineNumber;\r\n\t\tString sourceLine;\r\n\t\t// LineParser lineParser = new LineParser();\r\n\t\tSourceLineAnalyzer lineAnalyzer = new SourceLineAnalyzer();\r\n\t\tSourceLineParts sourceLineParts;\r\n\t\tScanner scannerPassOne = new Scanner(tpSource.getText());\r\n\t\twhile (scannerPassOne.hasNextLine()) {\r\n\t\t\tsourceLine = scannerPassOne.nextLine();\r\n\t\t\tif (sourceLine.equals(EMPTY_STRING)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tsourceLineParts = lineAnalyzer.analyze(sourceLine);\r\n\r\n\t\t\tif (!sourceLineParts.isLineActive()) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} // if skip textbox's empty lines\r\n\r\n\t\t\tlineNumber = sourceLineParts.getLineNumber();\r\n\t\t\tallLineParts.add(sourceLineParts);\r\n\r\n\t\t\tif (sourceLineParts.hasLabel()) {\r\n\t\t\t\tprocessLabel(sourceLineParts, lineNumber);\r\n\t\t\t} // if - has label\r\n\r\n\t\t\tif (sourceLineParts.hasInstruction()) {\r\n\t\t\t\tinstructionCounter.incrementCurrentLocation(sourceLineParts.getOpCodeSize());\r\n\t\t\t} // if instruction\r\n\r\n\t\t\tif (sourceLineParts.hasDirective()) {\r\n\t\t\t\tprocessDirectiveForLineCounter(sourceLineParts, lineNumber);\r\n\t\t\t} // if directives\r\n\r\n\t\t\tif (sourceLineParts.hasName()) {\r\n\t\t\t\tprocessSymbol(sourceLineParts, lineNumber);\r\n\t\t\t} // if has symbol\r\n\r\n\t\t\t// displayStuff(lineParser);\r\n\t\t} // while\r\n\t\tSymbolTable.passOneDone();\r\n\t\tscannerPassOne.close();\r\n\t}",
"public interface Tester\n {\n SqlNode parseQuery(String sql)\n throws SqlParseException;\n\n SqlNode parseAndValidate(SqlValidator validator, String sql);\n\n SqlValidator getValidator();\n\n /**\n * Checks that a query is valid, or, if invalid, throws the right\n * message at the right location.\n *\n * <p>If <code>expectedMsgPattern</code> is null, the query must\n * succeed.\n *\n * <p>If <code>expectedMsgPattern</code> is not null, the query must\n * fail, and give an error location of (expectedLine, expectedColumn)\n * through (expectedEndLine, expectedEndColumn).\n *\n * @param sql SQL statement\n * @param expectedMsgPattern If this parameter is null the query must be\n * valid for the test to pass; If this parameter is not null the query\n * must be malformed and the message given must match the pattern\n */\n void assertExceptionIsThrown(\n String sql,\n String expectedMsgPattern);\n\n /**\n * Returns the data type of the sole column of a SQL query.\n *\n * <p>For example, <code>getResultType(\"VALUES (1\")</code> returns\n * <code>INTEGER</code>.\n *\n * <p>Fails if query returns more than one column.\n *\n * @see #getResultType(String)\n */\n RelDataType getColumnType(String sql);\n\n /**\n * Returns the data type of the row returned by a SQL query.\n *\n * <p>For example, <code>getResultType(\"VALUES (1, 'foo')\")</code>\n * returns <code>RecordType(INTEGER EXPR$0, CHAR(3) EXPR#1)</code>.\n */\n RelDataType getResultType(String sql);\n\n void checkCollation(\n String sql,\n String expectedCollationName,\n SqlCollation.Coercibility expectedCoercibility);\n\n void checkCharset(\n String sql,\n Charset expectedCharset);\n\n /**\n * Checks that a query returns one column of an expected type. For\n * example, <code>checkType(\"VALUES (1 + 2)\", \"INTEGER NOT\n * NULL\")</code>.\n */\n void checkColumnType(\n String sql,\n String expected);\n\n /**\n * Given a SQL query, returns a list of the origins of each result\n * field.\n *\n * @param sql SQL query\n * @param fieldOriginList Field origin list, e.g.\n * \"{(CATALOG.SALES.EMP.EMPNO, null)}\"\n */\n void checkFieldOrigin(String sql, String fieldOriginList);\n\n /**\n * Checks that a query gets rewritten to an expected form.\n *\n * @param validator validator to use; null for default\n * @param query query to test\n * @param expectedRewrite expected SQL text after rewrite and unparse\n */\n void checkRewrite(\n SqlValidator validator,\n String query,\n String expectedRewrite);\n\n /**\n * Checks that a query returns one column of an expected type. For\n * example, <code>checkType(\"select empno, name from emp\"\"{EMPNO INTEGER\n * NOT NULL, NAME VARCHAR(10) NOT NULL}\")</code>.\n */\n void checkResultType(\n String sql,\n String expected);\n\n /**\n * Checks if the interval value conversion to milliseconds is valid. For\n * example, <code>checkIntervalConv(VALUES (INTERVAL '1' Minute),\n * \"60000\")</code>.\n */\n void checkIntervalConv(\n String sql,\n String expected);\n\n /**\n * Given a SQL query, returns the monotonicity of the first item in the\n * SELECT clause.\n *\n * @param sql SQL query\n *\n * @return Monotonicity\n */\n SqlMonotonicity getMonotonicity(String sql);\n\n SqlConformance getConformance();\n }",
"public static void main(String[] args) throws IOException {\n\t\tCharStream input = CharStreams.fromFileName(\"C:\\\\Users\\\\User\\\\eclipse-workspace\\\\Compilateur-Aisha-Liliya\\\\src\\\\test\\\\test0.txt\");\n\t\tLangageLexer lexer = new LangageLexer( input);\n\t\tLangageParser parser = new \tLangageParser(new CommonTokenStream(lexer));\n\t\tListener l =new Listener();\n\t\tparser.addParseListener(l);\n\t\t\n\t\tParseTree tree = parser.code();\n\tl.s.printTE();\n\tl.s.printTS();\n\tl.s.printQuad();\n\tl.s.printCODEOBJET();\n\t}",
"@Test\n public void testCanParseAllSamples() throws IOException {\n final File sampleDir = new File(\"sample_abc/\");\n final File[] abcFiles = sampleDir.listFiles((file) -> file.getName().endsWith(\".abc\"));\n\n for (File file : abcFiles) {\n try {\n final CharStream stream = new ANTLRFileStream(file.getAbsolutePath());\n AbcLexer lexer = new AbcLexer(stream);\n lexer.reportErrorsAsExceptions();\n\n AbcParser parser = new AbcParser(new CommonTokenStream(lexer));\n parser.addErrorListener(new BaseErrorListener() {\n public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line,\n int charPositionInLine, String msg, RecognitionException e) {\n return;\n }\n });\n parser.reportErrorsAsExceptions();\n\n parser.abcTune();\n } catch (Exception e) {\n System.err.println(file);\n throw e;\n }\n }\n }",
"public static void main (String [] args) throws Exception {\n if(args.length < 1){\n System.err.println(\"Usage: java Main <inputFile1> <inputFile2> ... <inputFileN> \");\n System.exit(1);\n }\n\n FileInputStream fis = null;\n\n\n try{\n\n for (String s: args) {\n System.out.println(\"Type check on program: \"+s);\n System.out.print(\"\\n\"); \n\n //Parsing the input program.\n fis = new FileInputStream(s);\n MiniJavaParser parser = new MiniJavaParser(fis);\n System.err.println(\"Program parsed successfully.\");\n System.out.print(\"\\n\"); \n Goal root = parser.Goal(); \n \n //If the parsing was successful, we move on to the FirstVisitor which will create the Symbol Table and perform declaration checks.\n FirstVisitor eval = new FirstVisitor();\n\n boolean decl_error = false;\n\n try{ \n root.accept(eval, null);\n }catch(Exception ouch){ //If we encounter any declaration errors, the semantic check ends. \n\n System.out.println(\"We encountered at least one declaration error! \"); \n System.out.print(\"\\n\"); \n decl_error = true;\n\n }\n\n //We encountered a declaration error, so now we move on to the next program.\n if(decl_error == true){\n continue;\n }\n \n //Checking if the symbol table has a object from a class that was never declared. If so, we stop the semantic check.\n //This is the only check performed in the main function. All other checks are in the Visitor files.\n for (int counter = 0; counter < eval.idList.size(); counter++) { \t\t \n String id_check = eval.idList.get(counter);\n if( !(eval.visitor_sym.classId_table.containsKey(id_check)) ){\n\n System.out.println(\"We encountered at least one declaration error! \"); \n System.out.print(\"\\n\"); \n decl_error = true;\n \n }\n }\n \n if(decl_error == true){\n continue;\n }\n\n \n //Our program is free of declaration errors, so now we go to the second visitor which will perform type checking.\n SecondVisitor eval2 = new SecondVisitor(eval.visitor_sym);\n \n boolean type_error = false;\n\n try{\n root.accept(eval2, null);\n }catch(Exception ouch){ //If we encounter any type errors, the semantic check ends. \n System.out.println(\"We encountered at least one type error! \"); \n System.out.print(\"\\n\"); \n type_error = true;\n }\n\n //We encountered a type error, so now we move on to the next program.\n if (type_error == true){\n continue;\n }\n \n\n System.out.println(\"Our program is free of type errors, moving on to the offset table: \"); \n System.out.print(\"\\n\"); \n\n //Creating the offset table with the OffsetTable class.\n OffsetTable ot = new OffsetTable(eval.visitor_sym);\n ot.OutputCreator();\n System.out.print(\"\\n\"); \n\n }\n\n }\n\n catch(ParseException ex){\n System.out.println(ex.getMessage());\n }\n\n catch(FileNotFoundException ex){\n System.err.println(ex.getMessage());\n }\n\n finally{\n\n try{\n if(fis != null) fis.close();\n }\n catch(IOException ex){\n System.err.println(ex.getMessage());\n }\n }\n\n\n }",
"private String doParse(String inputText)\n\t{\n\t\tmakeParser(\"program test \" + inputText);\n\t\ttree = parser.dijkstraText();\n\t\tassertTrue(true);\n\t\treturn tree.toStringTree(parser);\n\t}",
"public boolean testCase1()\n {\n reporter.testCaseInit(\"Basic systemId transforms and params plus API coverage\");\n\n TransformerFactory factory = null;\n Templates templates = null;\n Transformer transformer = null;\n try\n {\n factory = TransformerFactory.newInstance();\n templates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));\n reporter.check((templates != null), true, \"factory.newTemplates(StreamSource) is non-null\");\n }\n catch (Throwable t)\n {\n reporter.logThrowable(reporter.ERRORMSG, t, \n \"Problem creating Templates; cannot continue testcase\");\n reporter.checkErr(\"Problem creating Templates; cannot continue testcase\");\n return true;\n }\n try\n {\n // Validate a systemId transform\n reporter.logTraceMsg(\"Basic stream transform(1)(\" + QetestUtils.filenameToURL(testFileInfo.xmlName) + \", \"\n + QetestUtils.filenameToURL(testFileInfo.inputName) + \", \"\n + outNames.nextName());\n transformer = templates.newTransformer();\n FileOutputStream fos = new FileOutputStream(outNames.currentName());\n transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), \n new StreamResult(fos));\n fos.close();\n int fileCheckStatus = fileChecker.check(reporter, \n new File(outNames.currentName()), \n new File(testFileInfo.goldName), \n \"Basic stream transform(1) into: \" + outNames.currentName());\n if (fileCheckStatus != reporter.PASS_RESULT)\n {\n reporter.logWarningMsg(\"Basic stream transform(1) into: \" + outNames.currentName()\n + fileChecker.getExtendedInfo());\n }\n\n // Validate transformer reuse\n reporter.logTraceMsg(\"Basic stream transform(2)(\" + QetestUtils.filenameToURL(testFileInfo.xmlName) + \", \"\n + QetestUtils.filenameToURL(testFileInfo.inputName) + \", \"\n + outNames.nextName());\n fos = new FileOutputStream(outNames.currentName());\n transformer.transform(new StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)), \n new StreamResult(fos));\n fos.close();\n fileCheckStatus = fileChecker.check(reporter, \n new File(outNames.currentName()), \n new File(testFileInfo.goldName), \n \"Basic stream transform(2) into: \" + outNames.currentName());\n if (fileCheckStatus != reporter.PASS_RESULT)\n {\n reporter.logWarningMsg(\"Basic stream transform(2) into: \" + outNames.currentName()\n + fileChecker.getExtendedInfo());\n }\n } \n catch (Throwable t)\n {\n reporter.checkFail(\"Problem with simple stream transform\");\n reporter.logThrowable(reporter.ERRORMSG, t, \"Problem with simple stream transform\");\n }\n\n try\n {\n // Validate selected API's - primarily Parameters\n Templates paramTemplates = factory.newTemplates(new StreamSource(QetestUtils.filenameToURL(paramFileInfo.inputName)));\n Transformer paramTransformer = paramTemplates.newTransformer();\n String paramStr = \"paramVal\";\n paramTransformer.setParameter(PARAM1S, paramStr);\n reporter.logTraceMsg(\"Just set \" + PARAM1S + \" to \" + paramStr);\n Object tmp = paramTransformer.getParameter(PARAM1S); // SPR SCUU4QWTVZ - returns an XObject - fixed\n if (tmp == null)\n {\n reporter.checkFail(PARAM1S + \" is still set to null!\");\n }\n else\n { // Validate SPR SCUU4QWTVZ - should return the same type you set\n if (tmp instanceof String)\n {\n reporter.checkObject(tmp, paramStr, PARAM1S + \" is now set to ?\" + tmp + \"?\");\n }\n else\n {\n reporter.checkFail(PARAM1S + \" is now ?\" + tmp + \"?, isa \" + tmp.getClass().getName());\n }\n }\n\n // Verify simple re-set/get of a single parameter - new Integer\n Integer paramInteger = new Integer(1234);\n paramTransformer.setParameter(PARAM1S, paramInteger); // SPR SCUU4R3JGY - can't re-set\n reporter.logTraceMsg(\"Just reset \" + PARAM1S + \" to new Integer(99)\");\n tmp = null;\n tmp = paramTransformer.getParameter(PARAM1S);\n if (tmp == null)\n {\n reporter.checkFail(PARAM1S + \" is still set to null!\");\n }\n else\n { // Validate SPR SCUU4QWTVZ - should return the same type you set\n if (tmp instanceof Integer)\n {\n reporter.checkObject(tmp, paramInteger, PARAM1S + \" is now set to ?\" + tmp + \"?\");\n }\n else\n {\n reporter.checkFail(PARAM1S + \" is now ?\" + tmp + \"?, isa \" + tmp.getClass().getName());\n }\n }\n // Validate a transform with two params set\n paramTransformer.setParameter(PARAM1N, \"new-param1n-value\");\n reporter.logTraceMsg(\"Just reset \" + PARAM1N + \" to new-param1n-value\");\n\n reporter.logTraceMsg(\"Stream-param transform(\" + QetestUtils.filenameToURL(paramFileInfo.xmlName) + \", \"\n + QetestUtils.filenameToURL(paramFileInfo.inputName) + \", \"\n + outNames.nextName());\n FileOutputStream fos = new FileOutputStream(outNames.currentName());\n paramTransformer.transform(new StreamSource(QetestUtils.filenameToURL(paramFileInfo.xmlName)), \n new StreamResult(fos));\n fos.close();\n int fileCheckStatus = fileChecker.check(reporter, \n new File(outNames.currentName()), \n new File(paramFileInfo.goldName), \n \"Stream transform with params into: \" + outNames.currentName());\n if (fileCheckStatus != reporter.PASS_RESULT)\n {\n reporter.logWarningMsg(\"Stream transform with params into: \" + outNames.currentName()\n + fileChecker.getExtendedInfo());\n }\n // Validate params are still set after transform\n tmp = paramTransformer.getParameter(PARAM1S);\n reporter.checkObject(tmp, paramInteger, PARAM1S + \" is now set to ?\" + tmp + \"?\");\n tmp = paramTransformer.getParameter(PARAM1N);\n reporter.checkObject(tmp, \"new-param1n-value\", PARAM1N + \" is now set to ?\" + tmp + \"?\");\n } \n catch (Throwable t)\n {\n reporter.checkFail(\"Problem with parameters\");\n reporter.logThrowable(reporter.ERRORMSG, t, \"Problem with parameters\");\n }\n reporter.testCaseClose();\n return true;\n }",
"public void testParser() {\n\n String[] accessNetworkInfo = {\n\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; a-b.c1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; 127.0.0.1; rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\";\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE;\\\"ip=123.123.123.123\\\"\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd];rand=l\\n\",\n \t\t\"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE; [123:4::abcd]\\n\",\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\"\n\n };\n\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo);\n \n //test one more\n String[] accessNetworkInfo_2 = {\n \"P-Access-Network-Info: IEEE-802.11\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE\\n\",\n \"P-Access-Network-Info: IEEE-802.11, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDE, 3GPP-UTRAN-TDD; utran-cell-id-3gpp=23456789ABCDF\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN; utran-cell-id-3gpp=262010063F423802;network-provided,3GPP-E-UTRAN-FDD; utran-cell-id-3gpp=262010063F423802\\n\",\n \"P-Access-Network-Info: IEEE-802.11;i-wlan-node-id=74da38582ba4\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\",\n \"P-Access-Network-Info: 3GPP-E-UTRAN;utran-cell-id-3gpp=\\\"262010063F423802\\\";network-provided,3GPP-E-UTRAN-FDD;utran-cell-id-3gpp=262010063f423802\\n\"\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_2);\n String token = \"A1-.%*_+`'~\";\n String[] accessNetworkInfo_3 = {\n \"P-Access-Network-Info: IEEE-802.11; network-provided\\n\",\n \"P-Access-Network-Info: IEEE-802.11; ipv4=[2345:3456::]\\n\",\n //token\n \"P-Access-Network-Info: \"+token+\"\\n\",\n //hostname\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=www.example-test.example.com.\\n\",\n //IPv4address \n \"P-Access-Network-Info: IEEE-802.11;AaB123=1.1.1.1\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=0.0.0.0\\n\",\n //IPv6reference\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A::99B]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[::11C]\\n\",\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::22D]\\n\",\n //hexpart [ \":\" IPv4address ]\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[11C::12.04.02.99]\\n\",\n //IPv6reference quoted\n \"P-Access-Network-Info: IEEE-802.11;AaB123=\\\"[11C::12.04.02.99]\\\"\\n\",\n //Multiple IP6\n \"P-Access-Network-Info: IEEE-802.11;AaB123=[88A:99B::11C:22D];cc231=[11C::12.04.02.99]\\n\",\n };\n super.testParser(PAccessNetworkInfoParser.class,accessNetworkInfo_3);\n\n }",
"public void setSourceNode(String sourceNode) {\n this.sourceNode = sourceNode;\n }",
"@Before\n public void setUp() throws Exception {\n this.jsonParser = JsonParser.getService();\n InputStream inputStream = getClass().getResourceAsStream(\"../parser/metadata.json\");\n this.jsonString = new Scanner(inputStream).useDelimiter(\"\\\\A\").next();\n this.jsonParser.setJsonString(this.jsonString);\n\n // read the variant results file and create the parser\n InputStream inputStream1 = this.getClass().getResourceAsStream(\"./flattened/standardResultOutput.json\");\n String resultString = new Scanner(inputStream1).useDelimiter(\"\\\\A\").next();\n this.resultParser = new KnowledgeBaseResultParser(resultString);\n\n // create the translator\n this.translator = new KnowledgeBaseFlatSearchTranslator(this.DATASET_KEY, this.PHENOTYPE_KEY, this.PROPERTY_KEY);\n }",
"public TestRunJsonParser(){\n }",
"@Test\n\tpublic void testIsSrcNoTestFile() {\n\t\t// Setup\n\t\tString added = \"6\";\n\t\tString removed = \"4\";\n\t\tString file = \"test/dank.tt\";\n\t\tLine line = new Line(added, removed, file);\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean src = line.isSource(types);\n\n\t\t// Verify\n\t\tassertFalse(src);\n\t}",
"@Test\n public void operator_class() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new ValueElement(valueOf(Integer.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!java.lang.Integer\"));\n }",
"public void run()\n {\n yyparse();\n }",
"@BeforeAll\n\tpublic static void setup() {\n\t\tnewParser();\n\n\t\tparser.setUserProjectDir(\"./test_src/StructsEnums\");\n\t\tparser.parse();\n\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n @Test\n\tpublic void testNodeProcessing()\n\t{\n\t\tLogicalCompareToConstant<Integer> oper = new LogicalCompareToConstant<Integer>()\n\t\t{\n\t\t};\n\t\tCollectorTestSink eSink = new CollectorTestSink();\n\t\tCollectorTestSink neSink = new CollectorTestSink();\n\t\tCollectorTestSink gtSink = new CollectorTestSink();\n\t\tCollectorTestSink gteSink = new CollectorTestSink();\n\t\tCollectorTestSink ltSink = new CollectorTestSink();\n\t\tCollectorTestSink lteSink = new CollectorTestSink();\n\n\t\toper.equalTo.setSink(eSink);\n\t\toper.notEqualTo.setSink(neSink);\n\t\toper.greaterThan.setSink(gtSink);\n\t\toper.greaterThanOrEqualTo.setSink(gteSink);\n\t\toper.lessThan.setSink(ltSink);\n\t\toper.lessThanOrEqualTo.setSink(lteSink);\n\t\toper.setConstant(2);\n\n\t\toper.beginWindow(0); //\n\t\toper.input.process(1);\n\t\toper.input.process(2);\n\t\toper.input.process(3);\n\n\t\toper.endWindow(); //\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 1,\n\t\t\t\teSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\", eSink.collectedTuples.get(0).equals(2),\n\t\t\t\ttrue);\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 2,\n\t\t\t\tneSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\", neSink.collectedTuples.get(0).equals(1),\n\t\t\t\ttrue);\n\t\tAssert.assertEquals(\"tuples were\", neSink.collectedTuples.get(1).equals(3),\n\t\t\t\ttrue);\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 1,\n\t\t\t\tgtSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\", gtSink.collectedTuples.get(0).equals(1),\n\t\t\t\ttrue);\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 2,\n\t\t\t\tgteSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\",\n\t\t\t\tgteSink.collectedTuples.get(0).equals(1), true);\n\t\tAssert.assertEquals(\"tuples were\",\n\t\t\t\tgteSink.collectedTuples.get(1).equals(2), true);\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 1,\n\t\t\t\tltSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\", ltSink.collectedTuples.get(0).equals(3),\n\t\t\t\ttrue);\n\n\t\tAssert.assertEquals(\"number emitted tuples\", 2,\n\t\t\t\tlteSink.collectedTuples.size());\n\t\tAssert.assertEquals(\"tuples were\",\n\t\t\t\tlteSink.collectedTuples.get(0).equals(2), true);\n\t\tAssert.assertEquals(\"tuples were\",\n\t\t\t\tlteSink.collectedTuples.get(1).equals(3), true);\n\t}"
] | [
"0.6946377",
"0.6583597",
"0.64720875",
"0.64720875",
"0.63468397",
"0.63097733",
"0.6276414",
"0.62272114",
"0.6218428",
"0.6185706",
"0.61126935",
"0.6098309",
"0.6087105",
"0.60819894",
"0.6070981",
"0.60606927",
"0.6050587",
"0.604332",
"0.6003891",
"0.5980876",
"0.5946335",
"0.59213233",
"0.5904106",
"0.5902186",
"0.5895542",
"0.5890349",
"0.58625406",
"0.5858126",
"0.58154494",
"0.58136815",
"0.5807964",
"0.5792698",
"0.578397",
"0.5781427",
"0.57684374",
"0.5758242",
"0.5754708",
"0.57486814",
"0.57374126",
"0.57228786",
"0.56903076",
"0.5675207",
"0.56699693",
"0.566228",
"0.5658741",
"0.5621553",
"0.55669504",
"0.5555796",
"0.5548967",
"0.552509",
"0.5511499",
"0.55065817",
"0.5504687",
"0.54859686",
"0.54852676",
"0.5478368",
"0.5477466",
"0.54734284",
"0.546075",
"0.5440179",
"0.5434663",
"0.5421012",
"0.54201",
"0.54115254",
"0.5399552",
"0.5394436",
"0.5375113",
"0.53734636",
"0.537048",
"0.53480977",
"0.5343726",
"0.5340357",
"0.5339207",
"0.53237134",
"0.5319916",
"0.53161734",
"0.53151214",
"0.53126824",
"0.5299339",
"0.5296869",
"0.52949685",
"0.52892464",
"0.52753913",
"0.52626354",
"0.5244403",
"0.5232185",
"0.5226989",
"0.5226091",
"0.5221394",
"0.52204674",
"0.5215969",
"0.5215652",
"0.52090013",
"0.5202274",
"0.5199033",
"0.51942605",
"0.51936466",
"0.5193021",
"0.51733595",
"0.516509"
] | 0.5271161 | 83 |
Parse the grammar, returning a node (possibly an error node). | public Node run(Source s) {
input = s;
if (output == null) output = new Node[1];
if (markers == null) markers = EnumSet.noneOf(Marker.class);
markers.clear();
saves = new int[100];
cats = new HashSet<String>();
for (Category cat : Category.values()) cats.add(cat.toString());
start = in = out = look = marked = save = 0;
boolean ok = grammar();
if (! ok) {
Node err = new Node(Error, s.sub(in, in));
if (marked < in) markers.clear();
Source point = s.sub(in, in);
err.note(point.error(message()));
return err;
}
assert(save == 0);
assert(out == 1);
Node root = output[0];
root = prune(root);
root = merge(root);
return root;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Program parse() throws SyntaxException {\n\t\tProgram p = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}",
"Program parse() throws SyntaxException {\n\t\tProgram p = null;\n\t\tp = program();\n\t\tmatchEOF();\n\t\treturn p;\n\t}",
"static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }",
"public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\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 parse(Lexer lex);",
"private Term parseImpl() throws ParseException {\n final Term expr = parseTerm(false);\n final int tt = _tokenizer.next();\n if (tt != Tokenizer.TT_EOS) {\n reportError(\"Incomplete expression.\"); /*I18N*/\n }\n return expr;\n }",
"public static void lmd_parseTree(){\n\n e_stack.push(\"$\");\n e_stack.push(pc.first_rule);\n head_node=new node(pc.first_rule);\n\n // Evaluate\n // Building the tree as well\n\n node cur=head_node;\n\n for(int i=0;i<token_stream.length;i++){\n System.out.println(e_stack);\n if(!pc.isTerminal(e_stack.peek())){\n String rule_token =pc.parse_Table.get(e_stack.pop(),token_stream[i]).right;\n\n if(!rule_token.equals(\"empty\")) {\n String to_put[]=rule_token.split(\" \");\n for(int j=to_put.length-1;j>=0;j--)\n e_stack.push(to_put[j]);\n\n // add children\n for(int j=0;j<to_put.length;j++)\n addNode(cur,to_put[j]);\n // set cur\n cur=cur.next;\n }\n else {\n // if rule_token is empty\n addNode(cur,\"empty\");\n cur=cur.next.next; // as \"empty\" node will not have any children\n }\n i--;\n }\n else {\n // if(e_stack.peek().equals(token_stream[i]))\n e_stack.pop();\n if(cur.next!=null ) cur=cur.next;\n }\n }\n }",
"Boolean parse() {\n // if errors during initial scanning\n // of program, immediately exit.\n if(scanner.hasErrors()) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n Stack<Integer> rStack = new Stack<Integer>(); // keeps track of production rules\n Stack<String> pStack = new Stack<String>(); // parsing stack\n STstack = new Stack<TNode>(); // syntax tree stack\n\n // pushing first production rule onto stack\n pStack.push(\"0\");\n Token token = scanner.next();\n String token_type = tokenToGrammar(token);\n boolean newToken = false;\n\n int row = 0;\n int col = 0;\n\n // push all tokens of program onto\n // parsing stack before parsing\n while(scanner.ongoing() >= 0) {\n // examine top of stack\n String top = pStack.peek();\n// System.out.println(\"top of stack \" + top);\n // retrieve next valid token of program\n if(newToken && scanner.ongoing() > 0) {\n token = scanner.next();\n token_type = tokenToGrammar(token);\n col = parseTableHeader.get(token_type);\n }\n// System.out.print(\"lookahead \" + token +\", \");\n\n try {\n // is the top of the stack a row number?\n row = Integer.parseInt(top);\n // get value of cell in parse table\n String cell = parseTable.get(row).get(col);\n// System.out.println(\"cell value \" + cell);\n String[] cellParts = cell.split(\"\");\n\n // if cell value is 'b', this is\n // an error and program is not\n // syntactically correct\n if(cellParts[0].equals(\"b\")) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n // if the cell entry is a shift\n else if(cellParts[0].equals(\"s\")) {\n\n // push the lookahead on stack\n pStack.push(token_type);\n // push the lookahead's token on STstack\n if(!token.getChVals().equals(\";\") || !token.getChVals().equals(\"$\")) {\n STstack.push(new TNode(\"general\", token));\n }\n\n // set the shift value as current row\n row = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"new row \" + row);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = true;\n }\n\n // if cell entry is a reduce\n else if(cellParts[0].equals(\"r\")) {\n // first pop off the current row number\n pStack.pop();\n\n // get the production rule's index from the cell\n int prodIdx = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"production number \" + prodIdx);\n\n // get the production rule we are reducing by\n ArrayList<String> production = grammar.get(prodIdx);\n // which syntax tree node do we need?\n SNType nodeType;\n if(prodIdx == 2) {\n nodeType = STstack.peek().getType();\n } else {\n nodeType = idNodeType(prodIdx);\n }\n // also need a temporary stack to hold\n // popped tokens from STstack to make\n // a new node\n Stack<TNode> tempNodeHolder = new Stack<TNode>();\n\n // put all elements of the right side of\n // production rule onto a new stack so\n // we can keep track of them while\n // popping off the actual parsing stack\n Stack<String> rules = new Stack<String>();\n for(int i = 1; i < production.size(); i++) {\n rules.push(production.get(i));\n }\n\n // now pop off right side of\n // production from parsing stack\n while(!rules.empty()){\n String t = pStack.pop();\n if(t.equals(rules.peek())) {\n rules.pop();\n // also pop from STstack for syntax tree\n // and add to temporary stack\n if(!t.equals(\";\") || !token.getChVals().equals(\"$\")) {\n TNode tempNode = STstack.pop();\n tempNodeHolder.push(tempNode);\n }\n }\n }\n\n // synthesize new syntax tree node\n // and add back to STstack\n TNode newNode = makeNode(nodeType, tempNodeHolder);\n STstack.push(newNode);\n\n // push production number to rStack\n rStack.push(prodIdx);\n\n// if(prodIdx == 1) {\n// break;\n// }\n\n // check what current top of pStack is\n // to check for next row\n row = Integer.parseInt(pStack.peek());\n\n // push left side of production\n // onto stack\n pStack.push(production.get(0));\n\n // identify column of the left side of production\n col = parseTableHeader.get(pStack.peek());\n\n // set new row number\n row = Integer.parseInt(parseTable.get(row).get(col));\n// System.out.print(\"new row \" + row + \", \");\n\n // set new col number\n col = parseTableHeader.get(token_type);\n// System.out.println(\"new col \" + col);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = false;\n\n }\n\n // we are done, so accept!\n else if(cellParts[0].equals(\"a\")) {\n break;\n }\n\n } catch (NumberFormatException e) {\n\n }\n\n }\n\n System.out.println(PASSMESSAGE);\n\n // Prints out the production rules used to derive program.\n// while(!rStack.isEmpty()) {\n// int idx = rStack.pop();\n// ArrayList<String> production = grammar.get(idx);\n// System.out.print(production.get(0) + \" -> \");\n// for(int i = 1; i < production.size(); i++) {\n// System.out.print(production.get(i) + \" \");\n// }\n// System.out.println();\n// }\n\n return true;\n\n\n }",
"public Parser compile( Grammar grammar)\n {\n grammar.augment();\n \n conflicts = 0;\n \n itemSets = createItemSets( grammar);\n State start = createStates( grammar, itemSets);\n grammar.freeGraph();\n\n log.infof( \"\\nFound %d conflicts in %d states.\", conflicts, itemSets.size());\n \n return new Parser( this, start);\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 }",
"@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 NFA parse() throws ParseException;",
"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 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 }",
"private void outputParseFunction(PrintWriter out, String startRuleName) {\n\t\t\n\t\tString tokenname = prefix + \"Token\";\n\t\t\n\t\tout.println(\" public \" + node(startRuleName) + \" parse() throws \" + prefix + \"ParserException, \" + prefix + \"TokenizerException {\");\n\t\tout.println(\" \" + tokenname + \" curToken;\");\n\t\tout.println();\n\t\tout.println(\" GrammarState curState;\");\n\t\tout.println();\n\t\tout.println(\" Stack<GrammarState> stateStack = new Stack<GrammarState>();\");\n\t\tout.println();\n\t\tout.println(\" \" + node(startRuleName) + \" parseTree = null;\");\n\t\tout.println(\" \" + prefix + \"ASTNode curNode = null;\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(new GrammarState(startRuleName, GrammarState.RULE));\");\n\t\tout.println();\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" while ( true ) {\");\n\t\tout.println();\n\t\tout.println(\" curState = stateStack.pop();\");\n\t\tout.println();\n\t\tout.println(\" if (curState == null) {\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode nextNode = curNode.getParent();\");\n\t\tout.println();\n\t\tout.println(\" if (curNode.isMultiChild() && curNode.numChildren() == 1) {\");\n\t\tout.println(\" \" + prefix + \"ASTNode parentNode = curNode.getParent();\");\n\t\tout.println(\" parentNode.removeChild(curNode);\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode childNode = curNode.getChild(0);\");\n\t\tout.println(\" curNode.removeChild(childNode);\");\n\t\tout.println(\" parentNode.addChild(childNode);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curNode.numChildren() == 0) {\");\n\t\tout.println(\" curNode.getParent().removeChild(curNode);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" curNode = nextNode;\");\n\t\tout.println();\n\t\tout.println(\" }\"); \n\t\tout.println(\" else if (curState.type == GrammarState.TOKEN) {\");\n\t\tout.println();\n\t\tout.println(\" if (!curState.name.equals(curToken.name)) {\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\"), expected token (\\\" + curState.name + \\\")\\\"\t, curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (curToken.name.equals(\\\"eof\\\")) break;\");\n\t\tout.println();\n\t\tout.println(\" curNode.addChild(new \" + prefix + \"ASTToken(curToken.name, curToken.value));\");\n\t\tout.println();\t\t\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.RULE) {\");\n\t\tout.println();\n\t\tout.println(\" GrammarRule newrule = table.get(curState.name).get(curToken.name);\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" if (newrule == null) {\");\n\t\tout.println(\" String expected = \\\"\\\";\");\n\t\tout.println(\" for (String t : table.get(curState.name).keySet()) if (t != null) expected += t + \\\", \\\";\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\") for rule \\\\\\\"\\\" + curState.name.replaceAll(\\\"\\\\\\\\{.*\\\", \\\"\\\") + \\\"\\\\\\\", expected one of (\\\" + expected.substring(0, expected.length()-2) + \\\")\\\", curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (!newrule.subrule) {\");\n\t\tout.println(\" if (parseTree == null) {\");\n\t\tout.println(\" curNode = parseTree = new \" + node(startRuleName) + \"(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" } else {\");\n\t\tout.println(\" \" + prefix + \"ASTNode newnode = makenode(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" curNode.addChild(newnode);\");\n\t\tout.println(\" curNode = newnode;\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(null);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" for (int i = newrule.graph.length-1; i >= 0; i--) {\");\n\t\tout.println(\" stateStack.push(newrule.graph[i]);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.EPSILON) {\");\n\t\tout.println(\" continue; //do nothing\");\n\t\tout.println(\" }\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" return parseTree;\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\t\n\t}",
"protected GrammarNode createGrammar() throws IOException {\n languageModel.allocate();\n Timer.start(\"LMGrammar.create\");\n GrammarNode firstNode = null;\n if (languageModel.getMaxDepth() > 2) {\n System.out.println(\"Warning: LMGrammar limited to bigrams\");\n }\n int identity = 0;\n List nodes = new ArrayList();\n Set words = languageModel.getVocabulary();\n // create all of the word nodes\n for (Iterator i = words.iterator(); i.hasNext();) {\n String word = (String) i.next();\n GrammarNode node = createGrammarNode(identity++, word);\n if (node != null && !node.isEmpty()) {\n if (node.getWord().equals(\n getDictionary().getSentenceStartWord())) {\n firstNode = node;\n } else if (node.getWord().equals(\n getDictionary().getSentenceEndWord())) {\n node.setFinalNode(true);\n }\n nodes.add(node);\n }\n }\n if (firstNode == null) {\n throw new Error(\"No sentence start found in language model\");\n }\n for (Iterator i = nodes.iterator(); i.hasNext();) {\n GrammarNode prevNode = (GrammarNode) i.next();\n // don't add any branches out of the final node\n if (prevNode.isFinalNode()) {\n continue;\n }\n for (Iterator j = nodes.iterator(); j.hasNext();) {\n GrammarNode nextNode = (GrammarNode) j.next();\n String prevWord = prevNode.getWord().getSpelling();\n String nextWord = nextNode.getWord().getSpelling();\n Word[] wordArray = {getDictionary().getWord(prevWord),\n getDictionary().getWord(nextWord)};\n float logProbability = languageModel\n .getProbability(WordSequence.getWordSequence(wordArray));\n prevNode.add(nextNode, logProbability);\n }\n }\n Timer.stop(\"LMGrammar.create\");\n languageModel.deallocate();\n return firstNode;\n }",
"IGrammarComp getGrammar();",
"@Test\r\n\tpublic void test3() throws IOException, LexerException, ParserException {\r\n\t\tStringReader ex = new StringReader(\"(lam^s f.\\n\\t(lam^s x.x) (f 1))\\n(lam^c y.\\n\\t(lam^s z.z) y)\");\r\n\r\n\t\tParser parser = new Parser();\r\n\t\tTerm result = parser.Parsing(ex);\r\n\t}",
"private Element parseRoot() {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n \r\n while (peek()<=' ') next();//skip whitespace\r\n switch (peek()) {//switch on next character\r\n case 'n': return new ScalarElement(parseNull());//parse null \r\n case 'f': return new ScalarElement(parseBoolean());//parse false\r\n case 't': return new ScalarElement(parseBoolean());//parse true\r\n case '[': return new ArrayElement(parseArray());//parse array \r\n case '{': return new ObjectElement(parseObject());//parse object\r\n default : throw new RuntimeException(\"Invalid syntax : \"+context());//ruh roh\r\n }//switch on next character\r\n \r\n }",
"final public Expression GraphNode(Exp stack) throws ParseException {\n Expression expression1;\n if (jj_2_17(2)) {\n expression1 = VarOrTerm(stack);\n } else {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ATLIST:\n case ATPATH:\n case LPAREN:\n case LBRACKET:\n case AT:\n expression1 = TriplesNode(stack);\n break;\n default:\n jj_la1[229] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n }\n {if (true) return expression1;}\n throw new Error(\"Missing return statement in function\");\n }",
"Token readToken() throws SyntaxException;",
"private static Parser<Grammar> makeParser(final File grammar) {\n try {\n\n return Parser.compile(grammar, Grammar.ROOT);\n\n // translate these checked exceptions into unchecked\n // RuntimeExceptions,\n // because these failures indicate internal bugs rather than client\n // errors\n } catch (IOException e) {\n throw new RuntimeException(\"can't read the grammar file\", e);\n } catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"the grammar has a syntax error\", e);\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}",
"private void parse() {\n stack.push(documentNode);\n try {\n Token token = lexer.nextToken();\n boolean tagOpened = false;\n\n while (token.getType() != TokenType.EOF) {\n\n if (token.getType() == TokenType.TEXT) {\n TextNode textNode = new TextNode((String) token.getValue());\n ((Node) stack.peek()).addChild(textNode);\n\n } else if (token.getType() == TokenType.TAG_OPEN) {\n if (tagOpened) {\n throw new SmartScriptParserException(\"The tag was previously open but is not yet closed.\");\n }\n tagOpened = true;\n lexer.setState(LexerState.TAG);\n\n } else if (token.getType() == TokenType.TAG_NAME && token.getValue().equals(\"=\")) {\n parseEchoTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ff][Oo][Rr]\")) {\n parseForTag(tagOpened);\n tagOpened = false;\n\n } else if (token.getType() == TokenType.TAG_NAME && ((String) token.getValue()).matches(\"[Ee][Nn][Dd]\")) {\n parseEndTag();\n tagOpened = false;\n } else {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n token = lexer.nextToken();\n }\n if (!(stack.peek() instanceof DocumentNode)) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n } catch (LexerException | EmptyStackException exc) {\n throw new SmartScriptParserException(PARSE_ERROR);\n }\n}",
"public String grammar(Source source) {\r\n Stacker stacker = new Stacker();\r\n grammar = stacker.run(source);\r\n charInput = ! grammar.has(TI);\r\n if (grammar.op() == Error) return grammar.note();\r\n else return null;\r\n }",
"public Token nextToken() throws ScanErrorException\n {\n skipWhiteSpace();\n if (eof) \n return new Token(\"eof\", \"eof\");\n else if (isDigit(currentChar))\n return new Token(scanNumber(), \"number\");\n else if (isLetter(currentChar))\n {\n return Token.verifyKeywordLexeme(scanIdentifier());\n }\n else if (isArithmeticOperand(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"arithmetic_operand\");\n }\n else if (isParentheses(currentChar))\n {\n String result = \"\";\n result += currentChar;\n eat(currentChar);\n return new Token(result, \"parentheses\");\n }\n else if(currentChar == '<' || currentChar == '>' || currentChar == '=')\n {\n String result = \"\";\n result += currentChar;\n if(currentChar == '=')\n eat(currentChar);\n else if(currentChar == '>')\n {\n eat(currentChar);\n if(currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n else\n {\n eat(currentChar);\n if(currentChar == '>' || currentChar == '=')\n {\n result += currentChar;\n eat(currentChar);\n }\n }\n\n return new Token(result, \"relational_operand\");\n }\n\n System.out.println(\"Error in reading token. Char <\" + currentChar \n + \"> not part of regular language.\");\n eat(currentChar);\n return null;\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}",
"Token peekToken() throws SyntaxException;",
"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 }",
"private FiniteAutomaton parseE() {\n\n\t\tFiniteAutomaton t = parseT();\n\n\t\tint c = peek();\n\n\t\tif (c >= 0 && c != ')' && c != '|') {\n\t\t\t// concatenation\n\n\t\t\tFiniteAutomaton e = parseE();\n\n\t\t\t// create result automaton\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tresult.addAll(t);\n\t\t\tresult.addAll(e);\n\n\t\t\t// create ε-transition connecting e's accepting state to r's start state\n\t\t\tresult.createTransition(t.getUniqueAcceptingState(), e.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tt.getUniqueAcceptingState().setAccepting(false);\n\t\t\te.getStartState().setStart(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t}\n\n\t\treturn t;\n\t}",
"public Grammar() {\n }",
"public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}",
"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}",
"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}",
"CParserResult getParserResult();",
"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 }",
"private ParseTree parseStatement() {\n return parseSourceElement();\n }",
"public interface IParser {\n\n /**\n * Coco/R generated function. It is used to inform parser about semantic errors.\n */\n void SemErr(String str);\n\n /**\n * Coco/R generated function for parsing input. The signature was changes in parsers' frame files so that it\n * receives source argument.\n *\n * @param source source to be parsed\n */\n void Parse(Source source);\n\n /**\n * Resets the parser but not the {@link NodeFactory} instance it holds. This way it can be used multiple times with\n * storing current state (mainly identifiers table). This is useful for parsing unit files before parsing the actual\n * source.\n */\n void reset();\n\n /**\n * Returns whether there were any errors throughout the parsing of the last source.\n */\n boolean hadErrors();\n\n /**\n * Sets support for extended goto. If this option is turned on, the parser will generate {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.ExtendedBlockNode}s\n * instead of {@link cz.cuni.mff.d3s.trupple.language.nodes.statement.BlockNode}s.\n */\n void setExtendedGoto(boolean extendedGoto);\n\n /**\n * Returns true if the support for Turbo Pascal extensions is turned on.\n */\n boolean isUsingTPExtension();\n\n /**\n * Reutnrs the root node of the last parsed source.\n */\n RootNode getRootNode();\n\n}",
"public SyntaxTreeNode parse(XMLReader reader, InputSource input) {\n try {\n // Parse the input document and build the abstract syntax tree\n reader.setContentHandler(this);\n if (_hasUserErrListener) {\n // Set a ErrorHandler proxy to pass any parsing error on to be handled\n // by the user's ErrorListener\n reader.setErrorHandler(new ErrorHandlerProxy());\n }\n reader.parse(input);\n // Find the start of the stylesheet within the tree\n return getStylesheet(_root);\n }\n catch (IOException e) {\n if (_xsltc.debug()) e.printStackTrace();\n reportError(ERROR,new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));\n }\n catch (SAXException e) {\n Throwable ex = e.getException();\n if (_xsltc.debug()) {\n e.printStackTrace();\n if (ex != null) ex.printStackTrace();\n }\n reportError(ERROR, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));\n }\n catch (CompilerException e) {\n if (_xsltc.debug()) e.printStackTrace();\n reportError(ERROR, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));\n }\n catch (Exception e) {\n if (_xsltc.debug()) e.printStackTrace();\n reportError(ERROR, new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR, e));\n }\n return null;\n }",
"private CalculatableNode nextNode() throws IOException {\n\t\tint ttype;\n\t\tttype = tokenizer.nextToken();\n\t\tif (ttype == StreamTokenizer.TT_NUMBER) {\n\t\t\treturn new NumericalNode((int) tokenizer.nval);\n\t\t}\n\t\tif (ttype >= 0) {\n\t\t\t// sign character such as +-*/()\n\t\t\tchar sign = (char) tokenizer.ttype;\n\t\t\tif (sign == '(') {\n\t\t\t\tCalculatableNode node = parseNode();\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalFormulaException(\"数式が不正です\");\n\t}",
"@Override\n public String getParsedGrammar() {\n return \"<arithmetic_expression> -> id\\n\";\n }",
"private String E() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\t\t// E -> L\n\t\t\t\treturn L();\n\t\t\tcase '(':\n\t\t\t\t// E -> (S)\n\t\t\t\teat('(');\n\t\t\t\tString pe = S();\n\t\t\t\teat(')');\n\t\t\t\treturn pe;\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}",
"public interface RecursiveDescentParser\n{\n\n /**\n * Parses a regular expression and returns an NFA that describes that regular expression.\n * @return an NFA describing the regular expression that was parsed\n * @throws ParseException\n */\n public NFA parse() throws ParseException;\n\n}",
"public CGrammar getGrammarStructure();",
"void parse();",
"LexicalUnit getNextLexicalUnit();",
"public String run(Source source) {\r\n if (grammar == null) {\r\n System.err.println(\"Error: No grammar has been set up\");\r\n System.exit(1);\r\n }\r\n prepare(source);\r\n return runParser();\r\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 }",
"@Override\n public TreeNode make(Parser parser) {\n Token token = parser.peek();\n if(token.getTokenID() == Token.TIDEN){\n return nAlistNode.make(parser); //alist trans (dont consume token alist will need it)\n }\n return null; //eps trans\n }",
"public Result validate(MessageNode mesgNode, Message mesg);",
"private void parse(Node node) {\r\n if (tracing && ! skipTrace) System.out.println(node.trace());\r\n skipTrace = false;\r\n switch(node.op()) {\r\n case Error: case Temp: case List: case Empty: break;\r\n case Rule: parseRule(node); break;\r\n case Id: parseId(node); break;\r\n case Or: parseOr(node); break;\r\n case And: parseAnd(node); break;\r\n case Opt: parseOpt(node); break;\r\n case Any: parseAny(node); break;\r\n case Some: parseSome(node); break;\r\n case See: parseSee(node); break;\r\n case Has: parseHas(node); break;\r\n case Not: parseNot(node); break;\r\n case Tag: parseTag(node); break;\r\n case Success: parseSuccess(node); break;\r\n case Fail: parseFail(node); break;\r\n case Eot: parseEot(node); break;\r\n case Char: parseChar(node); break;\r\n case Text: parseText(node); break;\r\n case Set: parseSet(node); break;\r\n case Range: parseRange(node); break;\r\n case Split: parseSplit(node); break;\r\n case Point: parsePoint(node); break;\r\n case Cat: parseCat(node); break;\r\n case Mark: parseMark(node); break;\r\n case Drop: parseDrop(node); break;\r\n case Act: parseAct(node); break;\r\n default: assert false : \"Unexpected node type \" + node.op(); break;\r\n }\r\n }",
"public double parse(){\n token = lexer.getNextToken();\n\t\tdouble value = parseExpression();\n\t\tif (token.getType().equals(Token.Type.END)&&parenCount==0){\n\t\t\treturn value;\n\t\t}else{\n\t\t\treturn Double.NaN;\n\t\t}\n\t}",
"CParser getParser();",
"@Override\n\tpublic void parse()\n\t{\n\t\tASTEXPRTEST exprTest = ((ASTEXPRTEST) ast.jjtGetChild(0));\n\t\tparseExprTest(exprTest);\n\n\t\t// get inherited symbols States before while, in order to not change original\n\t\t// values.\n\t\t// Changes made inside while mus not be visible outside, because while can not\n\t\t// be executed\n\t\tinheritedSymbols = Utils.copyHashMap(inheritedSymbols);\n\n\t\tASTSTATEMENTS stmtlst = ((ASTSTATEMENTS) ast.jjtGetChild(1));\n\t\tparseStmtLst(stmtlst);\n\n\t\t// symbols created inside while are added to symbol table, but as not\n\t\t// initialized, because while statements can not be executed\n\t\tmySymbols = setAllSymbolsAsNotInitialized(mySymbols);\n\t}",
"private static SimpleNode parse(String filename) throws ParseException {\n\t\tParser parser;\n\t\t// open file as input stream\n\t\ttry {\n\t\t\tparser = new Parser(new java.io.FileInputStream(filename));\n\t\t}\n\t\tcatch (java.io.FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR: file \" + filename + \" not found.\");\n\t\t\treturn null;\n\t\t}\n\t\t// parse and return root node\n\t\treturn parser.parse();\n\t}",
"private boolean grammar() {\r\n return skip() && rules() && MARK(END_OF_TEXT) && EOT();\r\n }",
"@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }",
"private void LL1Parser() throws IOException {\n\n LA.ReadLine(0);\n ParsStack.push(\"$\");\n ParsStack.push(\"P\");\n int prod;\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"in ll1 parser\");\n// System.out.println(token.getValue() + \" \" + token.getType());\n while (true)\n {\n// System.out.println(ParsStack.peek());\n if (!CheckTerminal(ParsStack.peek()) && (!ParsStack.peek().equals(\"$\")) && (ParsStack.peek().charAt(0) != '@'))\n {\n /**inja be nazarm bayad BUparser run she agar BE bashe sare parse stack**/\n if (ParsStack.peek().equals(\"BE\"))\n {\n// System.out.println(\"go to SLR parser\");\n SLRParser();\n// System.out.println(\"Come back from SLR parser\");\n// System.out.println(ParsStack.peek());\n ParsStack.pop();\n token = LA.Scanner();\n// System.out.println(token.getValue());\n }\n else\n {\n prod = getProduction(ParsStack.peek(), token);\n// System.out.println(ParsStack.peek() + \" \" + token.getValue() + \" \" + prod);\n if (prod == 0) {\n error(4);\n break;\n } else {\n ParsStack.pop();\n for (int i = TempGrammer.get(prod - 1).getRight().length - 2 ; i > 0 ; i--) {\n if (TempGrammer.get(prod - 1).getRight()[i].equals(\"!\"))\n break;\n ParsStack.push(TempGrammer.get(prod - 1).getRight()[i]);\n// System.out.println(\"fill stack \" + ParsStack.peek());\n }\n }\n }\n }\n else if (CheckTerminal(ParsStack.peek()))\n {\n if (!CheckTerminal(token.getValue()))\n {\n if (ParsStack.peek().equals(\"id\"))\n {\n// System.out.println(token.getValue() + \" pop\");\n ParsStack.pop();\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"new token is \" + token.getValue());\n }\n else\n {\n if (token.getValue().equals(\"$\"))\n {\n error(1);\n break;\n }\n }\n }\n else if (ParsStack.peek().equals(token.getValue()))\n {\n// System.out.println(token.getValue() + \" pop\");\n ParsStack.pop();\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"new token is \" + token.getValue());\n\n }\n else\n {\n error(1);\n break;\n }\n }\n /**inja ham ye else if dige bashe baraye @semanticrule ha ke codeGenerator seda zade beshe**/\n /** nazar man ro injast **/\n else if (ParsStack.peek().charAt(0) == '@')\n {\n// System.out.println(\"see semantic role\");\n if (ParsStack.peek().equals(\"@push\"))\n terminat = CodeGen.run( ParsStack.pop() , token.getValue() , LA.Line - 1);\n else\n terminat = CodeGen.run( ParsStack.pop() , ParsStack.peek() , LA.Line - 1);\n\n\n if(terminat)\n Terminate();\n /** code generation inja seda mishe **/\n }\n else if (ParsStack.peek().equals(\"$\"))\n {\n if (token.getValue().equals(\"$\"))\n {\n Accept();\n break;\n }\n else {\n error(2);\n break;\n }\n }\n else {\n error(3);\n break;\n }\n }\n\n }",
"private String L() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\t\t// L -> a\n\t\t\t\teat('a');\n\t\t\t\treturn \"a\";\n\t\t\tcase 'b':\n\t\t\t\t// L -> b\n\t\t\t\teat('b');\n\t\t\t\treturn \"b\";\n\t\t\tcase 'c':\n\t\t\t\t// L -> c\n\t\t\t\teat('c');\n\t\t\t\treturn \"c\";\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}",
"private void parse() {\n try {\n SimpleNode rootNode = jmm.parseClass(sourcefile);\n assert rootNode.is(JJTPROGRAM);\n\n SimpleNode classNode = rootNode.jjtGetChild(0);\n assert classNode.is(JJTCLASSDECLARATION);\n\n data.classNode = classNode;\n } catch (FileNotFoundException e) {\n throw new CompilationException(e);\n } catch (ParseException e) {\n throw new CompilationException(\"Parsing Error: \" + e.getMessage(), e);\n }\n }",
"public void run()\n{\n yyparse();\n}",
"public void run()\n{\n yyparse();\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 void run()\n {\n yyparse();\n }",
"@Test\r\n\tpublic void testEmpty() throws LexicalException, SyntaxException {\r\n\t\tString input = \"\"; //The input is the empty string. \r\n\t\tParser parser = makeParser(input);\r\n\t\tthrown.expect(SyntaxException.class);\r\n\t\tparser.parse();\r\n\t}",
"public Grammar()\n {\n this.rules = new ArrayList<Rule>();\n }",
"static void lookUp(){\r\n\r\n if (lexeme.equals(\"(\"))\r\n token = \"LEFT_PAREN\";\r\n else if (lexeme.equals(\")\"))\r\n token = \"RIGHT_PAREN\";\r\n else if (lexeme.equals(\"true\"))\r\n token = \"TRUE\";\r\n else if (lexeme.equals(\"false\"))\r\n token = \"FALSE\";\r\n else if (lexeme.equals(\"-\"))\r\n token = \"MINUS\";\r\n else if (lexeme.equals(\"+\"))\r\n token = \"PLUS\";\r\n else if (lexeme.equals(\"*\"))\r\n token = \"STAR\";\r\n else if (lexeme.equals(\"/\"))\r\n token = \"DIVOP\";\r\n else if (lexeme.equals(\"%\"))\r\n token = \"MOD\";\r\n else if (lexeme.equals(\">\"))\r\n token = \"GREATER_THAN\";\r\n else if (lexeme .equals(\"<\"))\r\n token = \"LESS_THAN\";\r\n else if (lexeme.equals(\"=\"))\r\n token = \"EQUALS\";\r\n else if (lexeme.equals(\"<=\"))\r\n token = \"LESS_OR_EQUAL\";\r\n else if (lexeme.equals(\">=\"))\r\n token = \"GREATER_OR_EQUAL\";\r\n else if (lexeme.equals(\"!=\"))\r\n token = \"NOT_EQUAL\";\r\n else\r\n token = \"ILLEGAL\";\r\n }",
"private FiniteAutomaton parseT() {\n\t\t\n\t\tFiniteAutomaton f = parseF();\n\t\t\n\t\tint c = peek();\n\t\tif (c >= 0 && (c == '*' || c == '+')) {\n\t\t\t// repetition\n\t\t\texpect((char) c); // consume the * or +\n\n\t\t\t// Create result NFA with new start and accepting states\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tState start = result.createState();\n\t\t\tstart.setStart(true);\n\t\t\tState accepting = result.createState();\n\t\t\taccepting.setAccepting(true);\n\n\t\t\t// add ε-transitions from\n\t\t\t// - start to accepting (only for '*', not for '+') and,\n\t\t\t// - accepting to start state (both '*' and '+')\n\t\t\t// This allows 0 or more repetitions for '*', and 1 or more\n\t\t\t// repetitions for '+'.\n\t\t\t\n\t\t\tif (c == '*') {\n\t\t\t\tresult.createTransition(start, accepting, FiniteAutomaton.EPSILON);\n\t\t\t}\n\t\t\tresult.createTransition(accepting, start, FiniteAutomaton.EPSILON);\n\n\t\t\t// add states from orig NFA\n\t\t\tresult.addAll(f);\n\n\t\t\t// add ε-transition from the new start state to the old start state\n\t\t\tresult.createTransition(start, f.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tf.getStartState().setStart(false);\n\n\t\t\t// add ε-transition from the old accepting state to the new accepting state\n\t\t\tresult.createTransition(f.getUniqueAcceptingState(), accepting, FiniteAutomaton.EPSILON);\n\t\t\tf.getUniqueAcceptingState().setAccepting(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t} else if (c >= 0 && c == '?') {\n\t\t\texpect('?');\n\t\t\t\n\t\t\t// Create new start and accepting states, connected to/from\n\t\t\t// the original start and accepting states, and create an\n\t\t\t// epsilon transition from the new start state to the new\n\t\t\t// accepting state (allowing 0 occurrences of strings accepted\n\t\t\t// by the original FA.)\n\t\t\tState start = f.getStartState();\n\t\t\tState accept = f.getUniqueAcceptingState();\n\t\t\tState newStart = f.createState();\n\t\t\tState newAccept = f.createState();\n\t\t\tf.createTransition(newStart, start, FiniteAutomaton.EPSILON); // allow 1 occurrence\n\t\t\tf.createTransition(accept, newAccept, FiniteAutomaton.EPSILON); // as above\n\t\t\tstart.setStart(false);\n\t\t\tnewStart.setStart(true);\n\t\t\taccept.setAccepting(false);\n\t\t\tnewAccept.setAccepting(true);\n\t\t\tf.createTransition(newStart, newAccept, FiniteAutomaton.EPSILON); // allow 0 occurrences\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\t\t\n\t\t// No operator (*+?) was applied, so just return whatever parseF() returned\n\t\treturn f;\n\t}",
"public void parse()\n\t{\n\t\ttry\n\t\t{\n\t\t\tstatus = program();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}",
"@Test\n public void testExploratoryString() throws IOException {\n String simplestProgram = \"x := 1;\" +\n \"y :={0,1,2,33};\" +\n \"if (x>y) then \" +\n \"{x:=1;} \" +\n \"else \" +\n \"{y:=1;}\";\n\n CharStream inputCharStream = new ANTLRInputStream(new StringReader(simplestProgram));\n TokenSource tokenSource = new GrammarLexer(inputCharStream);\n TokenStream inputTokenStream = new CommonTokenStream(tokenSource);\n GrammarParser parser = new GrammarParser(inputTokenStream);\n\n //parser.addErrorListener(new TestErrorListener());\n parser.setErrorHandler(new BailErrorStrategy());\n\n GrammarParser.ProgramContext context = parser.program();\n\n System.out.println(context.getText());\n\n logger.info(context.toString());\n }",
"Butternut(String grammar)\n\t{\n\t\tmain = selectGrammar(grammar);\n\t\ttext = \"123CAN Weldoer\".toCharArray();//new char[0];\n\t\ttree = main.parse(0);\n\t\t//experimentalParser(\"123CAN Weldoer\".toCharArray());\n\t}",
"private String S() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\t\t// S -> ERS\n\t\t\t\tString er = E();\n\t\t\t\tint r = R();\n\t\t\t\tString e=\"\";\n\t\t\t\tfor (int i=0; i<r; i++){\n\t\t\t\t\te += er;\n\t\t\t\t}\n\t\t\t\te+= S();\n\t\t\t\treturn (e);\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// S -> epsilon\n\t\t\t\treturn \"\";\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}",
"Parse createParse();",
"public Token next()\n\t{\n\t\tint munchSize = 0;\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t// iterate until we either:\n\t\t//\t1. Match a token in any state but MANY_STATE\n\t\t//\t2. Whitespace, newline or EOF\n\t\tboolean was_good = false, can_continue = true;\n\t\tToken to_return = Token.generateToken(lineNum, charPos, \"EOF\", Token.Kind.EOF);\n\n\t\t// skip any initial white space.\n\t\twhile (readChar() == -1) { }\n\t\tthis.lastChar = this.nextChar;\n\t\twhile (can_continue && readChar() > -1) {\n\t\t\tchar next = (char)this.nextChar;\n\t\t\tint pos = (charPos - (buffer.length() + 1));\n\t\t\tswitch (munchSize) {\n\t\t\t\tcase EMPTY_STATE:\n\t\t\t\t\t// Search for all tokens of one token. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getSingleCharacterMap(), String.valueOf(next), 0)) {\n\t\t\t\t\t\t// We can transition.\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getSingleCharacterMap());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// error.\n\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_STATE:\n\t\t\t\t\t// Search for all tokens of two tokens. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getDoubleCharTokens(), buffer.toString() + next, 1)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getDoubleCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\n\t\t\t\t\t\t// is this a comment?\n\t\t\t\t\t\tif (to_return.is(Token.Kind.COMMENT)) {\n\t\t\t\t\t\t\t// restart parse.\n\t\t\t\t\t\t\tthis.on_comment = true;\n\t\t\t\t\t\t\tmunchSize = 0;\n\t\t\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tcan_continue = true;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"EOF\", Token.Kind.EOF);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\tif (!was_good) {\n\t\t\t\t\t\t\t// error.\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE_STATE:\n\t\t\t\t\t// Search for multiple character states and keywords.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getMultiCharTokens(), buffer.toString() + next, 2)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getMultiCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // MANY_STATE\n\t\t\t\t\tif (Token.isValidLexeme(Token.getKeywords(), buffer.toString() + next, munchSize)) {\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(), Token.getKeywords());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn to_return;\n\t}",
"private int R() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// R -> epsilon\n\t\t\t\treturn 1;\n\t\t\tcase '0':\n\t\t\tcase '1':\n\t\t\tcase '2':\n\t\t\tcase '3':\n\t\t\tcase '4':\n\t\t\tcase '5':\n\t\t\tcase '6':\n\t\t\tcase '7':\n\t\t\tcase '8':\n\t\t\tcase '9':\n\t\t\t\t// R -> C\n\t\t\t\treturn C();\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}",
"public final void grammar_() throws RecognitionException {\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:190:2: ( ( ^( LEXER_GRAMMAR grammarSpec ) | ^( PARSER_GRAMMAR grammarSpec ) | ^( TREE_GRAMMAR grammarSpec ) | ^( COMBINED_GRAMMAR grammarSpec ) ) )\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:190:4: ( ^( LEXER_GRAMMAR grammarSpec ) | ^( PARSER_GRAMMAR grammarSpec ) | ^( TREE_GRAMMAR grammarSpec ) | ^( COMBINED_GRAMMAR grammarSpec ) )\n\t\t\t{\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:190:4: ( ^( LEXER_GRAMMAR grammarSpec ) | ^( PARSER_GRAMMAR grammarSpec ) | ^( TREE_GRAMMAR grammarSpec ) | ^( COMBINED_GRAMMAR grammarSpec ) )\n\t\t\tint alt1=4;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase LEXER_GRAMMAR:\n\t\t\t\t{\n\t\t\t\talt1=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase PARSER_GRAMMAR:\n\t\t\t\t{\n\t\t\t\talt1=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TREE_GRAMMAR:\n\t\t\t\t{\n\t\t\t\talt1=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase COMBINED_GRAMMAR:\n\t\t\t\t{\n\t\t\t\talt1=4;\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;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 1, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt1) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:190:6: ^( LEXER_GRAMMAR grammarSpec )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,LEXER_GRAMMAR,FOLLOW_LEXER_GRAMMAR_in_grammar_68); if (state.failed) return;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t\t\tpushFollow(FOLLOW_grammarSpec_in_grammar_70);\n\t\t\t\t\tgrammarSpec();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\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// org/antlr/grammar/v3/TreeToNFAConverter.g:191:5: ^( PARSER_GRAMMAR grammarSpec )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,PARSER_GRAMMAR,FOLLOW_PARSER_GRAMMAR_in_grammar_80); if (state.failed) return;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t\t\tpushFollow(FOLLOW_grammarSpec_in_grammar_82);\n\t\t\t\t\tgrammarSpec();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\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// org/antlr/grammar/v3/TreeToNFAConverter.g:192:5: ^( TREE_GRAMMAR grammarSpec )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,TREE_GRAMMAR,FOLLOW_TREE_GRAMMAR_in_grammar_92); if (state.failed) return;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t\t\tpushFollow(FOLLOW_grammarSpec_in_grammar_94);\n\t\t\t\t\tgrammarSpec();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\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// org/antlr/grammar/v3/TreeToNFAConverter.g:193:5: ^( COMBINED_GRAMMAR grammarSpec )\n\t\t\t\t\t{\n\t\t\t\t\tmatch(input,COMBINED_GRAMMAR,FOLLOW_COMBINED_GRAMMAR_in_grammar_104); if (state.failed) return;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return;\n\t\t\t\t\tpushFollow(FOLLOW_grammarSpec_in_grammar_106);\n\t\t\t\t\tgrammarSpec();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return;\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return;\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\tif ( state.backtracking==0 ) {\n\t\t\t\tfinish();\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}",
"@Test\n\t\tpublic void testEmpty() throws LexicalException, SyntaxException {\n\t\t\tString input = \"\"; //The input is the empty string. \n\t\t\tthrown.expect(SyntaxException.class);\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tProgram p = parser.parse();\n\t\t}",
"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}",
"int yyparse()\n {\n boolean doaction;\n init_stacks();\n yynerrs = 0;\n yyerrflag = 0;\n yychar = -1; //impossible char forces a read\n yystate=0; //initial state\n state_push(yystate); //save it\n val_push(yylval); //save empty value\n while (true) //until parsing is done, either correctly, or w/error\n {\n doaction=true;\n if (yydebug) debug(\"loop\");\n //#### NEXT ACTION (from reduction table)\n for (yyn=yydefred[yystate];yyn==0;yyn=yydefred[yystate])\n {\n if (yydebug) debug(\"yyn:\"+yyn+\" state:\"+yystate+\" yychar:\"+yychar);\n if (yychar < 0) //we want a char?\n {\n yychar = yylex(); //get next token\n if (yydebug) debug(\" next yychar:\"+yychar);\n //#### ERROR CHECK ####\n if (yychar < 0) //it it didn't work/error\n {\n yychar = 0; //change it to default string (no -1!)\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n }//yychar<0\n yyn = yysindex[yystate]; //get amount to shift by (shift index)\n if ((yyn != 0) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n {\n if (yydebug)\n debug(\"state \"+yystate+\", shifting to state \"+yytable[yyn]);\n //#### NEXT STATE ####\n yystate = yytable[yyn];//we are in a new state\n state_push(yystate); //save it\n val_push(yylval); //push our lval as the input for next rule\n yychar = -1; //since we have 'eaten' a token, say we need another\n if (yyerrflag > 0) //have we recovered an error?\n --yyerrflag; //give ourselves credit\n doaction=false; //but don't process yet\n break; //quit the yyn=0 loop\n }\n\n yyn = yyrindex[yystate]; //reduce\n if ((yyn !=0 ) && (yyn += yychar) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yychar)\n { //we reduced!\n if (yydebug) debug(\"reduce\");\n yyn = yytable[yyn];\n doaction=true; //get ready to execute\n break; //drop down to actions\n }\n else //ERROR RECOVERY\n {\n if (yyerrflag==0)\n {\n yyerror(\"syntax error\");\n yynerrs++;\n }\n if (yyerrflag < 3) //low error count?\n {\n yyerrflag = 3;\n while (true) //do until break\n {\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"stack underflow. aborting...\"); //note lower case 's'\n return 1;\n }\n yyn = yysindex[state_peek(0)];\n if ((yyn != 0) && (yyn += YYERRCODE) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)\n {\n if (yydebug)\n debug(\"state \"+state_peek(0)+\", error recovery shifting to state \"+yytable[yyn]+\" \");\n yystate = yytable[yyn];\n state_push(yystate);\n val_push(yylval);\n doaction=false;\n break;\n }\n else\n {\n if (yydebug)\n debug(\"error recovery discarding state \"+state_peek(0)+\" \");\n if (stateptr<0) //check for under & overflow here\n {\n yyerror(\"Stack underflow. aborting...\"); //capital 'S'\n return 1;\n }\n state_pop();\n val_pop();\n }\n }\n }\n else //discard this token\n {\n if (yychar == 0)\n return 1; //yyabort\n if (yydebug)\n {\n yys = null;\n if (yychar <= YYMAXTOKEN) yys = yyname[yychar];\n if (yys == null) yys = \"illegal-symbol\";\n debug(\"state \"+yystate+\", error recovery discards token \"+yychar+\" (\"+yys+\")\");\n }\n yychar = -1; //read another\n }\n }//end error recovery\n }//yyn=0 loop\n if (!doaction) //any reason not to proceed?\n continue; //skip action\n yym = yylen[yyn]; //get count of terminals on rhs\n if (yydebug)\n debug(\"state \"+yystate+\", reducing \"+yym+\" by rule \"+yyn+\" (\"+yyrule[yyn]+\")\");\n if (yym>0) //if count of rhs not 'nil'\n yyval = val_peek(yym-1); //get current semantic value\n yyval = dup_yyval(yyval); //duplicate yyval if ParserVal is used as semantic value\n switch(yyn)\n {\n//########## USER-SUPPLIED ACTIONS ##########\n case 1:\n//#line 25 \"GramaticaGrupo8.y\"\n {}\n break;\n case 2:\n//#line 26 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 3:\n//#line 27 \"GramaticaGrupo8.y\"\n {yyerror(\"No hay sentencia\");}\n break;\n case 4:\n//#line 27 \"GramaticaGrupo8.y\"\n {}\n break;\n case 5:\n//#line 30 \"GramaticaGrupo8.y\"\n {}\n break;\n case 6:\n//#line 31 \"GramaticaGrupo8.y\"\n {}\n break;\n case 7:\n//#line 34 \"GramaticaGrupo8.y\"\n {}\n break;\n case 8:\n//#line 35 \"GramaticaGrupo8.y\"\n {}\n break;\n case 9:\n//#line 38 \"GramaticaGrupo8.y\"\n {\n Vector<ParserVal> vectorTokens = (Vector<ParserVal>)(val_peek(1).obj);\n String tipo = (val_peek(2).sval);/* para que esto ande tocar la regla del no terminal tipo*/\n tipo = tipo.toLowerCase();\n for(int i=0; i< vectorTokens.size();i++){\n ParserVal token = vectorTokens.elementAt(i);\n Symbol simbolo =(Symbol) token.obj;\n if (!simbolo.isUsada()){\n simbolo.setUsada(true);\n simbolo.setEsMutable(true);\n simbolo.setTipoVar(val_peek(2).sval);}\n else\n yyerror(\"Se esta intentado redeclarar la variable \"+simbolo.getLexema(),token.getFila(),token.getColumna());\n }\n\n }\n break;\n case 10:\n//#line 54 \"GramaticaGrupo8.y\"\n {yyerror(\"Declaracion mal definida \");}\n break;\n case 11:\n//#line 57 \"GramaticaGrupo8.y\"\n {/* id.add( ((Symbol)($1.obj)).getLexema() );*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$1 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol?*/\n yyval.obj = vect; }\n break;\n case 12:\n//#line 61 \"GramaticaGrupo8.y\"\n {\t((Symbol)(val_peek(0).obj)).setEspuntero(true); /*reconoce puntero*/\n /*id.add(((Symbol)($2.obj)).getLexema());//} //agrega a lista de identificadores reconocidos*/\n Vector<ParserVal> vect = new Vector<ParserVal>();/*$2 es el parser val con el symbolo de ese ID*/\n vect.add(val_peek(0));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 13:\n//#line 68 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($1.obj)).getLexema());*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$3 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 14:\n//#line 73 \"GramaticaGrupo8.y\"\n {/*id.add(((Symbol)($2.obj)).getLexema());*/\n ((Symbol)(val_peek(2).obj)).setEspuntero(true); /*reconoce puntero*/\n Vector<ParserVal> vect = (Vector<ParserVal>)(val_peek(0).obj); /*$4 me trae el vector original primero y desp aumenta*/\n vect.add(val_peek(2));/*ver si anda, hay que castear a Symbol? .obj*/\n yyval.obj = vect;\n }\n break;\n case 15:\n//#line 79 \"GramaticaGrupo8.y\"\n {yyerror(\"Se esperaba ';' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 16:\n//#line 82 \"GramaticaGrupo8.y\"\n {yyval.sval=\"integer\";}\n break;\n case 17:\n//#line 83 \"GramaticaGrupo8.y\"\n {yyval.sval=\"single\";}\n break;\n case 18:\n//#line 84 \"GramaticaGrupo8.y\"\n {yyerror(\"Tipo indefinido\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 19:\n//#line 87 \"GramaticaGrupo8.y\"\n {}\n break;\n case 20:\n//#line 88 \"GramaticaGrupo8.y\"\n {}\n break;\n case 21:\n//#line 91 \"GramaticaGrupo8.y\"\n {}\n break;\n case 22:\n//#line 92 \"GramaticaGrupo8.y\"\n {/*#######Solo llego aca si termino un if o un loop*/\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BI\")\n {\n listaTercetos.get(i).setOperando1(contadorTerceto);\n\n }\n if (listaTercetos.get(i).getOperador() == \"BF\")\n {\tlistaTercetos.get(i).setOperando2(contadorTerceto);\n }\n if (intLoop == 0){\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n }\n else\n { ((T_BF)listaTercetos.get(i)).invertFlags();\n listaTercetos.get(i).setOperando2(intLoop);\n intLoop=0;\n }\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n }\n break;\n case 23:\n//#line 104 \"GramaticaGrupo8.y\"\n {}\n break;\n case 24:\n//#line 107 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"+\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 25:\n//#line 121 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Suma_Resta(contadorTerceto,\"-\",val_peek(2).obj,val_peek(0).obj,st);\n /*st es la tabla de simbolos, paso lexema porque lo uso para buscar en la tabla de simbolos*/\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 26:\n//#line 135 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n yyval.obj=val_peek(0).obj; /*creo que es necesario para que no se pierdan los lexemas, si quieren reveanlo*/\n }\n break;\n case 27:\n//#line 141 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"/\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 28:\n//#line 155 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Mult_Div(contadorTerceto,\"*\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 29:\n//#line 168 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);\n /* terceto*/\n yyval.obj=val_peek(0).obj;\n }\n break;\n case 30:\n//#line 175 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 31:\n//#line 176 \"GramaticaGrupo8.y\"\n {yyval=val_peek(0);}\n break;\n case 32:\n//#line 177 \"GramaticaGrupo8.y\"\n {if(!((Symbol)(val_peek(0).obj)).isUsada()){\n /*error*/\n yyerror(\"variable no declarada\",val_peek(0).getFila(),val_peek(0).getColumna());\n }\n yyval=val_peek(0);\n }\n break;\n case 33:\n//#line 183 \"GramaticaGrupo8.y\"\n { /** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /*Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 34:\n//#line 188 \"GramaticaGrupo8.y\"\n {\t\t\t/** Revisar sino pierdo el puntero al elemento qe necesito **/\n yyval=val_peek(0);\n /* Antes qedaban atributos sin setear*/\n /* Symbol aux = st.getSymbol(lex.lastSymbol);*/\n st.addcambiarSigno(((Symbol)(val_peek(0).obj))); /*((Symbol))($2.obj))*/\n }\n break;\n case 35:\n//#line 196 \"GramaticaGrupo8.y\"\n {\t\t/*necesito el tipo de la expresion*/\n if (!((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable no esta definida \",val_peek(2).getFila(),val_peek(2).getColumna());\n }else{if (!((Symbol)(val_peek(2).obj)).getEsMutable()){\n yyerror(\"La variable no es mutable \",val_peek(2).getFila(),val_peek(2).getColumna());\n }}\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);//casi seguro que si hay que crearla aca*\n contadorVarAux++;//*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(2).getFila()+\" columna \"+val_peek(2).getColumna());}\n break;\n case 36:\n//#line 215 \"GramaticaGrupo8.y\"\n { /* Estoy definiendo una variable*/\n if (((Symbol)(val_peek(3).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(3).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(true);\n s.setTipoVar(val_peek(5).sval);\n /* faltaria mutabilidad de lo apuntado*/\n }\n if (!((Symbol)(val_peek(0).obj)).isUsada()){\n yyerror(\"La variable no esta definida, &ID \",val_peek(6).getFila(),val_peek(6).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(0).obj));\n Symbol sy = ((Symbol)(val_peek(3).obj));\n if (s.isEsPuntero())\n yyerror(\"No se permiten punteros multiples \",val_peek(6).getFila(),val_peek(6).getColumna());\n }\n Terceto t = new T_Asignacion(contadorTerceto,\"&\",val_peek(3).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(6).getFila(),val_peek(6).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(6);\n yyval.obj = t;\n estructuras.add(\"Asignacion de puntero \"+\" fila \"+val_peek(6).getFila()+\" columna \"+val_peek(6).getColumna());}\n break;\n case 37:\n//#line 246 \"GramaticaGrupo8.y\"\n {/*Estoy definiendo una variable*/\n if (((Symbol)(val_peek(2).obj)).isUsada()){\n yyerror(\"La variable ya esta definida \",val_peek(4).getFila(),val_peek(4).getColumna());\n }else{\n Symbol s = ((Symbol)(val_peek(2).obj));\n s.setUsada(true);\n s.setEsMutable(false);\n s.setEspuntero(false);\n s.setTipoVar(val_peek(3).sval);\n /* faltaria mutabilidad de lo apuntado }*/\n Terceto t = new T_Asignacion(contadorTerceto,\":=\",val_peek(2).obj,val_peek(0).obj,st);\n t.setVariableAux(contadorVarAux);\n contadorVarAux++;\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(4).getFila(),val_peek(4).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(4);\n yyval.obj = t;\n }\n estructuras.add(\"Asignacion \"+\" fila \"+val_peek(4).getFila()+\" columna \"+val_peek(4).getColumna());}\n break;\n case 38:\n//#line 269 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion y palabra reservada 'let'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 39:\n//#line 270 \"GramaticaGrupo8.y\"\n {yyerror(\"Falta elemento de asignacion \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 40:\n//#line 271 \"GramaticaGrupo8.y\"\n {yyerror(\"no se encontro ':=' \",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 41:\n//#line 274 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Expresion print \"+\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());\n Terceto t = new T_Print(contadorTerceto,\"PRINT\",val_peek(1).obj,\"\",st);\n // t.setVariableAux(contadorVarAux); //un print no tiene resultado por ende no tiene tipo*/\n //contadorVarAux++; // creo que para los print no es necesario porque los aux son para el resultado*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(3).getFila(),val_peek(3).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(3);\n yyval.obj = t;\n }\n break;\n case 42:\n//#line 287 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Error en la construccion del print\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 43:\n//#line 290 \"GramaticaGrupo8.y\"\n {}\n break;\n case 44:\n//#line 291 \"GramaticaGrupo8.y\"\n {}\n break;\n case 45:\n//#line 295 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF Else\" +\" fila \"+val_peek(5).getFila()+\" columna \"+val_peek(5).getColumna());\n\n /*Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);*/\n }\n break;\n case 46:\n//#line 296 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia IF \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 47:\n//#line 297 \"GramaticaGrupo8.y\"\n {yyerror(\" falta la palabra reservada IF\",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 48:\n//#line 298 \"GramaticaGrupo8.y\"\n {yyerror(\" Error en la construccion de la sentencia IF \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 49:\n//#line 299 \"GramaticaGrupo8.y\"\n {yyerror(\" Falta la palabra reservada ELSE \",val_peek(3).getFila(),val_peek(3).getColumna());}\n break;\n case 50:\n//#line 302 \"GramaticaGrupo8.y\"\n {estructuras.add(\"Sentencia Loop \" +\" fila \"+val_peek(3).getFila()+\" columna \"+val_peek(3).getColumna());}\n break;\n case 51:\n//#line 303 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea Falta palabra reservada UNTIL\",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 52:\n//#line 306 \"GramaticaGrupo8.y\"\n {}\n break;\n case 53:\n//#line 307 \"GramaticaGrupo8.y\"\n {}\n break;\n case 54:\n//#line 308 \"GramaticaGrupo8.y\"\n {yyerror(\"LInea Omision de la palabra reservada '{' \",val_peek(2).getFila(),val_peek(2).getColumna());}\n break;\n case 55:\n//#line 311 \"GramaticaGrupo8.y\"\n {/*#### unica forma de marcar donde comienza el loop y ver donde salto (no diferenciamos bloque de loop)*/\n p.push(contadorTerceto);\n intLoop = contadorTerceto;\n Terceto t = new T_Fin(contadorTerceto,\"FIN_DE_SALTO\",\"trampita\",\"trampita\",st);\n\n listaTercetos.add(t);\n contadorTerceto ++;\n }\n break;\n case 56:\n//#line 316 \"GramaticaGrupo8.y\"\n {/*#### aca hacemos el salto incondicional, debimos inventar este no terminal porque no diferenciamos bloque else de bloque if*/\n /*aca ya hicimos el pop cuando termino el cuerpo del if*/\n Terceto t = new T_BI(contadorTerceto,\"BI\",\"trampita\",\"trampita\",st);\n contadorTerceto ++;\n listaTercetos.add(t);\n Integer i = p.pop();\n if (listaTercetos.get(i).getOperador() == \"BF\")\n listaTercetos.get(i).setOperando2(contadorTerceto);\n else\n listaTercetos.get(i).setOperando1(contadorTerceto);\n p.push(contadorTerceto-1);\n /*podriamos hacer un terceto fin aca que sea a donde apunte el salto, este terceto no haria nada solo funcionaria de label del salto*/\n System.out.println(t.toString());\n yyval=val_peek(0);\n yyval.obj = t;\n }\n break;\n case 57:\n//#line 334 \"GramaticaGrupo8.y\"\n { /*#### aca hacemos lo del salto para no repetirlo en todas las condiciones*/\n p.push(contadorTerceto);\n Terceto t = new T_BF(contadorTerceto,\"BF\",val_peek(1).obj,\"trampita\",st);/*##use trampita por las dudas, ya por deporte, no parece que sea necesario*/\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n\n }\n break;\n case 58:\n//#line 345 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\n }\n break;\n case 59:\n//#line 358 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 60:\n//#line 370 \"GramaticaGrupo8.y\"\n { Terceto t = new T_Comparador(contadorTerceto,\"=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 61:\n//#line 381 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"!=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 62:\n//#line 393 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\">=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 63:\n//#line 405 \"GramaticaGrupo8.y\"\n {\n Terceto t = new T_Comparador(contadorTerceto,\"<=\",val_peek(2).obj,val_peek(0).obj,st);\n /* t.setVariableAux(contadorVarAux);//revisar, creo que aca no va*/\n /* contadorVarAux++;//osea una comparacion SI TIENE RESULTADO, pero no necesito el tipo del resultado?, nose*/\n for(int i=0; i< t.errores.size();i++){\n yyerror(t.errores.elementAt(i),val_peek(2).getFila(),val_peek(2).getColumna());\n ;}\n contadorTerceto ++;\n listaTercetos.add(t);\n System.out.println(t.toString());\n yyval=val_peek(2);\n yyval.obj = t;\t\t\t\t\t\t\t\t\t\t}\n break;\n case 64:\n//#line 417 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 65:\n//#line 418 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<'\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 66:\n//#line 419 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '>='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n case 67:\n//#line 420 \"GramaticaGrupo8.y\"\n {yyerror(\"Linea se esperaba una expresion y se encontro '<='\",val_peek(1).getFila(),val_peek(1).getColumna());}\n break;\n//#line 1102 \"Parser.java\"\n//########## END OF USER-SUPPLIED ACTIONS ##########\n }//switch\n //#### Now let's reduce... ####\n if (yydebug) debug(\"reduce\");\n state_drop(yym); //we just reduced yylen states\n yystate = state_peek(0); //get new state\n val_drop(yym); //corresponding value drop\n yym = yylhs[yyn]; //select next TERMINAL(on lhs)\n if (yystate == 0 && yym == 0)//done? 'rest' state and at first TERMINAL\n {\n if (yydebug) debug(\"After reduction, shifting from state 0 to state \"+YYFINAL+\"\");\n yystate = YYFINAL; //explicitly say we're done\n state_push(YYFINAL); //and save it\n val_push(yyval); //also save the semantic value of parsing\n if (yychar < 0) //we want another character?\n {\n yychar = yylex(); //get next character\n if (yychar<0) yychar=0; //clean, if necessary\n if (yydebug)\n yylexdebug(yystate,yychar);\n }\n if (yychar == 0) //Good exit (if lex returns 0 ;-)\n break; //quit the loop--all DONE\n }//if yystate\n else //else not done yet\n { //get next state and push, for next yydefred[]\n yyn = yygindex[yym]; //find out where to go\n if ((yyn != 0) && (yyn += yystate) >= 0 &&\n yyn <= YYTABLESIZE && yycheck[yyn] == yystate)\n yystate = yytable[yyn]; //get new state\n else\n yystate = yydgoto[yym]; //else go to new defred\n if (yydebug) debug(\"after reduction, shifting from state \"+state_peek(0)+\" to state \"+yystate+\"\");\n state_push(yystate); //going again, so push state & val...\n val_push(yyval); //for next action\n }\n }//main loop\n return 0;//yyaccept!!\n }",
"public Parser() {}",
"protected LR1_Grammar(Grammar grammar) {\n\t\tsuper(grammar);\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}",
"protected Evaluable parseFactor() throws ParsingException {\n if (_token == null) {\n throw makeException(\"Expecting something more at end of expression\");\n }\n\n Evaluable eval = null;\n\n if (_token.type == TokenType.String) {\n eval = new LiteralExpr(_token.text);\n next(false);\n } else if (_token.type == TokenType.Regex) {\n RegexToken t = (RegexToken) _token;\n\n try {\n Pattern pattern = Pattern.compile(_token.text, t.caseInsensitive ? Pattern.CASE_INSENSITIVE : 0);\n eval = new LiteralExpr(pattern);\n next(false);\n } catch (Exception e) {\n throw makeException(\"Bad regular expression (\" + e.getMessage() + \")\");\n }\n } else if (_token.type == TokenType.Number) {\n eval = new LiteralExpr(((NumberToken)_token).value);\n next(false);\n } else if (_token.type == TokenType.Operator && _token.text.equals(\"-\")) { // unary minus?\n next(true);\n\n if (_token != null && _token.type == TokenType.Number) {\n Number n = ((NumberToken)_token).value;\n\n eval = new LiteralExpr(n instanceof Long ? -n.longValue() : -n.doubleValue());\n\n next(false);\n } else {\n throw makeException(\"Bad negative number\");\n }\n } else if (_token.type == TokenType.Identifier) {\n String text = _token.text;\n next(false);\n\n if (_token == null || _token.type != TokenType.Delimiter || !_token.text.equals(\"(\")) {\n eval = \"null\".equals(text) ? new LiteralExpr(null) : new VariableExpr(text);\n } else if( \"PI\".equals(text) ) {\n eval = new LiteralExpr(Math.PI);\n next(false);\n } else {\n Function f = ControlFunctionRegistry.getFunction(text);\n Control c = ControlFunctionRegistry.getControl(text);\n if (f == null && c == null) {\n throw makeException(\"Unknown function or control named \" + text);\n }\n\n next(true); // swallow (\n\n List<Evaluable> args = parseExpressionList(\")\");\n\n if (c != null) {\n Evaluable[] argsA = makeArray(args);\n String errorMessage = c.checkArguments(argsA);\n if (errorMessage != null) {\n throw makeException(errorMessage);\n }\n eval = new ControlCallExpr(argsA, c);\n } else {\n eval = new FunctionCallExpr(makeArray(args), f);\n }\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true);\n\n eval = parseExpression();\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\")\")) {\n next(false);\n } else {\n throw makeException(\"Missing )\");\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) { // [ ... ] array\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n\n eval = new FunctionCallExpr(makeArray(args), new ArgsToArray());\n } else {\n throw makeException(\"Missing number, string, identifier, regex, or parenthesized expression\");\n }\n\n while (_token != null) {\n if (_token.type == TokenType.Operator && _token.text.equals(\".\")) {\n next(false); // swallow .\n\n if (_token == null || _token.type != TokenType.Identifier) {\n throw makeException(\"Missing function name\");\n }\n\n String identifier = _token.text;\n next(false);\n\n if (_token != null && _token.type == TokenType.Delimiter && _token.text.equals(\"(\")) {\n next(true); // swallow (\n\n Function f = ControlFunctionRegistry.getFunction(identifier);\n if (f == null) {\n throw makeException(\"Unknown function \" + identifier);\n }\n\n List<Evaluable> args = parseExpressionList(\")\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), f);\n } else {\n eval = new FieldAccessorExpr(eval, identifier);\n }\n } else if (_token.type == TokenType.Delimiter && _token.text.equals(\"[\")) {\n next(true); // swallow [\n\n List<Evaluable> args = parseExpressionList(\"]\");\n args.add(0, eval);\n\n eval = new FunctionCallExpr(makeArray(args), ControlFunctionRegistry.getFunction(\"get\"));\n } else {\n break;\n }\n }\n\n return eval;\n }",
"private Grammar createGrammarFromXML( String resource, org.opencypher.grammar.Grammar.ParserOption... options )\n {\n String grammarString = null;\n try\n {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n org.opencypher.grammar.Grammar oCGrammar = org.opencypher.grammar.Grammar.parseXML( Paths.get( resourceURL( resource ) ), options );\n Antlr4.write( oCGrammar, out );\n grammarString = out.toString( UTF_8.name() );\n }\n catch ( Throwable t )\n {\n fail( \"Unexpected error while writing antlr grammar: \" + t.getMessage() );\n }\n return parseGrammarFromString( grammarString );\n }",
"public void parse() throws Exception {\r\n\t\tToken token;\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\ttry {\r\n\t\t\t// Loop over each token until the end of file.\r\n\t\t\twhile (!((token = nextToken()) instanceof EofToken)) {\r\n\t\t\t\tTokenType tokenType = token.getType();\r\n\t\t\t\tif (tokenType != ERROR) {\r\n\t\t\t\t\t// Format each token.\r\n\t\t\t\t\tsendMessage(new Message(TOKEN, new Object[] {\r\n\t\t\t\t\t\t\ttoken.getLineNumber(), token.getPosition(),\r\n\t\t\t\t\t\t\ttokenType, token.getText(), token.getValue() }));\r\n\t\t\t\t} else {\r\n\t\t\t\t\terrorHandler.flag(token,\r\n\t\t\t\t\t\t\t(OracleErrorCode) token.getValue(), this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Send the parser summary message.\r\n\t\t\tfloat elapsedTime = (System.currentTimeMillis() - startTime) / 1000f;\r\n\t\t\tsendMessage(new Message(PARSER_SUMMARY, new Number[] {\r\n\t\t\t\t\ttoken.getLineNumber(), getErrorCount(), elapsedTime }));\r\n\t\t} catch (java.io.IOException ex) {\r\n\t\t\terrorHandler.abortTranslation(IO_ERROR, this);\r\n\t\t}\r\n\t}",
"private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}",
"public Node(){\r\n primarySequence = null;\r\n dotBracketString = null;\r\n validity = false;\r\n prev = null;\r\n next = null;\r\n }",
"void Parse(Source source);",
"public String getGrammar(){\r\n return grammar;\r\n }",
"protected ASTParser createASTParser() {\n ASTParser parser = ASTParser.newParser(this.testLevel);\n return parser;\n }",
"public Token nextToken() throws TokenStreamException\r\n {\r\n Token token = null;\r\n int type;\r\n\r\n int returnCount = 0;\r\n /*\r\n * First skip over whitespace/comments\r\n */\r\n do {\r\n token = getNextToken();\r\n type = token.getType();\r\n\r\n if (type == MExprANTLRParserTokenTypes.WHITESPACE) {\r\n if (\"\\n\".equals(token.getText()))\r\n returnCount++;\r\n }\r\n \r\n \r\n } while ((!tokenIndexStore_ && type == MExprANTLRParserTokenTypes.COMMENT)\r\n || type == MExprANTLRParserTokenTypes.WHITESPACE \r\n || fTypesetParse && whiteSpaceTypeset(token));\r\n\r\n /*\r\n * Now check for semi as the last token.\r\n */\r\n if (lastExprToken != null\r\n && lastExprToken.getType() == MExprANTLRParserTokenTypes.SEMI)\r\n token = fixSEMI(token, returnCount > 0 && nestingLevel == 0);\r\n\r\n boolean incrementNestingLevel = false;\r\n int lastNestingLevel = nestingLevel;\r\n /*\r\n * Now fix up individual tokens.\r\n */\r\n switch (token.getType()) {\r\n \tcase MExprANTLRParserTokenTypes.LONGNAME:\r\n \t\ttoken = fixLongName( token);\r\n \t\tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.MINUS:\r\n if (!tokenCanEnd(lastExprToken) || tokenIsPrefix(lastExprToken))\r\n token.setType(MExprANTLRParserTokenTypes.UNARYMINUS);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.PLUS:\r\n if (!tokenCanEnd(lastExprToken) || tokenIsPrefix(lastExprToken))\r\n token.setType(MExprANTLRParserTokenTypes.UNARYPLUS);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.AMP:\r\n token = fixPostfix(\"AMPXX\", MExprANTLRParserTokenTypes.AMPINFIX,\r\n token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.DERIVATIVE:\r\n token = fixPostfix(\"DERIVATIVEXX\", MExprANTLRParserTokenTypes.DERIVATIVEINFIX,\r\n token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.SET:\r\n token = fixSET(token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.REPEATED:\r\n token = fixPostfix(\"REPEATEDXX\", MExprANTLRParserTokenTypes.REPEATEDINFIX,\r\n token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.REPEATEDNULL:\r\n token = fixPostfix(\"REPEATEDNULLXX\", MExprANTLRParserTokenTypes.REPEATEDNULLINFIX,\r\n token);\r\n break;\r\n\r\n\t/*\r\n\t * Convert EXCLAM into prefix NOT or postfix FACTORIAL.\r\n\t * \r\n\t * Turns into NOT if lastToken is an infix or a prefix.\r\n\t * If lastToken can end or is not a prefix becomes NOT\r\n\t * a + !b, + ! a, \r\n\t * \r\n * Also if last token can end and we have returnCount/lastNestingLevel\r\n * set then we will be inserting a PACKAGE token and this will become \r\n * NOT, so the real test is (a + b) || !a || !c which equals b || !a || !c\r\n */\r\n case MExprANTLRParserTokenTypes.EXCLAM:\r\n if ((returnCount > 0 && lastNestingLevel <= 0) || !tokenCanEnd(lastExprToken) || tokenIsPrefix( lastExprToken)) {\r\n token.setType(MExprANTLRParserTokenTypes.NOT);\r\n }\r\n else {\r\n \ttoken = fixPostfix(\"EXCLAM\", MExprANTLRParserTokenTypes.NOTINFIX,\r\n token);\r\n }\r\n break;\r\n \r\n /*\r\n * See EXCLAM\r\n */\r\n case MExprANTLRParserTokenTypes.EXCLAM2:\r\n if ((returnCount > 0 && lastNestingLevel <= 0) || !tokenCanEnd(lastExprToken) || tokenIsPrefix(lastExprToken)) {\r\n token.setType(MExprANTLRParserTokenTypes.NOTNOT);\r\n }\r\n else {\r\n \ttoken = fixPostfix(\"EXCLAM2\", MExprANTLRParserTokenTypes.NOTNOTINFIX,\r\n token);\r\n }\r\n break;\r\n \r\n\r\n case MExprANTLRParserTokenTypes.PLUSPLUS:\r\n if (tokenCanEnd(lastExprToken) && !tokenIsPrefix(lastExprToken))\r\n token = fixPostfix(\"PLUSPLUSXX\", MExprANTLRParserTokenTypes.PLUSPLUSINFIX,\r\n token);\r\n break;\r\n \r\n case MExprANTLRParserTokenTypes.MINUSMINUS:\r\n if (tokenCanEnd(lastExprToken) && !tokenIsPrefix(lastExprToken))\r\n token = fixPostfix(\"MINUSMINUSXX\", MExprANTLRParserTokenTypes.MINUSMINUSINFIX,\r\n token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.COMMA:\r\n token = fixThisComma(token);\r\n break;\r\n\r\n\r\n case MExprANTLRParserTokenTypes.LPAREN:\r\n case MExprANTLRParserTokenTypes.LBRACE:\r\n case MExprANTLRParserTokenTypes.LBRACKET:\r\n \tincrementNestingLevel = true;\r\n break;\r\n\r\n \r\n case MExprANTLRParserTokenTypes.RPAREN:\r\n nestingLevel--;\r\n \tbreak;\r\n\r\n case MExprANTLRParserTokenTypes.RBRACE:\r\n case MExprANTLRParserTokenTypes.RBRACKET:\r\n \ttoken = fixLastComma( token);\r\n \tif ( token.getType() != MExprANTLRParserTokenTypes.NULLID)\r\n \t\tnestingLevel--;\r\n \t\tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.ID:\r\n token = fixID( token);\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK1:\r\n case MExprANTLRParserTokenTypes.BLANK2:\r\n case MExprANTLRParserTokenTypes.BLANK3:\r\n token = fixBLANK( token);\r\n \tbreak;\r\n\r\n case MExprANTLRParserTokenTypes.EQUALEXCLAM:\r\n \ttoken = fixEQUALEXCLAM( token);\r\n \tbreak;\r\n\r\n case MExprANTLRParserTokenTypes.TYPESETOPEN:\r\n token = fixTypesetOpen(token);\r\n break;\r\n\r\n case MExprANTLRParserTokenTypes.TYPESETSPACE:\r\n return nextToken();\r\n\r\n }\r\n\r\n /*\r\n * The test for Comment is here because tokenCanStart does not \r\n * return True for Comment (this would mess up all sorts of \r\n * other things).\r\n * \r\n * If this changes see EXCLAM\r\n */\r\n if (returnCount > 0 && lastNestingLevel <= 0 && tokenCanEnd(lastExprToken)\r\n //&& (tokenCanStart(token) || \r\n //\t\ttoken.getType() == MExprANTLRParserTokenTypes.COMMENT)\r\n ) {\r\n pushToken(token);\r\n int lim = getLimit( lastExprToken, token);\r\n token = makeToken(MExprANTLRParserTokenTypes.PACKAGE, \"Package\", lastExprToken);\r\n setLimit( token, lim);\r\n nestingLevel = 0;\r\n }\r\n else if ( incrementNestingLevel) {\r\n \tnestingLevel++;\r\n }\r\n \r\n if ( token.getType() != MExprANTLRParserTokenTypes.COMMENT) {\r\n \tlastExprToken = token;\r\n }\r\n \r\n//\t\t// LOCATION: added this\r\n // this must happen here instead of the ExprLexer because this TokenStream\r\n // changes the token count;\r\n if ( tokenIndexStore_)\r\n \t((MExprToken)token).tokenIndex_ = currTokenIndex_++;\r\n else\r\n \t((MExprToken)token).tokenIndex_ = -1;\r\n return token;\r\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}",
"public IParser getParserSuccessfull ( ){ return mParserSuccessfull; }",
"public synchronized Node parse(String url) throws IOException,SAXException\n {\n if(log.isDebugEnabled())\n log.debug(\"parse: \"+url);\n return parse(new InputSource(url));\n }",
"public Vector collectParseErrors() {\n \n \t\tNode n = null;\n \t\tDatum d = null;\n \t\tVector parseErrors = new Vector();\n \t\tString dependenciesErrors = null;\n \t\tString actionErrors = null;\n \t\tString answerChoicesErrors = null;\n \t\tString readbackErrors = null;\n \t\tVector nodeParseErrors = null;\n \t\tVector nodeNamingErrors = null;\n \t\tboolean hasErrors = false;\n \t\t\n \t\tparser.resetErrorCount();\n \n \t\tfor (int i=0;i<size();++i) {\n \t\t\tn = nodes.getNode(i);\n \t\t\tif (n == null)\n \t\t\t\tcontinue;\n \n \t\t\thasErrors = false;\n \t\t\tdependenciesErrors = null;\n \t\t\tactionErrors = null;\n \t\t\tanswerChoicesErrors = null;\n \t\t\treadbackErrors = null;\n \t\t\tnodeParseErrors = null;\n \t\t\tnodeNamingErrors = null;\n \n \t\t\tparser.booleanVal(evidence, n.getDependencies());\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tdependenciesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tint actionType = n.getQuestionOrEvalType();\n \t\t\tString s = n.getQuestionOrEval();\n \n \t\t\t/* Check questionOrEval for syntax errors */\n \t\t\tif (s != null) {\n \t\t\t\tif (actionType == Node.QUESTION) {\n \t\t\t\t\tparser.parseJSP(evidence, s);\n \t\t\t\t}\n \t\t\t\telse if (actionType == Node.EVAL) {\n \t\t\t\t\tparser.stringVal(evidence, s);\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t/* Check min & max range delimiters for syntax errors */\n \t\t\ts = n.getMinStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\ts = n.getMaxStr();\n \t\t\tif (s != null) {\n \t\t\t\tparser.stringVal(evidence, s);\n \t\t\t}\n \t\t\t\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tactionErrors = parser.getErrors();\n \t\t\t}\n \t\t\t\n \t\t\tVector v = n.getAnswerChoices();\n \t\t\tif (v != null) {\n \t\t\t\tfor (int j=0;j<v.size();++j) {\n \t\t\t\t\tAnswerChoice ac = (AnswerChoice) v.elementAt(j);\n \t\t\t\t\tif (ac != null)\n \t\t\t\t\t\tac.parse(parser, evidence);\t// any errors will be associated with the parser, not the node (although this is misleading)\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tanswerChoicesErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (n.hasParseErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeParseErrors = n.getParseErrors();\n \t\t\t}\n \t\t\tif (n.hasNamingErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\tnodeNamingErrors = n.getNamingErrors();\n \t\t\t}\n \t\t\t\n \t\t\tif (n.getReadback() != null) {\n \t\t\t\tparser.parseJSP(evidence,n.getReadback());\n \t\t\t}\n \t\t\tif (parser.hasErrors()) {\n \t\t\t\thasErrors = true;\n \t\t\t\treadbackErrors = parser.getErrors();\n \t\t\t}\n \n \t\t\tif (hasErrors) {\n \t\t\t\tparseErrors.addElement(new ParseError(n, dependenciesErrors, actionErrors, answerChoicesErrors, readbackErrors, nodeParseErrors, nodeNamingErrors));\n \t\t\t}\n \t\t}\n \t\treturn parseErrors;\n \t}",
"private ReoFile<T> parse(CharStream c) throws IOException {\n\t\tReoLexer lexer = new ReoLexer(c); \n\t\tCommonTokenStream tokens = new CommonTokenStream(lexer);\n\t\t\n\t\tReoParser parser = new ReoParser(tokens);\n\t\tMyErrorListener errListener = new MyErrorListener();\n\t\tparser.removeErrorListeners();\n\t\tparser.addErrorListener(errListener);\n\t\t\n\t\tParseTree tree = parser.file();\n\t\tif (errListener.hasError)\n\t\t\treturn null;\n\t\t\n\t\tParseTreeWalker walker = new ParseTreeWalker();\n\t\twalker.walk(listener, tree);\n\t\treturn listener.getMain();\n\t}",
"public Parser() throws IOException {\n\t\tlookahead = System.in.read();\n\t\terrorNum = 0;\n\t\tinput = \"\";\n\t\toutput = \"\";\n\t\terrorPos = \"\";\n\t\terrorList = new ArrayList<String>();\n\t\twrongState = false;\n\t}",
"abstract protected Parser createSACParser();",
"public String parsePrefixToPostfix(String exp) throws SyntaxError {\n \tif (exp.length() == 0) {\n \t\tthrow new SyntaxError(\"No expression has been entered.\");\n \t}\n //parser accepts user input into exp\n \tScanner parser = new Scanner(exp);\n int element;\n String operator;\n String entity;\n String postfixExpression = \"\"; \n String firstOperand, secondOperand;\n int result = 0;\n \n //tokenize prefix string and set up 2 stacks\n Stack<String> operandStack = new Stack<String>();\n Stack<String> reverseOperatorStack = new Stack<String>();\n //while statement to push onto the reversal stack if there are more tokens\n while (parser.hasNext()) {\n entity = parser.next();\n // unless there is a space\n if (!entity.equals(\" \"))\n reverseOperatorStack.push(entity);\n }\n try { \n \t// while statement to pop to reversal stack if it is not empty\n \twhile (!reverseOperatorStack.isEmpty()) {\n //peek to retrieve the token at the top of the stack\n \t\tentity = reverseOperatorStack.peek();\n \t\t//pop to take the token off the stack\n\t reverseOperatorStack.pop();\n\t \n\t // if it is an operand\n\t if (Character.isDigit(entity.charAt(0))) {\n\t \t//push token onto the operand stack\n\t \toperandStack.push(entity);\n\t }\n\t // if it is an operator\n\t else if (entity.equals(\"/\") || entity.equals(\"*\") \n\t \t\t|| entity.equals(\"+\") || entity.equals(\"-\")) {\n\t \t//retrieve, then pop first operand off the stack\n\t \tfirstOperand = operandStack.peek();\n\t operandStack.pop();\n\t //retrieve, then pop second operand off the stack\n\t secondOperand = operandStack.peek();\n\t operandStack.pop();\n\t // formats miniExpression String with the 2 operands followed by the operator \n\t String miniExpression = firstOperand + \" \" + secondOperand + \" \" + entity;\n\t //push the string onto the operand stack\n\t operandStack.push(miniExpression);\n\t }\n \t}\n \t //throws error if there is an incorrect entry improperly formatted \t\n } catch (Exception e) {\n throw new SyntaxError(\"You have entered an improper expression. Check your input.\");\n }\n //retrieve, then pop the postfix expression off the stack\n postfixExpression = operandStack.peek();\n operandStack.pop();\n //return postfix - holding the converted expression\n return postfixExpression; \n }",
"public interface Parser<T> {\n TripleExpression<T> parse(String expression) throws Exception;\n}",
"public void parse() {\n }"
] | [
"0.6446141",
"0.638159",
"0.63476425",
"0.6206161",
"0.61893183",
"0.6044958",
"0.58850324",
"0.5828163",
"0.5813582",
"0.5715515",
"0.57041067",
"0.5687943",
"0.56146765",
"0.5614366",
"0.5587606",
"0.55817217",
"0.55754864",
"0.55674887",
"0.55670464",
"0.55447865",
"0.551622",
"0.5501982",
"0.54998565",
"0.54913133",
"0.5474731",
"0.54431516",
"0.5422752",
"0.54099125",
"0.53779876",
"0.5351555",
"0.5309358",
"0.5297131",
"0.52907",
"0.52693385",
"0.52591485",
"0.52409726",
"0.5226343",
"0.52020264",
"0.51888674",
"0.5170388",
"0.5168304",
"0.5148334",
"0.514072",
"0.51364183",
"0.5112613",
"0.5106414",
"0.51006913",
"0.5085712",
"0.5072434",
"0.5063365",
"0.50594074",
"0.50367534",
"0.5036072",
"0.50310737",
"0.50251806",
"0.5014495",
"0.50111604",
"0.5008466",
"0.5008179",
"0.4997171",
"0.49913293",
"0.49763712",
"0.49763712",
"0.49688223",
"0.49538153",
"0.49490833",
"0.49476358",
"0.49343976",
"0.49263424",
"0.49150503",
"0.49059913",
"0.4902534",
"0.49024156",
"0.4901106",
"0.48999313",
"0.4894539",
"0.48896188",
"0.4886981",
"0.4870008",
"0.48684084",
"0.4849504",
"0.48395658",
"0.4836686",
"0.4835332",
"0.48188856",
"0.48128384",
"0.4812709",
"0.47981942",
"0.4796281",
"0.47940058",
"0.47917563",
"0.47915697",
"0.47883418",
"0.4784162",
"0.47793114",
"0.47738525",
"0.47696447",
"0.4764145",
"0.4746563",
"0.47461832",
"0.47432965"
] | 0.0 | -1 |
Generated by from the grammar grammar = skip rules end | private boolean grammar() {
return skip() && rules() && MARK(END_OF_TEXT) && EOT();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected LR1_Grammar() {\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}",
"protected LR1_Grammar(Grammar grammar) {\n\t\tsuper(grammar);\n\t\tSet follow = new Set(1);\n\t\tfollow.append(END_OF_SOURCE);\n\t\tthis.start.follow = follow;\n\t}",
"static void skipStatement() {\r\n // Add first identifier to the intermediate stack\r\n if(!token.equals(\"IF\")) {\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n // Add assignment operator to the intermediate stack\r\n lex();\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n lex();\r\n while (!token.equals(\"END\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n //stack.add(index, lexeme);\r\n //index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n //index++;\r\n }\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n //index++;\r\n break;\r\n }\r\n\r\n if (token.equals(\"IF\")) {\r\n //index++;\r\n break;\r\n }\r\n }\r\n\r\n if (!token.equals(\"END\")) {\r\n translate();\r\n }\r\n }\r\n\r\n // IF STATEMENTS\r\n else {\r\n if(skipIF())\r\n translate();\r\n else\r\n skipStatement();\r\n }\r\n }",
"public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 b\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");rhs11.add(\"b\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"c\");rhs12.add(\"d\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 c\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"U\");rhs11.add(\"S\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"S\");rhs12.add(\"S\");\t\t\n//\t\tArrayList<String> rhs13 = new ArrayList<>();\n//\t\trhs13.add(\"S\");rhs13.add(\"*\");\n//\t\tArrayList<String> rhs14 = new ArrayList<>();\n//\t\trhs14.add(\"(\");rhs14.add(\"S\");rhs14.add(\")\");\n//\t\tArrayList<String> rhs15 = new ArrayList<>();\n//\t\trhs15.add(\"a\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\trhs1.add(rhs13);\n//\t\trhs1.add(rhs14);\n//\t\trhs1.add(rhs15);\n//\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n\t\t\n//\t\t//PA-3 d\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"rexpr\");rhs11.add(\"U\");rhs11.add(\"rterm\");\t\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"rterm\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\tRule r1 = new Rule(\"rexpr\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"rterm\");rhs21.add(\"r factor\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"r factor\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"rterm\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"r factor\");rhs31.add(\"*\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"rprimary\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"r factor\", rhs3);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs4 = new ArrayList<>();\n//\t\tArrayList<String> rhs41 = new ArrayList<>();\n//\t\trhs41.add(\"a\");\n//\t\tArrayList<String> rhs42 = new ArrayList<>();\n//\t\trhs42.add(\"b\");\n//\t\trhs4.add(rhs41);\n//\t\trhs4.add(rhs42);\n//\t\tRule r4 = new Rule(\"rprimary\", rhs4);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\trules.add(r4);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\t\n\t\t\t\n//\t\t//PA-3 e\t\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"0\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"T\");rhs12.add(\"1\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"1\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"A\");rhs22.add(\"0\");\t\t\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\t\tRule r2 = new Rule(\"T\", rhs2);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\n\t\t\n//\t\t//PA-3 f\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"B\");rhs11.add(\"C\");\t\n//\t\trhs1.add(rhs11);\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"B\");rhs21.add(\"b\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"e\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"B\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"A\");rhs31.add(\"C\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"a\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"C\", rhs3);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tSystem.out.println(g);\n//\t\tg.eliminateEpsilonRule();\n//\t\tSystem.out.println(g);\n//\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\t}",
"public Grammar()\n {\n this.rules = new ArrayList<Rule>();\n }",
"public void endParsing();",
"private StandardGrammars() {\n // do nothing\n }",
"@Override\n public void exitEveryRule(final ParserRuleContext ctx) {\n }",
"public void pruneRules_greedy() {\n LOGGER.info(\"STARTED Postpruning\");\n AttributeValue defClass = getDefaultRuleClass();\n int defError = getDefaultRuleError(defClass);\n boolean removeTail=false;\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"#Rule {0}\", rule.toString());\n }\n \n if (removeTail)\n {\n it.remove();\n }\n else if (rule.getAntecedentLength() == 0) {\n it.remove();\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n it.remove();\n }\n else\n {\n int supportingTransactions = rule.removeTransactionsCoveredByAntecedent(true);\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n if (defError<=newDefError)\n {\n //adding the current rule did not decrease the errors compared to a default rule\n it.remove();\n removeTail=true;\n }\n else{\n LOGGER.log(Level.FINE, \"{0} transactions, RULE {1} KEPT\", new Object[]{supportingTransactions, rule.getRID()});\n defClass = newDefClass;\n defError = newDefError;\n } \n }\n \n \n\n\n }\n LOGGER.fine(\"Creating new Extend rule within narrow rule procedure\");\n extendedRules.add(createNewDefaultRule(defClass));\n LOGGER.info(\"FINISHED Postpruning\");\n }",
"@Override\n\tpublic void skip() {\n\t}",
"static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }",
"NextDeclRule createNextDeclRule();",
"public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }",
"public interface LLkGrammarAnalyzer extends GrammarAnalyzer {\n\n\n public boolean deterministic(AlternativeBlock blk);\n\n public boolean deterministic(OneOrMoreBlock blk);\n\n public boolean deterministic(ZeroOrMoreBlock blk);\n\n public Lookahead FOLLOW(int k, RuleEndElement end);\n\n public Lookahead look(int k, ActionElement action);\n\n public Lookahead look(int k, AlternativeBlock blk);\n\n public Lookahead look(int k, BlockEndElement end);\n\n public Lookahead look(int k, CharLiteralElement atom);\n\n public Lookahead look(int k, CharRangeElement end);\n\n public Lookahead look(int k, GrammarAtom atom);\n\n public Lookahead look(int k, OneOrMoreBlock blk);\n\n public Lookahead look(int k, RuleBlock blk);\n\n public Lookahead look(int k, RuleEndElement end);\n\n public Lookahead look(int k, RuleRefElement rr);\n\n public Lookahead look(int k, StringLiteralElement atom);\n\n public Lookahead look(int k, SynPredBlock blk);\n\n public Lookahead look(int k, TokenRangeElement end);\n\n public Lookahead look(int k, TreeElement end);\n\n public Lookahead look(int k, WildcardElement wc);\n\n public Lookahead look(int k, ZeroOrMoreBlock blk);\n\n public Lookahead look(int k, String rule);\n\n public void setGrammar(Grammar g);\n\n public boolean subruleCanBeInverted(AlternativeBlock blk, boolean forLexer);\n}",
"@Override\n public void exitNext_state(FSMParser.Next_stateContext ctx) {\n if (ctx.condition() == null) {\n Var var = new Var(\"NO_CONDITIONS\", 1, false, false, false);\n this.conditions.get(0).put(var, Integer.parseInt(ctx.STATENUMBER().getText().substring(6, ctx.STATENUMBER().getText().length())));\n this.conditionsOrder.add(var);\n }\n }",
"@Override\n public void enterEveryRule(ParserRuleContext ctx) {\n\n }",
"public AscendingRules() {}",
"public void clearRules() {\n this.rules_ = emptyProtobufList();\n }",
"public Rule_in_State get_unprocessed_rule();",
"void gobble() {\n while( level > 0 &&\n !is(TK.LPAREN) &&\n !is(TK.ID) &&\n !is(TK.NUM) &&\n !is(TK.EOF) ) {\n scan();\n }\n }",
"public RuleBuilder endRule(double weight) {\n if( literals.size() > 0 ) {\n mlnText.rules.add(new MLNText.Rule(weight, literals));\n }\n return new RuleBuilder();\n }",
"public RuleParser() {\n this.fileName = \"\";\n }",
"public void deduceRules()\n{\n List<RuleInstance> allrules = loadRules();\n\n List<UpodRule> rules = new ArrayList<UpodRule>();\n for (UpodRule ur : for_program.getRules()) {\n if (ur.isExplicit()) {\n\t rules.add(ur);\n\t RuleInstance ri = new RuleInstance(ur,from_world.getUniverse());\n\t allrules.add(ri);\n }\n }\n\n Set<Condition> allconds = getConditions(allrules);\n\n tree_root = new TreeNode(allrules,null);\n\n expandTree(tree_root,allconds);\n\n generateRules(tree_root);\n}",
"protected void scanNoSkip() throws TableFunctionMalformedException {\r\n\t\t\t\r\n\t\tint kw;\r\n\t\t\r\n\t\tgetName();\r\n\t\t\r\n\t\tkw = lookup(value);\r\n\t\tif (kw == -1)\r\n\t\t\ttoken = 'x';\r\n\t\telse\r\n\t\t\ttoken = kwcode[kw];\r\n\t\t// Debug.println(\"\\n!!!Value = \" + value);\r\n\t}",
"@Override\r\npublic void initRules(){\r\n\t\r\n}",
"public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}",
"public boolean eof() {\n\treturn !(tokenizer.hasMoreElements());\n }",
"public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }",
"public node cnf() { rule: anything can sit immediately below ands\n //\n System.out.println( \" should not call \" );\n System.exit( 1 );\n return null;\n }",
"public boolean has_unprocessed_rules();",
"public void testDETERMINER3() throws Exception {\n\t\tObject retval = execLexer(\"DETERMINER\", 235, \"and\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"DETERMINER\", expecting, actual);\n\t}",
"private static List<GrammarRule> parseGrammar(Grammar grammar, String grammarRules)\n\t{\n\t\treturn AntlrHelpers.parseGrammar(grammar, grammarRules);\n\t}",
"public boolean next() {\n\t\tif (done())\n\t\t\treturn false;\n\t\tmany(whitespace);\n\t\tString c=program.charAt(pos)+\"\";\n\t\tif (digits.contains(c))\n\t\t\tnextNumber();\n\t\telse if (letters.contains(c))\n\t\t\tnextKwId();\n\t\telse if (operators.contains(c))\n\t\t\tnextOp();\n\t\telse if (c.equals(\"#\")){\n\t\t\t//this is a comment, move past the first hashtag\n\t\t\tpast('#');\n\t\t\t//move past the second hastag, ignoring everything in between\n\t\t\tpast('#');\n\t\t\treturn next();\n\t\t} else {\n\t\t\tSystem.err.println(\"illegal character at position \"+pos);\n\t\t\tpos++;\n\t\t\treturn next();\n\t\t}\n\t\treturn true;\n }",
"private void skipObject() {\r\n\t\tint depth = 0;\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\r\n\t\t\tswitch (type) {\r\n\t\t\tcase END:\r\n\t\t\t\tif (depth == 0) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tdepth--;\r\n\t\t\t\tbreak;\r\n\t\t\tcase BEGIN:\r\n\t\t\t\tdepth++;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void skipEmptyLines() throws IOException {\n for (;;) {\n if (nextChar != ';') {\n do {\n readNextChar();\n } while (isWhitespace(nextChar));\n if (nextChar != ';') return;\n }\n do {\n readNextChar();\n if (nextChar == -1) return;\n } while (nextChar != '\\n');\n }\n }",
"@Override\n\tpublic void deleteRuleAfterFirstMvt() {\n\t\t\n\t}",
"@Test\n void testGrammarBasics() {\n Production<NT, T> prod1 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod2 = new Production<>(NT.B, List.of(\n right(T.F)\n ));\n\n Production<NT, T> prod3 = prod1.withSource(NT.C).withRule(List.of(\n left(NT.B), right(T.F), left(NT.C), left(NT.A)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod1, prod2)));\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod3, prod2)));\n\n Production<NT, T> prod4 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod5 = new Production<>(NT.B, List.of(\n left(NT.A), right(T.E)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.A, List.of(prod4)));\n\n CFGrammar<NT, T, Production<NT, T>> g = new CFGrammar<>(NT.A, List.of(prod4, prod5));\n assertEquals(HashSet.of(NT.B, NT.A), g.getNonTerminalsUsed());\n assertEquals(HashSet.of(T.E), g.getTerminalsUsed());\n }",
"public Grammar() {\n }",
"private void writeGrammar() {\n grammar = new ArrayList<ArrayList<String>>();\n\n int programLine = 0;\n String inputLine = null;\n try {\n FileReader reader = new FileReader(grammarFile);\n BufferedReader bufferedReader = new BufferedReader(reader);\n\n while((inputLine = bufferedReader.readLine()) != null) {\n\n // removes all leading and trailing whitespaces and leading tabs\n String line = inputLine.trim().replaceFirst(\"\\\\t\", \"\");\n\n // processes a production rule on each nonempty program line\n if(!line.isEmpty() || !line.equals(\"\")) {\n String[] tokens = line.split(\"\\\\s+\");\n grammar.add(new ArrayList<String>(Arrays.asList(tokens)));\n }\n\n programLine++;\n }\n\n bufferedReader.close();\n\n } catch(FileNotFoundException e) {\n System.out.println(\n grammarFile + \" not found\"\n );\n } catch(IOException e) {\n System.out.println(\n \"Error reading file \" + grammarFile\n );\n }\n\n // check to see if grammar correctly read from file\n// for(int i = 0; i < grammar.size(); i++) {\n// printArrayList(grammar.get(i));\n// System.out.println();\n// }\n }",
"SkipStatement createSkipStatement();",
"public FlowRule() {\r\n }",
"public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}",
"@Override\r\n\tpublic void removeNodeRule(int step) {\n\t}",
"static boolean skipIF() {\n index++;\r\n lex();\r\n\r\n //Skip adding \"(\" to stack\r\n lex();\r\n\r\n while (!lexeme.equals(\")\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\") ||\r\n token.equals(\"GREATER_THAN\") || token.equals(\"LESS_THAN\") || token.equals(\"EQUALS\") || token.equals(\"LESS_OR_EQUAL\") ||\r\n token.equals(\"GRETER_OR_EQUAL\") || token.equals(\"NOT_EQUAL\")) {\r\n //stack.add(index, lexeme);\r\n //index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n //index++;\r\n }\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n //index++;\r\n break;\r\n }\r\n }\r\n\r\n //Skip the \")\"\r\n lex();\r\n\r\n return false;\r\n }",
"@Override\n\t\tpublic void skippedEntity(String name) throws SAXException {\n\t\t\t\n\t\t}",
"void skip();",
"public void pruneRules_cbaLike() {\n LOGGER.info(\"STARTED Postpruning\");\n //HashMap<ExtendRule,Integer> ruleErrors = new HashMap();\n //HashMap<ExtendRule,AttributeValue> ruleDefClass = new HashMap();\n ArrayList<ExtendRule> rulesToRemove = new ArrayList(); \n int totalErrorsWithoutDefault = 0; \n AttributeValue defClassForLowestTotalErrorsRule = getDefaultRuleClass();\n int lowestTotalErrors = getDefaultRuleError(defClassForLowestTotalErrorsRule);;\n ExtendRule lowestTotalErrorsRule = null;\n // DETERMINE TOTAL ERROR AND DEFAULT CLASS ASSOCIATED WITH EACH RULE \n // REMOVE RULES MATCHING ZERO TRANSACTIONS AND OF ZERO LENGTH\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n rule.setQualityInRuleList(rule.getRuleQuality());\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"Processing rule {0}\", rule.toString());\n }\n\n if (rule.getAntecedentLength() == 0) {\n LOGGER.fine(\"Rule of length 0, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n LOGGER.fine(\"Rule classifying 0 instances correctly, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed \n }\n else\n {\n rule.removeTransactionsCoveredByAntecedent(true); \n totalErrorsWithoutDefault = totalErrorsWithoutDefault + rule.getRuleQuality().getB();\n // since transactions matching the current rule have been removed, the default class and error can change\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n int totalErrorWithDefault = newDefError + totalErrorsWithoutDefault;\n if (totalErrorWithDefault < lowestTotalErrors)\n {\n lowestTotalErrors = totalErrorWithDefault;\n lowestTotalErrorsRule = rule;\n defClassForLowestTotalErrorsRule= newDefClass;\n } \n //ruleErrors.put(rule,totalErrorWithDefault );\n //ruleDefClass.put(rule, newDefClass); \n }\n \n }\n boolean removeTail;\n // now we know the errors associated with each rule not marked for removal, we can perform pruning\n if (lowestTotalErrorsRule == null)\n {\n // no rule improves error over a classifier composed of only default rule\n // remove all rules\n removeTail = true;\n }\n else \n {\n removeTail = false;\n }\n \n data.getDataTable().unhideAllTransactions();\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n ExtendRule rule = it.next();\n if (rulesToRemove.contains(rule) || removeTail)\n {\n it.remove();\n continue;\n }\n if (rule.equals(lowestTotalErrorsRule))\n {\n removeTail = true;\n }\n rule.updateQuality(); \n }\n \n \n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Creating new default rule within narrow rule procedure\");\n }\n \n \n extendedRules.add(createNewDefaultRule(defClassForLowestTotalErrorsRule));\n \n \n LOGGER.info(\"FINISHED Postpruning\");\n }",
"@Override\n public String visit(ContinueStmt n, Object arg) {\n return null;\n }",
"private void tokenEnd() {\n zzStartRead = tokenStartIndex;\n }",
"void rest() throws IOException {\n\t\twhile(true) {\n\t\t\tif (lookahead == '+') {\n\t\t\t\tif(wrongState == false) \n\t\t\t\t\terrorPos = errorPos+(char)' ';\n\t\t\t\telse \n\t\t\t\t\twrongState = false;\n\t\t\t\tmatch('+');\n\t\t\t\tterm();\n\t\t\t\tif(errorNum == 0) {\n\t\t\t\t\toutput = output + (char)'+';\n\t\t\t\t}\n\t\t\t} else if (lookahead == '-') {\n\t\t\t\tif(wrongState == false) \n\t\t\t\t\terrorPos = errorPos+(char)' ';\n\t\t\t\telse \n\t\t\t\t\twrongState = false;\n\t\t\t\tmatch('-');\n\t\t\t\tterm();\n\t\t\t\tif(errorNum == 0) {\n\t\t\t\t\toutput = output + (char)'-';\n\t\t\t\t}\n\t\t\t} else if(lookahead == 13){\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\terrorNum++;\n\t\t\t\tif(Character.isDigit((char)lookahead)) {\n errorList.add(\"Miss a operator!!\");\n errorPos = errorPos + (char)'^';\n wrongState = true;\n\t\t\t\t} else {\n\t\t\t\t\terrorList.add(\"Operator don't exist!!\");\n errorPos = errorPos + (char)'^';\n match(lookahead);\n\t\t\t\t}\n\t\t\t\tterm();\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private void extendedNext() {\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t\tcontinue;\n\t\t} // we arw now on first non wmpty space\n\t\tif (data.length <= currentIndex) {\n\t\t\ttoken = new Token(TokenType.EOF, null); // null reference\n\t\t\treturn;\n\t\t}\n\t\tstart = currentIndex;\n\t\t// System.out.print(data);\n\t\t// System.out.println(\" \"+data[start]);;\n\t\tswitch (data[currentIndex]) {\n\t\tcase '@':\n\t\t\tcurrentIndex++;\n\t\t\tcreateFunctName();\n\t\t\treturn;\n\t\tcase '\"':// string\n\t\t\tcreateString();// \"\" are left\n\t\t\treturn;\n\t\tcase '*':\n\t\tcase '+':\n\t\tcase '/':\n\t\tcase '^':\n\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\tbreak;\n\t\tcase '$':\n\t\t\tString value = \"\";\n\t\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\ttoken = new Token(TokenType.Name,\n\t\t\t\t\tString.valueOf(data[currentIndex++]));\n\t\t\treturn;\n\t\tcase '-':\n\t\t\tif (currentIndex + 1 >= data.length\n\t\t\t\t\t|| !Character.isDigit(data[currentIndex + 1])) {\n\t\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\t// if we get here,after - is definitely a number\n\t\t\tif (data[currentIndex] == '-'\n\t\t\t\t\t|| Character.isDigit(data[currentIndex])) {\n\t\t\t\t// if its decimal number ,it must starts with 0\n\t\t\t\tcreateNumber();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\t\tvalue = name();\n\t\t\t\ttoken = new Token(TokenType.Name, value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"No miningful tag starts with \" + data[currentIndex]);\n\t\t\t// createWord();\n\n\t\t}\n\t}",
"private void outputParseFunction(PrintWriter out, String startRuleName) {\n\t\t\n\t\tString tokenname = prefix + \"Token\";\n\t\t\n\t\tout.println(\" public \" + node(startRuleName) + \" parse() throws \" + prefix + \"ParserException, \" + prefix + \"TokenizerException {\");\n\t\tout.println(\" \" + tokenname + \" curToken;\");\n\t\tout.println();\n\t\tout.println(\" GrammarState curState;\");\n\t\tout.println();\n\t\tout.println(\" Stack<GrammarState> stateStack = new Stack<GrammarState>();\");\n\t\tout.println();\n\t\tout.println(\" \" + node(startRuleName) + \" parseTree = null;\");\n\t\tout.println(\" \" + prefix + \"ASTNode curNode = null;\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(new GrammarState(startRuleName, GrammarState.RULE));\");\n\t\tout.println();\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" while ( true ) {\");\n\t\tout.println();\n\t\tout.println(\" curState = stateStack.pop();\");\n\t\tout.println();\n\t\tout.println(\" if (curState == null) {\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode nextNode = curNode.getParent();\");\n\t\tout.println();\n\t\tout.println(\" if (curNode.isMultiChild() && curNode.numChildren() == 1) {\");\n\t\tout.println(\" \" + prefix + \"ASTNode parentNode = curNode.getParent();\");\n\t\tout.println(\" parentNode.removeChild(curNode);\");\n\t\tout.println();\n\t\tout.println(\" \" + prefix + \"ASTNode childNode = curNode.getChild(0);\");\n\t\tout.println(\" curNode.removeChild(childNode);\");\n\t\tout.println(\" parentNode.addChild(childNode);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curNode.numChildren() == 0) {\");\n\t\tout.println(\" curNode.getParent().removeChild(curNode);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" curNode = nextNode;\");\n\t\tout.println();\n\t\tout.println(\" }\"); \n\t\tout.println(\" else if (curState.type == GrammarState.TOKEN) {\");\n\t\tout.println();\n\t\tout.println(\" if (!curState.name.equals(curToken.name)) {\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\"), expected token (\\\" + curState.name + \\\")\\\"\t, curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (curToken.name.equals(\\\"eof\\\")) break;\");\n\t\tout.println();\n\t\tout.println(\" curNode.addChild(new \" + prefix + \"ASTToken(curToken.name, curToken.value));\");\n\t\tout.println();\t\t\n\t\tout.println(\" curToken = tokenizer.nextToken();\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.RULE) {\");\n\t\tout.println();\n\t\tout.println(\" GrammarRule newrule = table.get(curState.name).get(curToken.name);\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" if (newrule == null) {\");\n\t\tout.println(\" String expected = \\\"\\\";\");\n\t\tout.println(\" for (String t : table.get(curState.name).keySet()) if (t != null) expected += t + \\\", \\\";\");\n\t\tout.println(\" throw new \" + prefix + \"ParserException(\\\"Invalid token \\\\\\\"\\\" + curToken.value + \\\"\\\\\\\" (\\\" + curToken.name + \\\") for rule \\\\\\\"\\\" + curState.name.replaceAll(\\\"\\\\\\\\{.*\\\", \\\"\\\") + \\\"\\\\\\\", expected one of (\\\" + expected.substring(0, expected.length()-2) + \\\")\\\", curToken.line, curToken.column);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" if (!newrule.subrule) {\");\n\t\tout.println(\" if (parseTree == null) {\");\n\t\tout.println(\" curNode = parseTree = new \" + node(startRuleName) + \"(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" } else {\");\n\t\tout.println(\" \" + prefix + \"ASTNode newnode = makenode(newrule.name, null, newrule.multi_child);\");\n\t\tout.println(\" curNode.addChild(newnode);\");\n\t\tout.println(\" curNode = newnode;\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" stateStack.push(null);\");\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" for (int i = newrule.graph.length-1; i >= 0; i--) {\");\n\t\tout.println(\" stateStack.push(newrule.graph[i]);\");\n\t\tout.println(\" }\");\n\t\tout.println(\" }\");\n\t\tout.println(\" else if (curState.type == GrammarState.EPSILON) {\");\n\t\tout.println(\" continue; //do nothing\");\n\t\tout.println(\" }\");\n\t\tout.println();\t\t\t\t\n\t\tout.println(\" }\");\n\t\tout.println();\n\t\tout.println(\" return parseTree;\");\n\t\tout.println();\n\t\tout.println(\" }\");\n\t\t\n\t}",
"@Test\n\t\tpublic void noApplyHyp() {\n\t\t\tassertFailure(\" ;H; ;S; 1=1 |- {1}⊆S\");\n\t\t}",
"default boolean visitEnd() {\n\t\treturn true;\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}",
"@Override\n public void enterEveryRule(final ParserRuleContext ctx) {\n }",
"private void readGrammar(Hashtable<String, ? extends Number> lexRulesTable, \n\t\t\tHashtable<String, ? extends Number> intRulesTable) {\n\t\tFileUtil.appendReturn(\"Starting fedePar ... reading grammar\", Parameters.logFile);\n\t\tTreeSet<String> lexicon = new TreeSet<String>();\n\t\tTreeSet<String> categories = new TreeSet<String>();\n\t\tHashtable<String, Double> intCatFreqTable = new Hashtable<String, Double>();\n\t\tHashtable<String, Double> posCatFreqTable = new Hashtable<String, Double>();\n\t\tlexRulesSize = lexRulesTable.size();\n\t\tfor(Enumeration<String> e = lexRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = lexRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(posCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tlexicon.add(ruleSplit[1]);\n\t\t}\n\t\tfor(Enumeration<String> e = intRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = intRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(intCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tcategories.add(ruleSplit[1]);\n\t\t\tif (ruleSplit.length>2) {\n\t\t\t\tcategories.add(ruleSplit[2]);\n\t\t\t\tintBinaryRulesSize++;\n\t\t\t}\n\t\t\telse intUnaryRulesSize++;\n\t\t}\n\t\t//check overlapping between posTags and intTags\n\t\tHashSet<String> overlapping = new HashSet<String>(posCatFreqTable.keySet());\n\t\toverlapping.retainAll(intCatFreqTable.keySet());\n\t\tif (!overlapping.isEmpty()) {\n\t\t\tSystem.out.println(\"Overlapping between internal nodes and pos tags: \" + overlapping.toString());\n\t\t}\n\t\tlexCount = lexicon.size();\n\t\tcatCount = categories.size();\n\t\tlexArray = lexicon.toArray(new String[] {});\n\t\tcatArray = categories.toArray(new String[] {});\n\t\tlexIndex = new Hashtable<String, Integer>();\n\t\tcatIndex = new Hashtable<String, Integer>();\t\t\n\t\tfor(int i=0; i<lexArray.length; i++) lexIndex.put(lexArray[i], i);\n\t\tfor(int i=0; i<catArray.length; i++) catIndex.put(catArray[i], i);\n\t\treadRules(lexRulesTable, intRulesTable, posCatFreqTable, intCatFreqTable);\n\t}",
"protected DebugRuleElementMatch() {/* intentionally empty block */}",
"@Override\r\n public final boolean isUseless() {\r\n int i;\r\n Rule[] r;\r\n\r\n r = this.m_rules;\r\n for (i = (r.length - 1); i >= 0; i--) {\r\n if (!(r[i].isUseless()))\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"@Bean\n public RulesEngine getRulesEngine() {\n return new DefaultRulesEngine(new RulesEngineParameters().skipOnFirstAppliedRule(false));\n }",
"@Override\n\tpublic void skippedEntity(String name) throws SAXException {\n\t\t\n\t}",
"@Override\n\tpublic void skippedEntity(String name) throws SAXException {\n\t\t\n\t}",
"public void testDETERMINER4() throws Exception {\n\t\tObject retval = execLexer(\"DETERMINER\", 236, \"b\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"DETERMINER\", expecting, actual);\n\t}",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"#OPh7\");\n Token token0 = xPathLexer0.not();\n assertEquals(\"#\", token0.getTokenText());\n assertEquals(23, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"OPh7\", token1.getTokenText());\n }",
"private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}",
"E9Rule createE9Rule();",
"@Test(timeout = 4000)\n public void test120() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"#OPh7\");\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n \n Token token1 = xPathLexer0.not();\n assertEquals(\"O\", token1.getTokenText());\n assertEquals(23, token1.getTokenType());\n \n Token token2 = xPathLexer0.nextToken();\n assertEquals(\"Ph7\", token2.getTokenText());\n assertEquals(15, token2.getTokenType());\n }",
"final public IASTLiteralTextNode ppRestOfLine(boolean skip) throws ParseException {\r\n Token start = token, end = start;\r\n if (skip || !(start instanceof ASTToken))\r\n start = end = getNextToken();\r\n int startLine = start.beginLine;\r\n if (end.kind != EOF && end.beginLine == startLine) {\r\n while (true) {\r\n end = getNextToken();\r\n if (end.kind == EOF || end.beginLine != startLine)\r\n break;\r\n }\r\n }\r\n {if (true) return getLiteralTextNodeSpanningUpTo(start, end);}\r\n throw new Error(\"Missing return statement in function\");\r\n }",
"public EmptyRuleActionImpl() {}",
"public void testDETERMINER1() throws Exception {\n\t\tObject retval = execLexer(\"DETERMINER\", 233, \"a\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"DETERMINER\", expecting, actual);\n\t}",
"public void skip(){\n if (!this.hasNext()) return;\n \n this.checkNext();\n \n if (!this.allStatesIterator.hasNext()){\n this.allStatesIterator = new IntegerIterator(1);\n this.allStatesIterator.skip();\n \n if(!this.allSubsetsIterator.hasNext()){\n this.allSubsetsIterator = new SubsetIterator(this.numberOfStates);\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n this.currentTransitions = this.allTransitionsIterator.next();\n }\n else{\n this.currentFinalStatesIds = this.allSubsetsIterator.next();\n }\n }\n else{\n this.currentInitialStateId = this.allStatesIterator.next();\n }\n }",
"public interface ValidParserRules {\n String getName();\n String getPrefix();\n PropertyType getType();\n ValidParserRules getParent();\n}",
"public void setGrammar(String grammar){\r\n this.grammar = grammar;\r\n }",
"@Test\n public void testExploratoryString() throws IOException {\n String simplestProgram = \"x := 1;\" +\n \"y :={0,1,2,33};\" +\n \"if (x>y) then \" +\n \"{x:=1;} \" +\n \"else \" +\n \"{y:=1;}\";\n\n CharStream inputCharStream = new ANTLRInputStream(new StringReader(simplestProgram));\n TokenSource tokenSource = new GrammarLexer(inputCharStream);\n TokenStream inputTokenStream = new CommonTokenStream(tokenSource);\n GrammarParser parser = new GrammarParser(inputTokenStream);\n\n //parser.addErrorListener(new TestErrorListener());\n parser.setErrorHandler(new BailErrorStrategy());\n\n GrammarParser.ProgramContext context = parser.program();\n\n System.out.println(context.getText());\n\n logger.info(context.toString());\n }",
"@Override\r\n public Observable<Statement> parse(Reader input) {\n return null;\r\n }",
"@Override\n public final void bottomup() {\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:73:5:\n // ( | standaloneExpression | expressionRoot | incompleteAxiom |\n // incompleteExpression | axiom )\n int alt1 = 6;\n switch (input.LA(1)) {\n case EOF: {\n alt1 = 1;\n }\n break;\n case STANDALONE_EXPRESSION: {\n alt1 = 2;\n }\n break;\n case EXPRESSION: {\n alt1 = 3;\n }\n break;\n case INCOMPLETE_TYPE_ASSERTION:\n case INCOMPLETE_ROLE_ASSERTION:\n case INCOMPLETE_UNARY_AXIOM:\n case INCOMPLETE_SUB_CLASS_AXIOM:\n case INCOMPLETE_EQUIVALENT_TO_AXIOM:\n case INCOMPLETE_DISJOINT_WITH_AXIOM:\n case INCOMPLETE_SUB_PROPERTY_AXIOM:\n case INCOMPLETE_SAME_AS_AXIOM:\n case INCOMPLETE_DIFFERENT_FROM_AXIOM:\n case INCOMPLETE_DOMAIN:\n case INCOMPLETE_RANGE:\n case INCOMPLETE_INVERSE_OF: {\n alt1 = 4;\n }\n break;\n case INCOMPLETE_PROPERTY_CHAIN:\n case INCOMPLETE_DISJUNCTION:\n case INCOMPLETE_EXPRESSION: {\n alt1 = 5;\n }\n break;\n case INVERSE_OF:\n case DOMAIN:\n case RANGE:\n case SUB_CLASS_AXIOM:\n case EQUIVALENT_TO_AXIOM:\n case DISJOINT_WITH_AXIOM:\n case SUB_PROPERTY_AXIOM:\n case SAME_AS_AXIOM:\n case DIFFERENT_FROM_AXIOM:\n case UNARY_AXIOM:\n case NEGATED_ASSERTION:\n case TYPE_ASSERTION:\n case ROLE_ASSERTION: {\n alt1 = 6;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 1, 0, input);\n throw nvae;\n }\n switch (alt1) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:74:5:\n {}\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:74:7:\n // standaloneExpression\n {\n pushFollow(FOLLOW_standaloneExpression_in_bottomup87);\n standaloneExpression();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:75:8:\n // expressionRoot\n {\n pushFollow(FOLLOW_expressionRoot_in_bottomup96);\n expressionRoot();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:76:9:\n // incompleteAxiom\n {\n pushFollow(FOLLOW_incompleteAxiom_in_bottomup107);\n incompleteAxiom();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:77:9:\n // incompleteExpression\n {\n pushFollow(FOLLOW_incompleteExpression_in_bottomup117);\n incompleteExpression();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:78:8:\n // axiom\n {\n pushFollow(FOLLOW_axiom_in_bottomup126);\n axiom();\n state._fsp--;\n if (state.failed) {\n return;\n }\n }\n break;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return;\n }",
"private void yy() {\n\n\t}",
"@Override\r\n\tpublic void rule1() {\n\t\tSystem.out.println(\"인터페이스 ISports1메소드 --> rule()\");\r\n\t}",
"public void skipValue() {\n switch (peek()) {\n case BOOLEAN:\n nextBoolean();\n break;\n\n case NAME:\n nextName();\n break;\n\n case NULL:\n nextNull();\n break;\n\n case NUMBER:\n nextNumber();\n break;\n\n case START_COLLECTION:\n beginArray();\n while (hasNext()) {\n skipValue();\n }\n endArray();\n break;\n\n case START_MAP:\n beginObject();\n while (hasNext()) {\n nextName();\n skipValue();\n }\n endObject();\n break;\n\n case STRING:\n nextString();\n break;\n\n default:\n throw new JsonException(\"Cannot skip \" + peek() + \". \" + input);\n }\n }",
"private void LL1Parser() throws IOException {\n\n LA.ReadLine(0);\n ParsStack.push(\"$\");\n ParsStack.push(\"P\");\n int prod;\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"in ll1 parser\");\n// System.out.println(token.getValue() + \" \" + token.getType());\n while (true)\n {\n// System.out.println(ParsStack.peek());\n if (!CheckTerminal(ParsStack.peek()) && (!ParsStack.peek().equals(\"$\")) && (ParsStack.peek().charAt(0) != '@'))\n {\n /**inja be nazarm bayad BUparser run she agar BE bashe sare parse stack**/\n if (ParsStack.peek().equals(\"BE\"))\n {\n// System.out.println(\"go to SLR parser\");\n SLRParser();\n// System.out.println(\"Come back from SLR parser\");\n// System.out.println(ParsStack.peek());\n ParsStack.pop();\n token = LA.Scanner();\n// System.out.println(token.getValue());\n }\n else\n {\n prod = getProduction(ParsStack.peek(), token);\n// System.out.println(ParsStack.peek() + \" \" + token.getValue() + \" \" + prod);\n if (prod == 0) {\n error(4);\n break;\n } else {\n ParsStack.pop();\n for (int i = TempGrammer.get(prod - 1).getRight().length - 2 ; i > 0 ; i--) {\n if (TempGrammer.get(prod - 1).getRight()[i].equals(\"!\"))\n break;\n ParsStack.push(TempGrammer.get(prod - 1).getRight()[i]);\n// System.out.println(\"fill stack \" + ParsStack.peek());\n }\n }\n }\n }\n else if (CheckTerminal(ParsStack.peek()))\n {\n if (!CheckTerminal(token.getValue()))\n {\n if (ParsStack.peek().equals(\"id\"))\n {\n// System.out.println(token.getValue() + \" pop\");\n ParsStack.pop();\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"new token is \" + token.getValue());\n }\n else\n {\n if (token.getValue().equals(\"$\"))\n {\n error(1);\n break;\n }\n }\n }\n else if (ParsStack.peek().equals(token.getValue()))\n {\n// System.out.println(token.getValue() + \" pop\");\n ParsStack.pop();\n token = LA.Scanner();\n while (token.getValue() == null)\n {\n token = LA.Scanner();\n }\n// System.out.println(\"new token is \" + token.getValue());\n\n }\n else\n {\n error(1);\n break;\n }\n }\n /**inja ham ye else if dige bashe baraye @semanticrule ha ke codeGenerator seda zade beshe**/\n /** nazar man ro injast **/\n else if (ParsStack.peek().charAt(0) == '@')\n {\n// System.out.println(\"see semantic role\");\n if (ParsStack.peek().equals(\"@push\"))\n terminat = CodeGen.run( ParsStack.pop() , token.getValue() , LA.Line - 1);\n else\n terminat = CodeGen.run( ParsStack.pop() , ParsStack.peek() , LA.Line - 1);\n\n\n if(terminat)\n Terminate();\n /** code generation inja seda mishe **/\n }\n else if (ParsStack.peek().equals(\"$\"))\n {\n if (token.getValue().equals(\"$\"))\n {\n Accept();\n break;\n }\n else {\n error(2);\n break;\n }\n }\n else {\n error(3);\n break;\n }\n }\n\n }",
"public void testDETERMINER2() throws Exception {\n\t\tObject retval = execLexer(\"DETERMINER\", 234, \"an\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"DETERMINER\", expecting, actual);\n\t}",
"E4Rule createE4Rule();",
"@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}",
"public void run()\n{\n yyparse();\n}",
"public void run()\n{\n yyparse();\n}",
"protected GrammarNode createGrammar() throws IOException {\n languageModel.allocate();\n Timer.start(\"LMGrammar.create\");\n GrammarNode firstNode = null;\n if (languageModel.getMaxDepth() > 2) {\n System.out.println(\"Warning: LMGrammar limited to bigrams\");\n }\n int identity = 0;\n List nodes = new ArrayList();\n Set words = languageModel.getVocabulary();\n // create all of the word nodes\n for (Iterator i = words.iterator(); i.hasNext();) {\n String word = (String) i.next();\n GrammarNode node = createGrammarNode(identity++, word);\n if (node != null && !node.isEmpty()) {\n if (node.getWord().equals(\n getDictionary().getSentenceStartWord())) {\n firstNode = node;\n } else if (node.getWord().equals(\n getDictionary().getSentenceEndWord())) {\n node.setFinalNode(true);\n }\n nodes.add(node);\n }\n }\n if (firstNode == null) {\n throw new Error(\"No sentence start found in language model\");\n }\n for (Iterator i = nodes.iterator(); i.hasNext();) {\n GrammarNode prevNode = (GrammarNode) i.next();\n // don't add any branches out of the final node\n if (prevNode.isFinalNode()) {\n continue;\n }\n for (Iterator j = nodes.iterator(); j.hasNext();) {\n GrammarNode nextNode = (GrammarNode) j.next();\n String prevWord = prevNode.getWord().getSpelling();\n String nextWord = nextNode.getWord().getSpelling();\n Word[] wordArray = {getDictionary().getWord(prevWord),\n getDictionary().getWord(nextWord)};\n float logProbability = languageModel\n .getProbability(WordSequence.getWordSequence(wordArray));\n prevNode.add(nextNode, logProbability);\n }\n }\n Timer.stop(\"LMGrammar.create\");\n languageModel.deallocate();\n return firstNode;\n }",
"@Override\n public void close()\n {\n for ( Map.Entry<String,CharacterSet> rule : fragmentRules.entrySet() )\n {\n CharacterSet set = rule.getValue();\n output.append( \"fragment \" );\n lexerRule( rule.getKey() ).append( \" : \" );\n if ( CharacterSet.ANY.equals( set.name() ) )\n {\n set.accept( new AnyCharacterExceptFormatter( output ) );\n }\n else\n {\n output.append( '[' );\n set.accept( new SetFormatter( output ) );\n output.append( ']' );\n }\n output.println( \" ;\" ).println(); // PRF was \" ;\\n\"\n }\n }",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n StringReader stringReader0 = new StringReader(\"extends\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n javaParserTokenManager0.SkipLexicalActions(token0);\n assertEquals(6, javaCharStream0.bufpos);\n assertEquals(\"extends\", token0.toString());\n }",
"private void addAndEnterEpsilonRule()\n {\n ruleTextField.setText(ruleTextField.getText() + \"\\u025B\");\n enterRules();\n }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }",
"@Override public ParserRule getRule() { return rule; }"
] | [
"0.6587007",
"0.6463888",
"0.6036709",
"0.5999644",
"0.59311515",
"0.56520444",
"0.56484663",
"0.5592005",
"0.5584467",
"0.55612475",
"0.5531828",
"0.5417892",
"0.5396405",
"0.5375085",
"0.5357931",
"0.53441894",
"0.5323466",
"0.5298583",
"0.52944356",
"0.5257322",
"0.52499837",
"0.5249903",
"0.52496266",
"0.5203826",
"0.51636857",
"0.515543",
"0.51537234",
"0.5149819",
"0.51439035",
"0.5142592",
"0.51387686",
"0.513685",
"0.51305044",
"0.5097758",
"0.509382",
"0.50828826",
"0.50729567",
"0.50654835",
"0.5062096",
"0.50553596",
"0.50511307",
"0.5041962",
"0.50380725",
"0.5036257",
"0.5000098",
"0.49871448",
"0.4964602",
"0.4964502",
"0.4957112",
"0.49561137",
"0.49460042",
"0.49444938",
"0.49320415",
"0.49183315",
"0.49064872",
"0.4898619",
"0.48942858",
"0.48938316",
"0.48889986",
"0.48815587",
"0.48814312",
"0.48814312",
"0.48752946",
"0.48716703",
"0.48672545",
"0.48634076",
"0.48576465",
"0.48533458",
"0.48524746",
"0.4840308",
"0.48398647",
"0.48357978",
"0.48263222",
"0.4821548",
"0.4815354",
"0.4815025",
"0.48101023",
"0.48085752",
"0.48046288",
"0.48009926",
"0.4798972",
"0.47955492",
"0.47950077",
"0.47944465",
"0.47944465",
"0.4791795",
"0.4790767",
"0.47899053",
"0.4788464",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504",
"0.47880504"
] | 0.7213316 | 0 |
factor = atom atom postops | private boolean factor() {
return MARK(ATOM) && atom() && postops();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getFactor() { return this.factor; }",
"protected abstract double getReductionFactor();",
"public abstract int getNFactor();",
"public void setFactor(int f) { this.factor = f; }",
"private static void term(long[] points) {\n\t\tlong temp;\n\t\tfor (int i1 = 0; i1 < points.length; i1++) {\n\t\t\t//System.out.println(((points[i1]/2))*((points[i1]/2)+1));\n\t\t\t//System.out.println((points[i1]/2)*((points[i1]/2)+1));\n\t\t\t\ttemp=(points[i1]/2)*((points[i1]/2)-1);\n\t\t\t//\tSystem.out.println(\"temp\"+temp);\n\t\t\t\tif((points[i1]%2)==0){\n\t\t\t\t\ttemp+=(points[i1])/2;\n\t\t\t\t}else{\n\t\t\t\t\ttemp+=(points[i1])/2;temp+=(points[i1])/2;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(temp);\n\t\t\t\ttemp=0;\n\t\t}\n\t}",
"public final PythonParser.term_return term() throws RecognitionException {\n PythonParser.term_return retval = new PythonParser.term_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n List list_right=null;\n PythonParser.factor_return left = null;\n\n PythonParser.term_op_return term_op208 = null;\n\n PythonParser.factor_return right = null;\n right = null;\n RewriteRuleSubtreeStream stream_term_op=new RewriteRuleSubtreeStream(adaptor,\"rule term_op\");\n RewriteRuleSubtreeStream stream_factor=new RewriteRuleSubtreeStream(adaptor,\"rule factor\");\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:1254:5: (left= factor ( ( term_op right+= factor )+ | -> $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:1254:7: left= factor ( ( term_op right+= factor )+ | -> $left)\n {\n pushFollow(FOLLOW_factor_in_term5467);\n left=factor();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_factor.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:1255:9: ( ( term_op right+= factor )+ | -> $left)\n int alt101=2;\n int LA101_0 = input.LA(1);\n\n if ( (LA101_0==STAR||(LA101_0>=SLASH && LA101_0<=DOUBLESLASH)) ) {\n alt101=1;\n }\n else if ( (LA101_0==EOF||LA101_0==NEWLINE||LA101_0==NAME||(LA101_0>=AND && LA101_0<=AS)||LA101_0==FOR||LA101_0==IF||(LA101_0>=IN && LA101_0<=IS)||(LA101_0>=NOT && LA101_0<=ORELSE)||(LA101_0>=RPAREN && LA101_0<=COMMA)||(LA101_0>=SEMI && LA101_0<=MINUS)||LA101_0==RBRACK||(LA101_0>=RCURLY && LA101_0<=BACKQUOTE)) ) {\n alt101=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 101, 0, input);\n\n throw nvae;\n }\n switch (alt101) {\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:1255:11: ( term_op right+= factor )+\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:1255:11: ( term_op right+= factor )+\n int cnt100=0;\n loop100:\n do {\n int alt100=2;\n int LA100_0 = input.LA(1);\n\n if ( (LA100_0==STAR||(LA100_0>=SLASH && LA100_0<=DOUBLESLASH)) ) {\n alt100=1;\n }\n\n\n switch (alt100) {\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:1255:12: term_op right+= factor\n \t {\n \t pushFollow(FOLLOW_term_op_in_term5480);\n \t term_op208=term_op();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_term_op.add(term_op208.getTree());\n \t pushFollow(FOLLOW_factor_in_term5484);\n \t right=factor();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_factor.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((term_op208!=null?term_op208.op:null));\n \t \n \t }\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt100 >= 1 ) break loop100;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(100, input);\n throw eee;\n }\n cnt100++;\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:1261: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 // 1261: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\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 }",
"protected abstract void calculateNextFactor();",
"public Double getFactor();",
"private static void reduceMonty(int[] x, int[] m, int mDash) // mDash = -m^(-1) mod b\n {\n\n int n = m.length;\n\n for (int i = n - 1; i >= 0; --i)\n {\n int x0 = x[n - 1];\n\n long t = (x0 * mDash) & IMASK;\n\n long carry = t * (m[n - 1] & IMASK) + (x0 & IMASK);\n// assert (int)carry == 0;\n carry >>>= 32;\n\n for (int j = n - 2; j >= 0; --j)\n {\n carry += t * (m[j] & IMASK) + (x[j] & IMASK);\n x[j + 1] = (int)carry;\n carry >>>= 32;\n }\n\n x[0] = (int)carry;\n// assert carry >>> 32 == 0;\n }\n\n if (compareTo(0, x, 0, m) >= 0)\n {\n subtract(0, x, 0, m);\n }\n }",
"private Expr unaryPost(Position pos, X10Unary_c.Operator op, Expr e) throws SemanticException {\n Type ret = e.type();\n Expr one = getLiteral(pos, ret, 1);\n Assign.Operator asgn = (op == X10Unary_c.POST_INC) ? Assign.ADD_ASSIGN : Assign.SUB_ASSIGN;\n X10Binary_c.Operator bin = (op == X10Unary_c.POST_INC) ? X10Binary_c.SUB : X10Binary_c.ADD;\n Expr incr = assign(pos, e, asgn, one);\n incr = visitAssign((Assign) incr);\n return visitBinary((X10Binary_c) xnf.Binary(pos, incr, bin, one).type(ret));\n }",
"private NFA factor() {\n NFA base = base();\n //if the regex is longer and the next char is star operator\n while (more() && peek() == '*') {\n eat('*');\n base = star(base);\n }\n return base;\n }",
"@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}",
"public void mul(final int factor) {\n for (int i = 0; i < coefficients.length; i++) {\n coefficients[i] = zpz.mul(coefficients[i],factor);\n }\n constant = zpz.mul(constant,factor);\n }",
"public boolean factor(Expr e) {\n e.setFactor(new Factor());\n PostfixExpr pe = new PostfixExpr();\n if (postfix_expr(pe)) {\n e.getFactor().setPostfixExpr(pe);\n boolean fct = factor_tail(e.getFactor());\n if(fct && e.getFactor().getFactorTail() != null){\n String typeofpf = e.getFactor().getPostfixExpr().getType(symbolTable);\n String typeofft = e.getFactor().getFactorTail().getType(symbolTable);\n if(typeofpf != null && typeofft != null && !typeofpf.equals(typeofft))\n error.warning(\"Trying to make an operation between a \"+typeofpf+\" and a \"+typeofft);\n }\n return fct; \n }\n \n return false;\n }",
"private void mul() {\n\n\t}",
"void reduceStarsBy(final int amount);",
"static void pregenFact() \n\t{ \n\t\tfact[0] = fact[1] = 1; \n\t\tfor (int i = 1; i <= 1000000; ++i) \n\t\t{ \n\t\t\tfact[i] = (int) ((long) fact[i - 1] * i % mod); \n\t\t} \n\t}",
"public static double getFactorExec() {\n return (moreFactorExec_ - lessFactorExec_) / 2;\n }",
"public void fact(double factor) {\n\t\tthis.setPxPyPzE(factor * this.px(), factor * this.py(), factor * this.pz(), factor * this.e());\n\t}",
"private Operand parseFactor() {\n Operand operand = new Operand(SymbolTable.OBJECT_NONE);\n switch (nextToken.kind) {\n case Token.IDENT:\n operand = parseDesignator();\n\n if (nextToken.kind == Token.LPAR) {\n if (operand.kind != Operand.KIND_METHOD) {\n error(\"Illegal method call\");\n }\n parseActPars(operand.object);\n if (operand.object == SymbolTable.OBJECT_LEN) {\n code.put(Code.OP_ARRAYLENGTH);\n } else if(operand.object != SymbolTable.OBJECT_CHR\n && operand.object != SymbolTable.OBJECT_ORD) {\n code.put(Code.OP_CALL);\n code.put2(operand.address);\n }\n } else {\n code.load(operand);\n }\n\n break;\n case Token.NUMBER:\n check(Token.NUMBER);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_INT;\n code.load(new Operand(token.value));\n break;\n case Token.CHAR_CONST:\n check(Token.CHAR_CONST);\n operand = new Operand(token.value);\n operand.type = SymbolTable.STRUCT_CHAR;\n code.load(new Operand(token.value));\n break;\n case Token.NEW:\n check(Token.NEW);\n check(Token.IDENT);\n SymObject object = find(token.string);\n assertIsType(object);\n Struct type = object.type;\n if (nextToken.kind == Token.LBRACK) {\n check(Token.LBRACK);\n Struct sizeType = parseExpr().type;\n if (sizeType != SymbolTable.STRUCT_INT) {\n error(\"Array size must be an int\");\n }\n check(Token.RBRACK);\n type = new Struct(Struct.KIND_ARRAY, type);\n\n code.put(Code.OP_NEWARRAY);\n if (type.elementsType == SymbolTable.STRUCT_CHAR) {\n code.put(0);\n } else {\n code.put(1);\n }\n } else {\n if (type.kind != Struct.KIND_CLASS) {\n error(\"Illegal instantiation: type isn't a class\");\n }\n\n code.put(Code.OP_NEW);\n code.put2(type.fields.size());\n }\n operand = new Operand(Operand.KIND_EXPR, -1, type);\n break;\n case Token.LPAR:\n check(Token.LPAR);\n operand = parseExpr();\n check(Token.RPAR);\n break;\n }\n\n return operand;\n }",
"private int[] productExceptSelfByMathAndConstantSpace(int[] nums){\n int len = nums.length;\n int[] ret = new int[len]; // not count as extra space\n\n // prefix\n ret[0] = 1;\n for(int i = 1; i < len; i++){\n ret[i] = ret[i - 1] * nums[i - 1];\n }\n\n // right to keep the suffix product of i, and ret[i](product) = ret[i](prefix) * right(suffix); and then update right.\n int right = 1; // keep right value of ret[i]\n for(int i = len - 1; i >= 0; i--){\n ret[i] = right * ret[i]; // prefix prdocut of i(ret[i] for current i) * suffix product of i(right, actaully is 'i + 1' for current i)\n right = right * nums[i]; // suffix product of i(actually suffix product of \"i+1\" when right is used.)\n }\n\n return ret;\n }",
"public double getFactor() {\n return this.factor;\n }",
"private NFA term() {\n NFA startFactor = new NFA();\n while (more() && peek() != ')' && peek() != '|') {\n NFA newFactor = factor();\n //If a term is just an empty sequence of factors\n if (startFactor.getStates().isEmpty()) {\n startFactor = newFactor;\n } else {//concatentae the term if there are multple factor\n startFactor = combine(startFactor, newFactor);\n }\n }\n return startFactor;\n }",
"protected int bytesPerAtom() {\n return (2);\n }",
"protected int bytesPerAtom() {\n return (2);\n }",
"private int parseTerm(Queue<String> exp) {\n int value = parseFactor(exp);\n while (exp.peek().equals(\"*\") || exp.peek().equals(\"/\")) {\n String next = exp.dequeue().getData().toString();\n if (next.equals(\"*\")) {\n value = value * parseFactor(exp);\n } else {\n value = value / parseFactor(exp);\n }\n }\n return value;\n }",
"private double parseFactor() {\n\t double value = 0;\n boolean negate = false;\n boolean sqrt = false;\n if (token.getType().equals(Token.Type.PLUS) || token.getType().equals(Token.Type.MINUS)) { // unary plus & minus\n negate = token.getType().equals(Token.Type.MINUS);\n token=lexer.getNextToken();\n }\n if (token.getType().equals(Token.Type.SQRT)){ // square root\n sqrt = true;\n \ttoken=lexer.getNextToken();\n }\n if (token.getType().equals(Token.Type.LPAREN)) { // brackets\n \tparenCount++;\n token= lexer.getNextToken();\n value = parseExpression();\n if (token.getType().equals(Token.Type.RPAREN)) {\n \tparenCount--;\n \ttoken = lexer.getNextToken();\n }\n } else { // numbers\n if (token.getType().equals(Token.Type.NUMBER)){\n \tvalue = token.getValue();\n \tif (Double.isNaN(value)){\n \t\ttoken = new Token();\n \t\ttoken.setType(Token.Type.END);\n \t\treturn Double.NaN;\n \t}else{\n \t\ttoken = lexer.getNextToken();\n \t}\n }else{\n \treturn Double.NaN;\n }\n }\n if (token.getType().equals(Token.Type.POW)) { // exponentiation\n token = lexer.getNextToken();\n value = Math.pow(value, parseFactor());\n }\n if (token.getType().equals(Token.Type.PERCENT)) { // Percent\n value = value*0.01;\n token = lexer.getNextToken();\n }\n if (sqrt) value = Math.sqrt(value); //square root is equal to exponentiation\n if (negate) value = -value; // unary minus is applied after exponentiation; e.g. -3^2=-9\n return value;\n\t}",
"public Node factor(Node n_parent) {\r\n String identifier=\"\";\r\n String type=\"\";\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: factor:if:\");\r\n identifier = token.get(lookAheadPossition).substring(6, token.get(lookAheadPossition).length() - 1);\r\n type = (String) symbolTable.get(identifier);\r\n type=type.toLowerCase();\r\n\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).contains(\"num(\")){\r\n System.out.println(\":: factor:if\");\r\n identifier = token.get(lookAheadPossition).substring(4, token.get(lookAheadPossition).length() - 1);\r\n type = \"int\";\r\n\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).contains(\"boollit(\")){\r\n System.out.println(\":: factor:if\");\r\n identifier = token.get(lookAheadPossition).substring(8, token.get(lookAheadPossition).length() - 1);\r\n\r\n System.out.println(\":: factor:if:boollit \"+identifier);\r\n if (identifier.contentEquals(\"true\") || identifier.contentEquals(\"false\") ){ type=\"bool\";}else { type = (String) symbolTable.get(identifier); type = type.toLowerCase();}\r\n System.out.println(\":: factor:if:boolint\"+type);\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: factor:if:: LP\");\r\n//\r\n this.CheckError(\"LP\");\r\n// Node n_LP_RP = n_parent.setChildren(\"LP:RP\");\r\n //this.simpleExpression(n_parent );\r\n Node n_factor = this.simpleExpression(n_parent);\r\n this.CheckError(\"RP\");\r\n return n_factor;\r\n }\r\n return(null);\r\n }",
"public static BigInteger[] multiply_Point(BigInteger[] point, BigInteger factor) \r\n{\r\n\tBigInteger[] erg = point;\r\n\tBigInteger[] NULL= new BigInteger[2];\r\n\tNULL[0] = ZERO;\r\n\tNULL[1] = ZERO; \r\n\tif(factor.equals(ZERO)) return NULL;\r\n\tif(factor.equals(ONE)) return erg;\r\n\tif(factor.equals(TWO)) return multiply_2(erg);\r\n\tif(factor.equals(THREE)) return addition(multiply_2(erg),erg);\r\n\tif(factor.equals(FOUR)) return multiply_2(multiply_2(erg));\r\n\tif(factor.compareTo(FOUR)==1); \r\n\t{ \r\n\t\tint exp = factor.bitLength()-1;\r\n\t\tfor(;exp >0;exp--)erg = multiply_2(erg);\r\n\t\tfactor = factor.clearBit(factor.bitLength()-1);\r\n\t\terg = addition(multiply_Point(point,factor),erg);\r\n\t}\r\n\treturn erg; \r\n}",
"public void setFactor(Double factor);",
"public abstract void betaReduce();",
"Up(int z) {x *= 3; }",
"@Override\r\n\tprotected void onReduceMp()\r\n\t{\n\t}",
"public void reduce( T mrt ) { }",
"public void reduce( T mrt ) { }",
"public BigInteger[] multiply_G(BigInteger factor) \r\n{\r\n\tBigInteger[] voher = EXPList.nullVektor;\r\n\tBigInteger[] erg = new BigInteger[2];\r\n\tfor(int i=0;i<=255;i++)\r\n\t{\r\n\t\tif(factor.testBit(i)==true) \r\n\t\t{\r\n\t\t erg = addition(voher,EXPList.list[i]); \r\n\t\t voher = erg;\r\n\t\t} \r\n\t}\r\n\treturn erg; \r\n}",
"public double getFactor() {\n return factor;\n }",
"private static int fact(int n) {\n\t\tint prod = 1;\n\t\tfor (int i = 1; i <= n; prod *= i++)\n\t\t\t;\n\t\treturn prod;\n\t}",
"private BigInteger[] factor(BigInteger i) {\n return null;\r\n }",
"@Override\n public Integer reduceInit() { return 0; }",
"public double getFactor() {\n return ((double) multiplier) / ((double) divisor);\n }",
"Sum getMultiplier();",
"public final JavaliParser.term_return term() throws RecognitionException {\n\t\tJavaliParser.term_return retval = new JavaliParser.term_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tParserRuleReturnScope op =null;\n\t\tParserRuleReturnScope rightFactor =null;\n\t\tParserRuleReturnScope factor93 =null;\n\n\t\tRewriteRuleSubtreeStream stream_strongOp=new RewriteRuleSubtreeStream(adaptor,\"rule strongOp\");\n\t\tRewriteRuleSubtreeStream stream_factor=new RewriteRuleSubtreeStream(adaptor,\"rule factor\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:468:2: ( ( factor -> factor ) (op= strongOp rightFactor= factor -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $term strongOp $rightFactor) )* )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:469:3: ( factor -> factor ) (op= strongOp rightFactor= factor -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $term strongOp $rightFactor) )*\n\t\t\t{\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:469:3: ( factor -> factor )\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:469:5: factor\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_factor_in_term1829);\n\t\t\tfactor93=factor();\n\t\t\tstate._fsp--;\n\n\t\t\tstream_factor.add(factor93.getTree());\n\t\t\t// AST REWRITE\n\t\t\t// elements: factor\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 = (Object)adaptor.nil();\n\t\t\t// 469:12: -> factor\n\t\t\t{\n\t\t\t\tadaptor.addChild(root_0, stream_factor.nextTree());\n\t\t\t}\n\n\n\t\t\tretval.tree = root_0;\n\n\t\t\t}\n\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:470:3: (op= strongOp rightFactor= factor -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $term strongOp $rightFactor) )*\n\t\t\tloop29:\n\t\t\twhile (true) {\n\t\t\t\tint alt29=2;\n\t\t\t\tint LA29_0 = input.LA(1);\n\t\t\t\tif ( ((LA29_0 >= 67 && LA29_0 <= 68)||LA29_0==71||LA29_0==76) ) {\n\t\t\t\t\talt29=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt29) {\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:470:5: op= strongOp rightFactor= factor\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_strongOp_in_term1843);\n\t\t\t\t\top=strongOp();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_strongOp.add(op.getTree());\n\t\t\t\t\tpushFollow(FOLLOW_factor_in_term1847);\n\t\t\t\t\trightFactor=factor();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_factor.add(rightFactor.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: rightFactor, strongOp, term\n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval, rightFactor\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\t\t\t\t\tRewriteRuleSubtreeStream stream_rightFactor=new RewriteRuleSubtreeStream(adaptor,\"rule rightFactor\",rightFactor!=null?rightFactor.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 471:4: -> ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $term strongOp $rightFactor)\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:471:7: ^( BinaryOp[$op.start, \\\"BinaryOp\\\"] $term strongOp $rightFactor)\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_retval.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_strongOp.nextTree());\n\t\t\t\t\t\tadaptor.addChild(root_1, stream_rightFactor.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\tdefault :\n\t\t\t\t\tbreak loop29;\n\t\t\t\t}\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}",
"@Test\n public void testFactor_4args() {\n System.out.println(\"factor\");\n int[] number = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n int[] weighting = {1, 2, 2, 3, 4, 5};\n int start = 4;\n int end = 9;\n AbstractMethod instance = new AbstractMethodImpl();\n int[] expResult = {0, 1, 2, 15, 16, 15, 12, 14, 8, 9};\n int[] result = instance.factor(number, weighting, start, end);\n assertArrayEquals(expResult, result);\n\n\n }",
"private double getPseudoLoadingFactor( int... plus ) {\n if (plus.length > 0 && plus.length < 2) {\n return (double) (int) (((double) (n + nd + plus[0]) / N) * 10000) / 10000; \n }\n return (double) (int) (((double) (n + nd) / N) * 10000) / 10000;\n }",
"public static int term()\r\n {\r\n //get the start state of this factor\r\n int r;\r\n int t1;\r\n t1=r=factor();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if it is closure\r\n if(expression.charAt(index)=='*')\r\n {\r\n int f=state-1;\r\n //create a branch state and set its next1 and next2\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n //check if the expression is something like (abc)*\r\n //if so, update the corresponding state so both a* and (abc)* work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n if(stateList.get(f-1).getNext1()==stateList.get(f-1).getNext2())\r\n {\r\n stateList.get(f-1).setNext1(state);\r\n }\r\n stateList.get(f-1).setNext2(state);\r\n\r\n }\r\n\r\n index++;\r\n r=state;\r\n state++;\r\n\r\n }\r\n //preceding regexp can occur one or more times\r\n else if(expression.charAt(index)=='+')\r\n {\r\n int f=state-1;\r\n stateList.get(f).setNext1(t1);\r\n index++;\r\n\r\n }\r\n // preceding regexp can occur zero or one time\r\n else if(expression.charAt(index)=='?')\r\n {\r\n int f =state-1;\r\n //check if the expression is something like (abc)?\r\n //if so update corresponding state so both a? and (abc)? work\r\n if(expression.charAt(index-1)!=')')\r\n {\r\n //create a branch state and update the corresponding state\r\n state st=new state(state,\"BR\",t1,state+1);\r\n\r\n String previousChar=stateList.get(f).getCharacter();\r\n\r\n if(stateList.get(f).getAlter())\r\n {\r\n stateList.get(f).setAlter(false);\r\n st.setAlter(true);\r\n }\r\n\r\n stateList.get(f).setCharacter(\"BR\");\r\n stateList.get(f).setNext2(state+1);\r\n st.setCharacter(previousChar);\r\n st.setNext1(state+1);\r\n stateList.add(st);\r\n\r\n r=f;\r\n state++;\r\n index++;\r\n }\r\n else\r\n {\r\n //create a branch state and update the corresponding state\r\n if(stateList.get(f).getNext1()==stateList.get(f).getNext2())\r\n {\r\n stateList.get(f).setNext1(state+1);\r\n }\r\n stateList.get(f).setNext2(state+1);\r\n\r\n state st=new state(state,\"BR\",t1,state+1);\r\n stateList.add(st);\r\n\r\n r=state;\r\n state++;\r\n index++;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n return r;\r\n }",
"private int parseFactor(Queue<String> exp) {\n int value;\n if(exp.peek().equals(\"(\")) {\n exp.dequeue().getData().toString();\n value = parseExpression(exp);\n exp.dequeue().getData().toString();\n } else {\n String number = exp.dequeue().getData().toString();\n value = Integer.parseInt(number);\n }\n return value;\n }",
"public abstract int preN();",
"public static double factorial(int fact) {\r\n\t\t\t\r\n\t\t\tdouble aux=1;\r\n\t\t\t\r\n\t\t\tfor(int i=2; i<=fact;i++) {\r\n\t\t\t\t\r\n\t\t\t\taux*=i;\r\n\t\t\t}\r\n\t\t\treturn aux;\r\n\t\t}",
"private void reduce(String[] arguments) {\n\t\ttry { \n\t\t\tlastDeletedNode = null;\n\t\t\tint ID = Integer.parseInt(arguments[1]);\n\t int m = Integer.parseInt(arguments[2]);\n\t Node curr = searchID(root, ID);\n\t if(curr != null)\n\t {\n\t \tcurr.count -= m;\n\t \tif(curr.count > 0)\n\t \t\tSystem.out.printf(\"%d\\n\", curr.count);\n\t \telse\n\t \t{\n\t \t\tdelete(root, ID);\n\t \t\tSystem.out.println(\"0\");\n\t \t}\n\t }\n\t else\n\t \tSystem.out.println(\"0\");\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");\n\t }\n\t}",
"@Override\n\tprotected Integer compute() {\n\t\treturn 3;\n\t}",
"private void processFactors(List<ParseTree> factors) {\n String temp;\n for(int i=0; i < factors.size(); i++) {\n if(((RulesParser.FactorContext)factors.get(i)).operaciones() != null) {\n temp = this.tmp_current;\n processOperacion(((RulesParser.FactorContext) factors.get(i)).operaciones());\n this.tmp_previous = temp;\n } else if (((RulesParser.FactorContext) factors.get(i)).funcion() != null){\n temp = this.tmp_current;\n this.tmp_add = true;\n visitFuncion(((RulesParser.FactorContext) factors.get(i)).funcion());\n this.tmp_add = false;\n this.tmp_previous = temp;\n this.tmp_current = \"t\" + (this.count_tmp - 1);\n } else {\n this.tmp_previous = this.tmp_current;\n this.tmp_current = factors.get(i).getText();\n }\n if (i > 0){\n concatTemps(factors.get(i).getParent().getChild(0).getText());\n }\n }\n }",
"public LorentzVector multiply(double factor) {\n\t\tLorentzVector newVector = new LorentzVector(this);\n\t\tthis.fact(factor);\n\t\treturn newVector;\n\t}",
"public static void main(String[] args) {\nint a=10;\nSystem.out.println(a);\na+=2;\nSystem.out.println(a);\na-=2;\nSystem.out.println(a);\na*=2;\nSystem.out.println(a);\na/=2;\nSystem.out.println(a);\na%=2;\nSystem.out.println(a);\n\t}",
"@Override\n\t\tpublic void reduce() {\n\t\t\t\n\t\t}",
"float getConsumeReduction();",
"private int countPermuation(int n, int m){\n\t\tint res = 1;\n\t\tfor(int i = n - m + 1; i <= n; i++){\n\t\t\tres *= i;\n\t\t}\n\t\treturn res;\n\t}",
"public final PythonParser.factor_return factor() throws RecognitionException {\n PythonParser.factor_return retval = new PythonParser.factor_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token PLUS213=null;\n Token MINUS214=null;\n Token TILDE215=null;\n PythonParser.factor_return p = null;\n\n PythonParser.factor_return m = null;\n\n PythonParser.factor_return t = null;\n\n PythonParser.power_return power216 = null;\n\n\n PythonTree PLUS213_tree=null;\n PythonTree MINUS214_tree=null;\n PythonTree TILDE215_tree=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:1283:5: ( PLUS p= factor | MINUS m= factor | TILDE t= factor | power )\n int alt103=4;\n switch ( input.LA(1) ) {\n case PLUS:\n {\n alt103=1;\n }\n break;\n case MINUS:\n {\n alt103=2;\n }\n break;\n case TILDE:\n {\n alt103=3;\n }\n break;\n case NAME:\n case LPAREN:\n case LBRACK:\n case LCURLY:\n case BACKQUOTE:\n case INT:\n case LONGINT:\n case FLOAT:\n case COMPLEX:\n case STRING:\n {\n alt103=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 103, 0, input);\n\n throw nvae;\n }\n\n switch (alt103) {\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:1283:7: PLUS p= factor\n {\n root_0 = (PythonTree)adaptor.nil();\n\n PLUS213=(Token)match(input,PLUS,FOLLOW_PLUS_in_factor5657); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PLUS213_tree = (PythonTree)adaptor.create(PLUS213);\n adaptor.addChild(root_0, PLUS213_tree);\n }\n pushFollow(FOLLOW_factor_in_factor5661);\n p=factor();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, p.getTree());\n if ( state.backtracking==0 ) {\n retval.etype = new UnaryOp(PLUS213, unaryopType.UAdd, (p!=null?p.etype:null));\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:1285:7: MINUS m= factor\n {\n root_0 = (PythonTree)adaptor.nil();\n\n MINUS214=(Token)match(input,MINUS,FOLLOW_MINUS_in_factor5679); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n MINUS214_tree = (PythonTree)adaptor.create(MINUS214);\n adaptor.addChild(root_0, MINUS214_tree);\n }\n pushFollow(FOLLOW_factor_in_factor5683);\n m=factor();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, m.getTree());\n if ( state.backtracking==0 ) {\n retval.etype = actions.negate(MINUS214, (m!=null?m.etype:null));\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:1287:7: TILDE t= factor\n {\n root_0 = (PythonTree)adaptor.nil();\n\n TILDE215=(Token)match(input,TILDE,FOLLOW_TILDE_in_factor5701); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n TILDE215_tree = (PythonTree)adaptor.create(TILDE215);\n adaptor.addChild(root_0, TILDE215_tree);\n }\n pushFollow(FOLLOW_factor_in_factor5705);\n t=factor();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, t.getTree());\n if ( state.backtracking==0 ) {\n retval.etype = new UnaryOp(TILDE215, unaryopType.Invert, (t!=null?t.etype:null));\n }\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:1289:7: power\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_power_in_factor5723);\n power216=power();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, power216.getTree());\n if ( state.backtracking==0 ) {\n retval.etype = actions.castExpr((power216!=null?((PythonTree)power216.tree):null));\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 if ( state.backtracking==0 ) {\n\n retval.tree = retval.etype;\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 void multiply() {\n\t\t\n\t}",
"public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}",
"protected static void performReduceWithABinaryOperator() {\n Integer sum = Stream.of(1, 2, 3, 4, 5).reduce(0, Integer::sum);\n\n Integer minValue = Stream.of(5, 4, 9, 2, 1).reduce(Integer.MIN_VALUE, Integer::max);\n\n String concatenation = Stream.of(\"str \", \"= \", \"alt \", \"string\")\n // the first parameter becomes the target of the concat method and the second one is the argument to concat\n // the target, the parameter and the result are of the same type and this can be considered a binary\n // operator for the reduce method\n .reduce(\"\", String::concat);\n System.out.println(concatenation);\n }",
"private static int multAndDivFixer(int size){\n return size;\n }",
"@Override\n\tpublic String visitTerm(MicroParser.TermContext ctx) {\n\t\tString prefix = visit(ctx.factor_prefix());\n\t\tString termExpr = prefix + visit(ctx.factor());\n\t\t//System.out.println(\"in term :\"+termExpr);\n\t\t//System.out.println(\"in term, prefix is:\"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return termExpr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = termExpr.split(\"/|\\\\*\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> mulops = new ArrayList<Character>();\n\t \n\t //create a list of mulops\n\t for(int i=0;i<termExpr.length();i++) {\n\t \tif(termExpr.charAt(i)=='*' || termExpr.charAt(i)=='/')\n\t \t\tmulops.add(termExpr.charAt(i));\n\t }\n\t //create a list of operands \n\t for(String i:ids) \n\t \toperands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t //System.out.println(\"in term op1 op2: \"+op1 +\" \" + op2);\n\t temp = new Temporary(type);\n \tresult = temp.fullName;\n \ttempList.addT(temp);\n\t //System.out.println(\"in term result: \"+result);\n\t if(mulops.get(0)=='*') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"MULT\", op1, op2, result));\n\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t \toperands.remove(0); operands.remove(0); mulops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"DIV\", op1, op2, result));\n\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t \toperands.remove(0); operands.remove(0); mulops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t //System.out.println(\"AFTER IF\");\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(mulops.get(0)=='*') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"MULT\", op1, op2, result));\n\t\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t\t \tmulops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"DIV\", op1, op2, result));\n\t\t \t//System.out.println(globalIR.getLastStatement(globalIR));\n\t\t \tmulops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result;\n\t\t\n\t}",
"private int caculate(Operation opt, int t1, int t2) {\n\t\tint res;\n\t\tswitch (opt) {\n\t\tcase ADD:\n\t\t\tres = t1 + t2;\n\t\t\tbreak;\n\t\tcase SUB:\n\t\t\tres = t1 - t2;\n\t\t\tbreak;\n\t\tcase MUL:\n\t\t\tres = t1 * t2;\n\t\t\tbreak;\n\t\tcase DIV:\n\t\t\tres = t1 / t2;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\terr.error(\"No operation in caculating.\");\n\t\t\tres = 0;\n\t\tdefault:\n\t\t\tres = 0;\n\t\t\tbreak;\n\t\t}\n\t\treturn res;\n\t\t/*\n\t\t * lex.intHolder.add(res); return lex.intHolder.lastIndexOf(res);\n\t\t */\n\t}",
"public double getFactors() {\n \t\n \treturn _operatorFactors;\n \t\n }",
"protected float getFactor(int node, int tl) {\n\t\t\treturn me[node][tl];\n\t\t}",
"private static int calc(int c) {\n\t\treturn 1;\n\t}",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n n = in.nextInt();\n m = in.nextLong();\n initFactorSets();\n long total = 0;\n\n boolean add = true;\n for (ArrayList<Integer> factorSet : factorSets) {\n for (int factor : factorSet) {\n if (add) {\n total += m / factor;\n } else {\n total -= m / factor;\n }\n }\n add = !add;\n }\n System.out.println(total);\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint a=299;\n\t\tint b=a++;//first assing__>incremet(int b=a; a=a+1)\n\t\t\n\t\tSystem.out.println(a);//300\n System.out.println(b);//299\n \n \n //post decrement x--;\n \n \n \n //int x=10;\n // int y=x;\n //System.out.println(x+\" \"+y);\n\tint z=10;\n int c=z--;//first assing -->decrement(int c=z;z=z-1)\n\tSystem.out.println(z);//9\n\tSystem.out.println(c);//10\n\t\n\t\n\t\n\t}",
"public int mctFromLeafValues(int[] arr) {\n int ans = 0;\n Stack<Integer> stack = new Stack<>();\n stack.push(Integer.MAX_VALUE);\n for (int i : arr) {\n while (i >= stack.peek()) {\n int mid = stack.pop();\n ans += mid * Math.min(i, stack.peek());\n }\n stack.push(i);\n }\n while (stack.size() > 2) {\n ans += stack.pop() * stack.peek();\n }\n return ans;\n }",
"public Inatnum multiply(Inatnum a) {\n Inatnum zero = new zeronatnum(); // we need a new zero natural number for our res\n Inatnum res = zero;// this is our res value where we store our information, it needs to start at 0\n //INV: i>0 && i-1 <= this.getval() && res = a^(i) ==> i=this.getval()-(this.getval()z-1)\n for(int i = this.getVal(); i>0;i--) {// setting our i value to our this and if its greater than zero decrement by 1\n //INV: i>0 && i <= this.getval() && res = a^i ==> i=this.getval()-(this.getval()\n\t\t\tres = res.add(a);//now we save our res value as the previous res value plus a. we do this as many times as we are multiplying by. So if it is 3 times\n //INV: i>0 && i <= this.getval() && res = a^i ==> i=this.getval()-(this.getval()-1) \n \t\t\t//i-- => i = this.getval()-(this.getval()-1-1)\n \t\t\t //INV: i>0 && i-1 <= this.getval() && res = a^(i) ==> i=this.getval()-(this.getval()-1-1)\n \t\t\t //INV: i>0 && i-1 <= this.getval() && res = a^(i) ==> i=this.getval()-(this.getval()z-1) \n\t\t\t // 4 then we are adding 4 3 times\n }\n\t\t\t //INV: i<0 && i-1 < this.getval() ==> i ==0 && res = a^i ==> i=this.getval()\n //Termination Argument: i starts at this.getval(), i decrements each time through the loop\n\t\t\t\t\t\t return res;// we need to return our res value that holds our current value.\n }",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"protected final double fa(double x, double ac, double ae) {return ac*Math.pow(x, ae)/K;}",
"private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }",
"private double RepulsionFactorSourceNodes(){\n \tdouble RepulsionFactor=10000.0d *(contextNodeSize*5);\n \t\n \treturn RepulsionFactor;\n }",
"protected Float additionalTransformation(String term, Float value){\n\t\tif(!ENABLE_ADD_NORMALIZATION) return value;\n\t\t\n\t\tFloat result = value;\n\t\t//result *= this.weightTermUniqeness(term); \n\t\tresult = this.sigmoidSmoothing(result);\n\t\t\n\t\treturn result;\n\t}",
"private float m23258a(float f, float f2, float f3) {\n return f + ((f2 - f) * f3);\n }",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"protected void o()\r\n/* 156: */ {\r\n/* 157:179 */ int i = 15 - aib.b(this);\r\n/* 158:180 */ float f = 0.98F + i * 0.001F;\r\n/* 159: */ \r\n/* 160:182 */ this.xVelocity *= f;\r\n/* 161:183 */ this.yVelocity *= 0.0D;\r\n/* 162:184 */ this.zVelocity *= f;\r\n/* 163: */ }",
"private static BigInteger multiplyToomCook3(BigInteger a, BigInteger b) {\n int alen = a.mag.length;\n int blen = b.mag.length;\n\n int largest = Math.max(alen, blen);\n\n // k is the size (in ints) of the lower-order slices.\n int k = (largest+2)/3; // Equal to ceil(largest/3)\n\n // r is the size (in ints) of the highest-order slice.\n int r = largest - 2*k;\n\n // Obtain slices of the numbers. a2 and b2 are the most significant\n // bits of the numbers a and b, and a0 and b0 the least significant.\n BigInteger a0, a1, a2, b0, b1, b2;\n a2 = a.getToomSlice(k, r, 0, largest);\n a1 = a.getToomSlice(k, r, 1, largest);\n a0 = a.getToomSlice(k, r, 2, largest);\n b2 = b.getToomSlice(k, r, 0, largest);\n b1 = b.getToomSlice(k, r, 1, largest);\n b0 = b.getToomSlice(k, r, 2, largest);\n\n BigInteger v0, v1, v2, vm1, vinf, t1, t2, tm1, da1, db1;\n\n v0 = a0.multiply(b0);\n da1 = a2.add(a0);\n db1 = b2.add(b0);\n vm1 = da1.subtract(a1).multiply(db1.subtract(b1));\n da1 = da1.add(a1);\n db1 = db1.add(b1);\n v1 = da1.multiply(db1);\n v2 = da1.add(a2).shiftLeft(1).subtract(a0).multiply(\n db1.add(b2).shiftLeft(1).subtract(b0));\n vinf = a2.multiply(b2);\n\n // The algorithm requires two divisions by 2 and one by 3.\n // All divisions are known to be exact, that is, they do not produce\n // remainders, and all results are positive. The divisions by 2 are\n // implemented as right shifts which are relatively efficient, leaving\n // only an exact division by 3, which is done by a specialized\n // linear-time algorithm.\n t2 = v2.subtract(vm1).exactDivideBy3();\n tm1 = v1.subtract(vm1).shiftRight(1);\n t1 = v1.subtract(v0);\n t2 = t2.subtract(t1).shiftRight(1);\n t1 = t1.subtract(tm1).subtract(vinf);\n t2 = t2.subtract(vinf.shiftLeft(1));\n tm1 = tm1.subtract(t2);\n\n // Number of bits to shift left.\n int ss = k*32;\n\n BigInteger result = vinf.shiftLeft(ss).add(t2).shiftLeft(ss).add(t1).shiftLeft(ss).add(tm1).shiftLeft(ss).add(v0);\n\n if (a.signum != b.signum) {\n return result.negate();\n } else {\n return result;\n }\n }",
"private static long f(long m) {\n\t\tlong k = 1;\r\n\t\tfor (long i=1; i<=m; i++){\r\n\t\t\tk *= i;\r\n\t\t}\r\n\t\treturn k;\r\n\t}",
"protected Evaluable parseTerm() throws ParsingException {\n Evaluable factor = parseFactor();\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 factor2 = parseFactor();\n\n factor = new OperatorCallExpr(new Evaluable[] { factor, factor2 }, op);\n }\n\n return factor;\n }",
"public final JavaliParser.factor_return factor() throws RecognitionException {\n\t\tJavaliParser.factor_return retval = new JavaliParser.factor_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken op=null;\n\t\tParserRuleReturnScope noSignFactor94 =null;\n\t\tParserRuleReturnScope noSignFactor95 =null;\n\t\tParserRuleReturnScope noSignFactor96 =null;\n\n\t\tObject op_tree=null;\n\t\tRewriteRuleTokenStream stream_72=new RewriteRuleTokenStream(adaptor,\"token 72\");\n\t\tRewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,\"token 74\");\n\t\tRewriteRuleSubtreeStream stream_noSignFactor=new RewriteRuleSubtreeStream(adaptor,\"rule noSignFactor\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:487:2: (op= '+' noSignFactor -> ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_PLUS[$op, \\\"U_PLUS\\\"] ) noSignFactor ) |op= '-' noSignFactor -> ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_MINUS[$op, \\\"U_MINUS\\\"] ) noSignFactor ) | noSignFactor )\n\t\t\tint alt31=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 72:\n\t\t\t\t{\n\t\t\t\talt31=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 74:\n\t\t\t\t{\n\t\t\t\talt31=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase BooleanLiteral:\n\t\t\tcase DecimalNumber:\n\t\t\tcase FloatNumber:\n\t\t\tcase HexNumber:\n\t\t\tcase Identifier:\n\t\t\tcase 65:\n\t\t\tcase 69:\n\t\t\tcase 94:\n\t\t\tcase 98:\n\t\t\t\t{\n\t\t\t\talt31=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(\"\", 31, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt31) {\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:487:4: op= '+' noSignFactor\n\t\t\t\t\t{\n\t\t\t\t\top=(Token)match(input,72,FOLLOW_72_in_factor1963); \n\t\t\t\t\tstream_72.add(op);\n\n\t\t\t\t\tpushFollow(FOLLOW_noSignFactor_in_factor1965);\n\t\t\t\t\tnoSignFactor94=noSignFactor();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_noSignFactor.add(noSignFactor94.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: noSignFactor\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// 488:3: -> ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_PLUS[$op, \\\"U_PLUS\\\"] ) noSignFactor )\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:488:6: ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_PLUS[$op, \\\"U_PLUS\\\"] ) noSignFactor )\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(UnaryOp, op, \"UnaryOp\"), root_1);\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:488:33: ^( U_PLUS[$op, \\\"U_PLUS\\\"] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_2 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(U_PLUS, op, \"U_PLUS\"), root_2);\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_noSignFactor.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:489:4: op= '-' noSignFactor\n\t\t\t\t\t{\n\t\t\t\t\top=(Token)match(input,74,FOLLOW_74_in_factor1992); \n\t\t\t\t\tstream_74.add(op);\n\n\t\t\t\t\tpushFollow(FOLLOW_noSignFactor_in_factor1994);\n\t\t\t\t\tnoSignFactor95=noSignFactor();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tstream_noSignFactor.add(noSignFactor95.getTree());\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: noSignFactor\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// 490:3: -> ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_MINUS[$op, \\\"U_MINUS\\\"] ) noSignFactor )\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:490:6: ^( UnaryOp[$op, \\\"UnaryOp\\\"] ^( U_MINUS[$op, \\\"U_MINUS\\\"] ) noSignFactor )\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(UnaryOp, op, \"UnaryOp\"), root_1);\n\t\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:490:33: ^( U_MINUS[$op, \\\"U_MINUS\\\"] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\tObject root_2 = (Object)adaptor.nil();\n\t\t\t\t\t\troot_2 = (Object)adaptor.becomeRoot((Object)adaptor.create(U_MINUS, op, \"U_MINUS\"), root_2);\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_noSignFactor.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:491:4: noSignFactor\n\t\t\t\t\t{\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\n\n\t\t\t\t\tpushFollow(FOLLOW_noSignFactor_in_factor2019);\n\t\t\t\t\tnoSignFactor96=noSignFactor();\n\t\t\t\t\tstate._fsp--;\n\n\t\t\t\t\tadaptor.addChild(root_0, noSignFactor96.getTree());\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}",
"float getCostReduction();",
"public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}",
"public void calculeReduction(Produit p) {\r\n\t\tdouble res=0;\r\n\t\tres=p.getPrix()*taux;\r\n\t\tp.ajoutReduction(res);\r\n\t}",
"@Override\npublic void mul(int a, int b) {\n\t\n}",
"private void createMulAcc(Code32 code, int op, int cond, int Rd, int Ra, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (Rd << 16) | (Ra << 12) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}",
"BaseNumber multiply(BaseNumber operand);",
"public RegexNode ReduceRep()\n\t{\n\t\tRegexNode u;\n\t\tRegexNode child;\n\t\tint type;\n\t\tint min;\n\t\tint max;\n\n\t\tu = this;\n\t\ttype = Type();\n\t\tmin = _m;\n\t\tmax = _n;\n\n\t\tfor (;;)\n\t\t{\n\t\t\tif (u.ChildCount() == 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tchild = u.Child(0);\n\n\t\t\t// multiply reps of the same type only\n\t\t\tif (child.Type() != type)\n\t\t\t{\n\t\t\t\tint childType = child.Type();\n\n\t\t\t\tif (!(childType >= Oneloop && childType <= Setloop && type == Loop || childType >= Onelazy && childType <= Setlazy && type == Lazyloop))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// child can be too lumpy to blur, e.g., (a {100,105}) {3} or (a {2,})?\n\t\t\t// [but things like (a {2,})+ are not too lumpy...]\n\t\t\tif (u._m == 0 && child._m > 1 || child._n < child._m * 2)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tu = child;\n\t\t\tif (u._m > 0)\n\t\t\t{\n\t\t\t\tu._m = min = ((Integer.MAX_VALUE - 1) / u._m < min) ? Integer.MAX_VALUE : u._m * min;\n\t\t\t}\n\t\t\tif (u._n > 0)\n\t\t\t{\n\t\t\t\tu._n = max = ((Integer.MAX_VALUE - 1) / u._n < max) ? Integer.MAX_VALUE : u._n * max;\n\t\t\t}\n\t\t}\n\n\t\treturn min == Integer.MAX_VALUE ? new RegexNode(Nothing, _options) : u;\n\t}",
"public void reduce()\n\t{\n\t\tint divider = getGCD(myNumerator, myDenominator);\n\t\tmyNumerator /= divider;\n\t\tmyDenominator /= divider;\n\t}",
"@Override\n public int accion() {\n return this.alcance*2/3*3;\n }",
"public void reduce(Text prefix, Iterator<IntWritable> iter,\n OutputCollector<Text, IntWritable> output, Reporter reporter) throws IOException {\nint a000 = 0;\nint a001 = 0;\nint a002 = 0;\nint a003 = 0;\nint a004 = 0;\nint a005 = 0;\nint a006 = 0;\nint a007 = 0;\nint a008 = 0;\nint a009 = 0;\nint a010 = 0;\nint a011 = 0;\nint a012 = 0;\nint a013 = 0;\nint a014 = 0;\nint a015 = 0;\nint a016 = 0;\nint a017 = 0;\nint a018 = 0;\nint a019 = 0;\nint a020 = 0;\nint a021 = 0;\nint a022 = 0;\nint a023 = 0;\nint a024 = 0;\nint cur = 0;\n\nwhile (iter.hasNext()) {\ncur = iter.next().get();\na003 += a021;\na011 += a023;\na017 -= -2;\na003 += a009;\na018 += a016;\na015 -= a004;\na020 -= a018;\na007 = a015 - a024;\na006 = a017 - a023;\na006 -= a024;\na019 += a014;\na008 = a015 - a023;\na015 += a024;\na004 += a004;\na021 -= a018;\na008 = a024 - a010;\na011 = a020 + a019;\na023 = a004 - a018;\ncur = a024 - a015;\na007 += a014;\na002 = a014 + a000;\na010 = a010 - a013;\na022 = a010 - a023;\na016 -= a014;\na004 -= a024;\na004 -= a005;\na014 = a005 + a012;\na001 = a018 + a018;\nif (a014 != a017) {\na019 = a023 + a007;\na000 -= cur;\na011 = a016 + a024;\na003 = a000 + a008;\na001 -= a012;\na011 = a016 + a022;\na009 += a011;\na012 -= a002;\na007 += a012;\n} else {\na003 -= a002;\na011 = a022 + a012;\na022 = a004 - a018;\na001 += a022;\na018 -= a005;\na001 = a004 - a017;\na021 = a011 + a021;\na005 -= a010;\na011 += a002;\na016 = a016 - a018;\na006 = a000 - a006;\na019 -= a002;\na009 -= a003;\na016 -= a019;\na013 = a000 + a005;\na008 += a002;\na013 = a002 + a007;\na010 += a018;\na005 -= a022;\na015 = a021 + a018;\na000 = a019 - a001;\nif (a005 == a018) {\nif (a011 >= a018) {\na018 += a005;\na012 -= a005;\na007 = a007 - a004;\n} else {\na015 = a017 + a022;\na022 += a015;\na019 += a010;\na014 -= cur;\na023 += a008;\na015 = a013 - a014;\nif (a011 != -2) {\na013 = a021 - a019;\na016 -= a010;\na000 = a021 + a024;\na009 = a009 + a015;\na005 = a018 + a002;\na004 = a021 * 4;\na008 = a018 + a007;\na021 = a011 + a013;\na015 = a002 + a023;\na022 = a007 - a012;\na005 -= a021;\na022 = a015 - a015;\na007 = a007 + a020;\na001 = a013 - a002;\na015 += a011;\na011 -= a002;\na010 = a015 * -2;\na020 -= a011;\na023 -= a013;\na013 = a004 - a023;\na023 = a023 - a017;\na016 = a008 + a014;\na015 -= cur;\na023 -= a022;\na005 -= a011;\na002 = a009 + a008;\na023 = a015 * 4;\na014 = 0 - a010;\na012 = a016 - a024;\na004 += a000;\na022 = a010 - a022;\na013 += a015;\na016 = a020 - a023;\nif (a012 < -4) {\na019 -= a019;\na015 -= a005;\na023 = a007 - a018;\na013 = a015 - a017;\na021 -= a013;\na005 = a004 - a020;\na004 = 0 - a022;\na021 -= a013;\na004 += a004;\na012 = a022 + a022;\n} else {\na018 = a013 + a014;\na004 += a017;\na007 = a021 + a009;\na009 -= a019;\na024 -= a000;\na001 = a001 - a021;\na001 = a011 + a001;\na005 = a003 + a006;\na012 -= a000;\na016 = a004 - a019;\na010 = a007 - a013;\na011 += cur;\na020 -= a021;\na024 = a015 - cur;\na000 = a012 - a015;\na011 -= a015;\na022 = a007 - a019;\na004 -= a013;\na016 = a015 - a016;\na022 = a023 + a006;\n}\na019 -= a000;\na000 = a012 - a019;\na005 = a014 + a004;\na022 -= a021;\na006 = a009 + a011;\na001 = a007 + a006;\na013 = a009 - a021;\na006 = a004 - a000;\na011 += a020;\na012 -= cur;\na010 -= a011;\na000 = a009 + cur;\na013 += a002;\na019 -= a013;\na021 -= a011;\na005 = 2 + a009;\na023 = a007 - a016;\na009 -= a024;\na024 -= a019;\n} else {\na010 -= cur;\na018 -= a001;\na007 -= a022;\na022 += a005;\na022 = a006 + a020;\na013 = cur - a001;\n}\na003 = a013 + a010;\na023 -= a010;\na011 = a002 - a015;\na017 = a010 + a008;\ncur = a020 - a018;\na011 += a009;\na018 = a012 + a017;\na000 += a023;\na012 = a001 - a007;\na009 += a005;\na018 += a006;\na020 = a016 - a016;\na007 = a007 + a002;\na005 = a021 - a018;\na023 = a006 - a002;\na006 = cur - a016;\na007 = a007 + a013;\ncur += a021;\na014 += -3;\na013 -= a007;\na016 += a012;\ncur += a005;\na007 += a018;\na013 = a006 - a022;\na008 -= a008;\na000 = a006 - a011;\ncur += a023;\na002 = a005 - a024;\na022 -= a019;\na016 = a007 - a002;\na002 = a012 + a020;\n}\na003 += a004;\na005 = a022 - a000;\na004 = a003 - a021;\na011 -= a009;\na000 -= a024;\na019 += a012;\na024 = a021 + a020;\na016 -= a005;\na024 += a006;\na006 = a005 - a008;\na003 = a021 + a000;\na012 -= a012;\na012 += a003;\na002 += a013;\na020 = 0 + a007;\na013 -= a006;\na022 = a020 - a010;\n} else {\na002 -= a002;\na017 = a000 + a018;\na012 += cur;\na014 -= a006;\na024 += a000;\na008 = a023 - a009;\na009 += a012;\na013 += a007;\na001 += a011;\na020 += 1;\na011 = a006 + a023;\na017 += a024;\na002 = a014 + a014;\na016 = a012 - a009;\n}\na018 -= a010;\na023 += a020;\na012 = a013 - a012;\na015 -= a021;\na004 = a001 - a016;\na001 += a004;\na023 -= a021;\na014 += a002;\na001 = a007 - a006;\na007 = a022 - -5;\na012 -= a006;\na022 += a010;\na007 = a001 + -2;\na016 = a015 + a005;\na021 += a004;\na006 -= a023;\na017 += a013;\na012 -= a010;\na018 -= 0;\na023 = -3 - a006;\na012 -= a014;\n}\na005 += a020;\na016 = a012 - a008;\na016 = a012 + a002;\na019 = a007 + a017;\na009 = a009 + a009;\na001 += 1;\na020 = a021 + a024;\na001 = a020 - a011;\na015 = a011 - a013;\na003 += a021;\na004 -= a009;\na014 -= a022;\n}\noutput.collect(prefix, new IntWritable(a015));\n}",
"public static void main(String[] args) {\nint N,i,fac=1;\nScanner fn=new Scanner(System.in);\nN =fn.nextInt();\nif(N<=20) {\n\tfor(i=N;i>=1;i--) {\n\t\tfac=fac*i;\n\t}\n}\nSystem.out.println(fac);\n\t}",
"void increaseStarsBy(final int amount);",
"private static void calc1(int x) {\n\t\tx+=1;\n\t}",
"public Node restTerm(Node n_parent, Node n_factor){\r\n String multiplicative=\"\";\r\n if(token.get(lookAheadPossition).contains(\"MULTIPLICATIVE(\")){\r\n System.out.println(\":: restTerm:if:\"+n_parent.getData());\r\n multiplicative = token.get(lookAheadPossition).substring(15, token.get(lookAheadPossition).length() - 1);\r\n Node n_multiplicative = new Node (multiplicative+\":int\");\r\n n_multiplicative.setNodeChild(n_factor);\r\n //if (!(n_parent.getData().equals(\"makeown\"))) {n_parent.setNodeChild(n_multiplicative); }\r\n this.CheckError(token.get(lookAheadPossition));\r\n\r\n\r\n Node n_return = this.term(n_multiplicative);\r\n System.out.println(\":: restTerm:n_return:\"+n_return.getData());\r\n n_multiplicative.setNodeChild(n_return);\r\n return ( n_multiplicative );\r\n }else {\r\n //n_parent.setNodeChild(n_factor);\r\n //if (!(n_parent.getData().equals(\"makeown\"))) {n_parent.setNodeChild(n_factor); }\r\n return (n_factor);\r\n }\r\n\r\n }",
"private float caculate(Operation opt, int t1, float f2) {\n\t\tfloat res;\n\t\tfloat tt1 = (float) t1;\n\t\tswitch (opt) {\n\t\tcase ADD:\n\t\t\tres = tt1 + f2;\n\t\t\tbreak;\n\t\tcase SUB:\n\t\t\tres = tt1 - f2;\n\t\t\tbreak;\n\t\tcase MUL:\n\t\t\tres = tt1 * f2;\n\t\t\tbreak;\n\t\tcase DIV:\n\t\t\tres = tt1 / f2;\n\t\t\tbreak;\n\t\tcase NULL:\n\t\t\terr.error(\"No operation in caculating.\");\n\t\t\tres = 0;\n\t\tdefault:\n\t\t\tres = 0;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn res;\n\n\t\t/*\n\t\t * lex.floatHolder.add(res); return lex.floatHolder.lastIndexOf(res);\n\t\t */\n\t}",
"@Test\n public void testFactor_intArr_intArr() {\n System.out.println(\"factor\");\n int[] number = new int[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n int[] weighting = new int[]{2, 1, 2, 1, 2, 1, 2, 1, 2};\n AbstractMethod instance = new AbstractMethodImpl();\n int[] expResult = new int[]{0, 1, 4, 3, 8, 5, 12, 7, 16, 9};\n int[] result = instance.factor(number, weighting);\n assertArrayEquals(expResult, result);\n\n }",
"private double noBranch() {\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('a');\n\t}"
] | [
"0.585664",
"0.571271",
"0.5646844",
"0.5487711",
"0.5344674",
"0.53342235",
"0.52655905",
"0.52154475",
"0.5195257",
"0.5173476",
"0.5145528",
"0.5144493",
"0.51122653",
"0.50975394",
"0.50966907",
"0.5093709",
"0.5087448",
"0.5079437",
"0.5075721",
"0.50714093",
"0.5054407",
"0.50350225",
"0.50224066",
"0.50199914",
"0.50199914",
"0.50033736",
"0.4996047",
"0.49913567",
"0.49838415",
"0.49726787",
"0.4962936",
"0.4958712",
"0.49373308",
"0.49352217",
"0.49352217",
"0.49106836",
"0.49073356",
"0.49022698",
"0.48927334",
"0.48881134",
"0.48864987",
"0.4861088",
"0.48592103",
"0.48469177",
"0.48396435",
"0.4839623",
"0.4833312",
"0.4822622",
"0.4812246",
"0.48034257",
"0.47769675",
"0.4763051",
"0.47417337",
"0.4737569",
"0.47363505",
"0.47252643",
"0.4722649",
"0.4720964",
"0.4715998",
"0.47011992",
"0.46883616",
"0.46859726",
"0.46776727",
"0.46732557",
"0.46716946",
"0.4667309",
"0.46482167",
"0.46425694",
"0.46282363",
"0.46279937",
"0.46233627",
"0.46191666",
"0.46170804",
"0.46146566",
"0.4612791",
"0.46101686",
"0.46036986",
"0.45980358",
"0.45966733",
"0.4594557",
"0.4590787",
"0.45904765",
"0.45878568",
"0.45806417",
"0.45806247",
"0.4578028",
"0.45778334",
"0.45741543",
"0.45736444",
"0.45708808",
"0.45708704",
"0.45705172",
"0.4566773",
"0.45616347",
"0.45588446",
"0.45586574",
"0.45568177",
"0.45566896",
"0.4551402",
"0.455081"
] | 0.5882434 | 0 |
postops = postop = (postop postops)? | private boolean postops() {
return OPT(GO() && postop() && postops());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Expr unaryPost(Position pos, X10Unary_c.Operator op, Expr e) throws SemanticException {\n Type ret = e.type();\n Expr one = getLiteral(pos, ret, 1);\n Assign.Operator asgn = (op == X10Unary_c.POST_INC) ? Assign.ADD_ASSIGN : Assign.SUB_ASSIGN;\n X10Binary_c.Operator bin = (op == X10Unary_c.POST_INC) ? X10Binary_c.SUB : X10Binary_c.ADD;\n Expr incr = assign(pos, e, asgn, one);\n incr = visitAssign((Assign) incr);\n return visitBinary((X10Binary_c) xnf.Binary(pos, incr, bin, one).type(ret));\n }",
"private void postOrder(OpTree t, ArrayList<String> rlist)\n\t{\n\t\tif (t == null) return;\n\t\tpostOrder(t.left, rlist);\n\t\tpostOrder(t.right, rlist);\n\t\trlist.add(rlist.size(),(t.op != null? t.op : t.dval.toString()));\n\t}",
"@Override void apply(Env env) {\n Frame fr0 = null, fr1 = null;\n double d0=0, d1=0;\n String s0=null, s1=null;\n\n // Must pop ONLY twice off the stack\n int left_type = env.peekType();\n Object left = env.peek();\n int right_type = env.peekTypeAt(-1);\n Object right = env.peekAt(-1);\n\n // Cast the LHS of the op\n switch(left_type) {\n case Env.NUM: d0 = ((ValNum)left)._d; break;\n case Env.ARY: fr0 = ((ValFrame)left)._fr; break;\n case Env.STR: s0 = ((ValStr)left)._s; break;\n default: throw H2O.unimpl(\"Got unusable type: \" + left_type + \" in binary operator \" + opStr());\n }\n\n // Cast the RHS of the op\n switch(right_type) {\n case Env.NUM: d1 = ((ValNum)right)._d; break;\n case Env.ARY: fr1 = ((ValFrame)right)._fr; break;\n case Env.STR: s1 = ((ValStr)right)._s; break;\n default: throw H2O.unimpl(\"Got unusable type: \" + right_type + \" in binary operator \" + opStr());\n }\n\n // If both are doubles on the stack\n if( (fr0==null && fr1==null) && (s0==null && s1==null) ) { env.poppush(2, new ValNum(op(d0, d1))); return; }\n\n // One or both of the items on top of stack are Strings and neither are frames\n if( fr0==null && fr1==null) {\n env.pop(); env.pop();\n // s0 == null -> op(d0, s1)\n if (s0 == null) {\n // cast result of op if doing comparison, else combine the Strings if defined for op\n if (opStr().equals(\"==\") || opStr().equals(\"!=\")) env.push(new ValNum(Double.valueOf(op(d0,s1))));\n else env.push(new ValStr(op(d0,s1)));\n }\n // s1 == null -> op(s0, d1)\n else if (s1 == null) {\n // cast result of op if doing comparison, else combine the Strings if defined for op\n if (opStr().equals(\"==\") || opStr().equals(\"!=\")) env.push(new ValNum(Double.valueOf(op(s0,d1))));\n else env.push(new ValStr(op(s0,d1)));\n // s0 != null, s1 != null\n } else env.push(new ValStr(op(s0,s1)));\n return;\n }\n\n if( fr0!=null ) {\n if( fr0.numCols()==1 && fr0.numRows()==1 ) {\n Vec v = fr0.anyVec();\n if( v.isEnum() ) s0 = v.domain()[(int)v.at(0)];\n else d0 = v.at(0);\n fr0=null;\n }\n }\n\n if( fr1!=null ) {\n if( fr1.numCols()==1 && fr1.numRows()==1 ) {\n Vec v = fr1.anyVec();\n if( v.isEnum() ) s1 = v.domain()[(int)v.at(0)];\n else d1 = v.at(0);\n fr1=null;\n }\n }\n\n // both were 1x1 frames on the stack...\n if( fr0==null && fr1==null ) {\n if( s0==null && s1==null ) env.poppush(2, new ValNum(op(d0, d1)));\n if( s0!=null && s1==null ) env.poppush(2, new ValNum(Double.valueOf(op(s0, d1))));\n if( s0==null && s1!=null ) env.poppush(2, new ValNum(Double.valueOf(op(d0, s1))));\n if( s0!=null && s1!=null ) env.poppush(2, new ValNum(Double.valueOf(op(s0, s1))));\n return;\n }\n\n final boolean lf = fr0 != null;\n final boolean rf = fr1 != null;\n final double df0 = d0, df1 = d1;\n final String sf0 = s0, sf1 = s1;\n Frame fr; // Do-All frame\n int ncols = 0; // Result column count\n if( fr0 !=null ) { // Left?\n ncols = fr0.numCols();\n if( fr1 != null ) {\n if( fr0.numCols() != fr1.numCols() ||\n fr0.numRows() != fr1.numRows() )\n throw new IllegalArgumentException(\"Arrays must be same size: LHS FRAME NUM ROWS/COLS: \"+fr0.numRows()+\"/\"+fr0.numCols() +\" vs RHS FRAME NUM ROWS/COLS: \"+fr1.numRows()+\"/\"+fr1.numCols());\n fr = new Frame(fr0).add(fr1);\n } else {\n fr = new Frame(fr0);\n }\n } else {\n ncols = fr1.numCols();\n fr = new Frame(fr1);\n }\n final ASTBinOp bin = this; // Final 'this' so can use in closure\n\n // Run an arbitrary binary op on one or two frames & scalars\n Frame fr2 = new MRTask() {\n @Override public void map( Chunk chks[], NewChunk nchks[] ) {\n for( int i=0; i<nchks.length; i++ ) {\n NewChunk n =nchks[i];\n int rlen = chks[0]._len;\n Chunk c0 = chks[i];\n if( (!c0.vec().isEnum() &&\n !(lf && rf && chks[i+nchks.length].vec().isEnum())) ||\n bin instanceof ASTEQ ||\n bin instanceof ASTNE ) {\n\n // Loop over rows\n for( int ro=0; ro<rlen; ro++ ) {\n double lv=0; double rv=0; String l=null; String r=null;\n\n // Initialize the lhs value\n if (lf) {\n if(chks[i].vec().isUUID() || (chks[i].isNA(ro) && !bin.opStr().equals(\"|\"))) { n.addNum(Double.NaN); continue; }\n if (chks[i].vec().isEnum()) l = chks[i].vec().domain()[(int)chks[i].atd(ro)];\n else lv = chks[i].atd(ro);\n } else if (sf0 == null) {\n if (Double.isNaN(df0) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n lv = df0; l = null;\n } else {\n l = sf0;\n }\n\n // Initialize the rhs value\n if (rf) {\n if(chks[i+(lf ? nchks.length:0)].vec().isUUID() || chks[i].isNA(ro) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n if (chks[i].vec().isEnum()) r = chks[i].vec().domain()[(int)chks[i].atd(ro)];\n else rv = chks[i+(lf ? nchks.length:0)].atd(ro);\n } else if (sf1 == null) {\n if (Double.isNaN(df1) && !bin.opStr().equals(\"|\")) { n.addNum(Double.NaN); continue; }\n rv = df1; r= null;\n } else {\n r = sf1;\n }\n\n // Append the value to the chunk after applying op(lhs,rhs)\n if (l == null && r == null)\n n.addNum(bin.op(lv, rv));\n else if (l == null) n.addNum(Double.valueOf(bin.op(lv,r)));\n else if (r == null) n.addNum(Double.valueOf(bin.op(l,rv)));\n else n.addNum(Double.valueOf(bin.op(l,r)));\n }\n } else {\n for( int r=0; r<rlen; r++ ) n.addNA();\n }\n }\n }\n }.doAll(ncols,fr).outputFrame(null, (lf ? fr0 : fr1)._names,null);\n env.poppush(2, new ValFrame(fr2));\n }",
"public void postOrderTraversal(){\n System.out.println(\"postOrderTraversal\");\n //TODO: incomplete\n\n }",
"Nop createNop();",
"@Override\n\tpublic void postorder() {\n\n\t}",
"protected void operation(String op) {\n \tint value;\n \tif (stack.empty()) {\n \t\tenter();\n \t}\n \telse {\n \t\tint second = stack.pop();\n \t // handles when only one value in stack\n \t\tif (stack.empty()) {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tstack.push(second);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tcurrent = second *-1;\n \t\t\t\tstack.push(current);\n \t\t\t\tshow(stack.peek());\n \t\t\t\tcurrent = 0;\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t\telse {\n \t\t\t\tstack.push(0);\n \t\t\t\tshow(stack.peek());\n \t\t\t}\n \t\t}\n \t // handles the other cases\n \t\telse {\n \t\t\tif (op.equals(\"+\")) {\n \t\t\t\tvalue = second + stack.pop();\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"-\")) {\n \t\t\t\tvalue = stack.pop() - second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse if (op.equals(\"*\")) {\n \t\t\t\tvalue = stack.pop() * second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tvalue = stack.pop() / second;\n \t\t\t\tdisplayOperatedValue(value);\n \t\t\t}\n \t\t}\n \t}\n }",
"public void visitPostorder(Visitor<T> visitor) {\n if (left != null) left.visitPostorder(visitor);\n if (right != null) right.visitPostorder(visitor);\n visitor.visit(root.value);\n }",
"assign_op getAssign_op();",
"public static void main(String[] args) {\n TreeNode one = new TreeNode(1);\n TreeNode three = new TreeNode(3);\n three.right = one;\n TreeNode two = new TreeNode(2);\n two.right = three;\n new BinaryTreePostorderTraversal_145().postorderTraversal(two);\n }",
"public static void main(String[] args) {\n\t\tPostFix aux,courant, racine;\r\n\t\t\r\n\t\t sc = new Scanner(System.in);\r\n\t\t System.out.println(\"Entrer l'expression postfixée--->\");\r\n\t\t ArrayList<String> list ; \r\n\t\t String PostEntre = sc.nextLine();\r\n\t\t \r\n\t\t list = new ArrayList<>(Arrays.asList(PostEntre.split(\" \")));\r\n\t\t \r\n\t\t ArrayDeque<PostFix> pil = new ArrayDeque<PostFix>();\r\n\t\t for (String s : list){\r\n\t\t\t courant = new PostFix(s);\r\n\t\t\t if (isOperator(s)){\r\n\t\t\t\t aux = pil.pop();\r\n\t\t\t\t courant.setfilsgauche(pil.pop());\r\n\t\t\t\t courant.setfilsdroit(aux);\r\n\t\t\t }\r\n\t\t\t pil.push(courant);\r\n\t\t\t \r\n\t\t }\r\n\t\t racine = pil.pop();\r\n\t\t System.out.println(\"L'arbre est : \" );\r\n\t\t System.out.println(racine + \"\\n\" );\r\n\t\t // racine.Afficher(racine);\r\n\t\t \r\n\t\t //----------------------------to prefix------------------------\r\n\t\t String s1,s2,sor;\r\n\t\t \r\n\t\t ArrayDeque<String> operst = new ArrayDeque<String>();\r\n\t\t for (String n : list){\r\n\t\t\t if (!isOperator(n))\r\n\t\t\t\t operst.push(n);\r\n\t\t\t else{\r\n\t\t\t\ts2 = operst.pop();\r\n\t\t\t \ts1 = operst.pop();\r\n\t\t\t \tsor = n +\" \"+ s1 +\" \"+ s2;\r\n\t\t\t operst.push(sor);\r\n\t\t\t }\r\n\t\t\t \t\t\t \r\n\t\t }\r\n\t\t System.out.println(\"L'expression prefixee donne: \");\r\n\t\t System.out.println(operst.pop()+\"\\n\");\r\n\t\t //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\t\t \r\n\t\t \r\n\t\t //-----------------------------evaluation-----------------------\r\n\t\t Double oper1, oper2,result;\r\n\t\t ArrayDeque<Double> abc = new ArrayDeque<Double>();\r\n\t\t for (String n : list){\r\n\t\t\t if (!isOperator(n))\r\n\t\t\t\t abc.push(Double.valueOf(n));\t\t\t\r\n\t\t\t else{\r\n\t\t\t\t oper2 = abc.pop();\t\t\t \t\r\n\t\t\t\t oper1 = abc.pop();\r\n\t\t\t \tresult = operate(oper1,oper2,n);\t\t\t \r\n\t\t\t \t\tabc.push(result);\r\n\t\t\t }\r\n\t\t\t \t\t\t \r\n\t\t }\r\n\t\t System.out.println(\"l'evaluation donne: \");\r\n\t\t System.out.println(abc.pop());\r\n\t\t //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n\r\n\t}",
"private <E> void postOrder(Node root,Action<Integer,E> action) {\n\t\tif(root==null)\n\t\t\treturn;\n\t\t\n\t\t\n\t\tpostOrder(root.left,action);\n\t\t\n\t\tpostOrder(root.right,action);\n\t\t//System.out.println(root.value,action);\n\t\taction.execute(root.value);\n\t\t\n\t}",
"public boolean rightDistributive( Operator op){\n\t return false;\n }",
"S op(final S a, final S b);",
"private CustomQueue<String> evaluatePostFix(CustomQueue<String>postfix){\r\n CustomStack<String> numberStack = new CustomStack();\r\n CustomQueue<String> result = new CustomQueue();\r\n \r\n while (postfix.isEmpty() == false){\r\n String value = postfix.remove();\r\n if (isOperator(value)){\r\n //First popped value should be on the right hand side of the operator\r\n double val2 = Double.parseDouble(numberStack.pop());\r\n //Second popped value should be on the left hand side of the operator\r\n double val1 = Double.parseDouble(numberStack.pop());\r\n String operation_result = calculate(val1, val2, value);\r\n numberStack.push(operation_result);\r\n }\r\n else{\r\n //It should be a number\r\n numberStack.push(value);\r\n }\r\n }\r\n \r\n if (numberStack.empty())\r\n result.add(\"0\");\r\n else\r\n result.add(numberStack.pop());\r\n \r\n return result;\r\n }",
"public PrefixExpression.Operator getReverse(PostfixExpression.Operator op) {\n if (op == PostfixExpression.Operator.DECREMENT)\n return PrefixExpression.Operator.INCREMENT;\n else if (op == PostfixExpression.Operator.INCREMENT)\n return PrefixExpression.Operator.DECREMENT;\n else\n return null;\n }",
"void setPendingBinaryOperation(DoubleBinaryOperator op);",
"public interface BasicOperator {\n public double compute(double... args);\n}",
"@Override\n\tpublic void VisitUnaryNode(UnaryOperatorNode Node) {\n\n\t}",
"public void infixToPostFix() {\n for (String str : infixList) {\n if (str.equals(\"(\")) {\n leftParenthesis(str);\n } else if (str.equals(\")\")) {\n rightParenthesis();\n } else if (OperatorOperand.isOperator(str)) {\n operator(str);\n } else {\n operand(str);\n }\n }\n clearTheStack();\n }",
"public void visitPostorder(Visitor<T> visitor) { if (root != null) root.visitPostorder(visitor); }",
"void decrementsGops();",
"@Override\r\n public void MIPSme() {\r\n MIPSMove(this.dst, this.op1);\r\n }",
"private void topEval(Stack<Operator> pOperatorStack, Stack<Operand> pOperandStack) {\n Operand right = pOperandStack.pop();\n Operator operator = pOperatorStack.pop();\n if (operator instanceof UnaryOperator) {\n pOperandStack.push(((UnaryOperator)operator).evaluate(right));\n } else {\n Operand left = pOperandStack.pop();\n pOperandStack.push(((BinaryOperator)operator).evaluate(left, right));\n }\n }",
"@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 }",
"public Polynomial postfixEval(List<Token> postfixtokenList){\n ArrayDeque<Token> stack = new ArrayDeque<Token>(); \n\n Polynomial result = new Polynomial(); \n for (Token token : postfixtokenList){\n if (token instanceof Polynomial)\n stack.push(token); \n else if (token instanceof Operator){\n Polynomial op2 = (Polynomial) stack.pop(); \n Polynomial op1 = (Polynomial) stack.pop(); \n result = ((Operator) token).operate(op1, op2);\n if (result == null) //for division by 0\n return null;\n stack.push(result); \n }\n }\n result = (Polynomial) stack.pop(); \n if (storingVar != ' '){\n memory.put(storingVar, result); \n storingVar = ' ';\n }\n return result; \n }",
"public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}",
"Operations operations();",
"public Expression(Expression exp1, Operator op, Expression exp2) {\r\n\t\t// Remember, this is in postfix notation.\r\n\t\telements.addAll(exp1.elements);\r\n\t\telements.addAll(exp2.elements);\r\n\t\telements.add(op);\r\n\t}",
"@Keep\n void setDops(double gdop, double pdop, double hdop, double vdop) {\n mDops[0] = gdop;\n mDops[1] = pdop;\n mDops[2] = hdop;\n mDops[3] = vdop;\n }",
"@Override\n\tpublic void VisitBinaryNode(BinaryOperatorNode Node) {\n\n\t}",
"public Assignment.Operator getReverse(Assignment.Operator op) {\n if (op == Assignment.Operator.PLUS_ASSIGN)\n return Assignment.Operator.MINUS_ASSIGN;\n else if (op == Assignment.Operator.MINUS_ASSIGN)\n return Assignment.Operator.PLUS_ASSIGN;\n else if (op == Assignment.Operator.TIMES_ASSIGN)\n return Assignment.Operator.DIVIDE_ASSIGN;\n else if (op == Assignment.Operator.DIVIDE_ASSIGN)\n return Assignment.Operator.TIMES_ASSIGN;\n else\n return op;\n }",
"public String operator( String op);",
"public static State postToNFA(List<Token> tokens) {\n if (tokens.isEmpty()) {\n return State.MATCHSTATE;\n }\n\n Deque<Frag> stack = new ArrayDeque<>();\n\n // fprintf(stderr, \"postfix: %s\\n\", postfix);\n for (Token t : tokens) {\n State s;\n Frag e, e1, e2;\n switch (t.type) {\n case CHAR:\n s = State.makeChar((char) t.data);\n stack.push(new Frag(s, s.out));\n break;\n case DOT:\n s = State.makeDot();\n stack.push(new Frag(s, s.out));\n break;\n case CONCAT: /* catenate */\n e2 = stack.pop();\n e1 = stack.pop();\n patch(e1.out, e2.start);\n stack.push(new Frag(e1.start, e2.out));\n break;\n case ALT: /* alternate */\n e2 = stack.pop();\n e1 = stack.pop();\n s = State.makeSplit(e1.start, e2.start);\n stack.push(new Frag(s, append(e1.out, e2.out)));\n break;\n case QUESTION: /* zero or one */\n e = stack.pop();\n s = State.makeSplit(e.start, null);\n stack.push(new Frag(s, append(e.out, Frag.singleton(s.out1))));\n break;\n case STAR: /* zero or more */\n e = stack.pop();\n s = State.makeSplit(e.start, null);\n patch(e.out, s);\n stack.push(new Frag(s, s.out1));\n break;\n case PLUS: /* one or more */\n e = stack.pop();\n s = State.makeSplit(e.start, null);\n patch(e.out, s);\n stack.push(new Frag(e.start, s.out1));\n break;\n default:\n throw new IllegalThreadStateException(\"unhandled token:\" + t);\n }\n }\n\n checkState(stack.size() == 1, \"fragment stack.size() != 1, was %s\", stack.size());\n Frag e = stack.pop();\n patch(e.out, State.MATCHSTATE);\n\n return e.start;\n }",
"public PostfixExpression.Operator getReverse(PrefixExpression.Operator op) {\n if (op == PrefixExpression.Operator.DECREMENT)\n return PostfixExpression.Operator.INCREMENT;\n else if (op == PrefixExpression.Operator.INCREMENT)\n return PostfixExpression.Operator.DECREMENT;\n else\n return null;\n }",
"Unary operator(Operator o);",
"public void setOp(Operator op) {\n this.op = op;\n }",
"public static UnaryExpression postDecrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PostDecrementAssign, expression, expression.getType());\n }",
"protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }",
"private void postOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.postOrderTraversal(sb);\n }\n\n if (right != null) {\n right.postOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n }",
"public void visit(Operator operator);",
"public boolean leftDistributive( Operator op){\n\t return false;\n }",
"public void setOp(int op) {\n\t\tthis.op = op;\n\t}",
"public double pop()\n {\n if (empty()) {\n \tthrow new IllegalArgumentException(\"too many operators!\");\n \t\n }\n else\n {\n return s[top--];\n }\n }",
"@Override\n public void popOperands(Stack<ExpNode> stack) {\n this.expr = stack.pop();\n }",
"public static void main(String[] args) {\n MathOp add=new MathOp() {\n \t \n public int operation(int x, int y)\n {\n \t return x+y;\n }\n\t };\n\t System.out.println(add.operation(1, 2));\n \n\t MathOp sub=new MathOp() {\n \t \n\t public int operation(int x, int y)\n\t {\n\t \t return x-y;\n\t }\n\t\t };\n\t\t System.out.println(sub.operation(1, 2));\n\t \n\t\t MathOp mul=new MathOp() {\n\t \t \n\t\t public int operation(int x, int y)\n\t\t {\n\t\t \t return x*y;\n\t\t }\n\t\t\t };\n\t\t\t System.out.println(mul.operation(1, 2));\n\t\t \n\t\t\t MathOp div=new MathOp() {\n\t\t \t \n\t\t\t public int operation(int x, int y)\n\t\t\t { \n\t\t\t \t return x/y;\n\t\t\t }\n\t\t\t\t };\n\t\t\t\t System.out.println(div.operation(1, 2));\n\t\t\t \n}",
"private Expr unaryPre(Position pos, X10Unary_c.Operator op, Expr e) throws SemanticException {\n Type ret = e.type();\n Expr one = getLiteral(pos, ret, 1);\n Assign.Operator asgn = (op == X10Unary_c.PRE_INC) ? Assign.ADD_ASSIGN : Assign.SUB_ASSIGN;\n Expr a = assign(pos, e, asgn, one);\n a = visitAssign((Assign) a);\n return a;\n }",
"public MUnaryPostOperator(String name, int index, ArrayList<String>scan) {\n super( isUnaryPostOperator(name)?name:\"\");\n\n if(this.getName().equals(\"\")){\n throw new IndexOutOfBoundsException(\"Invalid Name For Unary Post-MNumber MOperator.\" );\n }//end if\n else{\n this.index=(index>=0&&scan.get(index).equals(name))?index:-1;\n this.precedence=MOperator.getPrecedence(name);\n }//end else\n\n if(this.index==-1){\n throw new IndexOutOfBoundsException(\"Invalid Index\" );\n }\n \n }",
"public static UnaryExpression postIncrementAssign(Expression expression) {\n return makeUnary(ExpressionType.PostIncrementAssign, expression, expression.getType());\n }",
"public void setOp(String op) {\n this.op = op;\n }",
"public static UnaryExpression postDecrementAssign(Expression expression, Method method) {\n return makeUnary(ExpressionType.PostDecrementAssign, expression, expression.getType(),method);\n }",
"public static HashSet<Transition> makeTransitions(Set<Operation> ops, State tail){\n HashSet<Transition> set = new HashSet<Transition>();\n// 调用enabledOperations方法\n Set<Operation> op = enabledOperations(ops , tail);\n// 遍历op\n for(Operation o : op){\n State s = o.execute(tail);\n Transition t = new Transition(o.name , tail , s , 1);\n set.add(t);\n }\n return set ;\n\n\n\n // throw new NotImplementedException();\n }",
"@Override\n\tprotected void setOriginalOperators(Set<Operator> ops)\n\t{\n\t\tMap<String, Operator> original = new HashMap<String, Operator>(\n\t\t\t\t(int) (operators.size() * 0.75) + 1);\n\t\tint index = 0; // Each operator should get a unique name. Append a index\n\t\t\t\t\t\t// if it has a duplicate name.\n\t\tfor (Operator op : operators)\n\t\t{\n\t\t\tif (original.containsKey(op.getName()))\n\t\t\t{\n\t\t\t\toriginal.put(op.getName() + index, op.copy());\n\t\t\t\top.setName(op.getName() + index);\n\t\t\t\t++index;\n\t\t\t} else\n\t\t\t{\n\t\t\t\toriginal.put(op.getName(), op.copy());\n\t\t\t}\n\t\t}\n\t\toriginalOperators = Collections.unmodifiableMap(original);\n\t}",
"private boolean postFixEvalution(char operator) throws ArithmeticException{\n //Pre: Validar que el stack no este vacio y que los operandos sean numeros.\n //Post: Realizar la operacion indicada\n try{\n if(!stack.empty()){\n //Se obtienen los dos operandos mas recientes del stack.\n Integer op2 = stack.pop();\n Integer op1 = stack.pop();\n\n //Se determina la operacion por hacer.\n if(op1 != null && op2 != null){\n switch (operator){\n case '+':\n stack.push(op1 + op2);\n break;\n case '-':\n stack.push(op1 - op2);\n break;\n case '*':\n stack.push(op1 * op2);\n break;\n case '/':\n stack.push(op1 / op2);\n break;\n }\n return true;\n }\n else\n return false;\n }\n else{\n return false;\n }\n }\n catch (ArithmeticException e){\n String ex = \"Error: Division por 0\";\n throw new ArithmeticException(ex);\n }\n }",
"public Operation zCombinedAnd(Operation op)\r\n {\r\n if (op.equals(this))\r\n {\r\n return this;\r\n }\r\n return null;\r\n }",
"private String reduceOperation(String op1, String opd, String op2, StringBuffer expr) {\r\n if (opd == null) {\r\n if (op1 == null || op2 == null) {\r\n return null;\r\n } else if (\"AND\".equals(op1) && \"AND\".equals(op2)) {\r\n return \"AND\";\r\n } else {\r\n return \"OR\";\r\n }\r\n } else {\r\n if (op1 != null) {\r\n expr.append(op1).append(\" \");\r\n }\r\n expr.append(opd).append(\" \");\r\n return op2;\r\n }\r\n }",
"public void postOrderTraversal(Node<T> aRoot, List<T> postOrder)\n\t{\n\t\tif (aRoot != null)\n\t\t{\n\t\t\tpostOrderTraversal(aRoot.left, postOrder);\n\t\t\tpostOrderTraversal(aRoot.right, postOrder);\n\t\t\tpostOrder.add(aRoot.X);\n\t\t}\n\t}",
"public Operator operator() {\n\treturn this.op;\n }",
"public void postorder()\r\n {\r\n postorder(root);\r\n }",
"@Override\n\tprotected void executeAux(CPU cpu) throws InstructionExecutionException {\n\t\t if(cpu.getNumElem() > 0){\n\t\t\t cpu.push(-cpu.pop());\n\t\t }\n\t\t else \t\n\t\t\t\tthrow new InstructionExecutionException\n\t\t\t\t\t(\"Error ejecutando \" + this.toString() + \": faltan operandos en la pila (hay \" + cpu.getNumElem() + \")\");\n\t\t\t\n\t}",
"@Test\n public void unaryTest() {\n UnaryOperator<String> postfix = (a) -> a + \"postfix\";\n UnaryOperator<Integer> increment = (a) -> a + 1;\n\n Assert.assertEquals(\"valuepostfix\", postfix.apply(\"value\"));\n Assert.assertEquals(new Integer(2), increment.apply(1));\n }",
"public boolean associates(Operator op){\n\t return false;\n }",
"private void processOperator(String operator){\n if (numStack.size() <2){\n System.out.println(\"Stack underflow.\");\n }\n else if (dividingByZero(operator)){\n System.out.println(\"Divide by 0.\"); \n }\n else{\n int num1 = numStack.pop();\n int num2 = numStack.pop();\n int result = performCalculation(num1, num2, operator);\n numStack.push(result);\n }\n\n }",
"void assignOperators(Object rgID, List<Object> operIDs);",
"@Override\n\tpublic float multiplicar(float op1, float op2) {\n\t\treturn op1 * op2;\n\t}",
"public TreeNode constructFromPrePost(int[] pre, int[] post) {\n if (pre == null || post == null || pre.length != post.length) return null;\n int preLen = pre.length;\n int postLen = post.length;\n return helper(pre, 0, preLen - 1, post, 0, postLen - 1);\n }",
"void postProcess(@NotNull NodePostProcessor postProcessor);",
"public static String unload( int op, Stack<String> numbers ) \n {\n\tint total = 0;\n\tif(op == 1){\n\t while(!numbers.peek().equals(\")\"))\n\t\ttotal += Integer.parseInt(numbers.pop());\n\t return \"\" + total;\n\t}\n\n\tif(op == 2){\n\t total = Integer.parseInt(numbers.pop());\n\t while(!numbers.peek().equals(\")\"))\n\t\ttotal -= Integer.parseInt(numbers.pop());\n\t return \"\" + total;\n\t}\n\n\tif(op == 3){\n\t total = 1;\n\t while(!numbers.peek().equals(\")\"))\n\t\ttotal *= Integer.parseInt(numbers.pop());\n\t return \"\" + total;\n\t}\n\n\treturn \"\";\n \n }",
"public Integer perform (IExpression left, IExpression right);",
"public R visit(BinOp n) {\n R _ret=null;\n String s0 = (String)n.f0.accept(this);\n simple_exp=0;\n String s1 = (String)n.f1.accept(this);\n simple_exp=0;\n String s2 = (String)n.f2.accept(this);\n int temp = new_temp++;\n System.out.println(\"MOVE TEMP \"+temp + \" \"+s0+\" \"+s1+\" \"+s2);\n return (R)(\"TEMP \"+temp);\n }",
"private ILogicalOperator addRemainingAssignsAtTheTop(ILogicalOperator op, List<AssignOperator> assignOps) {\n ILogicalOperator root = op;\n for (AssignOperator aOp : assignOps) {\n aOp.getInputs().get(0).setValue(root);\n root = aOp;\n }\n return root;\n }",
"public void applyOperator(GameOperator operator) {\n this.number=operator.apply(this.number, next.getNumber());\n this.next = next.getNext();\n }",
"public void visit(PostfixExpression n) {\n n.f0.accept(this);\n n.f1.accept(this);\n }",
"public void convertInfixToPostfix() {\n\t\t// Create operator stack\n\t\tStack<String> op_stack = new Stack<String>();\n\n\t\t// Prepare the input string\n\t\tprepareInput();\n\t\t\n\t\t// Split the expression \n\t\tString[] tokens = input.split(\"(?<=[^\\\\.a-zA-Z\\\\d])|(?=[^\\\\.a-zA-Z\\\\d])\");\n\t\t\n\t\t//For each token\n\t\tfor (String t : tokens) {\n\t\t\t// If the token is empty, skip it\n\t\t\tif(t.equals(\"\") || t.equals(\" \")) continue;\n\t\t\t\n\t\t\t// If operator (o1)\n\t\t\tif (Operator.isOperator(t)) {\n\n\t\t\t\t// While there is an operator (o2) an the stack and\n\t\t\t\t// (o1 is left associative AND o2 precedence is higher or equal to o1 precedence)\n\t\t\t\t// OR\n\t\t\t\t// (o1 is right associative AND o2 precedence is higher than o1 precedence)\n\t\t\t\twhile (!op_stack.empty()\n\t\t\t\t\t\t&& Operator.isOperator(op_stack.peek())\n\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.LEFT) && Operator.comparePrec(op_stack.peek(), t) >= 0) \n\t\t\t\t\t\t\t|| \n\t\t\t\t\t\t\t((Operator.getAssociativity(t) == Operator.RIGHT) && Operator.comparePrec(op_stack.peek(), t) > 0)\n\t\t\t\t\t\t )\n\t\t\t\t ) \n\t\t\t\t{\n\t\t\t\t\t// add o2 to the output\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Push o1 on to the stack.\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\"(\")) {\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\n\t\t\telse if (t.equals(\")\")) {\n\t\t\t\t// While there is not a left parenthesis, add the top token from the stack to the output\n\t\t\t\twhile (!op_stack.peek().equals(\"(\")) {\n\t\t\t\t\toutput.add(op_stack.pop());\n\t\t\t\t}\n\n\t\t\t\t// Pop out the left parenthesis\n\t\t\t\top_stack.pop();\n\t\t\t\t\n\t\t\t\t// While there is a function on the top of the stack, add it to the output\n\t\t\t\tif(!op_stack.empty() && Function.isFunction(op_stack.peek())) output.add(op_stack.pop());\n\t\t\t}\n\t\t\telse if(Function.isFunction(t)){\n\t\t\t\top_stack.push(t);\n\t\t\t}\n\t\t\telse if(isNumeric(t) || isVariable(t)){\n\t\t\t\toutput.add(t);\n\t\t\t}\n\t\t}\n\n\t\t// Finally empty the stack, by adding all remaining tokens to the output.\n\t\twhile (!op_stack.empty()) {\n\t\t\toutput.add(op_stack.pop());\n\t\t}\n\t}",
"public int operation(int number1,int number2,String operator)",
"@Override\n\tprotected void addRequestedOperators() {\n\t}",
"@Override\n public int precedence() {\n return op.precedence();\n }",
"private void operator() {\n reduce();\n shift();\n getDispenser().advance();\n if(getDispenser().tokenIsNumber()) setState(State.NUMBER);\n else if (getDispenser().tokenIsLeftParen()) setState(State.LEFT_PAREN);\n else syntaxError(NUM);\n \n }",
"public final void rule__XPostfixOperation__FeatureAssignment_1_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17747:1: ( ( ( ruleOpPostfix ) ) )\r\n // InternalDroneScript.g:17748:2: ( ( ruleOpPostfix ) )\r\n {\r\n // InternalDroneScript.g:17748:2: ( ( ruleOpPostfix ) )\r\n // InternalDroneScript.g:17749:3: ( ruleOpPostfix )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXPostfixOperationAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_1_0()); \r\n }\r\n // InternalDroneScript.g:17750:3: ( ruleOpPostfix )\r\n // InternalDroneScript.g:17751:4: ruleOpPostfix\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXPostfixOperationAccess().getFeatureJvmIdentifiableElementOpPostfixParserRuleCall_1_0_1_0_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleOpPostfix();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXPostfixOperationAccess().getFeatureJvmIdentifiableElementOpPostfixParserRuleCall_1_0_1_0_1()); \r\n }\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXPostfixOperationAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public Code visitOperatorNode(ExpNode.OperatorNode node) {\n beginGen(\"Operator\");\n Code code;\n ExpNode args = node.getArg();\n switch (node.getOp()) {\n case ADD_OP:\n code = args.genCode(this);\n code.generateOp(Operation.ADD);\n break;\n case SUB_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n code.generateOp(Operation.ADD);\n break;\n case MUL_OP:\n code = args.genCode(this);\n code.generateOp(Operation.MPY);\n break;\n case DIV_OP:\n code = args.genCode(this);\n code.generateOp(Operation.DIV);\n break;\n case EQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n break;\n case LESS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESS);\n break;\n case NEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.EQUAL);\n code.genBoolNot();\n break;\n case LEQUALS_OP:\n code = args.genCode(this);\n code.generateOp(Operation.LESSEQ);\n break;\n case GREATER_OP:\n /* Generate argument values in reverse order and use LESS */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESS);\n break;\n case GEQUALS_OP:\n /* Generate argument values in reverse order and use LESSEQ */\n code = genArgsInReverse((ExpNode.ArgumentsNode)args);\n code.generateOp(Operation.LESSEQ);\n break;\n case NEG_OP:\n code = args.genCode(this);\n code.generateOp(Operation.NEGATE);\n break;\n default:\n errors.fatal(\"PL0 Internal error: Unknown operator\",\n node.getLocation());\n code = null;\n }\n endGen(\"Operator\");\n return code;\n }",
"public void AllReduce(double[] inData, double[] outData, MpiOp op) {\n\n double[] result = new double[inData.length];\n\n\n\n Reduce(inData, result, op, 0);\n\n //REDUCE_TAG--;\n\n Bcast(result, 0);\n\n System.arraycopy(result, 0, outData, 0, result.length);\n }",
"public void postorder()\n {\n postorder(root);\n }",
"public void postorder()\n {\n postorder(root);\n }",
"public void setOperation(String op) {this.operation = op;}",
"public abstract Operand execute(Operand first, Operand second);",
"void postOrderOperation(PortfolioNode portfolioNode);",
"public void evalPostfix(String postfix){\r\n char ch;\r\n\r\n for(int i = 0; i < postfix.length() ; i++) //parses postfix string and performs operations based on operator found\r\n {\r\n ch = postfix.charAt(i);\r\n \r\n if(ch == '+')\r\n {\r\n int y = ((int)numbers.pop());\r\n int x = ((int)numbers.pop());\r\n numbers.push(x+y);\r\n \r\n }\r\n \r\n \r\n else if(ch == '-')\r\n {\r\n int y = ((int)numbers.pop());\r\n int x = ((int)numbers.pop());\r\n numbers.push(x-y);\r\n \r\n }\r\n \r\n else if(ch == '*')\r\n {\r\n int y = ((int)numbers.pop());\r\n int x = ((int)numbers.pop());\r\n numbers.push(x*y);\r\n \r\n }\r\n \r\n else if(ch == '/')\r\n {\r\n int y = ((int)numbers.pop());\r\n int x = ((int)numbers.pop());\r\n numbers.push(x/y);\r\n \r\n }\r\n \r\n else if(ch == '^')\r\n {\r\n int y = ((int)numbers.pop());\r\n int x = ((int)numbers.pop());\r\n numbers.push((int)Math.pow(x,y));\r\n \r\n } \r\n \r\n else if(ch >= '0' || ch <= '9')\r\n {\r\n numbers.push((int)(ch - '0'));\r\n }\r\n }\r\n }",
"@Override\n public int precedence() {\n return 2;\n }",
"@Override\n public int precedence() {\n return 2;\n }",
"@Override\r\n\tpublic List<Node<T>> getPostOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPost(raiz, lista);\r\n\t}",
"private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}",
"public void postorder() {\n\t\tpostorder(root);\n\t}",
"Operator operator();",
"public void addAfterOperation(Operation op){\n if (op == null){\n throw new IllegalArgumentException(\"op is null\");\n }\n if (after == null){\n after = new ArrayList<>();\n }\n\n this.after.add(op);\n }",
"public void postOrder() {\r\n\t\tSystem.out.print(\"POST: \");\r\n\t\tpostOrder(root);\r\n\t\tSystem.out.println();\r\n\t}",
"public void postorderTraversal() \n { \n postorderTraversal(header.rightChild); \n }",
"static void postOrderTwoStacks(Node root) {\n Stack<Node> stack = new Stack<>();\n Stack<Node> stack2 = new Stack<>();\n if (root == null) {\n return;\n } else {\n stack.push(root);\n while (!stack.isEmpty()) {\n Node temp = stack.pop();\n stack2.push(temp);\n if (temp.left != null) {\n stack.push(temp.left);\n }\n if (temp.right != null) {\n stack.push(temp.right);\n }\n }\n while (!stack2.isEmpty()) {\n Node temp = stack2.pop();\n System.out.print(temp.data + \" \");\n }\n }\n }",
"@Override\n\tpublic Object visit(ASTArithmetic node, Object data)\n\t{\n\t\treturn visitOperatorNode(node, data);\n\t}",
"@Override\n public Node visit(BinaryExpression nd, Void v) {\n if (\"??\".equals(nd.getOperator())) return nd;\n return nd.getLeft().accept(this, v);\n }",
"private void addOp(final Op op) {\n result.add(op);\n }"
] | [
"0.6632202",
"0.6104516",
"0.5554717",
"0.55301446",
"0.5481056",
"0.54573977",
"0.53949046",
"0.5390222",
"0.5370638",
"0.5347052",
"0.5342662",
"0.53333133",
"0.5331001",
"0.53293985",
"0.5323859",
"0.531559",
"0.52804327",
"0.5275698",
"0.52438277",
"0.5238295",
"0.52324253",
"0.52317476",
"0.5227239",
"0.52271664",
"0.52215755",
"0.52203846",
"0.5211393",
"0.52050346",
"0.520134",
"0.5201038",
"0.5176756",
"0.51726246",
"0.5167012",
"0.5165238",
"0.515623",
"0.5146725",
"0.5123702",
"0.5100697",
"0.5088302",
"0.5075334",
"0.506832",
"0.50543857",
"0.5052897",
"0.50528795",
"0.5052748",
"0.5051673",
"0.50487226",
"0.5048246",
"0.5047983",
"0.50312996",
"0.5022933",
"0.5022602",
"0.5018866",
"0.50063884",
"0.50030106",
"0.5000367",
"0.50000423",
"0.4984678",
"0.49806705",
"0.4975134",
"0.49744165",
"0.49715835",
"0.4970719",
"0.4968873",
"0.49664083",
"0.49639273",
"0.49600634",
"0.49523452",
"0.49376422",
"0.49227625",
"0.4918884",
"0.49009755",
"0.48996457",
"0.48965433",
"0.48799145",
"0.48775125",
"0.48744294",
"0.48571435",
"0.48566756",
"0.48544344",
"0.48532975",
"0.48494735",
"0.48494735",
"0.4847384",
"0.4840113",
"0.4836849",
"0.48359728",
"0.48357236",
"0.48357236",
"0.48297796",
"0.4829149",
"0.48253864",
"0.4821057",
"0.48150176",
"0.48135114",
"0.48128578",
"0.4812415",
"0.47919655",
"0.47895283",
"0.47861123"
] | 0.71429604 | 0 |
atom = bracketed / see / act / mark / tag / split / range / set / string / point / category / id | private boolean atom() {
switch (NEXT()) {
case '(': return bracketed();
case '[': return see();
case '@': return act();
case '#': return mark();
case '%': return tag();
case '<': return split();
case '\'': return ALT(GO() && range() || OK() && set());
case '"': return string();
case '.': return point();
default: return ALT(
GO() && category() ||
OK() && id()
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final ANTLRv3Parser.atom_return atom() throws RecognitionException {\r\n ANTLRv3Parser.atom_return retval = new ANTLRv3Parser.atom_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token op=null;\r\n Token RULE_REF110=null;\r\n Token ARG_ACTION111=null;\r\n ANTLRv3Parser.terminal_return terminal107 =null;\r\n\r\n ANTLRv3Parser.range_return range108 =null;\r\n\r\n ANTLRv3Parser.notSet_return notSet109 =null;\r\n\r\n\r\n CommonTree op_tree=null;\r\n CommonTree RULE_REF110_tree=null;\r\n CommonTree ARG_ACTION111_tree=null;\r\n RewriteRuleTokenStream stream_BANG=new RewriteRuleTokenStream(adaptor,\"token BANG\");\r\n RewriteRuleTokenStream stream_ROOT=new RewriteRuleTokenStream(adaptor,\"token ROOT\");\r\n RewriteRuleTokenStream stream_RULE_REF=new RewriteRuleTokenStream(adaptor,\"token RULE_REF\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleSubtreeStream stream_range=new RewriteRuleSubtreeStream(adaptor,\"rule range\");\r\n RewriteRuleSubtreeStream stream_notSet=new RewriteRuleSubtreeStream(adaptor,\"rule notSet\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:255:5: ( terminal | range ( (op= '^' |op= '!' ) -> ^( $op range ) | -> range ) | notSet ( (op= '^' |op= '!' ) -> ^( $op notSet ) | -> notSet ) | RULE_REF ( ARG_ACTION )? ( (op= '^' |op= '!' ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) ) )\r\n int alt54=4;\r\n switch ( input.LA(1) ) {\r\n case CHAR_LITERAL:\r\n {\r\n int LA54_1 = input.LA(2);\r\n\r\n if ( (LA54_1==RANGE) ) {\r\n alt54=2;\r\n }\r\n else if ( (LA54_1==ACTION||LA54_1==BANG||LA54_1==CHAR_LITERAL||(LA54_1 >= REWRITE && LA54_1 <= ROOT)||LA54_1==RULE_REF||LA54_1==SEMPRED||LA54_1==STRING_LITERAL||(LA54_1 >= TOKEN_REF && LA54_1 <= TREE_BEGIN)||(LA54_1 >= 68 && LA54_1 <= 71)||LA54_1==73||(LA54_1 >= 76 && LA54_1 <= 77)||LA54_1==80||LA54_1==91||LA54_1==93) ) {\r\n alt54=1;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 54, 1, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n }\r\n break;\r\n case STRING_LITERAL:\r\n case TOKEN_REF:\r\n case 73:\r\n {\r\n alt54=1;\r\n }\r\n break;\r\n case 93:\r\n {\r\n alt54=3;\r\n }\r\n break;\r\n case RULE_REF:\r\n {\r\n alt54=4;\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(\"\", 54, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt54) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:255:9: terminal\r\n {\r\n root_0 = (CommonTree)adaptor.nil();\r\n\r\n\r\n pushFollow(FOLLOW_terminal_in_atom1800);\r\n terminal107=terminal();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) adaptor.addChild(root_0, terminal107.getTree());\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:256:4: range ( (op= '^' |op= '!' ) -> ^( $op range ) | -> range )\r\n {\r\n pushFollow(FOLLOW_range_in_atom1805);\r\n range108=range();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_range.add(range108.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:257:3: ( (op= '^' |op= '!' ) -> ^( $op range ) | -> range )\r\n int alt48=2;\r\n int LA48_0 = input.LA(1);\r\n\r\n if ( (LA48_0==BANG||LA48_0==ROOT) ) {\r\n alt48=1;\r\n }\r\n else if ( (LA48_0==ACTION||LA48_0==CHAR_LITERAL||LA48_0==REWRITE||LA48_0==RULE_REF||LA48_0==SEMPRED||LA48_0==STRING_LITERAL||(LA48_0 >= TOKEN_REF && LA48_0 <= TREE_BEGIN)||(LA48_0 >= 68 && LA48_0 <= 71)||LA48_0==73||LA48_0==76||LA48_0==80||LA48_0==91||LA48_0==93) ) {\r\n alt48=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 48, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt48) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:257:5: (op= '^' |op= '!' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:257:5: (op= '^' |op= '!' )\r\n int alt47=2;\r\n int LA47_0 = input.LA(1);\r\n\r\n if ( (LA47_0==ROOT) ) {\r\n alt47=1;\r\n }\r\n else if ( (LA47_0==BANG) ) {\r\n alt47=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 47, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt47) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:257:6: op= '^'\r\n {\r\n op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1815); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ROOT.add(op);\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:257:13: op= '!'\r\n {\r\n op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1819); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(op);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: range, op\r\n // token labels: op\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 RewriteRuleTokenStream stream_op=new RewriteRuleTokenStream(adaptor,\"token op\",op);\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 // 257:21: -> ^( $op range )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:257:24: ^( $op range )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);\r\n\r\n adaptor.addChild(root_1, stream_range.nextTree());\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 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:258:9: \r\n {\r\n // AST REWRITE\r\n // elements: range\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 // 258:9: -> range\r\n {\r\n adaptor.addChild(root_0, stream_range.nextTree());\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\r\n }\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:260:7: notSet ( (op= '^' |op= '!' ) -> ^( $op notSet ) | -> notSet )\r\n {\r\n pushFollow(FOLLOW_notSet_in_atom1853);\r\n notSet109=notSet();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_notSet.add(notSet109.getTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:261:3: ( (op= '^' |op= '!' ) -> ^( $op notSet ) | -> notSet )\r\n int alt50=2;\r\n int LA50_0 = input.LA(1);\r\n\r\n if ( (LA50_0==BANG||LA50_0==ROOT) ) {\r\n alt50=1;\r\n }\r\n else if ( (LA50_0==ACTION||LA50_0==CHAR_LITERAL||LA50_0==REWRITE||LA50_0==RULE_REF||LA50_0==SEMPRED||LA50_0==STRING_LITERAL||(LA50_0 >= TOKEN_REF && LA50_0 <= TREE_BEGIN)||(LA50_0 >= 68 && LA50_0 <= 71)||LA50_0==73||LA50_0==76||LA50_0==80||LA50_0==91||LA50_0==93) ) {\r\n alt50=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 50, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt50) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:261:5: (op= '^' |op= '!' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:261:5: (op= '^' |op= '!' )\r\n int alt49=2;\r\n int LA49_0 = input.LA(1);\r\n\r\n if ( (LA49_0==ROOT) ) {\r\n alt49=1;\r\n }\r\n else if ( (LA49_0==BANG) ) {\r\n alt49=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 49, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt49) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:261:6: op= '^'\r\n {\r\n op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1862); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ROOT.add(op);\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:261:13: op= '!'\r\n {\r\n op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1866); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(op);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: notSet, op\r\n // token labels: op\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 RewriteRuleTokenStream stream_op=new RewriteRuleTokenStream(adaptor,\"token op\",op);\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 // 261:21: -> ^( $op notSet )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:261:24: ^( $op notSet )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);\r\n\r\n adaptor.addChild(root_1, stream_notSet.nextTree());\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 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:262:9: \r\n {\r\n // AST REWRITE\r\n // elements: notSet\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 // 262:9: -> notSet\r\n {\r\n adaptor.addChild(root_0, stream_notSet.nextTree());\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\r\n }\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:264:9: RULE_REF ( ARG_ACTION )? ( (op= '^' |op= '!' ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) )\r\n {\r\n RULE_REF110=(Token)match(input,RULE_REF,FOLLOW_RULE_REF_in_atom1902); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RULE_REF.add(RULE_REF110);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:264:18: ( ARG_ACTION )?\r\n int alt51=2;\r\n int LA51_0 = input.LA(1);\r\n\r\n if ( (LA51_0==ARG_ACTION) ) {\r\n alt51=1;\r\n }\r\n switch (alt51) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:264:18: ARG_ACTION\r\n {\r\n ARG_ACTION111=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_atom1904); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(ARG_ACTION111);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:3: ( (op= '^' |op= '!' ) -> ^( $op RULE_REF ( ARG_ACTION )? ) | -> ^( RULE_REF ( ARG_ACTION )? ) )\r\n int alt53=2;\r\n int LA53_0 = input.LA(1);\r\n\r\n if ( (LA53_0==BANG||LA53_0==ROOT) ) {\r\n alt53=1;\r\n }\r\n else if ( (LA53_0==ACTION||LA53_0==CHAR_LITERAL||LA53_0==REWRITE||LA53_0==RULE_REF||LA53_0==SEMPRED||LA53_0==STRING_LITERAL||(LA53_0 >= TOKEN_REF && LA53_0 <= TREE_BEGIN)||(LA53_0 >= 68 && LA53_0 <= 71)||LA53_0==73||LA53_0==76||LA53_0==80||LA53_0==91||LA53_0==93) ) {\r\n alt53=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 53, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt53) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:5: (op= '^' |op= '!' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:5: (op= '^' |op= '!' )\r\n int alt52=2;\r\n int LA52_0 = input.LA(1);\r\n\r\n if ( (LA52_0==ROOT) ) {\r\n alt52=1;\r\n }\r\n else if ( (LA52_0==BANG) ) {\r\n alt52=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 52, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt52) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:6: op= '^'\r\n {\r\n op=(Token)match(input,ROOT,FOLLOW_ROOT_in_atom1914); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ROOT.add(op);\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:265:13: op= '!'\r\n {\r\n op=(Token)match(input,BANG,FOLLOW_BANG_in_atom1918); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(op);\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, op, RULE_REF\r\n // token labels: op\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 RewriteRuleTokenStream stream_op=new RewriteRuleTokenStream(adaptor,\"token op\",op);\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 // 265:21: -> ^( $op RULE_REF ( ARG_ACTION )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:24: ^( $op RULE_REF ( ARG_ACTION )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(stream_op.nextNode(), root_1);\r\n\r\n adaptor.addChild(root_1, \r\n stream_RULE_REF.nextNode()\r\n );\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:265:39: ( 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 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:266:9: \r\n {\r\n // AST REWRITE\r\n // elements: ARG_ACTION, RULE_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 // 266:9: -> ^( RULE_REF ( ARG_ACTION )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:266:12: ^( RULE_REF ( ARG_ACTION )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n stream_RULE_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:266:23: ( 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\r\n }\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 final PythonParser.atom_return atom() throws RecognitionException {\n PythonParser.atom_return retval = new PythonParser.atom_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token lb=null;\n Token rb=null;\n Token LPAREN219=null;\n Token RPAREN222=null;\n Token LBRACK223=null;\n Token RBRACK225=null;\n Token LCURLY226=null;\n Token RCURLY228=null;\n Token NAME230=null;\n Token INT231=null;\n Token LONGINT232=null;\n Token FLOAT233=null;\n Token COMPLEX234=null;\n Token S=null;\n List list_S=null;\n PythonParser.yield_expr_return yield_expr220 = null;\n\n PythonParser.testlist_gexp_return testlist_gexp221 = null;\n\n PythonParser.listmaker_return listmaker224 = null;\n\n PythonParser.dictmaker_return dictmaker227 = null;\n\n PythonParser.testlist_return testlist229 = null;\n\n\n PythonTree lb_tree=null;\n PythonTree rb_tree=null;\n PythonTree LPAREN219_tree=null;\n PythonTree RPAREN222_tree=null;\n PythonTree LBRACK223_tree=null;\n PythonTree RBRACK225_tree=null;\n PythonTree LCURLY226_tree=null;\n PythonTree RCURLY228_tree=null;\n PythonTree NAME230_tree=null;\n PythonTree INT231_tree=null;\n PythonTree LONGINT232_tree=null;\n PythonTree FLOAT233_tree=null;\n PythonTree COMPLEX234_tree=null;\n PythonTree S_tree=null;\n RewriteRuleTokenStream stream_RBRACK=new RewriteRuleTokenStream(adaptor,\"token RBRACK\");\n RewriteRuleTokenStream stream_RPAREN=new RewriteRuleTokenStream(adaptor,\"token RPAREN\");\n RewriteRuleTokenStream stream_BACKQUOTE=new RewriteRuleTokenStream(adaptor,\"token BACKQUOTE\");\n RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,\"token NAME\");\n RewriteRuleTokenStream stream_LBRACK=new RewriteRuleTokenStream(adaptor,\"token LBRACK\");\n RewriteRuleTokenStream stream_RCURLY=new RewriteRuleTokenStream(adaptor,\"token RCURLY\");\n RewriteRuleTokenStream stream_LONGINT=new RewriteRuleTokenStream(adaptor,\"token LONGINT\");\n RewriteRuleTokenStream stream_LCURLY=new RewriteRuleTokenStream(adaptor,\"token LCURLY\");\n RewriteRuleTokenStream stream_COMPLEX=new RewriteRuleTokenStream(adaptor,\"token COMPLEX\");\n RewriteRuleTokenStream stream_INT=new RewriteRuleTokenStream(adaptor,\"token INT\");\n RewriteRuleTokenStream stream_FLOAT=new RewriteRuleTokenStream(adaptor,\"token FLOAT\");\n RewriteRuleTokenStream stream_LPAREN=new RewriteRuleTokenStream(adaptor,\"token LPAREN\");\n RewriteRuleTokenStream stream_STRING=new RewriteRuleTokenStream(adaptor,\"token STRING\");\n RewriteRuleSubtreeStream stream_testlist_gexp=new RewriteRuleSubtreeStream(adaptor,\"rule testlist_gexp\");\n RewriteRuleSubtreeStream stream_dictmaker=new RewriteRuleSubtreeStream(adaptor,\"rule dictmaker\");\n RewriteRuleSubtreeStream stream_yield_expr=new RewriteRuleSubtreeStream(adaptor,\"rule yield_expr\");\n RewriteRuleSubtreeStream stream_listmaker=new RewriteRuleSubtreeStream(adaptor,\"rule listmaker\");\n RewriteRuleSubtreeStream stream_testlist=new RewriteRuleSubtreeStream(adaptor,\"rule testlist\");\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:1338:5: ( LPAREN ( yield_expr -> yield_expr | testlist_gexp -> testlist_gexp | -> ^( LPAREN[$LPAREN, new ArrayList<expr>(), $expr::ctype] ) ) RPAREN | LBRACK ( listmaker[$LBRACK] -> listmaker | -> ^( LBRACK[$LBRACK, new ArrayList<expr>(), $expr::ctype] ) ) RBRACK | LCURLY ( dictmaker -> ^( LCURLY[$LCURLY, actions.castExprs($dictmaker.keys),\\n actions.castExprs($dictmaker.values)] ) | -> ^( LCURLY[$LCURLY, new ArrayList<expr>(), new ArrayList<expr>()] ) ) RCURLY | lb= BACKQUOTE testlist[expr_contextType.Load] rb= BACKQUOTE -> ^( BACKQUOTE[$lb, actions.castExpr($testlist.tree)] ) | NAME -> ^( NAME[$NAME, $NAME.text, $expr::ctype] ) | INT -> ^( INT[$INT, actions.makeInt($INT)] ) | LONGINT -> ^( LONGINT[$LONGINT, actions.makeInt($LONGINT)] ) | FLOAT -> ^( FLOAT[$FLOAT, actions.makeFloat($FLOAT)] ) | COMPLEX -> ^( COMPLEX[$COMPLEX, actions.makeComplex($COMPLEX)] ) | (S+= STRING )+ -> ^( STRING[actions.extractStringToken($S), actions.extractStrings($S, encoding)] ) )\n int alt110=10;\n switch ( input.LA(1) ) {\n case LPAREN:\n {\n alt110=1;\n }\n break;\n case LBRACK:\n {\n alt110=2;\n }\n break;\n case LCURLY:\n {\n alt110=3;\n }\n break;\n case BACKQUOTE:\n {\n alt110=4;\n }\n break;\n case NAME:\n {\n alt110=5;\n }\n break;\n case INT:\n {\n alt110=6;\n }\n break;\n case LONGINT:\n {\n alt110=7;\n }\n break;\n case FLOAT:\n {\n alt110=8;\n }\n break;\n case COMPLEX:\n {\n alt110=9;\n }\n break;\n case STRING:\n {\n alt110=10;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 110, 0, input);\n\n throw nvae;\n }\n\n switch (alt110) {\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:1338:7: LPAREN ( yield_expr -> yield_expr | testlist_gexp -> testlist_gexp | -> ^( LPAREN[$LPAREN, new ArrayList<expr>(), $expr::ctype] ) ) RPAREN\n {\n LPAREN219=(Token)match(input,LPAREN,FOLLOW_LPAREN_in_atom5818); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LPAREN.add(LPAREN219);\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:1339:7: ( yield_expr -> yield_expr | testlist_gexp -> testlist_gexp | -> ^( LPAREN[$LPAREN, new ArrayList<expr>(), $expr::ctype] ) )\n int alt106=3;\n switch ( input.LA(1) ) {\n case YIELD:\n {\n alt106=1;\n }\n break;\n case NAME:\n case LAMBDA:\n case NOT:\n case LPAREN:\n case PLUS:\n case MINUS:\n case TILDE:\n case LBRACK:\n case LCURLY:\n case BACKQUOTE:\n case INT:\n case LONGINT:\n case FLOAT:\n case COMPLEX:\n case STRING:\n {\n alt106=2;\n }\n break;\n case RPAREN:\n {\n alt106=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 106, 0, input);\n\n throw nvae;\n }\n\n switch (alt106) {\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:1339:9: yield_expr\n {\n pushFollow(FOLLOW_yield_expr_in_atom5828);\n yield_expr220=yield_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_yield_expr.add(yield_expr220.getTree());\n\n\n // AST REWRITE\n // elements: yield_expr\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 // 1340:6: -> yield_expr\n {\n adaptor.addChild(root_0, stream_yield_expr.nextTree());\n\n }\n\n retval.tree = root_0;}\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:1341:9: testlist_gexp\n {\n pushFollow(FOLLOW_testlist_gexp_in_atom5847);\n testlist_gexp221=testlist_gexp();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist_gexp.add(testlist_gexp221.getTree());\n\n\n // AST REWRITE\n // elements: testlist_gexp\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 // 1342:6: -> testlist_gexp\n {\n adaptor.addChild(root_0, stream_testlist_gexp.nextTree());\n\n }\n\n retval.tree = root_0;}\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:1344:6: \n {\n\n // AST REWRITE\n // elements: LPAREN\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 // 1344:6: -> ^( LPAREN[$LPAREN, new ArrayList<expr>(), $expr::ctype] )\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:1344:9: ^( LPAREN[$LPAREN, new ArrayList<expr>(), $expr::ctype] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Tuple(LPAREN, LPAREN219, new ArrayList<expr>(), ((expr_scope)expr_stack.peek()).ctype), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n RPAREN222=(Token)match(input,RPAREN,FOLLOW_RPAREN_in_atom5895); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_RPAREN.add(RPAREN222);\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:1347:7: LBRACK ( listmaker[$LBRACK] -> listmaker | -> ^( LBRACK[$LBRACK, new ArrayList<expr>(), $expr::ctype] ) ) RBRACK\n {\n LBRACK223=(Token)match(input,LBRACK,FOLLOW_LBRACK_in_atom5903); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LBRACK.add(LBRACK223);\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:1348:7: ( listmaker[$LBRACK] -> listmaker | -> ^( LBRACK[$LBRACK, new ArrayList<expr>(), $expr::ctype] ) )\n int alt107=2;\n int LA107_0 = input.LA(1);\n\n if ( (LA107_0==NAME||(LA107_0>=LAMBDA && LA107_0<=NOT)||LA107_0==LPAREN||(LA107_0>=PLUS && LA107_0<=MINUS)||(LA107_0>=TILDE && LA107_0<=LBRACK)||LA107_0==LCURLY||(LA107_0>=BACKQUOTE && LA107_0<=STRING)) ) {\n alt107=1;\n }\n else if ( (LA107_0==RBRACK) ) {\n alt107=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 107, 0, input);\n\n throw nvae;\n }\n switch (alt107) {\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:1348:8: listmaker[$LBRACK]\n {\n pushFollow(FOLLOW_listmaker_in_atom5912);\n listmaker224=listmaker(LBRACK223);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_listmaker.add(listmaker224.getTree());\n\n\n // AST REWRITE\n // elements: listmaker\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 // 1349:6: -> listmaker\n {\n adaptor.addChild(root_0, stream_listmaker.nextTree());\n\n }\n\n retval.tree = root_0;}\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:1351:6: \n {\n\n // AST REWRITE\n // elements: LBRACK\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 // 1351:6: -> ^( LBRACK[$LBRACK, new ArrayList<expr>(), $expr::ctype] )\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:1351:9: ^( LBRACK[$LBRACK, new ArrayList<expr>(), $expr::ctype] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new org.python.antlr.ast.List(LBRACK, LBRACK223, new ArrayList<expr>(), ((expr_scope)expr_stack.peek()).ctype), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n RBRACK225=(Token)match(input,RBRACK,FOLLOW_RBRACK_in_atom5969); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_RBRACK.add(RBRACK225);\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:1354:7: LCURLY ( dictmaker -> ^( LCURLY[$LCURLY, actions.castExprs($dictmaker.keys),\\n actions.castExprs($dictmaker.values)] ) | -> ^( LCURLY[$LCURLY, new ArrayList<expr>(), new ArrayList<expr>()] ) ) RCURLY\n {\n LCURLY226=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_atom5977); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LCURLY.add(LCURLY226);\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:1355:8: ( dictmaker -> ^( LCURLY[$LCURLY, actions.castExprs($dictmaker.keys),\\n actions.castExprs($dictmaker.values)] ) | -> ^( LCURLY[$LCURLY, new ArrayList<expr>(), new ArrayList<expr>()] ) )\n int alt108=2;\n int LA108_0 = input.LA(1);\n\n if ( (LA108_0==NAME||(LA108_0>=LAMBDA && LA108_0<=NOT)||LA108_0==LPAREN||(LA108_0>=PLUS && LA108_0<=MINUS)||(LA108_0>=TILDE && LA108_0<=LBRACK)||LA108_0==LCURLY||(LA108_0>=BACKQUOTE && LA108_0<=STRING)) ) {\n alt108=1;\n }\n else if ( (LA108_0==RCURLY) ) {\n alt108=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 108, 0, input);\n\n throw nvae;\n }\n switch (alt108) {\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:1355:9: dictmaker\n {\n pushFollow(FOLLOW_dictmaker_in_atom5987);\n dictmaker227=dictmaker();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_dictmaker.add(dictmaker227.getTree());\n\n\n // AST REWRITE\n // elements: LCURLY\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 // 1356:7: -> ^( LCURLY[$LCURLY, actions.castExprs($dictmaker.keys),\\n actions.castExprs($dictmaker.values)] )\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:1356:10: ^( LCURLY[$LCURLY, actions.castExprs($dictmaker.keys),\\n actions.castExprs($dictmaker.values)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Dict(LCURLY, LCURLY226, actions.castExprs((dictmaker227!=null?dictmaker227.keys:null)), actions.castExprs((dictmaker227!=null?dictmaker227.values:null))), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\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:1359:7: \n {\n\n // AST REWRITE\n // elements: LCURLY\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 // 1359:7: -> ^( LCURLY[$LCURLY, new ArrayList<expr>(), new ArrayList<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:1359:10: ^( LCURLY[$LCURLY, new ArrayList<expr>(), new ArrayList<expr>()] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Dict(LCURLY, LCURLY226, new ArrayList<expr>(), new ArrayList<expr>()), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n\n }\n\n RCURLY228=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_atom6046); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_RCURLY.add(RCURLY228);\n\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:1362:8: lb= BACKQUOTE testlist[expr_contextType.Load] rb= BACKQUOTE\n {\n lb=(Token)match(input,BACKQUOTE,FOLLOW_BACKQUOTE_in_atom6057); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_BACKQUOTE.add(lb);\n\n pushFollow(FOLLOW_testlist_in_atom6059);\n testlist229=testlist(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_testlist.add(testlist229.getTree());\n rb=(Token)match(input,BACKQUOTE,FOLLOW_BACKQUOTE_in_atom6064); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_BACKQUOTE.add(rb);\n\n\n\n // AST REWRITE\n // elements: BACKQUOTE\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 // 1363:5: -> ^( BACKQUOTE[$lb, actions.castExpr($testlist.tree)] )\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:1363:8: ^( BACKQUOTE[$lb, actions.castExpr($testlist.tree)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Repr(BACKQUOTE, lb, actions.castExpr((testlist229!=null?((PythonTree)testlist229.tree):null))), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\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:1364:8: NAME\n {\n NAME230=(Token)match(input,NAME,FOLLOW_NAME_in_atom6087); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_NAME.add(NAME230);\n\n\n\n // AST REWRITE\n // elements: NAME\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 // 1365:5: -> ^( NAME[$NAME, $NAME.text, $expr::ctype] )\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:1365:8: ^( NAME[$NAME, $NAME.text, $expr::ctype] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Name(NAME, NAME230, (NAME230!=null?NAME230.getText():null), ((expr_scope)expr_stack.peek()).ctype), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\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:1366:8: INT\n {\n INT231=(Token)match(input,INT,FOLLOW_INT_in_atom6110); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_INT.add(INT231);\n\n\n\n // AST REWRITE\n // elements: INT\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 // 1367:5: -> ^( INT[$INT, actions.makeInt($INT)] )\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:1367:8: ^( INT[$INT, actions.makeInt($INT)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Num(INT, INT231, actions.makeInt(INT231)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\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:1368:8: LONGINT\n {\n LONGINT232=(Token)match(input,LONGINT,FOLLOW_LONGINT_in_atom6133); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LONGINT.add(LONGINT232);\n\n\n\n // AST REWRITE\n // elements: LONGINT\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 // 1369:5: -> ^( LONGINT[$LONGINT, actions.makeInt($LONGINT)] )\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:1369:8: ^( LONGINT[$LONGINT, actions.makeInt($LONGINT)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Num(LONGINT, LONGINT232, actions.makeInt(LONGINT232)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n case 8 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1370:8: FLOAT\n {\n FLOAT233=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_atom6156); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_FLOAT.add(FLOAT233);\n\n\n\n // AST REWRITE\n // elements: FLOAT\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 // 1371:5: -> ^( FLOAT[$FLOAT, actions.makeFloat($FLOAT)] )\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:1371:8: ^( FLOAT[$FLOAT, actions.makeFloat($FLOAT)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Num(FLOAT, FLOAT233, actions.makeFloat(FLOAT233)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n case 9 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1372:8: COMPLEX\n {\n COMPLEX234=(Token)match(input,COMPLEX,FOLLOW_COMPLEX_in_atom6179); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_COMPLEX.add(COMPLEX234);\n\n\n\n // AST REWRITE\n // elements: COMPLEX\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 // 1373:5: -> ^( COMPLEX[$COMPLEX, actions.makeComplex($COMPLEX)] )\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:1373:8: ^( COMPLEX[$COMPLEX, actions.makeComplex($COMPLEX)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Num(COMPLEX, COMPLEX234, actions.makeComplex(COMPLEX234)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\n }\n break;\n case 10 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1374:8: (S+= STRING )+\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:1374:8: (S+= STRING )+\n int cnt109=0;\n loop109:\n do {\n int alt109=2;\n int LA109_0 = input.LA(1);\n\n if ( (LA109_0==STRING) ) {\n alt109=1;\n }\n\n\n switch (alt109) {\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:1374:9: S+= STRING\n \t {\n \t S=(Token)match(input,STRING,FOLLOW_STRING_in_atom6205); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_STRING.add(S);\n\n \t if (list_S==null) list_S=new ArrayList();\n \t list_S.add(S);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt109 >= 1 ) break loop109;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(109, input);\n throw eee;\n }\n cnt109++;\n } while (true);\n\n\n\n // AST REWRITE\n // elements: STRING\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 // 1375:5: -> ^( STRING[actions.extractStringToken($S), actions.extractStrings($S, encoding)] )\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:1375:8: ^( STRING[actions.extractStringToken($S), actions.extractStrings($S, encoding)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Str(STRING, actions.extractStringToken(list_S), actions.extractStrings(list_S, encoding)), root_1);\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;}\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 Symbol atom(String text)\r\n\t{\r\n\t\tint linepos = line_;\r\n\t\tint charpos = char_;\r\n\t\tint colpos = col_;\r\n\t\tscan(text);\r\n\t\tToken token = new Token(fname, text, linepos, charpos, colpos);\r\n\t\tif (keywords.get(text) != null)\r\n\t\t{\r\n\t\t\tint type = keywords.get(text);\r\n\t\t\treturn new Symbol(type, linepos, colpos, token);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn new Symbol(sym.ATOM, linepos, colpos, token);\r\n\t\t}\r\n\t}",
"public interface Atom extends Serializable {\n\n /**\n * ID of this atom in the space time data store.\n * Format is optimized per Dimension\n * @return unique ID in this dimenstion\n */\n AtomID ID();\n\n /**\n * Measurement name\n * @return name of the atom\n */\n String name();\n\n /**\n * The particles associated with this time translator data atom.\n * Under the hood particles.size() * name time translator are created\n * Only use particles for data which needs to be queried scalably\n * @return particles of the atomg\n */\n Particles particles();\n\n /**\n * Fields associated with this tagged, measurement's data atom\n * Use particles for meta data which does not need to be queried scalably\n * @return fields of the atom\n */\n Fields fields();\n\n /**\n * Values tuple of (min,max,count,sum,values)\n * @return values of the atom\n */\n Values values();\n\n /**\n * The timestamp of the atom expressed as millisecond epoch\n * @return timestamp of the atom\n */\n Long timestamp();\n\n /**\n * The dimenstion of this Atom\n * @return Time or Space\n */\n Dimension dimension();\n}",
"private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"void setAtomInfo(String atomName, int serialNumber, char alternativeLocationId, \n\t\t\tfloat x, float y, float z, float occupancy, float temperatureFactor, String element, int charge);",
"private void constructBuiltinAtom(String name, String operator, String value, OWLDatatype od, Set<SWRLAtom> antecedent) {\n if (!TextUtils.isBlank(value) && !TextUtils.isBlank(operator)) {\n if (od == null) {\n SWRLIArgument ind = factory.getSWRLIndividualArgument(ontologyOWLNamedIndividualVocabulary.get(TextUtil.formatName(value)));\n SWRLIArgument variable = factory.getSWRLIndividualArgument(factory.getOWLNamedIndividual(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name))));\n\n switch (operator) {\n case \"equal\": {\n SWRLSameIndividualAtom sameInd = factory.getSWRLSameIndividualAtom(ind, variable);\n antecedent.add(sameInd);\n break;\n }\n case \"notEqual\": {\n SWRLDifferentIndividualsAtom diffInd = factory.getSWRLDifferentIndividualsAtom(ind, variable);\n antecedent.add(diffInd);\n break;\n }\n }\n } else {\n SWRLVariable var2 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n OWLLiteral lit = factory.getOWLLiteral(value, od);\n SWRLLiteralArgument litArg = factory.getSWRLLiteralArgument(lit);\n List<SWRLDArgument> list = new ArrayList<>();\n list.add(var2);\n list.add(litArg);\n\n switch (operator) {\n case \"equal\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.EQUAL.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n case \"notEqual\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.NOT_EQUAL.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n case \"lessThan\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.LESS_THAN.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n case \"lessOrEqual\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.LESS_THAN_OR_EQUAL.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n case \"greaterThan\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.GREATER_THAN.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n case \"greaterOrEqual\": {\n SWRLBuiltInAtom builtins = factory.getSWRLBuiltInAtom(SWRLBuiltInsVocabulary.GREATER_THAN_OR_EQUAL.getIRI(), list);\n antecedent.add(builtins);\n break;\n }\n }\n }\n }\n }",
"private void constructAtom(String name, Set<SWRLAtom> antecedent, String value, String operator) throws Exception {\n if (searchOntology(name)) {\n if (ontologyOwlClassVocabulary.containsKey(name)) {\n constructClassAtom(name, antecedent, value, operator);\n } else if (ontologyOWLDataPropertyVocabulary.containsKey(name)) {\n constructOwlDataPropertyAtom(name, antecedent, value, operator);\n } else if (ontologyOWLObjectPropertylVocabulary.containsKey(name)) {\n constructObjectPropertyAtom(name, antecedent, value, operator);\n } else {\n //@todo add more necessary swrl atom types \n }\n } else {\n name = prepareTerm(name);\n constructAtom(name, antecedent, value, operator);\n }\n\n }",
"boolean isAtom(Formula f);",
"public int getNatom() {\n return natom;\n }",
"public ConceptAtom(IRI iri)\n {\n super(iri);\n this.strVariable = \"\"; \n }",
"private AtomExpr atomExpr() {\n Expr e = atom(), d = null;\n\n if (lexer.token == Symbol.LEFTBRACKET || lexer.token == Symbol.LEFTPAR) {\n d = details(e);\n }\n\n return new AtomExpr(e, d);\n }",
"public static void processAtom(Atom a) {\r\n\t\tvarsHelper.clear();\r\n\t\tprocessAtomAsRulePart(a);\r\n\t}",
"public AtomTypeInfo (String params){\n\t\ttry{\n\t\t\tEnumeration data = new StringTokenizer(params);\n\t\t\ttype = (String)data.nextElement();\n\t\t\tsize = Integer.parseInt((String)data.nextElement());\n\t\t\tint red = Integer.parseInt((String)data.nextElement());\n\t\t\tint green = Integer.parseInt((String)data.nextElement());\n\t\t\tint blue = Integer.parseInt((String)data.nextElement());\n\t\t\tcol = new Color(red, green, blue);\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tSystem.out.println(\"Invalid parameters for atom information: \"+params);\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"private boolean isOmimEntry(Term term) {\n for (Dbxref xref : term.getXrefs()) {\n if (xref.getName().startsWith(\"OMIM\"))\n return true;\n }\n return false;\n }",
"public static boolean validAtom(char atom)\n\t{\n\t\tchar temp = Character.toUpperCase(atom);\n\t\treturn temp == 'C' || temp == 'H' || temp == 'O';\n\t}",
"public final ASTOperatorParser.atom_return atom() throws RecognitionException {\n ASTOperatorParser.atom_return retval = new ASTOperatorParser.atom_return();\n retval.start = input.LT(1);\n int atom_StartIndex = input.index();\n\n Object root_0 = null;\n\n Token INT10 = null;\n Token char_literal11 = null;\n Token char_literal13 = null;\n ParserRuleReturnScope expr12 = null;\n\n Object INT10_tree = null;\n Object char_literal11_tree = null;\n Object char_literal13_tree = null;\n\n try {\n if (state.backtracking > 0 && alreadyParsedRule(input, 4)) {\n return retval;\n }\n\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:28:2: ( INT ^| '(' ! expr ')' !)\n int alt4 = 2;\n int LA4_0 = input.LA(1);\n if ((LA4_0 == INT)) {\n alt4 = 1;\n } else if ((LA4_0 == 6)) {\n alt4 = 2;\n }\n\n else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 4, 0, input);\n throw nvae;\n }\n\n switch (alt4) {\n case 1:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:28:4: INT ^\n {\n root_0 = (Object) adaptor.nil();\n\n INT10 = (Token) match(input, INT, FOLLOW_INT_in_atom117);\n if (state.failed) return retval;\n if (state.backtracking == 0) {\n INT10_tree = (Object) adaptor.create(INT10);\n root_0 = (Object) adaptor.becomeRoot(INT10_tree, root_0);\n }\n\n }\n break;\n case 2:\n // /compiler-examples/src-antlr/antlr/astexample/ASTOperator.g:29:4: '(' ! expr ')' !\n {\n root_0 = (Object) adaptor.nil();\n\n char_literal11 = (Token) match(input, 6, FOLLOW_6_in_atom123);\n if (state.failed) return retval;\n pushFollow(FOLLOW_expr_in_atom126);\n expr12 = expr();\n state._fsp--;\n if (state.failed) return retval;\n if (state.backtracking == 0)\n adaptor.addChild(root_0, expr12.getTree());\n\n char_literal13 = (Token) match(input, 7, FOLLOW_7_in_atom128);\n if (state.failed) return retval;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if (state.backtracking == 0) {\n retval.tree = (Object) adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n retval.tree = (Object) adaptor.errorNode(\n input,\n retval.start,\n input.LT(-1),\n re);\n } finally {\n // do for sure before leaving\n if (state.backtracking > 0) {\n memoize(input, 4, atom_StartIndex);\n }\n\n }\n return retval;\n }",
"Astro namedTerm(String tagName, AstroArg args);",
"private boolean factor() {\r\n return MARK(ATOM) && atom() && postops();\r\n }",
"@Test\n\tpublic void testOnlyOneAtom() throws CDKException {\n\t\tIAtomContainer mol = sp.parseSmiles(\"C\");\n\n\t\tint preBondCount = mol.getBondCount();\n\t\tatasc.decideBondOrder(mol);\n\n\t\tAssert.assertEquals(preBondCount, mol.getBondCount());\n\t}",
"public interface Symbols {\n /* terminals */\n public static final int BAG = 68;\n public static final int RETRIEVE = 93;\n public static final int AS = 34;\n public static final int TIMES = 13;\n public static final int LCURLY = 54;\n public static final int TYPE = 58;\n public static final int LEAVESBY = 91;\n public static final int LOWEREQUALS = 33;\n public static final int LAZY_FAILURE = 97;\n public static final int CLOSEUNIQUEBY = 90;\n public static final int NAME = 7;\n public static final int ENUM = 70;\n public static final int FORSOME = 41;\n public static final int CATCH = 114;\n public static final int DATEPREC = 109;\n public static final int COMMA = 29;\n public static final int VIRTUAL = 99;\n public static final int RANDOM = 110;\n public static final int DOUBLE_LITERAL = 4;\n public static final int SUM = 48;\n public static final int THROW = 116;\n public static final int JOIN = 28;\n public static final int RPAREN = 19;\n public static final int ON_NAVIGATE = 106;\n public static final int STRUCT = 69;\n public static final int NOT_MATCH_STRING = 23;\n public static final int LPAREN = 18;\n public static final int NOW = 108;\n public static final int INTEGER_LITERAL = 2;\n public static final int NOT = 24;\n public static final int VIEW = 98;\n public static final int INSTANCE = 73;\n public static final int DIFFERENT = 21;\n public static final int DATE_LITERAL = 6;\n public static final int MIN = 43;\n public static final int THEN = 65;\n public static final int EXTERNAL = 67;\n public static final int RECORD = 57;\n public static final int SEROID = 120;\n public static final int REVERSE = 107;\n public static final int ON_UPDATE = 103;\n public static final int LOWER = 31;\n public static final int INSERTCOPY = 83;\n public static final int BOOLEAN_LITERAL = 5;\n public static final int TEMPORAL = 80;\n public static final int CLASS = 71;\n public static final int SEED = 101;\n public static final int IMPLEMENT = 95;\n public static final int MODULO = 17;\n public static final int UNIQUEREF = 47;\n public static final int PLUS = 10;\n public static final int FORALL = 42;\n public static final int DIVIDE = 14;\n public static final int EXISTS = 49;\n public static final int GREATEREQUALS = 32;\n public static final int WHILE = 84;\n public static final int UNION = 16;\n public static final int DELETE = 77;\n public static final int EXTENDS = 72;\n public static final int MODULE = 53;\n public static final int INTERFACE = 117;\n public static final int ASSIGN = 61;\n public static final int RSQUARE = 52;\n public static final int FOR = 86;\n public static final int DO = 85;\n public static final int SCHEMADEF = 96;\n public static final int MATCH_STRING = 22;\n public static final int GREATER = 30;\n public static final int RANGEAS = 119;\n public static final int MAX = 44;\n public static final int RETURN = 60;\n public static final int TRY = 113;\n public static final int ELSE = 66;\n public static final int DOTDOT = 50;\n public static final int BREAK = 87;\n public static final int DOT = 26;\n public static final int PERMANENT = 79;\n public static final int AVG = 45;\n public static final int TRANSACTION_ABORT = 112;\n public static final int STRING_LITERAL = 3;\n public static final int EOF = 0;\n public static final int SEMICOLON = 8;\n public static final int INTERSECT = 15;\n public static final int LSQUARE = 51;\n public static final int WHERE = 27;\n public static final int COUNT = 25;\n public static final int LOCAL = 81;\n public static final int IMPORT = 56;\n public static final int IS = 59;\n public static final int UNIQUE = 46;\n public static final int IN = 36;\n public static final int OR = 39;\n public static final int error = 1;\n public static final int HYPHEN = 11;\n public static final int LEAVESUNIQUEBY = 92;\n public static final int FINALLY = 115;\n public static final int CONTINUE = 88;\n public static final int INSTANCEOF = 74;\n public static final int IF = 64;\n public static final int CONTAINS = 37;\n public static final int COLON = 9;\n public static final int SUBTRACT = 12;\n public static final int CREATE = 78;\n public static final int DEREF = 62;\n public static final int FOREACH = 63;\n public static final int REF = 75;\n public static final int ON_DELETE = 104;\n public static final int DESEROID = 121;\n public static final int CLOSEBY = 89;\n public static final int RENAME = 122;\n public static final int UPDATE = 94;\n public static final int INSERT = 82;\n public static final int OBJECTS = 100;\n public static final int AND = 40;\n public static final int SESSION = 76;\n public static final int ON_RETRIEVE = 102;\n public static final int GROUPAS = 35;\n public static final int ON_NEW = 105;\n public static final int ORDERBY = 38;\n public static final int DISTINCT = 118;\n public static final int RCURLY = 55;\n public static final int EQUALS = 20;\n public static final int TRANSACTION_CAPABLE = 111;\n}",
"public T caseAtom(Atom object)\n {\n return null;\n }",
"public T caseAtom(Atom object)\n {\n return null;\n }",
"public CommandMark(int[] id){\n\tthis.id = id;\n }",
"private Token symbol(TOKEN_TYPE t){\t\n\t\tntk++;\n\t\treturn new Token(t, yytext(), yyline+1, yycolumn+1); // yytext() é o lexema\n\t}",
"public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }",
"public interface BiomedicalParseSym {\n /* terminals */\n public static final int OR_OP = 6;\n public static final int String = 4;\n public static final int RPAREN = 3;\n public static final int error = 1;\n public static final int AND_OP = 5;\n public static final int NOT_OP = 7;\n public static final int LPAREN = 2;\n public static final int EOF = 0;\n}",
"public interface BibtexConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int COMMENT = 5;\r\n /** RegularExpression Id. */\r\n int COMMENT_START = 6;\r\n /** RegularExpression Id. */\r\n int PREAMBLE_START = 7;\r\n /** RegularExpression Id. */\r\n int STRING_START = 8;\r\n /** RegularExpression Id. */\r\n int COMMENT_ENTRY = 9;\r\n /** RegularExpression Id. */\r\n int OPEN_ENTRY = 11;\r\n /** RegularExpression Id. */\r\n int CLOSE_ENTRY = 12;\r\n /** RegularExpression Id. */\r\n int START_B_CONTENT = 14;\r\n /** RegularExpression Id. */\r\n int CLOSE_B_CONTENT = 15;\r\n /** RegularExpression Id. */\r\n int START_Q_CONTENT = 18;\r\n /** RegularExpression Id. */\r\n int CLOSE_Q_CONTENT = 19;\r\n /** RegularExpression Id. */\r\n int CONTENT_TEXT = 20;\r\n /** RegularExpression Id. */\r\n int ID = 21;\r\n /** RegularExpression Id. */\r\n int SEPARATOR = 22;\r\n /** RegularExpression Id. */\r\n int EQUALS = 23;\r\n /** RegularExpression Id. */\r\n int NUMBER = 24;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_ENTRY = 1;\r\n /** Lexical state. */\r\n int IN_ENTRY_TYPE = 2;\r\n /** Lexical state. */\r\n int IN_COMMENT_ENTRY = 3;\r\n /** Lexical state. */\r\n int IN_PREAMBLE = 4;\r\n /** Lexical state. */\r\n int IN_BRACED_CONTENT = 5;\r\n /** Lexical state. */\r\n int IN_BRACED_NESTED_CONTENT = 6;\r\n /** Lexical state. */\r\n int IN_QUOTED_CONTENT = 7;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"<COMMENT>\",\r\n \"\\\"comment\\\"\",\r\n \"\\\"preamble\\\"\",\r\n \"\\\"string\\\"\",\r\n \"<COMMENT_ENTRY>\",\r\n \"<token of kind 10>\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"<token of kind 13>\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\"{\\\"\",\r\n \"\\\"}\\\"\",\r\n \"\\\"\\\\\\\"\\\"\",\r\n \"\\\"\\\\\\\"\\\"\",\r\n \"<CONTENT_TEXT>\",\r\n \"<ID>\",\r\n \"\\\",\\\"\",\r\n \"\\\"=\\\"\",\r\n \"<NUMBER>\",\r\n \"\\\"#\\\"\",\r\n };\r\n\r\n}",
"public TerminalSymbolFact(String name, ITokenizer tkz) {\r\n\t\tsuper(name, tkz);\r\n\t}",
"@Test\n public void parse_validArgs_returnsFindActivityTagCommand() {\n FindActivityTagCommand expectedFindActivityTagCommand =\n new FindActivityTagCommand(new ActivityTagContainsPredicate(Arrays.asList(\"Cheese\", \"Japan\")));\n assertParseSuccess(parser, \"Cheese Japan\", expectedFindActivityTagCommand);\n\n // multiple whitespaces between keywords\n assertParseSuccess(parser, \" \\n Cheese \\n \\t Japan \\t\", expectedFindActivityTagCommand);\n }",
"public static void main(String[] args)\n {\n String text=\"A B C D | E F G | H I J K L M N O P Q R S | A\";\n Occ occ=new Occ();\n OccList list = new OccList();\n for (String tok: text.split( \" \" ) ) {\n if ( tok.equals( \"|\" )) {\n list.reset();\n continue;\n }\n list.add( occ.orth( tok ) );\n System.out.println( list );\n }\n }",
"public interface ParserMASConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int SINGLE_LINE_COMMENT = 9;\r\n /** RegularExpression Id. */\r\n int FORMAL_COMMENT = 10;\r\n /** RegularExpression Id. */\r\n int MULTI_LINE_COMMENT = 11;\r\n /** RegularExpression Id. */\r\n int COLON = 13;\r\n /** RegularExpression Id. */\r\n int AT = 14;\r\n /** RegularExpression Id. */\r\n int COMMA = 15;\r\n /** RegularExpression Id. */\r\n int NRAGENTS = 16;\r\n /** RegularExpression Id. */\r\n int IDENTIFIER = 17;\r\n /** RegularExpression Id. */\r\n int FILENAME = 18;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n /** Lexical state. */\r\n int IN_SINGLE_LINE_COMMENT = 1;\r\n /** Lexical state. */\r\n int IN_FORMAL_COMMENT = 2;\r\n /** Lexical state. */\r\n int IN_MULTI_LINE_COMMENT = 3;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"%\\\"\",\r\n \"\\\"//\\\"\",\r\n \"<token of kind 7>\",\r\n \"\\\"/*\\\"\",\r\n \"<SINGLE_LINE_COMMENT>\",\r\n \"\\\"*/\\\"\",\r\n \"\\\"*/\\\"\",\r\n \"<token of kind 12>\",\r\n \"\\\":\\\"\",\r\n \"\\\"@\\\"\",\r\n \"\\\",\\\"\",\r\n \"<NRAGENTS>\",\r\n \"<IDENTIFIER>\",\r\n \"<FILENAME>\",\r\n };\r\n\r\n}",
"void antsInfo(String text);",
"public void setIntent(String it) {\n/* 340 */ getCOSObject().setName(COSName.IT, it);\n/* */ }",
"private LiteralAnnotationTerm appendLiteralArgument(Node bme, Tree.Term literal) {\n if (spread) {\n bme.addError(\"Spread static arguments not supported\");\n }\n LiteralAnnotationTerm argument = new LiteralAnnotationTerm();\n argument.setTerm(literal);\n this.term = argument;\n return argument;\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 static void main(String[] args) {\n\t\tString text = \"\\\"undifferentiated's thyroid carcinomas were carried out with antisera against calcitonin, calcitonin-gene related peptide (CGRP), somatostatin, and also thyroglobulin, using the PAP method. \";\n\t\ttext = text.replace('\\\"', ' ');\n\t\t\n\t\tStringUtil su = new StringUtil();\n\t\t\n\t\t// Extracting...\n\t\tString text2 = new String(text);\n\t\tEnvironmentVariable.setMoaraHome(\"./\");\n\t\tGeneRecognition gr = new GeneRecognition();\n\t\tArrayList<GeneMention> gms = gr.extract(MentionConstant.MODEL_BC2,text);\n\t\t// Listing mentions...\n\t\tSystem.out.println(\"Start\\tEnd\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.Text());\n\t\t\t//System.out.println(text2.substring(gm.Start(), gm.End()));\n\t\t\tSystem.out.println(su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t}\n\t\tif (true){\n\t\t\treturn;\n\t\t}\n\t\t// Normalizing mentions...\n\t\tOrganism yeast = new Organism(Constant.ORGANISM_YEAST);\n\t\tOrganism human = new Organism(Constant.ORGANISM_HUMAN);\n\t\tExactMatchingNormalization gn = new ExactMatchingNormalization(human);\n\t\tgms = gn.normalize(text,gms);\n\t\t// Listing normalized identifiers...\n\t\t\n\t\tSystem.out.println(\"\\nStart\\tEnd\\t#Pred\\tMention\");\n\t\tfor (int i=0; i<gms.size(); i++) {\n\t\t\tGeneMention gm = gms.get(i);\n\t\t\tif (gm.GeneIds().size()>0) {\n\t\t\t\tSystem.out.println(gm.Start() + \"\\t\" + gm.End() + \"\\t\" + gm.GeneIds().size() + \n\t\t\t\t\t\"\\t\" + su.getTokenByPosition(text,gm.Start(),gm.End()).trim());\n\t\t\t\tfor (int j=0; j<gm.GeneIds().size(); j++) {\n\t\t\t\t\tGenePrediction gp = gm.GeneIds().get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\" + gp.GeneId() + \" \" + gp.OriginalSynonym() + \" \" + gp.ScoreDisambig());\n\t\t\t\t\tSystem.out.println((gm.GeneId().GeneId().equals(gp.GeneId())?\" (*)\":\"\"));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private TopmarkType(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"public final StateCluster atom_or_notatom() throws RecognitionException {\n\t\tStateCluster g = null;\n\n\n\t\tGrammarAST n=null;\n\t\tGrammarAST c=null;\n\t\tGrammarAST t=null;\n\t\tTreeRuleReturnScope atom8 =null;\n\t\tTreeRuleReturnScope set9 =null;\n\n\t\ttry {\n\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:486:2: ( atom[null] | ^(n= NOT (c= CHAR_LITERAL (ast1= ast_suffix )? |t= TOKEN_REF (ast3= ast_suffix )? | set ) ) )\n\t\t\tint alt49=2;\n\t\t\tint LA49_0 = input.LA(1);\n\t\t\tif ( (LA49_0==CHAR_LITERAL||LA49_0==DOT||LA49_0==RULE_REF||LA49_0==STRING_LITERAL||LA49_0==TOKEN_REF||LA49_0==WILDCARD) ) {\n\t\t\t\talt49=1;\n\t\t\t}\n\t\t\telse if ( (LA49_0==NOT) ) {\n\t\t\t\talt49=2;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tif (state.backtracking>0) {state.failed=true; return g;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 49, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\n\t\t\tswitch (alt49) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:486:4: atom[null]\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_atom_in_atom_or_notatom1100);\n\t\t\t\t\tatom8=atom(null);\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return g;\n\t\t\t\t\tif ( state.backtracking==0 ) {g = (atom8!=null?((TreeToNFAConverter.atom_return)atom8).g: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// org/antlr/grammar/v3/TreeToNFAConverter.g:487:4: ^(n= NOT (c= CHAR_LITERAL (ast1= ast_suffix )? |t= TOKEN_REF (ast3= ast_suffix )? | set ) )\n\t\t\t\t\t{\n\t\t\t\t\tn=(GrammarAST)match(input,NOT,FOLLOW_NOT_in_atom_or_notatom1112); if (state.failed) return g;\n\t\t\t\t\tmatch(input, Token.DOWN, null); if (state.failed) return g;\n\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:488:4: (c= CHAR_LITERAL (ast1= ast_suffix )? |t= TOKEN_REF (ast3= ast_suffix )? | set )\n\t\t\t\t\tint alt48=3;\n\t\t\t\t\tswitch ( input.LA(1) ) {\n\t\t\t\t\tcase CHAR_LITERAL:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt48=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TOKEN_REF:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt48=2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase BLOCK:\n\t\t\t\t\t\t{\n\t\t\t\t\t\talt48=3;\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\tif (state.backtracking>0) {state.failed=true; return g;}\n\t\t\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\t\t\tnew NoViableAltException(\"\", 48, 0, input);\n\t\t\t\t\t\tthrow nvae;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt48) {\n\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:488:6: c= CHAR_LITERAL (ast1= ast_suffix )?\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tc=(GrammarAST)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_atom_or_notatom1121); if (state.failed) return g;\n\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:488:21: (ast1= ast_suffix )?\n\t\t\t\t\t\t\tint alt46=2;\n\t\t\t\t\t\t\tint LA46_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( (LA46_0==BANG||LA46_0==ROOT) ) {\n\t\t\t\t\t\t\t\talt46=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tswitch (alt46) {\n\t\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:488:22: ast1= ast_suffix\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpushFollow(FOLLOW_ast_suffix_in_atom_or_notatom1126);\n\t\t\t\t\t\t\t\t\tast_suffix();\n\t\t\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\t\t\tif (state.failed) return g;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tint ttype=0;\n\t\t\t\t\t\t\t\t\t\t\t\tif ( grammar.type==Grammar.LEXER )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tttype = Grammar.getCharValueFromGrammarCharLiteral((c!=null?c.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tttype = grammar.getTokenType((c!=null?c.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tIntSet notAtom = grammar.complement(ttype);\n\t\t\t\t\t\t\t\t\t\t\t\tif ( notAtom.isNil() )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.grammarError(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.MSG_EMPTY_COMPLEMENT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgrammar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tc.getToken(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(c!=null?c.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tg =factory.build_Set(notAtom,n);\n\t\t\t\t\t\t\t\t\t\t\t}\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// org/antlr/grammar/v3/TreeToNFAConverter.g:510:6: t= TOKEN_REF (ast3= ast_suffix )?\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tt=(GrammarAST)match(input,TOKEN_REF,FOLLOW_TOKEN_REF_in_atom_or_notatom1143); if (state.failed) return g;\n\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:510:18: (ast3= ast_suffix )?\n\t\t\t\t\t\t\tint alt47=2;\n\t\t\t\t\t\t\tint LA47_0 = input.LA(1);\n\t\t\t\t\t\t\tif ( (LA47_0==BANG||LA47_0==ROOT) ) {\n\t\t\t\t\t\t\t\talt47=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tswitch (alt47) {\n\t\t\t\t\t\t\t\tcase 1 :\n\t\t\t\t\t\t\t\t\t// org/antlr/grammar/v3/TreeToNFAConverter.g:510:19: ast3= ast_suffix\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpushFollow(FOLLOW_ast_suffix_in_atom_or_notatom1148);\n\t\t\t\t\t\t\t\t\tast_suffix();\n\t\t\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\t\t\tif (state.failed) return g;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tint ttype=0;\n\t\t\t\t\t\t\t\t\t\t\t\tIntSet notAtom = null;\n\t\t\t\t\t\t\t\t\t\t\t\tif ( grammar.type==Grammar.LEXER )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tnotAtom = grammar.getSetFromRule(this,(t!=null?t.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ( notAtom==null )\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.grammarError(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.MSG_RULE_INVALID_SET,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgrammar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tt.getToken(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(t!=null?t.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnotAtom = grammar.complement(notAtom);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tttype = grammar.getTokenType((t!=null?t.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t\tnotAtom = grammar.complement(ttype);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tif ( notAtom==null || notAtom.isNil() )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.grammarError(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.MSG_EMPTY_COMPLEMENT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgrammar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tt.getToken(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(t!=null?t.getText():null));\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tg =factory.build_Set(notAtom,n);\n\t\t\t\t\t\t\t\t\t\t\t}\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// org/antlr/grammar/v3/TreeToNFAConverter.g:545:6: set\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpushFollow(FOLLOW_set_in_atom_or_notatom1163);\n\t\t\t\t\t\t\tset9=set();\n\t\t\t\t\t\t\tstate._fsp--;\n\t\t\t\t\t\t\tif (state.failed) return g;\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {g = (set9!=null?((TreeToNFAConverter.set_return)set9).g:null);}\n\t\t\t\t\t\t\tif ( state.backtracking==0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\tGrammarAST stNode = (GrammarAST)n.getChild(0);\n\t\t\t\t\t\t\t\t\t\t\t\t//IntSet notSet = grammar.complement(stNode.getSetValue());\n\t\t\t\t\t\t\t\t\t\t\t\t// let code generator complement the sets\n\t\t\t\t\t\t\t\t\t\t\t\tIntSet s = stNode.getSetValue();\n\t\t\t\t\t\t\t\t\t\t\t\tstNode.setSetValue(s);\n\t\t\t\t\t\t\t\t\t\t\t\t// let code gen do the complement again; here we compute\n\t\t\t\t\t\t\t\t\t\t\t\t// for NFA construction\n\t\t\t\t\t\t\t\t\t\t\t\ts = grammar.complement(s);\n\t\t\t\t\t\t\t\t\t\t\t\tif ( s.isNil() )\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.grammarError(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tErrorManager.MSG_EMPTY_COMPLEMENT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgrammar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tn.getToken());\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tg =factory.build_Set(s,n);\n\t\t\t\t\t\t\t\t\t\t\t}\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\tif ( state.backtracking==0 ) {n.followingNFAState = g.right;}\n\t\t\t\t\tmatch(input, Token.UP, null); if (state.failed) return g;\n\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 g;\n\t}",
"private void consumeEntity(boolean inAttribute) throws SAXException,\n IOException {\n clearStrBuf();\n appendStrBuf('&');\n /*\n * This section defines how to consume an entity. This definition is\n * used when parsing entities in text and in attributes.\n * \n * The behaviour depends on the identity of the next character (the one\n * immediately after the U+0026 AMPERSAND character):\n */\n char c = read();\n switch (c) {\n case ' ':\n case '\\t':\n case '\\n':\n case '\\u000B':\n case '\\u000C':\n case '<':\n case '&':\n case '\\u0000':\n /*\n * U+0009 CHARACTER TABULATION U+000A LINE FEED (LF) U+000B LINE\n * TABULATION U+000C FORM FEED (FF) U+0020 SPACE U+003C\n * LESS-THAN SIGN U+0026 AMPERSAND EOF Not an entity. No\n * characters are consumed, and nothing is returned. (This is\n * not an error, either.)\n */\n if (inAttribute) {\n appendStrBufToLongStrBuf();\n } else {\n emitStrBuf();\n }\n unread(c);\n return;\n case '#':\n /*\n * U+0023 NUMBER SIGN (#) Consume the U+0023 NUMBER SIGN.\n */\n appendStrBuf('#');\n consumeNCR(inAttribute);\n return;\n default:\n unread(c);\n int entCol = -1;\n int lo = 0;\n int hi = (Entities.NAMES.length - 1);\n int candidate = -1;\n int strBufMark = 0;\n outer: for (;;) {\n entCol++;\n c = read();\n /*\n * Anything else Consume the maximum number of characters\n * possible, with the consumed characters case-sensitively\n * matching one of the identifiers in the first column of\n * the entities table.\n */\n hiloop: for (;;) {\n if (hi == -1) {\n break;\n }\n if (entCol == Entities.NAMES[hi].length()) {\n break hiloop;\n }\n if (entCol > Entities.NAMES[hi].length()) {\n break outer;\n } else if (c < Entities.NAMES[hi].charAt(entCol)) {\n hi--;\n } else {\n break hiloop;\n }\n }\n \n loloop: for (;;) {\n if (hi < lo) {\n break outer;\n }\n if (entCol == Entities.NAMES[lo].length()) {\n candidate = lo;\n strBufMark = strBufLen;\n lo++;\n } else if (entCol > Entities.NAMES[lo].length()) {\n break outer;\n } else if (c > Entities.NAMES[lo].charAt(entCol)) {\n lo++;\n } else {\n break loloop;\n }\n }\n if (hi < lo) {\n break outer;\n }\n appendStrBuf(c);\n }\n unread(c);\n // TODO warn about apos (IE) and TRADE (Opera)\n if (candidate == -1) {\n /* If no match can be made, then this is a parse error. */\n err(\"Text after \\u201C&\\u201D did not match an entity name.\");\n /*\n * No characters are consumed, and nothing is returned.\n */\n if (inAttribute) {\n appendStrBufToLongStrBuf();\n } else {\n emitStrBuf();\n }\n return;\n } else {\n if (!Entities.NAMES[candidate].endsWith(\";\")) {\n /*\n * If the last character matched is not a U+003B\n * SEMICOLON (;), there is a parse error.\n */\n err(\"Entity reference was not terminated by a semicolon.\");\n if (inAttribute) {\n /*\n * If the entity is being consumed as part of an\n * attribute, and the last character matched is not\n * a U+003B SEMICOLON (;),\n */\n if (strBufMark == strBufLen) {\n c = read();\n unread(c);\n } else {\n c = strBuf[strBufMark];\n }\n if ((c >= '0' && c <= '9')\n || (c >= 'A' && c <= 'Z')\n || (c >= 'a' && c <= 'z')) {\n /*\n * and the next character is in the range U+0030\n * DIGIT ZERO to U+0039 DIGIT NINE, U+0041 LATIN\n * CAPITAL LETTER A to U+005A LATIN CAPITAL\n * LETTER Z, or U+0061 LATIN SMALL LETTER A to\n * U+007A LATIN SMALL LETTER Z, then, for\n * historical reasons, all the characters that\n * were matched after the U+0026 AMPERSAND (&)\n * must be unconsumed, and nothing is returned.\n */\n appendStrBufToLongStrBuf();\n return;\n }\n }\n }\n \n /*\n * Otherwise, return a character token for the character\n * corresponding to the entity name (as given by the second\n * column of the entities table).\n */\n char[] val = Entities.VALUES[candidate];\n emitOrAppend(val, inAttribute);\n // this is so complicated!\n if (strBufMark < strBufLen) {\n if (inAttribute) {\n for (int i = strBufMark; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n } else {\n tokenHandler.characters(strBuf, strBufMark,\n strBufLen - strBufMark);\n }\n }\n return;\n /*\n * If the markup contains I'm ¬it; I tell you, the entity\n * is parsed as \"not\", as in, I'm ¬it; I tell you. But if\n * the markup was I'm ∉ I tell you, the entity would\n * be parsed as \"notin;\", resulting in I'm ∉ I tell you.\n */\n }\n \n }\n }",
"public Token(String text, int start, int end, String typ) {\n termText = text;\n startOffset = start;\n endOffset = end;\n type = typ;\n }",
"public void setAtom(IAtom atom, int position) {\n atoms[position] = atom;\n notifyChanged();\n }",
"public void setActplace(String actplace) {\r\n this.actplace = actplace;\r\n }",
"@Override\r\n public void annotate(Annotation annotation) {\r\n// System.out.println(\"Tokens\");\r\n// for(CoreLabel token : annotation.get(CoreAnnotations.TokensAnnotation.class)){\r\n for(int i=0;i<annotation.get(CoreAnnotations.TokensAnnotation.class).size();i++){\r\n CoreLabel token = annotation.get(CoreAnnotations.TokensAnnotation.class).get(i);\r\n// System.out.println(token.word() +\", tokenIndex = \"+i);\r\n if(token.word().equals(sch)) {\r\n// positions.add(token.index());\r\n token.set(SearchAnnotation.class,i); //index of the token is saved\r\n\r\n }\r\n }\r\n }",
"AtomFactory getAtomFactory();",
"public CCPMention(TypeImpl type, CASImpl casImpl) {\n super(type, casImpl);\n readObject();\n }",
"public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Atom p, A arg)\n {\n\n return null;\n }",
"public List<DeclarationNaissance> getAllActe();",
"AceMention findMention (String id) {\n\t\tfor (int i=0; i<values.size(); i++) {\n\t\t\tAceValue value = (AceValue) values.get(i);\n\t\t\tAceValueMention mention = value.findMention(id);\n\t\t\tif (mention != null) {\n\t\t\t\treturn mention;\n\t\t\t}\n\t\t}\n\t\tfor (int i=0; i<timeExpressions.size(); i++) {\n\t\t\tAceTimex timex = (AceTimex) timeExpressions.get(i);\n\t\t\tAceTimexMention mention = timex.findMention(id);\n\t\t\tif (mention != null) {\n\t\t\t\treturn mention;\n\t\t\t}\n\t\t}\n\t\treturn findEntityMention (id);\n\t}",
"AtomID ID();",
"int getMark();",
"public Token (String token, int position, int marker) {\n this.tokenString = token;\n this.position = position;\n this.marker = marker; \n }",
"public Token(String text, int start, int end, int flags) {\n termText = text;\n startOffset = start;\n endOffset = end;\n this.flags = flags;\n }",
"public void parseTerm(Tokenizer t) {\n\n // parse the fac node\n this.fac.parseFac(t);\n\n // check selection\n if(t.currentToken().equals(\"*\")) {\n\n // Chomp \"*\" token\n t.nextToken();\n\n // update selection\n this.selection = 2;\n\n // parse term node\n this.term = new TermNode();\n this.term.parseTerm(t);\n\n }\n\n }",
"public static void main(){\r\n\t\t\r\n\t\tArrayList<tok> pHolder = new ArrayList<tok>();\r\n\r\n\t\t pHolder.add(new tok(\"@\", \"@\"));\r\n\t\t\r\n\t\treturn;\r\n\t}",
"public String getKind(State finalState, String lexeme) {\r\n switch (finalState) {\r\n case ST_ZERO:\r\n kind=\"IntegerLiteral\";\r\n break;\r\n case ST_NUM:\r\n kind=\"IntegerLiteral\";\r\n //check range for the special case\r\n if(_isLastTokenMinus){\r\n try {\r\n long val=Long.parseLong(lexeme);\r\n if(val <= 2147483648l){\r\n kind=\"IntegerLiteral\";\r\n } else {\r\n kind=\"ERROR\";\r\n System.err.println(\"Number out of range.\");\r\n } // else\r\n } catch (NumberFormatException e){\r\n kind=\"ERROR\";\r\n } // catch\r\n } else {\r\n try {\r\n Integer.parseInt(lexeme);\r\n } catch (NumberFormatException e){ \r\n // out of range\r\n kind=\"ERROR\";\r\n System.err.println(\"Number out of range.\");\r\n } // catch\r\n } // else\r\n break;\r\n case ST_BOF:\r\n kind=\"BOF\";\r\n break;\r\n case ST_EOF:\r\n kind=\"EOF\";\r\n break;\r\n case ST_COMMA:\r\n kind=\"COMMA\";\r\n break;\r\n case ST_SEMICOLON:\r\n kind=\"SEMICOLON\";\r\n break;\r\n case ST_COLON:\r\n kind=\"COLON\";\r\n break;\r\n case ST_LPAREN:\r\n kind=\"LPAREN\";\r\n break;\r\n case ST_RPAREN:\r\n kind=\"RPAREN\";\r\n break;\r\n case ST_LBRACK:\r\n kind=\"LBRACK\";\r\n break;\r\n case ST_RBRACK:\r\n kind=\"RBRACK\";\r\n break;\r\n case ST_LBRACE:\r\n kind=\"LBRACE\";\r\n break;\r\n case ST_RBRACE:\r\n kind=\"RBRACE\";\r\n break;\r\n case ST_DOT:\r\n kind=\"DOT\";\r\n break;\r\n case ST_MINUS:\r\n kind=\"MINUS\";\r\n break;\r\n case ST_PLUS:\r\n kind=\"PLUS\";\r\n break;\r\n case ST_STAR:\r\n kind=\"STAR\";\r\n break;\r\n case ST_PCT:\r\n kind=\"PCT\";\r\n break;\r\n case ST_SLASH:\r\n kind=\"SLASH\";\r\n break;\r\n case ST_EXCLAM:\r\n kind=\"EXCLAM\";\r\n break;\r\n case ST_NE:\r\n kind=\"NE\";\r\n break;\r\n case ST_BECOMES:\r\n kind=\"BECOMES\";\r\n break;\r\n case ST_EQUALS:\r\n kind=\"EQUALS\";\r\n break;\r\n case ST_LT:\r\n kind=\"LT\";\r\n break;\r\n case ST_LE:\r\n kind=\"LE\";\r\n break;\r\n case ST_GT:\r\n kind=\"GT\";\r\n break;\r\n case ST_GE:\r\n kind=\"GE\";\r\n break;\r\n case ST_AMP:\r\n kind=\"AMP\";\r\n break;\r\n case ST_AMPAMP:\r\n kind=\"AMPAMP\";\r\n break;\r\n case ST_OR:\r\n kind=\"OR\";\r\n break;\r\n case ST_OROR:\r\n kind=\"OROR\";\r\n break;\r\n case ST_CHARLIT:\r\n kind=\"CharacterLiteral\";\r\n break;\r\n case ST_STRINGLIT:\r\n kind=\"StringLiteral\";\r\n break;\r\n default:\r\n break;\r\n } // switch\r\n if(finalState == State.ST_ID) {\r\n if (lexeme.equals(\"extends\")){\r\n kind=\"EXTENDS\";\r\n } else if (lexeme.equals(\"implements\")){\r\n kind=\"IMPLEMENTS\";\r\n } else if (lexeme.equals(\"static\")){\r\n kind=\"STATIC\";\r\n } else if(lexeme.equals(\"import\")){\r\n kind=\"IMPORT\";\r\n } else if(lexeme.equals(\"package\")){\r\n kind=\"PACKAGE\";\r\n } else if(lexeme.equals(\"public\")){\r\n kind=\"PUBLIC\";\r\n } else if(lexeme.equals(\"interface\")){\r\n kind=\"INTERFACE\";\r\n } else if(lexeme.equals(\"protected\")){\r\n kind=\"PROTECTED\";\r\n } else if(lexeme.equals(\"abstract\")){\r\n kind=\"ABSTRACT\";\r\n } else if(lexeme.equals(\"native\")){\r\n kind=\"NATIVE\";\r\n } else if(lexeme.equals(\"while\")){\r\n kind=\"WHILE\";\r\n } else if(lexeme.equals(\"for\")){\r\n kind=\"FOR\";\r\n } else if(lexeme.equals(\"boolean\")){\r\n kind=\"BOOLEAN\";\r\n } else if(lexeme.equals(\"int\")){\r\n kind=\"INT\";\r\n } else if(lexeme.equals(\"char\")){\r\n kind=\"CHAR\";\r\n } else if(lexeme.equals(\"byte\")){\r\n kind=\"BYTE\";\r\n } else if(lexeme.equals(\"short\")){\r\n kind=\"SHORT\";\r\n } else if(lexeme.equals(\"null\")){\r\n kind=\"NULL\";\r\n } else if(lexeme.equals(\"this\")){\r\n kind=\"THIS\";\r\n } else if(lexeme.equals(\"true\") || lexeme.equals(\"false\")){\r\n kind=\"BooleanLiteral\";\r\n } else if(lexeme.equals(\"instanceof\")){\r\n kind=\"INSTANCEOF\";\r\n } else if(lexeme.equals(\"class\")){\r\n kind=\"CLASS\";\r\n } else if(lexeme.equals(\"if\")){\r\n kind=\"IF\";\r\n } else if(lexeme.equals(\"else\")){\r\n kind=\"ELSE\";\r\n } else if(lexeme.equals(\"final\")){\r\n kind=\"FINAL\";\r\n } else if(lexeme.equals(\"new\")){\r\n kind=\"NEW\";\r\n } else if(lexeme.equals(\"return\")){\r\n kind=\"RETURN\";\r\n } else if(lexeme.equals(\"void\")){\r\n kind=\"VOID\";\r\n } else if(!Arrays.asList(_RESERVED_KEYWORDS).contains(lexeme)){\r\n kind=\"ID\";\r\n } // else\r\n } // if\r\n if(kind.equals(\"ERROR\")){\r\n printErrToken();\r\n } // if\r\n\r\n setLastTokenMinus(kind.equals(\"MINUS\"));\r\n return kind;\r\n }",
"public Iterable<IAtom> atoms() {\n return new Iterable<IAtom>() {\n \tpublic Iterator<IAtom> iterator() {\n \t\treturn new AtomsIterator();\n \t}\n };\n }",
"public final Expr atom() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tId i =null;\n\t\tExpr l =null;\n\t\tFuncCall f =null;\n\t\tArrayRef a =null;\n\t\tExpr brack =null;\n\t\tBooleanLiteral b =null;\n\n\t\ttry {\n\t\t\t// ul.g:200:23: (i= id |l= literal |f= funcCall |a= arrayRef |brack= brackExp |b= true_ |b= false_ )\n\t\t\tint alt16=7;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase ID:\n\t\t\t\t{\n\t\t\t\tswitch ( input.LA(2) ) {\n\t\t\t\tcase EOF:\n\t\t\t\tcase CLOSEPAREN:\n\t\t\t\tcase EQUALITY:\n\t\t\t\tcase LESSTHAN:\n\t\t\t\tcase MINUS:\n\t\t\t\tcase PLUS:\n\t\t\t\tcase SEMI:\n\t\t\t\tcase STAR:\n\t\t\t\tcase 35:\n\t\t\t\tcase 38:\n\t\t\t\t\t{\n\t\t\t\t\talt16=1;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase OPENPAREN:\n\t\t\t\t\t{\n\t\t\t\t\talt16=3;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 37:\n\t\t\t\t\t{\n\t\t\t\t\talt16=4;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\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(\"\", 16, 1, 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\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CHARCONST:\n\t\t\tcase FLOATCONST:\n\t\t\tcase INTCONST:\n\t\t\tcase STRCONST:\n\t\t\t\t{\n\t\t\t\talt16=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\tint LA16_3 = input.LA(2);\n\t\t\t\tif ( (synpred29_ul()) ) {\n\t\t\t\t\talt16=2;\n\t\t\t\t}\n\t\t\t\telse if ( (synpred33_ul()) ) {\n\t\t\t\t\talt16=6;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tif (state.backtracking>0) {state.failed=true; return e;}\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(\"\", 16, 3, 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 FALSE:\n\t\t\t\t{\n\t\t\t\tint LA16_4 = input.LA(2);\n\t\t\t\tif ( (synpred29_ul()) ) {\n\t\t\t\t\talt16=2;\n\t\t\t\t}\n\t\t\t\telse if ( (true) ) {\n\t\t\t\t\talt16=7;\n\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase OPENPAREN:\n\t\t\t\t{\n\t\t\t\talt16=5;\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 e;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 16, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt16) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:201:4: i= id\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_id_in_atom815);\n\t\t\t\t\ti=id();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = i;}\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:202:4: l= literal\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_literal_in_atom826);\n\t\t\t\t\tl=literal();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = l;}\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:203:4: f= funcCall\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_funcCall_in_atom836);\n\t\t\t\t\tf=funcCall();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = f;}\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:204:4: a= arrayRef\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_arrayRef_in_atom846);\n\t\t\t\t\ta=arrayRef();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = a;}\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:205:4: brack= brackExp\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_brackExp_in_atom856);\n\t\t\t\t\tbrack=brackExp();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = brack;}\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:206:4: b= true_\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_true__in_atom866);\n\t\t\t\t\tb=true_();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = b;}\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:207:4: b= false_\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_false__in_atom876);\n\t\t\t\t\tb=false_();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = b;}\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 e;\n\t}",
"private void addToken(TokenType type, Object literal) {\n String text = source.substring(start, current);\n tokens.add(new Token(type, text, literal, line));\n }",
"public String getActplace() {\r\n return actplace;\r\n }",
"private static boolean contieneAtomo(FormaClausal fc, char atomo) {\n\t\treturn fc.formas.contains(String.valueOf(atomo));\n\t}",
"@Test\n public void testWriteEntry_5args() {\n String expResult = \"@prefix lemon: <http://lemon-model.net/lemon#> . \" + ls\n + \"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . \" + ls\n + \"\" + ls\n + \"<file:test#Cat/sense> a lemon:LexicalSense ;\" + ls\n + \" lemon:reference <http://dbpedia.org/resource/Cat> .\" + ls\n + \"\" + ls\n + \"<file:test#Cat/canonicalForm> lemon:writtenRep \\\"cat\\\"@en ;\" + ls\n + \" a lemon:Form .\" + ls\n + \"\" + ls\n + \"<file:test#Cat> lemon:sense <file:test#Cat/sense> ;\" + ls\n + \" lemon:canonicalForm <file:test#Cat/canonicalForm> ;\" + ls\n + \" a lemon:LexicalEntry .\";\n //System.out.println(\"writeEntry\");\n LemonSerializerImpl instance = new LemonSerializerImpl(null);\n LemonModel lm = makeModel(instance);\n LexicalEntry le = lm.getLexica().iterator().next().getEntrys().iterator().next();\n LinguisticOntology lo = new LexInfo();\n Writer dt = new StringWriter();\n boolean xml = false;\n instance.writeEntry(lm, le, lo, dt, xml);\n assertEquals(expResult, dt.toString().trim());\n }",
"interface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link org.eclipse.emf.emfstore.internal.server.model.versioning.operations.semantic.impl.SemanticCompositeOperationImpl <em>Composite Operation</em>}' class.\n\t\t * <!-- begin-user-doc --> <!--\n\t\t * end-user-doc -->\n\t\t * @see org.eclipse.emf.emfstore.internal.server.model.versioning.operations.semantic.impl.SemanticCompositeOperationImpl\n\t\t * @see org.eclipse.emf.emfstore.internal.server.model.versioning.operations.semantic.impl.SemanticPackageImpl#getSemanticCompositeOperation()\n\t\t * @generated\n\t\t */\n\t\tEClass SEMANTIC_COMPOSITE_OPERATION = eINSTANCE.getSemanticCompositeOperation();\n\n\t}",
"public String getTerm(){\n return this.term;\n }",
"@Test\r\n public void testGetAtoms() {\r\n List<CMLAtom> atoms = spectator.getAtoms();\r\n Assert.assertEquals(\"atoms\", 2, atoms.size());\r\n\r\n }",
"Term getTerm();",
"@Element \n public String getMark() {\n return mark;\n }",
"public Token(String terme, int tf) {\r\n\t\t\r\n\t\tthis.Terme = terme;\r\n\t\tthis.tf = tf;\r\n\t}",
"String getMarkingInstruction();",
"public interface AtomPackage extends EPackage {\n /**\n * The package name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNAME = \"atom\";\n\n /**\n * The package namespace URI.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_URI = \"http://bip2/ujf/verimag/bip/component/atom/1.0\";\n\n /**\n * The package namespace name.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n String eNS_PREFIX = \"bip2.ujf.verimag.bip.component.atom\";\n\n /**\n * The singleton instance of the package.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n AtomPackage eINSTANCE = bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl\n .init();\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration <em>Internal External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalExternalPortDeclaration()\n * @generated\n */\n int ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION = 0;\n\n /**\n * The feature id for the '<em><b>Port Type</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__PORT_TYPE = PortPackage.PORT_DECLARATION__PORT_TYPE;\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 ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__NAME = PortPackage.PORT_DECLARATION__NAME;\n\n /**\n * The feature id for the '<em><b>Data Parameters</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__DATA_PARAMETERS = PortPackage.PORT_DECLARATION__DATA_PARAMETERS;\n\n /**\n * The feature id for the '<em><b>Bip Annotations</b></em>' map.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__BIP_ANNOTATIONS = PortPackage.PORT_DECLARATION_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Internal External Port Declaration</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT = PortPackage.PORT_DECLARATION_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl <em>Internal Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalPortDeclaration()\n * @generated\n */\n int ATOM_INTERNAL_PORT_DECLARATION = 1;\n\n /**\n * The feature id for the '<em><b>Port Type</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_PORT_DECLARATION__PORT_TYPE = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__PORT_TYPE;\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 ATOM_INTERNAL_PORT_DECLARATION__NAME = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__NAME;\n\n /**\n * The feature id for the '<em><b>Data Parameters</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_PORT_DECLARATION__DATA_PARAMETERS = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__DATA_PARAMETERS;\n\n /**\n * The feature id for the '<em><b>Bip Annotations</b></em>' map.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_PORT_DECLARATION__BIP_ANNOTATIONS = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__BIP_ANNOTATIONS;\n\n /**\n * The number of structural features of the '<em>Internal Port Declaration</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_PORT_DECLARATION_FEATURE_COUNT = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT + 0;\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl <em>External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExternalPortDeclaration()\n * @generated\n */\n int ATOM_EXTERNAL_PORT_DECLARATION = 2;\n\n /**\n * The feature id for the '<em><b>Port Type</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION__PORT_TYPE = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__PORT_TYPE;\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 ATOM_EXTERNAL_PORT_DECLARATION__NAME = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__NAME;\n\n /**\n * The feature id for the '<em><b>Data Parameters</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION__DATA_PARAMETERS = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__DATA_PARAMETERS;\n\n /**\n * The feature id for the '<em><b>Bip Annotations</b></em>' map.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION__BIP_ANNOTATIONS = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION__BIP_ANNOTATIONS;\n\n /**\n * The feature id for the '<em><b>Backend Name</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION__BACKEND_NAME = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Policy</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION__POLICY = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>External Port Declaration</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT = ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl <em>Internal Data Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalDataDeclaration()\n * @generated\n */\n int ATOM_INTERNAL_DATA_DECLARATION = 3;\n\n /**\n * The feature id for the '<em><b>Bip Annotations</b></em>' map.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION__BIP_ANNOTATIONS = DataPackage.EXPLICIT_DATA_DECLARATION__BIP_ANNOTATIONS;\n\n /**\n * The feature id for the '<em><b>Data Type</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION__DATA_TYPE = DataPackage.EXPLICIT_DATA_DECLARATION__DATA_TYPE;\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 ATOM_INTERNAL_DATA_DECLARATION__NAME = DataPackage.EXPLICIT_DATA_DECLARATION__NAME;\n\n /**\n * The feature id for the '<em><b>Value</b></em>' containment reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION__VALUE = DataPackage.EXPLICIT_DATA_DECLARATION__VALUE;\n\n /**\n * The feature id for the '<em><b>Const</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION__CONST = DataPackage.EXPLICIT_DATA_DECLARATION__CONST;\n\n /**\n * The feature id for the '<em><b>Exported</b></em>' attribute.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION__EXPORTED = DataPackage.EXPLICIT_DATA_DECLARATION_FEATURE_COUNT + 0;\n\n /**\n * The number of structural features of the '<em>Internal Data Declaration</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_INTERNAL_DATA_DECLARATION_FEATURE_COUNT = DataPackage.EXPLICIT_DATA_DECLARATION_FEATURE_COUNT + 1;\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl <em>Export Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExportPortDeclaration()\n * @generated\n */\n int ATOM_EXPORT_PORT_DECLARATION = 4;\n\n /**\n * The feature id for the '<em><b>Port Type</b></em>' reference.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXPORT_PORT_DECLARATION__PORT_TYPE = PortPackage.PORT_DECLARATION__PORT_TYPE;\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 ATOM_EXPORT_PORT_DECLARATION__NAME = PortPackage.PORT_DECLARATION__NAME;\n\n /**\n * The feature id for the '<em><b>Data Parameters</b></em>' containment reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXPORT_PORT_DECLARATION__DATA_PARAMETERS = PortPackage.PORT_DECLARATION__DATA_PARAMETERS;\n\n /**\n * The feature id for the '<em><b>Bip Annotations</b></em>' map.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXPORT_PORT_DECLARATION__BIP_ANNOTATIONS = PortPackage.PORT_DECLARATION_FEATURE_COUNT + 0;\n\n /**\n * The feature id for the '<em><b>Port Declaration References</b></em>' reference list.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXPORT_PORT_DECLARATION__PORT_DECLARATION_REFERENCES = PortPackage.PORT_DECLARATION_FEATURE_COUNT + 1;\n\n /**\n * The number of structural features of the '<em>Export Port Declaration</em>' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n * @ordered\n */\n int ATOM_EXPORT_PORT_DECLARATION_FEATURE_COUNT = PortPackage.PORT_DECLARATION_FEATURE_COUNT + 2;\n\n /**\n * The meta object id for the '{@link bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy <em>Event Consumption Policy</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getEventConsumptionPolicy()\n * @generated\n */\n int EVENT_CONSUMPTION_POLICY = 5;\n\n /**\n * Returns the meta object for class '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration <em>Internal External Port Declaration</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Internal External Port Declaration</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration\n * @generated\n */\n EClass getAtomInternalExternalPortDeclaration();\n\n /**\n * Returns the meta object for class '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalPortDeclaration <em>Internal Port Declaration</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Internal Port Declaration</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalPortDeclaration\n * @generated\n */\n EClass getAtomInternalPortDeclaration();\n\n /**\n * Returns the meta object for class '{@link bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration <em>External Port Declaration</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>External Port Declaration</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration\n * @generated\n */\n EClass getAtomExternalPortDeclaration();\n\n /**\n * Returns the meta object for the attribute '{@link bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration#getBackendName <em>Backend Name</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Backend Name</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration#getBackendName()\n * @see #getAtomExternalPortDeclaration()\n * @generated\n */\n EAttribute getAtomExternalPortDeclaration_BackendName();\n\n /**\n * Returns the meta object for the attribute '{@link bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration#getPolicy <em>Policy</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Policy</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomExternalPortDeclaration#getPolicy()\n * @see #getAtomExternalPortDeclaration()\n * @generated\n */\n EAttribute getAtomExternalPortDeclaration_Policy();\n\n /**\n * Returns the meta object for class '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalDataDeclaration <em>Internal Data Declaration</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Internal Data Declaration</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalDataDeclaration\n * @generated\n */\n EClass getAtomInternalDataDeclaration();\n\n /**\n * Returns the meta object for the attribute '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalDataDeclaration#isExported <em>Exported</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the attribute '<em>Exported</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalDataDeclaration#isExported()\n * @see #getAtomInternalDataDeclaration()\n * @generated\n */\n EAttribute getAtomInternalDataDeclaration_Exported();\n\n /**\n * Returns the meta object for class '{@link bip2.ujf.verimag.bip.component.atom.AtomExportPortDeclaration <em>Export Port Declaration</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for class '<em>Export Port Declaration</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomExportPortDeclaration\n * @generated\n */\n EClass getAtomExportPortDeclaration();\n\n /**\n * Returns the meta object for the reference list '{@link bip2.ujf.verimag.bip.component.atom.AtomExportPortDeclaration#getPortDeclarationReferences <em>Port Declaration References</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for the reference list '<em>Port Declaration References</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.AtomExportPortDeclaration#getPortDeclarationReferences()\n * @see #getAtomExportPortDeclaration()\n * @generated\n */\n EReference getAtomExportPortDeclaration_PortDeclarationReferences();\n\n /**\n * Returns the meta object for enum '{@link bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy <em>Event Consumption Policy</em>}'.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @return the meta object for enum '<em>Event Consumption Policy</em>'.\n * @see bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy\n * @generated\n */\n EEnum getEventConsumptionPolicy();\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 AtomFactory getAtomFactory();\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 bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration <em>Internal External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalExternalPortDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomInternalExternalPortDeclaration();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl <em>Internal Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalPortDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomInternalPortDeclaration();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl <em>External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExternalPortDeclaration()\n * @generated\n */\n EClass ATOM_EXTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomExternalPortDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Backend Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_EXTERNAL_PORT_DECLARATION__BACKEND_NAME = eINSTANCE\n .getAtomExternalPortDeclaration_BackendName();\n\n /**\n * The meta object literal for the '<em><b>Policy</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_EXTERNAL_PORT_DECLARATION__POLICY = eINSTANCE\n .getAtomExternalPortDeclaration_Policy();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl <em>Internal Data Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalDataDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_DATA_DECLARATION = eINSTANCE\n .getAtomInternalDataDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Exported</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_INTERNAL_DATA_DECLARATION__EXPORTED = eINSTANCE\n .getAtomInternalDataDeclaration_Exported();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl <em>Export Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExportPortDeclaration()\n * @generated\n */\n EClass ATOM_EXPORT_PORT_DECLARATION = eINSTANCE\n .getAtomExportPortDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Port Declaration References</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ATOM_EXPORT_PORT_DECLARATION__PORT_DECLARATION_REFERENCES = eINSTANCE\n .getAtomExportPortDeclaration_PortDeclarationReferences();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy <em>Event Consumption Policy</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getEventConsumptionPolicy()\n * @generated\n */\n EEnum EVENT_CONSUMPTION_POLICY = eINSTANCE.getEventConsumptionPolicy();\n\n }\n\n}",
"public int getAtomCount() {\n return atomCount;\n }",
"static public Rule parse(OrchestraSystem catalog, String rule, \r\n\t\t\tMap<String,RelationContext> locals) throws ParseException, RelationNotFoundException {\r\n\t\tHolder<Integer> counter = new Holder<Integer>(0);\r\n\t\tPositionedString str = new PositionedString(rule);\r\n\t\tstr.skipWhitespace();\r\n\t\tUntypedAtom h = UntypedAtom.parse(str, counter);\r\n\t\tboolean negateHead = false;\r\n\t\tif (h.getName().startsWith(\"NOT_\")) {\r\n\t\t\th.setName(h.getName().substring(4));\r\n\t\t\tnegateHead = true;\r\n\t\t}\r\n\r\n\t\tstr.skipWhitespace();\r\n\t\tif (!str.skipString(\":-\")) {\r\n\t\t\tcomplain(str, \"':-'\");\r\n\t\t}\r\n\t\tstr.skipWhitespace();\r\n\t\tArrayList<Atom> body = new ArrayList<Atom>();\r\n\t\tboolean first = true;\r\n\t\tstr.skipWhitespace();\r\n\t\twhile (str.inRange()) {\r\n\t\t\tif (first) {\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\tif (!str.skipString(\",\")) {\r\n\t\t\t\t\tcomplain(str, \"','\");\r\n\t\t\t\t}\r\n\t\t\t\tstr.skipWhitespace();\r\n\t\t\t}\r\n\t\t\tUntypedAtom b = UntypedAtom.parse(str, counter);\r\n\t\t\tboolean isNegated = false;\r\n\t\t\tif (b.getName().startsWith(\"NOT_\")) {\r\n\t\t\t\tisNegated = true;\r\n\t\t\t\tb.setName(b.getName().substring(4));\r\n\t\t\t}\r\n\t\t\tAtom n = b.getTyped(catalog, locals);\r\n\t\t\tn.setNeg(isNegated);\r\n\t\t\tbody.add(n);\r\n\t\t\tstr.skipWhitespace();\r\n\t\t}\r\n\t\tAtom th;\r\n\t\ttry {\r\n\t\t\tth = h.getTyped(catalog, locals);\r\n\t\t} catch (ParseException e) {\r\n\t\t\tth = h.getTyped(body);\r\n\t\t\t// Add this as a local view definition\r\n\t\t\tif (!locals.containsKey(th.getRelationContext().toString()))\r\n\t\t\t\tlocals.put(th.getRelationContext().toString(), th.getRelationContext());\r\n\t\t} catch (RelationNotFoundException e) {\r\n\t\t\tth = h.getTyped(body);\r\n\t\t\t// Add this as a local view definition\r\n\t\t\tif (!locals.containsKey(th.getRelationContext().toString()))\r\n\t\t\t\tlocals.put(th.getRelationContext().toString(), th.getRelationContext());\r\n\t\t}\r\n\t\tth.setNeg(negateHead);\r\n\r\n\t\treturn new Rule(th, body, null, catalog.getMappingDb().getBuiltInSchemas());\r\n\t}",
"@Override\n protected void executeCommands(ITextTokenStream<BasicTextTokenType> stream) {\n TextToken<BasicTextTokenType> object = stream.getFirstObject();\n String token = object == null ? null : object.getStandardToken();\n if (token != null) {\n if (stream.getVerb() != null){\n switch (stream.getVerb().getType()) {\n case ATTACK:\n attackMob(token, object);\n break;\n case LOOK:\n lookAt(token, object);\n break;\n case MOVE:\n movePlayer(token, object);\n break;\n case GET:\n getItemFromRoom(token, object);\n break;\n case LOOT:\n lootAll(token, object);\n break;\n case DROP:\n dropItem(token, object);\n break;\n case EQUIP: // effect replaced with LOCK\n lock(token, object);\n //equipItem(token, object);\n break;\n case UNEQUIP: // effect replaced with UNLOCK\n unlock(token, object);\n //unequipItem(token, object);\n break;\n case INFO:\n info(token, object);\n break;\n case QUIT:\n quitGame();\n break;\n default:\n return;\n }\n }\n // For objects that can also be used to infer their verbs\n else {\n switch (object.getType()) {\n case DIRECTION:\n movePlayer(token, object);\n break;\n case INVENTORY:\n info(token, object);\n break;\n case HEALTH:\n info(token, object);\n break;\n default:\n return;\n }\n }\n\n } else {\n return;\n }\n\n }",
"private AssociationKind(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"interface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.impl.NodeImpl <em>Node</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.impl.NodeImpl\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getNode()\n\t\t * @generated\n\t\t */\n\t\tEClass NODE = eINSTANCE.getNode();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute NODE__NAME = eINSTANCE.getNode_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Description</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute NODE__DESCRIPTION = eINSTANCE.getNode_Description();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Vulnerabilities</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference NODE__VULNERABILITIES = eINSTANCE.getNode_Vulnerabilities();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Propagations</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference NODE__PROPAGATIONS = eINSTANCE.getNode_Propagations();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Related Object</b></em>' reference feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference NODE__RELATED_OBJECT = eINSTANCE.getNode_RelatedObject();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tags</b></em>' attribute list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute NODE__TAGS = eINSTANCE.getNode_Tags();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Domains</b></em>' attribute list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute NODE__DOMAINS = eINSTANCE.getNode_Domains();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.impl.VulnerabilityImpl <em>Vulnerability</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.impl.VulnerabilityImpl\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getVulnerability()\n\t\t * @generated\n\t\t */\n\t\tEClass VULNERABILITY = eINSTANCE.getVulnerability();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute VULNERABILITY__NAME = eINSTANCE.getVulnerability_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Description</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute VULNERABILITY__DESCRIPTION = eINSTANCE.getVulnerability_Description();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Severity</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute VULNERABILITY__SEVERITY = eINSTANCE.getVulnerability_Severity();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Type</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute VULNERABILITY__TYPE = eINSTANCE.getVulnerability_Type();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Propagations</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference VULNERABILITY__PROPAGATIONS = eINSTANCE.getVulnerability_Propagations();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tags</b></em>' attribute list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute VULNERABILITY__TAGS = eINSTANCE.getVulnerability_Tags();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.impl.PropagationImpl <em>Propagation</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.impl.PropagationImpl\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getPropagation()\n\t\t * @generated\n\t\t */\n\t\tEClass PROPAGATION = eINSTANCE.getPropagation();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Destinations</b></em>' reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference PROPAGATION__DESTINATIONS = eINSTANCE.getPropagation_Destinations();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Severity</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute PROPAGATION__SEVERITY = eINSTANCE.getPropagation_Severity();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Tags</b></em>' attribute list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute PROPAGATION__TAGS = eINSTANCE.getPropagation_Tags();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Type</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute PROPAGATION__TYPE = eINSTANCE.getPropagation_Type();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.impl.ModelImpl <em>Model</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.impl.ModelImpl\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getModel()\n\t\t * @generated\n\t\t */\n\t\tEClass MODEL = eINSTANCE.getModel();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Name</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute MODEL__NAME = eINSTANCE.getModel_Name();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Description</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute MODEL__DESCRIPTION = eINSTANCE.getModel_Description();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEReference MODEL__NODES = eINSTANCE.getModel_Nodes();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.vulnerabilityType <em>vulnerability Type</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.vulnerabilityType\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getvulnerabilityType()\n\t\t * @generated\n\t\t */\n\t\tEEnum VULNERABILITY_TYPE = eINSTANCE.getvulnerabilityType();\n\n\t\t/**\n\t\t * The meta object literal for the '{@link edu.cmu.attackimpact.propagationType <em>propagation Type</em>}' enum.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see edu.cmu.attackimpact.propagationType\n\t\t * @see edu.cmu.attackimpact.impl.AttackImpactPackageImpl#getpropagationType()\n\t\t * @generated\n\t\t */\n\t\tEEnum PROPAGATION_TYPE = eINSTANCE.getpropagationType();\n\n\t}",
"private PseudostateKind(int value, String name, String literal) {\r\n\t\tthis.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;\r\n\t}",
"public interface DialogAct {\n\t/**\n\t * Get the utterance of the dialog act.\n\t * */\n public String getUtterance();\n\t\n\t/**\n\t * Get the tag of the utterance.\n\t * */\n\tpublic String getTag();\n\t\n\t/**\n\t * Set the utterance of the dialog act.\n\t * @param utterance the utterance String\n\t * */\n public void setUtterance(String utterance);\n public void setContent(String content);\n\t\n\t/**\n\t * Set the tag of the utterance.\n\t * @param tag the tag of the utterance as a String\n\t * */\n\tpublic void setTag(String tag);\n\t\n \n\t/**\n\t * Get the standard tag of the utterance\n\t * according to some standard tag set.\n\t * */\n\tpublic String getStandardTag();\n\t\n\tpublic String getStandardTag(String _tag);\n \n\tpublic boolean isStandardTag(String tag);\n\t\n}",
"interface Literals {\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration <em>Internal External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.AtomInternalExternalPortDeclaration\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalExternalPortDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_EXTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomInternalExternalPortDeclaration();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl <em>Internal Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalPortDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomInternalPortDeclaration();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl <em>External Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExternalPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExternalPortDeclaration()\n * @generated\n */\n EClass ATOM_EXTERNAL_PORT_DECLARATION = eINSTANCE\n .getAtomExternalPortDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Backend Name</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_EXTERNAL_PORT_DECLARATION__BACKEND_NAME = eINSTANCE\n .getAtomExternalPortDeclaration_BackendName();\n\n /**\n * The meta object literal for the '<em><b>Policy</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_EXTERNAL_PORT_DECLARATION__POLICY = eINSTANCE\n .getAtomExternalPortDeclaration_Policy();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl <em>Internal Data Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomInternalDataDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomInternalDataDeclaration()\n * @generated\n */\n EClass ATOM_INTERNAL_DATA_DECLARATION = eINSTANCE\n .getAtomInternalDataDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Exported</b></em>' attribute feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EAttribute ATOM_INTERNAL_DATA_DECLARATION__EXPORTED = eINSTANCE\n .getAtomInternalDataDeclaration_Exported();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl <em>Export Port Declaration</em>}' class.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomExportPortDeclarationImpl\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getAtomExportPortDeclaration()\n * @generated\n */\n EClass ATOM_EXPORT_PORT_DECLARATION = eINSTANCE\n .getAtomExportPortDeclaration();\n\n /**\n * The meta object literal for the '<em><b>Port Declaration References</b></em>' reference list feature.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n EReference ATOM_EXPORT_PORT_DECLARATION__PORT_DECLARATION_REFERENCES = eINSTANCE\n .getAtomExportPortDeclaration_PortDeclarationReferences();\n\n /**\n * The meta object literal for the '{@link bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy <em>Event Consumption Policy</em>}' enum.\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @see bip2.ujf.verimag.bip.component.atom.EventConsumptionPolicy\n * @see bip2.ujf.verimag.bip.component.atom.impl.AtomPackageImpl#getEventConsumptionPolicy()\n * @generated\n */\n EEnum EVENT_CONSUMPTION_POLICY = eINSTANCE.getEventConsumptionPolicy();\n\n }",
"private final boolean IsAtomic(String expression) {\r\n if (this._kripke.Atoms.contains(expression)) {\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"protected void createSemanticAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/semantic\";\t\n\t\taddAnnotation\n\t\t (this, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedRequirementPkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedAbstractCapabilityPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedInterfacePkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedDataPkg(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlock_OwnedStateMachines(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"feature\", \"ownedFeatures\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_OwnedPhysicalLinkCategories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (partEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_OwnedAbstractType(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_DataComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfacePkgEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfacePkg_OwnedInterfacePkgs(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (interfaceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_Mechanism(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_OwnedExchangeItemAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (exchangeItemAllocationEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_SendProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_ReceiveProtocol(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatedItem(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_DeployedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractDeploymentLink_Location(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_LinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_OwnedPhysicalLinkEnds(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_Categories(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkCategoryEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkCategory_Links(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalLinkEndEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Port(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLinkEnd_Part(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_OwnedPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathInvolvementEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_NextInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPathReferenceEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (physicalPortEClass, \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"excludefrom\", \"xmlpivot\"\n\t\t });\n\t}",
"public static SeekInfoStruct parseSeekInfoLine(String line) {\n StringTokenizer tokens = new StringTokenizer(line, \" -=\");\n\n boolean canAcceptSeek;\n String identifier = tokens.nextToken();\n if (identifier.equals(\"<s>\")) // Skip the <s> identifier\n canAcceptSeek = true;\n else if (identifier.equals(\"<sn>\")) canAcceptSeek = false;\n else throw new IllegalArgumentException(\"Missing \\\"<s>\\\" or \\\"<sn>\\\" identifier\");\n\n int index = Integer.parseInt(tokens.nextToken());\n\n assertToken(tokens, \"w\"); // w=\n String name = tokens.nextToken();\n\n assertToken(tokens, \"ti\"); // ti=\n int titles = Integer.parseInt(tokens.nextToken(), 16);\n\n assertToken(tokens, \"rt\"); // rt=\n String ratingString = tokens.nextToken();\n char provShow = ' ';\n if (!Character.isDigit(ratingString.charAt(ratingString.length() - 1))) {\n provShow = ratingString.charAt(ratingString.length() - 1);\n ratingString = ratingString.substring(0, ratingString.length() - 1);\n }\n int rating = Integer.parseInt(ratingString);\n\n assertToken(tokens, \"t\"); // t=\n int time = Integer.parseInt(tokens.nextToken());\n\n assertToken(tokens, \"i\"); // i=\n int inc = Integer.parseInt(tokens.nextToken());\n\n assertToken(tokens, \"r\"); // r=\n boolean isRated = tokens.nextToken().equals(\"r\");\n\n assertToken(tokens, \"tp\"); // tp=\n String matchType = tokens.nextToken();\n\n assertToken(tokens, \"c\"); // c=\n char requestedColor = tokens.nextToken().charAt(0);\n\n assertToken(tokens, \"rr\"); // rr=\n int minRating = Integer.parseInt(tokens.nextToken());\n int maxRating = Integer.parseInt(tokens.nextToken());\n\n assertToken(tokens, \"a\"); // a=\n boolean isAutomaticAccept = tokens.nextToken().equals(\"t\");\n\n assertToken(tokens, \"f\"); // f=\n boolean isFormulaUsed = tokens.nextToken().equals(\"t\");\n\n return new SeekInfoStruct(\n canAcceptSeek,\n index,\n name,\n titles,\n rating,\n provShow,\n time,\n inc,\n isRated,\n matchType,\n requestedColor,\n minRating,\n maxRating,\n isAutomaticAccept,\n isFormulaUsed);\n }",
"public final void mAT() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = AT;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:430:3: ( '@' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:430:16: '@'\n\t\t\t{\n\t\t\tmatch('@'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public ConceptToken(String token) {\n _multiToken = false;\n _text = \"\";\n _tokens = new String[]{token};\n }",
"public static void processFeed(FeedContext fc, Feed feed) {\n try {\n\t\t\tAbderaAtomParser parser = new AbderaAtomParser(feed);\n\t\t\tparser.persistFeed(fc);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tmLog.error(\"Error processing feed at [\" + fc.getFeedUrl() + \"]: \" + e.getMessage());\n\t\t}\n }",
"private int parseWord(Token token, char[] buffer, int offset, int type){\nfromStart:\n for(int i=offset; i<buffer.length; ++i){\n for(int x=0; x < characters[type].length; ++x){\n if(buffer[i] == characters[type][x]){\n token.identifier += buffer[i];\n continue fromStart;\n }\n }\n // If it gets here, the character currently parsed isn't of the same type \n return i;\n }\n // Found end of file\n return offset+buffer.length;\n }",
"public ConcordanceToken(String text, String tag, int tokenNum, int partNum, String... stems) {\r\n\t\tsuper(text, tag, 0l, stems);\r\n\t\tif(tokenNum < 0)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tif(partNum < 0)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tthis.tokenNum = tokenNum;\r\n\t\tthis.partNum = partNum;\r\n\t}",
"private void generateAntecedent(Element element, Set<SWRLAtom> antecedent) throws Exception {\n String name = element.getAttribute(\"name\");\n name = TextUtil.formatName(name);\n String operator = element.getAttribute(\"operator\");\n String value = element.getAttribute(\"value\");\n constructAtom(name, antecedent, value, operator);\n //System.out.printf(\"%s %s %s\\n\", name, operator, value);\n }",
"public void getTagCommand() {\n\n }",
"public PDAnnotationAdditionalActions(COSDictionary a) {\n/* 49 */ this.actions = a;\n/* */ }",
"Expr term() throws IOException {\n\t\tExpr e = unary();\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, unary());\n\t\t}\n\t\treturn e;\n\t}",
"void visit(Object node, String command);",
"public void setAtoms(IAtom[] atoms) {\n this.atoms = atoms;\n atomCount = atoms.length;\n notifyChanged();\n }",
"private Token token(final TermToken tt) {\n return tt.hasLexicalToken() ? tt.token().token() : null;\n }",
"public IAtom getAtom(int position) {\n if (atoms == null) return null;\n else return atoms[position];\n }",
"public Token(String tipo, String lexema){\n\t\tthis.tipo = tipo;\n\t\tthis.lexema = lexema;\n\t}",
"String getCTag();",
"public interface Symbol {\r\n String getFullId();\r\n String getId(); // scoped to parent id\r\n String getFullParentId();\r\n String getDescriptiveName();\r\n String getHRef(String preDir);\r\n String getFileLocation();\r\n\r\n Type getType();\r\n\r\n enum Type {\r\n Dir,File,Other\r\n }\r\n}",
"public interface PerlTokenSets extends PerlElementTypes, MooseElementTypes {\n TokenSet OPERATORS_TOKENSET = TokenSet.create(\n OPERATOR_CMP_NUMERIC,\n OPERATOR_LT_NUMERIC,\n OPERATOR_GT_NUMERIC,\n\n OPERATOR_CMP_STR,\n OPERATOR_LE_STR,\n OPERATOR_GE_STR,\n OPERATOR_EQ_STR,\n OPERATOR_NE_STR,\n OPERATOR_LT_STR,\n OPERATOR_GT_STR,\n\n OPERATOR_HELLIP,\n OPERATOR_FLIP_FLOP,\n OPERATOR_CONCAT,\n\n OPERATOR_PLUS_PLUS,\n OPERATOR_MINUS_MINUS,\n OPERATOR_POW,\n\n OPERATOR_RE,\n OPERATOR_NOT_RE,\n\n //\t\t\tOPERATOR_HEREDOC, // this is an artificial operator, not the real one; fixme uncommenting breaks parsing of print $of <<EOM\n OPERATOR_SHIFT_LEFT,\n OPERATOR_SHIFT_RIGHT,\n\n OPERATOR_AND,\n OPERATOR_OR,\n OPERATOR_OR_DEFINED,\n OPERATOR_NOT,\n\n OPERATOR_ASSIGN,\n\n QUESTION,\n COLON,\n\n OPERATOR_REFERENCE,\n\n OPERATOR_DIV,\n OPERATOR_MUL,\n OPERATOR_MOD,\n OPERATOR_PLUS,\n OPERATOR_MINUS,\n\n OPERATOR_BITWISE_NOT,\n OPERATOR_BITWISE_AND,\n OPERATOR_BITWISE_OR,\n OPERATOR_BITWISE_XOR,\n\n OPERATOR_AND_LP,\n OPERATOR_OR_LP,\n OPERATOR_XOR_LP,\n OPERATOR_NOT_LP,\n\n COMMA,\n FAT_COMMA,\n\n OPERATOR_DEREFERENCE,\n\n OPERATOR_X,\n OPERATOR_FILETEST,\n\n // syntax operators\n OPERATOR_POW_ASSIGN,\n OPERATOR_PLUS_ASSIGN,\n OPERATOR_MINUS_ASSIGN,\n OPERATOR_MUL_ASSIGN,\n OPERATOR_DIV_ASSIGN,\n OPERATOR_MOD_ASSIGN,\n OPERATOR_CONCAT_ASSIGN,\n OPERATOR_X_ASSIGN,\n OPERATOR_BITWISE_AND_ASSIGN,\n OPERATOR_BITWISE_OR_ASSIGN,\n OPERATOR_BITWISE_XOR_ASSIGN,\n OPERATOR_SHIFT_LEFT_ASSIGN,\n OPERATOR_SHIFT_RIGHT_ASSIGN,\n OPERATOR_AND_ASSIGN,\n OPERATOR_OR_ASSIGN,\n OPERATOR_OR_DEFINED_ASSIGN,\n\n OPERATOR_GE_NUMERIC,\n OPERATOR_LE_NUMERIC,\n OPERATOR_EQ_NUMERIC,\n OPERATOR_NE_NUMERIC,\n OPERATOR_SMARTMATCH\n );\n\n TokenSet DEFAULT_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_MY,\n RESERVED_OUR,\n RESERVED_STATE,\n RESERVED_LOCAL,\n RESERVED_ELSIF,\n RESERVED_ELSE,\n RESERVED_GIVEN,\n RESERVED_DEFAULT,\n RESERVED_CONTINUE,\n RESERVED_FORMAT,\n RESERVED_SUB,\n RESERVED_PACKAGE,\n RESERVED_USE,\n RESERVED_NO,\n RESERVED_REQUIRE,\n RESERVED_UNDEF,\n RESERVED_PRINT,\n RESERVED_PRINTF,\n RESERVED_SAY,\n RESERVED_GREP,\n RESERVED_MAP,\n RESERVED_SORT,\n RESERVED_DO,\n RESERVED_EVAL,\n RESERVED_GOTO,\n RESERVED_REDO,\n RESERVED_NEXT,\n RESERVED_LAST,\n RESERVED_RETURN,\n\n RESERVED_Y,\n RESERVED_TR,\n RESERVED_Q,\n RESERVED_S,\n RESERVED_M,\n RESERVED_QW,\n RESERVED_QQ,\n RESERVED_QR,\n RESERVED_QX,\n\n RESERVED_IF,\n RESERVED_UNTIL,\n RESERVED_UNLESS,\n RESERVED_FOR,\n RESERVED_FOREACH,\n RESERVED_WHEN,\n RESERVED_WHILE\n );\n\n TokenSet TRY_CATCH_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_TRY,\n RESERVED_CATCH,\n RESERVED_FINALLY,\n RESERVED_CATCH_WITH,\n RESERVED_EXCEPT,\n RESERVED_OTHERWISE,\n RESERVED_CONTINUATION\n );\n\n TokenSet METHOD_SIGNATURES_KEYWORDS_TOKENSET = TokenSet.create(\n RESERVED_METHOD,\n RESERVED_FUNC\n );\n\n TokenSet KEYWORDS_TOKENSET = TokenSet.orSet(\n DEFAULT_KEYWORDS_TOKENSET,\n MOOSE_RESERVED_TOKENSET,\n METHOD_SIGNATURES_KEYWORDS_TOKENSET,\n TRY_CATCH_KEYWORDS_TOKENSET\n );\n\n TokenSet ANNOTATIONS_KEYS = TokenSet.create(\n ANNOTATION_DEPRECATED_KEY,\n ANNOTATION_RETURNS_KEY,\n ANNOTATION_OVERRIDE_KEY,\n ANNOTATION_METHOD_KEY,\n ANNOTATION_ABSTRACT_KEY,\n ANNOTATION_INJECT_KEY,\n ANNOTATION_NOINSPECTION_KEY,\n ANNOTATION_TYPE_KEY\n\n );\n\n TokenSet STRING_CONTENT_TOKENSET = TokenSet.create(\n STRING_CONTENT,\n STRING_CONTENT_XQ,\n STRING_CONTENT_QQ\n );\n\n TokenSet HEREDOC_BODIES_TOKENSET = TokenSet.create(\n HEREDOC,\n HEREDOC_QQ,\n HEREDOC_QX\n );\n\n\n TokenSet QUOTE_MIDDLE = TokenSet.create(REGEX_QUOTE, REGEX_QUOTE_E);\n\n TokenSet QUOTE_OPEN_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_OPEN, REGEX_QUOTE_OPEN_E),\n PerlParserUtil.OPEN_QUOTES,\n QUOTE_MIDDLE\n );\n\n TokenSet QUOTE_CLOSE_FIRST_ANY = TokenSet.orSet(\n TokenSet.create(REGEX_QUOTE_CLOSE),\n QUOTE_MIDDLE,\n CLOSE_QUOTES\n );\n\n TokenSet QUOTE_CLOSE_PAIRED = TokenSet.orSet(\n CLOSE_QUOTES,\n TokenSet.create(REGEX_QUOTE_CLOSE)\n );\n\n TokenSet SIGILS = TokenSet.create(\n SIGIL_SCALAR, SIGIL_ARRAY, SIGIL_HASH, SIGIL_GLOB, SIGIL_CODE, SIGIL_SCALAR_INDEX\n );\n\n TokenSet STATEMENTS = TokenSet.create(\n STATEMENT, USE_STATEMENT, NO_STATEMENT\n );\n\n TokenSet LAZY_CODE_BLOCKS = TokenSet.create(LP_CODE_BLOCK, LP_CODE_BLOCK_WITH_TRYCATCH);\n\n TokenSet LAZY_PARSABLE_REGEXPS = TokenSet.create(\n LP_REGEX_REPLACEMENT,\n LP_REGEX,\n LP_REGEX_X,\n LP_REGEX_XX\n );\n\n TokenSet HEREDOC_ENDS = TokenSet.create(HEREDOC_END, HEREDOC_END_INDENTABLE);\n /**\n * Quote openers with three or four quotes\n */\n TokenSet COMPLEX_QUOTE_OPENERS = TokenSet.create(\n RESERVED_S,\n RESERVED_TR,\n RESERVED_Y\n );\n TokenSet SIMPLE_QUOTE_OPENERS = TokenSet.create(\n RESERVED_Q,\n RESERVED_QQ,\n RESERVED_QX,\n RESERVED_QW,\n RESERVED_QR,\n RESERVED_M\n );\n}",
"public void visit(Literal literal) {}",
"public abstract void commit(Iterable<? extends GroundAtom> atoms);"
] | [
"0.616844",
"0.5770801",
"0.56670976",
"0.5632344",
"0.546262",
"0.5293077",
"0.52831876",
"0.52730656",
"0.51973397",
"0.5122416",
"0.50962996",
"0.5056018",
"0.50326985",
"0.49651882",
"0.49540398",
"0.49320215",
"0.4924912",
"0.49068633",
"0.48886305",
"0.483588",
"0.4828878",
"0.47899607",
"0.47899607",
"0.47759175",
"0.47636634",
"0.47613558",
"0.4720797",
"0.46943095",
"0.4686318",
"0.46842903",
"0.46806785",
"0.46705207",
"0.46606576",
"0.4648058",
"0.46284407",
"0.46259555",
"0.4619382",
"0.45955136",
"0.4583681",
"0.4580375",
"0.45541522",
"0.4542318",
"0.4539187",
"0.4531684",
"0.45230088",
"0.4521914",
"0.45212162",
"0.45161083",
"0.4507632",
"0.45050472",
"0.45016497",
"0.4500026",
"0.44972056",
"0.44961384",
"0.44924715",
"0.4483642",
"0.4482481",
"0.4460153",
"0.4457222",
"0.44524553",
"0.44483897",
"0.4445681",
"0.4441075",
"0.44394925",
"0.4434703",
"0.44229263",
"0.44194993",
"0.44169202",
"0.4416037",
"0.44156083",
"0.4412536",
"0.44034964",
"0.44009373",
"0.43992102",
"0.4394624",
"0.43904755",
"0.43851322",
"0.43805534",
"0.43771893",
"0.4377105",
"0.43681392",
"0.4362933",
"0.43583152",
"0.43484518",
"0.4347923",
"0.43478584",
"0.43466693",
"0.43454427",
"0.4344627",
"0.4338487",
"0.43377495",
"0.4334548",
"0.43278548",
"0.43249285",
"0.4323733",
"0.43227637",
"0.43204677",
"0.4317346",
"0.43167064",
"0.43156376"
] | 0.6864577 | 0 |
equals = equals "=" gap | private boolean equals() {
return MARK(EQUALS) && CHAR('=') && gap();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@TestProperties(name=\"test equal sign parameters for test\")\n\tpublic void testParametersWithEquals() throws Exception {\n\t\tjsystem.launch();\n//\t\tScenarioUtils.createAndCleanScenario(jsystem, ScenariosManager.getInstance().getCurrentScenario().getScenarioName());\n\t\tScenarioUtils.createAndCleanScenario(jsystem, jsystem.getCurrentScenario());\n\t\tjsystem.addTest(\"testWithInclueParametersNewLine\", \"ParamaetersHandlingSection\", true);\n\t\tjsystem.setTestParameter(1, \"General\", \"Str8\", \"x=2=3=4, v b n eee=,\", false);\n\t\tjsystem.play();\n\t\tjsystem.waitForRunEnd();\n\t\tjsystem.checkNumberOfTestsPass(1);\n\t\tString propValue = \n\t\t\tgetRunProperties().getProperty(\"testWithInclueParametersNewLine_str8\");\n\t\tassertEquals(\"x=2=3=4, v b n eee=,\", propValue);\n\t}",
"String getEqual();",
"@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }",
"@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}",
"public static void equalsDemo() {\n\n//\t\tSystem.out.printf(\"demo1 == demo2 = %s%n\", demo1 == demo2);\n//\t\tSystem.out.printf(\"demo2 == demo3 = %s%n\", demo2 == demo3);\n//\t\tSystem.out.printf(\"demo2.equals(demo3) = %s%n\", demo2.equals(demo3));\n//\t\tSystem.out.printf(\"%n\");\n\t}",
"@Test\n\tpublic void ifYouEncounterEqualsThenThatsNotAPattern() {\n\t\tfinal Tokenizable line = line(\"=\");\n\t\tcontext.checking(new Expectations() {{\n\t\t}});\n\t\tTDAPatternParser parser = new TDAPatternParser(errors, vnamer, builder, topLevel);\n\t\tTDAParsing nested = parser.tryParsing(line);\n\t\tassertNull(nested);\n\t\tassertEquals(0, line.at());\n\t}",
"public final void mEQUALS() throws RecognitionException {\n try {\n int _type = EQUALS;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2763:3: ( '=' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2764:3: '='\n {\n match('='); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public final void mEQUALS() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = EQUALS;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:435:7: ( '=' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:435:16: '='\n\t\t\t{\n\t\t\tmatch('='); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public boolean isEquals() {\n long len = -1L;\n\n //1. check the lengths of the words\n for(S left : slp.getAxioms()) {\n if(len == -1L) {\n len = slp.length(left);\n }\n else {\n if(len != slp.length(left)) {\n return false;\n }\n }\n }\n\n // all words are the empty word\n if(len == 0) {\n return true;\n }\n\n // 2. the length are all equals and not zero => execute the recompression\n execute();\n\n S otherSymbol = null;\n boolean first = true;\n\n // 3. chech now if for all axioms X : |val(X)| = 1 and all val(X) are equals.\n for(S left : slp.getAxioms()) {\n if(first) {\n slp.length(left, true);\n first = false;\n }\n\n if(slp.length(left) != 1) {\n return false;\n }\n else {\n S symbol = slp.get(left, 1);\n if(otherSymbol == null) {\n otherSymbol = symbol;\n }\n\n if(!symbol.equals(otherSymbol)) {\n return false;\n }\n }\n }\n\n return true;\n }",
"@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }",
"private Token scanAmbiguousWithEquals() {\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n buffer.add(c);\n int nextChar = in.read();\n TokenType type;\n\n // operators '>=', '<=' and ':='\n if (nextChar == '=') {\n buffer.add(nextChar);\n switch (c) {\n case '>' -> type = TokenType.GEQUALS;\n case '<' -> type = TokenType.LEQUALS;\n case ':' -> type = TokenType.ASSIGN;\n default -> type = null;\n }\n c = in.read();\n }\n // operators '>', '<', ':'\n else {\n switch (c) {\n case '>' -> type = TokenType.GREATER;\n case '<' -> type = TokenType.LESS;\n case ':' -> type = TokenType.COLON;\n default -> type = null;\n }\n c = nextChar;\n }\n Token tok = new Token(buffer.toString(), type, pos);\n buffer.flush();\n return tok;\n }",
"@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }",
"private static String writeEqualsSigns(int number) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tsb.append((\"=\"));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public Snippet visit(EqualsExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f2 = n.identifier1.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp+\" == \"+f2.returnTemp;\n\t return _ret;\n\t }",
"@Override\n protected boolean runInEQ() {\n return true;\n }",
"@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}",
"private static boolean equalityTest1(String a, String b)\n {\n return a == b;\n }",
"private void asserEquals(int esperado, int resultado) {\n\t\t\r\n\t}",
"private boolean oneEquals(AccessPath that) {\n //if (this._n != that._n) return false;\n if (this._field != that._field) return false;\n if (this._last != that._last) return false;\n if (this.succ.size() != that.succ.size()) return false;\n return true;\n }",
"@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}",
"@Override\n protected String stringifySeparator() {\n return \" != \";\n }",
"private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }",
"public final EObject ruleEqualsOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4540:28: ( ( () otherlv_1= '==' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:1: ( () otherlv_1= '==' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: () otherlv_1= '=='\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4541:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4542:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getEqualsOperatorAccess().getEqualsOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,55,FOLLOW_55_in_ruleEqualsOperator9973); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getEqualsOperatorAccess().getEqualsSignEqualsSignKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public String getName()\n {\n return \"equal\";\n }",
"@Test\n public void equals_SameBuyQuery_Test() {\n Assert.assertTrue(bq1.equals(bq0));\n }",
"@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }",
"public static void main(String[] args) {\nString s1= \"adya\";\nString s2= \"adyass\"+\"a\";\nString s3= \"adyassa\";\nSystem.out.println(s3==s2);\n\t}",
"public boolean isEqual(Move m){\r\n\t\treturn m.getStartSquare()==start_sq&&m.getEndSquare()==end_sq&&(m.getModifier()==modifiers % 10);\r\n\t}",
"public final void mEQ() throws RecognitionException {\n try {\n int _type = EQ;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:166:4: ( '==' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:166:6: '=='\n {\n match(\"==\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean codepointEquals(StringValue other) {\r\n // avoid conversion of CharSequence to String if values are different lengths\r\n return value.length() == other.value.length() &&\r\n value.toString().equals(other.value.toString());\r\n // It might be better to do character-by-character comparison in all cases; or it might not.\r\n // We do it this way in the hope that string comparison compiles to native code.\r\n }",
"@Override\n\t\t\tpublic boolean visit(InfixExpression node) {\n\t\t\t\tif (node.getOperator().equals(InfixExpression.Operator.EQUALS)\n\t\t\t\t\t\t|| node.getOperator().equals(\n\t\t\t\t\t\t\t\tInfixExpression.Operator.NOT_EQUALS)) {\n\t\t\t\t\tif ( !(node.getLeftOperand() instanceof NullLiteral || node\n\t\t\t\t\t\t\t.getRightOperand() instanceof NullLiteral)\n\t\t\t\t\t\t\t&& node.getLeftOperand().resolveTypeBinding()\n\t\t\t\t\t\t\t\t\t.getQualifiedName().equals(\"java.lang.String\")) {\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * callEquals is created to write a new equals method\n\t\t\t\t\t\t * invocation\n\t\t\t\t\t\t */\n\t\t\t\t\t\tMethodInvocation callEquals = ast.newMethodInvocation();\n\t\t\t\t\t\tcallEquals.setName(ast.newSimpleName(\"equals\"));\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * expression which will invoke the equals method is\n\t\t\t\t\t\t * created from left hand expression of == comparison\n\t\t\t\t\t\t */\n\t\t\t\t\t\tExpression leftOperand = node.getLeftOperand();\n\t\t\t\t\t\tExpression newExpression = (Expression) ASTNode.copySubtree(\n\t\t\t\t\t\t\t\tast, leftOperand);\n\t\t\t\t\t\tcallEquals.setExpression(newExpression);\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * argument of equals method invocation is created from\n\t\t\t\t\t\t * right hand expression of == comparison\n\t\t\t\t\t\t */\n\t\t\t\t\t\tExpression rightOperand = node.getRightOperand();\n\t\t\t\t\t\tExpression argument = (Expression) ASTNode.copySubtree(ast,\n\t\t\t\t\t\t\t\trightOperand);\n\t\t\t\t\t\tcallEquals.arguments().add(argument);\n\n\t\t\t\t\t\t// callEquals.setExpression(ast.newSimpleName(node\n\t\t\t\t\t\t// .getLeftOperand().toString()));\n\n\t\t\t\t\t\t// StringLiteral sl1 = ast.newStringLiteral(); String\n\t\t\t\t\t\t// propname = node.getLeftOperand()\n\t\t\t\t\t\t// .resolveConstantExpressionValue().toString();\n\t\t\t\t\t\t// sl1.setLiteralValue(propname);\n\n\t\t\t\t\t\t// TextElement newTextElement = ast.newTextElement();\n\t\t\t\t\t\t// newTextElement\n\t\t\t\t\t\t// .setText(oldMethodInvocation.toString());\n\t\t\t\t\t\t// rew.replace(node, newTextElement, null);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (node.getOperator().equals(\n\t\t\t\t\t\t\t\tInfixExpression.Operator.NOT_EQUALS)) {\n\t\t\t\t\t\t\tPrefixExpression newPrefixExpression = ast\n\t\t\t\t\t\t\t\t\t.newPrefixExpression();\n\t\t\t\t\t\t\tnewPrefixExpression.setOperator(Operator.NOT);\n\t\t\t\t\t\t\tnewPrefixExpression.setOperand(callEquals);\n\n\t\t\t\t\t\t\trew.replace(node, newPrefixExpression, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\trew.replace(node, callEquals, null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}",
"@Test\n public void testEquals_3() {\n LOGGER.info(\"testEquals_3\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = null;\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }",
"private static boolean equalityTest5(String a, String b)\n {\n return a.hashCode() == b.hashCode();\n }",
"public final void rule__OpCompare__Group_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:6725:1: ( ( '=' ) )\r\n // InternalDroneScript.g:6726:1: ( '=' )\r\n {\r\n // InternalDroneScript.g:6726:1: ( '=' )\r\n // InternalDroneScript.g:6727:2: '='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpCompareAccess().getEqualsSignKeyword_1_1()); \r\n }\r\n match(input,13,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpCompareAccess().getEqualsSignKeyword_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void mEQUALS() throws RecognitionException {\n try {\n int _type = EQUALS;\n // /Users/benjamincoe/HackWars/C.g:215:12: ( '==' )\n // /Users/benjamincoe/HackWars/C.g:215:14: '=='\n {\n match(\"==\"); \n\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"public abstract String representInequality();",
"@Test\n public void testEqualsReturnsFalseOnDifferentStartVal() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }",
"@Test\n public void testEqualsReturnsFalseOnDifferentEndVal() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }",
"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 }",
"@Override\r\n\tpublic boolean isEqual(Node node) {\n\t\treturn false;\r\n\t}",
"public int actualHashForEqual() {\n\treturn getCategory().hashForEqual() + 1;\n/*\nudanax-top.st:15776:SequenceSpace methodsFor: 'testing'!\n{UInt32} actualHashForEqual\n\t\"is equal to any basic space on the same category of positions\"\n\t^self getCategory hashForEqual + 1!\n*/\n}",
"private static boolean equalityTest3(String a, String b)\n {\n return System.identityHashCode(a) == System.identityHashCode(b);\n }",
"@Override\n\tpublic void visit(EqualityNode node) {\n\t\tif (Evaluator.checkScope(node) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (Evaluator.checkAssert(node) == false) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * evaluam fiul stang si fiul drept\n\t\t */\n\t\tEvaluator.evaluate(node.getChild(0));\n\t\tEvaluator.evaluate(node.getChild(1));\n\n\t\tString s2 = null;\n\t\tString s1 = null;\n\t\t/**\n\t\t * preluam rezultatele evaluarii celor doi fii\n\t\t */\n\t\tif (node.getChild(0) instanceof Variable) {\n\t\t\ts1 = Evaluator.variables.get(node.getChild(0).getName());\n\t\t} else {\n\t\t\ts1 = node.getChild(0).getName();\n\t\t}\n\t\tif (node.getChild(1) instanceof Variable) {\n\t\t\ts2 = Evaluator.variables.get(node.getChild(1).getName());\n\t\t} else {\n\t\t\ts2 = node.getChild(1).getName();\n\t\t}\n\n\t\t/**\n\t\t * verificam daca cei doi fii s- au evaluat la aceeasi expresie\n\t\t */\n\t\tif (s1.contentEquals(s2)) {\n\t\t\tnode.setName(\"true\");\n\t\t} else {\n\t\t\tnode.setName(\"false\");\n\t\t}\n\n\t}",
"private Equals() {}",
"public final void rule__Affectation__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:1391:1: ( ( '=' ) )\n // InternalBrowser.g:1392:1: ( '=' )\n {\n // InternalBrowser.g:1392:1: ( '=' )\n // InternalBrowser.g:1393:2: '='\n {\n before(grammarAccess.getAffectationAccess().getEqualsSignKeyword_1()); \n match(input,23,FOLLOW_2); \n after(grammarAccess.getAffectationAccess().getEqualsSignKeyword_1()); \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 void rule__OpEquality__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1837:1: ( ( '==' ) | ( '!=' ) )\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0==15) ) {\n alt4=1;\n }\n else if ( (LA4_0==16) ) {\n alt4=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 4, 0, input);\n\n throw nvae;\n }\n switch (alt4) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1838:1: ( '==' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1838:1: ( '==' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1839:1: '=='\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \n }\n match(input,15,FOLLOW_15_in_rule__OpEquality__Alternatives3867); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1846:6: ( '!=' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1846:6: ( '!=' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1847:1: '!='\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \n }\n match(input,16,FOLLOW_16_in_rule__OpEquality__Alternatives3887); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \n }\n\n }\n\n\n }\n break;\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 static char getDefaultAttributeEqualitySign()\n {\n return defaults.attribute_equality_sign;\n }",
"@Test\n public void testEquals() {\n }",
"private static boolean equalityTest4(String a, String b)\n {\n if(a.length() == 0 && b.length() == 0)\n {\n return true;\n }\n else\n {\n if(a.length() == 0 || b.length() == 0)\n {\n return false;\n }\n if(a.charAt(0) == b.charAt(0))\n {\n return equalityTest4(a.substring(1), b.substring(1));\n }\n else\n {\n return false;\n }\n }\n }",
"public final void rule__AstExpressionEq__OperatorAlternatives_1_1_0() 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:2844:1: ( ( '=' ) | ( '!=' ) )\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( (LA14_0==19) ) {\n alt14=1;\n }\n else if ( (LA14_0==20) ) {\n alt14=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n }\n switch (alt14) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2845:1: ( '=' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2845:1: ( '=' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2846:1: '='\n {\n before(grammarAccess.getAstExpressionEqAccess().getOperatorEqualsSignKeyword_1_1_0_0()); \n match(input,19,FOLLOW_19_in_rule__AstExpressionEq__OperatorAlternatives_1_1_06140); \n after(grammarAccess.getAstExpressionEqAccess().getOperatorEqualsSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2853:6: ( '!=' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2853:6: ( '!=' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2854:1: '!='\n {\n before(grammarAccess.getAstExpressionEqAccess().getOperatorExclamationMarkEqualsSignKeyword_1_1_0_1()); \n match(input,20,FOLLOW_20_in_rule__AstExpressionEq__OperatorAlternatives_1_1_06160); \n after(grammarAccess.getAstExpressionEqAccess().getOperatorExclamationMarkEqualsSignKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\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 static void main(String[] args) {\n\t\tString s2 = \"Gowda\";\n\t\tString s3 = \"Gowda\";\n//\t\t\n//\t\tSystem.out.println(s.equals(s2));\n\t\t\n\t\tSystem.out.println(s2.equals(s3));\n\t\t\n\t\tSystem.out.println(s2 == s3); //\n\t\t\n\t}",
"private static boolean equalityTest2(String a, String b)\n {\n return a.equals(b);\n }",
"public void equal() {\n if (operatorAssigned != Operator.NON || operatorType != Operator.NON) {\n double subResult;\n if (numberStored[1] != 0) {\n subResult = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n numberStored[0] = basicCalculation(numberStored[0], subResult, operatorAssigned);\n numberStored[1] = 0;\n mainLabel.setText(Double.toString(numberStored[0]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n operatorAssigned = Operator.NON;\n operatorType = Operator.NON;\n }",
"public static boolean equalValues(QuoteShort lastQuote, QuoteShort q) {\n\t\tif (lastQuote.getOpen()!= q.getOpen()) return false;\r\n\t\tif (lastQuote.getHigh()!= q.getHigh()) return false;\r\n\t\tif (lastQuote.getLow()!= q.getLow()) return false;\r\n\t\tif (lastQuote.getClose()!= q.getClose()) return false;\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Test\n\tpublic void test_equals1() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertTrue(t1.equals(t2));\n }",
"private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"private void assertTrue(boolean equals) {\n\t\t\r\n\t}",
"@Test\n public void testAssertEquals() {\n \n Assert.assertEquals(25, appEqual.appAssertEquals(10, 5, 10));\n }",
"static int ifEquals(int x, int y, int a, int b) { \n //return x==y?a:b; \n return onEqu1(x, y, a, b, ((x-y)-1)>>31);\n }",
"public static void testComparing() {\n System.out.println(\"\\nTEST ASSIGNING\");\n System.out.println(\"==============\");\n int i = 20;\n int j = 20;\n\n if(i == j) {\n System.out.println(\"i and j are equal\");\n }\n\n String JPY = new String(\"JPY\");\n String YEN = new String(\"JPY\");\n\n if(JPY == YEN) {\n System.out.println(\"JPY and YEN are same\"); //This line is not printed\n }\n\n if(JPY.equals(YEN)) {\n //you should always use equals() method to compare reference types.\n System.out.println(\"JPY and YEN are equal by equals()\");\n }\n }",
"public final void rule__PredicateEquality__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2136:1: ( ( '==' ) | ( '!=' ) )\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0==13) ) {\n alt3=1;\n }\n else if ( (LA3_0==14) ) {\n alt3=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 3, 0, input);\n\n throw nvae;\n }\n switch (alt3) {\n case 1 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2137:1: ( '==' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2137:1: ( '==' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2138:1: '=='\n {\n before(grammarAccess.getPredicateEqualityAccess().getOpEqualsSignEqualsSignKeyword_1_1_0_0()); \n match(input,13,FOLLOW_13_in_rule__PredicateEquality__OpAlternatives_1_1_04070); \n after(grammarAccess.getPredicateEqualityAccess().getOpEqualsSignEqualsSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2145:6: ( '!=' )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2145:6: ( '!=' )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2146:1: '!='\n {\n before(grammarAccess.getPredicateEqualityAccess().getOpExclamationMarkEqualsSignKeyword_1_1_0_1()); \n match(input,14,FOLLOW_14_in_rule__PredicateEquality__OpAlternatives_1_1_04090); \n after(grammarAccess.getPredicateEqualityAccess().getOpExclamationMarkEqualsSignKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\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 }",
"boolean equivalent(AssignmentPath other);",
"public boolean equal(Inatnum B) {return(this.n==B.getVal());}",
"@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }",
"public static ParseAction<Located<Void>> parse4EqualsOrMore(){\n\t\treturn sequence(\n\t\t\t\tdrop(skipWhitespaceAndTLAComments()),\n\t\t\t\tdrop(matchPattern(TLA_4_EQUALS_OR_MORE))\n\t\t).map(seq -> new Located<>(seq.getLocation(), null));\n\t}",
"@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }",
"@Test\n public void testEquality(){\n int ans = testing1.LessThanTen(testing1.getValue1(), testing1.getValue2());\n assertEquals(10, ans);\n }",
"public boolean DEBUG_compare(Alphabet other) {\n System.out.println(\"now comparing the alphabets this with other:\\n\"+this+\"\\n\"+other);\n boolean sameSlexic = true;\n for (String s : other.slexic.keySet()) {\n if (!slexic.containsKey(s)) {\n sameSlexic = false;\n break;\n }\n if (!slexic.get(s).equals(other.slexic.get(s))) {\n sameSlexic = false;\n break;\n }\n slexic.remove(s);\n }\n System.out.println(\"the slexic attributes are the same : \" + sameSlexic);\n boolean sameSlexicinv = true;\n for (int i = 0, limit = other.slexicinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = slexicinv.size() + i; j < limit2; j++) {\n int k = j % slexicinv.size();\n if (other.slexicinv.get(i).equals(slexicinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSlexicinv = false;\n break;\n }\n\n }\n boolean sameSpair = true;\n System.out.println(\"the slexicinv attributes are the same : \" + sameSlexicinv);\n for (IntegerPair p : other.spair.keySet()) {\n if(!spair.containsKey(p)) {\n //if (!containsKey(spair, p)) {\n sameSpair = false;\n break;\n }\n //if (!(get(spair, p).equals(get(a.spair, p)))) {\n if (!spair.get(p).equals(other.spair.get(p))) {\n sameSpair = false;\n break;\n }\n }\n System.out.println(\"the spair attributes are the same : \" + sameSpair);\n boolean sameSpairinv = true;\n for (int i = 0, limit = other.spairinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = spairinv.size() + i; j < limit2; j++) {\n int k = j % spairinv.size();\n if (other.spairinv.get(i).equals(spairinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSpairinv = false;\n break;\n }\n }\n System.out.println(\"the spairinv attributes are the same : \" + sameSpairinv);\n return (sameSpairinv && sameSpair && sameSlexic && sameSlexicinv);\n }",
"public static boolean equalityOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"equalityOperator\")) return false;\n if (!nextTokenIs(b, \"<equality operator>\", EQ_EQ, NEQ)) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, EQUALITY_OPERATOR, \"<equality operator>\");\n r = consumeToken(b, EQ_EQ);\n if (!r) r = consumeToken(b, NEQ);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"@Test(timeout = 4000)\n public void test096() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 9223372032559808565L, 9223372036854775806L);\n boolean boolean0 = range0.equals(range0);\n Object object0 = new Object();\n Object object1 = new Object();\n boolean boolean1 = range0.equals(\"\");\n assertFalse(boolean1 == boolean0);\n assertFalse(boolean1);\n }",
"@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }",
"public final void rule__OpEquality__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2278:1: ( ( '==' ) | ( '!=' ) )\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0==18) ) {\r\n alt6=1;\r\n }\r\n else if ( (LA6_0==19) ) {\r\n alt6=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 6, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2279:1: ( '==' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2279:1: ( '==' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2280:1: '=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n match(input,18,FOLLOW_18_in_rule__OpEquality__Alternatives4816); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2287:6: ( '!=' )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2287:6: ( '!=' )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:2288:1: '!='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n match(input,19,FOLLOW_19_in_rule__OpEquality__Alternatives4836); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public static void main(String[] args) {\n Pair first = new Pair(\"Pesho\", \"Gosho\");\r\n Pair second = new Pair(\"Pesho\", \"Gosho\");\r\n Pair third = new Pair(\"Pesho\", \"Mariika\");\r\n \r\n System.out.println(first.equals(second));\r\n System.out.println(first.equals(third));\r\n }",
"public final void rule__BPredicate__Group_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBSQL2Java.g:2556:1: ( ( '=' ) )\n // InternalBSQL2Java.g:2557:1: ( '=' )\n {\n // InternalBSQL2Java.g:2557:1: ( '=' )\n // InternalBSQL2Java.g:2558:2: '='\n {\n before(grammarAccess.getBPredicateAccess().getEqualsSignKeyword_1_1()); \n match(input,28,FOLLOW_2); \n after(grammarAccess.getBPredicateAccess().getEqualsSignKeyword_1_1()); \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 }",
"@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 }",
"@Test\n public void testEquals_differentParameters() {\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 + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }",
"@ZenCodeType.Operator(ZenCodeType.OperatorType.EQUALS)\n default boolean equalTo(IData other) {\n \n return notSupportedOperator(OperatorType.EQUALS);\n }",
"@Test\r\n public void testEquals() throws Exception\r\n {\r\n Object expectedValueToEqual = new Object();\r\n ValueEquals sut = new ValueEquals(\"MyReplaceId\", expectedValueToEqual);\r\n assertEquals(sut.compareDataSetElementTo(expectedValueToEqual), 0);\r\n ;\r\n }",
"private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Acquirente)) {\n return false;\n }\n Acquirente that = (Acquirente) other;\n if (this.getIdacquirente() != that.getIdacquirente()) {\n return false;\n }\n return true;\n }",
"public final void rule__FindProperty__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalBrowser.g:3011:1: ( ( '=' ) )\n // InternalBrowser.g:3012:1: ( '=' )\n {\n // InternalBrowser.g:3012:1: ( '=' )\n // InternalBrowser.g:3013:2: '='\n {\n before(grammarAccess.getFindPropertyAccess().getEqualsSignKeyword_1()); \n match(input,23,FOLLOW_2); \n after(grammarAccess.getFindPropertyAccess().getEqualsSignKeyword_1()); \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 }",
"@Test\n\tpublic void testEquals2() {\n\t\tDistance d2 = new Distance();\n\t\tDistance d4 = new Distance(1, 1);\n\t\tassertEquals(true, d2.equals(d4));\n\t}",
"@Test\n public void equalsOtherTest4() {\n assertFalse(device.equals(\"\"));\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 }",
"public boolean equals(A a){\n\t\treturn (this.value == a.value)?(true):(false);\t\t\n\t}",
"public final void rule__OpEquality__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:2550:1: ( ( '==' ) | ( '!=' ) | ( '===' ) | ( '!==' ) )\r\n int alt8=4;\r\n switch ( input.LA(1) ) {\r\n case 21:\r\n {\r\n alt8=1;\r\n }\r\n break;\r\n case 22:\r\n {\r\n alt8=2;\r\n }\r\n break;\r\n case 23:\r\n {\r\n alt8=3;\r\n }\r\n break;\r\n case 24:\r\n {\r\n alt8=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt8) {\r\n case 1 :\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n {\r\n // InternalDroneScript.g:2551:2: ( '==' )\r\n // InternalDroneScript.g:2552:3: '=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n match(input,21,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignKeyword_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n {\r\n // InternalDroneScript.g:2557:2: ( '!=' )\r\n // InternalDroneScript.g:2558:3: '!='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n match(input,22,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignKeyword_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n {\r\n // InternalDroneScript.g:2563:2: ( '===' )\r\n // InternalDroneScript.g:2564:3: '==='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n match(input,23,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getEqualsSignEqualsSignEqualsSignKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n {\r\n // InternalDroneScript.g:2569:2: ( '!==' )\r\n // InternalDroneScript.g:2570:3: '!=='\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n match(input,24,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOpEqualityAccess().getExclamationMarkEqualsSignEqualsSignKeyword_3()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }",
"Expression eqExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = relExpression();\r\n\t\twhile(isKind(OP_EQ, OP_NEQ)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = relExpression();\r\n\t\t\te0 = new ExpressionBinary(first, e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}",
"@Override\r\n\t\tpublic boolean isEqualNode(Node arg)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }",
"public boolean Equal(Element other){\n\tboolean ret_val ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\tret_val = true ;\n\n\taux01 = other.GetAge();\n\tif (!this.Compare(aux01,Age)) ret_val = false ;\n\telse { \n\t aux02 = other.GetSalary();\n\t if (!this.Compare(aux02,Salary)) ret_val = false ;\n\t else \n\t\tif (Married) \n\t\t if (!other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t\telse\n\t\t if (other.GetMarried()) ret_val = false;\n\t\t else nt = 0 ;\n\t}\n\n\treturn ret_val ;\n }"
] | [
"0.6437554",
"0.6254469",
"0.61218345",
"0.6082722",
"0.6070168",
"0.605027",
"0.60366344",
"0.6024667",
"0.59514624",
"0.5929234",
"0.5880059",
"0.5869026",
"0.5776936",
"0.575516",
"0.5724845",
"0.5719953",
"0.57198584",
"0.5689962",
"0.56858456",
"0.5677795",
"0.56547135",
"0.5649955",
"0.56491196",
"0.56432056",
"0.5623641",
"0.56208736",
"0.5602843",
"0.55854833",
"0.55690783",
"0.55580115",
"0.5541753",
"0.55409",
"0.5536173",
"0.5530653",
"0.5527986",
"0.55246234",
"0.5493993",
"0.5489415",
"0.54884183",
"0.5476305",
"0.547309",
"0.54729235",
"0.5465509",
"0.54647315",
"0.5453789",
"0.5444571",
"0.5436264",
"0.5434431",
"0.54339767",
"0.54336",
"0.54324853",
"0.542379",
"0.5415167",
"0.5410458",
"0.5406349",
"0.5397633",
"0.53934574",
"0.5388436",
"0.5381652",
"0.53713125",
"0.53684473",
"0.53615564",
"0.53565586",
"0.53552073",
"0.5352689",
"0.53482866",
"0.53262967",
"0.5322074",
"0.5321587",
"0.53204316",
"0.5317274",
"0.53168344",
"0.5316101",
"0.530762",
"0.53059304",
"0.5303715",
"0.5298144",
"0.5285265",
"0.5281407",
"0.52693146",
"0.526916",
"0.5267909",
"0.52492195",
"0.52436745",
"0.5236597",
"0.52353865",
"0.5223796",
"0.52234834",
"0.5222514",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094",
"0.52202094"
] | 0.7928311 | 0 |
slash = operator "/" gap | private boolean slash() {
return MARK(OPERATOR) && CHAR('/') && gap();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void slashes() {\n\t\tSystem.out.println(\"//////////////////////\");\r\n\r\n\t}",
"public final void mSLASH() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = SLASH;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:439:6: ( '/' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:439:16: '/'\n\t\t\t{\n\t\t\tmatch('/'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public final void testSlash() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnðýþnn\");\n//\t\tassertSingleDocWithValue(\"8\", fldName, \"nnønn\");\n\t\tassertSingleResult(\"8\", fldName, \"nnunn\");\n\t}",
"private void handleSlash() {\n // Single line comment\n if (secondCharIs('/')) {\n // Rune has C-style comments, so goes until end of line\n while ((peek() != '\\n') && !reachedEnd()) {\n advance(); // Keep advancing until newline or EOF, thus ignoring the comment lexeme\n }\n } else if (secondCharIs('*')) {\n // Block comments go until * / is reached\n while (!reachedEnd()) {\n if (peek() == '*' && peekFurther(1) == '/') {\n advance();\n advance();\n return;\n }\n advance();\n }\n } else {\n addToken(SLASH);\n }\n }",
"private String sep(String path) {\n return path == null ? \"\" : \"/\" + path;\n }",
"private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }",
"public void backSlash() {\n text.append(\"\\\\\");\n }",
"public final void mDOUBLE_SLASH() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = DOUBLE_SLASH;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:440:13: ( '//' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:440:16: '//'\n\t\t\t{\n\t\t\tmatch(\"//\"); \n\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"@Override\n\tpublic Object visit(ASTAbsSlash node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\"/\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"private Token scanAmbiguousWithSlash() {\n Token tok;\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n buffer.add(c);\n int nextChar = in.read();\n\n // operator '/='\n if (nextChar == '=') {\n buffer.add(nextChar);\n tok = new Token(buffer.toString(), TokenType.NEQUALS, pos);\n buffer.flush();\n c = in.read();\n }\n\n // multiline comments\n else if (nextChar == '*') {\n buffer.add(nextChar);\n tok = new Token(buffer.toString(), TokenType.MLCOMMENT_START, pos);\n buffer.flush();\n while (((c = in.read()) != '*' || (nextChar = in.read()) != '/') &&\n nextChar != -1 && c != -1) {\n // do nothing (for now)\n // we can potentially do something\n // with comment text in this loop\n }\n if (c == '*' && nextChar == '/') {\n buffer.add(c);\n buffer.add(nextChar);\n enqueuedToken = new Token(buffer.toString(), TokenType.MLCOMMENT_END, pos);\n }\n buffer.flush();\n c = in.read();\n }\n\n // single line comments\n else if (nextChar == '/') {\n buffer.add(nextChar);\n tok = new Token(buffer.toString(), TokenType.SLCOMMENT, pos);\n buffer.flush();\n while ((c = in.read()) != '\\n' && c != -1) {\n // do nothing (for now)\n // we can potentially do something\n // with comment text in this loop\n }\n // when the '\\n' or eof is reached, proceed further\n if (c == '\\n') {\n enqueuedToken = new Token(\"\\n\", TokenType.SEPARATOR, pos);\n }\n c = in.read();\n }\n // operator '/'\n else {\n tok = new Token(buffer.toString(), TokenType.DIVIDE, pos);\n buffer.flush();\n c = nextChar;\n }\n return tok;\n }",
"@Override\n\tpublic Object visit(ASTRelSlash node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\"/\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"protected String getOrConcatenatorSplitter() {\n\t\treturn \"\\\\\" + getOrConcatenator();\n\t}",
"@Override\n\tpublic Object visit(ASTXQuerySlash node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\"/\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"private boolean isOperator(char ch) {\r\n\t\treturn (ch == '+' || ch == '-' || ch == '*' || ch == '/');\r\n\t}",
"public String path(String path1, String path2);",
"private String escapeFragment(String pathFragment) {\n\t\treturn pathFragment.replaceAll(\"~\", \"~0\").replaceAll(\"\\\\/\", \"~1\");\n\t}",
"public abstract String division();",
"private boolean isOperator(String value) {\r\n return value.equals(\"*\") || value.equals(\"/\") || value.equals(\"-\") || value.equals(\"+\") || value.equals(\"(\") || value.equals(\")\");\r\n }",
"public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }",
"@Test\n public void testPathParsing_withAlternateSeparator() {\n PathService windowsPathService = PathServiceTest.fakeWindowsPathService();\n assertEquals(\n windowsPathService.parsePath(\"foo\\\\bar\\\\baz\"), windowsPathService.parsePath(\"foo/bar/baz\"));\n assertEquals(\n windowsPathService.parsePath(\"C:\\\\foo\\\\bar\"), windowsPathService.parsePath(\"C:\\\\foo/bar\"));\n assertEquals(\n windowsPathService.parsePath(\"c:\\\\foo\\\\bar\\\\baz\"),\n windowsPathService.parsePath(\"c:\", \"foo/\", \"bar/baz\"));\n }",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"protected void operation(String operator){\n if (this.tail<2){\n this.arr[tail++] = this.value;\n this.arr[tail++] = operator;\n } else{\n if (this.peek() != \")\"){\n this.arr[this.tail++] = this.value;\n }\n this.arr[this.tail++] = operator;\n }\n this.value=\"\"; // reset tracking variables\n this.decimalUsed = false;\n }",
"private static boolean isOperator(char c) {\n return c == '+' ||\n c == '-' ||\n c == '*' ||\n c == '/';\n }",
"public static String getOperator(Operator operator) {\n\t\tif (operator == MOD) {\n\t\t\treturn \"%\";\n\t\t} else if (operator == DIV) {\n\t\t\treturn \"/\";\n\t\t} else {\n\t\t\treturn operator.toString();\n\t\t}\n\t}",
"public String operator( String op);",
"private static boolean isOperator(String c)\n\t\t{\t\n\t\t\tif (c.equals(\"+\") || c.equals(\"-\") || c.equals(\"*\") || c.equals(\"/\") ) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"private boolean isOperator(String op){\n return (op.equals(\"+\") || op.equals(\"-\") || op.equals(\"*\") || op.equals(\"/\"));\n }",
"@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}",
"private static boolean isOperator(String value){\r\n\t\tif (value.equals(\"+\") ||value.equals(\"-\")|| value.equals(\"*\")|| value.equals(\"/\"))\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}",
"@Override public String toDot() {\r\n String middle = \"\";\r\n switch(operator) {\r\n case AND : \r\n middle = \"&\";\r\n break;\r\n case NOR :\r\n case OR : \r\n middle = \"∨\";\r\n break;\r\n case IMPLIES : \r\n middle = \"=>\";\r\n break;\r\n default : assert false;\r\n }\r\n middle = left.toDot() + \" \" + middle + \" \" + right.toDot();\r\n if ( operator == Token.NOR )\r\n return \"¬ (\"+middle+\")\";\r\n else\r\n return middle;\r\n }",
"public PathExpressionIF createPathExpression();",
"@Override\n protected String getFileSeparator() { return \"/\"; }",
"private String addSlashes(String in) {\n StringBuffer sb = new StringBuffer();\n int index = 0;\n int i = in.indexOf(\"\\\\\");\n int ii = in.indexOf(\"\\\\\\\\\");\n\n if (i == -1) {\n return in;\n }\n\n if (i != ii) {\n sb.append(in.substring(index,i+1)+\"\\\\\");\n }\n index = i+1;\n boolean done = false;\n while (!done) {\n i = in.indexOf(\"\\\\\", index);\n ii = in.indexOf(\"\\\\\\\\\", index);\n if (i == -1) {\n sb.append(in.substring(index));\n done = true;\n }\n else if (i != ii) {\n sb.append(in.substring(index,i+1)+\"\\\\\");\n index = i+1;\n }\n }\n return sb.toString();\n }",
"private String fixSlashes(String str) {\n\t\tstr = str.replace('\\\\', '/');\r\n\t\t// compress multiples into singles;\r\n\t\t// do in 2 steps with dummy string\r\n\t\t// to avoid infinte loop\r\n\t\tstr = replaceString(str, \"//\", \"_____\");\r\n\t\tstr = replaceString(str, \"_____\", \"/\");\r\n\t\treturn str;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tfor (String str : this) {\r\n\t\t\tif (sb.length() > 0) {\r\n\t\t\t\tsb.append(PATH_SEPARATOR);\r\n\t\t\t}\r\n\t\t\tsb.append(str);\r\n\t\t}\r\n\t\treturn sb.toString().toLowerCase();\r\n\t}",
"public Automato aplicaOperacao(Automato a, Automato b, Character op){\n\t\tAutomato r = new Automato();\n\t\tswitch (op) {\n\t\tcase '*': r = Operacao.estrela(a);\n\t\t\t\t break;\n\n\t\tcase '.': r = Operacao.concatencao(a, b);\n\t\t \t\t break;\n\t\tcase '+': r = Operacao.uniao(a, b);\n\t\t break;\n\t\tdefault: r = simples(op);\n\t\t\tbreak;\n\t\t}\n\t\treturn r;\n\t}",
"com.google.protobuf.ByteString getSlashFractionDoubleSign();",
"public void prefix() {\n System.out.print(operator.getArithmeticOp() + \" \");\n left.prefix();\n right.prefix();\n System.out.println();\n }",
"public void splitExpression(String expression, String op) {\n operator = new arithmetic_op(op);\n expression = expression.trim();\n int index = expression.indexOf(op);\n left = new arithmetic_ex((expression.substring(0, index)).trim());\n right = new arithmetic_ex((expression.substring(index + 1)).trim());\n }",
"public final EObject ruleDivisionOperator() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4860:28: ( ( () otherlv_1= '/' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4861:1: ( () otherlv_1= '/' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4861:1: ( () otherlv_1= '/' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4861:2: () otherlv_1= '/'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4861:2: ()\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:4862:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getDivisionOperatorAccess().getDivisionOperatorAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,66,FOLLOW_66_in_ruleDivisionOperator10933); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getDivisionOperatorAccess().getSolidusKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"@Override String toDot() {\r\n switch ( operator ) {\r\n case EQUALS_PREFIX :\r\n case EQUALS :\r\n return left.toDot() + \" = \" + right.toDot();\r\n case NEQ :\r\n return left.toDot() + \" ≠ \" + right.toDot();\r\n case GE : \r\n return left.toDot() + \" ≥ \" + right.toDot();\r\n case GT : \r\n return left.toDot() + \" > \" + right.toDot(); \r\n case LE :\r\n return left.toDot() + \" ≤ \" + right.toDot();\r\n case LT : \r\n return left.toDot() + \" < \" + right.toDot();\r\n }\r\n assert false:operator;\r\n return null;\r\n }",
"private String normalizeOperator(String op)\n {\n String normalOp = null;\n \n if (op != null && op.trim().length() > 0)\n {\n op = op.trim().toLowerCase();\n\n String [] ops = new String []\n {\n OP_EQUALS,\n OP_NOTEQUAL,\n OP_LESSTHAN,\n OP_LESSTHANEQUAL,\n OP_GREATERTHAN,\n OP_GREATERTHANEQUAL,\n OP_ISNULL,\n OP_ISNOTNULL,\n OP_IN,\n OP_NOTIN,\n OP_LIKE,\n OP_NOTLIKE,\n OP_BETWEEN\n };\n\n for (int i=0; i<ops.length && normalOp == null; i++)\n {\n if (ops[i].equalsIgnoreCase(op))\n normalOp = ops[i];\n }\n }\n \n return normalOp;\n }",
"public static String addToPath(String path, String path2) { return path + \"/\" + path2; }",
"@Override\n public String toString() {\n if (bombe) {\n return \"/\";\n } else if (bombeNaboer == 0) {\n return \" \";\n }\n return \"\" + bombeNaboer;\n }",
"public static String[] slashPartition(String str) {\n return partition(str, '/');\n }",
"@Override\n\tpublic float dividir(float op1, float op2) {\n\t\treturn op1 / op2;\n\t}",
"public static String appendSlash(String url) {\r\n\t\tif (url.endsWith(\"/\"))\r\n\t\t\treturn url;\r\n\t\telse\r\n\t\t\treturn url + \"/\";\r\n\t}",
"private String getHttpPath(String httpPath) {\n if(httpPath == null || httpPath.equals(\"\")) {\n httpPath = \"/*\";\n }\n else {\n if(!httpPath.startsWith(\"/\")) {\n httpPath = \"/\" + httpPath;\n }\n if(httpPath.endsWith(\"/\")) {\n httpPath = httpPath + \"*\";\n }\n if(!httpPath.endsWith(\"/*\")) {\n httpPath = httpPath + \"/*\";\n }\n }\n return httpPath;\n }",
"@Test\n public void testInvalidSlashesRuleMatches() throws Exception {\n Assume.assumeFalse(SystemInfo.isWindows);\n\n File file = new File(\"at\\\\least/one\\\\of/these\\\\slashes/are\\\\wrong\");\n assertRuleFails(myFileOp, PathValidator.INVALID_SLASHES, file);\n }",
"public final void mDIV() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = DIV;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// src/VSLLexer.g:45:11: ( '/' )\n\t\t\t// src/VSLLexer.g:45:13: '/'\n\t\t\t{\n\t\t\tmatch('/'); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public String toString() {\n\t\tString circuit = \"(\" + left + \"/\\\\\" + right + \")\";\n\t\treturn circuit;\n\t}",
"public static void main(String[] args) {\n\t\tString input1=\"AAA/abb/CCC\";\n\t\t\n\t\tArrayList<String> l=new ArrayList<String>();\n\t\tStringTokenizer t=new StringTokenizer(input1,\"/\");\n\t\twhile(t.hasMoreTokens()){\n\t\t\tStringBuffer sb=new StringBuffer(t.nextToken().toLowerCase());\n\t\t\tl.add(sb.reverse().toString());\n\t\t\t}\n\t\tString op[]=new String[l.size()];\n\t\t\tfor(int i=0;i<op.length;i++)\n\t\t\t\top[i]=l.get(i);\n\t\t\t\n\t\t\tfor(String s:op)\n\t\t\t\tSystem.out.println(s);\n\t\t\n\n\n\t\n\t\t\n\t\t\n\t}",
"private boolean isOperator(String s) {\n\t\treturn (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\") || s.equals(\"/\") || s.equals(\"^\"));\n\t}",
"@Override\n\tpublic Object visit(ASTAbsDSlash node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\"//\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"@Factory\n public static Matcher<QueryTreeNode> dividedBy(Matcher<QueryTreeNode> leftMatcher, \n Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, \"/\", rightMatcher);\n }",
"String getSeparator();",
"public void divide() {\n\t\t\n\t}",
"private static double operate(Double a, Double b, String op){\n\t switch (op){\r\n\t case \"+\": return Double.valueOf(a) + Double.valueOf(b);\r\n\t case \"-\": return Double.valueOf(a) - Double.valueOf(b);\r\n\t case \"*\": return Double.valueOf(a) * Double.valueOf(b);\r\n\t case \"/\": try{\r\n\t return Double.valueOf(a) / Double.valueOf(b);\r\n\t }catch (Exception e){\r\n\t e.getMessage();\r\n\t }\r\n\t default: return -1;\r\n\t }\r\n\t }",
"public static BinaryExpression divide(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"public String toString() {\n return \"/\" + toIdent(0);\n }",
"public static String pathModifier(String path, int start, int end) {\n\t\t\n\t\tStringBuilder builder = new StringBuilder(path);\n\t\tbuilder.delete(start, end);\n\t\tString newPath = builder.toString();\n\t\t\n\t\treturn newPath;\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"rV.:Q-\");\n Token token0 = xPathLexer0.slashes();\n assertEquals(11, token0.getTokenType());\n assertEquals(\"r\", token0.getTokenText());\n \n Token token1 = xPathLexer0.dots();\n assertEquals(\"V.\", token1.getTokenText());\n assertEquals(14, token1.getTokenType());\n }",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"protected String pathBuilder(String... segments) {\n\t\t\n\t\tStringBuffer path = new StringBuffer();\n\t\tfor(String seg : segments){\n\t\t\tif(seg != null){\n\t\t\t\tpath.append(seg);\n\t\t\t\tpath.append(\"/\");\n\t\t\t}\n\t\t}\n\t\treturn path.toString();\n\t}",
"Expr term() throws IOException {\n\t\tExpr e = unary();\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, unary());\n\t\t}\n\t\treturn e;\n\t}",
"@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }",
"@Override\n public String toString() { return '(' + left.toString() + ' ' + operation.toString() + ' ' + right.toString() + ')'; }",
"@Test\n public void computePaymentTargetIntermediatePrefixWithOtherPath() {\n spspController = new SpspController(() -> connectorSettingsMock, streamReceiverMock, \"/p\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\" \")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"//\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/ \")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo/\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo.bar\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo.bar/\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo/bar\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo.bar/baz\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/foo.bar/baz/\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p//\")).isEqualTo(\"\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo\")).isEqualTo(\"foo\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo/\")).isEqualTo(\"foo\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo//\")).isEqualTo(\"foo\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo.bar\")).isEqualTo(\"foo.bar\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo.bar/\")).isEqualTo(\"foo.bar\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo/bar\")).isEqualTo(\"foo.bar\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo.bar/baz\")).isEqualTo(\"foo.bar.baz\");\n assertThat(spspController.computePaymentTargetIntermediatePrefix(\"/p/foo.bar/baz/\")).isEqualTo(\"foo.bar.baz\");\n }",
"private void processOperator() {\r\n\t\tif (expression[currentIndex] == '*') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.AND_STRING);\r\n\t\t} else if (expression[currentIndex] == '+') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.OR_STRING);\r\n\t\t} else if (expression[currentIndex] == '!') {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.NOT_STRING);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.OPERATOR, Constants.XOR_STRING);\r\n\t\t\t// xor operator has 2 characters more than any other operator.\r\n\t\t\tcurrentIndex += 2;\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}",
"private int operation(int b, char op, int a) {\n switch (op) {\n case '+': return a + b;\n case '-': return a - b;\n case '*': return a * b;\n case '/': return a / b; //assume b is not 0\n }\n return 0;\n }",
"private void Button_DivisionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Button_DivisionActionPerformed\n // TODO add your handling code here:\n if(display.getText().charAt(display.getText().length()-1) != '+' && \n display.getText().charAt(display.getText().length()-1) != '-' &&\n display.getText().charAt(display.getText().length()-1) != '/' &&\n display.getText().charAt(display.getText().length()-1) != '*')\n display.setText(display.getText() + \"/\");\n period = false;\n }",
"public static BinaryExpression divideAssign(Expression expression0, Expression expression1, Method method) { throw Extensions.todo(); }",
"protected Evaluable parseTerm() throws ParsingException {\n Evaluable factor = parseFactor();\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 factor2 = parseFactor();\n\n factor = new OperatorCallExpr(new Evaluable[] { factor, factor2 }, op);\n }\n\n return factor;\n }",
"private static String normalizePathString(String path) {\n String noUnion = removePrefix(path, \"union:/\");\n // Remove scheme marker\n String noScheme = removeAndBefore(noUnion, \"//\");\n // Remove '%2370!' that forge has, example:\n // union:/C:/Users/natan/.gradle/caches/fabric-loom/1.17.1/net.fabricmc.yarn.1_17_1.1.17.1+build.61-v2-forge-1.17.1-37.0.69/forge-1.17.1-37.0.69-minecraft-mapped.jar%2371!\n // We use 'removeLastPercentSymbol' instead of removing everything after last occurrence of '%' so it works with spaces as well\n // (the last space will be 'deleted', but that doesn't matter for our purposes)\n String noPercent = removeLastPercentSymbol(noScheme);\n // Remove trailing '/' and '!'\n return removeSuffix(removeSuffix(noPercent, \"/\"), \"!\");\n }",
"public void testIllegalFowardSlashInName() throws Exception\r\n {\r\n try\r\n {\r\n new ComponentDirective( \r\n \"fred/blogs\", m_activation, m_collection, m_lifestyle, m_classname, \r\n m_categories, m_context, null, null );\r\n fail( \"Did not throw an IllegalArgumentException for a name with a '/'.\" ); \r\n }\r\n catch( IllegalArgumentException e )\r\n {\r\n // ok\r\n }\r\n }",
"private Path createPath(AStarNode start, AStarNode end) {\n Path path = new Path();\n AStarNode ptr = end;\n while (!ptr.equals(start)) {\n path.addFirst(ptr);\n ptr = ptr.getPrevious();\n }\n path.addFirst(start);\n\n return path;\n }",
"@Override\n\tpublic Object visit(ASTRelDSlash node, Object data) {\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\"//\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, data);\n\t\treturn null;\n\t}",
"boolean operator(Character input){\r\n //detects operands\r\n if(input == '^'||input == '-'||input == '+'||input == '/'||input == '*'|| input =='('|| input ==')'){\r\n return true;\r\n }\r\n else\r\n return false;\r\n }",
"static String division (String s1, String s2) {\r\n if (s2==null || s2.length()==0) return s1;\r\n return product (s1, invert(s2));\r\n }",
"PathSegments getPath();",
"private static void appendPathPart(Appendable buffer, String path, Boolean appendDirSep, String prefix) throws IOException {\n // Test if adding a slash between (buffer+prefix) and (path) is needed\n if ((appendDirSep == null && path != null) || Boolean.TRUE.equals(appendDirSep)\n || (UtilValidate.isNotEmpty(path) && !RequestLinkUtil.isUrlDelimNonDir(path.charAt(0)))) {\n // Slash required or requested\n if (path == null) {\n path = \"\";\n }\n buffer.append(prefix);\n if (!StringUtil.endsWith(buffer, '/') && !(path != null && StringUtil.startsWith(path, '/'))) {\n buffer.append('/');\n }\n buffer.append(path);\n } else {\n // No slash required or requested\n // NOTE: If (appendDirSep==false), path never starts with \"/\" here (due to isUrlDelimNonDir)\n StringUtil.appendWithoutSuffix(buffer, prefix, '/');\n if (path != null) {\n buffer.append(path);\n }\n }\n }",
"public static int parseSlashIndex(String sentence) {\n return sentence.indexOf(\"/\");\n }",
"public static void main(String[] args) {\n\t\tScanner console = new Scanner(System.in);\n\t\tSystem.out.println(\"Hey give me a number or a fraction.\");\n\t\tString oneNumber = console.nextLine();\n\t\tSystem.out.println(\"Hey give me another number or a fraction.\");\n\t\tString twoNumber = console.nextLine();\n\t\tSystem.out.println(\"hey give me a number 1-4. 1=+, 2=-, 3=* 4=/\");\n\t\tString simble = console.nextLine();\n\t\tSystem.out.println(oneNumber);\n\t\tint v = Integer.parseInt(simble);\n\t\tif (v == 1) {\n\t\t\tSystem.out.println(\"+\");\n\t\t} else if (v == 2) {\n\t\t\tSystem.out.println(\"-\");\n\t\t} else if (v == 3) {\n\t\t\tSystem.out.println(\"*\");\n\t\t} else if (v == 4) {\n\t\t\tSystem.out.println(\"/\");\n\t\t} else\n\t\t\tSystem.out.println(\"\\\\('_')/\");\n\n\t\tSystem.out.println(twoNumber);\n\t\tSystem.out.println(\"=\");\n\t\tint numerator1;\n\t\tint denominator1;\n\t\tif (oneNumber.contains(\"/\")) {\n\t\t\tString numbers[] = oneNumber.split(\"/\");\n\t\t\tnumerator1 = Integer.parseInt(numbers[0]);\n\t\t\tdenominator1 = Integer.parseInt(numbers[1]);\n\n\t\t} else {\n\t\t\tnumerator1 = Integer.parseInt(oneNumber);\n\t\t\tdenominator1 = 1;\n\t\t\t}\n\t\t\tint numerator2;\n\t\t\tint denominator2;\n\t\tif (twoNumber.contains(\"/\")) {\n\t\t\tString numbers[] = twoNumber.split(\"/\");\n\t\t\tnumerator2 = Integer.parseInt(numbers[0]);\n\t\t\tdenominator2 = Integer.parseInt(numbers[1]);\n\t\t\t\n\t\t} else {\n\t\t\tnumerator2 = Integer.parseInt(twoNumber);\n\t\tdenominator2 = 1;\n\t\t}\n\t\tif (v == 1) {\n\t\t\tint r_numerator =(numerator1 * denominator2) + (numerator2 * denominator1);\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 2) {\n\t\t\tint r_numerator =(numerator1 * denominator2) - (numerator2 * denominator1);\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 3) {\n\t\t\tint r_numerator = numerator1 * numerator2;\n\t\t\tint r_denominator = denominator1 * denominator2;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else if (v == 4) {\n\t\t\tint r_numerator = numerator1 * denominator2;\n\t\t\tint r_denominator = numerator2 * denominator1;\n\t\t\tfraction_boy(r_numerator, r_denominator);\n\t\t} else\n\t\t\tSystem.out.println(\"sorry man this is'nt going to work.\");\n\n\n\t\t}",
"public final void mDIV() throws RecognitionException {\n try {\n int _type = DIV;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:23:5: ( '/' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:23:7: '/'\n {\n match('/'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private boolean isOperator(char ch)\n {\n if (ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '^')\n//returns true if either of the operator is found\n return true;\n//else returns false\n return false;\n }",
"static boolean isOperator(char c) {\n return \"+\\u2212\\u00d7\\u00f7/*\".indexOf(c) != -1;\n }",
"private String computeUniqueNotation(Subquery parsedQuery) {\n if (parsedQuery.rightTerm == null) {\n parsedQuery.orderedQuery = parsedQuery.leftTerm.toString();\n return parsedQuery.leftTerm.toString();\n }\n\n String leftBare = computeUniqueNotation(parsedQuery.leftTerm instanceof Subquery ? (Subquery) parsedQuery.leftTerm : new Subquery(parsedQuery.leftTerm));\n String rightBare = computeUniqueNotation(parsedQuery.rightTerm instanceof Subquery ? (Subquery) parsedQuery.rightTerm : new Subquery(parsedQuery.rightTerm));\n\n String operator = parsedQuery.operator;\n String ordered;\n\n if (operator.equals(\"|\") || operator.equals(\"+\")) {\n if (leftBare.compareTo(rightBare) > 0) {\n ordered = rightBare + \" \" + leftBare + \" \" + operator;\n } else {\n ordered = leftBare + \" \" + rightBare + \" \" + operator;\n }\n } else {\n ordered = leftBare + \" \" + rightBare + \" \" + operator;\n }\n parsedQuery.orderedQuery = ordered;\n return ordered;\n }",
"private Double check_mathOperator(Double result) {\n \r\n switch(mathOperator){\r\n case '/':\r\n result =totalFirst/totalLast;\r\n break;\r\n case 'x':\r\n result =totalFirst*totalLast;\r\n break;\r\n case '-':\r\n result =totalFirst-totalLast;\r\n break;\r\n case '+':\r\n result =totalFirst+totalLast;\r\n break;\r\n \r\n }\r\n return result;\r\n }",
"public void buildPathPartWithWebappPathPrefix(Appendable buffer, String uri, Boolean appendDirSep) throws WebAppConfigurationException, IOException {\n appendPathPart(buffer, uri, appendDirSep,\n webSiteProps.isWebappPathPrefixUrlBuild() ? webSiteProps.getWebappPathPrefix() : \"\"); // SCIPIO\n }",
"private static boolean checkPrecedence(String operator1, String operator2){\n\n\t\tif((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"*\") || operator1.equals(\"/\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"+\") || operator2.equals(\"-\"))){\n\t\t\treturn true;\n\t\t}\n\t\telse if((operator1.equals(\"+\") || operator1.equals(\"-\")) && (operator2.equals(\"*\") || operator2.equals(\"/\"))){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test057() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"P/-a/\");\n Token token0 = xPathLexer0.slashes();\n assertEquals(\"P/\", token0.getTokenText());\n assertEquals(12, token0.getTokenType());\n }",
"@Override\n public void setValue(ImportPath o, String value) {\n o.prefix = LEADING_TRAILING_SLASHES.matcher(value.trim()).replaceAll(\"\");\n }",
"public final void mDIV() throws RecognitionException {\n try {\n int _type = DIV;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/dannluciano/Sources/MyLanguage/expr.g:183:5: ( '/' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:183:7: '/'\n {\n match('/'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static void main(String args[]) {\n\tSystem.out.println(\"1 2 + 4 * 4 2 - + = \" + execute(\"1 2 + 4 * 4 2 - +\"));\r\n\t\r\n\t// (1 + 4) * (3 + 7) / 5 == 10\r\n\t/*System.out.println(\"1 4 + 3 7 + * 5 / = \" \r\n\t\t\t + execute(\"1 4 + 3 7 + * 5 /\"));\r\n\t\r\n\t// 10 + 2 == 12\r\n\tSystem.out.println(\"10 2 + = \" \r\n\t\t\t + execute(\"10 2 +\"));\r\n\t\r\n\t// 10 / 2 == 5\r\n\tSystem.out.println(\"10 2 / = \"\r\n\t\t\t + execute(\"10 2 /\"));*/\r\n }",
"private String sanitizePath(String path)\r\n\t{\r\n\t\tif (path == null)\r\n\t\t\treturn \"\";\r\n\t\telse if (path.startsWith(\"/\"))\r\n\t\t\tpath = path.substring(1);\r\n\r\n\t\treturn path.endsWith(\"/\") ? path : path + \"/\";\r\n\t}",
"public static String produceAnswer(String input)\r\n { \r\n // TODO: Implement this function to produce the solution to the input\r\n\t\tint space = input.indexOf(' ');\r\n String value1 = input.substring(0, space);\r\n\t\tString value2 = input.substring(space + 3, input.length());\r\n\t\tString operator = input.substring(space, space + 3);\r\n\t\tif (value1.contains(\"_\"))\r\n\t\t{\r\n\t\t\tString newValue1 = convertMixedNumber(value1);\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if (value1.contains(\"/\"))\r\n\t\t{\r\n\t\t\tString newValue1 = value1;\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tString newValue1 = convertWholeNumber(value1);\r\n\t\t\tif (value2.contains(\"_\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertMixedNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse if (value2.contains(\"/\"))\r\n\t\t\t{\r\n\t\t\t\tString newValue2 = value2;\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\tString newValue2 = convertWholeNumber(value2);\r\n\t\t\t\tinput = newValue1 + operator + newValue2;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif (input.contains(\" / \"))\r\n\t\t{\r\n\t\t int slash = input.indexOf('/');\r\n\t\t int slash2 = input.indexOf('/', slash + 1);\r\n\t\t int slash3 = input.indexOf('/', slash2 + 1);\r\n\t\t space = input.indexOf(' ');\r\n\t\t int num1 = Integer.parseInt(input.substring(0, slash));\r\n\t\t int denom1 = Integer.parseInt(input.substring(slash + 1, space));\r\n\t\t int num2 = Integer.parseInt(input.substring(space + 3, slash3));\r\n\t\t int denom2 = Integer.parseInt(input.substring(slash3 + 1, input.length()));\r\n\t\t if (num2 < 0)\r\n\t\t {\r\n\t\t\t num2 = num2 * -1;\r\n\t\t\t denom2 = denom2 * -1;\r\n\t\t\t int numerator = num1 * denom2;\r\n\t\t\t int denominator = denom1 * num2;\r\n\t\t\t String Answer = numerator + \"/\" + denominator;\r\n\t\t\t return reduceAnswer(Answer);\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t int numerator = num1 * denom2;\r\n\t\t int denominator = denom1 * num2;\r\n\t\t String Answer = numerator + \"/\" + denominator;\r\n\t\t return reduceAnswer(Answer);\r\n\t\t }\r\n\t\t}\r\n\t\telse {\r\n\t\t int slash = input.indexOf('/');\r\n\t int slash2 = input.indexOf('/', slash + 1);\r\n\t space = input.indexOf(' ');\r\n\t\t int num1 = Integer.parseInt(input.substring(0, slash));\r\n\t int denom1 = Integer.parseInt(input.substring(slash + 1, space));\r\n\t int num2 = Integer.parseInt(input.substring(space + 3, slash2));\r\n\t int denom2 = Integer.parseInt(input.substring(slash2 + 1, input.length()));\r\n\t if (input.contains(\" + \"))\r\n {\r\n \t int numerator1 = num1 * denom2;\r\n \t int numerator2 = num2 * denom1;\r\n \t int finalNumerator = numerator1 + numerator2;\r\n \t int denominator = denom2 * denom1;\r\n \t String Answer = finalNumerator + \"/\" + denominator;\r\n \t return reduceAnswer(Answer);\r\n \t\t\r\n }\r\n else if (input.contains(\" - \"))\r\n {\r\n \tint numerator1 = num1 * denom2;\r\n \tint numerator2 = num2 * denom1;\r\n \tint finalNumerator = numerator1 - numerator2;\r\n \tint denominator = denom2 * denom1;\r\n \tString Answer = finalNumerator + \"/\" + denominator;\r\n \treturn reduceAnswer(Answer);\r\n }\r\n else if (input.contains(\" * \"))\r\n {\r\n \tint numerator = num1 * num2;\r\n \tint denominator = denom1 * denom2;\r\n \tString Answer = numerator + \"/\" + denominator;\r\n \treturn reduceAnswer(Answer);\r\n }\r\n else\r\n {\r\n \tString error = \"Error: Invalid user input\";\r\n \treturn error; \r\n }\r\n\t}\r\n }",
"public final void mBACKSLASH() throws RecognitionException {\r\n try {\r\n int _type = BACKSLASH;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:273:2: ( '\\\\\\\\' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:273:4: '\\\\\\\\'\r\n {\r\n match('\\\\'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"@Override\n public DefaultUrlBuilder pathSegment(String thePath) {\n this.pathSegments.add(BaseUrl.UrlEncoder.encodePathSegment(thePath));\n return this;\n }",
"public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}",
"@Override\n protected String stringifySeparator() {\n return \" != \";\n }"
] | [
"0.62404096",
"0.6167522",
"0.6078867",
"0.60118157",
"0.58810514",
"0.5841717",
"0.58272684",
"0.5802667",
"0.5764027",
"0.5749986",
"0.57259506",
"0.56781906",
"0.55840063",
"0.55132353",
"0.5498267",
"0.5446229",
"0.5416528",
"0.541478",
"0.535699",
"0.5344155",
"0.5332396",
"0.5308297",
"0.52783364",
"0.527786",
"0.52692455",
"0.52503735",
"0.5242099",
"0.5227317",
"0.5224043",
"0.52098095",
"0.52089447",
"0.5159513",
"0.5144269",
"0.5118097",
"0.51148754",
"0.5110187",
"0.51004237",
"0.5091939",
"0.5076844",
"0.50702465",
"0.50630766",
"0.5049428",
"0.5030978",
"0.50296354",
"0.49842083",
"0.49827868",
"0.49776882",
"0.49750447",
"0.49712273",
"0.49535",
"0.494232",
"0.4940849",
"0.49267837",
"0.49192104",
"0.49115375",
"0.48994926",
"0.48897547",
"0.48860955",
"0.4875355",
"0.48746103",
"0.4869098",
"0.48675388",
"0.4863175",
"0.48628592",
"0.4855523",
"0.48548767",
"0.48548767",
"0.4854404",
"0.48466513",
"0.4839529",
"0.48323768",
"0.48260093",
"0.48255098",
"0.48032197",
"0.47998092",
"0.47987485",
"0.47903788",
"0.47903323",
"0.4787445",
"0.47798494",
"0.47788933",
"0.47730467",
"0.47618282",
"0.47586337",
"0.47581002",
"0.47546443",
"0.4752229",
"0.47387266",
"0.4720186",
"0.4719525",
"0.4718868",
"0.47156486",
"0.47155923",
"0.47120285",
"0.47028434",
"0.46927178",
"0.46909365",
"0.4689115",
"0.46731704",
"0.46704298"
] | 0.7762379 | 0 |
cat = Cc" / "Cf" / "Cn" / "Co" / "Cs" / "Ll" / "Lm" / "Lo" / "Lt" / "Lu" / "Mc" / "Me" / "Mn" / "Nd" / "Nl" / "No" / "Pc" / "Pd" / "Pe" / "Pf" / "Pi" / "Po" / "Ps" / "Sc" / "Sk" / "Sm" / "So" / "Zl" / "Zp" / "Zs" Hand optimised. | private boolean cat() {
if (in >= input.length() - 2) return false;
boolean ok = cats.contains(input.substring(in, in + 2));
if (ok) in = in + 2;
return ok;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String composeCharacterString(String string) {\n return null;\r\n }",
"private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }",
"String getCmt();",
"java.lang.String getCit();",
"C12000e mo41087c(String str);",
"static int[] lcp(char[] s) {\n return lcp(s, suffix(s));\n}",
"void mo1582a(String str, C1329do c1329do);",
"int getNumCyc();",
"void mo1935c(String str);",
"public static String simplifyCCG(String category) {\n category = replace_NP_with_N.matcher(category).replaceAll(\"N\");\n category = dcl_keeps_its_subject.matcher(category).replaceAll(\"D\\\\\\\\N\");\n category = remove_features.matcher(category).replaceAll(\"\");\n category = SbN_to_S.matcher(category).replaceAll(\"S\");\n category = D_to_S.matcher(category).replaceAll(\"S\");\n return category;\n }",
"C1111j mo5881f(String str);",
"public static String ControllaCF(String cf) {\r\n\t\tint i, s, c;\r\n\t\tString cf2;\r\n\t\tint setdisp[] = {1, 0, 5, 7, 9, 13, 15, 17, 19, 21, 2, 4, 18, 20,\r\n\t\t\t\t11, 3, 6, 8, 12, 14, 16, 10, 22, 25, 24, 23 };\r\n\t\tif( cf.length() == 0 ) return \"\";\r\n\t\tif( cf.length() != 16 )\r\n\t\t\treturn IConstanti.CF_ERRORE_LUNGHEZZA;\r\n\t\tcf2 = cf.toUpperCase();\r\n\t\tfor( i=0; i<16; i++ ){\r\n\t\t\tc = cf2.charAt(i);\r\n\t\t\tif( ! ( c>='0' && c<='9' || c>='A' && c<='Z' ) )\r\n\t\t\t\treturn IConstanti.CF_ERRORE_CARATTERI_NON_VALIDI;\r\n\t\t}\r\n\t\ts = 0;\r\n\t\tfor( i=1; i<=13; i+=2 ){\r\n\t\t\tc = cf2.charAt(i);\r\n\t\t\tif( c>='0' && c<='9' )\r\n\t\t\t\ts = s + c - '0';\r\n\t\t\telse\r\n\t\t\t\ts = s + c - 'A';\r\n\t\t}\r\n\t\tfor( i=0; i<=14; i+=2 ){\r\n\t\t\tc = cf2.charAt(i);\r\n\t\t\tif( c>='0' && c<='9' )\t c = c - '0' + 'A';\r\n\t\t\ts = s + setdisp[c - 'A'];\r\n\t\t}\r\n\t\tif( s%26 + 'A' != cf2.charAt(15) )\r\n\t\t\treturn IConstanti.CF_ERRORE_CODICE_CONTROLLO;\r\n\t\treturn \"\";\r\n\t}",
"public String cat()\n\t{\n\t\tSystem.out.println(\"type 4\");\n\t\t\n\t\treturn \"java\";\n\t}",
"public interface UnicodeConstants {\n\n /** Refers to unnormalized Unicode: */\n static final byte NORM_UNNORMALIZED = 0;\n /** Refers to Normalization Form C: */\n static final byte NORM_NFC = 1;\n /** Refers to Normalization Form KC: */\n static final byte NORM_NFKC = 2;\n /** Refers to Normalization Form D: */\n static final byte NORM_NFD = 3;\n /** Refers to Normalization Form KD: */\n static final byte NORM_NFKD = 4;\n /** Refers to Normalization Form THDL, which is NFD except for\n <code>U+0F77</code> and <code>U+0F79</code>, which are\n normalized according to NFKD. This is the One True\n Normalization Form, as it leaves no precomposed codepoints and\n does not normalize <code>U+0F0C</code>. */\n static final byte NORM_NFTHDL = 5;\n\n\n /** for those times when you need a char to represent a\n non-existent codepoint */\n static final char EW_ABSENT = '\\u0000';\n\n\n //\n // the thirty consonants, in alphabetical order:\n //\n\n /** first letter of the alphabet: */\n static final char EWC_ka = '\\u0F40';\n\n static final char EWC_kha = '\\u0F41';\n static final char EWC_ga = '\\u0F42';\n static final char EWC_nga = '\\u0F44';\n static final char EWC_ca = '\\u0F45';\n static final char EWC_cha = '\\u0F46';\n static final char EWC_ja = '\\u0F47';\n static final char EWC_nya = '\\u0F49';\n static final char EWC_ta = '\\u0F4F';\n static final char EWC_tha = '\\u0F50';\n static final char EWC_da = '\\u0F51';\n static final char EWC_na = '\\u0F53';\n static final char EWC_pa = '\\u0F54';\n static final char EWC_pha = '\\u0F55';\n static final char EWC_ba = '\\u0F56';\n static final char EWC_ma = '\\u0F58';\n static final char EWC_tsa = '\\u0F59';\n static final char EWC_tsha = '\\u0F5A';\n static final char EWC_dza = '\\u0F5B';\n static final char EWC_wa = '\\u0F5D';\n static final char EWC_zha = '\\u0F5E';\n static final char EWC_za = '\\u0F5F';\n /** Note the irregular name. The Extended Wylie representation is\n <code>'a</code>. */\n static final char EWC_achung = '\\u0F60';\n static final char EWC_ya = '\\u0F61';\n static final char EWC_ra = '\\u0F62';\n static final char EWC_la = '\\u0F63';\n static final char EWC_sha = '\\u0F64';\n static final char EWC_sa = '\\u0F66';\n static final char EWC_ha = '\\u0F67';\n /** achen, the 30th consonant (and, some say, the fifth vowel) DLC NOW FIXME: rename to EWC_achen */\n static final char EWC_a = '\\u0F68';\n\n\n /** In the word for father, \"pA lags\", there is an a-chung (i.e.,\n <code>\\u0F71</code>). This is the constant for that little\n guy. */\n static final char EW_achung_vowel = '\\u0F71';\n\n\n /* Four of the five vowels, some say, or, others say, \"the four\n vowels\": */\n /** \"gi gu\", the 'i' sound in the English word keep: */\n static final char EWV_i = '\\u0F72';\n /** \"zhabs kyu\", the 'u' sound in the English word tune: */\n static final char EWV_u = '\\u0F74';\n /** \"'greng bu\" (also known as \"'greng po\", and pronounced <i>dang-bo</i>), the 'a' sound in the English word gate: */\n static final char EWV_e = '\\u0F7A';\n /** \"na ro\", the 'o' sound in the English word bone: */\n static final char EWV_o = '\\u0F7C';\n\n\n /** subscribed form of EWC_wa, also known as wa-btags */\n static final char EWSUB_wa_zur = '\\u0FAD';\n /** subscribed form of EWC_ya */\n static final char EWSUB_ya_btags = '\\u0FB1';\n /** subscribed form of EWC_ra */\n static final char EWSUB_ra_btags = '\\u0FB2';\n /** subscribed form of EWC_la */\n static final char EWSUB_la_btags = '\\u0FB3';\n}",
"static int size_of_cc(String passed){\n\t\treturn 3;\n\t}",
"private static boolean composeHangul(char paramChar1, char paramChar2, long paramLong, char[] paramArrayOfChar1, int[] paramArrayOfInt, int paramInt1, boolean paramBoolean, char[] paramArrayOfChar2, int paramInt2, UnicodeSet paramUnicodeSet)\n/* */ {\n/* 1682 */ int i = paramArrayOfInt[0];\n/* 1683 */ if (isJamoVTNorm32JamoV(paramLong))\n/* */ {\n/* */ \n/* 1686 */ paramChar1 = (char)(paramChar1 - 'ᄀ');\n/* 1687 */ if (paramChar1 < '\\023') {\n/* 1688 */ paramChar2 = (char)(44032 + (paramChar1 * '\\025' + (paramChar2 - 'ᅡ')) * 28);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1693 */ if (i != paramInt1)\n/* */ {\n/* */ \n/* 1696 */ char c1 = paramArrayOfChar1[i];\n/* 1697 */ char c2; if ((c2 = (char)(c1 - 'ᆧ')) < '\\034')\n/* */ {\n/* 1699 */ i++;\n/* 1700 */ paramChar2 = (char)(paramChar2 + c2);\n/* 1701 */ } else if (paramBoolean)\n/* */ {\n/* */ \n/* 1704 */ paramLong = getNorm32(c1);\n/* 1705 */ if ((isNorm32Regular(paramLong)) && ((paramLong & 0x8) != 0L))\n/* */ {\n/* 1707 */ DecomposeArgs localDecomposeArgs = new DecomposeArgs(null);\n/* 1708 */ int j = decompose(paramLong, 8, localDecomposeArgs);\n/* 1709 */ if ((localDecomposeArgs.length == 1) && ((c2 = (char)(extraData[j] - 'ᆧ')) < '\\034'))\n/* */ {\n/* */ \n/* */ \n/* 1713 */ i++;\n/* 1714 */ paramChar2 = (char)(paramChar2 + c2);\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 1719 */ if (nx_contains(paramUnicodeSet, paramChar2)) {\n/* 1720 */ if (!isHangulWithoutJamoT(paramChar2)) {\n/* 1721 */ i--;\n/* */ }\n/* 1723 */ return false;\n/* */ }\n/* 1725 */ paramArrayOfChar2[paramInt2] = paramChar2;\n/* 1726 */ paramArrayOfInt[0] = i;\n/* 1727 */ return true;\n/* */ }\n/* 1729 */ } else if (isHangulWithoutJamoT(paramChar1))\n/* */ {\n/* */ \n/* 1732 */ paramChar2 = (char)(paramChar1 + (paramChar2 - 'ᆧ'));\n/* 1733 */ if (nx_contains(paramUnicodeSet, paramChar2)) {\n/* 1734 */ return false;\n/* */ }\n/* 1736 */ paramArrayOfChar2[paramInt2] = paramChar2;\n/* 1737 */ paramArrayOfInt[0] = i;\n/* 1738 */ return true;\n/* */ }\n/* 1740 */ return false;\n/* */ }",
"private static String zzty(String string2) {\n StringBuffer stringBuffer = new StringBuffer();\n int n = 0;\n while (n < string2.length()) {\n char c = string2.charAt(n);\n if (n == 0) {\n stringBuffer.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n stringBuffer.append('_').append(Character.toLowerCase(c));\n } else {\n stringBuffer.append(c);\n }\n ++n;\n }\n return stringBuffer.toString();\n }",
"private static String convertChinese(String category) {\n category = category.replaceAll(\"M\", \"N[num]\");\n category = category.replaceAll(\"QP\", \"NP\");\n category = category.replaceAll(\"LCP\", \"PP[lcp]\");\n return category;\n }",
"private static boolean CharInCategory(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tUnicodeCategory chcategory = UnicodeCategory.GetUnicodeCategory(ch);\n\n\t\tint i = start + SETSTART + mySetLength;\n\t\tint end = i + myCategoryLength;\n\t\twhile (i < end)\n\t\t{\n\t\t\tint curcat = (short) set.charAt(i);\n\n\t\t\tif (curcat == 0)\n\t\t\t{\n\t\t\t\t// zero is our marker for a group of categories - treated as a unit\n\t\t\t\tRefObject<Integer> tempRef_i = new RefObject<Integer>(i);\n\t\t\t\tboolean tempVar = CharInCategoryGroup(ch, chcategory, set, tempRef_i);\n\t\t\t\t\ti = tempRef_i.argValue;\n\t\t\t\tif (tempVar)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (curcat > 0)\n\t\t\t{\n\t\t\t\t// greater than zero is a positive case\n\n\t\t\t\tif (curcat == SpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 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\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t--curcat;\n\n\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// less than zero is a negative case\n\t\t\t\tif (curcat == NotSpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (!Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 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\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//curcat = -curcat;\n\t\t\t\t//--curcat;\n\t\t\t\tcurcat = -1 - curcat;\n\n\t\t\t\tif (chcategory != UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn false;\n\t}",
"String mo20731c();",
"private RunnerInfo.Category stringToCat(String catStr) {\n if (catStr.contains(\"Femme\")) {\n return RunnerInfo.Category.WOMEN;\n } else {\n return RunnerInfo.Category.MEN;\n }\n }",
"C8325a mo21498a(String str);",
"static int size_of_cnc(String passed){\n\t\treturn 3;\n\t}",
"void mo303a(C0237a c0237a, String str, String str2, String str3);",
"public String minCat(String a, String b) {\r\n if (a.length() > b.length()) {\r\n\r\n return a.substring(a.length() - b.length()) + b;\r\n } else {\r\n\r\n return a + b.substring(b.length() - a.length());\r\n }\r\n }",
"public static String[] GoldAUTOtoCATS(String line){\n String[] cats = AUTOtoCATS(line);\n for(int i = 0; i < cats.length; ++i) {\n //cats[i] = simplifyCCG(cats[i]);\n cats[i] = dropArgNoFeats(cats[i]);\n }\n return cats;\n }",
"public static boolean isCon(String s){\n boolean flag = true;\n int i = 0;\n while(flag && i < s.length()){\n if ((s.charAt(i) >= 'a' && s.charAt(i) <= 'z') || (s.charAt(i) >= 'A' && s.charAt(i) <='Z')) {\n flag = (s.charAt(i) != 'a' && s.charAt(i) != 'A' &&\n s.charAt(i) != 'e' && s.charAt(i) != 'E' &&\n s.charAt(i) != 'i' && s.charAt(i) != 'I' &&\n s.charAt(i) != 'o' && s.charAt(i) != 'O' &&\n s.charAt(i) != 'u' && s.charAt(i) != 'U' );\n }else\n flag = false;\n \n i++;\n }\n return flag;\n }",
"private String construyeCaracter(String palabra) throws IOException {\n\t\tToken aux = null;\n \t\twhile(!((aux = this.nextTokenWithWhites()).get_lexema().equals(\"'\"))) {\n \t\t\tif (aux.get_lexema().equals(\"fin\"))\n \t\t\t\treturn palabra;\n \t\t\tpalabra = palabra + aux.get_lexema();\n \t\t\t// Si vemos que el caracter se alarga mucho, paramos de leer\n \t\t\tif (palabra.length() > 4) {\n \t\t\t\treturn palabra;\n \t\t\t}\n \t\t}\n \t\tpalabra = palabra + aux.get_lexema();\n\t\treturn palabra;\n\t}",
"String getCpushares();",
"public abstract void mo2153a(CharSequence charSequence);",
"void circulardecode()\n{\nfor(i=0;i<s.length();i++)\n{\nc=s.charAt(i);\nk=(int)c;\nif(k==90)\nk1=65;\nelse\nif(k==122)\nk1=97;\nelse\nk1=k+1;\nc1=caseconverter(k,k1);\nSystem.out.print(c1);\n}\n}",
"void countCharByCategory(String inputstr) {\n\n\t\tint digitcount = 0;\n\t\tint lowercasecount = 0;\n\t\tint uppercasecount = 0;\n\t\tint specialcharcount = 0;\n\n\t\tfor (int i = 0; i < inputstr.length(); i++) {\n\n\t\t\tif (Character.isLowerCase(inputstr.charAt(i)))\n\t\t\t\tlowercasecount++;\n\t\t\telse if (Character.isUpperCase(inputstr.charAt(i)))\n\t\t\t\tuppercasecount++;\n\n\t\t\telse if (Character.isDigit(inputstr.charAt(i)))\n\t\t\t\tdigitcount++;\n\t\t\telse\n\t\t\t\tspecialcharcount++;\n\t\t}\n\t\tSystem.out.println(\"Total Digits: \" + digitcount + \"\\nTotal letters: \" + (lowercasecount+uppercasecount) + \"\\nTotal Uppercase: \"\n\t\t\t\t+ uppercasecount + \"\\nTotal lowercase: \" + lowercasecount + \"\\nTotal Special character: \"\n\t\t\t\t+ specialcharcount);\n\n\t}",
"String mo2801a(String str);",
"void mo12635a(String str);",
"private static String m618z(char[] cArr) {\n int length = cArr.length;\n for (int i = 0; length > i; i++) {\n int i2;\n char c = cArr[i];\n switch (i % 5) {\n case 0:\n i2 = 6;\n break;\n case 1:\n i2 = 14;\n break;\n case 2:\n i2 = 30;\n break;\n case 3:\n i2 = 7;\n break;\n default:\n i2 = 20;\n break;\n }\n cArr[i] = (char) (i2 ^ c);\n }\n return new String(cArr).intern();\n }",
"String mo150a(String str);",
"static int type_of_cc(String passed){\n\t\treturn 1;\n\t}",
"public static String canonicalDecomposeWithSingleQuotation(String paramString)\n/* */ {\n/* 2506 */ char[] arrayOfChar1 = paramString.toCharArray();\n/* 2507 */ int i = 0;\n/* 2508 */ int j = arrayOfChar1.length;\n/* 2509 */ Object localObject1 = new char[arrayOfChar1.length * 3];\n/* 2510 */ int k = 0;\n/* 2511 */ int m = localObject1.length;\n/* */ \n/* 2513 */ char[] arrayOfChar2 = new char[3];\n/* */ \n/* */ \n/* */ \n/* 2517 */ int i2 = 4;\n/* */ \n/* */ \n/* 2520 */ int i6 = (char)indexes[8];\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 2527 */ int i1 = 0xFF00 | i2;\n/* 2528 */ int i3 = 0;\n/* 2529 */ int i8 = 0;\n/* 2530 */ long l = 0L;\n/* 2531 */ int i5 = 0;\n/* 2532 */ int i10 = 0;\n/* */ int i9;\n/* 2534 */ int i7 = i9 = -1;\n/* */ for (;;) {\n/* 2536 */ int n = i;\n/* */ \n/* 2538 */ while ((i != j) && (((i5 = arrayOfChar1[i]) < i6) || \n/* */ \n/* 2540 */ (((l = getNorm32(i5)) & i1) == 0L) || ((i5 >= 44032) && (i5 <= 55203))))\n/* */ {\n/* */ \n/* 2543 */ i8 = 0;\n/* 2544 */ i++;\n/* */ }\n/* */ \n/* */ int i4;\n/* 2548 */ if (i != n) {\n/* 2549 */ i4 = i - n;\n/* 2550 */ if (k + i4 <= m) {\n/* 2551 */ System.arraycopy(arrayOfChar1, n, localObject1, k, i4);\n/* */ }\n/* */ \n/* 2554 */ k += i4;\n/* 2555 */ i3 = k;\n/* */ }\n/* */ \n/* */ \n/* 2559 */ if (i == j) {\n/* */ break;\n/* */ }\n/* */ \n/* 2563 */ i++;\n/* */ char c2;\n/* 2565 */ if (isNorm32Regular(l)) {\n/* 2566 */ c2 = '\\000';\n/* 2567 */ i4 = 1;\n/* */ \n/* */ }\n/* 2570 */ else if ((i != j) && \n/* 2571 */ (Character.isLowSurrogate(c2 = arrayOfChar1[i]))) {\n/* 2572 */ i++;\n/* 2573 */ i4 = 2;\n/* 2574 */ l = getNorm32FromSurrogatePair(l, c2);\n/* */ } else {\n/* 2576 */ c2 = '\\000';\n/* 2577 */ i4 = 1;\n/* 2578 */ l = 0L;\n/* */ }\n/* */ \n/* */ char[] arrayOfChar3;\n/* */ char c1;\n/* 2583 */ if ((l & i2) == 0L)\n/* */ {\n/* 2585 */ i7 = i9 = (int)(0xFF & l >> 8);\n/* 2586 */ arrayOfChar3 = null;\n/* 2587 */ i10 = -1;\n/* */ } else {\n/* 2589 */ localObject2 = new DecomposeArgs(null);\n/* */ \n/* */ \n/* 2592 */ i10 = decompose(l, i2, (DecomposeArgs)localObject2);\n/* 2593 */ arrayOfChar3 = extraData;\n/* 2594 */ i4 = ((DecomposeArgs)localObject2).length;\n/* 2595 */ i7 = ((DecomposeArgs)localObject2).cc;\n/* 2596 */ i9 = ((DecomposeArgs)localObject2).trailCC;\n/* 2597 */ if (i4 == 1)\n/* */ {\n/* 2599 */ c1 = arrayOfChar3[i10];\n/* 2600 */ c2 = '\\000';\n/* 2601 */ arrayOfChar3 = null;\n/* 2602 */ i10 = -1;\n/* */ }\n/* */ }\n/* */ \n/* 2606 */ if (k + i4 * 3 >= m)\n/* */ {\n/* 2608 */ localObject2 = new char[m * 2];\n/* 2609 */ System.arraycopy(localObject1, 0, localObject2, 0, k);\n/* 2610 */ localObject1 = localObject2;\n/* 2611 */ m = localObject1.length;\n/* */ }\n/* */ \n/* */ \n/* 2615 */ Object localObject2 = k;\n/* 2616 */ if (arrayOfChar3 == null)\n/* */ {\n/* 2618 */ if (needSingleQuotation(c1))\n/* */ {\n/* */ \n/* 2621 */ localObject1[(k++)] = 39;\n/* 2622 */ localObject1[(k++)] = c1;\n/* 2623 */ localObject1[(k++)] = 39;\n/* 2624 */ i9 = 0;\n/* 2625 */ } else if ((i7 != 0) && (i7 < i8))\n/* */ {\n/* */ \n/* 2628 */ k += i4;\n/* 2629 */ i9 = insertOrdered((char[])localObject1, i3, localObject2, k, c1, c2, i7);\n/* */ }\n/* */ else\n/* */ {\n/* 2633 */ localObject1[(k++)] = c1;\n/* 2634 */ if (c2 != 0) {\n/* 2635 */ localObject1[(k++)] = c2;\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* 2641 */ else if (needSingleQuotation(arrayOfChar3[i10])) {\n/* 2642 */ localObject1[(k++)] = 39;\n/* 2643 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2644 */ localObject1[(k++)] = 39;\n/* 2645 */ i4--;\n/* */ do {\n/* 2647 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2648 */ i4--; } while (i4 > 0);\n/* */ }\n/* 2650 */ else if ((i7 != 0) && (i7 < i8)) {\n/* 2651 */ k += i4;\n/* 2652 */ i9 = mergeOrdered((char[])localObject1, i3, localObject2, arrayOfChar3, i10, i10 + i4);\n/* */ }\n/* */ else\n/* */ {\n/* */ do {\n/* 2657 */ localObject1[(k++)] = arrayOfChar3[(i10++)];\n/* 2658 */ i4--; } while (i4 > 0);\n/* */ }\n/* */ \n/* */ \n/* 2662 */ i8 = i9;\n/* 2663 */ if (i8 == 0) {\n/* 2664 */ i3 = k;\n/* */ }\n/* */ }\n/* 2667 */ return new String((char[])localObject1, 0, k);\n/* */ }",
"public static void main(String[] args) {\n\t\tString s = \"malala got nobel price for peace, in swiz.\";\r\n\t\ts = s.toLowerCase();\r\n\t\tint count = 0;\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif ((s.charAt(i) >= 'a' && s.charAt(i) <= 'z') && \r\n\t\t\t\t\t!(s.charAt(i) == 'a' || s.charAt(i) == 'e'\r\n\t\t\t\t\t|| s.charAt(i) == 'i' || s.charAt(i) == 'o' || s.charAt(i) == 'u')) {\r\n\t\t\t\tcount = count + 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Total number of consonants \" + count);\r\n\t}",
"private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }",
"public void testAlgorithmSpecific() {\n TestData.chars(\"x y z\", \"xX Zz\")\n ._______Def_(\" - \", \" - - \")\n .____Ignore_(\" - \", \" -------- \")\n .all();\n }",
"static int size_of_cz(String passed){\n\t\treturn 3;\n\t}",
"public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n System.out.println(\"Enter your word\");\n String word=scan.nextLine();\n //index num=01234\n String result=\"\"; // all below characters will be concatenated one by one- knalB\n if (word.length()>5){\n result=\"Too long\";\n }else if (word.length()<5){\n result=\"Too short\";\n }else {\n /* result+=word.charAt(4);\n result+=word.charAt(3);\n result+=word.charAt(2);\n result+=word.charAt(1);\n result+=word.charAt(0);\n\n */\n result=\"\" + word.charAt(4) + word.charAt(3) + word.charAt(2) + word.charAt(1) + word.charAt(0);\n } // e l c n u\n System.out.println(\"result = \" + result);\n\n\n\n }",
"public String mo26396a(String str) {\n int length = str.length();\n for (int i = 0; i < length; i++) {\n char charAt = str.charAt(i);\n char[][] cArr = this.f18227c;\n if (charAt < cArr.length && cArr[charAt] != null) {\n return mo26403a(str, i);\n }\n }\n return str;\n }",
"private static String cup(String str) {\n\t\treturn str.substring(0,1).toLowerCase() + str.substring(1); \n\t}",
"@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }",
"public static char complement(char c)\n\t{\n\tswitch(c)\n\t\t{\n case 'A': return 'T';\n case 'T': case 'U': return 'A';\n case 'G': return 'C';\n case 'C': return 'G';\n\n case 'a': return 't';\n case 't': case 'u': return 'a';\n case 'g': return 'c';\n case 'c': return 'g';\n\n case 'w': return 'w';\n case 'W': return 'W';\n\n case 's': return 's';\n case 'S': return 'S';\n\n case 'y': return 'r';\n case 'Y': return 'R';\n\n case 'r': return 'y';\n case 'R': return 'Y';\n\n case 'k': return 'm';\n case 'K': return 'M';\n\n case 'm': return 'k';\n case 'M': return 'K';\n\n case 'b': return 'v';\n case 'd': return 'h';\n case 'h': return 'd';\n case 'v': return 'b';\n\n\n case 'B': return 'V';\n case 'D': return 'H';\n case 'H': return 'D';\n case 'V': return 'B';\n\n case 'N': return 'N';\n case 'n': return 'n';\n\t\tdefault: return 'N';\n\t\t}\n\t}",
"private String e19BuildStaffGageString(String s) {\n String tmp1 = null;\n if ((s != null) && (s.length() > 0)) {\n tmp1 = String.format(\"%c%s-%c\", SEP_CHAR, s, SEP_CHAR);\n } else {\n tmp1 = String.format(\"%c-----%c\", SEP_CHAR, SEP_CHAR);\n }\n\n return tmp1;\n }",
"public RegexCharClass()\n\t{\n\t\t_rangelist = new java.util.ArrayList<SingleRange>(6);\n\t\t_canonical = true;\n\t\t_categories = new StringBuilder();\n\n\t}",
"public static String b(String paramString)\r\n/* 690: */ {\r\n/* 691:682 */ String str = \"\";\r\n/* 692:683 */ int i1 = -1;\r\n/* 693:684 */ int i2 = paramString.length();\r\n/* 694:686 */ while ((i1 = paramString.indexOf('§', i1 + 1)) != -1) {\r\n/* 695:687 */ if (i1 < i2 - 1)\r\n/* 696: */ {\r\n/* 697:688 */ char c1 = paramString.charAt(i1 + 1);\r\n/* 698:690 */ if (c(c1)) {\r\n/* 699:691 */ str = \"§\" + c1;\r\n/* 700:692 */ } else if (d(c1)) {\r\n/* 701:693 */ str = str + \"§\" + c1;\r\n/* 702: */ }\r\n/* 703: */ }\r\n/* 704: */ }\r\n/* 705:698 */ return str;\r\n/* 706: */ }",
"public static void main(String[] args) {\n System.out.println(censorLetter(\"computer science\", 'e')); //\"comput*r sci*nc*\"\n System.out.println(censorLetter(\"trick or treat\", 't')); //\"*rick or *rea*\"\n }",
"java.lang.String getCsStr();",
"static String stringCutter1(String s) {\n int value = s.length() % 2 == 0 ? s.length() / 2 : s.length() / 2 + 1;\n\n // pemotongan string untuk pemotongan kelompok pertama\n String sentence1 = s.substring(0, value);\n\n // perulangan untuk menggeser nilai setiap karakter\n String wordNow = \"\";\n for (int i = 0; i < sentence1.length(); i++) {\n char alphabet = sentence1.toUpperCase().charAt(i);\n // pengubahan setiap karakter menjadi int\n // untuk menggeser 3 setiap nilai nya\n int asciiDecimal = (int) alphabet;\n // pengecekan kondisi apabila karakter melewati kode ascii nya\n if (asciiDecimal > 124) {\n int alphabetTransfer = 0 + (127 - asciiDecimal);\n wordNow += (char) alphabetTransfer;\n\n } else {\n int alphabetTrasfer = asciiDecimal + 3;\n wordNow += (char) alphabetTrasfer;\n }\n }\n return wordNow;\n }",
"private static String m7946z(char[] cArr) {\n int length = cArr.length;\n for (int i = 0; length > i; i++) {\n int i2;\n char c = cArr[i];\n switch (i % 5) {\n case 0:\n i2 = 70;\n break;\n case 1:\n i2 = 26;\n break;\n case 2:\n i2 = C0607n.co;\n break;\n case 3:\n i2 = 99;\n break;\n default:\n i2 = 16;\n break;\n }\n cArr[i] = (char) (i2 ^ c);\n }\n return new String(cArr).intern();\n }",
"public static void main(String[] args) {\n Scanner key=new Scanner(System.in);\r\n while(key.hasNext())\r\n {\r\n String s=key.next();\r\n String c=\"\";\r\n for (int i = 0; i <s.length(); i++) {\r\n if((Character)s.charAt(i)=='1'|| (Character)s.charAt(i)=='0'|| (Character)s.charAt(i)=='-')\r\n {\r\n // c=c+c.concat(String.valueOf((Character)s.charAt(i)));\r\n System.out.print((Character)s.charAt(i));\r\n }\r\n else if((Character)s.charAt(i)=='A' || (Character)s.charAt(i)=='B' || (Character)s.charAt(i)=='C')\r\n {\r\n System.out.print(2);\r\n }\r\n else if((Character)s.charAt(i)=='D' || (Character)s.charAt(i)=='E' || (Character)s.charAt(i)=='F')\r\n {\r\n System.out.print(3);\r\n }\r\n else if((Character)s.charAt(i)=='G' || (Character)s.charAt(i)=='H' || (Character)s.charAt(i)=='I')\r\n {\r\n System.out.print(4);\r\n }\r\n else if((Character)s.charAt(i)=='J' || (Character)s.charAt(i)=='K' || (Character)s.charAt(i)=='L')\r\n {\r\n System.out.print(5);\r\n }\r\n else if((Character)s.charAt(i)=='M' || (Character)s.charAt(i)=='N' || (Character)s.charAt(i)=='O')\r\n {\r\n System.out.print(6);\r\n }\r\n else if((Character)s.charAt(i)=='P' || (Character)s.charAt(i)=='Q' || (Character)s.charAt(i)=='R' || (Character)s.charAt(i)=='S')\r\n {\r\n System.out.print(7);\r\n }\r\n else if((Character)s.charAt(i)=='T' || (Character)s.charAt(i)=='U' || (Character)s.charAt(i)=='V')\r\n {\r\n System.out.print(8);\r\n }\r\n else if((Character)s.charAt(i)=='W' || (Character)s.charAt(i)=='X' || (Character)s.charAt(i)=='Y'|| (Character)s.charAt(i)=='Z')\r\n {\r\n System.out.print(9);\r\n }\r\n }\r\n System.out.println();\r\n }\r\n }",
"private static boolean CharInCategoryGroup(char ch, UnicodeCategory chcategory, String category, RefObject<Integer> i)\n\t{\n\t\ti.argValue++;\n\n\t\tint curcat = (short) category.charAt(i.argValue);\n\t\tif (curcat > 0)\n\t\t{\n\t\t\t// positive case - the character must be in ANY of the categories in the group\n\t\t\tboolean answer = false;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (!answer)\n\t\t\t\t{\n\t\t\t\t\t--curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t// negative case - the character must be in NONE of the categories in the group\n\t\t\tboolean answer = true;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (answer)\n\t\t\t\t{\n\t\t\t\t\t//curcat = -curcat;\n\t\t\t\t\t//--curcat;\n\t\t\t\t\tcurcat = -1 - curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t}",
"private char complement(char c) {\n switch (c) {\n case 'A': c = 'T'; break;\n case 'T': c = 'A'; break;\n case 'G': c = 'C'; break;\n case 'C': c = 'G'; break;\n case 'a': c = 't'; break;\n case 't': c = 'a'; break;\n case 'g': c = 'c'; break;\n case 'c': c = 'g'; break;\n default: c = 'N'; break;\n }\n return c;\n }",
"static int size_of_pchl(String passed){\n\t\treturn 1;\n\t}",
"static void stc_with_car(String passed){\n\t\tCS = true;\n\t}",
"public static String rndString(int length, String type, char[] cc) {\r\n char min = ' ';\r\n char max = ' ';\r\n if (type.trim().equals(LATIN_LARGE)) {\r\n min = 'A';\r\n max = 'Z';\r\n } else if (type.trim().equals(LATIN_SMALL)) {\r\n min = 'a';\r\n max = 'z';\r\n } else if (type.trim().equals(DIGITS)) {\r\n min = '0';\r\n max = '9';\r\n }\r\n String CC = new String(cc);\r\n CC = shaffleString(CC);\r\n char[] c = RBytes.rndCharArray(length, min, max);\r\n if (min != max) {\r\n return new String(c) + CC;\r\n }\r\n\r\n return CC;\r\n }",
"public static void main(String[] args) {\n char[] cadeiaCaracter = {'B','E','N','G','I','L'};\n String cadeiaChar = new String(cadeiaCaracter);\n System.out.println(cadeiaChar);\n //Criar string a partir de intervalo de cadeias de caractere\n char[] abcdef = {'A','B','C','D','E','F'};\n String abc = new String(abcdef, 0,3);\n System.out.println(abc);\n //Array de byte, cada byte representa um caractere da tabela ascii\n byte[] ascii = {65,66,67,68,69};\n String abcde = new String(ascii);\n System.out.println(abcde);\n String cde = new String(ascii,1,3);\n System.out.println(cde);\n //Atribuição sem o new\n String let = \"Letícia\";\n String lettis = \"Letícia\";\n System.out.println(let);\n }",
"@Test\n\t public void test4()\n\t{\n\t\t\t// String s = new String();\n\t // s = s.replaceAll(\"\\\\s+\", \" \");\n\t\t\tassertEquals(\"\", LRS.lcp(\"vcd\",\"cd\"));\n\t}",
"boolean mo25263a(String str, String str2, boolean z, int i, int i2, int i3, boolean z2, C4619b bVar, boolean z3);",
"private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}",
"static int type_of_cnc(String passed){\n\t\treturn 1;\n\t}",
"private static String m10f() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n return stringBuilder.toString();\n }",
"public static void kuo(String c)\n\t{\n\t\tchar * p;\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * q;\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * i;\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * t;\n\t\tint s;\n\t\tfor (;;)\n\t\t{\n\t\t\ts = 0;\n\t\t\tfor (i = c; * i != '\\0';i++)\n\t\t\t{\n\t\t\t\tfor (p = i; * p != '\\0';p++)\n\t\t\t\t{\n\t\t\t\t\tif (*p == '(')\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (q = p + 1; * q != '\\0';q++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (*q == '(')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (*q == ')')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t*p = 'a';\n\t\t\t\t\t\t\t\t\t*q = 'a';\n\t\t\t\t\t\t\t\t\tbreak;\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}\n\t\t\t}\n\t\t\tfor (q = c; * q != '\\0';q++)\n\t\t\t{\n\t\t\t\tfor (t = q; * t != '\\0';t++)\n\t\t\t\t{\n\t\t\t\t\tif (*q == '(' && *t == ')')\n\t\t\t\t\t{\n\t\t\t\t\t\ts = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (s == 0)\n\t\t\t{\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}",
"private static char[] m619z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 20);\n }\n return toCharArray;\n }",
"@Override\n public String getCosmetics() {\n return \"Jeans\" + avatar.getCosmetics();\n }",
"public String compress() {\r\n \tfor (int i = 0; i < text.length(); i++)\r\n \t\tcompressedText += charToCode.get(text.charAt(i));\r\n return compressedText;\r\n }",
"String mo38972c();",
"CharSequenceConsumer cat(CharSequence chars) throws XPathException;",
"private ArrayList<Character> characterArrayListMaker(String s) {\n ArrayList<Character> result = new ArrayList<Character>();\n for (int i = 0; i < s.length(); i++){\n result.add(s.charAt(i));\n }\n return result;\n }",
"private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }",
"void mo3768a(String str);",
"static int type_of_cz(String passed){\n\t\treturn 1;\n\t}",
"private static String removeChars(String input, String rmv){\n\t\t// in case checked with question asker the char possibility is ASCII\n\t\tboolean[] flags=new boolean[128];\n\t\t// using Arrays.fill to set all flase\n\t\tArrays.fill(flags, false);\n\t\t\n\t\tfor(int i=0;i<rmv.length();i++){\n\t\tflags[(int)rmv.charAt(i)]=true;\t\n\t\t}\n\t\t\n\t\t\n\t\t// here is another trick,\n\t\t// instead of arbitrially loop the array\n\t\t// use self-incremental end pointer\n\t\tint src=0,dst=0;\n\t\tint len=input.length(); \n\t\tchar[] s=input.toCharArray();\n\t\t//save the origional length now, as input array will be updated later, the length maybe changed.\n\t\twhile(src<len){\n\t\t\tif(!flags[(int)s[src]]){\n\t\t\t\ts[dst++]=s[src];\n\t\t\t}\n\t\t\tsrc++;\n\t\t}\n\t\treturn new String(s,0,dst);\n\t}",
"C11996a mo41079a(String str);",
"public static void main(String[] args) {\n\t\tchar aa = '\\u0000';\r\n\t\tchar a = '\\u0041';\r\n\t\tchar b = '\\u0042';\r\n\t\tchar c = '\\u0043';\r\n\t\tchar d = '\\u0044';\r\n\t\tchar e = '\\u0045';\r\n\t\tchar f = '\\u0046';\r\n\t\tchar g = '\\u0047';\r\n\t\tchar h = '\\u0048';\r\n\t\tchar i = '\\u0049';\r\n\t\tchar j = '\\u004A';\r\n\t\tchar k = '\\u004B';\r\n\t\tchar l = '\\u004C';\r\n\t\tchar m = '\\u004D';\r\n\t\tchar n = '\\u004E';\r\n\t\tchar o = '\\u004F';\r\n\t\tchar p = '\\u0051';\r\n\t\tchar q = '\\u0051';\r\n\t\tchar r = '\\u0052';\r\n\t\tchar s = '\\u0053';\r\n\t\tchar t = '\\u0054';\r\n\t\tchar u = '\\u0055';\r\n\t\tchar v = '\\u0056';\r\n\t\tchar w = '\\u0057';\r\n\t\tchar x = '\\u0058';\r\n\t\tchar y = '\\u0059';\r\n\t\tchar z = '\\u0060';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(+i+\"\"+aa+\"\"+w+\"\"+i+\"\"+s+\"\"+h+\"\"+aa+\"\"+t+\"\"+o+\"\"+aa+\"\"+p+\"\"+e+\"\"+r+\"\"+i+\"\"+s+\"\"+h);\r\n\t}",
"void mo61580c(boolean z, String str, int i);",
"C12000e mo41091f(String str);",
"static int size_of_cnz(String passed){\n\t\treturn 3;\n\t}",
"public static void main(String[] args){\n\t\tSystem.out.println(mixString(\"12345\",\"abcde\")); //should be 1a2b3c4d5e\n\t\tSystem.out.println(mixString(\"howdy\",\"hello\")); //should be hhoewldlyo\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(compressBad(\"aaaabbbccccccd\"));\r\n\t}",
"static int type_of_pchl(String passed){\n\t\treturn 1;\n\t}",
"public static String turnIntoCV(String para_word) {\n\t\tString temp = \"\";\r\n\t\tfor (int i = 0; i < para_word.length() - 1; i++) {\r\n\r\n\t\t\t// beginning special cases\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tif (para_word.charAt(i) == 'y'\r\n\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1)))\r\n\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t}\r\n\r\n\t\t\tif (i > 0) {\r\n\t\t\t\tif (para_word.charAt(i) == 'y'\r\n\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1))\r\n\t\t\t\t\t\t&& !(checkIfVowel(para_word.charAt(i + -1)))) {\r\n\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// normal cases\r\n\t\t\tif ((checkIfVowel(para_word.charAt(i)))\r\n\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i + 1))) {\r\n\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t} else if (!checkIfVowel(para_word.charAt(i))\r\n\t\t\t\t\t&& (para_word.charAt(i + 1) == 'y' || checkIfVowel(para_word\r\n\t\t\t\t\t\t\t.charAt(i + 1)))) {\r\n\t\t\t\ttemp = temp + \"C\";\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// ending special cases\r\n\t\t\tif (para_word.length() >= 3) {\r\n\t\t\t\tif (i == para_word.length() - 2) {\r\n\t\t\t\t\tif (para_word.charAt(i + 1) == 'y'\r\n\t\t\t\t\t\t\t&& !checkIfVowel(para_word.charAt(i - 1)))\r\n\t\t\t\t\t\ttemp = temp + \"V\";\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif (para_word.length() >= 2) {\r\n\t\t\t\tif (i == para_word.length() - 2) {\r\n\t\t\t\t\tif (checkIfVowel(para_word.charAt(i + 1)))\r\n\t\t\t\t\t\ttemp = temp + \"V\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\ttemp = temp + \"C\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn temp;\r\n\t}",
"private void a(String paramString, boolean paramBoolean)\r\n/* 282: */ {\r\n/* 283:293 */ for (int i1 = 0; i1 < paramString.length(); i1++)\r\n/* 284: */ {\r\n/* 285:294 */ char c1 = paramString.charAt(i1);\r\n/* 286: */ int i2;\r\n/* 287: */ int i3;\r\n/* 288:296 */ if ((c1 == '§') && (i1 + 1 < paramString.length()))\r\n/* 289: */ {\r\n/* 290:297 */ i2 = \"0123456789abcdefklmnor\".indexOf(paramString.toLowerCase().charAt(i1 + 1));\r\n/* 291:299 */ if (i2 < 16)\r\n/* 292: */ {\r\n/* 293:300 */ this.r = false;\r\n/* 294:301 */ this.s = false;\r\n/* 295:302 */ this.v = false;\r\n/* 296:303 */ this.u = false;\r\n/* 297:304 */ this.t = false;\r\n/* 298:305 */ if ((i2 < 0) || (i2 > 15)) {\r\n/* 299:306 */ i2 = 15;\r\n/* 300: */ }\r\n/* 301:309 */ if (paramBoolean) {\r\n/* 302:310 */ i2 += 16;\r\n/* 303: */ }\r\n/* 304:313 */ i3 = this.f[i2];\r\n/* 305:314 */ this.q = i3;\r\n/* 306:315 */ cjm.c((i3 >> 16) / 255.0F, (i3 >> 8 & 0xFF) / 255.0F, (i3 & 0xFF) / 255.0F, this.p);\r\n/* 307: */ }\r\n/* 308:316 */ else if (i2 == 16)\r\n/* 309: */ {\r\n/* 310:317 */ this.r = true;\r\n/* 311: */ }\r\n/* 312:318 */ else if (i2 == 17)\r\n/* 313: */ {\r\n/* 314:319 */ this.s = true;\r\n/* 315: */ }\r\n/* 316:320 */ else if (i2 == 18)\r\n/* 317: */ {\r\n/* 318:321 */ this.v = true;\r\n/* 319: */ }\r\n/* 320:322 */ else if (i2 == 19)\r\n/* 321: */ {\r\n/* 322:323 */ this.u = true;\r\n/* 323: */ }\r\n/* 324:324 */ else if (i2 == 20)\r\n/* 325: */ {\r\n/* 326:325 */ this.t = true;\r\n/* 327: */ }\r\n/* 328:326 */ else if (i2 == 21)\r\n/* 329: */ {\r\n/* 330:327 */ this.r = false;\r\n/* 331:328 */ this.s = false;\r\n/* 332:329 */ this.v = false;\r\n/* 333:330 */ this.u = false;\r\n/* 334:331 */ this.t = false;\r\n/* 335: */ \r\n/* 336:333 */ cjm.c(this.m, this.n, this.o, this.p);\r\n/* 337: */ }\r\n/* 338:336 */ i1++;\r\n/* 339: */ }\r\n/* 340: */ else\r\n/* 341: */ {\r\n/* 342:340 */ i2 = \"\".indexOf(c1);\r\n/* 343:342 */ if ((this.r) && (i2 != -1))\r\n/* 344: */ {\r\n/* 345: */ do\r\n/* 346: */ {\r\n/* 347:345 */ i3 = this.b.nextInt(this.d.length);\r\n/* 348:346 */ } while (this.d[i2] != this.d[i3]);\r\n/* 349:347 */ i2 = i3;\r\n/* 350: */ }\r\n/* 351:353 */ float f1 = this.k ? 0.5F : 1.0F;\r\n/* 352:354 */ int i4 = ((c1 == 0) || (i2 == -1) || (this.k)) && (paramBoolean) ? 1 : 0;\r\n/* 353:356 */ if (i4 != 0)\r\n/* 354: */ {\r\n/* 355:357 */ this.i -= f1;\r\n/* 356:358 */ this.j -= f1;\r\n/* 357: */ }\r\n/* 358:360 */ float f2 = a(i2, c1, this.t);\r\n/* 359:361 */ if (i4 != 0)\r\n/* 360: */ {\r\n/* 361:362 */ this.i += f1;\r\n/* 362:363 */ this.j += f1;\r\n/* 363: */ }\r\n/* 364:366 */ if (this.s)\r\n/* 365: */ {\r\n/* 366:367 */ this.i += f1;\r\n/* 367:368 */ if (i4 != 0)\r\n/* 368: */ {\r\n/* 369:369 */ this.i -= f1;\r\n/* 370:370 */ this.j -= f1;\r\n/* 371: */ }\r\n/* 372:372 */ a(i2, c1, this.t);\r\n/* 373:373 */ this.i -= f1;\r\n/* 374:374 */ if (i4 != 0)\r\n/* 375: */ {\r\n/* 376:375 */ this.i += f1;\r\n/* 377:376 */ this.j += f1;\r\n/* 378: */ }\r\n/* 379:378 */ f2 += 1.0F;\r\n/* 380: */ }\r\n/* 381: */ ckx localckx;\r\n/* 382: */ VertexBuffer localciv;\r\n/* 383:381 */ if (this.v)\r\n/* 384: */ {\r\n/* 385:382 */ localckx = ckx.getInstance();\r\n/* 386:383 */ localciv = localckx.getBuffer();\r\n/* 387:384 */ cjm.x();\r\n/* 388:385 */ localciv.begin();\r\n/* 389:386 */ localciv.addVertex(this.i, this.j + this.a / 2, 0.0D);\r\n/* 390:387 */ localciv.addVertex(this.i + f2, this.j + this.a / 2, 0.0D);\r\n/* 391:388 */ localciv.addVertex(this.i + f2, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 392:389 */ localciv.addVertex(this.i, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 393:390 */ localckx.draw();\r\n/* 394:391 */ cjm.w();\r\n/* 395: */ }\r\n/* 396:394 */ if (this.u)\r\n/* 397: */ {\r\n/* 398:395 */ localckx = ckx.getInstance();\r\n/* 399:396 */ localciv = localckx.getBuffer();\r\n/* 400:397 */ cjm.x();\r\n/* 401:398 */ localciv.begin();\r\n/* 402:399 */ int i5 = this.u ? -1 : 0;\r\n/* 403:400 */ localciv.addVertex(this.i + i5, this.j + this.a, 0.0D);\r\n/* 404:401 */ localciv.addVertex(this.i + f2, this.j + this.a, 0.0D);\r\n/* 405:402 */ localciv.addVertex(this.i + f2, this.j + this.a - 1.0F, 0.0D);\r\n/* 406:403 */ localciv.addVertex(this.i + i5, this.j + this.a - 1.0F, 0.0D);\r\n/* 407:404 */ localckx.draw();\r\n/* 408:405 */ cjm.w();\r\n/* 409: */ }\r\n/* 410:408 */ this.i += (int)f2;\r\n/* 411: */ }\r\n/* 412: */ }\r\n/* 413: */ }",
"public static void main(String[] args) {\n\n\t\t\n\t\tString s = \"平仮�??stringabc片仮�??numbers 123漢字gh%^&*#$1@):\";\n\t\t\n\t\t//Regular Expression: [^a-zA-Z0-9]\n\t\t\n\t\ts = s.replaceAll(\"[^a-zA-Z0-9]\", \"-\"); // ^ symbol is used for not/except\n\t\tSystem.out.println(s);\n\t}",
"private final static String cleanRecord3( String s ) {\n\n char[] ca = s.toCharArray();\n char[] ca2 = new char [ca.length +16]; // allow for all commas\n char letter;\n char lastLetter = 'a'; // init for complier\n int i2 = 0;\n\n for ( int i=0; i<ca.length; i++ ) {\n\n letter = ca[i];\n if ( letter == ',' ) { // if a comma\n\n if (lastLetter == ',') { // if 2 commas in a row\n\n ca2[i2] = '?'; // replace with a '?'\n i2++;\n }\n }\n\n ca2[i2] = letter; // copy this character to work area\n i2++;\n\n lastLetter = letter; // save last letter\n\n } // end of loop\n\n char[] ca3 = new char [i2];\n\n for ( int i=0; i<i2; i++ ) {\n letter = ca2[i]; // get from first array\n ca3[i] = letter; // move to correct size array\n }\n\n return new String (ca3);\n\n }",
"static String caesarCipher(String s, int k) {\n char[] chars = s.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n chars[i] = shift(chars[i], k);\n }\n return new String(chars);\n }",
"private static String m3267z(char[] cArr) {\n int length = cArr.length;\n for (int i = 0; length > i; i++) {\n int i2;\n char c = cArr[i];\n switch (i % 5) {\n case 0:\n i2 = 89;\n break;\n case 1:\n i2 = 79;\n break;\n case 2:\n i2 = 63;\n break;\n case 3:\n i2 = 125;\n break;\n default:\n i2 = 18;\n break;\n }\n cArr[i] = (char) (i2 ^ c);\n }\n return new String(cArr).intern();\n }",
"static int size_of_cp(String passed){\n\t\treturn 3;\n\t}",
"static int size_of_cma(String passed){\n\t\treturn 1;\n\t}",
"private void validSyntaxis(char[] fun){\n\t\tString valores = \"(a+/*-^\";\n\t\tString valores1 =\"(+/*-^\";\n\t\tString operadores =\"+/*-^\";\n\t\tString valores2 =\"(+-yzxuvwlmnjkpstc123456789e0ai\";\n\t\t//String valores2 =\"(+-xyzstc123456789e0ai\";\n\t\t//String valores3 =\"x1234567890\";\n\t\tString valores3 =\"x1234567890\";\n\t\tString valores4 =\"1234567890\";\n\t\tint pos = fun.length-1;\n\n\t\tif(pos == 0){\n\t\t\tif(valores2.indexOf(fun[pos]) == -1)\n\t\t\t\tcont++;\n\t\t\telse\n\t\t\t\tif(valores2.indexOf(fun[pos]) == 0)\n\t\t\t\t\tcont2++;\n\n\t\t}\n\n\t\telse if(pos >= 1){\n\t\t\tchar aux = fun[pos];\n\t\t\tchar aux2 = fun[pos-1];\n\n\t\t\t//Caracter 'a','A'\n\t\t\tif(aux == 'a'){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'i' || aux == 'e'){\n\t\t\t\tif(aux2 != 's' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 's'){\n\t\t\t\tif(aux2 != 'c' && valores.indexOf(aux2) == -1 && aux2 != 'b' && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'c'){\n\t\t\t\tif(aux2 != 's' && valores.indexOf(aux2) == -1 && aux2 != 'e')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 't'){\n\t\t\t\tif(aux2 != 'r' && valores.indexOf(aux2) == -1 && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'o'){\n\t\t\t\tif(aux2 != 'c')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'b'){\n\t\t\t\tif(aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'n'){\n\t\t\t\tif(aux2 != 'i' && aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'x'){\n\t\t\t\tif(valores4.indexOf(aux2) != -1)\n\t\t\t\t\tcont++;\n\n\t\t\t}\n\n\n\t\t\telse if(aux == 'h'){\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'r'){\n\t\t\t\tif(aux2 != 'q')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '.'){\n\t\t\t\t\n\t\t\t\tif(valores4.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\n\t\t\t\tboolean existe = false;\n\t\t\t\tint i = pos;\n\t\t\t\twhile(operadores.indexOf(fun[i]) == -1 && i > 0){\n\t\t\t\t\tif(existe && fun[i] == '.'){\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(fun[i] == '.')\n\t\t\t\t\t\texiste = true;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(aux == 'q'){\n\t\t\t\tif(aux2 != 's')\n\t\t\t\t\tcont++;\n\t\t\t\tif(pos > 1)\n\t\t\t\t\tif(fun[pos-2] == 'o' || fun[pos-2] == 'b' || fun[pos-2] == 'c' || fun[pos-2] == 'a')\n\t\t\t\t\t\tcont++;\n\t\t\t}\n\t\t\n\t\t\telse if(valores3.indexOf(aux) != -1){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != '(' && valores4.indexOf(aux2) == -1 && aux2 != '.')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '('){\n\t\t\t\tcont2++;\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't' && aux2 != 'h' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == ')'){\n\t\t\t\tcont2--;\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '+' || aux == '-'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')' && aux2 != '(' && aux2 != '^')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '/' || aux == '*' || aux == '^'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\tif((aux2 == '/' || aux2 == '*' || aux2 == '^') && pos == 1)\n\t\t\t\tcont++;\n\t\t}\n\n\t\tif(cont > 0 || cont2 != 0)\n\t\t\tthis.setBackground(Color.RED);\n\t\telse\n\t\t\tthis.setBackground(Color.GREEN);\n\t}",
"private String getString(byte c) {\n\t\treturn c==1? \"$ \": \" \";\n\t}",
"public char Get_Character() {\n\n\n\n /* Hex equivalent of Morse code is formed by left-shifting */\n /* 1 or 0 into hex_code. The 0x01 initial value marks the */\n /* beginning of the bit field, 1 being a dit and 0 a dash. */\n\n /* Get the level of a fragment from PLL detector. A fragment */\n /* is a small fraction of a morse code element, there are from */\n /* 8 to 30 frags/element depending on Morse speed (30-10 w.p.m) */\n while(true) {\n\t/* Decide on a mark or space fragment */\n\t/* with a hysterisis on the threshold */\n\tGet_Fragment();\n\n\t/* Increment mark or space count */\n\tif( isFlagSet(MARK_TONE) )\n\t mark_cnt++;\n\telse\n\t space_cnt++;\n\n\t/* If a mark element is too long, limit count */\n\tif( mark_cnt > unit_elem * 8 ) mark_cnt = unit_elem * 8;\n\n\t/* If a space element is too long, limit count */\n\tif( space_cnt > unit_elem * 16 ) space_cnt = unit_elem * 16;\n\n\t/* Process mark and space element counts to decode Morse */\n\tswitch( new_context )\n\t{\n\t case MARK_SIGNAL: /* Process mark element */\n\n\t\t/* If fragment is a mark */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t{\n\t\t /* If mark element is too long */\n\t\t /* reset and wait for a space */\n\t\t if( mark_cnt >= (unit_elem * 8) )\n\t\t {\n\t\t\t/* Clear space counter */\n\t\t\tspace_cnt = 0;\n\n\t\t\t/* Clear hex character code */\n\t\t\thex_code = 0x01;\n\n\t\t\t/* Wait for a space fragment */\n\t\t\tnew_context = WAIT_FOR_SPACE;\n\n\t\t } /* if( mark_cnt >= unit_elem * 8 ) */\n\n\t\t} /* if( isFlagSet(MARK_TONE) ) */\n\t\telse\n\t\t{\n\t\t /* Clear space count to 1 */\n\t\t space_cnt = 1;\n\n\t\t /* Switch to processing inter-element space */\n\t\t new_context = ELEM_SPACE;\n\t\t}\n\n\t\tbreak;\n\n\t case ELEM_SPACE: /* Process inter-element space */\n\n\t\t/* If space reaches 1/2 units its an inter-element space */\n\t\tif( ((space_cnt * 2) >= unit_elem) ||\n\t\t\tisFlagSet(MARK_TONE) )\n\t\t{\n\t\t /* If mark is < 2 units its a dit else a dash */\n\t\t if( (mark_cnt < unit_elem * 2) )\n\t\t {\n\t\t\t/* Insert dit and increment mark frag and elem count */\n\t\t\thex_code = (hex_code << 1) | 0x01;\n\t\t\tmark_frag_cnt += mark_cnt;\n\t\t\tmark_elem_cnt += 1; /* A dit is 1 element long */\n\t\t }\n\t\t else\n\t\t {\n\t\t\t/* Insert dash and increment mark frag and elem count */\n\t\t\thex_code <<= 1;\n\t\t\tmark_frag_cnt += mark_cnt;\n\t\t\tmark_elem_cnt += 3; /* A dash is 3 elements long */\n\t\t } /* if( mark_cnt < unit_elem * 2 ) */\n\n\t\t /* Clear mark count */\n\t\t mark_cnt = 0;\n\n\t\t /* Wait for inter-char space count */\n\t\t if( isFlagClear(MARK_TONE) )\n\t\t\tnew_context = CHAR_SPACE;\n\t\t else\n\t\t {\n\t\t\tspace_cnt = 0;\n\t\t\tnew_context = MARK_SIGNAL;\n\t\t }\n\n\t\t} /* if( (space_cnt * 2) >= unit_elem || ) */\n\n\t\tbreak;\n\n\t case CHAR_SPACE: /* Wait for inter-char space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t /* If space reaches 2 units its inter-character */\n\t\t if( space_cnt >= (unit_elem * 2) )\n\t\t {\n\t\t\t/* Switch to waiting for inter-word space */\n\t\t\tnew_context = WAIT_WORD_SPACE;\n\n\t\t\t/* Return decoded Morse char */\n char c = Hex_to_Ascii(hex_code);\n\n /* Clear hex character code */\n\t\t\thex_code = 0x01;\n\n return c;\n\t\t }\n\n\t\t} /* if( isFlagClear(MARK_TONE) ) */\n\t\telse /* Its the end of inter-element space */\n\t\t{\n\t\t /* Count up space frags and elements */\n\t\t space_frag_cnt += space_cnt;\n\t\t space_elem_cnt++; /* Inter-element space */\n\n\t\t /* Clear space cnt and process marks */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WAIT_WORD_SPACE: /* Wait for an inter-word space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t /* If space count reaches 5, its word space */\n\t\t if( space_cnt >= (unit_elem * 5) )\n\t\t\tnew_context = WORD_SPACE;\n\n\t\t} /* if( isFlagClear(MARK_TONE) ) */\n\t\telse /* Its the end of inter-character space */\n\t\t{\n\t\t /* Adapt to incoming signal */\n\t\t Adapt_Decoder();\n\n\t\t /* Switch to processing mark signal */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WORD_SPACE: /* Process Inter-word space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t if( space_cnt >= (unit_elem * 7) )\n\t\t {\n\t\t\tnew_context = WAIT_FOR_MARK;\n\t\t\treturn( ' ' );\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t /* Adapt to incoming signal */\n\t\t Adapt_Decoder();\n\n\t\t /* Switch to processing mark signal */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t return( ' ' );\n\t\t}\n\n\t case WAIT_FOR_MARK: /* Process no-signal space */\n\n\t\t/* If fragment is mark switch to processing marks */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t{\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WAIT_FOR_SPACE: /* Wait for space after long dash */\n\n\t\t/* If fragment is space, switch to counting space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t space_cnt = 1;\n\t\t mark_cnt = 0;\n\t\t new_context = WAIT_FOR_MARK;\n\t\t}\n\n\t\tbreak;\n\n\t default: /* Set context if none */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t new_context = MARK_SIGNAL;\n\t\telse\n\t\t new_context = WAIT_FOR_MARK;\n\n\t} /* End of switch( new_context ) */\n\n } /* while(1) */\n\n\n }",
"public static void main(String[] args) {\n\n String str1= \"Java\";\n // 0123\n\n char ch1= str1.charAt(3);\n System.out.println(ch1);\n\n // char ch2 = str1.charAt(4); out of range\n // System.out.println(ch2);\n\n //length(): returns the total number of chars in \"int\".\n String str2 = \"Cybertek School\";\n int total = str2.length();\n System.out.println(total);\n\n int maxIndex = str2.length()-1;\n char ch3= str2.charAt(maxIndex);\n System.out.println(ch3);\n System.out.println(\"=======================================\");\n\n //concat(str); it does the concatenation\n\n String str3= \"Cybertek\";\n str3 = str3.concat(\" School\"); //\"Cybertek School\"\n System.out.println(str3);\n\n String str4 = \"Java\";\n str4= str4.concat(\" is fun\"); // return new string as \"Java is fun\"\n\n System.out.println(str4);\n\n System.out.println(\"=======================================\");\n\n //toLowerCase() & toUperCase(); converting strings to lower and uper cases.\n\n String str5 = \"CYBERTEK SCHOOL\";\n str5 = str5.toLowerCase(); //\"cybertek school\"\n System.out.println(str5);\n\n String str6 = \"murtaza nazeeri\";\n str6= str6.toUpperCase(); // reassigned to \"MURTAZA NAZEERI\"\n System.out.println(str6); //\n\n System.out.println(\"=======================================\");\n\n //trim(): removes the unused(white) spaces from the string.\n\n String str7 = \" Messi \";\n str7 = str7.trim();\n System.out.println(str7);\n System.out.println(str7.length());\n\n String str8= \" \";\n str8 = str8.trim();\n\n System.out.println(str8.length());\n\n System.out.println(\"=========================================\");\n\n //1) substring(beginning index, ending index): creates substring starting from beginnging to ending index.\n //the ending index is excluded.\n String sentence1= \"I like Java\";\n // 0123456789..\n\n String word1 = sentence1.substring(7,sentence1.length()); //\"Java\"\n String word2 = sentence1.substring(2,6);\n System.out.println(word1);\n System.out.println(word2);\n\n String word3= sentence1.substring(2,6) + sentence1.substring(7,sentence1.length());\n System.out.println(word3);\n\n\n\n\n // 2) substring(begiining index): creates the sub string from beginning index till the end of the string. returns new string\n String sentence2 = \"I like to learn Java\";\n // 0123456789\n\n String r1 = sentence2.substring(10); // \"learn Java\";\n System.out.println(r1);\n\n String r2 = \"Java\"; //JaVa;\n // 0123\n String r3 = r2.substring(0, 2); //Ja\n\n String r4 = r2.substring(2,3) ; // v\n r4 = r4.toUpperCase(); //V\n\n String r5 = r2.substring(3); //a\n\n String result = r3+r4+r5; // JaVa\n\n System.out.println(result);\n\n\n System.out.println(\"=============================================\");\n\n\n }",
"private String addCharacter() {\n\t\t// Two Parameters: CharaNumber, CharaName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|chara\");\n\t\tif (!parameters[0].equals(\"0\")) {\n\t\t\ttag.append(parameters[0]);\n\t\t}\n\t\ttag.append(\":\" + parameters[1]);\n\t\treturn tag.toString();\n\n\t}",
"public void cdata(char[] chars, int start, int length);",
"public abstract void mo70709a(String str, C41018cm c41018cm);"
] | [
"0.5884677",
"0.5710812",
"0.569042",
"0.56831396",
"0.5666124",
"0.56460357",
"0.5553258",
"0.5535071",
"0.54996794",
"0.5470905",
"0.54530513",
"0.5443503",
"0.541107",
"0.5406948",
"0.53615606",
"0.53572696",
"0.535052",
"0.53468424",
"0.53303736",
"0.5310828",
"0.53004956",
"0.5282096",
"0.5275319",
"0.5253157",
"0.52411497",
"0.523927",
"0.52374625",
"0.5231249",
"0.5227259",
"0.5217811",
"0.52144337",
"0.5210321",
"0.52093875",
"0.52004546",
"0.5194152",
"0.5179178",
"0.5176595",
"0.5168747",
"0.5152438",
"0.51396376",
"0.51349",
"0.51274604",
"0.51189804",
"0.5113004",
"0.5106435",
"0.509134",
"0.5076482",
"0.5070795",
"0.5065017",
"0.5060432",
"0.504829",
"0.50458795",
"0.5044289",
"0.5041045",
"0.50372726",
"0.5030707",
"0.50293744",
"0.5027024",
"0.5007898",
"0.50050735",
"0.5004735",
"0.5004354",
"0.50027716",
"0.5002319",
"0.5002168",
"0.49992624",
"0.49963415",
"0.49953666",
"0.49948934",
"0.49893364",
"0.49814358",
"0.49742934",
"0.49578428",
"0.49554023",
"0.49519745",
"0.49505785",
"0.49497533",
"0.49347484",
"0.49313912",
"0.49290994",
"0.49243233",
"0.4922927",
"0.49220687",
"0.4920331",
"0.4916466",
"0.49157768",
"0.490528",
"0.49041894",
"0.49028847",
"0.49016127",
"0.49000582",
"0.48991838",
"0.48977163",
"0.4895175",
"0.48911354",
"0.48908433",
"0.48847118",
"0.4880455",
"0.48709774",
"0.4868717"
] | 0.5893738 | 0 |
comment = "" visibles newline | private boolean comment() {
return STRING("--") && visibles() && newline();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getComment() {\n//\t\t\tm1();\n\t\t\treturn \"small\";\n\t\t}",
"private static void printNos() {\n\t\tfor(int i=0; i<=10; i++) { //this is a single line comment\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t/*\n\t\t * this is a multiline comment\n\t\t */\n\t}",
"String getComment() {\n final StringBuilder sb = new StringBuilder();\n sb.append(indent(1)).append(\"/**\").append(EOL);\n sb.append(indent(1)).append(\" * \").append(\"{@code\").append(EOL);\n\n // Unwrapped so that you can search through the descriptor\n // file for a message and not have to worry about line breaks\n final String ws = formatString; // wrapText(formatString, 70);\n\n final String[] sa = ws.split(EOL);\n for (final String s : sa) {\n sb.append(indent(1)).append(\" * \").append(s).append(EOL);\n }\n\n sb.append(indent(1)).append(\" * \").append(\"}\").append(EOL);\n sb.append(indent(1)).append(\" */\").append(EOL);\n return sb.toString();\n }",
"static void writeBlockComment(String s) {\n String[] lines = s.split(\"\\u005cr\\u005cn|\\u005cr|\\u005cn\");\n\n // indent the first line. It won't have any leading whitespace, but\n // may have trailing whitespace\n String line = lines[0].trim();\n for (int j = 0; j < level; j++) {\n line = \" \" + line; // 4 spaces\n }\n outputBuffer.append(line).append(ls);\n\n // output body of comment without change\n for (int i = 1; i < lines.length - 1; i++) {\n line = lines[i]; // trimStart(lines[i], level * 4);\n outputBuffer.append(line).append(ls);\n }\n\n // output the last line. It will probably have leading whitespace, so\n // trim it then indent it the same as the first line.\n line = lines[lines.length - 1].trim();\n for (int j = 0; j < level; j++) {\n line = \" \" + line; // 4 spaces\n }\n outputBuffer.append(line);\n }",
"public void showMyComments(){\n String nothing=null;\n }",
"public String getComment() {\n \t\t\t\t\t\t\t\t\treturn null;\n \t\t\t\t\t\t\t\t}",
"String getComment();",
"String getComment();",
"@Override\n\tpublic void comment() {\n\t\t\n\t}",
"private void emitComment() throws SAXException {\n if (wantsComments) {\n if (longStrBufPending != '\\u0000') {\n appendLongStrBuf(longStrBufPending);\n }\n }\n tokenHandler.comment(longStrBuf, longStrBufLen);\n }",
"public static void openComment() {\n Log.write(\"<!-- \");\n }",
"private void newline() {}",
"public static void comment(String comment) {\n openComment();\n Log.write(comment);\n closeComment();\n Log.writeln();\n }",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment();",
"public String getComment() {\n\t\tif (comment != null)\n\t\t\treturn ProteomeXchangeFilev2_1.COM + TAB\n\t\t\t// + \"comment\" + TAB\n\t\t\t\t\t+ comment;\n\t\treturn null;\n\t}",
"@Override\n public void comment(String comment)\n {\n }",
"public void comment(String data);",
"private void skipCommentLine() {\n while (position < length) {\n int c = data.charAt(position);\n if (c == '\\r' || c == '\\n') {\n return;\n }\n position++;\n }\n }",
"static void writeEndOfLineComment(String s) {\n String line = s.trim();\n for (int j = 0; j < level; j++) {\n line = \" \" + line; // 4 spaces\n }\n outputBuffer.append(line).append(ls);\n }",
"public static void closeComment() {\n Log.write(\" -->\");\n }",
"public String getComment() {\n return comment ;\n }",
"public void setComment(String c) {\n comment = c ;\n }",
"private void addComment() {\r\n Editor classEditor = null;\r\n try {\r\n classEditor = curClass.getEditor();\r\n } catch (Exception e) {\r\n }\r\n if (classEditor == null) {\r\n System.out.println(\"Can't create Editor for \" + curClass);\r\n return;\r\n }\r\n\r\n int textLen = classEditor.getTextLength();\r\n TextLocation lastLine = classEditor.getTextLocationFromOffset(textLen);\r\n lastLine.setColumn(0);\r\n // The TextLocation now points before the first character of the last line of the current text\r\n // which we'll assume contains the closing } bracket for the class\r\n classEditor.setText(lastLine, lastLine, \"// Comment added by SimpleExtension\\n\");\r\n }",
"public String toString () {\n if (this.comment != null) {\n return this.comment;\n }\n return super.toString ();\n }",
"public abstract char getCommentChar();",
"public String getComment() {\r\n\t\treturn comment;\r\n\t}",
"@Override\r\n\tpublic String getPrintComment() {\n\t\treturn null;\r\n\t}",
"public String getCommentText() {\r\n\r\n\t\treturn commentText;\r\n\t}",
"public String getComment() {\n\t LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getComment() \" );\n Via via=(Via)sipHeader;\n return via.getComment();\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment() {\n return comment;\n }",
"public String getComment()\n {\n return comment;\n }",
"private Comment handleComment(String line) {\n\t\tComment c = new Comment();\n\t\tc.setText(\"\");\n\t\treturn (Comment) c;\n\t}",
"@Override\n public String visit(LineComment n, Object arg) {\n return null;\n }",
"void showNewLine(String lineNumber, String directionId);",
"public void getComment() {\n System.out.println(\"The target was at \" + targetDistance + \" meters\");\n System.out.println(\"Your shot went \" + projDistance + \" meters far\"); //displays stats\n System.out.println(\"The projectile was \" + missDistance + \" from the target\");\n if (abs(missDistance) >= 100) {\n System.out.println(\"That was terrible\");\n }\n else if (abs(missDistance) >= 50) {\n System.out.println(\"It's getting closer\"); //various comments depending on how good the shot was\n }\n else if (abs(missDistance) >= 20) {\n System.out.println(\"You're nearly there\");\n }\n else {\n System.out.println(\"SO INTENSE\");\n }\n }",
"public String getComment() {\n return this.comment;\n }",
"java.lang.String getComments();",
"public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}",
"public String getComment() {\n\t\treturn comment;\n\t}",
"public String getComment() {\n\t\treturn comment;\n\t}",
"public static String commentTag(CommentUnit comment) {\n\t\treturn \"\\t\\t\\t<comm cntt=\\\"\" + comment.toString() + \"\\\"/>\\n\";\n\t}",
"public String getComment(){\n return this.comment;\n }",
"void createSingleFileComment(ChangedFile file, Integer line, String comment);",
"public final String getComment() {\n return comment;\n }",
"public String getCommentText() {\n\t return this.commentText;\n\t}",
"public void writeComment(String s) throws Exception {\r\n\tif (s.indexOf(EOL) != -1 && s.startsWith(commentString))\r\n\t\tthrow new Exception(\"bad line\");\r\n\r\n\tout.write(commentSeparator);\r\n\tout.write(s.getBytes());\r\n\tout.write(EOL);\r\n}",
"public String showLine() {\n return \"----------------------------------------------------------\" + System.lineSeparator();\n }",
"public String getComment(){\n return comment;\n }",
"@Override\n\t/**\n\t * returns nothing because comments are disabled for classes\n\t * \n\t * @return nothing\n\t */\n\tpublic String getComment() {\n\t\treturn \"\";\n\t}",
"@CheckForNull\n String getLineCommentPrefix();",
"public static String lineBreak() {\n return \"\\n*****************************************************\\n\";\n }",
"private boolean formatComment(StringBuilder result, String tab) {\n \n \t\tif (!preferenceFormatComments)\n \t\t\treturn false;\n \n \t\t/* The list of remaining words to continue on the next line */\n \t\tLinkedList<String> commentWords = new LinkedList<String>();\n \n \t\tint maxLineLength = OcamlPlugin.getInstance().getPreferenceStore().getInt(\n \t\t\t\tPreferenceConstants.P_FORMATTER_COMMENT_WIDTH);\n \n \t\tint nCommentLine = currentLine;\n \n \t\tbInMultilineComment = false;\n \n \t\tString firstCommentLine = line;\n \n \t\t/* Read all the following lines having a single comment */\n \t\tboolean bWholeLineComment;\n \t\tdo {\n \t\t\tif (bDoNotFormatComment)\n \t\t\t\tbreak;\n \n \t\t\tbWholeLineComment = false;\n \n \t\t\tString commentLine = lines[nCommentLine];\n \n \t\t\tString trimmed2 = commentLine.trim();\n \t\t\t/*\n \t\t\t * Matcher matcherString = patternString.matcher(trimmed); trimmed =\n \t\t\t * matcherString.replaceAll(\"\\\"\\\"\");\n \t\t\t */\n \n \t\t\t/*\n \t\t\t * Count the number of comments on the line, because patternWholeLineComment matches several\n \t\t\t * comments in a single match. If there are several comments on the same line, then we leave them\n \t\t\t * as is.\n \t\t\t */\n \t\t\tMatcher matcherComment = patternComment.matcher(trimmed2);\n \t\t\tboolean bMoreThanOneComment = matcherComment.find() && matcherComment.find();\n \n \t\t\tif (!bMoreThanOneComment) {\n \n \t\t\t\t/*\n \t\t\t\t * Read all the words (anything separated by spaces) of this comment, and add them to the\n \t\t\t\t * list.\n \t\t\t\t */\n \t\t\t\tMatcher matcherWholeLineComment = patternWholeLineComment.matcher(trimmed2);\n \n \t\t\t\tString commentBody = null;\n \n \t\t\t\tif (trimmed2.startsWith(\"(*\") && !trimmed2.contains(\"*)\"))\n \t\t\t\t\tbInMultilineComment = true;\n \n \t\t\t\tif (matcherWholeLineComment.find() || bInMultilineComment) {\n \n \t\t\t\t\tif (bInMultilineComment) {\n \t\t\t\t\t\tif (trimmed2.endsWith(\"*)\")) {\n \t\t\t\t\t\t\tbInMultilineComment = false;\n \t\t\t\t\t\t\tcommentBody = trimmed2.substring(0, trimmed2.length() - 2);\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\telse if (trimmed2.startsWith(\"(*\")) {\n \t\t\t\t\t\t\tcommentBody = trimmed2.substring(2, trimmed2.length());\n \t\t\t\t\t\t} else\n \t\t\t\t\t\t\tcommentBody = trimmed2;\n \t\t\t\t\t}\n \n \t\t\t\t\tif (commentBody == null)\n \t\t\t\t\t\tcommentBody = matcherWholeLineComment.group(1);\n \n \t\t\t\t\t// Special character that means: do not format this comment\n \t\t\t\t\t// We don't format documentation comments either\n \t\t\t\t\tif (commentBody.startsWith(\"|\") || commentBody.startsWith(\"*\")) {\n \t\t\t\t\t\tbDoNotFormatComment = true;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \n \t\t\t\t\tString[] words = commentBody.split(\"\\\\s\");\n \n \t\t\t\t\t// add the words to the list\n \t\t\t\t\tfor (String w : words)\n \t\t\t\t\t\tif (!w.trim().equals(\"\"))\n \t\t\t\t\t\t\tcommentWords.addLast(w);\n \n \t\t\t\t\tbWholeLineComment = true;\n \n \t\t\t\t\tnCommentLine++;\n \t\t\t\t\tif (nCommentLine >= lines.length)\n \t\t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \n \t\t} while (bWholeLineComment);\n \n \t\tint nLastCommentLine = nCommentLine - 1;\n \n \t\t/* If we found at least one comment */\n \t\tif (!commentWords.isEmpty()) {\n \t\t\t/*\n \t\t\t * Get the indentation of the first comment line. The following ones will get the same\n \t\t\t * indentation.\n \t\t\t */\n \t\t\tint firstCommentLineIndent = getLineIndent(firstCommentLine);\n \n \t\t\tint currentOffset = 0;\n \t\t\tint tabSize = ocaml.editors.OcamlEditor.getTabSize();\n \n \t\t\t/*\n \t\t\t * Now that we have a list of words, we spread it onto the following lines\n \t\t\t */\n \n \t\t\t// indentation in number of spaces from the beginning of the line\n \t\t\tint leadingSpace = 0;\n \t\t\tfor (int j = 0; j < firstCommentLineIndent; j++) {\n \t\t\t\tresult.append(tab);\n \t\t\t\tcurrentOffset += tabSize;\n \t\t\t\tleadingSpace += tabSize;\n \t\t\t}\n \n \t\t\tresult.append(\"(* \");\n \t\t\tcurrentOffset += 3;\n \n \t\t\tint nCommentLines = 1;\n \t\t\t// for each word of the comment\n \t\t\tfor (String word : commentWords) {\n \t\t\t\t// if the word fits into the remaining space on the line or if\n \t\t\t\t// the line is empty\n \t\t\t\tif ((currentOffset + word.length() + 3 < maxLineLength || currentOffset == firstCommentLineIndent + 3)) {\n \t\t\t\t\tresult.append(word + \" \");\n \t\t\t\t\tcurrentOffset += word.length() + 1;\n \t\t\t\t}\n \n \t\t\t\t/*\n \t\t\t\t * if the word doesn't fit on the remaining space on the line, then we create a new line\n \t\t\t\t */\n \t\t\t\telse {\n \t\t\t\t\tnCommentLines++;\n \n \t\t\t\t\twhile (currentOffset++ < maxLineLength - 3)\n \t\t\t\t\t\tresult.append(\" \");\n \n \t\t\t\t\tresult.append(\"*)\" + OcamlPlugin.newline);\n \n \t\t\t\t\tcurrentOffset = 0;\n \t\t\t\t\tfor (int j = 0; j < firstCommentLineIndent; j++) {\n \t\t\t\t\t\tresult.append(\"\\t\");\n \t\t\t\t\t\tcurrentOffset += tabSize;\n \t\t\t\t\t}\n \n \t\t\t\t\tresult.append(\"(* \" + word + \" \");\n \t\t\t\t\tcurrentOffset += word.length() + 4;\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t/*\n \t\t\t * if there are several comment lines, we put the ending \"*)\" against the margin, so that the\n \t\t\t * comment endings are all aligned\n \t\t\t */\n \t\t\tif (nCommentLines != 1)\n \t\t\t\twhile (currentOffset++ < maxLineLength - 3)\n \t\t\t\t\tresult.append(\" \");\n \n \t\t\tresult.append(\"*)\" + OcamlPlugin.newline);\n \n \t\t\t/*\n \t\t\t * We're done with this comment: analyze the remaining lines: continue at i (the +1 is done by the\n \t\t\t * loop)\n \t\t\t */\n \t\t\tcurrentLine = nLastCommentLine;\n \t\t\t// true means: jump back\n \t\t\treturn true;\n \t\t}\n \t\t// continue normally (do not jump in the loop)\n \t\treturn false;\n \t}",
"public String getSampleComment();",
"private static void Secondcommentary() {\n\t\tSystem.out.println(\" Ind Scored very Good \");\n\t\t\n\t}",
"private void appendToPane(String line, boolean comment) {\n\n Color textColor;\n if (comment) {\n textColor = theme.getDisabledTextColor();\n } else {\n textColor = theme.getForegroundColor();\n }\n StyleContext styleContext = StyleContext.getDefaultStyleContext();\n AttributeSet attributeSet = styleContext.addAttribute(SimpleAttributeSet.EMPTY,\n StyleConstants.Foreground, textColor);\n\n int length = queryTextPane.getDocument().getLength();\n if (length == queryTextPane.getCaretPosition()) {\n queryTextPane.setCharacterAttributes(attributeSet, false);\n queryTextPane.replaceSelection(line);\n } else {\n queryTextPane.setCaretPosition(length);\n queryTextPane.setCharacterAttributes(attributeSet, false);\n queryTextPane.replaceSelection(line);\n }\n }",
"public String getComment() {\n return description;\n }",
"@Override\n\t/**\n\t * does nothing because comments are disabled for classes \n\t * \n\t * @param c\n\t */\n\tpublic void setComment(String c) {\n\t}",
"static boolean comment(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"comment\")) return false;\n if (!nextTokenIs(b, \"\", DOUBLE_COMMENT, TRIPLE_COMMENT)) return false;\n boolean r;\n r = consumeToken(b, TRIPLE_COMMENT);\n if (!r) r = consumeToken(b, DOUBLE_COMMENT);\n return r;\n }",
"private String nocomment(String s) {\r\n\t\tint excLocation=s.indexOf('!');\r\n\t\tif(excLocation!=-1) s=s.substring(0,excLocation);\r\n\t\treturn s.trim();\r\n\t}",
"public static String commentString(final String msg) {\n return \"# \" + msg;\n }",
"public void setComment(String comment);",
"public void setComment(String comment);",
"protected void printComment(Comment comment, Writer out)\r\n throws IOException {\r\n out.write(\"<!--\");\r\n out.write(comment.getText());\r\n out.write(\"-->\");\r\n }",
"@Override\n public String visit(BlockComment n, Object arg) {\n return null;\n }",
"public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2697:3: ( ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:6: ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:6: ( ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:7: ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:7: ( ( '//' (~ ( '\\\\r' | '\\\\n' ) )* ) )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:8: ( '//' (~ ( '\\\\r' | '\\\\n' ) )* )\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:8: ( '//' (~ ( '\\\\r' | '\\\\n' ) )* )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:9: '//' (~ ( '\\\\r' | '\\\\n' ) )*\n {\n match(\"//\"); if (state.failed) return ;\n\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:14: (~ ( '\\\\r' | '\\\\n' ) )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( ((LA1_0>='\\u0000' && LA1_0<='\\t')||(LA1_0>='\\u000B' && LA1_0<='\\f')||(LA1_0>='\\u000E' && LA1_0<='\\uFFFF')) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2698:15: ~ ( '\\\\r' | '\\\\n' )\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='\\t')||(input.LA(1)>='\\u000B' && input.LA(1)<='\\f')||(input.LA(1)>='\\u000E' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n _channel=HIDDEN;\n }\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public java.lang.String getComment() {\r\n return comment;\r\n }",
"public String nextComment() throws IOException {\n // syntax: (* comment *) | /* comment */ \n StringBuffer c = new StringBuffer();\n int tt;\n if (debug)\n logger.debug(\"comment: \" + tok);\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '(') {\n tt = tok.nextToken();\n if (debug)\n logger.debug(\"comment: \" + tok);\n if (tt == '*') {\n if (debug)\n logger.debug(\"comment: \");\n while (true) {\n tt = tok.nextToken();\n if (tt == '*') {\n tt = tok.nextToken();\n if (tt == ')') {\n return c.toString();\n }\n tok.pushBack();\n }\n c.append(tok.sval);\n }\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n }\n tok.pushBack();\n if (debug)\n logger.debug(\"comment: \" + tok);\n return c.toString();\n }",
"public void setComment(String comment){\n this.comment = comment;\n }",
"public void writeComment(String comment) throws IOException {\r\n deNude();\r\n super.writeComment(comment);\r\n }",
"public String Line() {\n return \"==================================================================================================================\";\n }",
"public void debug(String comment);",
"public List<Comment> showComment() {\n\t\treturn cdi.showComment();\n\t}",
"Builder addComment(String value);",
"public void newLine()\n {\n rst += NEW_LINE;\n }",
"public void nommerHeros() {\n\t\tSystem.out.println(\"\\nComment voulez vous appeler votre personnage ?\");\n\t\tthis.nom = Clavier.entrerClavierString();\n\t\tSystem.out.println(\"\\n*********Bienvenue dans le labyrinthe \" + getNom()+\"*********\");\n\t}",
"public java.lang.String getComment() {\n return comment;\n }",
"public java.lang.String getComment() {\n return comment;\n }",
"public java.lang.String getComment() {\n return comment;\n }",
"public void setComment(String comment) {\n this.comment = comment;\n }",
"org.hl7.fhir.String addNewComments();",
"public void setComment(String new_comment){\n this.comment=new_comment;\n }",
"public String get_comment() throws Exception {\n\t\treturn this.comment;\n\t}",
"private void displayLine()\n {\n System.out.println(\"#################################################\");\n }",
"int getCommentsMode();",
"public void testRemoveDescriptionHeader_05() {\n checkRemoveDescriptionHeader(\"Something\\n\", \"\\nHeader of PHPDoc comment\\nDescription.\\nSomething\\n\");\n }",
"public final void mCOMMENT() throws RecognitionException {\r\n try {\r\n final int _type = SparqlMarcoLexer.COMMENT;\r\n int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:5: ( '//' (~ ( '\\\\n'\r\n // | '\\\\r' ) )* ( '\\\\r' )? '\\\\n' | '/*' ( options {greedy=false; } : . )* '*/' )\r\n int alt15 = 2;\r\n final int LA15_0 = this.input.LA(1);\r\n\r\n if (LA15_0 == '/') {\r\n final int LA15_1 = this.input.LA(2);\r\n\r\n if (LA15_1 == '/') {\r\n alt15 = 1;\r\n } else if (LA15_1 == '*') {\r\n alt15 = 2;\r\n } else {\r\n final NoViableAltException nvae = new NoViableAltException(\"\", 15, 1,\r\n this.input);\r\n\r\n throw nvae;\r\n }\r\n } else {\r\n final NoViableAltException nvae = new NoViableAltException(\"\", 15, 0, this.input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt15) {\r\n case 1:\r\n this.match(\"//\");\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:14: (~ ( '\\\\n'\r\n // | '\\\\r' ) )*\r\n loop12: do {\r\n int alt12 = 2;\r\n final int LA12_0 = this.input.LA(1);\r\n\r\n if (LA12_0 >= '\\u0000' && LA12_0 <= '\\t' || LA12_0 >= '\\u000B'\r\n && LA12_0 <= '\\f' || LA12_0 >= '\\u000E' && LA12_0 <= '\\uFFFF') {\r\n alt12 = 1;\r\n }\r\n\r\n switch (alt12) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:14: ~\r\n // ( '\\\\n' | '\\\\r' )\r\n {\r\n if (this.input.LA(1) >= '\\u0000' && this.input.LA(1) <= '\\t'\r\n || this.input.LA(1) >= '\\u000B' && this.input.LA(1) <= '\\f'\r\n || this.input.LA(1) >= '\\u000E'\r\n && this.input.LA(1) <= '\\uFFFF') {\r\n this.input.consume();\r\n\r\n } else {\r\n final MismatchedSetException mse = new MismatchedSetException(\r\n null, this.input);\r\n this.recover(mse);\r\n throw mse;\r\n }\r\n\r\n }\r\n break;\r\n\r\n default:\r\n break loop12;\r\n }\r\n } while (true);\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:28: ( '\\\\r' )?\r\n int alt13 = 2;\r\n final int LA13_0 = this.input.LA(1);\r\n if (LA13_0 == '\\r') {\r\n alt13 = 1;\r\n }\r\n switch (alt13) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:64:28: '\\\\r'\r\n {\r\n this.match('\\r');\r\n\r\n }\r\n break;\r\n\r\n }\r\n this.match('\\n');\r\n _channel = BaseRecognizer.HIDDEN;\r\n break;\r\n case 2:\r\n this.match(\"/*\");\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:65:14: ( options\r\n // {greedy=false; } : . )*\r\n loop14: do {\r\n int alt14 = 2;\r\n final int LA14_0 = this.input.LA(1);\r\n\r\n if (LA14_0 == '*') {\r\n final int LA14_1 = this.input.LA(2);\r\n\r\n if (LA14_1 == '/') {\r\n alt14 = 2;\r\n } else if (LA14_1 >= '\\u0000' && LA14_1 <= '.' || LA14_1 >= '0'\r\n && LA14_1 <= '\\uFFFF') {\r\n alt14 = 1;\r\n }\r\n\r\n } else if (LA14_0 >= '\\u0000' && LA14_0 <= ')' || LA14_0 >= '+'\r\n && LA14_0 <= '\\uFFFF') {\r\n alt14 = 1;\r\n }\r\n\r\n switch (alt14) {\r\n case 1:\r\n // /Users/Marco/Desktop/Tesi Davide/Antlr-doc/SparqlMarco.g:65:42: .\r\n {\r\n this.matchAny();\r\n\r\n }\r\n break;\r\n\r\n default:\r\n break loop14;\r\n }\r\n } while (true);\r\n this.match(\"*/\");\r\n _channel = BaseRecognizer.HIDDEN;\r\n break;\r\n default:\r\n break;\r\n\r\n }\r\n this.state.type = _type;\r\n this.state.channel = _channel;\r\n } finally {\r\n }\r\n }",
"public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }",
"public final void mCOMMENT() throws RecognitionException {\n try {\n int _type = COMMENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:5: ( ( '--' | '//' ) ( . )* ( '\\\\n' | '\\\\r' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:7: ( '--' | '//' ) ( . )* ( '\\\\n' | '\\\\r' )\n {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:7: ( '--' | '//' )\n int alt11=2;\n int LA11_0 = input.LA(1);\n\n if ( (LA11_0=='-') ) {\n alt11=1;\n }\n else if ( (LA11_0=='/') ) {\n alt11=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 11, 0, input);\n\n throw nvae;\n }\n switch (alt11) {\n case 1 :\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:8: '--'\n {\n match(\"--\"); \n\n\n }\n break;\n case 2 :\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:15: '//'\n {\n match(\"//\"); \n\n\n }\n break;\n\n }\n\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:21: ( . )*\n loop12:\n do {\n int alt12=2;\n int LA12_0 = input.LA(1);\n\n if ( (LA12_0=='\\n'||LA12_0=='\\r') ) {\n alt12=2;\n }\n else if ( ((LA12_0>='\\u0000' && LA12_0<='\\t')||(LA12_0>='\\u000B' && LA12_0<='\\f')||(LA12_0>='\\u000E' && LA12_0<='\\uFFFF')) ) {\n alt12=1;\n }\n\n\n switch (alt12) {\n \tcase 1 :\n \t // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:619:21: .\n \t {\n \t matchAny(); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop12;\n }\n } while (true);\n\n if ( input.LA(1)=='\\n'||input.LA(1)=='\\r' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n _channel = HIDDEN; \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public String getComment() {\n Object ref = comment_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n comment_ = s;\n }\n return s;\n }\n }"
] | [
"0.68820137",
"0.6677696",
"0.6614784",
"0.65982234",
"0.65873677",
"0.6575227",
"0.65438354",
"0.65438354",
"0.64983624",
"0.6489254",
"0.6478449",
"0.64594775",
"0.64445686",
"0.64339244",
"0.64339244",
"0.64339244",
"0.64339244",
"0.64339244",
"0.64339244",
"0.642652",
"0.64258033",
"0.64132077",
"0.6394278",
"0.63891625",
"0.6356608",
"0.63432664",
"0.6343257",
"0.63376755",
"0.6330028",
"0.6329799",
"0.62769437",
"0.62583596",
"0.6254489",
"0.6251997",
"0.62451243",
"0.62451243",
"0.62451243",
"0.62451243",
"0.62451243",
"0.62451243",
"0.62451243",
"0.62387556",
"0.62215257",
"0.62105864",
"0.62082714",
"0.6199973",
"0.6192264",
"0.61917406",
"0.6190915",
"0.6188936",
"0.6188936",
"0.6175809",
"0.61607987",
"0.6144204",
"0.6141609",
"0.6118065",
"0.6109634",
"0.6089874",
"0.60894465",
"0.6087522",
"0.6070093",
"0.60684705",
"0.6065429",
"0.6064482",
"0.603544",
"0.60317975",
"0.6003367",
"0.5988457",
"0.59843665",
"0.59838015",
"0.5978367",
"0.5977938",
"0.5977938",
"0.59593874",
"0.5955817",
"0.5955611",
"0.59387845",
"0.5934862",
"0.59243435",
"0.59105563",
"0.5909663",
"0.5894632",
"0.5889668",
"0.5888189",
"0.5886546",
"0.58677477",
"0.586515",
"0.586515",
"0.586515",
"0.58633775",
"0.58594793",
"0.58578736",
"0.5854296",
"0.58431274",
"0.5839384",
"0.58380896",
"0.58332765",
"0.5831834",
"0.5825935",
"0.5818394"
] | 0.71637946 | 0 |
space = ' ' | private boolean space() {
return CHAR(' ');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getSpace();",
"@Override\n\tpublic void space() {\n\t\t\n\t}",
"private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }",
"public Long getSPACE() {\n return SPACE;\n }",
"public static void space(int space) {\r\n\t\tfor(int i=0; i<space; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public void spaces() {\n System.out.println(\"\");\n System.out.println(\"\");\n }",
"static void printSpaces()\n{ int i;\n for (i=0;i<sangria;i++)\n\t System.out.print(\" \");\n}",
"private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }",
"public double getCharSpace(\n )\n {return charSpace;}",
"private boolean isSpace() {\n return (char) c == ' ';\n }",
"public static void spaces() {\r\n // prints 13 spaces\r\n for (int space = 0; space < 15; space++) {\r\n System.out.println(\"\");\r\n }\r\n\r\n }",
"String getKeyspace();",
"String getKeyspace();",
"String getKeyspace();",
"String getKeyspace();",
"public static String whitespace(int count, String spaces) {\r\n\t\tfor (int i = 0; i < count; i++) {spaces += \" \";}\r\n\t\treturn spaces;\r\n\t}",
"public String addEmptySpace(int spaces) {\n\n String stringOfEmptySpace = \"\";\n\n for (int i = 0; i < spaces; i++)\n stringOfEmptySpace += \" \";\n\n return stringOfEmptySpace;\n }",
"void addSpaces() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"| \");\n\t\tSystem.out.println(\"|\");\n\t}",
"public void setSPACE(Long SPACE) {\n this.SPACE = SPACE;\n }",
"protected final String space(int n) {\n StringBuffer buf = new StringBuffer(0);\n for (int i = 0; i < n; i++) {\n buf.append(\" \");\n }\n return buf.toString();\n }",
"public final void ruleSpace() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:241:2: ( ( ( ' ' )* ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:242:1: ( ( ' ' )* )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:242:1: ( ( ' ' )* )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:243:1: ( ' ' )*\n {\n before(grammarAccess.getSpaceAccess().getSpaceKeyword()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:244:1: ( ' ' )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==16) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:245:2: ' '\n \t {\n \t match(input,16,FOLLOW_16_in_ruleSpace456); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n after(grammarAccess.getSpaceAccess().getSpaceKeyword()); \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 void setSpacing(double space) {\n\tthis.space = space;\n }",
"private void Spacing() {\n\n try {\n while (true) {\n try {\n Space();\n } catch (SyntaxError e) {\n Comment();\n }\n }\n } catch (SyntaxError e) {\n }\n }",
"private String indent(int spaces) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < spaces; i++) {\n\t\t\tresult = result + \" \";// it creates as much spaces as it is told to\n\t\t}\n\t\treturn result;\n\t}",
"public String getSPACE_TYPE() {\n return SPACE_TYPE;\n }",
"public boolean hasSpace() {\r\n\t\treturn hasSpace;\r\n\t}",
"private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }",
"private boolean isSpace(int c) {\n\t\treturn (c == ' ' || c == '\\t' || c == '\\n');\n\t}",
"public void printSpace(){\n\t\tSystem.out.println(\"Current Space: \"+number);\n\t\tSystem.out.print(\"Type: \"+type);\n\t\tSystem.out.print(\"\\nNext Space(s): \");\n\t\tfor(String n: next){\n\t\t\tSystem.out.print(n +\" \");\t\n\t\t}\n\t\tSystem.out.println(\" \");\n\t}",
"@Override\n public void run() {\n int count = text.length() - text.replace(\" \", \"\").length();\n System.out.printf(\"Spaces: %d;\\n\", count);\n }",
"public double getSpace() {\n\treturn space;\n }",
"private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}",
"public WhitespaceState()\n\t{\n\t\tsetWhitespaceChars(0, ' ', true);\n\t}",
"public AI_SPAC(String [] args){\n\n\t}",
"public static String spaces(int i){\n String spaces = \"\";\n for(int j = 0; j < i; j++)\n {\n spaces = \" \" + spaces;\n }\n return spaces;\n }",
"public void setInsertSpaces(boolean substitute);",
"char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }",
"public Space getSpace() {\n return space;\n }",
"public abstract void split(Space s);",
"public double getWordSpace(\n )\n {return wordSpace;}",
"public static String addSpace(int y) {\n\t\tString str = new String();\n\t\tif (y < 10)\n\t\t\tstr = \" \" + y;\n\t\telse if (y < 100)\n\t\t\tstr = \" \" + y;\n\t\telse\n\t\t\tstr = \"\" + y;\n\t\treturn str;\n\t}",
"private boolean isOneSpace(final String message) {\n\t\treturn message.contains(\"1 space\"); //$NON-NLS-1$\n\t}",
"public boolean useSpacebar()\n {\n return (\"space\".equals(Greenfoot.getKey()));\n }",
"public String getCurrentSpace() {\n return spaces.getValue();\n }",
"public final void mSpace() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = Space;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// sell/input/Matrix.g:53:7: ( ( ' ' | '\\\\t' )+ )\n\t\t\t// sell/input/Matrix.g:53:9: ( ' ' | '\\\\t' )+\n\t\t\t{\n\t\t\t// sell/input/Matrix.g:53:9: ( ' ' | '\\\\t' )+\n\t\t\tint cnt9=0;\n\t\t\tloop9:\n\t\t\twhile (true) {\n\t\t\t\tint alt9=2;\n\t\t\t\tint LA9_0 = input.LA(1);\n\t\t\t\tif ( (LA9_0=='\\t'||LA9_0==' ') ) {\n\t\t\t\t\talt9=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt9) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// sell/input/Matrix.g:\n\t\t\t\t\t{\n\t\t\t\t\tif ( input.LA(1)=='\\t'||input.LA(1)==' ' ) {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\t\t\trecover(mse);\n\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt9 >= 1 ) break loop9;\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(9, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt9++;\n\t\t\t}\n\n\t\t\tskip();\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public boolean getTrimSpaces();",
"public String abbreviatedCellText() {\r\n\t\treturn \" \";//returns 10 spaces because the cell has to be empty\r\n\t}",
"@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }",
"public static String addSpace(Object o)\r\n/* 100: */ {\r\n/* 101: 96 */ String s = o.toString().trim();\r\n/* 102: 97 */ if (s.isEmpty()) {\r\n/* 103: 98 */ return \"\";\r\n/* 104: */ }\r\n/* 105:100 */ char last = s.charAt(s.length() - 1);\r\n/* 106:101 */ if (\">\".indexOf(last) >= 0) {\r\n/* 107:102 */ return s;\r\n/* 108: */ }\r\n/* 109:104 */ if (\":\".indexOf(last) >= 0) {\r\n/* 110:105 */ return s.trim() + \" \";\r\n/* 111: */ }\r\n/* 112:107 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 113:108 */ return s + \" \";\r\n/* 114: */ }\r\n/* 115:111 */ return s + \" \";\r\n/* 116: */ }",
"public static String spaces(int n)\n\t{\n\t\tString str = \"\";\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tstr += \" \";\n\t\t}\n\t\treturn str;\n\t}",
"protected Space getSpace() {\n return space;\n }",
"static Extractor bySpaces() {\n\t\t\treturn Splitter.SPACE_EXTRACTOR;\n\t\t}",
"public static String fromNullToSpace(String a) {\r\n\t\tif (a == null || \"\".equals(a)) {\r\n\t\t\treturn \" \";\r\n\t\t} else {\r\n\t\t\treturn a;\r\n\t\t}\r\n\t}",
"public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }",
"private String spacing(String line) {\n \n \t\t/* Remove redundant spaces (keep only one space between two words) */\n \t\tint limit = 0;\n \t\tMatcher matcher = patternSpaces.matcher(line);\n \n \t\tString oldLine = line;\n \n \t\tremSpaces: while (matcher.find()) {\n \n \t\t\tint offset = matcher.start();\n \n \t\t\t// do not remove spaces at the beginning of a line\n \t\t\tif (line.substring(0, offset).trim().equals(\"\"))\n \t\t\t\tcontinue;\n \n \t\t\t/*\n \t\t\t * if the spaces (or tabs) are at the beginning of a line or before a comment, then we keep them\n \t\t\t */\n \t\t\t/*\n \t\t\t * Matcher matcherSpacesBeforeComment = patternSpacesBeforeComment.matcher(line); if\n \t\t\t * (matcherSpacesBeforeComment.find()) { if (offset < matcherSpacesBeforeComment.end()) continue\n \t\t\t * remSpaces; }\n \t\t\t */\n \n \t\t\t// if the spaces are before a comment, then we keep them\n \t\t\tString afterSpaces = line.substring(matcher.end());\n \t\t\tif (afterSpaces.startsWith(\"(*\"))\n \t\t\t\tcontinue remSpaces;\n \n \t\t\t// If we are inside a string, then we skip this replacing\n \t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\twhile (matcherString.find()) {\n \t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\t// If we are inside a comment, then we skip this replacing\n \t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\twhile (matcherComment.find()) {\n \t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\tline = line.substring(0, offset) + \" \" + line.substring(matcher.end());\n \n \t\t\t// we have to reset the matcher, because we modified the line\n \t\t\tmatcher = patternSpaces.matcher(line);\n \n \t\t\t// we put a limit, just in case we would get into an infinite loop\n \t\t\tif (limit++ > 10000) {\n \t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (1): <<\" + oldLine\n \t\t\t\t\t\t+ \">>\");\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t}\n \n \t\t// remove spaces before commas\n \t\t//line = line.replaceAll(\" ,\", \",\");\n \t\t// remove spaces before semicolons\n \t\t//line = line.replaceAll(\" ;\", \";\");\n \n \t\tfor (int nPattern = 0; nPattern <= 1; nPattern++) {\n \t\t\tPattern patternSpacing;\n \t\t\tif (nPattern == 0)\n \t\t\t\tpatternSpacing = patternSpacingRight;\n \t\t\telse\n \t\t\t\tpatternSpacing = patternSpacingLeft;\n \n \t\t\t/*\n \t\t\t * We put a limit to the number of replacements, just in case we would get into an infinite loop\n \t\t\t */\n \t\t\tlimit = 0;\n \t\t\t// add spaces before some characters\n \t\t\tmatcher = patternSpacing.matcher(line);\n \n \t\t\toldLine = line;\n \n \t\t\taddSpaces: while (matcher.find()) {\n \n \t\t\t\tint offset = matcher.start() + 1;\n \t\t\t\tif (offset > line.length() - 1 || offset < 0) {\n \t\t\t\t\tocaml.OcamlPlugin.logError(\"OcamlIndenter:format : invalid position\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t\t// if we are inside a string, then we skip this replacement\n \t\t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\t\twhile (matcherString.find()) {\n \t\t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\t// Skip replacement if in comment\n \t\t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\t\twhile (matcherComment.find()) {\n \t\t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\tline = line.substring(0, offset) + \" \" + line.substring(offset);\n \n \t\t\t\t// we have to reset the matcher, because we modified the line\n \t\t\t\tmatcher = patternSpacing.matcher(line);\n \t\t\t\tif (limit++ > 10000) {\n \t\t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (2): <<\"\n \t\t\t\t\t\t\t+ oldLine + \">>\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn line;\n \n \t}",
"public int getTakeSpace() {\n return 0;\n }",
"public Indent()\n {\n this(\" \", 0);\n }",
"public static String spaces(int n) {\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < n; i++) {\n b.append(' ');\n }\n return b.toString();\n }",
"private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }",
"public final void mWHITE_SPACE() throws RecognitionException {\n try {\n int _type = WHITE_SPACE;\n // /Users/benjamincoe/HackWars/C.g:152:3: ( ( ' ' | '\\\\t' | '\\\\f' ) )\n // /Users/benjamincoe/HackWars/C.g:152:5: ( ' ' | '\\\\t' | '\\\\f' )\n {\n if ( input.LA(1)=='\\t'||input.LA(1)=='\\f'||input.LA(1)==' ' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse =\n new MismatchedSetException(null,input);\n recover(mse); throw mse;\n }\n\n channel=HIDDEN;\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"private boolean getReplaceNonBreakingSpace() {\n return false;\n }",
"@org.junit.Test\n public void markingSpaces()\n {\n assertEquals(\"empty\", \"\", markSpaces(\"\"));\n assertEquals(\"simple\", \"just_a_test\", markSpaces(\"just a test\"));\n assertEquals(\"all\", \"just\\\\ta\\\\ntest\\\\f\\\\r_with___all_\\\\n\\\\nthings\",\n markSpaces(\"just\\ta\\ntest\\f\\r with all \\n\\nthings\"));\n }",
"Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }",
"public void changeSpaces(int extraSpaces) {\n int newSpaces = spaces + extraSpaces;\n //to accept the input:\n this.setSpaces(newSpaces);\n }",
"public void spacePressed()\n {\n System.out.println(\"spacePressed()\");\n while (current.translate(1, 0));\n display.showBlocks();\n }",
"private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}",
"private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }",
"private static void processTab() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tif (charCount == MAX_W) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tline[charCount] = ' ';\n\t\t\tcharCount++;\n\t\t}\n\t\tcurrentWord = charCount;\n\t}",
"private void addSpaces(String text) {\n if (!text.equals(myPreviousText)) {\n // Remove spaces\n text = text.replace(\" \", \"\");\n\n // Add space between each character\n StringBuilder newText = new StringBuilder();\n for (int i = 0; i < text.length(); i++) {\n if (i == text.length() - 1) {\n // Do not add a space after the last character -> Allow user to delete last character\n newText.append(Character.toUpperCase(text.charAt(text.length() - 1)));\n }\n else {\n newText.append(Character.toUpperCase(text.charAt(i)) + LETTER_SPACING);\n }\n }\n\n myPreviousText = newText.toString();\n // Update the text with spaces and place the cursor at the end\n myEditText.setText(newText);\n myEditText.setSelection(newText.length());\n }\n }",
"private String addSpaces(String expr) {\n\t\tString output = \"\";\n\t\tString prev = \" \";\n\n\t\tfor(Character c : expr.trim().toCharArray()) {\n\t\t\tif(!areSameType(prev, c.toString()) || isOperator(prev) || \n\t\t\t\t\t(isMatrix(c.toString()) && isMatrix(prev))) \n\t\t\t\toutput += \" \";\n\t\t\toutput += c;\n\t\t\tprev = c.toString();\n\t\t}\n\n\t\treturn output;\n\t}",
"public String getTextOhneSpaces() {\n return textOhneSpaces;\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn \" \";\n\t}",
"public String[][] getSpace() {\n return this.space;\n }",
"private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}",
"private static String escapeWhitespace( final String input )\n {\n return input.replaceAll( \"\\\\ \", \"\\\\\\\\ \" );\n }",
"public static String createSpaceString(int width) {\r\n String existing = widthToSpaceString.getObj(width);\r\n if(existing != null){\r\n return existing;\r\n }\r\n StringBuffer b = new StringBuffer(width);\r\n while (width-- > 0){\r\n b.append(' ');\r\n }\r\n String newStr = b.toString();\r\n widthToSpaceString.add(width, newStr);\r\n return newStr;\r\n }",
"Rule IndentChar() {\n return FirstOf(Letter(), Digit(), \".\", \"_\");\n }",
"public static boolean stillSpace(char[][] a){\r\n boolean temp = false;\r\n for (int i = 0; i<a.length;i++){\r\n for (int j = 0; j<a[0].length;j++){\r\n if (a[i][j]==' '){\r\n temp = true;\r\n }\r\n }\r\n }\r\n return temp;\r\n }",
"public static String formatSpaces(String s) {\n \tString temp = s;\n \tif(s.contains(\"underscores\")) temp = s.replace(\" \", \"_\");\n return temp;\n }",
"public ComboBox<String> getSpaces() {\n return spaces;\n }",
"public void setTextOhneSpaces(String textOhneSpaces) {\n this.textOhneSpaces = textOhneSpaces;\n }",
"private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }",
"@Override\n\tprotected void handleSpace() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}",
"private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}",
"private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}",
"private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }",
"public static boolean isSpace(int c) {\n return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0;\n }",
"public void printStars()\n\t{\n\t\tfor( int i = 0; i < mysteryWord.length() ; i++)\n\t\t{\n\t\t\tif (mysteryWord.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\twordState+=' ';\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twordState+=\"*\"; \n\t\t\t}\n\t\t}\n\t\twordDashes.setText(wordState);\n\t}",
"public static String center(String str, int spaces)\n {\n String pad = \"\";\n\n for(int i = 0; i < (spaces - str.length()) / 2; i++)\n {\n pad += \" \";\n } \n return pad + str + pad;\n }",
"public String padSpace(int n) {\n\t\tif (n < 0) { n = 0; }\n\t\tString s = \"\";\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\ts = s + \" \";\n\t\t}\n\t\treturn s;\n\t}",
"private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\t' || c == '\\n' || c == '\\f' || c == '\\r';\n }",
"public static void countSpaces(Scanner in) {\n }",
"@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }",
"public static String saveWhitespaces(String s) {\n\t\treturn StringUtil.replace(s, \" \", \"\\u00A0\");\n\t}",
"private boolean isWhitespace(char c) {\r\n if (c==' ' || c=='\\n' || c=='\\t' || c=='\\r' ){\r\n return true;\r\n }\r\n return false;\r\n }",
"@Test\n public void testReplacingEmptyString()\n {\n String expectedValue=null,actualValue;\n actualValue=replaceingchar.replaceChar(\" \");\n assertEquals(expectedValue,actualValue);\n }",
"@Test\n\tpublic void testEmptyString() {\n\t\tString s = \" \\t \";\n\t\tassertTrue(\"Empty string with tab\", StringUtil.isEmpty(s));\n\t}",
"public static String trimer (String text){\n\t\treturn text.replaceAll(\"\\\\s+\", \" \");\n\t}",
"public float getSpace() {\r\n return space;\r\n }",
"public String abbreviatedCellText() {\r\n\t\treturn \" \";\r\n\t}"
] | [
"0.8172151",
"0.7800888",
"0.74953485",
"0.73244673",
"0.72364146",
"0.7189691",
"0.71824443",
"0.70743275",
"0.701496",
"0.69854826",
"0.69268125",
"0.6853861",
"0.6853861",
"0.6853861",
"0.6853861",
"0.68102",
"0.66521364",
"0.660588",
"0.6599163",
"0.6576178",
"0.656373",
"0.65467393",
"0.6512998",
"0.6509049",
"0.64859915",
"0.6419646",
"0.640648",
"0.6395658",
"0.63904816",
"0.6354612",
"0.6276584",
"0.6250084",
"0.62381387",
"0.6207177",
"0.6196507",
"0.61712474",
"0.616824",
"0.6149098",
"0.6142091",
"0.6140523",
"0.612796",
"0.61191314",
"0.61057985",
"0.6100593",
"0.60409003",
"0.6036218",
"0.603088",
"0.6021376",
"0.6020027",
"0.6018158",
"0.6012095",
"0.60086894",
"0.6008012",
"0.6000025",
"0.5984939",
"0.59754556",
"0.5973018",
"0.59718466",
"0.596863",
"0.59538114",
"0.5950167",
"0.59447914",
"0.5937692",
"0.59092385",
"0.5903184",
"0.5888088",
"0.58875686",
"0.5876386",
"0.58666325",
"0.58652717",
"0.58561516",
"0.5784214",
"0.577751",
"0.57775027",
"0.5761195",
"0.5739993",
"0.5738541",
"0.5735809",
"0.5735128",
"0.57293916",
"0.57262695",
"0.57144296",
"0.57131743",
"0.5700458",
"0.5700458",
"0.5695784",
"0.5692116",
"0.56917846",
"0.56874865",
"0.56859106",
"0.56745493",
"0.5672281",
"0.56534135",
"0.56389725",
"0.5632976",
"0.5617267",
"0.56047124",
"0.5601724",
"0.56011415",
"0.5591684"
] | 0.808801 | 1 |
spaces = space = (space spaces)? | private boolean spaces() {
return OPT(GO() && space() && spaces());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getSpace();",
"private boolean space() {\r\n return CHAR(' ');\r\n }",
"public static String whitespace(int count, String spaces) {\r\n\t\tfor (int i = 0; i < count; i++) {spaces += \" \";}\r\n\t\treturn spaces;\r\n\t}",
"private String indent(int spaces) {\n\t\tString result = \"\";\n\t\tfor (int i = 0; i < spaces; i++) {\n\t\t\tresult = result + \" \";// it creates as much spaces as it is told to\n\t\t}\n\t\treturn result;\n\t}",
"private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }",
"@Override\n\tpublic void space() {\n\t\t\n\t}",
"public Long getSPACE() {\n return SPACE;\n }",
"private boolean isSpace() {\n return (char) c == ' ';\n }",
"public static void spaces() {\r\n // prints 13 spaces\r\n for (int space = 0; space < 15; space++) {\r\n System.out.println(\"\");\r\n }\r\n\r\n }",
"public String addEmptySpace(int spaces) {\n\n String stringOfEmptySpace = \"\";\n\n for (int i = 0; i < spaces; i++)\n stringOfEmptySpace += \" \";\n\n return stringOfEmptySpace;\n }",
"public abstract void split(Space s);",
"public void spaces() {\n System.out.println(\"\");\n System.out.println(\"\");\n }",
"void addSpaces() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"| \");\n\t\tSystem.out.println(\"|\");\n\t}",
"private boolean isSpace(int c) {\n\t\treturn (c == ' ' || c == '\\t' || c == '\\n');\n\t}",
"static void printSpaces()\n{ int i;\n for (i=0;i<sangria;i++)\n\t System.out.print(\" \");\n}",
"public double getCharSpace(\n )\n {return charSpace;}",
"private String spacing(String line) {\n \n \t\t/* Remove redundant spaces (keep only one space between two words) */\n \t\tint limit = 0;\n \t\tMatcher matcher = patternSpaces.matcher(line);\n \n \t\tString oldLine = line;\n \n \t\tremSpaces: while (matcher.find()) {\n \n \t\t\tint offset = matcher.start();\n \n \t\t\t// do not remove spaces at the beginning of a line\n \t\t\tif (line.substring(0, offset).trim().equals(\"\"))\n \t\t\t\tcontinue;\n \n \t\t\t/*\n \t\t\t * if the spaces (or tabs) are at the beginning of a line or before a comment, then we keep them\n \t\t\t */\n \t\t\t/*\n \t\t\t * Matcher matcherSpacesBeforeComment = patternSpacesBeforeComment.matcher(line); if\n \t\t\t * (matcherSpacesBeforeComment.find()) { if (offset < matcherSpacesBeforeComment.end()) continue\n \t\t\t * remSpaces; }\n \t\t\t */\n \n \t\t\t// if the spaces are before a comment, then we keep them\n \t\t\tString afterSpaces = line.substring(matcher.end());\n \t\t\tif (afterSpaces.startsWith(\"(*\"))\n \t\t\t\tcontinue remSpaces;\n \n \t\t\t// If we are inside a string, then we skip this replacing\n \t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\twhile (matcherString.find()) {\n \t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\t// If we are inside a comment, then we skip this replacing\n \t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\twhile (matcherComment.find()) {\n \t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\tline = line.substring(0, offset) + \" \" + line.substring(matcher.end());\n \n \t\t\t// we have to reset the matcher, because we modified the line\n \t\t\tmatcher = patternSpaces.matcher(line);\n \n \t\t\t// we put a limit, just in case we would get into an infinite loop\n \t\t\tif (limit++ > 10000) {\n \t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (1): <<\" + oldLine\n \t\t\t\t\t\t+ \">>\");\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t}\n \n \t\t// remove spaces before commas\n \t\t//line = line.replaceAll(\" ,\", \",\");\n \t\t// remove spaces before semicolons\n \t\t//line = line.replaceAll(\" ;\", \";\");\n \n \t\tfor (int nPattern = 0; nPattern <= 1; nPattern++) {\n \t\t\tPattern patternSpacing;\n \t\t\tif (nPattern == 0)\n \t\t\t\tpatternSpacing = patternSpacingRight;\n \t\t\telse\n \t\t\t\tpatternSpacing = patternSpacingLeft;\n \n \t\t\t/*\n \t\t\t * We put a limit to the number of replacements, just in case we would get into an infinite loop\n \t\t\t */\n \t\t\tlimit = 0;\n \t\t\t// add spaces before some characters\n \t\t\tmatcher = patternSpacing.matcher(line);\n \n \t\t\toldLine = line;\n \n \t\t\taddSpaces: while (matcher.find()) {\n \n \t\t\t\tint offset = matcher.start() + 1;\n \t\t\t\tif (offset > line.length() - 1 || offset < 0) {\n \t\t\t\t\tocaml.OcamlPlugin.logError(\"OcamlIndenter:format : invalid position\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t\t// if we are inside a string, then we skip this replacement\n \t\t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\t\twhile (matcherString.find()) {\n \t\t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\t// Skip replacement if in comment\n \t\t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\t\twhile (matcherComment.find()) {\n \t\t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\tline = line.substring(0, offset) + \" \" + line.substring(offset);\n \n \t\t\t\t// we have to reset the matcher, because we modified the line\n \t\t\t\tmatcher = patternSpacing.matcher(line);\n \t\t\t\tif (limit++ > 10000) {\n \t\t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (2): <<\"\n \t\t\t\t\t\t\t+ oldLine + \">>\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn line;\n \n \t}",
"public boolean getTrimSpaces();",
"static Extractor bySpaces() {\n\t\t\treturn Splitter.SPACE_EXTRACTOR;\n\t\t}",
"private void Spacing() {\n\n try {\n while (true) {\n try {\n Space();\n } catch (SyntaxError e) {\n Comment();\n }\n }\n } catch (SyntaxError e) {\n }\n }",
"private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }",
"@org.junit.Test\n public void markingSpaces()\n {\n assertEquals(\"empty\", \"\", markSpaces(\"\"));\n assertEquals(\"simple\", \"just_a_test\", markSpaces(\"just a test\"));\n assertEquals(\"all\", \"just\\\\ta\\\\ntest\\\\f\\\\r_with___all_\\\\n\\\\nthings\",\n markSpaces(\"just\\ta\\ntest\\f\\r with all \\n\\nthings\"));\n }",
"private boolean isOneSpace(final String message) {\n\t\treturn message.contains(\"1 space\"); //$NON-NLS-1$\n\t}",
"public static void space(int space) {\r\n\t\tfor(int i=0; i<space; i++) {\r\n\t\t\tSystem.out.print(\" \");\r\n\t\t}\r\n\t}",
"public void changeSpaces(int extraSpaces) {\n int newSpaces = spaces + extraSpaces;\n //to accept the input:\n this.setSpaces(newSpaces);\n }",
"public boolean hasSpace() {\r\n\t\treturn hasSpace;\r\n\t}",
"private String addSpaces(String expr) {\n\t\tString output = \"\";\n\t\tString prev = \" \";\n\n\t\tfor(Character c : expr.trim().toCharArray()) {\n\t\t\tif(!areSameType(prev, c.toString()) || isOperator(prev) || \n\t\t\t\t\t(isMatrix(c.toString()) && isMatrix(prev))) \n\t\t\t\toutput += \" \";\n\t\t\toutput += c;\n\t\t\tprev = c.toString();\n\t\t}\n\n\t\treturn output;\n\t}",
"public void setInsertSpaces(boolean substitute);",
"Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }",
"public void setSpacing(double space) {\n\tthis.space = space;\n }",
"@Override\n public void run() {\n int count = text.length() - text.replace(\" \", \"\").length();\n System.out.printf(\"Spaces: %d;\\n\", count);\n }",
"private int handleGeneratedSpaces(char[] dest,\n int start,\n int length) {\n\n int lenOptionsLamAlef = options & LAMALEF_MASK;\n int lenOptionsTashkeel = options & TASHKEEL_MASK;\n boolean lamAlefOn = false;\n boolean tashkeelOn = false;\n\n if (!isLogical & !spacesRelativeToTextBeginEnd) {\n switch (lenOptionsLamAlef) {\n case LAMALEF_BEGIN: lenOptionsLamAlef = LAMALEF_END; break;\n case LAMALEF_END: lenOptionsLamAlef = LAMALEF_BEGIN; break;\n default: break;\n }\n switch (lenOptionsTashkeel){\n case TASHKEEL_BEGIN: lenOptionsTashkeel = TASHKEEL_END; break;\n case TASHKEEL_END: lenOptionsTashkeel = TASHKEEL_BEGIN; break;\n default: break;\n }\n }\n\n\n if (lenOptionsLamAlef == LAMALEF_NEAR) {\n for (int i = start, e = i + length; i < e; ++i) {\n if (dest[i] == LAMALEF_SPACE_SUB) {\n dest[i] = SPACE_CHAR;\n }\n }\n\n } else {\n\n final int e = start + length;\n int wL = countSpaceSub(dest, length, LAMALEF_SPACE_SUB);\n int wT = countSpaceSub(dest, length, TASHKEEL_SPACE_SUB);\n\n if (lenOptionsLamAlef == LAMALEF_END){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_END){\n tashkeelOn = true;\n }\n\n\n if (lamAlefOn && (lenOptionsLamAlef == LAMALEF_END)) {\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n while (wL > start) {\n dest[--wL] = SPACE_CHAR;\n }\n }\n\n if (tashkeelOn && (lenOptionsTashkeel == TASHKEEL_END)){\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n while (wT > start) {\n dest[--wT] = SPACE_CHAR;\n }\n }\n\n lamAlefOn = false;\n tashkeelOn = false;\n\n if (lenOptionsLamAlef == LAMALEF_RESIZE){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_RESIZE){\n tashkeelOn = true;\n }\n\n if (lamAlefOn && (lenOptionsLamAlef == LAMALEF_RESIZE)){\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n wL = flipArray(dest,start,e, wL);\n length = wL - start;\n }\n if (tashkeelOn && (lenOptionsTashkeel == TASHKEEL_RESIZE)) {\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n wT = flipArray(dest,start,e, wT);\n length = wT - start;\n }\n\n lamAlefOn = false;\n tashkeelOn = false;\n\n if ((lenOptionsLamAlef == LAMALEF_BEGIN) ||\n (lenOptionsLamAlef == LAMALEF_AUTO)){\n lamAlefOn = true;\n }\n if (lenOptionsTashkeel == TASHKEEL_BEGIN){\n tashkeelOn = true;\n }\n\n if (lamAlefOn && ((lenOptionsLamAlef == LAMALEF_BEGIN)||\n (lenOptionsLamAlef == LAMALEF_AUTO))) { // spaces at beginning\n shiftArray(dest, start, e, LAMALEF_SPACE_SUB);\n wL = flipArray(dest,start,e, wL);\n while (wL < e) {\n dest[wL++] = SPACE_CHAR;\n }\n }\n if(tashkeelOn && (lenOptionsTashkeel == TASHKEEL_BEGIN)){\n shiftArray(dest, start, e, TASHKEEL_SPACE_SUB);\n wT = flipArray(dest,start,e, wT);\n while (wT < e) {\n dest[wT++] = SPACE_CHAR;\n }\n }\n }\n\n return length;\n }",
"char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }",
"public final void ruleSpace() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:241:2: ( ( ( ' ' )* ) )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:242:1: ( ( ' ' )* )\n {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:242:1: ( ( ' ' )* )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:243:1: ( ' ' )*\n {\n before(grammarAccess.getSpaceAccess().getSpaceKeyword()); \n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:244:1: ( ' ' )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0==16) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:245:2: ' '\n \t {\n \t match(input,16,FOLLOW_16_in_ruleSpace456); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n after(grammarAccess.getSpaceAccess().getSpaceKeyword()); \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 }",
"protected final String space(int n) {\n StringBuffer buf = new StringBuffer(0);\n for (int i = 0; i < n; i++) {\n buf.append(\" \");\n }\n return buf.toString();\n }",
"private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}",
"public final void mSpace() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = Space;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// sell/input/Matrix.g:53:7: ( ( ' ' | '\\\\t' )+ )\n\t\t\t// sell/input/Matrix.g:53:9: ( ' ' | '\\\\t' )+\n\t\t\t{\n\t\t\t// sell/input/Matrix.g:53:9: ( ' ' | '\\\\t' )+\n\t\t\tint cnt9=0;\n\t\t\tloop9:\n\t\t\twhile (true) {\n\t\t\t\tint alt9=2;\n\t\t\t\tint LA9_0 = input.LA(1);\n\t\t\t\tif ( (LA9_0=='\\t'||LA9_0==' ') ) {\n\t\t\t\t\talt9=1;\n\t\t\t\t}\n\n\t\t\t\tswitch (alt9) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// sell/input/Matrix.g:\n\t\t\t\t\t{\n\t\t\t\t\tif ( input.LA(1)=='\\t'||input.LA(1)==' ' ) {\n\t\t\t\t\t\tinput.consume();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\t\t\trecover(mse);\n\t\t\t\t\t\tthrow mse;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\tif ( cnt9 >= 1 ) break loop9;\n\t\t\t\t\tEarlyExitException eee = new EarlyExitException(9, input);\n\t\t\t\t\tthrow eee;\n\t\t\t\t}\n\t\t\t\tcnt9++;\n\t\t\t}\n\n\t\t\tskip();\n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }",
"private boolean checkSpacingTabs(){\r\n\t\tString tmp = \"\";\r\n\t\ttry{ tmp = doc.getText(getCaretPosition()-2,1); }\r\n\t\tcatch(BadLocationException a){};\r\n\t\tSystem.out.println((int)tmp.charAt(0));\r\n\t\tif(tmp.charAt(0) == 9) return true;\r\n\t\telse return false;\r\n\t}",
"private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}",
"public static String addSpacing(String fields[]) {\r\n\t\tString fieldAfterPadding = \"\";\r\n\t\tint spacing = 25;\r\n\t\tint no_of_spaces = 25;\r\n\r\n\t\tif (fields != null) {\r\n\t\t\tfor (int ind = 0; ind < fields.length; ind++) {\r\n\t\t\t\tString field = fields[ind];\r\n\t\t\t\tString padding = \"\";\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (field != null) {\r\n\t\t\t\t\tno_of_spaces = spacing - field.length();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (int i = 0; i < no_of_spaces; i++) {\r\n\t\t\t\t\tpadding = padding + \" \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (field != null) {\r\n\t\t\t\t\tfieldAfterPadding = fieldAfterPadding+ field + padding;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfieldAfterPadding = padding;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fieldAfterPadding;\r\n\r\n\t}",
"String getKeyspace();",
"String getKeyspace();",
"String getKeyspace();",
"String getKeyspace();",
"public double getSpace() {\n\treturn space;\n }",
"public String getSPACE_TYPE() {\n return SPACE_TYPE;\n }",
"public void setSPACE(Long SPACE) {\n this.SPACE = SPACE;\n }",
"public static String spaces(int i){\n String spaces = \"\";\n for(int j = 0; j < i; j++)\n {\n spaces = \" \" + spaces;\n }\n return spaces;\n }",
"public AI_SPAC(String [] args){\n\n\t}",
"public static boolean stillSpace(char[][] a){\r\n boolean temp = false;\r\n for (int i = 0; i<a.length;i++){\r\n for (int j = 0; j<a[0].length;j++){\r\n if (a[i][j]==' '){\r\n temp = true;\r\n }\r\n }\r\n }\r\n return temp;\r\n }",
"public double getWordSpace(\n )\n {return wordSpace;}",
"private boolean getReplaceNonBreakingSpace() {\n return false;\n }",
"public static String center(String str, int spaces)\n {\n String pad = \"\";\n\n for(int i = 0; i < (spaces - str.length()) / 2; i++)\n {\n pad += \" \";\n } \n return pad + str + pad;\n }",
"public static void countSpaces(Scanner in) {\n }",
"public ArrayList<String> getSpaces(){\n return this.spaces; //allows us to get \n }",
"public String[][] getSpace() {\n return this.space;\n }",
"public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }",
"public static String addSpace(Object o)\r\n/* 100: */ {\r\n/* 101: 96 */ String s = o.toString().trim();\r\n/* 102: 97 */ if (s.isEmpty()) {\r\n/* 103: 98 */ return \"\";\r\n/* 104: */ }\r\n/* 105:100 */ char last = s.charAt(s.length() - 1);\r\n/* 106:101 */ if (\">\".indexOf(last) >= 0) {\r\n/* 107:102 */ return s;\r\n/* 108: */ }\r\n/* 109:104 */ if (\":\".indexOf(last) >= 0) {\r\n/* 110:105 */ return s.trim() + \" \";\r\n/* 111: */ }\r\n/* 112:107 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 113:108 */ return s + \" \";\r\n/* 114: */ }\r\n/* 115:111 */ return s + \" \";\r\n/* 116: */ }",
"public String formatSpaceBetweenWords(String line) {\r\n line = line.replaceAll(\"\\\\s+\", \" \"); \r\n line = line.toLowerCase();\r\n line = oneSpaceSpecial(line, \".\");\r\n line = oneSpaceSpecial(line, \",\");\r\n line = oneSpaceSpecial(line, \":\");\r\n line = oneSpaceSpecial(line, \"\\\"\");\r\n return line.trim();\r\n }",
"public void printSpace(){\n\t\tSystem.out.println(\"Current Space: \"+number);\n\t\tSystem.out.print(\"Type: \"+type);\n\t\tSystem.out.print(\"\\nNext Space(s): \");\n\t\tfor(String n: next){\n\t\t\tSystem.out.print(n +\" \");\t\n\t\t}\n\t\tSystem.out.println(\" \");\n\t}",
"private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}",
"private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}",
"private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\t' || c == '\\n' || c == '\\f' || c == '\\r';\n }",
"private boolean skipSpaceChars() {\r\n \t\tint ch;\r\n \t\twhile ((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isSpaceChar(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn true;\r\n \t}",
"public static String formatSpaces(String s) {\n \tString temp = s;\n \tif(s.contains(\"underscores\")) temp = s.replace(\" \", \"_\");\n return temp;\n }",
"public boolean useSpacebar()\n {\n return (\"space\".equals(Greenfoot.getKey()));\n }",
"private void initWhitespace(Set<String> s) {\n\t\ts.add(\" \");\n\t\ts.add(\"\\n\");\n\t\ts.add(\"\\t\");\n }",
"private boolean isWhitespace(char c) {\r\n if (c==' ' || c=='\\n' || c=='\\t' || c=='\\r' ){\r\n return true;\r\n }\r\n return false;\r\n }",
"private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }",
"public static String addSpace(int y) {\n\t\tString str = new String();\n\t\tif (y < 10)\n\t\t\tstr = \" \" + y;\n\t\telse if (y < 100)\n\t\t\tstr = \" \" + y;\n\t\telse\n\t\t\tstr = \"\" + y;\n\t\treturn str;\n\t}",
"private boolean makeSpaceBefore(boolean addSpace){\n int index = ts.index();\n try {\n while(true) {\n if (!ts.movePrevious()){\n return false;\n }\n if (ts.token().id() == NEW_LINE){\n DiffResult diff = diffs.getDiffs(ts, 0);\n if (diff == null || diff.replace == null || diff.replace.hasNewLine()){\n return false;\n }\n } else if (ts.token().id() == PREPROCESSOR_DIRECTIVE){\n return false;\n } else if (ts.token().id() != WHITESPACE){\n replaceSegment(addSpace, index);\n return true;\n }\n }\n } finally {\n ts.moveIndex(index);\n ts.moveNext();\n }\n }",
"public WhitespaceState()\n\t{\n\t\tsetWhitespaceChars(0, ' ', true);\n\t}",
"public boolean hasSpaces() {\n\t\treturn !divided && points.keySet().size() != QUADTREE_NODE_CAPACITY;\n\t}",
"private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}",
"private boolean startsWithSpace(String str) {\r\n\t\treturn str.length() != 0 && str.charAt(0) == ' ';\r\n\t}",
"private int calcWhiteSpaces(Set<Room> rooms) {\n int n = 0;\n for (Room room : rooms) {\n if (room.getId() > n) {\n n = room.getId();\n }\n }\n for (Room room : rooms) {\n if (room.getObjects().toString().length() > n) {\n n = room.getObjects().toString().length();\n }\n }\n\n for (Room room : rooms) {\n if (room.getName().length() > n) {\n n = room.getName().length();\n }\n }\n\n return n + 3; // longest word + extra spaces\n }",
"public static String spaces(int n)\n\t{\n\t\tString str = \"\";\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tstr += \" \";\n\t\t}\n\t\treturn str;\n\t}",
"public Space getSpace() {\n return space;\n }",
"public int[][] spacesBetween(int[] move1, int[] move2) {\r\n\t\tint[][] spaces={{1}};\r\n\t\treturn spaces;\r\n\t}",
"public static String spaces(int n) {\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < n; i++) {\n b.append(' ');\n }\n return b.toString();\n }",
"private String whiteSpace(String sum, String num)\n {\n\tString space = \"\";\n\tfor(int i = 0; i < sum.length() - num.length(); i++)\n\t space += \" \";\n\treturn space;\n }",
"public static String spaceRightJustify(String blank, int spaces) {\n\t\tfor (int i = blank.length(); i < spaces; i++) {\n\t\t\tblank = \" \" + blank;\n\n\t\t}\n\t\treturn blank;\t\t\n\n\t}",
"public String reorderSpaces(String text) {\n\t\tchar[] newStr = new char[text.length()];\n\t\tString[] splitStr = text.split(\" \");\n\t\tint wordCount = 0;\n\t\tint spaceCount = 0;\n\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (text.charAt(i) == ' ') {\n\t\t\t\tspaceCount++;\n\t\t\t}\n\t\t}\n\n\t\tfor (String word : splitStr) {\n\t\t\tif (!word.trim().isEmpty()) {\n\t\t\t\twordCount++;\n\t\t\t}\n\t\t}\n\n\t\tint space = wordCount <= 1 ? spaceCount : spaceCount / (wordCount - 1);\n\t\tint extraSpace = wordCount <= 1 ? 0 : spaceCount % (wordCount - 1);\n\t\tint k = 0;\n\n\t\tfor (String word : splitStr) {\n\t\t\tif (!word.trim().isEmpty()) {\n\t\t\t\tfor (int i = 0; i < word.trim().length(); i++) {\n\t\t\t\t\tnewStr[k++] = word.trim().charAt(i);\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; k < text.length() && i < space; i++) {\n\t\t\t\t\tnewStr[k++] = ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0; k < text.length() && i < extraSpace; i++) {\n\t\t\tnewStr[k++] = ' ';\n\t\t}\n\n\t\treturn new String(newStr);\n\t}",
"private String calculateHardspaces(int depth) {\n\n\t\t\tString hardspaces = \"\";\n\t\t\tfor (int level = 1; level < depth; level++) {\n\t\t\t\thardspaces += \" \";\n\t\t\t}\n\t\t\treturn hardspaces;\n\t\t}",
"private static void processTab() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tif (charCount == MAX_W) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tline[charCount] = ' ';\n\t\t\tcharCount++;\n\t\t}\n\t\tcurrentWord = charCount;\n\t}",
"public static String formatSpaces(String s) {\n\t\t\n\t\tif(s.contains(\"underscores\")==true) {\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif(s.charAt(i)==' ') {\n\t\t\t\t\tString t1=s.substring(0, i);\n\t\t\t\t\tString t2=s.substring(i+1, s.length());\n\t\t\ts=t1+\"_\"+t2;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn s;\n\t}",
"public static boolean isSpace(int c) {\n return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0;\n }",
"private void addSpaces(String text) {\n if (!text.equals(myPreviousText)) {\n // Remove spaces\n text = text.replace(\" \", \"\");\n\n // Add space between each character\n StringBuilder newText = new StringBuilder();\n for (int i = 0; i < text.length(); i++) {\n if (i == text.length() - 1) {\n // Do not add a space after the last character -> Allow user to delete last character\n newText.append(Character.toUpperCase(text.charAt(text.length() - 1)));\n }\n else {\n newText.append(Character.toUpperCase(text.charAt(i)) + LETTER_SPACING);\n }\n }\n\n myPreviousText = newText.toString();\n // Update the text with spaces and place the cursor at the end\n myEditText.setText(newText);\n myEditText.setSelection(newText.length());\n }\n }",
"public ComboBox<String> getSpaces() {\n return spaces;\n }",
"public static String formatSpaces(String s) {\n\t\tif(s.contains(\"underscores\"))\n\t\treturn s.replaceAll(\" \", \"_\");\n\t\t\n\t\treturn s;\n\t}",
"protected Space getSpace() {\n return space;\n }",
"@Test\n\tpublic void testTrimmingWhiteSpaces() {\n\t\t// Setup\n\t\tString file = \" file.name \";\n\n\t\t// Exercise\n\t\tLine line = new Line(\"5\", \"5\", file);\n\n\t\t// Verify\n\t\tassertEquals(\"file.name\", line.toString());\n\t}",
"public void printStars()\n\t{\n\t\tfor( int i = 0; i < mysteryWord.length() ; i++)\n\t\t{\n\t\t\tif (mysteryWord.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\t\n\t\t\t\twordState+=' ';\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twordState+=\"*\"; \n\t\t\t}\n\t\t}\n\t\twordDashes.setText(wordState);\n\t}",
"@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }",
"@Test\r\n\tpublic void testParseSpace() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\"))\r\n\t\t\t\t.sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\\nputs \\\"The best cat is: \\\" + the_best_cat\");\r\n\r\n\t\t// Look for the \"Parse\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(1).click();\r\n\r\n\t\t// Check that there contains space and newlines\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tassertFalse(code.getText().contains(\":op_nl\"));\r\n\t\t\tassertFalse(code.getText().contains(\":op_sp\"));\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}",
"Rule IndentChar() {\n return FirstOf(Letter(), Digit(), \".\", \"_\");\n }",
"private boolean isSpaceOrBracket(char c) {\n\t\t\treturn (c == '\\t' || c == '\\n' || c == ' ' || c == '(' || c == ')');\n\t\t}",
"private static String repeatSpace(int number) {\n StringBuilder space = new StringBuilder();\n\n // Adding spaces.\n for (int i = 0; i < number; i++) {\n space.append(\" \");\n }\n\n //returning spaces.\n return space.toString();\n }",
"@Test\n\t public void testIterateMtd_withSpace() {\n\t\tString testData = \" ello I a$m here\";\n\t\tchar charData='e';\n\t\tString expected =\" llo I a$m hr\";\n\t\tString actualStr=stringObj.iterateMtd(testData, charData);\n\t\tassertEquals(\"Got Expected Result\", expected, actualStr);\n\t }"
] | [
"0.7653792",
"0.75986946",
"0.6943619",
"0.692758",
"0.68720144",
"0.68545777",
"0.6788252",
"0.6760688",
"0.6729825",
"0.66138357",
"0.6597752",
"0.65932864",
"0.6561719",
"0.65492094",
"0.6548815",
"0.65261465",
"0.6495176",
"0.64940566",
"0.6489792",
"0.64837176",
"0.64738214",
"0.64514726",
"0.6450374",
"0.6439601",
"0.6410935",
"0.636199",
"0.62952",
"0.6273976",
"0.62478817",
"0.6242214",
"0.62087756",
"0.61956906",
"0.6178289",
"0.6175973",
"0.61583143",
"0.61216086",
"0.61200356",
"0.61030424",
"0.608646",
"0.6086075",
"0.6077858",
"0.6054382",
"0.6054382",
"0.6054382",
"0.6054382",
"0.6051996",
"0.6039424",
"0.6034683",
"0.6032198",
"0.60221666",
"0.6019507",
"0.6016332",
"0.6007956",
"0.60045826",
"0.6001392",
"0.59805083",
"0.59207916",
"0.59143823",
"0.5912884",
"0.5897471",
"0.588736",
"0.58751315",
"0.58751315",
"0.58679396",
"0.58571094",
"0.5844191",
"0.58400685",
"0.58344346",
"0.58157074",
"0.57979536",
"0.5797048",
"0.579012",
"0.577966",
"0.5761134",
"0.5756796",
"0.5752169",
"0.57460845",
"0.5744602",
"0.57375735",
"0.57218236",
"0.5716517",
"0.5715053",
"0.57134235",
"0.57107115",
"0.5705133",
"0.57049555",
"0.5698326",
"0.5690771",
"0.5670374",
"0.5662216",
"0.5656057",
"0.5655354",
"0.5651954",
"0.56366545",
"0.56355435",
"0.5634929",
"0.5620473",
"0.5594238",
"0.5586471",
"0.5584578"
] | 0.7718585 | 0 |
literal = escape / visible | private boolean literal() {
return ALT((GO() && escape()) || (OK() && visible()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"String getLiteral();",
"String getLiteral();",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"public interface EscapeMarker {}",
"@Override\r\n public String toString() {\r\n return literal;\r\n }",
"@Override\n public String toString() {\n\t\treturn literal;\n\t}",
"@Override\n public String toString() {\n return literal;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn literal;\r\n\t}",
"public boolean containsLiteral();",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn literal;\n\t}",
"Literal createLiteral();",
"Literal createLiteral();",
"CharSequence escape(char c);",
"public boolean isLiteral() {\n return false;\n }",
"SimpleLiteral createSimpleLiteral();",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"private boolean escape() {\r\n return backslash() && (\r\n (digits() && (CHAR(';') || true)) || SET(\"rnqdgb\"));\r\n }",
"@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }",
"public Literal getLiteral();",
"public Literal getLiteral();",
"private String render(OWLClass cls) {\n\t\treturn ren.render(cls).replaceAll(\"'\", \"\").replaceAll(\" \", \"\");\n\t}",
"private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"InvalidLiteralExp createInvalidLiteralExp();",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private String constructEscapedSolrQuery(String query, boolean literal_query) {\n StringBuilder highlightQuery = new StringBuilder();\n String highLightField;\n if (literal_query) {\n highLightField = LuceneQuery.HIGHLIGHT_FIELD_LITERAL;\n } else {\n highLightField = LuceneQuery.HIGHLIGHT_FIELD_REGEX;\n }\n highlightQuery.append(highLightField).append(\":\").append(\"\\\"\").append(KeywordSearchUtil.escapeLuceneQuery(query)).append(\"\\\"\");\n return highlightQuery.toString();\n }",
"public Literal setLiteralString(String literalData);",
"public LiteralExpression (String str){\n _value = str;\n }",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"String render(String valueExp, Map<String, Object> context);",
"public interface HtmlEscaper {\n String escape(String string);\n}",
"default HtmlFormatter escapeJava() {\n return andThen(StringEscapeUtils::escapeJava);\n }",
"public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }",
"@Override\n public String stringify()\n {\n return StringUtils.format(\"\\\"%s\\\"\", StringEscapeUtils.escapeJava(binding));\n }",
"String getRune_lit();",
"public Literal getLiteralString(String literalData);",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"public String toString(){\n\treturn(\"EscapeNonGroundDrive\");\n }",
"RealLiteralExp createRealLiteralExp();",
"@AutoEscape\n\tpublic String getDisplay();",
"Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }",
"@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }",
"String escStr(String pSource) throws Exception;",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }",
"public String escapeIdentifier(String identifierName);",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"StringLiteralExp createStringLiteralExp();",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"@Override\n public void showText(String s){\n }",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"@Test\n public void testMethod() {\n Engine e = new Engine( \"[[\", \"]]\", (int) '@', new HashMap<String, String>() );\n assertThat( e.isEscape( '@' ) ).isTrue();\n assertThat( e.isEscape( '\\\\' ) ).isFalse();\n }",
"@Override\n\tpublic void show() {\n\t\tSystem.out.println(\"´ó¿ãñÃ\");\n\t}",
"public static String literal(String literal, int occurrences) {\n\t\treturn \"\\t\\t\\t\\t<lit cntt=\\\"\" + literal + \"\\\" count=\\\"\" + occurrences +\"\\\"/>\" + \"\\n\";\n\t}",
"private void encodeLiteral(\n HpackLiteralHeaderFieldFW.Builder builder,\n HpackContext hpackContext,\n DirectBuffer nameBuffer,\n DirectBuffer valueBuffer)\n {\n builder.type(WITHOUT_INDEXING);\n final int nameIndex = hpackContext.index(nameBuffer);\n if (nameIndex != -1)\n {\n builder.name(nameIndex);\n }\n else\n {\n builder.name(nameBuffer, 0, nameBuffer.capacity());\n }\n builder.value(valueBuffer, 0, valueBuffer.capacity());\n }",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"public static void escape() {\n \n // print vs. println\n \n System.out.print(\"Hello Class!\"); // next thing prints on same line\n System.out.println(\"It is Tuesday.\"); // next thing prints on next line\n \n System.out.println(); // prints a blank line\n \n \n // OUTPUT \n System.out.println(2); // you can put text or numbers in a print statement\n System.out.println(1 + 2 * 3); // you can also do math!\n // (order of operations)\n \n // Escape Sequences: \n // special characters denoted with the \\ (the escape character)\n \n // \\n --> new line \n System.out.print(\"Hello! \\n\\n\\n\\n\");\n System.out.println(\"He\\nllo!\");\n \n // \\t --> tab \n System.out.println(\"Hi\\tHi\");\n System.out.println(\"Hi\\t\\t\\t\\tHi\");\n \n // \\\\ --> \\\n System.out.println(\"\\\\\");\n \n // \\\" --> \" \n System.out.println(\"She said \\\"Java is the best!\\\"\");\n \n // You try!\n // Make a new class PrintQuote.java\n // Think of a quote or saying that you know \n // Output that saying with visible \" \" around it \n // Use a method to print your quote!\n \n // Example output: \"That's the way the cookie crumbles.\"\n \n \n \n \n \n \n \n }",
"public Literal createLiteral(boolean b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }",
"public String toString()\n {\n return \"LiteralOPToken(\" + getValue() + \")\";\n }",
"String getImaginary_lit();",
"private String literal(Object obj) {\n if (obj == null) {\n return \"NULL\";\n } else if (obj instanceof String) {\n return literal((String) obj);\n } else if (obj instanceof Number) {\n return literal((Number) obj);\n } else {\n return literal(obj.toString());\n }\n }",
"@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }",
"public void visit(Literal literal) {}"
] | [
"0.65807045",
"0.6505008",
"0.6505008",
"0.6252944",
"0.6252944",
"0.6252944",
"0.6252944",
"0.618792",
"0.6164582",
"0.61515373",
"0.6122768",
"0.60566455",
"0.60566455",
"0.60566455",
"0.60566455",
"0.60566455",
"0.60566455",
"0.6038808",
"0.6026709",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.60159165",
"0.5997251",
"0.5997251",
"0.5990236",
"0.5987964",
"0.5895931",
"0.58784246",
"0.58082396",
"0.5750251",
"0.57350785",
"0.57350785",
"0.5699167",
"0.5654356",
"0.5649952",
"0.56402284",
"0.5634568",
"0.56029195",
"0.5598389",
"0.5589054",
"0.55511415",
"0.55148375",
"0.55133724",
"0.5512909",
"0.55046856",
"0.5500052",
"0.5479397",
"0.54607594",
"0.54440266",
"0.5442289",
"0.5442077",
"0.5435545",
"0.54276305",
"0.5389526",
"0.5357679",
"0.53563106",
"0.5346136",
"0.5340033",
"0.5328391",
"0.5321732",
"0.53135115",
"0.53031456",
"0.5300963",
"0.53008205",
"0.5264927",
"0.52597314",
"0.5257053",
"0.52389354",
"0.52358335",
"0.5216806",
"0.52158254",
"0.5201208",
"0.518929",
"0.51789314",
"0.517461",
"0.5160598",
"0.515149"
] | 0.66339713 | 0 |
literals = literal = (literal literals)? | private boolean literals() {
return OPT(GO() && literal() && literals());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Literal createLiteral();",
"Literal createLiteral();",
"public Literal setLiteral(Object literalData);",
"public Literal setLiteralString(String literalData);",
"Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }",
"String getLiteral();",
"String getLiteral();",
"public static List<String> literals() {\n return literals;\n }",
"public Literal getLiteral();",
"public Literal getLiteral();",
"SimpleLiteral createSimpleLiteral();",
"public Literal getLiteralString(String literalData);",
"StringLiteralExp createStringLiteralExp();",
"public LiteralExpression (String str){\n _value = str;\n }",
"public void visit(Literal literal) {}",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }",
"public boolean isLiteral() {\n return false;\n }",
"public Literal getLiteral(Object literalData);",
"TupleLiteralExp createTupleLiteralExp();",
"public void delLiteral();",
"@Override\r\n public Literal newLiteral(PObj[] data) {\r\n String symbol = ((Constant) data[0]).getObject().toString();\r\n PObj[] fixed = new PObj[data.length - 1];\r\n System.arraycopy(data, 1, fixed, 0, fixed.length);\r\n PList terms = ProvaListImpl.create(fixed);\r\n return newLiteral(symbol, terms);\r\n }",
"RealLiteralExp createRealLiteralExp();",
"<C> RealLiteralExp<C> createRealLiteralExp();",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"@Override\n\tpublic void setLiteral(Literal literal) {\n\t\theldObj.setLiteral(literal);\n\t}",
"public final void rule__CompositeLit__LiteralvAssignment_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18530:1: ( ( ruleLiteralValue ) )\r\n // InternalGo.g:18531:2: ( ruleLiteralValue )\r\n {\r\n // InternalGo.g:18531:2: ( ruleLiteralValue )\r\n // InternalGo.g:18532:3: ruleLiteralValue\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getCompositeLitAccess().getLiteralvLiteralValueParserRuleCall_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleLiteralValue();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getCompositeLitAccess().getLiteralvLiteralValueParserRuleCall_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"private static boolean isValidLiteral(String literal)\r\n\t{\r\n\t\tboolean result = true;\r\n\t\t\r\n\t\tchar[] literalChars = new char[literal.length()];\r\n\t\tliteral.getChars(0, literalChars.length, literalChars, 0);\r\n\t\t\r\n\t\tfor (int i = 0; i < literalChars.length; i++)\r\n\t\t{\r\n\t\t\tif (i == 0 && !Character.isJavaIdentifierStart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (i != 0 && !Character.isJavaIdentifierPart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public boolean containsLiteral();",
"public Literal setDeepLiteralString(XDI3Segment contextNodeXri, String literalData);",
"public final void rule__Operand__LiteralAssignment_0_1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18200:1: ( ( ruleLiteral ) )\r\n // InternalGo.g:18201:2: ( ruleLiteral )\r\n {\r\n // InternalGo.g:18201:2: ( ruleLiteral )\r\n // InternalGo.g:18202:3: ruleLiteral\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getOperandAccess().getLiteralLiteralParserRuleCall_0_1_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getOperandAccess().getLiteralLiteralParserRuleCall_0_1_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public Object[] literalParams() {\n\t\treturn new Object[] {\n\t\t\tnew Object[] {\"t\", \"akjsf ie. adfi *()ll\",\n\t\t\t\t new String[] {}},\n\t\t\tnew Object[] {\"t\", \"asdf lk rtr l\",\n\t\t\t\t new String[] {\"t\"}},\n\t\t\tnew Object[] {\"t\", \"tsdfa kjttt t\",\n\t\t\t\t\t\t new String[] {\"t\", \"t\", \"t\", \"t\", \"t\"}},\n\t\t\tnew Object[] {\"t\", \"t asd\",\n\t\t\t\t \t\t new String[] {\"t\"}},\n\t\t\tnew Object[] {\"t\", \"asd t\",\n\t\t\t\t\t\t new String[] {\"t\"}},\n\t\t\tnew Object[] {\"\\n\", \"\\nas\\n\", \n\t\t\t\t\t\t new String[] {\"\\n\", \"\\n\"}},\n\t\t\tnew Object[] {\"\\000\", \"asd\\000\\000\",\n\t\t\t\t\t\t new String[] {\"\\000\", \"\\000\"}},\n\t\t\tnew Object[] {\"\\u0dd1\", \"\\u0dd1asd\\u0dd1\",\n\t\t\t\t\t\t new String[] {\"\\u0dd1\", \"\\u0dd1\"}},\n\t\t\tnew Object[] {\"asd\\000asd\", \"asd\\000asD\",\n\t\t\t\t\t\t new String[] {}},\n\t\t\tnew Object[] {\"asd\\000asd\", \"asd\\000asd\\000asd \\000asd\",\n\t\t\t\t new String[] {\"asd\\000asd\"}},\n\t\t\tnew Object[] {\"asd\\000asd\", \"asd\\000asdasd\\000asd\",\n\t\t\t\t new String[] {\"asd\\000asd\", \"asd\\000asd\"}},\n\t\t\tnew Object[] {\"abc\", \"cbaba\",\n\t\t\t\t\t\t new String[] {}},\n\t\t\tnew Object[] {\"asd\\000asd\", \"lkklasd\\000asdasdasd\\000asdkll\",\n\t\t\t\t new String[] {\"asd\\000asd\", \"asd\\000asd\"}}};\n\t}",
"public Literal setDeepLiteral(XDI3Segment contextNodeXri, Object literalData);",
"TupleLiteralPart createTupleLiteralPart();",
"private static boolean stringLiteralExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringLiteralExpression_0\")) return false;\n boolean r;\n r = consumeToken(b, RAW_SINGLE_QUOTED_STRING);\n if (!r) r = consumeToken(b, RAW_TRIPLE_QUOTED_STRING);\n if (!r) r = stringTemplate(b, l + 1);\n return r;\n }",
"public final void literal() throws RecognitionException {\n int literal_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"literal\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(505, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 67) ) { return ; }\n // Java.g:506:5: ( integerLiteral | FloatingPointLiteral | CharacterLiteral | StringLiteral | booleanLiteral | 'null' )\n int alt87=6;\n try { dbg.enterDecision(87);\n\n switch ( input.LA(1) ) {\n case HexLiteral:\n case OctalLiteral:\n case DecimalLiteral:\n {\n alt87=1;\n }\n break;\n case FloatingPointLiteral:\n {\n alt87=2;\n }\n break;\n case CharacterLiteral:\n {\n alt87=3;\n }\n break;\n case StringLiteral:\n {\n alt87=4;\n }\n break;\n case 71:\n case 72:\n {\n alt87=5;\n }\n break;\n case 70:\n {\n alt87=6;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 87, 0, input);\n\n dbg.recognitionException(nvae);\n throw nvae;\n }\n\n } finally {dbg.exitDecision(87);}\n\n switch (alt87) {\n case 1 :\n dbg.enterAlt(1);\n\n // Java.g:506:9: integerLiteral\n {\n dbg.location(506,9);\n pushFollow(FOLLOW_integerLiteral_in_literal2565);\n integerLiteral();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 2 :\n dbg.enterAlt(2);\n\n // Java.g:507:9: FloatingPointLiteral\n {\n dbg.location(507,9);\n match(input,FloatingPointLiteral,FOLLOW_FloatingPointLiteral_in_literal2575); if (state.failed) return ;\n\n }\n break;\n case 3 :\n dbg.enterAlt(3);\n\n // Java.g:508:9: CharacterLiteral\n {\n dbg.location(508,9);\n match(input,CharacterLiteral,FOLLOW_CharacterLiteral_in_literal2585); if (state.failed) return ;\n\n }\n break;\n case 4 :\n dbg.enterAlt(4);\n\n // Java.g:509:9: StringLiteral\n {\n dbg.location(509,9);\n match(input,StringLiteral,FOLLOW_StringLiteral_in_literal2595); if (state.failed) return ;\n\n }\n break;\n case 5 :\n dbg.enterAlt(5);\n\n // Java.g:510:9: booleanLiteral\n {\n dbg.location(510,9);\n pushFollow(FOLLOW_booleanLiteral_in_literal2605);\n booleanLiteral();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n break;\n case 6 :\n dbg.enterAlt(6);\n\n // Java.g:511:9: 'null'\n {\n dbg.location(511,9);\n match(input,70,FOLLOW_70_in_literal2615); if (state.failed) return ;\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 67, literal_StartIndex); }\n }\n dbg.location(512, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"literal\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }",
"public static java.util.Collection literals()\n {\n final java.util.Collection<String> literals = new java.util.ArrayList<String>(values().length);\n for (int i = 0; i < values().length; i++)\n {\n literals.add(values()[i].name());\n }\n return literals;\n }",
"public final AstValidator.literal_return literal() throws RecognitionException {\n AstValidator.literal_return retval = new AstValidator.literal_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.scalar_return scalar417 =null;\n\n AstValidator.map_return map418 =null;\n\n AstValidator.bag_return bag419 =null;\n\n AstValidator.tuple_return tuple420 =null;\n\n\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:652:9: ( scalar | map | bag | tuple )\n int alt116=4;\n switch ( input.LA(1) ) {\n case BIGDECIMALNUMBER:\n case BIGINTEGERNUMBER:\n case DOUBLENUMBER:\n case FALSE:\n case FLOATNUMBER:\n case INTEGER:\n case LONGINTEGER:\n case MINUS:\n case NULL:\n case QUOTEDSTRING:\n case TRUE:\n {\n alt116=1;\n }\n break;\n case MAP_VAL:\n {\n alt116=2;\n }\n break;\n case BAG_VAL:\n {\n alt116=3;\n }\n break;\n case TUPLE_VAL:\n {\n alt116=4;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 116, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt116) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:652:11: scalar\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_scalar_in_literal3432);\n scalar417=scalar();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, scalar417.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:652:20: map\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_map_in_literal3436);\n map418=map();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, map418.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:652:26: bag\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_bag_in_literal3440);\n bag419=bag();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, bag419.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:652:32: tuple\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_tuple_in_literal3444);\n tuple420=tuple();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, tuple420.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 static String literal(String literal, int occurrences) {\n\t\treturn \"\\t\\t\\t\\t<lit cntt=\\\"\" + literal + \"\\\" count=\\\"\" + occurrences +\"\\\"/>\" + \"\\n\";\n\t}",
"private void analyzeLiterals() {\n\t\t\n\t\tint lastLength = 0;\n\t\tfor(int i = 0; i < literalsList.size(); ++i) {\n\t\t\t// Update lengths of literals array with indexes\n\t\t\tif(lastLength != literalsList.get(i).length() - 5) {\n\t\t\t\tindexes.add(i);\n\t\t\t\tlengths.add(literalsList.get(i).length() - 5); // -5 for \"\"@en\n\t\t\t}\n\t\t\tlastLength = literalsList.get(i).length() - 5;\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public static ProgrammingLanguage get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tProgrammingLanguage result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n\tpublic boolean canSetLiteral() {\n\t\treturn heldObj.canSetLiteral();\n\t}",
"public static boolean Literal(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Literal\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, LITERAL, \"<literal>\");\n r = NumericLiteral(b, l + 1);\n if (!r) r = StringLiteral(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"public final Expr literal() throws RecognitionException {\n\t\tExpr e = null;\n\n\n\t\tToken b=null;\n\t\tStringLiteral s =null;\n\t\tIntLiteral i =null;\n\t\tFloatLiteral f =null;\n\t\tCharacterLiteral c =null;\n\n\t\ttry {\n\t\t\t// ul.g:258:25: (s= stringConstant |i= integerConstant |f= floatConstant |c= characterConstant |b= TRUE |b= FALSE )\n\t\t\tint alt17=6;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase STRCONST:\n\t\t\t\t{\n\t\t\t\talt17=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INTCONST:\n\t\t\t\t{\n\t\t\t\talt17=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FLOATCONST:\n\t\t\t\t{\n\t\t\t\talt17=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CHARCONST:\n\t\t\t\t{\n\t\t\t\talt17=4;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TRUE:\n\t\t\t\t{\n\t\t\t\talt17=5;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FALSE:\n\t\t\t\t{\n\t\t\t\talt17=6;\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 e;}\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 17, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt17) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// ul.g:259:2: s= stringConstant\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_stringConstant_in_literal1087);\n\t\t\t\t\ts=stringConstant();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = s;}\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:260:3: i= integerConstant\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_integerConstant_in_literal1096);\n\t\t\t\t\ti=integerConstant();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = i;}\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:261:3: f= floatConstant\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_floatConstant_in_literal1105);\n\t\t\t\t\tf=floatConstant();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = f;}\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:262:3: c= characterConstant\n\t\t\t\t\t{\n\t\t\t\t\tpushFollow(FOLLOW_characterConstant_in_literal1114);\n\t\t\t\t\tc=characterConstant();\n\t\t\t\t\tstate._fsp--;\n\t\t\t\t\tif (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = c;}\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:263:3: b= TRUE\n\t\t\t\t\t{\n\t\t\t\t\tb=(Token)match(input,TRUE,FOLLOW_TRUE_in_literal1123); if (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = new BooleanLiteral(true, (b!=null?b.getLine():0), b.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:264:3: b= FALSE\n\t\t\t\t\t{\n\t\t\t\t\tb=(Token)match(input,FALSE,FOLLOW_FALSE_in_literal1132); if (state.failed) return e;\n\t\t\t\t\tif ( state.backtracking==0 ) {e = new BooleanLiteral(false, (b!=null?b.getLine():0), b.getCharPositionInLine());}\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 e;\n\t}",
"public T caseStringLiteralExpCS(StringLiteralExpCS object) {\r\n return null;\r\n }",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"<C, P> TupleLiteralPart<C, P> createTupleLiteralPart();",
"public final EncodedValue literal() throws RecognitionException {\n EncodedValue encodedValue = null;\n\n\n int integer_literal24 = 0;\n long long_literal25 = 0;\n short short_literal26 = 0;\n byte byte_literal27 = 0;\n float float_literal28 = 0.0f;\n double double_literal29 = 0.0;\n char char_literal30 = 0;\n String string_literal31 = null;\n boolean bool_literal32 = false;\n String type_descriptor33 = null;\n List<EncodedValue> array_literal34 = null;\n TreeRuleReturnScope subannotation35 = null;\n FieldReference field_literal36 = null;\n MethodReference method_literal37 = null;\n FieldReference enum_literal38 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:272:3: ( integer_literal | long_literal | short_literal | byte_literal | float_literal | double_literal | char_literal | string_literal | bool_literal | NULL_LITERAL | type_descriptor | array_literal | subannotation | field_literal | method_literal | enum_literal )\n int alt9 = 16;\n switch (input.LA(1)) {\n case INTEGER_LITERAL: {\n alt9 = 1;\n }\n break;\n case LONG_LITERAL: {\n alt9 = 2;\n }\n break;\n case SHORT_LITERAL: {\n alt9 = 3;\n }\n break;\n case BYTE_LITERAL: {\n alt9 = 4;\n }\n break;\n case FLOAT_LITERAL: {\n alt9 = 5;\n }\n break;\n case DOUBLE_LITERAL: {\n alt9 = 6;\n }\n break;\n case CHAR_LITERAL: {\n alt9 = 7;\n }\n break;\n case STRING_LITERAL: {\n alt9 = 8;\n }\n break;\n case BOOL_LITERAL: {\n alt9 = 9;\n }\n break;\n case NULL_LITERAL: {\n alt9 = 10;\n }\n break;\n case ARRAY_DESCRIPTOR:\n case CLASS_DESCRIPTOR:\n case PRIMITIVE_TYPE:\n case VOID_TYPE: {\n alt9 = 11;\n }\n break;\n case I_ENCODED_ARRAY: {\n alt9 = 12;\n }\n break;\n case I_SUBANNOTATION: {\n alt9 = 13;\n }\n break;\n case I_ENCODED_FIELD: {\n alt9 = 14;\n }\n break;\n case I_ENCODED_METHOD: {\n alt9 = 15;\n }\n break;\n case I_ENCODED_ENUM: {\n alt9 = 16;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n throw nvae;\n }\n switch (alt9) {\n case 1:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:272:5: integer_literal\n {\n pushFollow(FOLLOW_integer_literal_in_literal442);\n integer_literal24 = integer_literal();\n state._fsp--;\n\n encodedValue = new ImmutableIntEncodedValue(integer_literal24);\n }\n break;\n case 2:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:273:5: long_literal\n {\n pushFollow(FOLLOW_long_literal_in_literal450);\n long_literal25 = long_literal();\n state._fsp--;\n\n encodedValue = new ImmutableLongEncodedValue(long_literal25);\n }\n break;\n case 3:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:274:5: short_literal\n {\n pushFollow(FOLLOW_short_literal_in_literal458);\n short_literal26 = short_literal();\n state._fsp--;\n\n encodedValue = new ImmutableShortEncodedValue(short_literal26);\n }\n break;\n case 4:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:275:5: byte_literal\n {\n pushFollow(FOLLOW_byte_literal_in_literal466);\n byte_literal27 = byte_literal();\n state._fsp--;\n\n encodedValue = new ImmutableByteEncodedValue(byte_literal27);\n }\n break;\n case 5:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:276:5: float_literal\n {\n pushFollow(FOLLOW_float_literal_in_literal474);\n float_literal28 = float_literal();\n state._fsp--;\n\n encodedValue = new ImmutableFloatEncodedValue(float_literal28);\n }\n break;\n case 6:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:277:5: double_literal\n {\n pushFollow(FOLLOW_double_literal_in_literal482);\n double_literal29 = double_literal();\n state._fsp--;\n\n encodedValue = new ImmutableDoubleEncodedValue(double_literal29);\n }\n break;\n case 7:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:278:5: char_literal\n {\n pushFollow(FOLLOW_char_literal_in_literal490);\n char_literal30 = char_literal();\n state._fsp--;\n\n encodedValue = new ImmutableCharEncodedValue(char_literal30);\n }\n break;\n case 8:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:279:5: string_literal\n {\n pushFollow(FOLLOW_string_literal_in_literal498);\n string_literal31 = string_literal();\n state._fsp--;\n\n encodedValue = new ImmutableStringEncodedValue(string_literal31);\n }\n break;\n case 9:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:280:5: bool_literal\n {\n pushFollow(FOLLOW_bool_literal_in_literal506);\n bool_literal32 = bool_literal();\n state._fsp--;\n\n encodedValue = ImmutableBooleanEncodedValue.forBoolean(bool_literal32);\n }\n break;\n case 10:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:281:5: NULL_LITERAL\n {\n match(input, NULL_LITERAL, FOLLOW_NULL_LITERAL_in_literal514);\n encodedValue = ImmutableNullEncodedValue.INSTANCE;\n }\n break;\n case 11:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:282:5: type_descriptor\n {\n pushFollow(FOLLOW_type_descriptor_in_literal522);\n type_descriptor33 = type_descriptor();\n state._fsp--;\n\n encodedValue = new ImmutableTypeEncodedValue(type_descriptor33);\n }\n break;\n case 12:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:283:5: array_literal\n {\n pushFollow(FOLLOW_array_literal_in_literal530);\n array_literal34 = array_literal();\n state._fsp--;\n\n encodedValue = new ImmutableArrayEncodedValue(array_literal34);\n }\n break;\n case 13:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:284:5: subannotation\n {\n pushFollow(FOLLOW_subannotation_in_literal538);\n subannotation35 = subannotation();\n state._fsp--;\n\n encodedValue = new ImmutableAnnotationEncodedValue((subannotation35 != null ? ((smaliTreeWalker.subannotation_return) subannotation35).annotationType : null), (subannotation35 != null ? ((smaliTreeWalker.subannotation_return) subannotation35).elements : null));\n }\n break;\n case 14:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:285:5: field_literal\n {\n pushFollow(FOLLOW_field_literal_in_literal546);\n field_literal36 = field_literal();\n state._fsp--;\n\n encodedValue = new ImmutableFieldEncodedValue(field_literal36);\n }\n break;\n case 15:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:286:5: method_literal\n {\n pushFollow(FOLLOW_method_literal_in_literal554);\n method_literal37 = method_literal();\n state._fsp--;\n\n encodedValue = new ImmutableMethodEncodedValue(method_literal37);\n }\n break;\n case 16:\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:287:5: enum_literal\n {\n pushFollow(FOLLOW_enum_literal_in_literal562);\n enum_literal38 = enum_literal();\n state._fsp--;\n\n encodedValue = new ImmutableEnumEncodedValue(enum_literal38);\n }\n break;\n\n }\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return encodedValue;\n }",
"public final void rule__CompositeLit__LiteraltAssignment_0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:18515:1: ( ( ruleLiteralType ) )\r\n // InternalGo.g:18516:2: ( ruleLiteralType )\r\n {\r\n // InternalGo.g:18516:2: ( ruleLiteralType )\r\n // InternalGo.g:18517:3: ruleLiteralType\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getCompositeLitAccess().getLiteraltLiteralTypeParserRuleCall_0_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleLiteralType();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getCompositeLitAccess().getLiteraltLiteralTypeParserRuleCall_0_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"public ReadOnlyIterator<Literal> getAllLiterals();",
"public Literal setLiteralBoolean(Boolean literalData);",
"@Test\r\n public void test1(){\r\n Exp one = new NumericLiteral(1);\r\n Exp three = new NumericLiteral(3);\r\n Exp exp = new PlusExp(one, three);\r\n Stmt decl = new DeclStmt(\"x\");\r\n Stmt assign = new Assignment(\"x\", exp);\r\n Stmt seq = new Sequence(decl, assign);\r\n assertEquals(seq.text(), \"var x; x = 1 + 3\");\r\n }",
"public IntegerLiteral(Integer number)\n {\n this.literal = number; \n }",
"private LiteralToken nextRegularExpressionLiteralToken() {\n LiteralToken token = scanner.nextRegularExpressionLiteralToken();\n lastSourcePosition = token.location.end;\n return token;\n }",
"@Override\r\n\tpublic Instruction lexParse(String[] words, LexicalParser lexParser) {\r\n\t\tif (words.length!=3) return null;\r\n\t\t\r\n\t\tif (!words[1].equals(\"=\")) return null;\r\n\t\t\r\n\t\trhs=TermParser.parse(words[2]);\r\n\t\tif (rhs==null) return null;\r\n\t\t\r\n\t\tTerm var=TermParser.parse(words[0]);\r\n\t\tif (var==null) return null;\r\n\t\t\r\n\t\treturn new SimpleAssignment(words[0], rhs);\r\n\t}",
"public StringLiteralToken(String id, String literal, boolean optional, boolean caseInsensitive) {\n\t\tthis.id = id;\n\t\tthis.literal = literal;\n\t\tthis.optional = optional;\n\t\tthis.caseInsensitive = caseInsensitive;\n\t}",
"@Test\n public void testDereferenceLiterals() {\n assertThat(\"[1,2,3][1]\").simplifiesTo(\"2\");\n assertThat(\"[1,2,3]?[1]\").simplifiesTo(\"2\");\n\n assertThat(\"[1,2,3][3]\").simplifiesTo(\"null\");\n assertThat(\"[1,2,3]?[3]\").simplifiesTo(\"null\");\n\n assertThat(\"map('a':1, 'b':3)['a']\").simplifiesTo(\"1\");\n assertThat(\"map('a':1, 'b':3)?['a']\").simplifiesTo(\"1\");\n\n assertThat(\"record(a:1, b:3).a\").simplifiesTo(\"1\");\n assertThat(\"record(a:1, b:3)?.a\").simplifiesTo(\"1\");\n }",
"public static boolean literalExpression(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"literalExpression\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _COLLAPSE_, LITERAL_EXPRESSION, \"<literal expression>\");\n r = consumeToken(b, NULL);\n if (!r) r = consumeToken(b, TRUE);\n if (!r) r = consumeToken(b, FALSE);\n if (!r) r = consumeToken(b, NUMBER);\n if (!r) r = consumeToken(b, HEX_NUMBER);\n if (!r) r = stringLiteralExpression(b, l + 1);\n if (!r) r = symbolLiteralExpression(b, l + 1);\n if (!r) r = setOrMapLiteralExpressionWrapper(b, l + 1);\n if (!r) r = listLiteralExpressionWrapper(b, l + 1);\n if (!r) r = record(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"public void testLiterals(SATSolver solver) {\n\t\tString[] resultStr = {\"false\", \"unknown\", \"true\"};\n\t\tint maxVar = 0;\n\t\tfor (int[] clause : solver.clauses)\n\t\t\tfor (int literal : clause)\n\t\t\t\tmaxVar = Math.max(maxVar, Math.abs(literal));\n\t\tfor (int var = 1; var <= maxVar; var++) {\n\t\t\tint result = solver.testLiteral(var);\n\t\t\tSystem.out.printf(\"%d: %s\\n\", var, resultStr[result + 1]);\n\t\t}\n\t}",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"private ProgrammingLanguage(int value, String name, String literal) {\n\t\tthis.value = value;\n\t\tthis.name = name;\n\t\tthis.literal = literal;\n\t}",
"private static boolean AposStringLiteral_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AposStringLiteral_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!AposStringLiteral_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"AposStringLiteral_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }",
"public LiteralOPToken(String s, int nTypeCode)\n {\n super(s);\n m_nType = nTypeCode;\n setBindingPower(OPToken.PRECEDENCE_IDENTIFIER);\n }",
"public boolean containsLiteral(Object literalData);",
"public boolean containsLiteralString(String literalData);",
"@Test\n\tpublic void testStringLiteral() throws ParseException {\n\n\t\t// non-empty string\n\t\tStringLiteral stringLiteral = langParser(\"'abc'\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"abc\");\n\n\t\t// empty string\n\t\tstringLiteral = langParser(\"''\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"\");\n\t}",
"public final void rule__Literal__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:4151:1: ( ( ( rule__Literal__Group_0__0 ) ) | ( ( rule__Literal__ClAssignment_1 ) ) | ( ( rule__Literal__FlAssignment_2 ) ) )\r\n int alt41=3;\r\n switch ( input.LA(1) ) {\r\n case RULE_STRING:\r\n case RULE_DECIMALS:\r\n case RULE_FLOAT_LIT:\r\n case RULE_INT_LIT:\r\n case RULE_BOOLEAN_LIT:\r\n case 51:\r\n {\r\n alt41=1;\r\n }\r\n break;\r\n case RULE_ID:\r\n case 46:\r\n case 54:\r\n case 56:\r\n case 61:\r\n {\r\n alt41=2;\r\n }\r\n break;\r\n case 48:\r\n {\r\n alt41=3;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 41, 0, input);\r\n\r\n throw nvae;\r\n }\r\n\r\n switch (alt41) {\r\n case 1 :\r\n // InternalGo.g:4152:2: ( ( rule__Literal__Group_0__0 ) )\r\n {\r\n // InternalGo.g:4152:2: ( ( rule__Literal__Group_0__0 ) )\r\n // InternalGo.g:4153:3: ( rule__Literal__Group_0__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralAccess().getGroup_0()); \r\n }\r\n // InternalGo.g:4154:3: ( rule__Literal__Group_0__0 )\r\n // InternalGo.g:4154:4: rule__Literal__Group_0__0\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Literal__Group_0__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralAccess().getGroup_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalGo.g:4158:2: ( ( rule__Literal__ClAssignment_1 ) )\r\n {\r\n // InternalGo.g:4158:2: ( ( rule__Literal__ClAssignment_1 ) )\r\n // InternalGo.g:4159:3: ( rule__Literal__ClAssignment_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralAccess().getClAssignment_1()); \r\n }\r\n // InternalGo.g:4160:3: ( rule__Literal__ClAssignment_1 )\r\n // InternalGo.g:4160:4: rule__Literal__ClAssignment_1\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Literal__ClAssignment_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralAccess().getClAssignment_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // InternalGo.g:4164:2: ( ( rule__Literal__FlAssignment_2 ) )\r\n {\r\n // InternalGo.g:4164:2: ( ( rule__Literal__FlAssignment_2 ) )\r\n // InternalGo.g:4165:3: ( rule__Literal__FlAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralAccess().getFlAssignment_2()); \r\n }\r\n // InternalGo.g:4166:3: ( rule__Literal__FlAssignment_2 )\r\n // InternalGo.g:4166:4: rule__Literal__FlAssignment_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Literal__FlAssignment_2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralAccess().getFlAssignment_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"@Test\n\tpublic void testListLiteral() throws ParseException {\n\t\tListLiteral listLiteral = langParser(\"[]\").listLiteral();\n\t\tassertEquals(listLiteral.getElements().size(), 0);\n\t\tlistLiteral = langParser(\"[101,a,'b']\").listLiteral();\n\t\tassertEquals(listLiteral.getElements().size(), 3);\n\t\tassertEquals(listLiteral.getElements().get(0).getClass(), LongLiteral.class);\n\t\tassertEquals(((LongLiteral) listLiteral.getElements().get(0)).longValue(), 101L);\n\t\tassertEquals(listLiteral.getElements().get(1).getClass(), Identifier.class);\n\t\tassertEquals(((Identifier) listLiteral.getElements().get(1)).getName(), \"a\");\n\t\tassertEquals(listLiteral.getElements().get(2).getClass(), StringLiteral.class);\n\t\tassertEquals(((StringLiteral) listLiteral.getElements().get(2)).getValue(), \"b\");\n\t}",
"AstroArg unpack(Astro litChars);",
"public static BinaryExpression assign(Expression left, Expression right) { throw Extensions.todo(); }",
"public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }",
"public T caseStringLiteral(StringLiteral object)\n {\n return null;\n }",
"public final EObject ruleLiteral() throws RecognitionException {\n EObject current = null;\n\n EObject this_NumericLiteral_0 = null;\n\n EObject this_BooleanLiteral_1 = null;\n\n EObject this_StringLiteral_2 = null;\n\n\n EObject temp=null; setCurrentLookahead(); resetLookahead(); \n \n try {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4359:6: ( (this_NumericLiteral_0= ruleNumericLiteral | this_BooleanLiteral_1= ruleBooleanLiteral | this_StringLiteral_2= ruleStringLiteral ) )\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4360:1: (this_NumericLiteral_0= ruleNumericLiteral | this_BooleanLiteral_1= ruleBooleanLiteral | this_StringLiteral_2= ruleStringLiteral )\n {\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4360:1: (this_NumericLiteral_0= ruleNumericLiteral | this_BooleanLiteral_1= ruleBooleanLiteral | this_StringLiteral_2= ruleStringLiteral )\n int alt64=3;\n switch ( input.LA(1) ) {\n case RULE_REAL:\n case RULE_INTEGER:\n {\n alt64=1;\n }\n break;\n case 76:\n case 77:\n {\n alt64=2;\n }\n break;\n case RULE_STRING:\n {\n alt64=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"4360:1: (this_NumericLiteral_0= ruleNumericLiteral | this_BooleanLiteral_1= ruleBooleanLiteral | this_StringLiteral_2= ruleStringLiteral )\", 64, 0, input);\n\n throw nvae;\n }\n\n switch (alt64) {\n case 1 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4361:5: this_NumericLiteral_0= ruleNumericLiteral\n {\n \n currentNode=createCompositeNode(grammarAccess.getLiteralAccess().getNumericLiteralParserRuleCall_0(), currentNode); \n \n pushFollow(FOLLOW_ruleNumericLiteral_in_ruleLiteral7558);\n this_NumericLiteral_0=ruleNumericLiteral();\n _fsp--;\n\n \n current = this_NumericLiteral_0; \n currentNode = currentNode.getParent();\n \n\n }\n break;\n case 2 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4371:5: this_BooleanLiteral_1= ruleBooleanLiteral\n {\n \n currentNode=createCompositeNode(grammarAccess.getLiteralAccess().getBooleanLiteralParserRuleCall_1(), currentNode); \n \n pushFollow(FOLLOW_ruleBooleanLiteral_in_ruleLiteral7585);\n this_BooleanLiteral_1=ruleBooleanLiteral();\n _fsp--;\n\n \n current = this_BooleanLiteral_1; \n currentNode = currentNode.getParent();\n \n\n }\n break;\n case 3 :\n // ../org.eclipselabs.mscript.language/src-gen/org/eclipselabs/mscript/language/parser/antlr/internal/InternalMscript.g:4381:5: this_StringLiteral_2= ruleStringLiteral\n {\n \n currentNode=createCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_2(), currentNode); \n \n pushFollow(FOLLOW_ruleStringLiteral_in_ruleLiteral7612);\n this_StringLiteral_2=ruleStringLiteral();\n _fsp--;\n\n \n current = this_StringLiteral_2; \n currentNode = currentNode.getParent();\n \n\n }\n break;\n\n }\n\n\n }\n\n resetLookahead(); \n \tlastConsumedNode = currentNode;\n \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public Literal createLiteral(char b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }",
"public void loadSchemaFromString (String... literals)\n throws IOException, BlinkException\n {\n synchronized (monitor)\n {\n for (String lit : literals)\n SchemaReader.readFromString (lit, schema);\n }\n }",
"@Override\r\n public String toString() {\r\n return literal;\r\n }",
"public static StringLiteral fromLiteralValue (String pValue)\n {\n return new StringLiteral (pValue);\n }",
"public final void rule__XCollectionLiteral__Alternatives() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:3111:1: ( ( ruleXSetLiteral ) | ( ruleXListLiteral ) )\r\n int alt25=2;\r\n int LA25_0 = input.LA(1);\r\n\r\n if ( (LA25_0==72) ) {\r\n int LA25_1 = input.LA(2);\r\n\r\n if ( (LA25_1==58) ) {\r\n alt25=1;\r\n }\r\n else if ( (LA25_1==73) ) {\r\n alt25=2;\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 25, 1, input);\r\n\r\n throw nvae;\r\n }\r\n }\r\n else {\r\n if (state.backtracking>0) {state.failed=true; return ;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 25, 0, input);\r\n\r\n throw nvae;\r\n }\r\n switch (alt25) {\r\n case 1 :\r\n // InternalDroneScript.g:3112:2: ( ruleXSetLiteral )\r\n {\r\n // InternalDroneScript.g:3112:2: ( ruleXSetLiteral )\r\n // InternalDroneScript.g:3113:3: ruleXSetLiteral\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXCollectionLiteralAccess().getXSetLiteralParserRuleCall_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXSetLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXCollectionLiteralAccess().getXSetLiteralParserRuleCall_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // InternalDroneScript.g:3118:2: ( ruleXListLiteral )\r\n {\r\n // InternalDroneScript.g:3118:2: ( ruleXListLiteral )\r\n // InternalDroneScript.g:3119:3: ruleXListLiteral\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getXCollectionLiteralAccess().getXListLiteralParserRuleCall_1()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n ruleXListLiteral();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getXCollectionLiteralAccess().getXListLiteralParserRuleCall_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"public final void ruleLiteral() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:2692:2: ( ( ( rule__Literal__Alternatives ) ) )\r\n // InternalGo.g:2693:2: ( ( rule__Literal__Alternatives ) )\r\n {\r\n // InternalGo.g:2693:2: ( ( rule__Literal__Alternatives ) )\r\n // InternalGo.g:2694:3: ( rule__Literal__Alternatives )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getLiteralAccess().getAlternatives()); \r\n }\r\n // InternalGo.g:2695:3: ( rule__Literal__Alternatives )\r\n // InternalGo.g:2695:4: rule__Literal__Alternatives\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Literal__Alternatives();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getLiteralAccess().getAlternatives()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }",
"private static boolean AposStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AposStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeApos(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"private ParseTree parseObjectLiteral() {\n SourcePosition start = getTreeStartLocation();\n ImmutableList.Builder<ParseTree> result = ImmutableList.builder();\n\n eat(TokenType.OPEN_CURLY);\n Token commaToken = null;\n while (peek(TokenType.ELLIPSIS) || peekPropertyNameOrComputedProp(0) || peek(TokenType.STAR)) {\n result.add(parsePropertyAssignment());\n commaToken = eatOpt(TokenType.COMMA);\n if (commaToken == null) {\n break;\n }\n }\n eat(TokenType.CLOSE_CURLY);\n\n maybeReportTrailingComma(commaToken);\n\n return new ObjectLiteralExpressionTree(\n getTreeLocation(start), result.build(), commaToken != null);\n }",
"InvalidLiteralExp createInvalidLiteralExp();",
"public T caseLiteralExpCS(LiteralExpCS object) {\r\n return null;\r\n }",
"public IncrementableAssignment(Literal lit) {\n super(lit, false);\n variableOrdering.add(lit.variable());\n }",
"public final EObject ruleLiteral() throws RecognitionException {\n EObject current = null;\n int ruleLiteral_StartIndex = input.index();\n EObject this_IntLiteral_0 = null;\n\n EObject this_RealLiteral_1 = null;\n\n EObject this_BooleanLiteral_2 = null;\n\n EObject this_StringLiteral_3 = null;\n\n EObject this_NullLiteral_4 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 106) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4551:28: ( (this_IntLiteral_0= ruleIntLiteral | this_RealLiteral_1= ruleRealLiteral | this_BooleanLiteral_2= ruleBooleanLiteral | this_StringLiteral_3= ruleStringLiteral | this_NullLiteral_4= ruleNullLiteral ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4552:1: (this_IntLiteral_0= ruleIntLiteral | this_RealLiteral_1= ruleRealLiteral | this_BooleanLiteral_2= ruleBooleanLiteral | this_StringLiteral_3= ruleStringLiteral | this_NullLiteral_4= ruleNullLiteral )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4552:1: (this_IntLiteral_0= ruleIntLiteral | this_RealLiteral_1= ruleRealLiteral | this_BooleanLiteral_2= ruleBooleanLiteral | this_StringLiteral_3= ruleStringLiteral | this_NullLiteral_4= ruleNullLiteral )\n int alt76=5;\n switch ( input.LA(1) ) {\n case RULE_INT:\n {\n alt76=1;\n }\n break;\n case RULE_FLOAT:\n {\n alt76=2;\n }\n break;\n case KEYWORD_61:\n case KEYWORD_55:\n {\n alt76=3;\n }\n break;\n case RULE_STRING:\n {\n alt76=4;\n }\n break;\n case KEYWORD_51:\n {\n alt76=5;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return current;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 76, 0, input);\n\n throw nvae;\n }\n\n switch (alt76) {\n case 1 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4553:2: this_IntLiteral_0= ruleIntLiteral\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getLiteralAccess().getIntLiteralParserRuleCall_0()); \n \n }\n pushFollow(FOLLOW_ruleIntLiteral_in_ruleLiteral9222);\n this_IntLiteral_0=ruleIntLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_IntLiteral_0;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 2 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4566:2: this_RealLiteral_1= ruleRealLiteral\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getLiteralAccess().getRealLiteralParserRuleCall_1()); \n \n }\n pushFollow(FOLLOW_ruleRealLiteral_in_ruleLiteral9252);\n this_RealLiteral_1=ruleRealLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_RealLiteral_1;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 3 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4579:2: this_BooleanLiteral_2= ruleBooleanLiteral\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getLiteralAccess().getBooleanLiteralParserRuleCall_2()); \n \n }\n pushFollow(FOLLOW_ruleBooleanLiteral_in_ruleLiteral9282);\n this_BooleanLiteral_2=ruleBooleanLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_BooleanLiteral_2;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 4 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4592:2: this_StringLiteral_3= ruleStringLiteral\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getLiteralAccess().getStringLiteralParserRuleCall_3()); \n \n }\n pushFollow(FOLLOW_ruleStringLiteral_in_ruleLiteral9312);\n this_StringLiteral_3=ruleStringLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_StringLiteral_3;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n case 5 :\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:4605:2: this_NullLiteral_4= ruleNullLiteral\n {\n if ( state.backtracking==0 ) {\n \n \t /* */ \n \t\n }\n if ( state.backtracking==0 ) {\n \n newCompositeNode(grammarAccess.getLiteralAccess().getNullLiteralParserRuleCall_4()); \n \n }\n pushFollow(FOLLOW_ruleNullLiteral_in_ruleLiteral9342);\n this_NullLiteral_4=ruleNullLiteral();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n current = this_NullLiteral_4;\n afterParserOrEnumRuleCall();\n \n }\n\n }\n break;\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 106, ruleLiteral_StartIndex); }\n }\n return current;\n }",
"public static CharacterLiteralExpression parse(TokenStream tokens)\n\t{\n\t\tPosition pos = tokens.getPosition();\n\t\ttokens.pushMark();\n\t\tCharacterLiteralExpression charExpr = null;\n\n\t\tToken token = tokens.read();\n\t\tif (token instanceof CharacterLiteralToken) {\n\t\t\tCharacterLiteralToken charToken = (CharacterLiteralToken) token;\n\t\t\tcharExpr = new CharacterLiteralExpression(charToken.getValues(), pos);\n\t\t}\n\n\t\ttokens.popMark(charExpr == null);\n\t\treturn charExpr;\n\t}",
"public interface AssignmentConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int AND = 1;\n /** RegularExpression Id. */\n int OR = 2;\n /** RegularExpression Id. */\n int IMPLIES = 3;\n /** RegularExpression Id. */\n int EQUIVALENT = 4;\n /** RegularExpression Id. */\n int PREDICATE = 5;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<AND>\",\n \"<OR>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<PREDICATE>\",\n };\n\n}",
"@Override\n\tpublic Object evaluate(Interpreter interpreter)\n\t{\n\t\t((VarToken) A).assign(interpreter, (String) B.evaluate(interpreter));\n\t\treturn null;\n\t}",
"public Literal createLiteral(boolean b) throws ModelException {\n\n return createLiteral(String.valueOf(b));\n }",
"@Override\n public String toString() {\n\t\treturn literal;\n\t}",
"public LiteralOPToken(String s, int nTypeCode, String sNudASTName)\n {\n this(s, nTypeCode);\n m_sNudASTName = sNudASTName;\n }",
"<C> InvalidLiteralExp<C> createInvalidLiteralExp();",
"@Override\n\tpublic String toString() {\n\t\tString out = \"\";\n\t\tfor (Literal s : literals) {\n\t\t\tout = out + \" (\"+ s.getLiteral()+\" \"+((s.getArithmetic_value()==null)?s.isLiteral_positivity():s.getArithmetic_value())+\") \";\n\t\t}\n\t\treturn out;\n\t}"
] | [
"0.65758914",
"0.65758914",
"0.64843816",
"0.64816785",
"0.6348587",
"0.62557644",
"0.62557644",
"0.612818",
"0.6114321",
"0.6114321",
"0.61090714",
"0.6085899",
"0.6053265",
"0.6017027",
"0.5999653",
"0.5970071",
"0.5924968",
"0.589921",
"0.5877229",
"0.57516444",
"0.5720231",
"0.57131827",
"0.57099664",
"0.5652284",
"0.5628858",
"0.56274813",
"0.56188303",
"0.56174785",
"0.5593512",
"0.5556566",
"0.55328786",
"0.5501065",
"0.5499978",
"0.54749066",
"0.5467133",
"0.54591304",
"0.54215795",
"0.5411805",
"0.54111063",
"0.5408933",
"0.5408258",
"0.5389494",
"0.5375353",
"0.53684217",
"0.5368299",
"0.5350893",
"0.5333578",
"0.5332422",
"0.5316429",
"0.5300129",
"0.5294651",
"0.5278908",
"0.5268412",
"0.52389085",
"0.52339906",
"0.52338666",
"0.52324724",
"0.5227202",
"0.5211335",
"0.5208612",
"0.5207805",
"0.5202759",
"0.5202615",
"0.518357",
"0.518357",
"0.518357",
"0.518357",
"0.5182485",
"0.5179126",
"0.5171842",
"0.51644987",
"0.5158148",
"0.51508135",
"0.5141552",
"0.5125923",
"0.51183695",
"0.51147026",
"0.5103208",
"0.5103208",
"0.50989664",
"0.5098003",
"0.50947464",
"0.5091578",
"0.50784785",
"0.50771546",
"0.50769144",
"0.5075968",
"0.50715256",
"0.50493336",
"0.50420356",
"0.50332284",
"0.5031186",
"0.5029307",
"0.5028418",
"0.5012715",
"0.50126255",
"0.5007989",
"0.50070083",
"0.5005226",
"0.49994135"
] | 0.65780205 | 0 |
visible = (Cc/Cn/Co/Cs/Zl/Zp)! . | private boolean visible() {
return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean visibles() {\r\n return OPT(GO() && visible() && visibles());\r\n }",
"public boolean isVisible() { return _visible; }",
"static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = scan.nextInt();\n x = scan.nextInt();\n scan.nextLine(); // flush\n \n System.out.printf(\"Marking all pixels visible from %d,%d as white.\\n\", x, y);\n // mark visible points\n for (int i=0 ; i < pgmInf.width ; i++) {\n for (int j=0 ; j < pgmInf.height ; j++) {\n if ( lineBetween(x, y, i, j) ) res[j][i] = 9;\n }\n }\n pgmInf.img = res;\n System.out.println(\"Done.\");\n }",
"public boolean isVisible(){ return visible; }",
"boolean isCanSeeFriendlyInvisibles();",
"boolean isVisible();",
"boolean isVisible();",
"public boolean isVisible()\n {\n return visible;\n }",
"public boolean isVisible(){\n \t\treturn visible;\n \t}",
"public native bool kbLocationVisible(vector location);",
"public Boolean isVisible();",
"public Boolean isVisible();",
"public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }",
"public boolean isVisible(){\n\t\treturn this.visible;\n\t}",
"public void setVisible(boolean b) {\n\t\t\n\t}",
"public boolean isVisible();",
"public boolean isVisible();",
"public boolean isVisible();",
"public boolean isVisible()\n {\n return visible;\n }",
"public static native void _setVisible(Element elem, boolean visible) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telem.style.display = visible ? '' : 'none';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;",
"public abstract boolean isVisible();",
"public abstract boolean isVisible();",
"public List<Boolean> getLayerVisibility ()\n {\n return Collections.unmodifiableList(_vis);\n }",
"@DISPID(1611006060) //= 0x6006006c. The runtime will prefer the VTID if present\n @VTID(136)\n void externalReferencesAsVisible(\n boolean oVisible);",
"private void m50397e(boolean z) {\n this.f30746q0.setVisibility(8);\n if (z) {\n this.f30747r0.setVisibility(8);\n } else {\n this.f30748s0.setVisibility(8);\n }\n }",
"public void setVisible(Boolean visible);",
"public boolean getVisible() {\r\n return visible;\r\n }",
"@Override\n public void setVisible (boolean f)\n { \n }",
"public boolean visible() {\n \treturn model.isVisible();\n }",
"public boolean isVisible() {\r\n return !((x + width) < ocean.getXmin() || x > ocean.getXmax() || (y + height) < ocean.getYmin()\r\n || y > ocean.getYmax());\r\n }",
"public void show() {\n visible=true;\n }",
"public void setVisible(boolean a){\n \t\tvisible = a;\n \t}",
"public boolean isInvisible ( ) {\n\t\treturn extract ( handle -> handle.isInvisible ( ) );\n\t}",
"void setVisible(boolean visible);",
"void setVisible(boolean visible);",
"public static native boolean _isVisible(Element elem) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn (elem.style.display != 'none');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;",
"public boolean getVisible() {\n\t\treturn visible;\n\t}",
"public boolean getVisible() {\n\t\treturn visible;\n\t}",
"public boolean isVisible() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}",
"public boolean isVisible(Color c) {\n if(this.playerColor == c) \n isVisible = true;\n else\n isVisible = false; \n return isVisible;\n }",
"public final void mo28001dd(boolean z) {\n AppMethodBeat.m2504i(33576);\n C4990ab.m7410d(\"MicroMsg.ChatroomContactUI\", \"visible \".concat(String.valueOf(z)));\n if (z) {\n int firstVisiblePosition = ChatroomContactUI.this.nIv.getFirstVisiblePosition();\n C4990ab.m7410d(\"MicroMsg.ChatroomContactUI\", \"getFirstVisiblePosition \".concat(String.valueOf(firstVisiblePosition)));\n if (firstVisiblePosition > 0) {\n ChatroomContactUI.this.nIv.post(new C157901());\n }\n }\n AppMethodBeat.m2505o(33576);\n }",
"public boolean onlyVisible()\n\t{\n\t\treturn visible;\n\t}",
"public boolean isVisible () {\n return visible;\n }",
"public boolean getIsVisible();",
"public void setVisible(boolean visible);",
"public boolean isVisible() {\n return true;\n }",
"@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);",
"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}",
"public boolean checkVisible(int i) {\n\t\tvobject[i].calculateRelativePosition(camera.x_pos,camera.y_pos,camera.z_pos,camera.x_rot,camera.y_rot,camera.z_rot);\n\t\tif (vobject[i].rel_z_pos+vobject[i].radius>0) {vobject[i].visible=true;}\n\t\tif (vobject[i].rel_z_pos+vobject[i].radius<0) {vobject[i].visible=false;}\n\t\treturn vobject[i].visible;\n\t}",
"public boolean isVisible() {\r\n return visible;\r\n }",
"public boolean isVisible(Visibility v);",
"private void Visibility(Boolean vis) {\n jSP1.setVisible(vis);\r\n jSP2.setVisible(vis);\r\n loadFile.setVisible(!vis);\r\n saveFile.setVisible(!vis);\r\n sourceFileLabel.setVisible(!vis);\r\n sourceFileName.setVisible(!vis);\r\n resultFileLabel.setVisible(!vis);\r\n resultFileName.setVisible(!vis);\r\n }",
"@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}",
"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 void setVisible(Boolean isVisible);",
"public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }",
"public boolean isVisible() {\n\t\treturn visible;\n\t}",
"public java.lang.Boolean getIsVisible();",
"private boolean setVisible(boolean b) {\n\t\treturn b;\n\t}",
"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 void setVisible(boolean val);",
"public boolean isVisible() {\n return true;\n }",
"public boolean isMakeVisible()\r\n {\r\n return myMakeVisible;\r\n }",
"public Visible () {\n }",
"public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}",
"public boolean makeVisible(int player) {\n\t\tif (player < 0 || player >= 4) {\n\t\t\treturn false;\n\t\t}\n\t\tshow[player] = true;\n\t\treturn true;\n\t}",
"@Override\n public void setVisible(boolean arg0)\n {\n \n }",
"public boolean isVisible() {\r\n\t\t\tif (outOfRange()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}",
"public boolean isHidden();",
"void setCanSeeFriendlyInvisibles(boolean canSeeFriendlyInvisibles);",
"public void updateVisibility(Camera cam) {\n int i = 0;\n \n for(WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n \n Vertice third = null;\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (!aresta.equals(arestaFace)){\n if (face.ID == aresta.getFaceEsquerda().ID){\n third = aresta.getvFinal();\n break searchForAnyArestaParaEsquerda;\n } else if (face.ID == aresta.getFaceDireita().ID){\n third = aresta.getvInicial();\n break searchForAnyArestaParaEsquerda;\n }\n }\n }\n \n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n i++;\n }\n throw new UnsupportedOperationException(\"This doesn't work and programmer should feel bad. :(\");\n //<editor-fold defaultstate=\"collapsed\" desc=\"Testes que não funcionaram\">\n /*System.out.println(\"Lista vertices: \" + listaDeVertices);\n System.out.println(\"Lista arestas: \" + listaDeArestas);\n System.out.println(\"Lista faces: \" + listaDeFaces);\n\n for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n System.out.println(\"ARESTA FACE: \" + arestaFace);\n WE_Aresta next;\n Vertice third;\n if (arestaFace.getFaceEsquerda().ID == face.ID){\n next = arestaFace.getEsquerdaPredecessora();\n } else {\n next = arestaFace.getDireitaSucessora();\n }\n\n if (next.getvInicial().equals(arestaFace.getvInicial())\n ||next.getvInicial().equals(arestaFace.getvFinal ()))\n third = next.getvFinal();\n else\n third = next.getvInicial();\n\n System.out.println(\"POINTS (\" + face.ID + \"): \");\n System.out.println(\"One: \" + arestaFace.getvFinal());\n System.out.println(\"Two: \" + arestaFace.getvInicial());\n System.out.println(\"Thr: \" + third);\n\n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n\n i++;\n }*/\n\n /*for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = null;\n\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (face.ID == aresta.getFaceEsquerda().ID){\n arestaFace = aresta;\n break searchForAnyArestaParaEsquerda;\n }\n }\n\n Vertice one = arestaFace.getvInicial();\n Vertice two = arestaFace.getvFinal();\n Vertice three;\n\n arestaFace = arestaFace.getEsquerdaSucessora();\n if (arestaFace.getvInicial().equals(two)){\n three = arestaFace.getvFinal();\n } else {\n three = arestaFace.getvInicial();\n }\n\n Vertice normal = VMath.obterNormal(two, one, three);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n }*/\n //</editor-fold>\n }",
"public boolean shown();",
"boolean isVisible() {\r\n return this.isVisible;\r\n }",
"@Override\r\n\tpublic boolean isVisible() {\n\t\treturn false;\r\n\t}",
"public void setVisible(boolean v) {\n }",
"public final boolean isVisible() {\n return visible;\n }",
"@Override\n int getStateToVisible() {\n return 2;\n }",
"public void setVisible(boolean visible){\r\n\t\tthis.visible = visible;\r\n\t}",
"private void videoVisible() {\n }",
"public abstract void setVisible(boolean visible);",
"private void m87592f(boolean z) {\n int i;\n int i2;\n int i3;\n this.f70274c = z ^ true ? 1 : 0;\n C0520q qVar = new C0520q();\n qVar.mo2151a(new C0488d().mo2131b(this.f70291h).mo2131b(this.f70288e).mo2131b(this.f70289f).mo2131b(this.f70290g));\n qVar.mo2151a(new C0476c().mo2128b((int) R.id.cu7));\n qVar.mo2116a((TimeInterpolator) new C38457aq(0.32f, 0.94f, 0.6f, 1.0f));\n qVar.mo2115a(200);\n C0516o.m2171a((ViewGroup) this.f70287d, qVar);\n View view = this.f70289f;\n int i4 = 0;\n if (z) {\n i = 8;\n } else {\n i = 0;\n }\n view.setVisibility(i);\n if (!this.f70293j || this.f70294k) {\n View view2 = this.f70290g;\n if (z) {\n i2 = 8;\n } else {\n i2 = 0;\n }\n view2.setVisibility(i2);\n if (this.f70294k) {\n View view3 = this.f70291h;\n if (!z) {\n i3 = 8;\n } else {\n i3 = 0;\n }\n view3.setVisibility(i3);\n }\n }\n if (this.f70295l) {\n View view4 = this.f70288e;\n if (!z) {\n i4 = 8;\n }\n view4.setVisibility(i4);\n }\n }",
"public void setVisible(boolean visible)\n {\n this.visible = visible;\n }",
"public boolean isVisible(String label)\n {\n return true;\n }",
"@Override\n public boolean isVisible()\n {\n return true;\n }",
"public boolean isClipPreserved()\n/* */ {\n/* 171 */ return this.clipPreserved;\n/* */ }",
"public void OcultarCasillero(boolean visible) {\n\t\t\n\t\t\n\t\t\n\t\ttextCampo1.setVisible(visible);\n\t\ttextCampo2.setVisible(visible);\n\t\ttextCampo3.setVisible(visible);\n\t\ttextCampo4.setVisible(visible);\n\t\ttextCampo5.setVisible(visible);\n\t\ttextCampo6.setVisible(visible);\n\t\ttextCampo7.setVisible(visible);\n\t\ttextCampo8.setVisible(visible);\n\t\ttextCampo9.setVisible(visible);\n\t\ttextCampo10.setVisible(visible);\n\t\t\n\t\t\n\t\t\n\t}",
"private void m50403h(boolean z) {\n this.f30746q0.setVisibility(0);\n if (z) {\n this.f30747r0.setVisibility(0);\n if (this.f30748s0.getVisibility() == 0) {\n m50397e(false);\n return;\n }\n return;\n }\n if (this.f30747r0.getVisibility() == 0) {\n m50397e(true);\n }\n this.f30748s0.setVisibility(0);\n }",
"protected boolean isHidden(int x, int y) {\r\n \treturn !revealed[x][y] && !flag[x][y];\r\n }",
"@Test\n\tpublic void testIsVisible() {\n\t\tip = new ImagePlus();\n\t\tassertFalse(ip.isVisible());\n\t}",
"@JSProperty(\"visible\")\n boolean getVisible();",
"public void setVisible (boolean visible) {\n this.visible = visible;\n }",
"@Contract(pure = true)\r\n public boolean isVisible() {\r\n return visible;\r\n }",
"private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }",
"public void Print(int visibility) {\n System.out.println(\"We are at location \" + row + \",\" + col + \" in terrain \" + map[row][col]);\n for(int j = row-visibility; j <= row + visibility; j++) {\n for(int i = col-visibility; i <= col + visibility; i++) {\n if(i >= 0 && i <= (maxC -1) && j >= 0 && j <= (maxR -1))\n System.out.print(map[j][i]);\n else\n System.out.print(\"X\");\n }\n System.out.println(\"\");\n }\n }",
"final public boolean isVisible() {\n if (hasObtainedSupport) {\n return true;\n }\n boolean ret = true;\n if (numEvents < getThresholdEventsForVisibleCluster()) {\n ret = false;\n }\n if (pathsEnabled) {\n double speed = Math.sqrt(velocityPPT.x * velocityPPT.x + velocityPPT.y * velocityPPT.y) * 1e6 / AEConstants.TICK_DEFAULT_US; // speed is in pixels/sec\n if (speed < thresholdVelocityForVisibleCluster) {\n ret = false;\n }\n }\n hasObtainedSupport = ret;\n if (ret) {\n birthLocation.x = location.x;\n birthLocation.y = location.y; // reset location of birth to presumably less noisy current location.\n }\n return ret;\n }",
"public void setVisible( boolean v) {\r\n visible = v;\r\n }",
"public void setIsVisible(boolean isVisible);",
"public void setRrVisible(boolean value) {\n rrVisible = value;\n }",
"public void sendByteVisibles(short[] objCodes, boolean visible) {\n\t\tsendByteVisibles(objCodes, visible, clientNames);\n\t}"
] | [
"0.6705869",
"0.6587039",
"0.6412228",
"0.6348698",
"0.63049793",
"0.61586887",
"0.61586887",
"0.61583",
"0.6144862",
"0.60926485",
"0.5978161",
"0.5978161",
"0.58935916",
"0.5885728",
"0.5848327",
"0.5845298",
"0.5845298",
"0.5845298",
"0.58388036",
"0.58383805",
"0.5784024",
"0.5784024",
"0.57774365",
"0.575818",
"0.5731074",
"0.5724537",
"0.5719832",
"0.57094187",
"0.5703435",
"0.5688509",
"0.5687636",
"0.5684754",
"0.5680964",
"0.5674493",
"0.5674493",
"0.56739044",
"0.56646895",
"0.56646895",
"0.5657748",
"0.5646918",
"0.56424576",
"0.56376034",
"0.5636999",
"0.5621091",
"0.56189966",
"0.5612231",
"0.56084377",
"0.56004477",
"0.56003046",
"0.5593485",
"0.55919415",
"0.5590216",
"0.55861074",
"0.55831295",
"0.55669385",
"0.5565986",
"0.5564815",
"0.55617964",
"0.5553678",
"0.55455035",
"0.55361336",
"0.5535452",
"0.55336016",
"0.5528269",
"0.55230004",
"0.5515905",
"0.5512557",
"0.5505493",
"0.55020434",
"0.54889476",
"0.5481263",
"0.5474311",
"0.5465416",
"0.5462637",
"0.5459101",
"0.5458556",
"0.5454611",
"0.5441366",
"0.5440452",
"0.5438373",
"0.54291844",
"0.54264015",
"0.54225373",
"0.5420607",
"0.54086447",
"0.5395624",
"0.5389411",
"0.5387459",
"0.5381519",
"0.53645885",
"0.53614426",
"0.53601706",
"0.5355069",
"0.5348823",
"0.5348527",
"0.53439844",
"0.5339376",
"0.5338902",
"0.5336102",
"0.53218335"
] | 0.7692857 | 0 |
visibles = visible = (visible visibles)& | private boolean visibles() {
return OPT(GO() && visible() && visibles());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isVisible() { return _visible; }",
"public void setVisible(boolean a){\n \t\tvisible = a;\n \t}",
"public void setVisible(Boolean visible);",
"private void toggleVisibleArrays() {\n if (showArray == true) {\n showArray = false;\n } else {\n showArray = true;\n }\n }",
"public boolean isVisible(){ return visible; }",
"void setVisible(boolean visible);",
"void setVisible(boolean visible);",
"public void setVisible(boolean visible);",
"public void setVisible(boolean b) {\n\t\t\n\t}",
"public void setVisible(Boolean isVisible);",
"public void setVisible(boolean visibile) {\n\t\tthis.visible = visibile;\n\t\tfor (GameObject gameObject : objects) {\n\t\t\tgameObject.setVisible(visibile);\n\t\t}\n\t}",
"public void setVisible(boolean val);",
"public abstract void setVisible(boolean visible);",
"private boolean setVisible(boolean b) {\n\t\treturn b;\n\t}",
"public void flipHidden()\n {\n for(int i=0;i<7;i++)\n {\n if(tableauVisible[i].isEmpty() && !tableauHidden[i].isEmpty())\n tableauVisible[i].forcePush(tableauHidden[i].pop());\n } \n }",
"@SuppressWarnings(\"unused\")\n void setVisible(boolean visible);",
"private boolean visible() {\r\n return NOT(GO() && CATS(Cc,Cn,Co,Cs,Zl,Zp)) && POINT();\r\n }",
"static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = scan.nextInt();\n x = scan.nextInt();\n scan.nextLine(); // flush\n \n System.out.printf(\"Marking all pixels visible from %d,%d as white.\\n\", x, y);\n // mark visible points\n for (int i=0 ; i < pgmInf.width ; i++) {\n for (int j=0 ; j < pgmInf.height ; j++) {\n if ( lineBetween(x, y, i, j) ) res[j][i] = 9;\n }\n }\n pgmInf.img = res;\n System.out.println(\"Done.\");\n }",
"public boolean isVisible()\n {\n return visible;\n }",
"public void setVisible(boolean visible){\r\n\t\tthis.visible = visible;\r\n\t}",
"private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }",
"public void setVisible(boolean visible)\n {\n this.visible = visible;\n }",
"public void setVisible(boolean value) {\n\t\tvisible = value;\n\t}",
"public boolean isVisible(){\n \t\treturn visible;\n \t}",
"public void setVisible (boolean visible) {\n this.visible = visible;\n }",
"@Override\n\tpublic void setVisible(boolean b) {\n\t\t\n\t}",
"public void setVisible(boolean visible) {\r\n this.visible = visible;\r\n }",
"public void setIsVisible(boolean isVisible);",
"@Override\n public void setVisible (boolean f)\n { \n }",
"final void setVisible(boolean visible) {\n this.visible = visible;\n }",
"public void setVisible(boolean newVisible)\n {\n this.visible = newVisible;\n conditionallyRepaint();\n }",
"public List<Boolean> getLayerVisibility ()\n {\n return Collections.unmodifiableList(_vis);\n }",
"public void changeHasInvisibility()\r\n\t{\r\n\t\thasInvisibility = !hasInvisibility;\r\n\t}",
"public void setVisibilities (Collection<Integer> visibleLayers)\n {\n for (int ii = 0, nn = _vis.size(); ii < nn; ii++) {\n _vis.set(ii, visibleLayers.contains(ii));\n }\n fireTableDataChanged();\n // update every damn entry\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n setVisibility(entry);\n }\n }",
"boolean isVisible();",
"boolean isVisible();",
"public void setVisible( boolean v) {\r\n visible = v;\r\n }",
"public void setVisible(boolean visible)\n\t{\n\t\tshaderMaterial.setUniform(\"AMBIENT\", \"isVisible\", new UniformBool(\n\t\t\t\tvisible));\n\t}",
"private void setVisibleBP(boolean a) {\n\t\tsetVisible(btnNewButton_1, a);\r\n\t}",
"@Override\n int getStateToVisible() {\n return 2;\n }",
"public void setVisible(boolean v) {\n }",
"public static native void _setVisible(Element elem, boolean visible) /*-{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telem.style.display = visible ? '' : 'none';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}-*/;",
"public void setVisible(boolean aValue)\n{\n if(isVisible()==aValue) return; // If value already set, just return\n firePropertyChange(\"Visible\", _visible, _visible = aValue, -1); // Set value and fire PropertyChange\n}",
"public boolean getVisible() {\r\n return visible;\r\n }",
"public Boolean isVisible();",
"public Boolean isVisible();",
"public Visible (boolean visible) {\n setVisible(visible);\n }",
"public boolean isVisible()\n {\n return visible;\n }",
"public void setRrVisible(boolean value) {\n rrVisible = value;\n }",
"public void resetIsVisible();",
"protected void mergeVisible ()\n {\n List<Integer> visible = getVisibleLayers();\n // remove the first layer and call that the \"mergeTo\" layer\n int mergeTo = visible.remove(0); // remove first value, not value 0!\n\n for (TudeySceneModel.Entry entry : _scene.getEntries()) {\n Object key = entry.getKey();\n if (visible.contains(_scene.getLayer(key))) {\n _scene.setLayer(key, mergeTo);\n }\n }\n\n // kill the layers, highest to lowest\n for (Integer layer : Lists.reverse(visible)) {\n _tableModel.removeLayer(layer);\n }\n fireStateChanged();\n }",
"public void setInvisible(boolean b)\n\t{\n\t\t_invisible = b;\n\t}",
"@DISPID(1611006060) //= 0x6006006c. The runtime will prefer the VTID if present\n @VTID(136)\n void externalReferencesAsVisible(\n boolean oVisible);",
"void setVisibleGlassPanel(Visibility visible);",
"@Override\n\tpublic void setVisible(boolean vis) {\n\t\t\n\t}",
"public static void bfsVisible(Cell cell) {\n\t\tArrayList<Cell> collects = new ArrayList<Cell>(); // The cells had been\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// collected\n\t\tQueue<Cell> queue = new LinkedList<Cell>();\n\t\tif (cell.getFlag() == 0) { // the flag of this cell equals 0\n\t\t\tqueue.offer(cell);\n\t\t\tcollects.add(cell); // Collects this cell\n\t\t} else\n\t\t\treturn;\n\t\twhile (!queue.isEmpty()) {\n\t\t\tCell c = queue.poll();\n\t\t\tfor (Cell cellAround : field.getCellsAround(c)) { // the cells\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// around c\n\t\t\t\tif (!collects.contains(cellAround)) { // Not collect yet\n\t\t\t\t\tcellAround.setVisibility();\n\t\t\t\t\tif (cellAround.getFlag() == 0)\n\t\t\t\t\t\tqueue.offer(cellAround);\n\t\t\t\t\tcollects.add(cellAround);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void setVisible(boolean arg0)\n {\n \n }",
"public void setVisibleButtons(int visibleButtons) {\n for (ButtonVisibility bv : ButtonVisibility.values()) {\n if ((bv.getVisibilityIndex() & visibleButtons) != 0) {\n setVisible(bv.getButton(), true);\n } else {\n setVisible(bv.getButton(), false);\n }\n }\n }",
"public void setTrailVisible(boolean visible) {\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}",
"public void makeVisible()\n {\n wall.makeVisible();\n roof.makeVisible();\n window.makeVisible();\n }",
"void toggleVisible (ActionEvent actionEvent) {\n element.visible = this.isSelected();\n }",
"public void addAllOnVisibleLinks() {\n // Check for a valid render context and create the new set\n RTGraphComponent.RenderContext myrc = (RTGraphComponent.RenderContext) getRTComponent().rc; if (myrc == null) return;\n Set<Bundle> set = new HashSet<Bundle>();\n // Go through visible links and find the related bundles\n Iterator<String> it = myrc.graphedgeref_to_link.keySet().iterator();\n while (it.hasNext()) {\n String graphedgeref = it.next();\n Iterator<Bundle> itb = digraph.linkRefIterator(graphedgeref);\n while (itb.hasNext()) set.add(itb.next());\n }\n // Add the no mapping set and push it to the RTParent\n set.addAll(getRTComponent().getNoMappingSet()); getRTParent().push(getRTParent().getRootBundles().subset(set));\n }",
"public boolean isVisible(Visibility v);",
"public boolean getVisible() {\n\t\treturn visible;\n\t}",
"public boolean getVisible() {\n\t\treturn visible;\n\t}",
"boolean updateVisibility() {\n boolean honorsVisibility;\n if (this.honorsVisibility == null) {\n honorsVisibility = GroupLayout.this.getHonorsVisibility();\n } else {\n honorsVisibility = this.honorsVisibility;\n }\n boolean newVisible = (honorsVisibility) ?\n component.isVisible() : true;\n if (visible != newVisible) {\n visible = newVisible;\n return true;\n }\n return false;\n }",
"public void setVisible(boolean val)\r\n\t{\r\n\t\t_isOn = val;\r\n\t}",
"public void setSearchButtonVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchButton_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchButton_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setSearchButtonVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }",
"public boolean isVisible(){\n\t\treturn this.visible;\n\t}",
"public boolean onlyVisible()\n\t{\n\t\treturn visible;\n\t}",
"private void applyVisibilityFlags() {\n if (rangeRings == null) {\n return;\n }\n try {\n boolean visibility = getDisplayVisibility();\n rangeRings.setRangeRingsVisible(rrVisible && visibility);\n rangeRings.setAzimuthLinesVisible(radVisible && visibility);\n rangeRings.setLabelsVisible(lblVisible && visibility);\n } catch (Exception exc) {}\n }",
"public void updateVisibility(Camera cam) {\n int i = 0;\n \n for(WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n \n Vertice third = null;\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (!aresta.equals(arestaFace)){\n if (face.ID == aresta.getFaceEsquerda().ID){\n third = aresta.getvFinal();\n break searchForAnyArestaParaEsquerda;\n } else if (face.ID == aresta.getFaceDireita().ID){\n third = aresta.getvInicial();\n break searchForAnyArestaParaEsquerda;\n }\n }\n }\n \n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n i++;\n }\n throw new UnsupportedOperationException(\"This doesn't work and programmer should feel bad. :(\");\n //<editor-fold defaultstate=\"collapsed\" desc=\"Testes que não funcionaram\">\n /*System.out.println(\"Lista vertices: \" + listaDeVertices);\n System.out.println(\"Lista arestas: \" + listaDeArestas);\n System.out.println(\"Lista faces: \" + listaDeFaces);\n\n for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = face.getArestaDaFace();\n System.out.println(\"ARESTA FACE: \" + arestaFace);\n WE_Aresta next;\n Vertice third;\n if (arestaFace.getFaceEsquerda().ID == face.ID){\n next = arestaFace.getEsquerdaPredecessora();\n } else {\n next = arestaFace.getDireitaSucessora();\n }\n\n if (next.getvInicial().equals(arestaFace.getvInicial())\n ||next.getvInicial().equals(arestaFace.getvFinal ()))\n third = next.getvFinal();\n else\n third = next.getvInicial();\n\n System.out.println(\"POINTS (\" + face.ID + \"): \");\n System.out.println(\"One: \" + arestaFace.getvFinal());\n System.out.println(\"Two: \" + arestaFace.getvInicial());\n System.out.println(\"Thr: \" + third);\n\n Vertice normal = VMath.obterNormal(arestaFace.getvFinal(), arestaFace.getvInicial(), third);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n\n i++;\n }*/\n\n /*for (WE_Face face : listaDeFaces){\n WE_Aresta arestaFace = null;\n\n searchForAnyArestaParaEsquerda:\n for (WE_Aresta aresta : listaDeArestas){\n if (face.ID == aresta.getFaceEsquerda().ID){\n arestaFace = aresta;\n break searchForAnyArestaParaEsquerda;\n }\n }\n\n Vertice one = arestaFace.getvInicial();\n Vertice two = arestaFace.getvFinal();\n Vertice three;\n\n arestaFace = arestaFace.getEsquerdaSucessora();\n if (arestaFace.getvInicial().equals(two)){\n three = arestaFace.getvFinal();\n } else {\n three = arestaFace.getvInicial();\n }\n\n Vertice normal = VMath.obterNormal(two, one, three);\n VMath.normalizar(normal);\n double mult = VMath.produtoEscalar(cam.getVetorN(), normal);\n System.out.println(\"Normal: \" + normal + \" Mult: \" + mult);\n visibilidade_faces[i] = mult > 0; //Se mult>0, face[i] é visível\n }*/\n //</editor-fold>\n }",
"void updateCommonToggleStatus(boolean shown);",
"public void addVisibleObjects(Bag visible) {\r\n\t\t\r\n\t\tfor(Object o : visible){\r\n\t\t\t// If the object is not known to the world\r\n\t\t\tif(knownWorld.getObjectLocation(o) == null){\r\n\t\t\t\t\r\n\t\t\t\tSimObject s = (SimObject) o;\r\n\t\t\t\tknownWorld.setObjectLocation(s, s.getLoc().x, s.getLoc().y);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setVisible(boolean value)\n\t{\n\t\tisVisible = value;\n\t\tif(!isVisible)\n\t\t{\n\t\t\tsetWorldRegion(null);\n\t\t}\n\t}",
"public void setInvisible ( boolean invisible ) {\n\t\texecute ( handle -> handle.setInvisible ( invisible ) );\n\t}",
"public void setItemActionBarVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_itemActionBar_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_itemActionBar_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setItemActionBarVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }",
"public boolean setVisible(boolean visible) {\n\t\tthrow new UnsupportedOperationException(\"readonly\");\n\t}",
"public void show() {\n visible=true;\n }",
"public void setActiveDisplayVisible(boolean visible) {\r\n\t\tactiveDisplay.setVisible(visible);\r\n\t}",
"public void sendByteVisibles(short[] objCodes, boolean visible) {\n\t\tsendByteVisibles(objCodes, visible, clientNames);\n\t}",
"public abstract boolean isVisible();",
"public abstract boolean isVisible();",
"private void Visibility(Boolean vis) {\n jSP1.setVisible(vis);\r\n jSP2.setVisible(vis);\r\n loadFile.setVisible(!vis);\r\n saveFile.setVisible(!vis);\r\n sourceFileLabel.setVisible(!vis);\r\n sourceFileName.setVisible(!vis);\r\n resultFileLabel.setVisible(!vis);\r\n resultFileName.setVisible(!vis);\r\n }",
"public void setIsVisible(java.lang.Boolean isVisible);",
"public boolean isVisible() {\r\n return visible;\r\n }",
"public boolean isVisible();",
"public boolean isVisible();",
"public boolean isVisible();",
"void setVisibleAdditionalComponents(boolean function) {\n\t\tfunction = !function;\n\t\trdbtnCurrentName.setVisible(function);\n\t\trdbtnOriginalName.setVisible(function);\n\t\trdbtnOwnName.setVisible(function);\n\t\trdbtnRandomName.setVisible(function);\n\t\ttextOwnName.setVisible(function);\n\n\t}",
"public void setVisible(boolean visible) {\n internalGroup.setVisible(visible);\n dataTrait.visible = visible;\n }",
"public void setVisibility(Enumerator newValue);",
"public void setVisibility(Enumerator newValue);",
"public boolean isVisible () {\n return visible;\n }",
"public boolean isInvisible ( ) {\n\t\treturn extract ( handle -> handle.isInvisible ( ) );\n\t}",
"private void setVisible(JButton a, boolean b) {\n\t\ta.setVisible(b);\r\n\t}",
"@VTID(21)\n void setVisibleSlicerItemsList(\n @MarshalAs(NativeType.VARIANT) java.lang.Object rhs);",
"public void setActionItemInfoVisible(boolean visible) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_actionItemInfo_propertyVisible\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_actionItemInfo_propertyVisible\", visible);\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(\"setActionItemInfoVisible(\" + visible + \");\");\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }",
"private void setVisible(JLabel a, boolean b) {\n\t\ta.setVisible(b);\r\n\t}"
] | [
"0.63658",
"0.6300541",
"0.62549025",
"0.62526894",
"0.62230134",
"0.6138722",
"0.6138722",
"0.61302036",
"0.61215925",
"0.6110875",
"0.60879105",
"0.60596126",
"0.6057399",
"0.59848213",
"0.59510005",
"0.5944592",
"0.59391516",
"0.59159213",
"0.5893262",
"0.58829826",
"0.58540726",
"0.5847458",
"0.5842278",
"0.57989985",
"0.5768595",
"0.5748445",
"0.57467294",
"0.57451224",
"0.5734505",
"0.5722529",
"0.5721185",
"0.57179177",
"0.5709727",
"0.568596",
"0.5683222",
"0.5683222",
"0.56721884",
"0.5652651",
"0.5633628",
"0.56185555",
"0.5613839",
"0.56106436",
"0.55998003",
"0.5576488",
"0.5554799",
"0.5554799",
"0.5548872",
"0.5542562",
"0.5538719",
"0.5534241",
"0.55114037",
"0.551025",
"0.5505662",
"0.5504992",
"0.5502826",
"0.5492415",
"0.5480776",
"0.5478849",
"0.54706657",
"0.5469704",
"0.54606587",
"0.54575545",
"0.5444804",
"0.5442308",
"0.5438963",
"0.5438963",
"0.5427068",
"0.54270595",
"0.54244083",
"0.54210687",
"0.5420472",
"0.54155374",
"0.5409353",
"0.5388382",
"0.5377553",
"0.5371283",
"0.5368655",
"0.53569674",
"0.53521043",
"0.5344388",
"0.53436303",
"0.53378767",
"0.5333127",
"0.5333127",
"0.5331647",
"0.5325124",
"0.5320144",
"0.5314341",
"0.5314341",
"0.5314341",
"0.53086597",
"0.530658",
"0.5294187",
"0.5294187",
"0.5265431",
"0.5261013",
"0.52599454",
"0.5258044",
"0.52574",
"0.5256559"
] | 0.6662862 | 0 |
escape = backslash (digits ';'? / 'rnqdgb') | private boolean escape() {
return backslash() && (
(digits() && (CHAR(';') || true)) || SET("rnqdgb"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"CharSequence escape(char c);",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"private void backslash() {\n // currentIndex points to '\\\\' character, so we move it to the next character\n ++currentIndex;\n \n // If wrong usage of '\\\\'\n if( !( \n currentIndex < dataLength && \n ( Character.isDigit( data[currentIndex] ) || data[currentIndex] == '\\\\' ) \n )\n ) {\n throw new LexerException(\"Wrong '\\' usage.\");\n }\n }",
"private String escapedValue(String value) {\n \t\tStringBuffer buf = new StringBuffer(value.length() * 2); // assume expansion by less than factor of 2\n \t\tfor (int i = 0; i < value.length(); i++) {\n \t\t\tchar character = value.charAt(i);\n \t\t\tif (character == '\\\\' || character == '\\t' || character == '\\r' || character == '\\n' || character == '\\f') {\n \t\t\t\t// handle characters requiring leading \\\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append(character);\n \t\t\t} else if ((character < 0x0020) || (character > 0x007e)) {\n \t\t\t\t// handle characters outside base range (encoded)\n \t\t\t\tbuf.append('\\\\');\n \t\t\t\tbuf.append('u');\n \t\t\t\tbuf.append(HEX[(character >> 12) & 0xF]); // first nibble\n \t\t\t\tbuf.append(HEX[(character >> 8) & 0xF]); // second nibble\n \t\t\t\tbuf.append(HEX[(character >> 4) & 0xF]); // third nibble\n \t\t\t\tbuf.append(HEX[character & 0xF]); // fourth nibble\n \t\t\t} else {\n \t\t\t\t// handle base characters\n \t\t\t\tbuf.append(character);\n \t\t\t}\n \t\t}\n \t\treturn buf.toString();\n \t}",
"private static String convertEscapeChar(String escapeCharacter)\t{\n\t\tString charCode = escapeCharacter.substring(escapeCharacter.indexOf(\"#\")+1);\n\t\treturn \"\" + (char) Integer.parseInt(charCode);\n\t}",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"String escChr(char pChar) throws Exception;",
"@Test\n void should_describe_escaped_chars() {\n final char backspace = 8;\n final char tab = 9;\n final char lineFeed = 10;\n final char carriageReturn = 13;\n final char doubleQuote = 0x22;\n final char singleQuote = 0x27;\n final char backslash = 0x5C;\n // --end-->\n\n assertEquals(EscapedChars.BACKSPACE.getValue(), backspace);\n assertEquals(EscapedChars.TAB.getValue(), tab);\n assertEquals(EscapedChars.LINE_FEED.getValue(), lineFeed);\n assertEquals(EscapedChars.CARRIAGE_RETURN.getValue(), carriageReturn);\n assertEquals(EscapedChars.DOUBLE_QUOTE.getValue(), doubleQuote);\n assertEquals(EscapedChars.SINGLE_QUOTE.getValue(), singleQuote);\n assertEquals(EscapedChars.BACKSLASH.getValue(), backslash);\n }",
"private static final void encodeQuotedPrintable(int b, ByteArrayOutputStream buffer)\n {\n buffer.write(ESCAPE_CHAR);\n char hex1 = Character.toUpperCase(\n Character.forDigit((b >> 4) & 0xF, 16));\n char hex2 = Character.toUpperCase(\n Character.forDigit(b & 0xF, 16));\n buffer.write(hex1);\n buffer.write(hex2);\n }",
"private static void escape(String s, StringBuilder sb) {\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tchar ch = s.charAt(i);\r\n\t\t\tswitch (ch) {\r\n\t\t\tcase '\"':\r\n\t\t\t\tsb.append(\"\\\\\\\"\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\\\':\r\n\t\t\t\tsb.append(\"\\\\\\\\\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\b':\r\n\t\t\t\tsb.append(\"\\\\b\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\f':\r\n\t\t\t\tsb.append(\"\\\\f\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\n':\r\n\t\t\t\tsb.append(\"\\\\n\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\r':\r\n\t\t\t\tsb.append(\"\\\\r\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '\\t':\r\n\t\t\t\tsb.append(\"\\\\t\");\r\n\t\t\t\tbreak;\r\n\t\t\tcase '/':\r\n\t\t\t\tsb.append(\"\\\\/\");\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif ((ch >= '\\u0000' && ch <= '\\u001F')\r\n\t\t\t\t\t\t|| (ch >= '\\u007F' && ch <= '\\u009F')\r\n\t\t\t\t\t\t|| (ch >= '\\u2000' && ch <= '\\u20FF')) {\r\n\t\t\t\t\tString str = Integer.toHexString(ch);\r\n\t\t\t\t\tsb.append(\"\\\\u\");\r\n\t\t\t\t\tfor (int k = 0; k < 4 - str.length(); k++) {\r\n\t\t\t\t\t\tsb.append('0');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsb.append(str.toUpperCase());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsb.append(ch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static String escapeString(String str) {\n return escapeString(str, 0xf423f);\n\t}",
"private static String escape_PN_LOCAL_ESC(String x) {\n\n int N = x.length() ;\n boolean escchar = false ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n if ( needsEscape(ch, (i==N-1)) ) {\n escchar = true ;\n break ;\n }\n }\n if ( ! escchar )\n return x ;\n StringBuilder sb = new StringBuilder(N+10) ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n // DOT only needs escaping at the end\n if ( needsEscape(ch, (i==N-1) ) )\n sb.append('\\\\') ;\n sb.append(ch) ;\n }\n return sb.toString() ;\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"public static String unicodeEscaped(char ch) {\n/* 353 */ if (ch < '\\020')\n/* 354 */ return \"\\\\u000\" + Integer.toHexString(ch); \n/* 355 */ if (ch < 'Ā')\n/* 356 */ return \"\\\\u00\" + Integer.toHexString(ch); \n/* 357 */ if (ch < 'က') {\n/* 358 */ return \"\\\\u0\" + Integer.toHexString(ch);\n/* */ }\n/* 360 */ return \"\\\\u\" + Integer.toHexString(ch);\n/* */ }",
"private static String handleEscapes(String s) {\n final String UNLIKELY_STRING = \"___~~~~$$$$___\";\n return s.replace(\"\\\\\\\\\", UNLIKELY_STRING).replace(\"\\\\\", \"\").replace(UNLIKELY_STRING, \"\\\\\");\n }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"public static String unicodeEscaped(Character ch) {\n/* 380 */ if (ch == null) {\n/* 381 */ return null;\n/* */ }\n/* 383 */ return unicodeEscaped(ch.charValue());\n/* */ }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"@Test\n public void testLikeWithEscape() throws Exception {\n String sql = \"SELECT a from db.g where b like '#String' escape '#'\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, MatchCriteria.ID);\n verifyProperty(criteriaNode, MatchCriteria.ESCAPE_CHAR_PROP_NAME, \"#\");\n verifyElementSymbol(criteriaNode, MatchCriteria.LEFT_EXPRESSION_REF_NAME, \"b\");\n verifyConstant(criteriaNode, MatchCriteria.RIGHT_EXPRESSION_REF_NAME, \"#String\");\n \n verifySql(\"SELECT a FROM db.g WHERE b LIKE '#String' ESCAPE '#'\", fileNode);\n }",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"public static void escapeLikeValue(StringBuilder sb, String value, char escapeChar) {\n for (int i = 0; i < value.length(); i++) {\n char ch = value.charAt(i);\n if (ch == '%' || ch == '_') {\n sb.append(escapeChar);\n }\n sb.append(ch);\n }\n }",
"private static String escapeJavaString(String input)\n {\n int len = input.length();\n // assume (for performance, not for correctness) that string will not expand by more than 10 chars\n StringBuilder out = new StringBuilder(len + 10);\n for (int i = 0; i < len; i++) {\n char c = input.charAt(i);\n if (c >= 32 && c <= 0x7f) {\n if (c == '\"') {\n out.append('\\\\');\n out.append('\"');\n } else if (c == '\\\\') {\n out.append('\\\\');\n out.append('\\\\');\n } else {\n out.append(c);\n }\n } else {\n out.append('\\\\');\n out.append('u');\n // one liner hack to have the hex string of length exactly 4\n out.append(Integer.toHexString(c | 0x10000).substring(1));\n }\n }\n return out.toString();\n }",
"private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }",
"public static String customEscapeQueryChars(String s) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n // These characters are part of the query syntax and must be escaped\n if (c == '\\\\' || c == '+' || c == '-' || c == '!' || c == '(' || c == ')' || c == ':'\n || c == '^' || c == '[' || c == ']' || c == '\\\"' || c == '{' || c == '}'\n || c == '~' || c == '?' || c == '|' || c == '&' || c == ';' || c == '/'\n || Character.isWhitespace(c)) {\n sb.append('\\\\');\n }\n sb.append(c);\n }\n return sb.toString();\n }",
"private static String encodeSegment(final String segment) {\r\n\t\tfinal Matcher matcher = SPECIAL_CHARACTERS_PATTERN.matcher(segment);\r\n\t\treturn matcher.replaceAll(\"\\\\\\\\$1\");\r\n\t}",
"public interface EscapeMarker {}",
"private\n static\n void\n appendUnicodeEscape( char ch,\n StringBuilder sb )\n {\n sb.append( \"\\\\u\" );\n\n String numStr = Integer.toString( ch, 16 );\n\n if ( ch <= '\\u000F' ) sb.append( \"000\" );\n else if ( ch <= '\\u00FF' ) sb.append( \"00\" );\n else if ( ch <= '\\u0FFF' ) sb.append( \"0\" );\n\n sb.append( Integer.toString( ch, 16 ) );\n }",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n String string0 = DBUtil.escape(\"Ucb\");\n assertEquals(\"Ucb\", string0);\n }",
"private static boolean isEscaped(String s, int pos) {\n if (pos < 0 || pos >= s.length()) {\n throw new IllegalArgumentException();\n }\n\n if (pos == 0) {\n return false;\n }\n\n int count = 0;\n pos--;\n\n while (pos >= 0 && s.charAt(pos) == '\\\\') {\n pos--;\n count++;\n }\n\n return count % 2 != 0;\n }",
"public static final String escape(int count) {\n if (count == 1)\n return ESCAPE;\n return repeat(\"ESCAPE\"/*I18nOK:EMS*/, count);\n }",
"private String escapeFragment(String pathFragment) {\n\t\treturn pathFragment.replaceAll(\"~\", \"~0\").replaceAll(\"\\\\/\", \"~1\");\n\t}",
"public String escapeSpetialCharecters(String string)\r\n {\r\n return string.replaceAll(\"(?=[]\\\\[+&|!(){}^\\\"~*?:\\\\\\\\-])\", \"\\\\\\\\\");\r\n }",
"public String escape(final String input) {\n\t\tStringBuilder builder = new StringBuilder(input);\n\t\tescape(builder);\n\t\treturn builder.toString();\n\t}",
"private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }",
"char unescChr(String pEscaped) throws Exception;",
"public void backSlash() {\n text.append(\"\\\\\");\n }",
"public static String escape(String string) throws UnsupportedEncodingException {\n\t\t\n fill();\n \n StringBuilder bufOutput = new StringBuilder(string);\n for (int i = 0; i < bufOutput.length(); i++) {\n //String replacement = (String) SPARQL_ESCAPE_SEARCH_REPLACEMENTS.get(\"\" + bufOutput.charAt(i));\n // if(replacement!=null) {\n if( SPARQL_ESCAPE_SEARCH_REPLACEMENTS.contains(bufOutput.charAt(i))) {\n String replacement = URLEncoder.encode( Character.toString(bufOutput.charAt(i)), \"UTF-8\");\n bufOutput.deleteCharAt(i);\n bufOutput.insert(i, replacement);\n // advance past the replacement\n i += (replacement.length() - 1);\n }\n }\n return bufOutput.toString();\n\t}",
"public static void escape() {\n \n // print vs. println\n \n System.out.print(\"Hello Class!\"); // next thing prints on same line\n System.out.println(\"It is Tuesday.\"); // next thing prints on next line\n \n System.out.println(); // prints a blank line\n \n \n // OUTPUT \n System.out.println(2); // you can put text or numbers in a print statement\n System.out.println(1 + 2 * 3); // you can also do math!\n // (order of operations)\n \n // Escape Sequences: \n // special characters denoted with the \\ (the escape character)\n \n // \\n --> new line \n System.out.print(\"Hello! \\n\\n\\n\\n\");\n System.out.println(\"He\\nllo!\");\n \n // \\t --> tab \n System.out.println(\"Hi\\tHi\");\n System.out.println(\"Hi\\t\\t\\t\\tHi\");\n \n // \\\\ --> \\\n System.out.println(\"\\\\\");\n \n // \\\" --> \" \n System.out.println(\"She said \\\"Java is the best!\\\"\");\n \n // You try!\n // Make a new class PrintQuote.java\n // Think of a quote or saying that you know \n // Output that saying with visible \" \" around it \n // Use a method to print your quote!\n \n // Example output: \"That's the way the cookie crumbles.\"\n \n \n \n \n \n \n \n }",
"public static String escapeSpecialChars(String value) {\r\n if (value != null) {\r\n for (int c = 0; c < SPECIAL_CHARS.length; c++) {\r\n value = value.replaceAll(\"\" + SPECIAL_CHARS[c], SPECIAL_CHAR_NAME[c]);\r\n }\r\n }\r\n return value;\r\n }",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"public static String escape(String source, int delimiter,\n boolean escapeQuote) {\n\n /*\n * If the source has any chars that need to be escaped, allocate a\n * new buffer and copy into it.\n * Allocate a new buffer iff source has any chars that need to\n * be esacaped.\n * Allocate enough so that the java buffer manager need not re-allocate\n * the buffer. Worst case is that all chars in the string need to be\n * escaped, resulting in twice the source length\n */\n int currpos = 0;\n StringBuffer result = null;\n // the default delimiter in COPY format is tab '\\t'\n boolean escapeDelimiter = false;\n // check if the user specified a custom delimiter\n if (delimiter != -1) {\n escapeDelimiter = true;\n }\n\n for (char ch : source.toCharArray()) {\n switch (ch) {\n case '\\\\':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\\\\\\");\n break;\n case '\\n':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\n\");\n break;\n case '\\r':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\r\");\n break;\n case '\\t':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\t\");\n break;\n case '\\b':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\b\");\n break;\n case '\\f':\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"\\\\f\");\n break;\n case '\\'':\n if (escapeQuote) {\n if (result == null) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n }\n result.append(\"''\");\n break;\n }\n // Fall through to default otherwise\n default:\n if (result != null) {\n if (escapeDelimiter && ch == delimiter) {\n result.append(\"\\\\\");\n result.append(delimiter);\n } else {\n result.append(ch);\n }\n }\n else if (escapeDelimiter && ch == delimiter) {\n result = new StringBuffer(2 * source.length() + 1);\n result.append(source.subSequence(0, currpos));\n result.append(\"\\\\\");\n result.append(delimiter);\n }\n }\n currpos++;\n }\n if (result != null) {\n return result.toString();\n } else {\n return source;\n }\n }",
"protected String getEscapedUri(String uriToEscape) {\r\n\t\treturn UriComponent.encode(uriToEscape, UriComponent.Type.PATH_SEGMENT);\r\n\t}",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"public static String escape(String value, String escape) {\n String result = value.replace(\"_\", \"_\" + escape);\n result = result.replace(\"%\", \"%\" + escape);\n result = result.replace(escape, escape + escape);\n return result;\n }",
"private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }",
"private String escapeName(String name) {\n return (name != null && name.indexOf('\"') > 0) ?\n name.replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") : name;\n }",
"private String escape(String str) {\n String result = null; // replace(str, \"&\", \"&\");\n\n while (str.indexOf(\"&\") != -1) {\n str = replace(str, \"&\", \"&\");\n }\n result = str;\n while (result.indexOf(\"-\") != -1) {\n result = replace(result, \"-\", \"\");\n }\n return result;\n }",
"EscapeStatement createEscapeStatement();",
"private static String zzgr(String string2) {\n int n = string2.length();\n StringBuilder stringBuilder = new StringBuilder(n);\n int n2 = 0;\n while (n2 < n) {\n char c = string2.charAt(n2);\n if (c >= ' ' && c <= '~' && c != '\\\"' && c != '\\'') {\n stringBuilder.append(c);\n } else {\n stringBuilder.append(String.format(\"\\\\u%04x\", c));\n }\n ++n2;\n }\n return stringBuilder.toString();\n }",
"private static String[] escape(String[] args) {\n String[] result;\n\n result = new String[args.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = escape(args[i]);\n }\n return result;\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"rV.:Q-\");\n Token token0 = xPathLexer0.slashes();\n assertEquals(11, token0.getTokenType());\n assertEquals(\"r\", token0.getTokenText());\n \n Token token1 = xPathLexer0.dots();\n assertEquals(\"V.\", token1.getTokenText());\n assertEquals(14, token1.getTokenType());\n }",
"@Test\n public void testEscapeCurlyBraces() {\n assertEquals(\"\\\\{\", HtmlUnitRegExpProxy.escapeJSCurly(\"{\"));\n assertEquals(\"\\\\{\", HtmlUnitRegExpProxy.escapeJSCurly(\"\\\\{\"));\n assertEquals(\"\\\\}\", HtmlUnitRegExpProxy.escapeJSCurly(\"}\"));\n assertEquals(\"\\\\}\", HtmlUnitRegExpProxy.escapeJSCurly(\"\\\\}\"));\n assertEquals(\"(^|\\\\{)#([^\\\\}]+)(\\\\}|$)\", HtmlUnitRegExpProxy.escapeJSCurly(\"(^|{)#([^}]+)(}|$)\"));\n\n assertEquals(\"a{5}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5}\"));\n assertEquals(\"a{5,}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5,}\"));\n assertEquals(\"a{5,10}\", HtmlUnitRegExpProxy.escapeJSCurly(\"a{5,10}\"));\n }",
"public String escapeIdentifier(String identifierName);",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"String escStr(String pSource) throws Exception;",
"@Test\n public void testStringLiteralEscapedTick() throws Exception {\n String sql = \"SELECT 'O''Leary' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"O'Leary\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public static String escape(String input) {\n\t\tboolean insidequote = false;\n\t\tString output = \"\";\n\t\tfor (int i = 0; i < input.length(); i++) {\n\t\t\tchar current = input.charAt(i);\n\t\t\tif (current == '\\'') {\n\t\t\t\tinsidequote = !insidequote;\n\t\t\t\toutput += current;\n\t\t\t} else if (insidequote) {\n\t\t\t\tif (current == ' ') {\n\t\t\t\t\toutput += \"\\\\s\";\n\t\t\t\t} else if (current == '\\t') {\n\t\t\t\t\toutput += \"\\\\t\";\n\t\t\t\t} else if (current == ',') {\n\t\t\t\t\toutput += \"\\\\c\";\n\t\t\t\t} else if (current == '\\\\') {\n\t\t\t\t\toutput += \"\\\\b\";\n\t\t\t\t} else if (current == ';') {\n\t\t\t\t\toutput += \"\\\\p\";\n\t\t\t\t} else if (current == ':') {\n\t\t\t\t\toutput += \"\\\\d\";\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t} // no uppercase inside quoted strings!\n\t\t\t} else {\n\t\t\t\tif (current == ',') {\n\t\t\t\t\toutput += \" , \"; // add spaces around every comma\n\t\t\t\t} else {\n\t\t\t\t\toutput += current;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}",
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"@Test\n public void testStringLiteralEscapedTick4() throws Exception {\n String sql = \"SELECT \\\" \\\"\\\" \\\" FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \" \\\" \");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }",
"private static String escape(String s) {\n StringBuilder buf = new StringBuilder();\n int length = s.length();\n for (int i = 0; i < length; i++) {\n char c = s.charAt(i);\n if (c == ',') {\n buf.append(\"\\\\,\");\n } else {\n buf.append(c);\n }\n }\n\n return buf.toString();\n }",
"private static String rep(String input) {\n\t\tchar[] ca = input.toCharArray();\n\t\tint c = 0;\n\t\tfor (int i = 0, n = ca.length; i < n; i++) {\n\t\t\tif (ca[i] == '\\'')\n\t\t\t\tc++;\n\t\t\telse if (ca[i] == ',' && ((c % 2) != 0))\n\t\t\t\tca[i] = '~';\n\t\t}\n\t\treturn String.valueOf(ca);\n\t}",
"public static String replaceEscapeChars(final String input) {\n if (input == null) return null;\n\n String retValue = LEFT_SQUARE_BRACKET_PATTERN.matcher(input).replaceAll(\"[\");\n retValue = RIGHT_SQUARE_BRACKET_PATTERN.matcher(retValue).replaceAll(\"]\");\n retValue = LEFT_BRACKET_PATTERN.matcher(retValue).replaceAll(\"(\");\n retValue = RIGHT_BRACKET_PATTERN.matcher(retValue).replaceAll(\")\");\n retValue = COLON_PATTERN.matcher(retValue).replaceAll(\":\");\n retValue = COMMA_PATTERN.matcher(retValue).replaceAll(\",\");\n retValue = EQUALS_PATTERN.matcher(retValue).replaceAll(\"=\");\n retValue = PLUS_PATTERN.matcher(retValue).replaceAll(\"+\");\n return MINUS_PATTERN.matcher(retValue).replaceAll(\"-\");\n }",
"public static boolean stringHasValidEscapes( String string )\n\t{\t\t\n\t\tboolean answer = true;\n\t\tfor( int i = 0; i < string.length(); i++ )\n\t\t{\n\t\t\tif( string.charAt( i ) == '\\\\' && i + 1 < string.length() )\n\t\t\t{\n\t\t\t\tchar nextchar = string.charAt( i + 1 );\n\t\t\t\tif( nextchar == '\\\"' || nextchar == '\\\\' || nextchar == '/' \n\t\t\t\t|| nextchar == 'b' || nextchar == 'f' || nextchar == 'n' \n\t\t\t\t|| nextchar == 'r' || nextchar == 't' || nextchar == 'u' )\n\t\t\t\t{\n\t\t\t\t\tif( nextchar == 'u' && i + 5 < string.length() )\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//the next 4 characters should be hex digits\n\t\t\t\t\t\t\tfor(int j = i + 2; j < i + 6; j++ )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tInteger.parseInt( string.substring( j , j + 1 ) , 16 ); //substring instead of charAt because parseInt requires a string\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch( NumberFormatException nfe )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//one of the 4 characters was not a hex value\n\t\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t}\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\t//the character following the slash was not a valid escape character\n\t\t\t\t\tanswer = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn answer;\n\t}",
"@Test\n public void testMethod() {\n Engine e = new Engine( \"[[\", \"]]\", (int) '@', new HashMap<String, String>() );\n assertThat( e.isEscape( '@' ) ).isTrue();\n assertThat( e.isEscape( '\\\\' ) ).isFalse();\n }",
"public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"@Test\n public void testStringLiteralEscapedTick3() throws Exception {\n String sql = \"SELECT 'a''b''c' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"a'b'c\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public static String escape(String s) {\r\n if (s == null)\r\n return null;\r\n StringBuffer sb = new StringBuffer();\r\n escape(s, sb);\r\n return sb.toString();\r\n }",
"private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }",
"public static String addSpecialCharacters(String guid)\r\n\t{\r\n\t\tStringBuffer sb = new StringBuffer(\"{\");\r\n\t\tsb.append(guid.substring(0, 8) + \"-\");\r\n\t\tsb.append(guid.substring(8, 12) + \"-\");\r\n\t\tsb.append(guid.substring(12, 16) + \"-\");\r\n\t\tsb.append(guid.substring(16, 20) + \"-\");\r\n\t\tsb.append(guid.substring(20) + \"}\");\r\n\t\treturn sb.toString();\r\n\t}",
"private void eatEscaped(int esc) {\n position++;\n while (position < length) {\n int c = data.charAt(position);\n\n if (c == esc) {\n // check for end of file\n if (position + 1 >= length) {\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n\n }\n\n int next = data.charAt(position + 1);\n if (next == '\\t' || next == '\\n' || next == '\\r' || next == ' ') {\n // get rid of the quotes\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n }\n\n } else {\n // handle 'xxxNEWLINE => 'xxx\n if (c == '\\r' || c == '\\n') {\n tokenEnd = position;\n return;\n }\n }\n position++;\n }\n\n tokenEnd = position;\n }",
"public static String escapeRegexReservedCharacters(String stringWithReservedCharacters) {\n String reservedSymbols = \"{([*+^?<>$.|])}\";\n StringBuilder escapedStringBuilder = new StringBuilder();\n\n for (char character : stringWithReservedCharacters.toCharArray()) {\n if (reservedSymbols.contains(String.valueOf(character)))\n escapedStringBuilder.append(\"\\\\\");\n\n escapedStringBuilder.append(character);\n }\n\n return escapedStringBuilder.toString();\n }",
"default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }"
] | [
"0.68712676",
"0.6672104",
"0.6610719",
"0.6417278",
"0.64120895",
"0.632842",
"0.62462884",
"0.6227598",
"0.62195027",
"0.6191808",
"0.6186048",
"0.61843354",
"0.6181701",
"0.612631",
"0.6111938",
"0.60864586",
"0.60800385",
"0.60604364",
"0.605634",
"0.60408264",
"0.60209054",
"0.60057795",
"0.59293747",
"0.59154326",
"0.5876947",
"0.58117634",
"0.58077425",
"0.5788923",
"0.578798",
"0.576056",
"0.57453066",
"0.57442033",
"0.5715248",
"0.5697519",
"0.5688255",
"0.56733716",
"0.5667911",
"0.565989",
"0.565456",
"0.56492347",
"0.564404",
"0.56415576",
"0.56203306",
"0.56187993",
"0.5604433",
"0.5603802",
"0.5603253",
"0.5589264",
"0.5587961",
"0.55826676",
"0.5542691",
"0.5526984",
"0.54953736",
"0.54860723",
"0.54845375",
"0.5458153",
"0.54439884",
"0.5443572",
"0.54403156",
"0.5437922",
"0.54317963",
"0.54310477",
"0.54226553",
"0.54207325",
"0.5410216",
"0.5405233",
"0.5404945",
"0.5402916",
"0.5398911",
"0.5394437",
"0.5385533",
"0.5384157",
"0.53700876",
"0.5363896",
"0.53597206",
"0.5349821",
"0.53456086",
"0.5345095",
"0.5323645",
"0.53223956",
"0.5318023",
"0.5314123",
"0.52989084",
"0.5291716",
"0.5283709",
"0.5265303",
"0.52543014",
"0.5246573",
"0.52460414",
"0.52300555",
"0.52177656",
"0.5215533",
"0.52074724",
"0.5200629",
"0.5196245",
"0.51942927",
"0.51859134",
"0.5185713",
"0.51677364",
"0.5161333"
] | 0.77919525 | 0 |
alpha = letter / Nd / '' / '_' | private boolean alpha() {
return letter() || CATS(Nd) || CHAR('-') || CHAR('_');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }",
"private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}",
"public final void mLETTER() throws RecognitionException {\r\n try {\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:307:17: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:\r\n {\r\n if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\r\n input.consume();\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"private boolean isAlpha(char toCheck) {\n return (toCheck >= 'a' && toCheck <= 'z') ||\n (toCheck >= 'A' && toCheck <= 'Z') ||\n toCheck == '_';\n }",
"private static boolean isAlphanum(char p_char) {\n return (p_char <= 'z' && (fgLookupTable[p_char] & MASK_ALPHA_NUMERIC) != 0);\n }",
"public static String rndLetterString() {\r\n int spLen = RBytes.rndInt(10, 20);\r\n char[] c = RBytes.rndCharArray('a', 'z');\r\n char[] C = RBytes.rndCharArray('A', 'Z');\r\n char[] d = RBytes.rndCharArray('0', '9');\r\n String special = \"\";\r\n for (int s = 0; s < spLen; s++) {\r\n special += \"!@#$%^&*()-_~`=+:;.,\";\r\n }\r\n String s1 = new String(c) + new String(d) + new String(C) + special;\r\n return shaffleString(s1);\r\n }",
"private boolean isAlphanumeric(char c) {\n if (c < '0' || c > 'z') {\n return false;\n }\n if (c <= '9' || c >= 'a') {\n return true;\n }\n if (c >= 'A' && c <= 'Z') {\n return true;\n }\n return false;\n }",
"private boolean isJavaLetter(char c) {\n return c == '_' || c == '$' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n }",
"private static boolean isLetter( char s ){\n\t\tif ( Character.isLetter(s)) return true; \n\t\tthrow new IllegalArgumentException(\"Name of town '\"+ s +\"' should be a letter\");\n\t}",
"Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }",
"private static boolean isAlpha(byte b)\r\n\t{\r\n\t\treturn (b >= 'a' && b <= 'z') || \r\n\t\t\t (b >= 'A' && b <= 'Z');\r\n\t}",
"public static boolean isAsciiAlpha(char ch) {\n/* 460 */ return (isAsciiAlphaUpper(ch) || isAsciiAlphaLower(ch));\n/* */ }",
"Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }",
"private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }",
"private boolean isValid() {\n return Character.isLetter(c);\n }",
"public char getLetter(){\r\n\t\treturn letter;\r\n\t}",
"public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}",
"public static void main(String[] args) {\n System.out.println(\"1. \" + StringTools.isAlpha(\"Happy\"));\n System.out.println(\"2. \" + StringTools.isAlpha(\"Happy-Happy\"));\n System.out.println(\"3. \" + StringTools.isAlpha(\"Happy-Happy\", '-'));\n System.out.println(\"\");\n System.out.println(\"1. \" + StringTools.isNumeric(\"09368955866\"));\n System.out.println(\"2. \" + StringTools.isNumeric(\"0936-895-5866\"));\n System.out.println(\"3. \" + StringTools.isNumeric(\"0936/895/5866\", '/'));\n System.out.println(\"\");\n System.out.println(\"1. \" + StringTools.isAlpha(\"HappyDay\"));\n System.out.println(\"2. \" + StringTools.isAlpha(\"#Happy-Day\"));\n System.out.println(\"3. \" + StringTools.isAlpha(\"Happy-Happy\", '#', '-'));\n // alpha space\n System.out.println(\"1. \" + StringTools.isAlpha(\"asd\", ' '));\n }",
"public boolean hasAlpha() {\n return true;\n }",
"public static boolean isLetter ( char letter )\n {\n if ( ( letter >= 'a' ) && ( letter <= 'z' ) ) return true;\n if ( ( letter >= 'A' ) && ( letter <= 'Z' ) ) return true;\n return false;\n }",
"public final void mLETTER() throws RecognitionException {\n try {\n // /Users/dannluciano/Sources/MyLanguage/expr.g:163:8: ( 'a' .. 'z' | 'A' .. 'Z' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\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 boolean isUrgentLetter() {\n\t\treturn false;\n\t}",
"static String m33125a(String name) {\n StringBuilder fieldNameBuilder = new StringBuilder();\n int index = 0;\n char firstCharacter = name.charAt(0);\n int length = name.length();\n while (index < length - 1 && !Character.isLetter(firstCharacter)) {\n fieldNameBuilder.append(firstCharacter);\n index++;\n firstCharacter = name.charAt(index);\n }\n if (Character.isUpperCase(firstCharacter)) {\n return name;\n }\n fieldNameBuilder.append(m33124a(Character.toUpperCase(firstCharacter), name, index + 1));\n return fieldNameBuilder.toString();\n }",
"public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\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 static String calculateLetter(int dniNumber) {\n String letras = \"TRWAGMYFPDXBNJZSQVHLCKEU\";\n int indice = dniNumber % 23;\n return letras.substring(indice, indice + 1);\n }",
"public static char randomLetter(){\n\t\t//char A-Z\n\t\tint r1 = (int) (Math.random()*26+65);\n\n\t\t//char a-z\n\t\tint r2 = (int) (Math.random()*26+97);\n\n\t\t//choose one of the two\n\t\tif(Math.random() < 0.5)\n\t\t\treturn (char) r1;\n\t\treturn (char) r2;\n\t}",
"char getContactLetter();",
"public boolean isCharacter(char a) {\n if (a >= 'a' && a <= 'z' || a >= 'A' && a <= 'Z' || a >= '0' && a <= '9' || a == '_')\n return true;\n return false;\n }",
"public char getLetter() {\n return letter;\n }",
"public char getLetter()\n {\n \treturn letter;\n }",
"char getContactLetter(ContactSortOrder sortOrder);",
"public static boolean isAsciiAlphanumeric(char ch) {\n/* 536 */ return (isAsciiAlpha(ch) || isAsciiNumeric(ch));\n/* */ }",
"public char getLetter()\n\t{\n\t\treturn letter;\n\t}",
"public char getLetter() {\r\n\t\treturn letter;\r\n\t}",
"public static char getRandomLowerCaseLetter(){\n\t\treturn getRandomCharacter('a','z');\n\t}",
"public String getLetter() {\n return letter;\n }",
"public static Boolean Letter(String arg){\n\t\tif(arg.matches(\"\\\\p{L}{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private static String makeLatinName(int len, Random r) {\n final String lc = \"abcdefghijklmnopqrstuvwxyz\";\n final String alphabet = lc + lc.toUpperCase();\n final String start = \"$_\" + alphabet;\n final String part = start + \"0123456789\";\n\n StringBuffer sb = new StringBuffer();\n sb.append(start.charAt(r.nextInt(start.length())));\n while (sb.length() < len)\n sb.append(part.charAt(r.nextInt(part.length())));\n return sb.toString();\n }",
"public static boolean lettersCheck(String name) {\r\n\t\treturn name.matches(\"^[\\\\p{L} .'-]+$\");\r\n\t}",
"String getNextIdent (boolean startsWithAlpha) {\n int p = m_pos;\n char c = getChar ();\n if (startsWithAlpha && isAlpha (c) == false) { return null; }\n while ( isAlpha (c) || isNumber (c) || isSpecial (c) ) {\n c = getNextChar ();\n }\n return m_buffer.substring (p, m_pos);\n }",
"public final void mID() throws RecognitionException {\n try {\n int _type = ID;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // metamorph.runtime/src/antlr/Ast.g:26:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )* )\n // metamorph.runtime/src/antlr/Ast.g:26:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*\n {\n if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n input.consume();\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;\n }\n\n\n // metamorph.runtime/src/antlr/Ast.g:26:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' )*\n loop1:\n do {\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( ((LA1_0 >= '0' && LA1_0 <= '9')||(LA1_0 >= 'A' && LA1_0 <= 'Z')||LA1_0=='_'||(LA1_0 >= 'a' && LA1_0 <= 'z')) ) {\n alt1=1;\n }\n\n\n switch (alt1) {\n \tcase 1 :\n \t // metamorph.runtime/src/antlr/Ast.g:\n \t {\n \t if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n \t input.consume();\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop1;\n }\n } while (true);\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }",
"private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}",
"public static String getLettersOrDigits(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return s;\r\n \r\n // Removes spaces and dashes\r\n StringBuffer buf = new StringBuffer();\r\n int len = s.length();\r\n for (int n = 0; n < len; n++)\r\n {\r\n char c = s.charAt(n);\r\n if (Character.isLetterOrDigit(c))\r\n buf.append(c);\r\n }\r\n return buf.toString();\r\n }",
"public char getLetter() {\r\n\t\t\treturn letter;\r\n\t\t}",
"public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }",
"public void setLetter(char letter){\r\n\t\tthis.letter = letter;\r\n\t}",
"private static boolean isLegalIdentifier(String str) {\n if (\"\".equals(str)) {\n return false;\n }\n if (str.charAt(0) >= '0' & str.charAt(0) <= '9') {\n return false;\n }\n\n return str.matches(\"^\\\\w+$\");\n }",
"private boolean isIdentifierChar(char ch) {\n return (((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z'))\n || ((ch >= '0') && (ch <= '9')) || (\".-_:\".indexOf(ch) >= 0));\n }",
"private char[] alphanumeric(){\n StringBuffer buf=new StringBuffer(128);\n for(int i=48; i<= 57;i++)buf.append((char)i); // 0-9\n for(int i=65; i<= 90;i++)buf.append((char)i); // A-Z\n for(int i=97; i<=122;i++)buf.append((char)i); // a-z\n return buf.toString().toCharArray();\n }",
"public String buildWord() {\n\t\tStringBuilder word = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < letters.size(); i++) {\n\t\t\tLetter tempLetter = letters.get(i);\n\t\t\t\n\t\t\tif(!(letters.get(i).getLetter() >= 'A' && letters.get(i).getLetter() <= 'Z') || tempLetter.getStatus())\n\t\t\t\tif(letters.get(i).getLetter() != ' ')\n\t\t\t\t\tword.append(tempLetter.getLetter());\n\t\t\t\telse\n\t\t\t\t\tword.append(\" \");\n\t\t\telse\n\t\t\t\tif (i == letters.size()-1) word.append(\"_\");\n\t\t\t\telse word.append(\"_ \");\n\t\t}\n\t\treturn word.toString();\n\t}",
"Rule IndentChar() {\n return FirstOf(Letter(), Digit(), \".\", \"_\");\n }",
"public final void mIDENT() throws RecognitionException {\n try {\n int _type = IDENT;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:599:5: ( LETTER ( LETTER | DIGIT | '_' )* )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:599:7: LETTER ( LETTER | DIGIT | '_' )*\n {\n mLETTER(); \n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:599:14: ( LETTER | DIGIT | '_' )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( ((LA8_0>='0' && LA8_0<='9')||(LA8_0>='A' && LA8_0<='Z')||LA8_0=='_'||(LA8_0>='a' && LA8_0<='z')) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:\n \t {\n \t if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static String formatText(String t) {\r\n if (t.length() > 0) {\r\n char chars[] = t.toCharArray();\r\n for (int index = 0; index < chars.length; index++)\r\n if (chars[index] == '_') {\r\n chars[index] = ' ';\r\n if (index + 1 < chars.length && chars[index + 1] >= 'a' && chars[index + 1] <= 'z')\r\n chars[index + 1] = (char) ((chars[index + 1] + 65) - 97);\r\n }\r\n\r\n if (chars[0] >= 'a' && chars[0] <= 'z')\r\n chars[0] = (char) ((chars[0] + 65) - 97);\r\n return new String(chars);\r\n } else {\r\n return t;\r\n }\r\n }",
"public static String randAlnum(){\n int n;\n String result = null;\n switch (CAPS){\n case 0:\n n = rand.nextInt(62);\n if (n>51){\n result = String.valueOf(n-52);\n }else {\n result = randChar(); //both\n }\n break;\n case 1:\n n = rand.nextInt(36);\n if (n>25){\n result = String.valueOf(n-26);\n }else {\n result = randLower(); //lower\n }\n break;\n case 2:\n n = rand.nextInt(36);\n if (n>25){\n result = String.valueOf(n-26);\n }else {\n result = randUpper(); //upper\n }\n break;\n }\n return result;\n }",
"public final void mALPHA() throws RecognitionException {\n try {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2908:2: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '\\\\u00C0' .. '\\\\u00D6' | '\\\\u00D8' .. '\\\\u00F6' | '\\\\u00F8' .. '\\\\u00FF' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\\u00C0' && input.LA(1)<='\\u00D6')||(input.LA(1)>='\\u00D8' && input.LA(1)<='\\u00F6')||(input.LA(1)>='\\u00F8' && input.LA(1)<='\\u00FF') ) {\n input.consume();\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/aofC/AspectParser/AOC.g:186:16: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// src/aofC/AspectParser/AOC.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public static boolean isLetter(char c)\n {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n }",
"private String validateWord (String word) {\r\n String chars = \"\";\r\n for (int i = 0; i < word.length (); ++i) {\r\n if (!Character.isLetter (word.charAt (i))) {\r\n chars += \"\\\"\" + word.charAt (i) + \"\\\" \";\r\n }\r\n }\r\n return chars;\r\n }",
"public static String onlyAlpha(final String s) {\n\t\tfinal StringBuilder sb = new StringBuilder();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tif (Character.isLetter(s.charAt(i))) {\n\t\t\t\tsb.append(s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static void convertNumericToRandomAlpha(StringBuffer buf)\n {\n byte byteLetter = 0;\n byte randomByte = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the byte value of the number\n byteLetter = (byte) (buf.charAt(letter) - 48);\n if (byteLetter == 0)\n {\n byteLetter = 10;\n\n // generate a random number between 1 and 3 such that the number multiplied\n // by the byteLetter does not exceed 26. byteLetter of 0 is treated as 10.\n }\n randomByte = (byte) ((Math.round(Math.random() * 100)\n % ((byteLetter > 6) ? 2 : 3)));\n byteLetter = (byte) (byteLetter + (randomByte * 10));\n buf.setCharAt(letter, (char) (byteLetter + 96));\n }\n }",
"public static boolean isAsciiAlphaLower(char ch) {\n/* 498 */ return (ch >= 'a' && ch <= 'z');\n/* */ }",
"public final void mLETTER() throws RecognitionException {\n\t\ttry {\n\t\t\t// src/VSLLexer.g:15:17: ( 'a' .. 'z' )\n\t\t\t// src/VSLLexer.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public static boolean isLetter(String p) {\n boolean check = true;\n for (int i = 0; i < p.length(); i++) {\n if (!Character.isLetter(p.charAt(i))) {\n check = false;\n }\n }\n return check;\n }",
"public char getRepresentative_letter(){\n\t\treturn representative_letter;\n\t}",
"protected char tryReduceChar(char letter) {\n int comp = (letter < 97) ? Character.toLowerCase(letter) : letter;\n return (Integer.compare(comp, 97) > 0) ? (char) (letter - 1) : letter;\n }",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }",
"private String name() {\n\t\tif (currentIndex >= data.length\n\t\t\t\t|| !Character.isLetter(data[currentIndex])) {\n\t\t\tthrow new LexerException();\n\t\t}\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& (Character.isLetter(data[currentIndex])\n\t\t\t\t\t\t|| data[currentIndex] == '_'\n\t\t\t\t\t\t|| Character.isDigit(data[currentIndex]))) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\treturn value;\n\t}",
"static boolean isLetterChoice()\r\n {\r\n\treturn isLetterChoice;\r\n }",
"private boolean isIdentifier(String input) {\n if (this.isLetter(input.charAt(0))) {\n return true;\n } else return false;\n }",
"public String getAbbreviationLetter() {\n\t\treturn pieceLetter;\n\t}",
"public String indexToLetter(int index) {\r\n\t\tif (index == 0)\r\n\t\t\treturn \"a\";\r\n\t\telse if (index == 1)\r\n\t\t\treturn \"b\";\r\n\t\telse if (index == 2)\r\n\t\t\treturn \"c\";\r\n\t\telse if (index == 3)\r\n\t\t\treturn \"d\";\r\n\t\telse if (index == 4)\r\n\t\t\treturn \"e\";\r\n\t\telse if (index == 5)\r\n\t\t\treturn \"f\";\r\n\t\telse if (index == 6)\r\n\t\t\treturn \"g\";\r\n\t\telse if (index == 7)\r\n\t\t\treturn \"h\";\r\n\t\telse if (index == 8)\r\n\t\t\treturn \"i\";\r\n\t\telse if (index == 9)\r\n\t\t\treturn \"j\";\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }",
"private static boolean isAlphaNumeric(String s) {\n return s != null && s.matches(\"^[a-zA-Z0-9]*$\");\n }",
"public String firstAlphabeticalTitleLetter(String title){\n\t\t int first = 0;\n if ( title.toLowerCase().startsWith(\"the \") ) { first = 4; }\n\t\t return title.substring(first, (first + 1));\n\t }",
"private static void convertAlphaToNumeric(StringBuffer buf)\n {\n byte byteLetter = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the index value of 1 to 26 of the letter and then take the modulo of 10\n byteLetter = (byte) (buf.charAt(letter) - 96);\n byteLetter = (byte) (byteLetter % 10);\n buf.setCharAt(letter, (char) (byteLetter + 48));\n }\n }",
"public static String underscoreName(String name) {\n\t\treturn name.substring(0, 1).toLowerCase() + name.substring(1).replaceAll(\"([A-Z])\", \"_$1\").toLowerCase();\n\t}",
"private boolean ifAlphabetOnly(String str){\n return str.chars().allMatch(Character :: isLetter);\n }",
"public static boolean alphanumericCheck(String name)\r\n\t{\r\n\t\treturn name.matches(\"^[a-zA-Z0-9]*$\");\r\n\t}",
"private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }",
"public static String replaceNonAlphanumeric(String str) {\n return replaceNonAlphanumeric(str, '_');\n }",
"private boolean isEnLetter(char ch) {\n if ( ( (ch >= 'a') && (ch <= 'z')) || ( (ch >= 'A') && (ch <= 'Z'))) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"public static void main(String[] args) {\n\n\t\tString s = \"P@$$w!rd\";\n\n\t\tString specialCharacters = s.replaceAll(\"[^@#$%^&*()!_+\\\\-=\\\\[\\\\]{};':\\\"\\\\\\\\|,.<>\\\\/? 0-9]\", \"\");\n\t\tString alphabets = s.replaceAll(\"[^a-zA-Z]\", \"\");\n\n\t\tSystem.out.println(specialCharacters);\n\t\tSystem.out.println(alphabets);\n\n\t\tint a = 0, b = alphabets.length() - 1;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\n\t\t\tif (Character.isAlphabetic(s.charAt(i))) {\n\t\t\t\tSystem.out.print(alphabets.charAt(b));\n\t\t\t\tb--;\n\t\t\t} else {\n\t\t\t\tSystem.out.print(specialCharacters.charAt(a));\n\t\t\t\ta++;\n\t\t\t}\n\n\t\t}\n\n\t}",
"static String getAlphaNumericString(int n) \n {\n byte[] array = new byte[256]; \n new Random().nextBytes(array); \n \n String randomString \n = new String(array, Charset.forName(\"UTF-8\")); \n \n // Create a StringBuffer to store the result \n StringBuffer r = new StringBuffer(); \n \n // Append first 20 alphanumeric characters \n // from the generated random String into the result \n for (int k = 0; k < randomString.length(); k++) { \n \n char ch = randomString.charAt(k); \n \n if (((ch >= 'a' && ch <= 'z') \n || (ch >= 'A' && ch <= 'Z') \n || (ch >= '0' && ch <= '9')) \n && (n > 0)) { \n \n r.append(ch); \n n--; \n } \n } \n \n // return the resultant string \n return r.toString(); \n }",
"boolean isIdentifierChar(char c);",
"private boolean isGrLetter(char ch) {\n /*if ( ( (ch >= 'á') && (ch <= 'ù')) || ( (ch >= 'Á') && (ch <= 'Ù')) ||\n (ch == 'Ü') || (ch == 'Ý') || (ch == 'Þ') || (ch == 'ß') ||\n (ch == 'ü') || (ch == 'ý') || (ch == 'þ') ||\n (ch == '¢') || (ch == '¸') || (ch == '¹') || (ch == 'º') ||\n (ch == '¼') || (ch == '¾') || (ch == '¿') ||\n (ch == 'ú') || (ch == 'û') || (ch == 'À') || (ch == 'à')) {*/\n if ( ( (ch >= '\\u03b1') && (ch <= '\\u03c9')) || ( (ch >= '\\u0391') && (ch <= '\\u03a9')) ||\n \t(ch == '\\u03ac') || (ch == '\\u03ad') || (ch == '\\u03ae') || (ch == '\\u03af') ||\n \t(ch == '\\u03cc') || (ch == '\\u03cd') || (ch == '\\u03ce') ||\n \t(ch == '\\u0386') || (ch == '\\u0388') || (ch == '\\u0389') || (ch == '\\u038a') ||\n \t(ch == '\\u038c') || (ch == '\\u038e') || (ch == '\\u038f') ||\n \t(ch == '\\u03ca') || (ch == '\\u03cb') || (ch == '\\u0390') || (ch == '\\u03b0')) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"private String decideLetter(Cell c) {\n String s = \"\";\n if (!c.getHasBoat() && !c.getShotAt()) {\n s = \"-\";\n } else if (!c.getHasBoat() && c.getShotAt()) {\n s = \"M\";\n } else if (c.getHasBoat() && !c.getShotAt()) {\n s = \"B\";\n } else {\n s = \"H\";\n }\n return s;\n }",
"public static boolean isAlphanumeric(String field) {\r\n\t\tif (isEmpty(field))\r\n\t\t\treturn true;\r\n\t\tif (field.trim().matches(\"[A-Za-z0-9\\\\&\\\\'\\\\.\\\\,\\\\-\\\\ _]{0,1024}\")) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static String randAlnumSym(){\n int n;\n String result = null;\n switch (CAPS){\n case 0:\n n = rand.nextInt(94);\n if (n>83){\n result = String.valueOf(n-84);\n }else {\n result = String.valueOf(KEYBOARD.charAt(rand.nextInt(84))); //both\n }\n break;\n case 1:\n n = rand.nextInt(68);\n if (n>57){\n result = String.valueOf(n-58);\n }else if (n > 25){\n result = randSym();\n }else {\n result = randLower();\n }\n break;\n case 2:\n n = rand.nextInt(68);\n if (n>57){\n result = String.valueOf(n-58);\n }else if (n > 25){\n result = randSym();\n }else {\n result = randUpper();\n }\n break;\n }\n return result;\n }",
"public static boolean isAlphaNumericName(final String name)\n\t{\n\t\treturn ONLY_ALPHA_NUMERIC_PATTERN.matcher(name).matches();\n\t}",
"@Test\n\tpublic void caseNameWithSpecialChar() {\n\t\tString caseName = \"le@d\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}",
"private boolean isAlphaNumeric(char toCheck) {\n return isAlpha(toCheck) || isDigit(toCheck);\n }",
"public static boolean isLetter(char c) {\r\n\r\n\t\tif ((c >= 65 && c <= 95) || (c >= 97 && c <= 122)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"private String extractLetters(String courseCode) {\n CharMatcher matcher = CharMatcher.javaDigit();\n String StringOnly = matcher.removeFrom(courseCode);\n return StringOnly;\n }",
"public String firstAlphabeticalTitlePseudoLetter(String title){\n\t\t int first = 0;\n if ( title.toLowerCase().startsWith(\"the\") && !title.toLowerCase().startsWith(\"the \") ) { first = 3; }\n\t\t return title.substring(first, (first + 1));\n\t }",
"public boolean validateName(String input)//true if valid\n\t{\n\t\t//loop through string verifying for numbers\n\t\tfor(int i = 0;i<input.length(); i++)\n\t\t{\n\t\t\tchar c = input.charAt(i);\n\t\t\t\n\t\t\tif(!Character.isAlphabetic(c))\n\t\t\t{\n\t\t\t if(c == '-' || c == ' ')\n\t\t\t\t{\n\t\t\t\treturn true;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t else return false;\n\t\t\t}\t\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"@Test //TEST ONE\n void testCapital1stLetterBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"AmericanFuzzyLop\"); //American Fuzzy Lop, very cute!\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }",
"public static String removeNonAlphaNumericCharacters(final String name)\n\t{\n\t\treturn RegExUtils.removePattern(name, NON_ALPHA_NUMERIC_CHARACTER_REGEX);\n\t}"
] | [
"0.7015602",
"0.68965185",
"0.6846075",
"0.6732707",
"0.664767",
"0.65693676",
"0.6559324",
"0.65565586",
"0.641297",
"0.6390587",
"0.63780284",
"0.6358879",
"0.6338628",
"0.6297872",
"0.6200607",
"0.6180706",
"0.61751413",
"0.61541617",
"0.61484015",
"0.61482805",
"0.61088765",
"0.60929215",
"0.6085619",
"0.60845536",
"0.6077257",
"0.60754174",
"0.60742044",
"0.6069309",
"0.60645807",
"0.6047226",
"0.6045406",
"0.60403776",
"0.6010664",
"0.6003663",
"0.5993572",
"0.59791124",
"0.59770274",
"0.59715897",
"0.59660965",
"0.59651315",
"0.5941783",
"0.5931873",
"0.5929194",
"0.592789",
"0.5921659",
"0.59207654",
"0.59207517",
"0.5894466",
"0.5892577",
"0.5877796",
"0.5875382",
"0.58674055",
"0.58664465",
"0.5858079",
"0.58510077",
"0.5850841",
"0.5850841",
"0.5850841",
"0.58482414",
"0.58478016",
"0.5847137",
"0.583645",
"0.58207196",
"0.5817228",
"0.5813806",
"0.580444",
"0.57958686",
"0.5795607",
"0.57951903",
"0.5789191",
"0.5770585",
"0.5767774",
"0.57655567",
"0.5764169",
"0.57627064",
"0.575628",
"0.5751349",
"0.57406205",
"0.5723144",
"0.57156646",
"0.5713814",
"0.5710687",
"0.57034427",
"0.56929314",
"0.56819534",
"0.5681395",
"0.56799537",
"0.5675457",
"0.5671856",
"0.56677455",
"0.56661415",
"0.5663167",
"0.56623876",
"0.5659042",
"0.5656077",
"0.56557477",
"0.5611543",
"0.560229",
"0.5599591",
"0.55934125"
] | 0.7958903 | 0 |
alphas = alpha = (alpha alphas)? | private boolean alphas() {
return OPT(GO() && alpha() && alphas());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void alpha(int alpha);",
"abstract public boolean alphaConversion();",
"public void setAlpha(double aAlpha);",
"public void setAlpha(int alpha)\n {\n \tthis.alpha=alpha; \n }",
"public abstract void alphaConversion(Variable x, Variable y);",
"public void setAlpha(double alpha);",
"void setAlpha(double alpha) {\n this.alpha = alpha;\n }",
"public double getAlpha();",
"public double getAlpha();",
"float getAlpha();",
"public final void mALPHA() throws RecognitionException {\n try {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2908:2: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '\\\\u00C0' .. '\\\\u00D6' | '\\\\u00D8' .. '\\\\u00F6' | '\\\\u00F8' .. '\\\\u00FF' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\\u00C0' && input.LA(1)<='\\u00D6')||(input.LA(1)>='\\u00D8' && input.LA(1)<='\\u00F6')||(input.LA(1)>='\\u00F8' && input.LA(1)<='\\u00FF') ) {\n input.consume();\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }",
"@Override\n\t\t\tpublic void setAlpha(int alpha) {\n\t\t\t\t\n\t\t\t}",
"public void resetAlphaValues();",
"@Override\n\tpublic void setAlpha(int alpha) {\n\n\t}",
"public static void setAlpha(double alp)\n\t{\n\t\talpha = alp;\t\n\t}",
"public AlphaTable<S, O> getAlpha() {\n return alpha;\n }",
"public boolean hasAlpha() {\n return true;\n }",
"public float getAlpha();",
"public float getAlpha();",
"T setStartAlpha(Double startAlpha);",
"@Override\n public int getAlpha() {\n return mAlpha;\n }",
"public double getAlpha()\n {\n return alpha;\n }",
"private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }",
"public double getAlpha() {\n return alpha;\n }",
"public void setAlpha(float alpha) {\n\t\tthis.alpha = alpha;\n\t}",
"public void setAlpha(float alpha);",
"public static double getAlpha()\n\t{\n\t\treturn alpha;\n\t}",
"public float getAlpha() {\n \t\treturn alpha;\n\t}",
"public final void mALPHA() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:445:15: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public void setEncodingAlpha(boolean encodeAlpha);",
"double getAlpha() {\n return alpha;\n }",
"public final double getAlpha() {\n\t\treturn alpha;\n\t}",
"public AlphaInitializer(final float pAlpha) {\n\t\tsuper(pAlpha, pAlpha);\n\t}",
"public void setAlpha(double newAlpha) {\n\t\talpha = newAlpha;\n\t}",
"public int getAlpha()\n {\n return getColor().alpha();\n }",
"public void setAlphaFactor(double a) {\r\n\t\t_alphaFactor = a;\r\n\t}",
"private static boolean isAlpha(byte b)\r\n\t{\r\n\t\treturn (b >= 'a' && b <= 'z') || \r\n\t\t\t (b >= 'A' && b <= 'Z');\r\n\t}",
"public int getAlpha() {\r\n return this.alpha = getInstanceOf(int.class, this.alpha);\r\n }",
"public void setSuppressAlpha(boolean suppressAlpha) {\n/* 106 */ this.suppressAlpha = suppressAlpha;\n/* */ }",
"public boolean isEncodingAlpha();",
"@SuppressWarnings(\"unchecked\")\n public AnimatorType alpha(int alpha)\n {\n addTransformer(new AlphaTransformer(getShape(), alpha));\n return (AnimatorType) this;\n }",
"private double computeSumAlpha()\n\t{\n\t\tdouble sum = 0;\n\t\tdouble[] a = svm.getAlphas();\n\t\tfor(double d : a)\n\t\t\tsum += Math.abs(d);\n\t\treturn sum;\n\t}",
"public void writeNewAlpha(){\n\t\tFileSystemHandler.writeVector(Parameters.pathToAlphas, this.newAlpha);\n\t}",
"public double getAlpha()\n\t{\n\t\treturn Math.toRadians(alpha);\n\t}",
"protected void calcAlpha(Sequence seq)\n {\n int T = seq.length();\n int nStates = getNumStates();\n alpha = Library.allocMatrixDouble(T, nStates, Library.LOG_ZERO);\n calcB(seq);\n\n // we can start anywhere, according to the prior probs\n for(int i = 0; i < nStates; i++)\n alpha[0][i] = piStart[i] + bmat[i][0];\n\n // fill in the alpha matrix\n for(int t = 1; t < T; t++){\n // calc j -> i\n for(int i = 0; i < nStates; i++){\n for(int j = 0; j < nStates; j++)\n alpha[t][i] = Library.logadd(alpha[t][i], alpha[t - 1][j] + tran[j][i]);\n alpha[t][i] += bmat[i][t];\n }\n }\n }",
"public static Vector4 alpha()\n {\n return new Vector4(0,0,0,1);\n }",
"private float calculateAlpha() {\n float alpha = 1.2f*(myCamera.getViewportWidth()/(2*Const.WORLD_WIDTH-myCamera.getViewportWidth()))-0.2f;\n if(alpha < 0) alpha = 0;\n if(alpha > 1) alpha = 1;\n return alpha;\n }",
"public void setWallsAlpha(float wallsAlpha) {\n if (wallsAlpha != this.wallsAlpha) {\n float oldWallsAlpha = this.wallsAlpha;\n this.wallsAlpha = wallsAlpha;\n this.propertyChangeSupport.firePropertyChange(Property.WALLS_ALPHA.name(), oldWallsAlpha, wallsAlpha);\n }\n }",
"@Override\n public void setAlpha(int alpha) {\n if (alpha != mAlpha) {\n mAlpha = alpha;\n invalidateSelf();\n }\n }",
"public void backProp(List<Integer> context, Integer nextWord, double alpha){\n\t\t// TODO: implement backpropagation\n\t}",
"public short getAlpha(final int aX, final int aY)\r\n\t{\r\n\t\treturn mAlphas[aX][aY];\r\n\t}",
"public void setSymbolAlpha(int alpha) {\n symbol.setAlpha(alpha);\n }",
"public float getStartAlpha() {\n return startAlpha;\n }",
"private AlphaComposite makeTransparent(float alpha){\n return(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha));\n }",
"void setOnePathNAlpha(float[] a, float[] b, float[] c, float[] d, int index) {\n // calculate and set the alpha of p\n alphas[index] = areaOf(a, b, c, d);\n Path path = faces[index];\n path.reset();\n front[index] = isFacingOut(a, b,c,d);\n if (!front[index]) {\n alphas[index] = Math.min(255, alphas[index] + 10);\n } else {\n alphas[index] = Math.max(0, alphas[index] - 10);\n }\n path.moveTo(a[0], a[1]);\n path.lineTo(b[0], b[1]);\n path.lineTo(c[0], c[1]);\n path.lineTo(d[0], d[1]);\n path.lineTo(a[0], a[1]);\n path.close();\n }",
"public void setNewAlpha(){\n\n\t\tretrieveAlpha();\n\t\tretrieveReducerOutput();\n\t\t\n\t\tdouble[] alphaVectorUpdate = new double[K];\n\t\tdouble[] alphaGradientVector = new double[K];\n\t\tdouble[] alphaHessianVector = new double[K];\n\n\t\tdouble[] alphaVector = oldAlpha.clone();\n\t\tdouble[] alphaSufficientStatistics = rDelta;\n\n\t\tint alphaUpdateIterationCount = 0;\n\n\t\t// update the alpha vector until converge\n\t\tboolean keepGoing = true;\n\t\ttry {\n\t\t\tint decay = 0;\n\n\t\t\tdouble alphaSum = 0;\n\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\talphaSum += alphaVector[j];\n\t\t\t}\n\n\t\t\twhile (keepGoing) {\n\t\t\t\tdouble sumG_H = 0;\n\t\t\t\tdouble sum1_H = 0;\n\n\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t// compute alphaGradient\n\t\t\t\t\talphaGradientVector[i] = D\n\t\t\t\t\t\t\t* (Gamma.digamma(alphaSum) - Gamma.digamma(alphaVector[i]))\n\t\t\t\t\t\t\t+ alphaSufficientStatistics[i];\n\n\t\t\t\t\t// compute alphaHessian\n\t\t\t\t\talphaHessianVector[i] = -D * Gamma.trigamma(alphaVector[i]);\n\n\t\t\t\t\tif (alphaGradientVector[i] == Double.POSITIVE_INFINITY\n\t\t\t\t\t\t\t|| alphaGradientVector[i] == Double.NEGATIVE_INFINITY) {\n\t\t\t\t\t\tthrow new ArithmeticException(\"Invalid ALPHA gradient matrix...\");\n\t\t\t\t\t}\n\n\t\t\t\t\tsumG_H += alphaGradientVector[i] / alphaHessianVector[i];\n\t\t\t\t\tsum1_H += 1 / alphaHessianVector[i];\n\t\t\t\t}\n\n\t\t\t\tdouble z = D * Gamma.trigamma(alphaSum);\n\t\t\t\tdouble c = sumG_H / (1 / z + sum1_H);\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tboolean singularHessian = false;\n\n\t\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t\tdouble stepSize = Math.pow(Parameters.DEFAULT_ALPHA_UPDATE_DECAY_FACTOR, decay)\n\t\t\t\t\t\t\t\t* (alphaGradientVector[i] - c) / alphaHessianVector[i];\n\t\t\t\t\t\tif (alphaVector[i] <= stepSize) {\n\t\t\t\t\t\t\t// the current hessian matrix is singular\n\t\t\t\t\t\t\tsingularHessian = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\talphaVectorUpdate[i] = alphaVector[i] - stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (singularHessian) {\n\t\t\t\t\t\t// we need to further reduce the step size\n\t\t\t\t\t\tdecay++;\n\n\t\t\t\t\t\t// recover the old alpha vector\n\t\t\t\t\t\talphaVectorUpdate = alphaVector;\n\t\t\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we have successfully update the alpha vector\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// compute the alpha sum and check for alpha converge\n\t\t\t\talphaSum = 0;\n\t\t\t\tkeepGoing = false;\n\t\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\t\talphaSum += alphaVectorUpdate[j];\n\t\t\t\t\tif (Math.abs((alphaVectorUpdate[j] - alphaVector[j]) / alphaVector[j]) >= Parameters.DEFAULT_ALPHA_UPDATE_CONVERGE_THRESHOLD) {\n\t\t\t\t\t\tkeepGoing = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (alphaUpdateIterationCount >= Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_ITERATION) {\n\t\t\t\t\tkeepGoing = false;\n\t\t\t\t}\n\n\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\talphaUpdateIterationCount++;\n\t\t\t\talphaVector = alphaVectorUpdate;\n\t\t\t}\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\tSystem.err.println(iae.getMessage());\n\t\t\tiae.printStackTrace();\n\t\t} catch (ArithmeticException ae) {\n\t\t\tSystem.err.println(ae.getMessage());\n\t\t\tae.printStackTrace();\n\t\t}\n\n\t\tnewAlpha = alphaVector;\n\n\n\t}",
"public void saveLayerAlpha(int sx, int sy, int i, int j, int multipliedAlpha) {\n\t\t\n\t}",
"private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}",
"protected int getShadeAlpha() {\n int a = currAlpha - 80;\n if (a < 0)\n a = 0;\n return a;\n }",
"int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }",
"@Override\n\tpublic void computeAlpha() {\n\t\t//Allocate memory for the alphas array\n\t\talpha = new double[training[0].length-1];\n\t\t\n\t\t//Checks every feature\n\t\tfor(int i = 0; i < training[0].length-1; i++) {\n\t\t\t//Sets the position of the array corresponding to itself to NaN and continues the loop\n\t\t\tif(i == node_id) {\n\t\t\t\talpha[i] = Double.NaN;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Allocate memory to keep track of the counts\n\t\t\tint[][][] Nijkc = new int[max_values[i]+1][max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nikc = new int[max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nijc = new int[max_values[i]+1][max_values[max_values.length-1]+1];\n\t\t\tint[] Nc = new int[max_values[max_values.length-1]+1];\n\t\t\tint N = training.length;\n\t\t\t\n\t\t\t//Counts the patterns found on the training dataset\n\t\t\tfor(int n = 0; n < training.length; n++) {\n\t\t\t\tNijkc[training[n][i]][training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNikc[training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNijc[training[n][i]][training[n][training[n].length-1]]++;\n\t\t\t\tNc[training[n][training[n].length-1]]++;\n\t\t\t}\n\t\t\t\n\t\t\t//Computes the values of the alpha for a given node(self)->node(target) using the MDL score\n\t\t\tdouble total = 0;\n\t\t\tfor(int j = 0; j < max_values[i] + 1; j++) {\n\t\t\t\tfor(int k = 0; k < max_values[node_id] + 1; k++) {\n\t\t\t\t\tfor(int l = 0; l < max_values[max_values.length-1] + 1; l++) {\n\t\t\t\t\t\tif(Nijkc[j][k][l] == 0 || Nikc[k][l] == 0 || Nijc[j][l] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\ttotal += ((double)Nijkc[j][k][l] / (double)N) * (Math.log(((double)Nijkc[j][k][l]*(double)Nc[l])/((double)Nikc[k][l]*(double)Nijc[j][l])) / Math.log(2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttotal = total - ((((max_values[max_values.length-1]+1)*max_values[node_id]*max_values[i])/(2))*Math.log(N));\n\t\t\t\n\t\t\t//Attribution of the value to the corresponding position on the array\n\t\t\talpha[i] = total;\n\t\t}\n\t\t\n\t\t//System.out.println(Arrays.toString(alpha));\n\t}",
"public void setAlpha(int newAlpha)\n {\n setColor(getColor().withAlpha(newAlpha));\n }",
"public void setAlpha(int a)\n { \n alpha = (float) a / 100.0F;\n repaint();\n }",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}",
"public void setImageAlpha(int imageAlpha) {\n\t\tthis.imageAlpha = imageAlpha;\n\t}",
"@Override\n public INDArray ger(float alpha, INDArray x,\n INDArray y, INDArray a) {\n NativeBlas.sger(a.rows(), a.columns(), alpha, x.data(), 0, 1, y.data(), 0, 1, a.data(),\n 0, a.rows());\n return a;\n }",
"private int adjustAlpha( int color, float alphaArg ) {\n \t\tint alpha = Math.round( alphaArg );\n \t\tint red = Color.red( color );\n \t\tint green = Color.green( color );\n \t\tint blue = Color.blue( color );\n \t\treturn Color.argb( alpha, red, green, blue );\n \t}",
"public void SetLearnRate (double alpha) { this.alpha = alpha; }",
"public void setAmbientAlpha(float alpha) {\n\t\tambientColor.a = alpha;\n\t\trayHandler.setAmbientLight(ambientColor);\n\t}",
"public final void mSNAME() throws RecognitionException {\n try {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2919:2: ( ( ALPHA ) ( ALPHA | DIGIT )* )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2919:4: ( ALPHA ) ( ALPHA | DIGIT )*\n {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2919:4: ( ALPHA )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2919:5: ALPHA\n {\n mALPHA(); if (state.failed) return ;\n\n }\n\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2919:12: ( ALPHA | DIGIT )*\n loop4:\n do {\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( ((LA4_0>='0' && LA4_0<='9')||(LA4_0>='A' && LA4_0<='Z')||LA4_0=='_'||(LA4_0>='a' && LA4_0<='z')||(LA4_0>='\\u00C0' && LA4_0<='\\u00D6')||(LA4_0>='\\u00D8' && LA4_0<='\\u00F6')||(LA4_0>='\\u00F8' && LA4_0<='\\u00FF')) ) {\n alt4=1;\n }\n\n\n switch (alt4) {\n \tcase 1 :\n \t // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:\n \t {\n \t if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\\u00C0' && input.LA(1)<='\\u00D6')||(input.LA(1)>='\\u00D8' && input.LA(1)<='\\u00F6')||(input.LA(1)>='\\u00F8' && input.LA(1)<='\\u00FF') ) {\n \t input.consume();\n \t state.failed=false;\n \t }\n \t else {\n \t if (state.backtracking>0) {state.failed=true; return ;}\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop4;\n }\n } while (true);\n\n\n }\n\n }\n finally {\n }\n }",
"public static Color alphaBlend(Color o, int a){\n\t\treturn new Color(o.getRed(), o.getGreen(), o.getBlue(), a);\n\t}",
"public String makeAbba(String aText, String bText) {\r\n return aText + bText + bText + aText;\r\n }",
"public static boolean expandAllAlphas(Tableau tableau) {\n Collection alphas = tableau.getAlphas();\n boolean retVal = false;\n while (!alphas.isEmpty() && !Thread.currentThread().isInterrupted()) {\n Iterator it = ((Collection) ((ArrayList) alphas).clone()).iterator();\n while (it.hasNext()) {\n retVal = true;\n AlphaFormula alpha = (AlphaFormula) it.next();\n alpha.expand();\n }\n }\n return retVal;\n }",
"private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }",
"public int getPaintAlpha(){\n return Math.round((float)paintAlpha/255*100);\n }",
"public static double track2math(double alpha) {\n return Math.PI/2 - alpha;\n }",
"Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }",
"public void setAlphaF(float p_82338_1_) {\n/* 102 */ if (this.particleAlpha == 1.0F && p_82338_1_ < 1.0F) {\n/* */ \n/* 104 */ (Minecraft.getMinecraft()).effectRenderer.func_178928_b(this);\n/* */ }\n/* 106 */ else if (this.particleAlpha < 1.0F && p_82338_1_ == 1.0F) {\n/* */ \n/* 108 */ (Minecraft.getMinecraft()).effectRenderer.func_178931_c(this);\n/* */ } \n/* */ \n/* 111 */ this.particleAlpha = p_82338_1_;\n/* */ }",
"int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }",
"@Override\n public IComplexNDArray gerc(IComplexNumber alpha, IComplexNDArray x,\n IComplexNDArray y, IComplexNDArray a) {\n NativeBlas.cgerc(a.rows(), a.columns(), (ComplexFloat) alpha, x.data(), x.offset(), 1, y.data(), y.offset(), 1, a.data(),\n a.offset(), a.rows());\n return a;\n }",
"public void setOldImageAlpha(int oldImageAlpha) {\n\t\tthis.oldImageAlpha = oldImageAlpha;\n\t}",
"public int getAlphaInfoValue() {\n return alphaInfo_;\n }",
"public float getAlpha() {\n if (this.isConnectedToGame)\n return 1.0f;\n else\n return 0.5f;\n }",
"public boolean testAlphaBlending(Picture result)\n {\n //loop through all pixels in the calling object and parameter \n //picture using nested loops on x and y\n for(int x=0; x<result.getWidth();x++){\n for(int y=0; y<result.getHeight();y++){\n Pixel sP = this.getPixel(x, y);\n Pixel tP = result.getPixel(x, y);\n if( sP.getRed() != tP.getRed())\n return false;\n }\n }\n //Similarly for blue and green. \n //outside the nested loop, we return true as if we reach here\n //it is guaranteed that all pixels between the calling obj and\n //the parameter picture are the same.\n \n return true;\n }",
"public void setBeta(double aBeta);",
"public static int setAlpha(int color, int alpha) {\n return (color & 0x00FFFFFF) | (alpha << 24);\n }",
"public float getWallsAlpha() {\n return this.wallsAlpha;\n }",
"private ArrayList[] blxAlpha(ArrayList[] madre, ArrayList[] padre, Random al)\n\t{\n\t\tint numAtributos = madre.length;\n\t\tdouble max = 0;\n\t\tdouble min = 0;\n\t\tdouble I = 0;\n\t\tArrayList[] hijo = new ArrayList[numAtributos];\n\t\t\n\t\t\n\t\tfor (int i = 0; i < numAtributos; i++)\t\t//Para cada atributo\n\t\t{\n\t\t\thijo[i] = new ArrayList();\n\t\t\t\n\t\t\t// El primer y el último valor de cada atributo no cambia\n\t\t\thijo[i].add(madre[i].get(0));\n\t\t\t\n\t\t\tint numParticiones = madre[i].size();\n\t\t\t\n\t\t\tfor (int j = 1; j < numParticiones-1;j++)\n\t\t\t{\n\t\t\t\tif ((Double)(madre[i].get(j)) < (Double)(padre[i].get(j)))\n\t\t\t\t{\t\n\t\t\t\t\tmax = (Double)(padre[i].get(j));\n\t\t\t\t\tmin = (Double)(madre[i].get(j));\n\t\t\t\t}\n\t\t\t\telse\t\t\t\t\t\t\t//Si el gen de la madre es mayor\n\t\t\t\t{\n\t\t\t\t\tmin = (Double)(padre[i].get(j));\n\t\t\t\t\tmax = (Double)(madre[i].get(j));\n\t\t\t\t}\t\t\t\t\t \n\t\t\t\tI = max - min;\t//Obtenemos la diferencia\n\t\t\t\tmin = min - I * 0.15;\t//Calculamos el extremo inferior\n\t\t\t\tmax = max + I * 0.15;\t//Calculamos el extremo superior\n\t\t\t\thijo[i].add(min + al.nextDouble() * (max - min));\t//Calculamos un punto aleatorio dentro del intervalo\n\t\t\t}\n\t\t\t\n\t\t\t// El primer y el último valor de cada atributo no cambia\n\t\t\thijo[i].add(madre[i].get(numParticiones-1));\n\t\t}\n\t\t\n\t\t// Validación del individuo\n\t\t\n\t\t// Ponemos a mínimo los valores menores que el mínimo y al máximo los valores menores que el máximo\n\t\tfor(int i=0;i < numAtributos; i++)\n\t\t{\n\t\t\tint numParticiones = hijo[i].size();\n\t\t\t\n\t\t\tmin = ((Double)(hijo[i].get(0)));\n\t\t\tmax = ((Double)(hijo[i].get(numParticiones-1)));\n\t\t\t\n\t\t\tfor (int j = 1; j < numParticiones-1;j++)\n\t\t\t{\n\t\t\t\tif(((Double)(hijo[i].get(j))) < min)\n\t\t\t\t{\n\t\t\t\t\thijo[i].add(j, min);\n\t\t\t\t}\n\t\t\t\telse if((((Double)(hijo[i].get(j))) > max))\n\t\t\t\t{\n\t\t\t\t\thijo[i].add(j, max);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Ordenamos los valores de menor a mayor\n\t\tfor(int i=0;i < numAtributos; i++)\n\t\t{\n\t\t\tint numParticiones = hijo[i].size();\n\t\t\t\n\t\t\tfor (int j = 1; j < numParticiones-2;j++)\n\t\t\t{\n\t\t\t\tfor(int k = 1; k < numParticiones-2; k++)\n\t\t\t\t{\n\t\t\t\t\tdouble temp = ((Double)(hijo[i].get(k)));\n\t\t\t\t\tdouble compara = ((Double)(hijo[i].get(k+1)));\n\t\t\t\t\t\n\t\t\t\t\tif(temp > compara)\n\t\t\t\t\t{\n\t\t\t\t\t\thijo[i].remove(k);\n\t\t\t\t\t\thijo[i].add(k, compara);\n\t\t\t\t\t\thijo[i].remove(k+1);\n\t\t\t\t\t\thijo[i].add(k+1, temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn hijo;\t\n\t}",
"@Field(1) \n\tpublic ValuedEnum<D2D1_ALPHA_MODE> alphaMode() {\n\t\treturn this.io.getEnumField(this, 1);\n\t}",
"public static String alphaKey(int value) {\n if (value < 1) {\n return \"a\";\n }\n if (value < 10) {\n return \"b\" + value;\n }\n if (value < 100) {\n return \"c\" + value;\n }\n if (value < 1000) {\n return \"d\" + value;\n }\n if (value < 10000) {\n return \"e\" + value;\n }\n if (value < 100000) {\n return \"f\" + value;\n }\n if (value < 1000000) {\n return \"g\" + value;\n }\n if (value < 10000000) {\n return \"h\" + value;\n }\n if (value < 100000000) {\n return \"i\" + value;\n }\n if (value < 1000000000) {\n return \"j\" + value;\n }\n return \"k\" + value;\n }",
"protected void fading(float alpha) { }",
"private void setAlphaInfo(com.whensunset.wsvideoeditorsdk.model.YuvAlphaType value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n alphaInfo_ = value.getNumber();\n }",
"protected Color createColor(int red, int green, int blue, int alpha) {\n if ((red <= 1) && (green <= 1) && (blue <= 1) && ((alpha <= 1) || (alpha == 255))) {\n // rgba either 0 or 1\n Color c = new Color((float)red, (float)green, (float)blue, (alpha == 255) ? 1.0f : (float)alpha);\n// System.out.println(c);\n return c;\n }\n return super.createColor(red, green, blue, alpha);\n }",
"public void normalize(float alpha, int x1, int y1, int x2, int y2) {\n if (this.offset != null) {\n for (int i = x2 - x1; y1 < y2; ++y1) {\n int offset = y1 * this.W + x1;\n\n for (int j = 0; j < i; ++j) {\n int color = this.offset[offset];\n this.offset[offset] = (int) ((float) (color >>> 24) * alpha) << 24 | color & 0xFFFFFF;\n ++offset;\n }\n }\n\n }\n }",
"public static void mixWithAlpha(LedColor[] outputColors, LedColor[] inputColors, LedAlphaMode alphamode,\r\n\t\t\tfloat fraction) {\r\n\t\tfor (int i = 0; i < outputColors.length; i++) {\r\n\t\t\toutputColors[i].mixWithAlpha(inputColors[i], alphamode, fraction);\r\n\t\t}\r\n\t}",
"private SimpleEntry<Integer, String> alphabeta(\n String boardString, int depth, int alpha, int beta, boolean isBlackTurn) {\n if (depth == 0 || gameHasEnded(boardString) != null) {\n return new SimpleEntry<Integer, String>(heuristicValue(boardString), boardString);\n }\n\n ArrayList<String> possibleBoards = getPossibleMoves(boardString);\n String bestBoard = \"\";\n if (isBlackTurn) { // maximize\n for (String newBoard : possibleBoards) {\n int newAlpha = alphabeta(newBoard, depth - 1, alpha, beta, false).getKey();\n if (alpha < newAlpha) {\n alpha = newAlpha;\n bestBoard = newBoard;\n }\n if (beta <= alpha) break; // prune\n }\n return new SimpleEntry<>(alpha, bestBoard);\n } else { // minimize\n for (String newBoard : possibleBoards) {\n int newBeta = alphabeta(newBoard, depth - 1, alpha, beta, true).getKey();\n if (beta > newBeta) {\n beta = newBeta;\n bestBoard = newBoard;\n }\n if (beta <= alpha) break; // prune\n }\n return new SimpleEntry<>(beta, bestBoard);\n }\n }",
"public CXformWithAlpha getColorTransform() {\n return colorTransform;\n }",
"private void setAlphaInfoValue(int value) {\n alphaInfo_ = value;\n }",
"public boolean getExpandGrayAlpha() {\n/* 296 */ return this.expandGrayAlpha;\n/* */ }",
"public void setForegroundTranslucence(float alpha) {\n\t\tthis.fgAC = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);\n\t}"
] | [
"0.7137953",
"0.6769133",
"0.6553188",
"0.65468127",
"0.6512816",
"0.65060467",
"0.6469839",
"0.643061",
"0.643061",
"0.6346418",
"0.627455",
"0.615537",
"0.6153923",
"0.61459947",
"0.6143917",
"0.61329365",
"0.6119224",
"0.61038744",
"0.61038744",
"0.6061157",
"0.6049676",
"0.6044841",
"0.60443777",
"0.6032902",
"0.5985662",
"0.5965334",
"0.5940517",
"0.59111",
"0.5886757",
"0.58832395",
"0.58707106",
"0.58592665",
"0.58385825",
"0.583367",
"0.5798362",
"0.5765295",
"0.5765061",
"0.57515234",
"0.57162046",
"0.5691887",
"0.56459534",
"0.56448853",
"0.5599699",
"0.55815005",
"0.55139095",
"0.549549",
"0.53853434",
"0.5381327",
"0.53765",
"0.5374568",
"0.5372915",
"0.5363728",
"0.53130656",
"0.52930903",
"0.5283509",
"0.5277201",
"0.5245862",
"0.52285904",
"0.5209112",
"0.52067477",
"0.5193663",
"0.5172397",
"0.5150619",
"0.5122608",
"0.51004595",
"0.505896",
"0.5024699",
"0.5018362",
"0.5013753",
"0.5002047",
"0.49967495",
"0.49834752",
"0.4982829",
"0.49647388",
"0.49637872",
"0.4961735",
"0.49614087",
"0.49588615",
"0.49457544",
"0.49409592",
"0.49396873",
"0.493363",
"0.4928288",
"0.49078912",
"0.48910323",
"0.48892316",
"0.48846963",
"0.48695982",
"0.4865779",
"0.48626736",
"0.48500776",
"0.48483664",
"0.48344436",
"0.4831283",
"0.48295754",
"0.48219123",
"0.48202145",
"0.48156416",
"0.48135576",
"0.48098907"
] | 0.75294924 | 0 |
letter = Lu / Ll / Lt / Lm / Lo | private boolean letter() {
return CATS(Lu, Ll, Lt, Lm, Lo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private char hallarLetra() {\r\n\t\tchar[] letra= {'T','R','W','A','G','M','Y','F','P','D','X',\r\n\t\t\t\t\t'B','N','J','Z','S','Q','V','H','L','C','K','E'};\r\n\t\treturn letra[numeroDNI%23];\r\n\t}",
"String getWordIn(String schar, String echar);",
"public char getLetter(){\r\n\t\treturn letter;\r\n\t}",
"public char crypt(char letter){\n\n char l = conns[alphabet.indexOf(letter)];\n\n return l;\n }",
"public char getLetter()\n {\n \treturn letter;\n }",
"public int letter2index(char c) { \t\n \treturn (int)(c - 'A')%26 ;\n }",
"public char getLetter() {\n return letter;\n }",
"char getContactLetter(ContactSortOrder sortOrder);",
"char getContactLetter();",
"public char getLetter()\n\t{\n\t\treturn letter;\n\t}",
"public static Boolean Letter(String arg){\n\t\tif(arg.matches(\"\\\\p{L}{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public char getLetter() {\r\n\t\treturn letter;\r\n\t}",
"char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}",
"Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }",
"String getRune_lit();",
"public char getLetter() {\r\n\t\t\treturn letter;\r\n\t\t}",
"private String decideLetter(Cell c) {\n String s = \"\";\n if (!c.getHasBoat() && !c.getShotAt()) {\n s = \"-\";\n } else if (!c.getHasBoat() && c.getShotAt()) {\n s = \"M\";\n } else if (c.getHasBoat() && !c.getShotAt()) {\n s = \"B\";\n } else {\n s = \"H\";\n }\n return s;\n }",
"static int letterIslands(String s, int k) {\n /*\n * Write your code here.\n */\n\n }",
"private int getUseOfLetter(String word) {\n int result = 0;\n for (int i = 0; i < word.length(); i++) {\n result |= tables[word.charAt(i)];\n }\n return result;\n }",
"private static char changeLamAlef(char ch) {\n switch(ch) {\n case '\\u0622': return '\\u065C';\n case '\\u0623': return '\\u065D';\n case '\\u0625': return '\\u065E';\n case '\\u0627': return '\\u065F';\n default: return '\\u0000'; // not a lamalef\n }\n }",
"public static int lookup(char letter) {\n\t\tswitch (letter) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'R':\n\t\t\treturn 1;\n\t\tcase 'N':\n\t\t\treturn 2;\n\t\tcase 'D':\n\t\t\treturn 3;\n\t\tcase 'C':\n\t\t\treturn 4;\n\t\tcase 'Q':\n\t\t\treturn 5;\n\t\tcase 'E':\n\t\t\treturn 6;\n\t\tcase 'G':\n\t\t\treturn 7;\n\t\tcase 'H':\n\t\t\treturn 8;\n\t\tcase 'I':\n\t\t\treturn 9;\n\t\tcase 'L':\n\t\t\treturn 10;\n\t\tcase 'K':\n\t\t\treturn 11;\n\t\tcase 'M':\n\t\t\treturn 12;\n\t\tcase 'F':\n\t\t\treturn 13;\n\t\tcase 'P':\n\t\t\treturn 14;\n\t\tcase 'S':\n\t\t\treturn 15;\n\t\tcase 'T':\n\t\t\treturn 16;\n\t\tcase 'W':\n\t\t\treturn 17;\n\t\tcase 'Y':\n\t\t\treturn 18;\n\t\tcase 'V':\n\t\t\treturn 19;\n\t\tcase 'B':\n\t\t\treturn 20;\n\t\tcase 'Z':\n\t\t\treturn 21;\n\t\tcase 'X':\n\t\t\treturn 22;\n\t\tcase '*':\n\t\t\treturn 23;\n\t\tcase '|':\n\t\t\treturn 24;\n\t\tcase '.':\n\t\t\treturn 25;\n\n\t\tdefault:\n\t\t\treturn -1;\n\t\t}\n\n\t}",
"private static int alphabetPos(char l) {\n\t\tfor (int x = 0; x < ALPHABET.length; x++) {\n\t\t\tif (ALPHABET[x] == l) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public static void letra(){\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar letra;\n\t\tSystem.out.println(\"Introduzca una letra: \");\n\t\tletra=sc.next().charAt(0);\n\t\t\n\t\tswitch(letra){\n\t\t\tcase 'a': case 'A':\n\t\t\tcase 'e':case 'E':\n\t\t\tcase 'i':case'I':\n\t\t\tcase 'o': case'O':\n\t\t\tcase'u': case 'U':\n\t\t\t\tSystem.out.println(\"Es una vocal\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Es una consonante.\");\n\t\t}\n\t\t\n\t\t\n\t}",
"int lower();",
"protected char tryReduceChar(char letter) {\n int comp = (letter < 97) ? Character.toLowerCase(letter) : letter;\n return (Integer.compare(comp, 97) > 0) ? (char) (letter - 1) : letter;\n }",
"public static char getRandomLowerCaseLetter(){\n\t\treturn getRandomCharacter('a','z');\n\t}",
"public static char randomLetter(){\n\t\t//char A-Z\n\t\tint r1 = (int) (Math.random()*26+65);\n\n\t\t//char a-z\n\t\tint r2 = (int) (Math.random()*26+97);\n\n\t\t//choose one of the two\n\t\tif(Math.random() < 0.5)\n\t\t\treturn (char) r1;\n\t\treturn (char) r2;\n\t}",
"public void setLetter(char letter){\r\n\t\tthis.letter = letter;\r\n\t}",
"public String getLetter() {\n return letter;\n }",
"public static char getLetter(String s){\n //A variable used in the helper method\n int i = 0;\n return getLetter(codeTree, s, i);\n }",
"public char getUserGuess(){\n char letter = '\\u0000';\n if(mGuessEditText.getText().toString().toLowerCase().length() != 0)\n letter = mGuessEditText.getText().toString().toLowerCase().charAt(0);\n return letter;\n }",
"public char getLetterGrade() {\r\n\t\treturn letter;\r\n\t}",
"private static String convertToLatin(String word)\n {\n return word.substring(1) + word.substring(0,1) + \"ay\";\n }",
"public char getRepresentative_letter(){\n\t\treturn representative_letter;\n\t}",
"public void guessLetter()\n\t{\n\t\tSystem.out.println(\"The name is \" + length + \" letters long.\");\n\t\tSystem.out.println(\"Ok, now guess what letters are in the name.\");\n\t\t\n\t\t//This will guess the first letter.\n\t\tguessLetter1 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter1) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition1 = name.indexOf(guessLetter1);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter1 + \" is in position \" + position1);\n\t\t}\n\t\t\n\t\t//This will guess the second letter.\n\t\tguessLetter2 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter2) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition2 = name.indexOf(guessLetter2);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter2 + \" is in position \" + position2);\n\t\t}\n\t\t\n\t\t//This will guess the third letter.\n\t\tguessLetter3 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter3) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition3 = name.indexOf(guessLetter3);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter3 + \" is in position \" + position3);\n\t\t}\n\t}",
"public Letter getLetter(Character c) {\n return get(c);\n }",
"public boolean isUrgentLetter() {\n\t\treturn false;\n\t}",
"public static char generateLetter() {\n\t\t\n\t\treturn (char)((int)('A' + Math.random() * ('Z' - 'A' + 1)));\n\t}",
"public char test(char c) {\n\t\tchar[] lower = { '-', '+' };\n\t\tchar[] higher = { '*', '/' };\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (lower[i] == c) {\n\t\t\t\treturn 'l';\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tif (higher[i] == c) {\n\t\t\t\treturn 'h';\n\t\t\t}\n\t\t}\n\t\t// just to make the method work , no meaning for the 'n'\n\t\treturn 'n';\n\t}",
"private char getGuessLetter(Scanner sc) {\n\n\t\t// the array format of the input\n\t\tchar[] ch;\n\t\twhile (true) {\n\t\t\t// ask for the input\n\t\t\tSystem.out.println(\"Please enter one letter to guess:\");\n\t\t\tSystem.out.print(\">>>\");\n\t\t\t// reading the input\n\t\t\tString input = sc.nextLine();\n\t\t\tch = input.toCharArray();\n\t\t\t// if the input is a allowed letter\n\t\t\tif(ch.length == 1\n\t\t\t\t&&(dr.isAllowed(ch[0]) || Character.isUpperCase(ch[0]))) {\n\t\t\t\t// break the loop\n\t\t\t\tbreak;\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Please enter an allowed letter.\");\n\t\t\t}\n\t\t}\n\t\t//return the lower-cased version of the letter\n\t\treturn Character.toLowerCase(ch[0]);\n\t}",
"public char getGradeLetter() {\n\t\t\n\t\t// get the current overall grade\n\t\tdouble overallAverage = averages[OVERALL];\n\t\t\n\t\t// check its value and return the correct letter\n\t\tif (overallAverage < 60) \n\t\t\treturn 'F';\n\t\telse if (overallAverage < 70) \n\t\t\treturn 'D';\n\t\telse if (overallAverage < 80) \n\t\t\treturn 'C';\n\t\telse if (overallAverage < 90) \n\t\t\treturn 'B';\n\t\telse\n\t\t\treturn 'A';\n\t}",
"private static String makeLatinName(int len, Random r) {\n final String lc = \"abcdefghijklmnopqrstuvwxyz\";\n final String alphabet = lc + lc.toUpperCase();\n final String start = \"$_\" + alphabet;\n final String part = start + \"0123456789\";\n\n StringBuffer sb = new StringBuffer();\n sb.append(start.charAt(r.nextInt(start.length())));\n while (sb.length() < len)\n sb.append(part.charAt(r.nextInt(part.length())));\n return sb.toString();\n }",
"public void setLetter\n\t\t\t(char letter)\n\t\t\t{\n\t\t\tletters = letter == 'Q' ? \"QU\" : \"\"+letter;\n\t\t\tsetText (letters);\n\t\t\t}",
"private char getMappingCode(char c) {\n if (!Character.isLetter(c)) {\n return 0;\n } \n else {\n return soundexMapping[Character.toUpperCase(c) - 'A'];\n }\n }",
"public String indexToLetter(int index) {\r\n\t\tif (index == 0)\r\n\t\t\treturn \"a\";\r\n\t\telse if (index == 1)\r\n\t\t\treturn \"b\";\r\n\t\telse if (index == 2)\r\n\t\t\treturn \"c\";\r\n\t\telse if (index == 3)\r\n\t\t\treturn \"d\";\r\n\t\telse if (index == 4)\r\n\t\t\treturn \"e\";\r\n\t\telse if (index == 5)\r\n\t\t\treturn \"f\";\r\n\t\telse if (index == 6)\r\n\t\t\treturn \"g\";\r\n\t\telse if (index == 7)\r\n\t\t\treturn \"h\";\r\n\t\telse if (index == 8)\r\n\t\t\treturn \"i\";\r\n\t\telse if (index == 9)\r\n\t\t\treturn \"j\";\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public static void main(String[] args) {\n String word = \"Computer\";\r\n System.out.println(word.length());\r\nSystem.out.println(word.charAt(0));\r\nSystem.out.println(word.charAt(1));\r\nSystem.out.println(word.charAt(2));\r\nSystem.out.println(word.charAt(3));\r\nSystem.out.println(word.charAt(4));\r\nSystem.out.println(word.charAt(5));\r\nSystem.out.println(word.charAt(6));\r\nSystem.out.println(word.charAt(7));\r\n\r\n//\r\n\r\nString word2 = \"Java\";\r\n if(word2.charAt(0) == 'J');{\r\nSystem.out.println(\"J is first character\");\r\n} \r\n \r\n String word3 = \"civic\";\r\n char first = word3.charAt(0); // index always zero\r\n char last = word.charAt(4); \r\n\r\nif (first == last) {\r\n\tSystem.out.println(\"FIrst and last match\");\r\n} else {\r\n\tSystem.out.println(\" not match\");\r\n}\r\n// always print the last character no matter the length\r\n\r\nString word4 = \"abcdefghijklmnopqrstuvwxyz\";\r\n\r\nchar lastChar = word4.charAt(word4.length()-1);\r\n\r\nSystem.out.println(\"last character of the word \" + word4 + \" is \" + lastChar);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t}",
"public static char leerCaracter() { \n\t\tchar letra = sc.nextLine().charAt(0); // Lee una cadena y obtiene el primer caracter\n\t\treturn letra;\n\t}",
"public abstract char getStarterChar();",
"public static char letterGrade(Integer average)\n {\n switch (average / 10)\n {\n case 10: case 9:\n return 'A';\n case 8:\n return 'B';\n case 7:\n return 'C';\n case 6:\n return 'D';\n default:\n return 'F';\n }\n }",
"public void firstCharacter() {\n\t\tString name = \"martin\";\n\t\tchar letter = name.charAt(5);\n\t\tSystem.out.println(letter);\n\t}",
"private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }",
"public static String dtrmn(int number) {\n\t\t\n\t\tString letter = \"\";\n\t\t\n\t\tint cl = number / 100;\n\t\tif (cl != 9 && cl != 4) {\n\t\t\t\n\t\t\tif (cl < 4) {\n\t\t\t\t\n\t\t\t\tfor(int i = 1; i <= cl; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if (cl < 9 && cl > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"D\";\n\t\t\t\tfor (int i = 1; i <= cl - 5; i++) {\n\t\t\t\t\tletter = letter + \"C\";\n\t\t\t\t}\n\t\t\t} else if(cl == 10) { \n\t\t\t\t\n\t\t\t\tletter = letter + \"M\";\n\t\t\t}\n\t\t} else if (cl == 4) {\n\t\t\t\n\t\t\tletter = letter + \"CD\";\n\t\t\t\n\t\t} else if (cl == 9) {\n\t\t\t\n\t\t\tletter = letter + \"CM\";\n\t\t}\n\t\t\n\t\tint cl1 = (number % 100)/10;\n\t\tif (cl1 != 9 && cl1 != 4) {\n\t\t\t\n\t\t\tif (cl1 < 4) {\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t} else if (cl1 < 9 && cl1 > 4) {\n\t\t\t\tletter = letter + \"L\";\n\t\t\t\t\n\t\t\t\tfor (int i = 1; i <= cl1 -5; i++) {\n\t\t\t\t\tletter = letter + \"X\";\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t} else if (cl1 == 4) {\n\t\t\tletter = letter + \"XL\";\n\t\t} else if (cl1 == 9) {\n\t\t\tletter = letter + \"XC\";\n\t\t}\n\t\t\n\t\tint cl2 = (number % 100)%10;\n\t\t\n\t\tif (cl2 != 9 && cl2 != 4) {\n\t\t\t\n\t\t\tif (cl2 < 4) {\n\t\t\t\tfor (int i = 1; i <= cl2; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t} else if (cl2 < 9 && cl2 > 4) {\n\t\t\t\t\n\t\t\t\tletter = letter + \"V\";\n\t\t\t\tfor (int i = 1; i <= cl2-5; i++) {\n\t\t\t\t\tletter = letter + \"I\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else if (cl2 == 4) {\n\t\t\tletter = letter +\"IV\";\n\t\t} else if (cl2 == 9) {\n\t\t\tletter = letter + \"IX\";\n\t\t}\n\t\treturn letter;\n\t}",
"private int getCharNumber(Character letter) {\n\t\tint integerA = Character.getNumericValue('a');\n\t\tint integerZ = Character.getNumericValue('z');\n\t\tint integerLetter = Character.getNumericValue(letter);\n\t\tif (integerLetter >= integerA && integerLetter <= integerZ) {\n\t\t\treturn integerLetter - integerA; //a -> 0, b -> 1, c -> 2, etc\n\t\t}\n\t\treturn -1;\n\t}",
"public int getGroup(char letter);",
"static int theLoveLetterMystery(String s){\n // Complete this function\n int i= 0;\n int j = s.length()-1;\n int operations = 0;\n while(j>i){\n int char_i = s.charAt(i);\n int char_j = s.charAt(j);\n operations = operations + Math.abs(char_i - char_j);\n i++;\n j--;\n }\n return operations;\n }",
"private int[] addRandomLetter(String[][] level, String l) throws Exception{\r\n\t\t\r\n\t\tl = l.substring(0, 1); // FIX TO AVOID CRASHING\r\n\t\tfor(int i = 0; i<300; i++){\r\n\t\t\t// Start at a random tile\r\n\t\t\tint x = rng.nextInt(6);\r\n\t\t\tint y = rng.nextInt(6);\r\n\t\t\r\n\t\t\tif(level[x][y] == \"_\"){\r\n\t\t\t\t// If blank, just put in the char\r\n\t\t\t\tlevel[x][y] = l;\r\n\t\t\t\tint[] ret = {x,y};\r\n\t\t\t\treturn ret;\r\n\t\t\t} \r\n\t\t}\r\n\t\tthrow new Exception(\"Letter could not be placed\");\r\n\t\t\r\n\t}",
"public int letterMask(){\n\t\t\treturn letter_mask;\n\t\t}",
"char getEChar();",
"char startChar();",
"@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n private char encryptLetter(char keyLetter, char plaintextLetter) {\n\n //if not alpha, return unchanged\n if(!Character.isAlphabetic(plaintextLetter)){\n return plaintextLetter;\n }\n\n //convert to upper case for case-insensitivity while looking\n //up in the table\n keyLetter = Character.toUpperCase(keyLetter);\n char plaintextLetterToUpper = Character.toUpperCase(plaintextLetter);\n\n //to leave case unchanged\n if(Character.isUpperCase(plaintextLetter)) {\n return tabulaRecta[keyLetter-65][plaintextLetter-65];\n }\n\n return Character.toLowerCase(tabulaRecta[keyLetter-65][plaintextLetterToUpper-65]);\n }",
"public char getChar();",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter your word :\");\n String word = scanner.nextLine();\n word = word.toUpperCase();\n// word = Character.toString((char)(word.charAt(0)-32));\n String word1 =Character.toString(word.charAt(0));\n word = word.toLowerCase();\n for (int i = 1; i <word.length() ; i++) {\n word1 += Character.toString(word.charAt(i));\n }\n System.out.println(word1);\n }",
"public char getLetterGrade()\n\t{\n\t\tdouble grade;\n\t\t\n\t\tgrade = ((((((this.quiz1/QUIZ_MAX) + (this.quiz2/QUIZ_MAX) + (this.quiz3/QUIZ_MAX)) / 3) * QUIZ_WEIGHT) + ((this.midtermExam / MIDTERM_MAX) * MIDTERM_WEIGHT) + ((this.finalExam / FINAL_MAX) * FINAL_WEIGHT)) * 100);\n\t\t\n\t\tif (grade > 100 || grade < 0)\n\t\t{\n\t\t\tSystem.out.println(\"Not a valid grade\");\n\t\t}\n\t\telse if (grade >= 90)\n\t\t{\n\t\t\tfinalGrade = 'A';\n\t\t}\n\t\telse if (grade >= 80)\n\t\t{\n\t\t\tfinalGrade = 'B';\n\t\t}\n\t\telse if (grade >= 70)\n\t\t{\n\t\t\tfinalGrade = 'C';\n\t\t}\n\t\telse if (grade >= 60)\n\t\t{\n\t\t\tfinalGrade = 'D';\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinalGrade = 'F';\n\t\t}\n\t\t\n\t\treturn finalGrade;\n\t\t\t\n\t\t}",
"public final void mLETTER() throws RecognitionException {\n try {\n // /Users/dannluciano/Sources/MyLanguage/expr.g:163:8: ( 'a' .. 'z' | 'A' .. 'Z' )\n // /Users/dannluciano/Sources/MyLanguage/expr.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\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 }",
"long getLetterId();",
"long getLetterId();",
"private static boolean isHangulWithoutJamoT(char paramChar)\n/* */ {\n/* 324 */ paramChar = (char)(paramChar - 44032);\n/* 325 */ return (paramChar < '⮤') && (paramChar % '\\034' == 0);\n/* */ }",
"static String m33125a(String name) {\n StringBuilder fieldNameBuilder = new StringBuilder();\n int index = 0;\n char firstCharacter = name.charAt(0);\n int length = name.length();\n while (index < length - 1 && !Character.isLetter(firstCharacter)) {\n fieldNameBuilder.append(firstCharacter);\n index++;\n firstCharacter = name.charAt(index);\n }\n if (Character.isUpperCase(firstCharacter)) {\n return name;\n }\n fieldNameBuilder.append(m33124a(Character.toUpperCase(firstCharacter), name, index + 1));\n return fieldNameBuilder.toString();\n }",
"void circulardecode()\n{\nfor(i=0;i<s.length();i++)\n{\nc=s.charAt(i);\nk=(int)c;\nif(k==90)\nk1=65;\nelse\nif(k==122)\nk1=97;\nelse\nk1=k+1;\nc1=caseconverter(k,k1);\nSystem.out.print(c1);\n}\n}",
"private void matchletter(){\n\t\t/* Generate a Random Number and use that as a Index for selecting word from HangmanLexicon*/\n\t\tString incorrectwords = \"\";\n\t\tcanvas.reset();\n\t\tHangmanLexicon word= new HangmanLexicon(); // Get Word from Lexicon\n\t\tint index=rgen.nextInt(0, (word.getWordCount() - 1)); // Select the word Randomly\n\t\tString secretword=word.getWord(index);\n\t\tprintln(\"secretword: \"+secretword);\n\t\tint lengthofstring= secretword.length();\n\t\tString createword=concatNcopies(lengthofstring,\"-\"); // Create a blank word the user will guess\n\t\tcanvas.displayWord(createword); // Display the word on the Canvas\n\t\tprintln(\"The word now looks like this:\" +createword);\n\t\tprintln(\"You have \" +lengthofstring+ \" guesses left\");\n\t\tint counter =0;\n\t\tint guess= lengthofstring;\n\t\tint pos = createword.indexOf('-'); // Check for blank Words\n\t\t/* Ask user to input the letter*/\n\t\twhile(counter<lengthofstring && (pos !=-1 )){ \n\t\t\tint check=0;\n\t\t\tpos = createword.indexOf('-',pos); // Check to find Dashes in word\n\t\t\tString userletter= readLine(\"Your Guess:\");\n\t\t\tif(userletter.length() > 1){ // Check for two letters entered\n\t\t\t\tprintln(\"Enter letter Again\");\n\t\t\t}\n\t\t\tchar ch=userletter.charAt(0);\n\t\t\tif(Character.isLowerCase(ch)) { // Convert lower case to upper case\n\t\t\t\tch = Character.toUpperCase(ch);\n\t\t\t}\n\t\t\tfor (int i=0;i<lengthofstring;i++){ // Check for entire letter matching in the secretword\n\t\t\t\tif (ch==secretword.charAt(i) && ch!=createword.charAt(i)) { \n\t\t\t\t\tcreateword = createword.substring(0, i) + ch + createword.substring(i + 1);\n\t\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\t\tcheck++; // If user puts the correct letter again it is flagged as a error\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(check==0){\n\t\t\t\tprintln(\"There are no \"+ch+\"'s in the word\");\n\t\t\t\tguess=guess-1;\n\t\t\t\tincorrectwords = incorrectwords+ch;\n\t\t\t\tcanvas.noteIncorrectGuess(guess, incorrectwords);\n\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tprintln(\"The word now looks like this:\"+createword);\n\t\t\tprintln(\"You have \" +guess+ \" guesses left\");\n\n\t\t\tif(counter==lengthofstring){ // Checks for Fail condition- Game Over\n\t\t\t\tprintln(\"You are completely hung\");\n\t\t\t\tprintln(\"The word was: \"+secretword);\n\t\t\t\tcanvas.displayWord(secretword);\n\t\t\t\tprintln(\"You lose \");\n\t\t\t}\n\t\t\tpos = createword.indexOf('-');// Check for Win condition\n\t\t\tif(pos < 0){\n\t\t\t\tprintln(\"You saved Hangman\");\n\t\t\t\tprintln(\"You Win !!!\");\n\t\t\t\tcanvas.displayWord(createword);\n\t\t\t\tguess=123;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public static int getLetterIndex(String word, byte startFrom) {\r\n int i, j;\r\n if (startFrom == head) // start checking from beginning\r\n {\r\n for (i = 0; i < word.length(); i++) {\r\n if (word.charAt(i) >= 'a' && word.charAt(i) <= 'z')\r\n return i;\r\n }\r\n return -1; // cannot found any letter in the string\r\n } else if (startFrom == tail) // start check from the ed\r\n {\r\n for (j = word.length() - 1; j >= 0; j--) {\r\n if (word.charAt(j) >= 'a' && word.charAt(j) <= 'z')\r\n return j;\r\n }\r\n return -1; // cannot found any letter in the string\r\n }\r\n return 0;\r\n }",
"public final void mLETTER() throws RecognitionException {\r\n try {\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:307:17: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:\r\n {\r\n if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\r\n input.consume();\r\n }\r\n else {\r\n MismatchedSetException mse = new MismatchedSetException(null,input);\r\n recover(mse);\r\n throw mse;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public char index2letter(int i) { \t\n \treturn (char) (i + 'A');\n }",
"public final void typedLetter(final char letter) {\n \t\t// currently not locked on to a word\n \t\tif (currWordIndex == -1) {\n \t\t\tfor (int i = 0; i < wordsDisplayed.length; i++) {\n \t\t\t\t// if any of the first character in wordsDisplayed matched letter\n \t\t\t\tif (wordsList[wordsDisplayed[i]].charAt(0) == letter) {\n \t\t\t\t\tcurrWordIndex = i;\n \t\t\t\t\tcurrLetterIndex = 1;\n \t\t\t\t\tsetChanged();\n \t\t\t\t\tnotifyObservers(States.update.HIGHLIGHT);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t}\n \t\t\t// locked on to a word being typed (letter == the index of current letter index in the word)\n \t\t} else if (wordsList[wordsDisplayed[currWordIndex]].charAt(currLetterIndex) == letter) {\n \n \t\t\t// store length of current word\n \t\t\tint wordLen = wordsList[wordsDisplayed[currWordIndex]].length();\n \n \t\t\t// word is completed after final letter is typed\n \t\t\tif ((currLetterIndex + 1) >= wordLen) {\n \t\t\t\tscore += wordLen;\n \t\t\t\tupdateWordsDisplayed();\n \t\t\t\tcurrLetterIndex = -1;\n \t\t\t\tcurrWordIndex = -1;\n \t\t\t} else {\n \t\t\t\tcurrLetterIndex += 1;\n \t\t\t\tsetChanged();\n \t\t\t\tnotifyObservers(States.update.HIGHLIGHT);\n \t\t\t}\n \t\t\treturn;\n \t\t}\n \n \t\t// wrong letter typed\n \t\tsetChanged();\n \t\tnotifyObservers(States.update.WRONG_LETTER);\n \t}",
"public final void mLETTER() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:5: ( ( 'A' .. 'Z' | 'a' .. 'z' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:569:7: ( 'A' .. 'Z' | 'a' .. 'z' )\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {\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 static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}",
"public int letterValue(char letter){\n int val;\n\n switch(letter){\n case 'a':\n case 'e':\n case 'i':\n case 'o':\n case 'u':\n case 'l':\n case 'n':\n case 's':\n case 't':\n case 'r': val =1;\n break;\n\n case 'd':\n case 'g': val =2;\n break;\n\n case 'b':\n case 'c':\n case 'm':\n case 'p': val =3;\n break;\n\n case 'f':\n case 'h':\n case 'v':\n case 'w':\n case 'y': val =4;\n break;\n\n case 'k': val =5;\n break;\n\n case 'j':\n case 'x': val =8;\n break;\n\n case 'q':\n case 'z': val =10;\n break;\n\n default: val =0;\n }\n return val;\n }",
"private boolean isGrLetter(char ch) {\n /*if ( ( (ch >= 'á') && (ch <= 'ù')) || ( (ch >= 'Á') && (ch <= 'Ù')) ||\n (ch == 'Ü') || (ch == 'Ý') || (ch == 'Þ') || (ch == 'ß') ||\n (ch == 'ü') || (ch == 'ý') || (ch == 'þ') ||\n (ch == '¢') || (ch == '¸') || (ch == '¹') || (ch == 'º') ||\n (ch == '¼') || (ch == '¾') || (ch == '¿') ||\n (ch == 'ú') || (ch == 'û') || (ch == 'À') || (ch == 'à')) {*/\n if ( ( (ch >= '\\u03b1') && (ch <= '\\u03c9')) || ( (ch >= '\\u0391') && (ch <= '\\u03a9')) ||\n \t(ch == '\\u03ac') || (ch == '\\u03ad') || (ch == '\\u03ae') || (ch == '\\u03af') ||\n \t(ch == '\\u03cc') || (ch == '\\u03cd') || (ch == '\\u03ce') ||\n \t(ch == '\\u0386') || (ch == '\\u0388') || (ch == '\\u0389') || (ch == '\\u038a') ||\n \t(ch == '\\u038c') || (ch == '\\u038e') || (ch == '\\u038f') ||\n \t(ch == '\\u03ca') || (ch == '\\u03cb') || (ch == '\\u0390') || (ch == '\\u03b0')) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"public LetterType(char l, int color) {\n\t\tsuper(l, color);\n\t}",
"private char getRandomCharacter() {\n int min = 0;\n int max = ALPHABET.length-1;\n int randomPos;\n\n // Could possibly have used ASCII numbers 61-95\n randomPos = min + (int)(Math.random() * ((max - min) + 1));\n\n return ALPHABET[randomPos];\n }",
"public static String calculateLetter(int dniNumber) {\n String letras = \"TRWAGMYFPDXBNJZSQVHLCKEU\";\n int indice = dniNumber % 23;\n return letras.substring(indice, indice + 1);\n }",
"private char translateChar(char[] mapping, char character)\n { if (character==' ') return character;\n\n int lower = lowerKeyCodeMapping.indexOf(character);\n int upper = upperKeyCodeMapping.indexOf(character);\n\n int mapValue = lower;\n if (lower<0) mapValue = upper;\n if (mapValue<0) return '\\0';\n return mapping[mapValue];\n }",
"private String getLetterGrade(double score) {\n int i = (int) score;\n switch (i) {\n case 100:\n case 90:\n return \"A\";\n case 80:\n return \"B\";\n case 70:\n return \"C\";\n case 60:\n return \"D\";\n default:\n return \"F\";\n }\n }",
"public void noteIncorrectGuess(char letter) {\n\t\taddToWrongLetters(letter);\n\t\tdisplayWrongLetters();\n\t\taddNextBodyPart(wrongLetters.length());\n\t\t\n\t}",
"public char getLevel(){\n if (this.score>=90){\n return 'A';\n }\n else if (this.score<90 && this.score>=80){\n return 'B';\n }\n else if (this.score<80 && this.score>=60){\n return 'C';\n }\n else {\n return 'D';\n }\n \n }",
"int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}",
"public String displayWord(char letter){\n\t\tString printWord;\r\n\t\t\r\n\t\tif(correctList.contains(letter)){\r\n\t\t\tfor(int i=0; i<display.length; i++){\r\n\t\t\t\tif(gameLetter[i]==letter){\r\n\t\t\t\t\tdisplay[i] = String.valueOf(gameLetter[i]);}\r\n\t\t\t}\r\n\t\t\t StringBuffer sb = new StringBuffer();\r\n\t\t\t for(int i = 0; i < display.length; i++)\r\n\t\t\t { \r\n\t\t\t sb. append(display[i]);\r\n\t\t\t }\r\n\t\t\t printWord = sb.toString();\r\n \t\t}\r\n\t\telse{\r\n\t\t\t StringBuffer sb = new StringBuffer();\r\n\t\t\t for(int i = 0; i < display.length; i++)\r\n\t\t\t { \r\n\t\t\t sb. append(display[i]);\r\n\t\t\t }\r\n\t\t\t printWord = sb.toString();\r\n\t\t}\r\n\t\t\r\n\t\tprintHangman();\r\n\t\t\r\n\t\treturn printWord;\r\n\t}",
"public static String posNumberToLetters(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"1\"))\n\t\t\treturn \"NN\";\n\t\tif (pos.equalsIgnoreCase(\"2\"))\n\t\t\treturn \"VB\";\n\t\tif (pos.equalsIgnoreCase(\"3\"))\n\t\t\treturn \"JJ\";\n\t\tif (pos.equalsIgnoreCase(\"4\"))\n\t\t\treturn \"RB\";\n\t\tif (pos.equalsIgnoreCase(\"5\"))\n\t\t\treturn \"JJ\";\n\t\tSystem.err.println(\"ERROR in WordNetUtilities.posNumberToLetters(): bad number: \" + pos);\n\t\treturn \"NN\";\n\t}",
"protected char randomChar(int length) {\n\n int randomLetter = (int) (Math.random() * length);\n char letter = this.alphabet[randomLetter];\n return letter;\n }",
"public int letterToIndex(char letter) {\r\n\t\tif (Character.toLowerCase(letter) == 'a')\r\n\t\t\treturn 0;\r\n\t\telse if (Character.toLowerCase(letter) == 'b')\r\n\t\t\treturn 1;\r\n\t\telse if (Character.toLowerCase(letter) == 'c')\r\n\t\t\treturn 2;\r\n\t\telse if (Character.toLowerCase(letter) == 'd')\r\n\t\t\treturn 3;\r\n\t\telse if (Character.toLowerCase(letter) == 'e')\r\n\t\t\treturn 4;\r\n\t\telse if (Character.toLowerCase(letter) == 'f')\r\n\t\t\treturn 5;\r\n\t\telse if (Character.toLowerCase(letter) == 'g')\r\n\t\t\treturn 6;\r\n\t\telse if (Character.toLowerCase(letter) == 'h')\r\n\t\t\treturn 7;\r\n\t\telse if (Character.toLowerCase(letter) == 'i')\r\n\t\t\treturn 8;\r\n\t\telse if (Character.toLowerCase(letter) == 'j')\r\n\t\t\treturn 9;\r\n\t\telse\r\n\t\t\treturn -1;\r\n\t}",
"private static boolean isLamAlefChar(char ch) {\n return ch >= '\\uFEF5' && ch <= '\\uFEFC';\n }",
"public void noteIncorrectGuess(char letter) \n\t{ \n\t choosePart(i);\n\t i++;\n\t wrong+=letter;\n\t wrongLabel.setLabel(wrong);\n\t add(wrongLabel);\n\t}",
"public void conversionTest(){\n String test = \"ABCDEFabcdef123!#\";\n for(int k=0; k < test.length(); k++){\n char ch = test.charAt(k);\n char uch = Character.toUpperCase(ch);\n char lch = Character.toLowerCase(ch);\n System.out.println(ch+\" \"+uch+\" \"+lch);\n }\n }",
"public char getUserGuessedLetter() {\n return userGuessedLetter;\n }",
"public static String rndLetterString() {\r\n int spLen = RBytes.rndInt(10, 20);\r\n char[] c = RBytes.rndCharArray('a', 'z');\r\n char[] C = RBytes.rndCharArray('A', 'Z');\r\n char[] d = RBytes.rndCharArray('0', '9');\r\n String special = \"\";\r\n for (int s = 0; s < spLen; s++) {\r\n special += \"!@#$%^&*()-_~`=+:;.,\";\r\n }\r\n String s1 = new String(c) + new String(d) + new String(C) + special;\r\n return shaffleString(s1);\r\n }",
"public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }",
"static int getIdx(char ch)\n {\n return (ch - 'a');\n }",
"char toChar(int index) {\n return _letters.charAt(index);\n }",
"public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}",
"char cipher(int charToCipher);"
] | [
"0.66410655",
"0.6555402",
"0.65430963",
"0.65294176",
"0.6434775",
"0.6388483",
"0.635713",
"0.6357057",
"0.6339493",
"0.6324703",
"0.6316832",
"0.6288474",
"0.62864906",
"0.6258143",
"0.6237141",
"0.6225078",
"0.6185416",
"0.6164179",
"0.61600894",
"0.6159783",
"0.6146434",
"0.6113916",
"0.6113667",
"0.61106616",
"0.61078554",
"0.60988635",
"0.609557",
"0.6078998",
"0.6066465",
"0.6054085",
"0.60522634",
"0.6050633",
"0.6045233",
"0.6038996",
"0.6018577",
"0.59925306",
"0.5978362",
"0.59775555",
"0.59380007",
"0.5904608",
"0.589584",
"0.588",
"0.5865016",
"0.5862644",
"0.5856773",
"0.5850335",
"0.5844415",
"0.58305347",
"0.5801336",
"0.5794149",
"0.57933813",
"0.5788743",
"0.5788464",
"0.57813925",
"0.578138",
"0.5768459",
"0.57640696",
"0.5761377",
"0.5730675",
"0.57299465",
"0.5721487",
"0.571901",
"0.5718383",
"0.57125884",
"0.5709129",
"0.5709129",
"0.5704058",
"0.5702014",
"0.5700345",
"0.5699996",
"0.5698212",
"0.5691621",
"0.5689531",
"0.56850964",
"0.5684207",
"0.56754255",
"0.56720173",
"0.567124",
"0.5670055",
"0.5663247",
"0.565681",
"0.56548095",
"0.56476283",
"0.5645685",
"0.56424445",
"0.56325495",
"0.56309056",
"0.56247026",
"0.5623765",
"0.56227523",
"0.56160945",
"0.56129354",
"0.5601124",
"0.5593026",
"0.5591121",
"0.55833966",
"0.5583174",
"0.5576074",
"0.5563103",
"0.5556497"
] | 0.71599144 | 0 |
name = letter alphas / '`' nobquotes quote '`' | private boolean name() {
return (
(letter() && alphas()) ||
(CHAR('`') && nobquotes() && MARK(QUOTE) && CHAR('`'))
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String applyQuote(String name);",
"private String escapeName(String name) {\n return (name != null && name.indexOf('\"') > 0) ?\n name.replaceAll(\"\\\"\", \"\\\\\\\\\\\"\") : name;\n }",
"private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }",
"public final String quote(String name) {\n \t\tif ( name == null ) {\n \t\t\treturn null;\n \t\t}\n \n \t\tif ( name.charAt( 0 ) == '`' ) {\n \t\t\treturn openQuote() + name.substring( 1, name.length() - 1 ) + closeQuote();\n \t\t}\n \t\telse {\n \t\t\treturn name;\n \t\t}\n \t}",
"@AutoEscape\n public String getName();",
"char[] getName();",
"@Test\r\n public final void rawInputNamesShouldNotHaveSpaces() {\r\n \tString actual = proc.preprocessRawInputName(\" AndThis String\");\r\n \tassertEquals(\"AndThisString\", actual);\r\n }",
"private String formatName(String name) {\n Character firstCharacter = name.charAt(0);\n firstCharacter = Character.toUpperCase(firstCharacter);\n\n final String remainingCharacters = name.substring(1);\n\n return String.valueOf(firstCharacter) + remainingCharacters;\n }",
"private String name() {\n\t\tif (currentIndex >= data.length\n\t\t\t\t|| !Character.isLetter(data[currentIndex])) {\n\t\t\tthrow new LexerException();\n\t\t}\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& (Character.isLetter(data[currentIndex])\n\t\t\t\t\t\t|| data[currentIndex] == '_'\n\t\t\t\t\t\t|| Character.isDigit(data[currentIndex]))) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\treturn value;\n\t}",
"private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}",
"void formatName(String name) throws NameFormatException;",
"public static String getNameAsTex(String name) {\n\t\ttry {\n\t\tString[] symbolArray = name.split(\";\");\n\n\t\tif (symbolArray.length > 2) {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tif(Tape.LATEX_ESCAPE_SYMBOLS.contains(symbolArray[0])) {\n\t\t\t\tsb.append(\"\\\\\");\n\t\t\t\tsb.append(symbolArray[0]);\n\t\t\t} else {\n\t\t\t\tsb.append(symbolArray[0]);\n\t\t\t}\n\t\t\tsb.append(\"_{\");\n\t\t\tsb.append(symbolArray[1]);\n\t\t\tsb.append(\",\");\n\t\t\tsb.append(symbolArray[2]);\n\t\t\tsb.append(\",\");\n\t\t\tsb.append(symbolArray[3]);\n\t\t\tsb.append(\"}\");\n\t\t\t\n\t\t\treturn sb.toString();\n\t\t}\n\t\t}catch (NullPointerException e) {\n\t\t}\n\t\treturn name;\n\t}",
"AlphabetNameReference createAlphabetNameReference();",
"static String m33125a(String name) {\n StringBuilder fieldNameBuilder = new StringBuilder();\n int index = 0;\n char firstCharacter = name.charAt(0);\n int length = name.length();\n while (index < length - 1 && !Character.isLetter(firstCharacter)) {\n fieldNameBuilder.append(firstCharacter);\n index++;\n firstCharacter = name.charAt(index);\n }\n if (Character.isUpperCase(firstCharacter)) {\n return name;\n }\n fieldNameBuilder.append(m33124a(Character.toUpperCase(firstCharacter), name, index + 1));\n return fieldNameBuilder.toString();\n }",
"public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}",
"private static String capName(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); }",
"protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }",
"private void setName(String name) {\n name = name.trim().replaceAll(\"\\\"\", \"\");\n name = name.substring(0,1).toUpperCase() + name.substring(1);\n\n this.name = name;\n }",
"@Override\n\tpublic String sqlQuote(String name) {\n\t\treturn String.format(\"\\\"%s\\\"\", name);\n//\t\treturn name;\n\t}",
"@Test\n\tpublic void caseNameWithSpecialChar() {\n\t\tString caseName = \"le@d\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}",
"private String preprocessName(String original){\n\t\t// Remove non-alphabetical characters from the name\n\t\toriginal = original.replaceAll( \"[^A-Za-z]\", \"\" );\n\t\t\t\t\n\t\t// Convert to uppercase to help us ignore case-sensitivity\n\t\toriginal = original.toUpperCase();\n\t\t\n\t\t// Remove all occurences of the letters outlined in step 3\n\t\toriginal = original.substring(0,1) + original.substring(1).replaceAll(\"[AEIHOUWY]\",\"\");\n\t\t\n\t\t// Return the result\n\t\treturn original;\n\t}",
"private boolean isValidName(String name)\n {\n String reg = \"^[a-zA-Z]+$\";\n return name.matches(reg);\n }",
"public static void checkWithoutSpecialChars(String name) throws SpecialCharsNotAllowedException{ \n \n if(!name.matches(\"^[0-9 \\\\p{L}]*$\")) throw new SpecialCharsNotAllowedException(\"The special chars in the name of entity are not allowed!\");\n }",
"String simpleName();",
"private String name() {\n return Strings.concat(Token.DOLLAR, name.string());\n }",
"private String cleanName(String name) {\n int pt = name.indexOf('<');\n if (pt >= 0) name = name.substring(0,pt);\n name = name.replace(\"-\", \"\");\n if (name.startsWith(\".\")) name = name.substring(1);\n if (name.endsWith(\".\")) name = name.substring(0,name.length()-1);\n return name;\n }",
"public static String getBareName(String name) {\n\t\tif (name.indexOf(AURA_TOKEN) != -1)\n\t\t\treturn secondName(name);\n\t\tint s0 = name.lastIndexOf(FILE_SEP);\n\t\tString s = (s0 == -1) ? name : name.substring(s0 + 1);// get partial name after slash\n\t\tif (s.indexOf(META_TOKEN) != -1) {\n\t\t\tString bareName = s.replace(META_TOKEN, \"\");\n\t\t\tif (bareName == null || bareName == \"\") return \"\";\n\t\t\tint s1 = bareName.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? bareName : bareName.substring(0, s1);\n\t\t} else {\n\t\t\tint s1 = s.lastIndexOf('.');\n\t\t\treturn s1 == -1 ? s : s.substring(0, s1);\n\t\t}\n\t}",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"public static void theNameSong(String name) {\n\t\tSystem.out.println();\n\t\t//Prints all letters of the first and last names EXCEPT the first letters\n\t\tString allButFirstLetter = name.substring(1);\n\t\tSystem.out.println(name + \" \" + name + \", bo-B\" + allButFirstLetter);\n\t\tSystem.out.println(\"Banana-fana fo-F\" + allButFirstLetter);\n\t\tSystem.out.println(\"Fee-fi-mo-M\" + allButFirstLetter);\n\t\tSystem.out.println(name.toUpperCase() + \"!\");\n\t}",
"private static boolean validName(String name) {\n return name != null && !name.strip().isBlank();\n }",
"Caseless getName();",
"@AutoEscape\n\tpublic String getName();",
"@AutoEscape\n\tpublic String getName();",
"@AutoEscape\n\tpublic String getName();",
"@AutoEscape\n\tpublic String getName();",
"public static void checkWithoutSpaces(String name)throws SpaceNotAllowedException{\n \n if(name.contains(\" \")) throw new SpaceNotAllowedException(\"The spaces in the name of entity are not allowed!\");\n }",
"private String removeFirstChar(String name) {\n\t\treturn name.substring(1, name.length());\n\t}",
"public abstract String getRawName();",
"public String escapeIdentifier(String identifierName);",
"public static String getValidName(String name) {\n return name.toLowerCase(Locale.getDefault()).replace(\"_\", \"-\").replace(\".\", \"-\");\n }",
"public static void main(String[] args) {\n StringBuffer name = new StringBuffer(\"Abdulazeez Abdulazeez \");\n System.out.println(\"String Buffer of my name \" +name);\n // Supposing I need to add my middle name as an abbr.\n // I'll append it witht the .appendCodePoint() method.\n name.appendCodePoint(65);\n System.out.println(\"My full name after now: \" +name);\n }",
"public static boolean lettersCheck(String name) {\r\n\t\treturn name.matches(\"^[\\\\p{L} .'-]+$\");\r\n\t}",
"private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}",
"public String editBankName(String name) {\n return name.replaceFirst(\"[.][^.]+$\", \"\");\n }",
"private static String buildName(String title)\n {\n // The name is based on the title, but with underscores\n String name = title.replace(' ', '_');\n name = name.replaceAll(\"\\\"\", \"%22\");\n name = name.replaceAll(\"[*]\", \"%2a\");\n name = name.replaceAll(\"<\", \"%3c\");\n name = name.replaceAll(\">\", \"%3e\");\n name = name.replaceAll(\":\", \"%3a\");\n name = name.replaceAll(\"([.]?[.]+$)\", \"%2e\");\n return name;\n }",
"static String m33126a(String name, String separator) {\n StringBuilder translation = new StringBuilder();\n int length = name.length();\n for (int i = 0; i < length; i++) {\n char character = name.charAt(i);\n if (Character.isUpperCase(character) && translation.length() != 0) {\n translation.append(separator);\n }\n translation.append(character);\n }\n return translation.toString();\n }",
"@Test\n\tpublic void getNameCorrect(){\n\t\tassertEquals(\"BARBARZYŃCA\", adventurer1.getName());\n\t}",
"public String getUnquotedName() {\n\t\treturn unqoteObjectName(getName());\n\t}",
"protected token readQuotedReservedWord() throws IOException, DasmError {\n charBuf.reset();\n for (;;) {\n readNextChar();\n if (isSeparator(nextChar))\n throw new DasmError(\"Unterminated ''-enclosed name\");\n if (nextChar == '\\'') {\n if (charBuf.size() == 0)\n throw new DasmError(\"Empty ''-enclosed name\");\n readNextChar(); // skip close quote\n if (!isSeparator(nextChar))\n throw new DasmError(\n \"Missed separator after ''-enclosed name\");\n return new str_token(sym.Word, charBuf.toString());\n }\n char chval = (char) nextChar;\n if (nextChar == '\\\\') chval = nameEscape();\n charBuf.add(chval);\n }\n }",
"String normalizeName(String tag) {\n\t\tStringBuffer buf = new StringBuffer();\n\t\t\n\t\tboolean newWord = true;\n\t\t// capitalize first letter of each word\n\t\t// remove -'s and _'s\n\t\tfor (int i = 0; i < tag.length(); i++) {\n\t\t\tchar c = tag.charAt(i);\n\t\t\tif (c == '-' || c == '_') {\n\t\t\t\tnewWord=true;\n\t\t\t} else if (newWord) {\n\t\t\t\tbuf.append(Character.toUpperCase(c));\n\t\t\t\tnewWord = false;\n\t\t\t} else {\n\t\t\t\tbuf.append(c);\n\t\t\t\tnewWord = false;\n\t\t\t}\n\t\t}\n\t\treturn buf.toString().trim();\n\t}",
"private static void checkTokenName(String namedOutput) {\r\n\t\tif (namedOutput == null || namedOutput.length() == 0) {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be NULL or emtpy\");\r\n\t\t}\r\n\t\tfor (char ch : namedOutput.toCharArray()) {\r\n\t\t\tif ((ch >= 'A') && (ch <= 'Z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= 'a') && (ch <= 'z')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((ch >= '0') && (ch <= '9')) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Name cannot be have a '\" + ch + \"' char\");\r\n\t\t}\r\n\t}",
"public static String getGenusAndSpeciesName(String name){\r\n\t\tchar firstChar = name.charAt(0);\r\n\t\tif(firstChar>='A'&&firstChar<='Z'){//Genus name often capitalized\r\n\t\t\tStringBuffer gsName = new StringBuffer();\r\n\t\t\tString[] fields = name.split(\"[\\\\s\\\\-]+\");\r\n\t\t\tgsName.append(fields[0]);//genus name\r\n\t\t\tif(fields.length>1){\r\n\t\t\t\tgsName.append(\" \");\r\n\t\t\t\tgsName.append(fields[1]);\r\n\t\t\t}\r\n\t\t\treturn gsName.toString();\r\n\t\t}\r\n\t\treturn name;\r\n\t}",
"public static @NotNull String validName(@NotNull String value) {\n\n // convert to lowercase\n String text = value.toLowerCase();\n\n // replace some special chars first\n text = StringUtils.replace(text, \"ä\", \"ae\");\n text = StringUtils.replace(text, \"ö\", \"oe\");\n text = StringUtils.replace(text, \"ü\", \"ue\");\n text = StringUtils.replace(text, \"ß\", \"ss\");\n\n // replace all invalid chars\n StringBuilder sb = new StringBuilder(text);\n for (int i = 0; i < sb.length(); i++) {\n char ch = sb.charAt(i);\n if (!((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || (ch >= '0' && ch <= '9') || (ch == '_'))) {\n ch = '-';\n sb.setCharAt(i, ch);\n }\n }\n return sb.toString();\n }",
"private String fixName(String aName) {\n final String firstToken = new StringTokenizer(aName, \" \").nextToken();\n int iRepeatedNamePos = aName.indexOf(firstToken, 1);\n if (iRepeatedNamePos > 0) {\n return aName.substring(0, iRepeatedNamePos).trim();\n }\n return aName;\n }",
"public static String removeQuotes(String name)\r\n/* 28: */ {\r\n/* 29: 31 */ if (name.trim().isEmpty()) {\r\n/* 30: 32 */ return \"\";\r\n/* 31: */ }\r\n/* 32: 34 */ StringBuffer buffer = new StringBuffer(name);\r\n/* 33: */ int index;\r\n/* 34: 36 */ while ((index = buffer.indexOf(\"\\\"\")) >= 0)\r\n/* 35: */ {\r\n/* 36: */ int index;\r\n/* 37: 37 */ buffer.replace(index, index + 1, \"\");\r\n/* 38: */ }\r\n/* 39: 39 */ return buffer.toString();\r\n/* 40: */ }",
"private String createFakeName() {\n final int firstLowercaseLetterAscii = 97;\n final int lowercaseLetterRange = 25;\n\n // Maximum length random name = 20\n final int minNameLength = 4;\n int randomNameLength = (random.nextInt(17)) + minNameLength;\n\n // Algorithm to generate the random name\n StringBuilder randomName = new StringBuilder();\n for (int i = 0; i < randomNameLength; i++) {\n char randChar = (char) (random.nextInt(lowercaseLetterRange + 1) + firstLowercaseLetterAscii);\n randomName.append(randChar);\n }\n return randomName.toString();\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"static String cutName(String input) { return input.split(\" \")[0]; }",
"public boolean isLetters(String name) {\r\n char[] chars = name.toCharArray();\r\n\r\n for (char c : chars) {\r\n if(Character.isLetter(c) || c ==' ') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"private String validateWord (String word) {\r\n String chars = \"\";\r\n for (int i = 0; i < word.length (); ++i) {\r\n if (!Character.isLetter (word.charAt (i))) {\r\n chars += \"\\\"\" + word.charAt (i) + \"\\\" \";\r\n }\r\n }\r\n return chars;\r\n }",
"public String parseName(String name) {\n\t\t// Get rid of spaces\n\t\tname = name.replaceAll(\" \", \"\");\n\n\t\t// Rule 2, word case is not significant.\n\t\tname = name.toLowerCase();\n\n\t\t// First letter is important so take substring of everything after\n\t\tString ltrsRemove = name.subSequence(1, name.length()).toString();\n\n\t\t// Get rid of designated letters in rule 3.\n\t\tfor (int i = 0; i < charToRemove.length; i++) {\n\t\t\tltrsRemove = ltrsRemove.replaceAll(charToRemove[i].toString(), \"\");\n\t\t}\n\n\t\tname = name.substring(0, 1) + ltrsRemove;\n\t\tname = removeDoubles(name);\n\t\tname = equivLetters(name, equivalents);\n\n\t\treturn name;\n\t}",
"public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }",
"public static void checkWithoutSpecialChars(String name, String allowedSpecialChars) throws SpecialCharsNotAllowedException{ \n \n if(!name.matches(\"^([0-9 \\\\p{L}\" + allowedSpecialChars + \"])*$\")) throw new SpecialCharsNotAllowedException(\"The special chars (except \" + allowedSpecialChars + \") in the name of entity are not allowed!\");\n }",
"String printName(String input);",
"public static String cleanName(String name) {\n return name.replace(\" \", \"_\").replace(\"&\", \"\").replace(\"(\", \"\")\n .replace(\")\", \"\").replaceAll(\",\", \"\");\n }",
"private boolean isNameValid(String name) {\n\n }",
"private static String parseTname(String sql) {\r\n\t\tString ret = \"\";\r\n\t\t// String[] ret = str.split(\"name |field |grade \");\r\n\r\n\t\tchar ch;\r\n\t\tString word = \"\";\r\n\t\tint control = 0;\r\n\r\n\t\tfor (int x = 0; x < sql.length(); x++) {\r\n\t\t\tch = sql.charAt(x);\r\n\t\t\t// word = word + ch;\r\n\r\n\t\t\tif (control == 1) {\r\n\t\t\t\tif (ch == '(' || ch == ' ') {\r\n\t\t\t\t\tcontrol++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tret = ret + ch;\r\n\t\t\t\t}\r\n\t\t\t} else if (control == 0 && word.equals(\"TABLE\")) {\r\n\t\t\t\tcontrol++;\r\n\t\t\t} else if (ch == ' ') {\r\n\t\t\t\tword = \"\";\r\n\t\t\t} else {\r\n\t\t\t\tword = word + ch;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn (ret);\r\n\t}",
"private String checkForChars(String jsArg) {\n\t\tString jsNameToCallArgument = jsArg;\n\n\t\t// TODO replace the current logic for character-by-character comparison\n\t\t// with a more efficient approach\n\t\t/*-// fix to avoid char by char iteration for replacing \"\\'\" char.\n\t\tString jsNametoCallFirstChar = jsNameToCallArgument.substring(0, 1);\n\t\tString jsNametoCallSubStr = jsNameToCallArgument.substring(1, jsNameToCallArgument.length() - 1);\n\t\tString jsNametoCallLastChar = jsNameToCallArgument.substring(jsNameToCallArgument.length() - 1, 1);\n\t\tjsNametoCallSubStr = jsNametoCallSubStr.replaceAll(\"'\", \"\");\n\t\tjsNametoCallSubStr = jsNametoCallFirstChar + jsNametoCallSubStr + jsNametoCallLastChar;\n\t\treturn jsNametoCallSubStr;*/\n\n\t\t// For checking the occurrence of ' in the given string and\n\t\t// removing it\n\t\tfor (int i = 0; i < jsNameToCallArgument.length(); i++) {\n\t\t\tif (jsNameToCallArgument.charAt(i) == '\\'') {\n\t\t\t\tif (i != 0 && i != (jsNameToCallArgument.length() - 1)) {\n\t\t\t\t\tjsNameToCallArgument = jsNameToCallArgument.substring(0, i) + SmartConstants.ENCODE_SINGLE_QUOTE_UTF8 + jsNameToCallArgument.substring(i + 1, jsNameToCallArgument.length());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jsNameToCallArgument;\n\t}",
"public String getNameWithOutTrim() {\n\t\treturn new String(name);\n\t}",
"static public String sanitizeName(String origName) {\n char c[] = origName.toCharArray();\n StringBuffer buffer = new StringBuffer();\n\n // can't lead with a digit, so start with an underscore\n if ((c[0] >= '0') && (c[0] <= '9')) {\n buffer.append('_');\n }\n for (int i = 0; i < c.length; i++) {\n if (((c[i] >= '0') && (c[i] <= '9')) ||\n ((c[i] >= 'a') && (c[i] <= 'z')) ||\n ((c[i] >= 'A') && (c[i] <= 'Z')) ||\n ((i > 0) && (c[i] == '-')) ||\n ((i > 0) && (c[i] == '.'))) {\n buffer.append(c[i]);\n } else {\n buffer.append('_');\n }\n }\n // let's not be ridiculous about the length of filenames.\n // in fact, Mac OS 9 can handle 255 chars, though it can't really\n // deal with filenames longer than 31 chars in the Finder.\n // but limiting to that for sketches would mean setting the\n // upper-bound on the character limit here to 25 characters\n // (to handle the base name + \".class\")\n if (buffer.length() > 63) {\n buffer.setLength(63);\n }\n return buffer.toString();\n }",
"private void createFunctName() {\n\t\ttry {\n\t\t\tString value = name();\n\t\t\ttoken = new Token(TokenType.FunctName, value);\n\t\t} catch (LexerException e) {\n\t\t\tcurrentIndex--;// that @ is also included\n\t\t\tthrow new LexerException(\"No valid function name!\");\n\t\t}\n\n\t}",
"private boolean isAllCaps(String name) {\r\n for (int ndx = 0; ndx < name.length(); ndx++) {\r\n char ch = name.charAt(ndx);\r\n if (ch == '_') {\r\n // OK\r\n } else if (Character.isUpperCase(ch)) {\r\n // OK\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public boolean hasUnwantedChar(String name, String field) {\r\n\t\tboolean unwantedCharacter = false;\r\n\t\tchar checkName[] = name.toCharArray();\r\n\t\tif(field == \"names\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\t\r\n\t\t}else if(field == \"password & physical address\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\t\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case ' ':case '-':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\t\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\t\r\n\t\t}else if(field == \"email\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase 'A':case 'a':case 'B':case 'b':case 'C':case 'c':case 'D':case 'd':case 'E':case 'e':case 'F':case 'f':case 'G':case 'g':\r\n\t\t\t\tcase 'H':case 'h':case 'I':case 'i':case 'J':case 'j':case 'K':case 'k':case 'L':case 'l':case 'M':case 'm':case 'N':case 'n':\r\n\t\t\t\tcase 'O':case 'o':case 'P':case 'p':case 'Q':case 'q':case 'R':case 'r':case 'S':case 's':case 'T':case 't':case 'U':case 'u':\r\n\t\t\t\tcase 'V':case 'v':case 'W':case 'w':case 'X':case 'x':case 'Y':case 'y':case 'Z':case 'z':\t\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case '@':case '.':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\r\n\t\t}else if(field == \"mobileNumber\") {\r\n\t\t\tint find = 0;\r\n\t\t\twhile(find < checkName.length) {\r\n\t\t\t\tswitch(checkName[find]) {\r\n\t\t\t\tcase '1':case '2':case '3':case '4':case '5':case '6':case '7':case '8':case '9':case '0':case ' ':\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tunwantedCharacter = true;\r\n\t\t\t\t}\r\n\t\t\t\tif(unwantedCharacter == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t++find;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn unwantedCharacter;\r\n\t}",
"public boolean isValidName(String name)\r\n {\r\n // check for illegal combinations of characters\r\n // this is probably not a complete check, but hopefully it is good enough\r\n if ( (name == null) ||\r\n (name.equals(\"\")) ||\r\n Character.isUpperCase(name.charAt(0)) ||\r\n containsSubString(name, TIGHT_BINDING) ||\r\n containsSubString(name, LOOSE_BINDING) ||\r\n containsSubString(name, SINGLE_MATCH) ||\r\n containsSubString(name, \"/\") ||\r\n containsSubString(name, \" \") ||\r\n containsSubString(name, \"\\t\") ||\r\n containsSubString(name, \"\\n\") ||\r\n name.equals(UNIQUE_NAME) )\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"@Test\r\n\tpublic void testNameInvalid() {\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"*\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"0-\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"324tggs\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"-feioj\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"/\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\"@\"));\r\n\t\tassertFalse(Activity5Query.isNameCorrect(\" \"));\r\n\t}",
"public InvalidOntologyName(String invalidCharacter) {\n super(String.format(\"Ontology name cannot contain %s\", invalidCharacter));\n }",
"public Name createTemporaryName() {\n return Name.makeFresh(\"t\");\n }",
"public boolean nameValidation(String name) {\n\t char[] chars = name.toCharArray();\n\t int tempNum = 0;\n\t for (char c : chars) {\n\t tempNum += 1;\n\t \tif(!Character.isLetter(c)) {\n\t return false;\n\t }\n\t }\n\t if (tempNum == 0)\n\t \treturn false;\n\n\t return true;\n\t}",
"@Override\n public String toParamName(String name) {\n name = name.replaceAll(\"-\", \"_\");\n\n // if it's all uppper case, do nothing\n if (name.matches(\"^[A-Z_]*$\")) {\n return name;\n }\n\n // camelize(lower) the variable name\n // pet_id => petId\n name = camelize(name, true);\n\n // for reserved word or word starting with number, append _\n if (reservedWords.contains(name) || name.matches(\"^\\\\d.*\")) {\n name = escapeReservedWord(name);\n }\n\n return name;\n }",
"private static boolean nameIsValid(String name) {\n if (name.length() < 4 || name.length() > 11)\n return false;\n\n for (int i = 0; i < name.length(); i++) {\n int charIndex = name.charAt(i);\n\n // Each character can only be a letter or number\n if (charIndex < 48 || (charIndex > 57 && charIndex < 65) || (charIndex > 90 && charIndex < 97) || charIndex > 122)\n return false;\n }\n\n return true;\n }",
"public void testIllegalFowardSlashInName() throws Exception\r\n {\r\n try\r\n {\r\n new ComponentDirective( \r\n \"fred/blogs\", m_activation, m_collection, m_lifestyle, m_classname, \r\n m_categories, m_context, null, null );\r\n fail( \"Did not throw an IllegalArgumentException for a name with a '/'.\" ); \r\n }\r\n catch( IllegalArgumentException e )\r\n {\r\n // ok\r\n }\r\n }",
"private String fixName(String name, String prefix)\n {\n if (name.startsWith(prefix))\n return name.substring(prefix.length());\n return FIXME_INVALID_PREFIX + name;\n }",
"private String shortPrefix(String name) {\r\n StringBuilder b = new StringBuilder();\r\n String[] splits = name.split(\"_\");\r\n for (int i = 0; i < splits.length; ++i) {\r\n if (splits[i].length() > 0) {\r\n b.append(splits[i].charAt(0));\r\n }\r\n }\r\n if (b.length() < 3) {\r\n b.append(Integer.toString(name.length() % 10));\r\n }\r\n return b.toString().toLowerCase();\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(name.charAt(3));\n\t\t\n\t\t// .indexOf('h') method will provide the index of the character we need\n\t\tSystem.out.println((name.indexOf('h')));\n\t\t\n\t\t// .substring(3, 7) will have two arguments start and end index\n\t\tSystem.out.println(name.substring(3, 7));\n\t\t\n\t\t// .concat(\" swaminathan\") to concat the string\n\t\tSystem.out.println(name.concat(\" swaminathan\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public String getCharName(){return charName;}",
"private String extarctStudentName(String record) throws noStudentNameException{\n\t\tString name = record.substring(0, record.indexOf(':'));\n\t\tname = name.trim();\n\t\tcheckNameValidation(name);\n\t\treturn name;\n\t}",
"public void setName(String name) {\r\n this.name = name.trim();\r\n }",
"private static boolean isValidRegattaName(String name) {\n\t\tif(name.length() == 0) {\n\t\t\tSystem.out.println(\"\\nRegatta names must be atleast one character!\"); \n\t\t\treturn false;\n\t\t}\n\n\t\tif(name.indexOf('.') == -1 && name.length() != 0) return true;\n\t\telse {\n\t\t\tSystem.out.println(\"\\nRegatta names cannot have \\'.\\' in them!\"); \n\t\t\treturn false;\n\t\t}\n\t}",
"public String formatName(String name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();\n }",
"public static String underscoreName(String name) {\n\t\treturn name.substring(0, 1).toLowerCase() + name.substring(1).replaceAll(\"([A-Z])\", \"_$1\").toLowerCase();\n\t}",
"public void deleteCharFromName() {\n \t\tif (playerName.length() > 0 && state == 4) {\n \t\t\tplayerName = playerName.substring(0, playerName.length() - 1);\n \t\t}\n \t}",
"public SymName(String n) {\n\tn = n.trim();\n\tfullName = n;\n\tcomp = Util.findComponents(n);\n\tnum_comp = comp.length;\n\ttype = new int[num_comp];\n }",
"@AutoEscape\n\tpublic String getFirst_name();",
"@Test //TEST SIX\n void testSpecialCharactersBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"Champagne d'Argent\");\n assertFalse(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z- ][a-zA-z- ]*\"));\n }",
"public static boolean isNameValid(String name) {\r\n return name.matches(\"^[a-zA-Z ]+$\");\r\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"He said \\\"How are you ? \\\"\");//Print \"\" special character\n\t\tSystem.out.println(\"/n\");//print /n\n\t\tSystem.out.println(\"()\");// print ()\n\t\tSystem.out.println(\"\\'name\\'\");//print ''\n\t\t\n\n\t}",
"public static String getUserName (String name) {\r\n\r\n char intial = name.charAt (0);\r\n String intialString = \"\";\r\n intialString = intialString.valueOf (intial);\r\n name = intialString.toUpperCase () + name;\r\n\r\n return name;\r\n }",
"String getName( String name );",
"public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}",
"private static String getName(){\r\n\t\treturn new StringBuilder(input.next()).substring(0,3);\r\n\t}"
] | [
"0.6831323",
"0.6651633",
"0.6639623",
"0.65916246",
"0.64660084",
"0.63504004",
"0.6329461",
"0.62847805",
"0.6252123",
"0.62350893",
"0.6232564",
"0.622071",
"0.6198512",
"0.6169009",
"0.61670744",
"0.6122567",
"0.6100883",
"0.60567635",
"0.6053155",
"0.6049137",
"0.60436684",
"0.60001904",
"0.5998539",
"0.5975968",
"0.59741014",
"0.5972704",
"0.59673446",
"0.5961756",
"0.5929788",
"0.5927321",
"0.5916049",
"0.591538",
"0.591538",
"0.591538",
"0.591538",
"0.58975184",
"0.5891546",
"0.58861446",
"0.5869773",
"0.58564156",
"0.584224",
"0.58421046",
"0.5831042",
"0.58308506",
"0.5819678",
"0.58038074",
"0.5789963",
"0.5788499",
"0.578787",
"0.5775407",
"0.57746345",
"0.57613575",
"0.5751649",
"0.57427317",
"0.5736494",
"0.5733017",
"0.5728332",
"0.5724248",
"0.57161236",
"0.5714866",
"0.57121766",
"0.57037187",
"0.5693403",
"0.56912565",
"0.56734735",
"0.56525135",
"0.565162",
"0.56383765",
"0.563765",
"0.56328243",
"0.5625345",
"0.5623192",
"0.55969024",
"0.55950415",
"0.55717945",
"0.556743",
"0.55632854",
"0.55618876",
"0.5559261",
"0.5545871",
"0.5541022",
"0.5536577",
"0.55340576",
"0.55319816",
"0.5529778",
"0.5528463",
"0.55255854",
"0.5522173",
"0.5520624",
"0.551998",
"0.5513382",
"0.5511632",
"0.55086476",
"0.5508117",
"0.5507288",
"0.55063736",
"0.55036795",
"0.55020815",
"0.5496926",
"0.5492402"
] | 0.7227396 | 0 |
decimals = decimal = (decimal decimals)? | private boolean decimals() {
return OPT(GO() && decimal() && decimals());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int decimals() {\n return 0;\n }",
"public void setDecimals(int decimals) {\n this.converter.decimalsProperty().set(decimals);\n }",
"public void setNumDecimals(int numDecimals) {\n this.numDecimals = numDecimals;\n }",
"public int getDecimalDigits() { return 1; }",
"public int getDecimalDigits() { return 1; }",
"public String addDecimal();",
"static void parseDecimalAfterDot(Lexer<CSSToken, CharInput> lexer, CSSUnit defaultUnit, int beforeDecimal, BiConsumer<Integer, CSSUnit> toCall) throws IOException, ParserException {\n\t\tfinal CSSToken token = CSSParserHelperSize.parseDecimalAfterDot(lexer, defaultUnit,beforeDecimal, UNIT_OR_SEMICOLON_TOKENS, toCall);\n\t}",
"Object getPrecision();",
"Object getPrecision();",
"int getPrecision();",
"int getPrecision();",
"int getPrecision();",
"void insertDecimalPoint();",
"public void setDecimalPlaces(BigInteger decimalPlaces) {\n this.decimalPlaces = decimalPlaces;\n }",
"@Schema(example = \"8\", required = true, description = \"Number of token digits\")\n public Integer getDecimals() {\n return decimals;\n }",
"public static Percentage fromDecimalForm(Decimal decimal) {\n return of(decimal.movePoint(2));\n }",
"public SimpleIntegerProperty decimalsProperty() {\n return this.converter.decimalsProperty();\n }",
"private double roundDecimal(double value, int precision) {\n \tdouble precisionMultiple = Math.pow(10, precision);\n \treturn Math.round(value * precisionMultiple) / precisionMultiple;\n }",
"@Test\n public void testIsValidDecimal() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(1);\n assertEquals(true, result);\n }",
"private static BigDecimal roundDecimalValue(BigDecimal dec, int precision, boolean isHalfToEven)\n {\n if(isHalfToEven){\n return dec.setScale(precision, RoundingMode.HALF_EVEN);\n }\n else {\n int sgn = dec.signum();\n if (sgn < 0)\n return dec.setScale(precision, RoundingMode.HALF_DOWN);\n else\n return dec.setScale(precision, RoundingMode.HALF_UP);\n }\n }",
"int getPrecision(int iterations);",
"public boolean countDecimals(String assetValue){\n\n int count = 0;\n for(int i = 0; i < assetValue.length(); i++){\n\n if(assetValue.charAt(i) == '.'){\n count++;\n if(count > 1)\n return false;\n\n }\n\n }\n return true;\n }",
"public int getDecimalCount() {\r\n return decimalCount;\r\n }",
"public BigInteger getDecimalPlaces() {\n return decimalPlaces;\n }",
"public String check_after_decimal_point(double decimal) {\n String result = null;\n String[] after_point = String.valueOf(decimal).split(\"[:.]\");\n if (after_point[after_point.length - 1].equals(\"0\")) {\n result = after_point[0];\n } else {\n result = String.valueOf(decimal).replace(\".\", \",\");\n }\n return result;\n }",
"public void setFieldDecimal(int fieldDecimal)\n\t{\n\t\tthis.fieldDecimal = fieldDecimal;\n\t}",
"public void setPriceStd (BigDecimal PriceStd);",
"public int getFieldDecimal()\n\t{\n\t\treturn fieldDecimal;\n\t}",
"@Override\n public int getDecimalDigits() { return 0; }",
"public boolean isDecimal() {\n return false;\n }",
"private double roundToOneDecimal(double num) {\n\t\treturn (int)((10 * num) + 0.5) / 10.0;\n\t}",
"static void parsePossiblyDecimalSizeValue(Lexer<CSSToken, CharInput> lexer, CSSUnit defaultUnit, BiConsumer<Integer, CSSUnit> toCall) throws IOException, ParserException {\n\t\t\n\t\tCSSParserHelperSize.parsePossiblyDecimalSizeValue(\n\t\t\t\tlexer,\n\t\t\t\tdefaultUnit,\n\t\t\t\tINTEGER_OR_UNIT_OR_DOT_OR_SEMICOLON_OR_WS_OR_COMMENT_TOKENS,\n\t\t\t\tUNIT_OR_DOT_OR_SEMICOLON_OR_WS_OR_COMMENT_TOKENS,\n\t\t\t\tUNIT_OR_SEMICOLON_TOKENS,\n\t\t\t\ttoCall);\n\t}",
"public RemoteCall<BigInteger> decimals() {\n final Function function = new Function(FUNC_DECIMALS,\n Arrays.<Type>asList(),\n Arrays.<TypeReference<?>>asList(new TypeReference<Uint8>() {}));\n return executeRemoteCallSingleValueReturn(function, BigInteger.class);\n }",
"public DecimalConstant( BigDecimal value)\n {\n this( value, null);\n }",
"public CoordinatesGenerator decimals(int noDecimals) {\n latitude.decimals(noDecimals);\n longitude.decimals(noDecimals);\n return this;\n }",
"public interface PrecisionProvider {\n\n /**\n * Returns the number of digits that can be calculated precisely with a given amount of iterations.\n *\n * @param iterations The number of iterations you want to calculate\n * @return The number of digits that will be calculated correctly\n */\n int getPrecision(int iterations);\n\n /**\n * Calculates the number of iterations required for the specified level of precision. More information:\n * https://mathoverflow.net/q/261162/146822\n *\n * @param precision The level of precision you want to calculate.\n * @return The number of iterations required\n */\n int getNumIterations(int precision);\n}",
"@Test\n public void roundOffDecimalPoints() throws IOException {\n BigDecimal actual = Utils.roundOffDecimalPoints(new BigDecimal(1), 2, 2);\n Assert.assertEquals(\"100.00\", actual.toString());\n }",
"@Test\r\n\tpublic void test() {\n\t\tdouble actual = conv.dollarToRupees(25);\r\n\t\tassertEquals(2500.0,actual,0);\r\n\t\t//assertEquals(expected,actual,precision[delta])\r\n\t\t\r\n\t}",
"@Test\n public void testIsNotValidDecimal2() {\n FieldVerifier service = new FieldVerifier();\n boolean result = service.isValidDecimal(0);\n assertEquals(false, result);\n }",
"double roundThreeDecimals(double d) {\n \tDecimalFormat threeDForm = new DecimalFormat(\"#.###\");\n \treturn Double.valueOf(threeDForm.format(d));\n\t}",
"public static Percentage fromDecimalForm(double decimal) {\n return fromDecimalForm(Decimal.of(decimal));\n }",
"private void setDigitsAfterDot(int digits) {\n // check for logical error\n if(digits < 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setDigitsAfterDot\" , \"Negative digits number\");\n\n // exit from method\n return;\n } // end of if statement\n\n // set the digitsAfterDot\n digitsAfterDot = digits;\n\n }",
"public static void calculateDecimalNumber() {\n\t\tint number = 121;\n\t\tint base = 4;\n\t\tint remain = 0;\n\t\tint commaShift = 0;\n\t\tint decimalnumber = 0;\n\n\t\tswitch (base) {\n\t\tcase 1: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(1, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 2: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(2, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 3: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(3, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 4: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(4, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 5: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(5, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 6: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(6, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 7: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(7, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 8: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(8, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 9:\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(9, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\n\t}",
"@Override\r\n\tpublic Double precio() {\n\t\treturn this.combo.precio() + 50;\r\n\t}",
"public static void main(String[] args) {\n int myInt = 5;\n float myFloatValue = 5f / 3f;\n double myDoubleValue = 5d / 3f;\n System.out.println(\"my Int \" + myInt);\n System.out.println(\"my Int \" + myFloatValue);\n System.out.println(\"my Int \" + myDoubleValue);\n\n\n double numPounds = 200d;\n double converKil0 = numPounds * 0.45359237d;\n System.out.println(converKil0);\n\n double pi =3.14;\n }",
"@Test\n public void test01() {\n\n float a = 0.1f;\n float b = 0.2f;\n float c = 0.4f;\n float d = 0.6f;\n\n\n System.out.println(a+b);\n System.out.println(c+d);\n\n System.out.println(a+b == 0.3d);\n System.out.println(c+d == 1.0d);\n }",
"public boolean isDecimal(String sDecimalString) {\n return true;\n }",
"@JSProperty(\"allowDecimals\")\n boolean getAllowDecimals();",
"void setFractional(boolean fractional);",
"private void setUpFormat() {\n form = (DecimalFormat)NumberFormat.getNumberInstance();\n form.setMaximumFractionDigits(precision);\n }",
"public DecimalConstant( BigDecimal value, String format)\n {\n super( Type.NUMBER, value);\n setFormat( format);\n }",
"BigDecimal getValue();",
"boolean getFractional();",
"int getMaxPrecision();",
"public BigDecimal getPriceStd();",
"@Test\n public void test_column_type_detection_decimal() throws SQLException {\n ColumnInfo info = testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"123.4\", XSDDatatype.XSDdecimal), true, Types.DECIMAL, BigDecimal.class.getCanonicalName());\n Assert.assertEquals(16, info.getScale());\n Assert.assertEquals(16, info.getPrecision());\n Assert.assertTrue(info.isSigned());\n }",
"@Test\n public void testGetPricePerKilometer() {\n Float result = service.getPricePerKilometer();\n assertEquals(30.0F, result, 0.001);\n \n }",
"public Boolean getAllowDecimals() {\r\n return this.allowDecimals = getInstanceOf(Boolean.class, this.allowDecimals);\r\n }",
"public abstract double getFractionMultiplier();",
"public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}",
"public static double roundFee(double value, int decimals) {\r\n\t\t\r\n\t\tif (decimals<=0) return (double)Math.round(value);\r\n\t\tdouble divideby = Math.pow(10, (double)decimals);\r\n\t\tdouble rounded = Math.round(value * divideby)/((double)divideby);\r\n\t\treturn rounded;\r\n\t\t\r\n\t}",
"org.apache.xmlbeans.XmlDecimal xgetMultipleBetMinimum();",
"public BigDecimal getConvertedSplitQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedSplitQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}",
"public void setDecimal(java.math.BigDecimal param) {\n this.localDecimal = param;\n }",
"public BigDecimal getPriceLimit();",
"public int getPrecio(){\n return precio;\n }",
"public int getPrecision() { \n\t\tString bigdRep = this.getValue().toPlainString(); // wth?\n\t\tint precision = bigdRep.length();\n\t\tprecision = precision - bigdRep.lastIndexOf('.');\n\t\treturn precision;\n\t}",
"public double redondear(double decimal, int escala) {\n\n BigDecimal bd = new BigDecimal(decimal).setScale(escala, RoundingMode.HALF_UP);\n\n return Double.parseDouble(bd.toString());\n }",
"public String get_fraction_part();",
"private static int prec(char c) {\n\t\tif (c=='(' || c==')') {\n\t\t\treturn 3;\n\t\t}else if (c=='*' || c=='/') {\n\t\t\treturn 2;\n\t\t}else {\n\t\t\treturn 1;\n\t\t}\n\t}",
"public DoubleFormatter(int decimals) {\n this(decimals, 0.0);\n }",
"public double numberDots(LocationSet dot){\n\t\treturn -(dot.size()*10)/250;\n\t}",
"BigDecimal getPrice();",
"public TerminalRule getDECIMALRule() {\r\n\t\treturn gaXbase.getDECIMALRule();\r\n\t}",
"public static int anyBaseToDecimal(int n, int b){\n int val = 0;\n\n int p = 1;\n while(n > 0){\n int d = n % 10;\n n = n / 10;\n val += p * d;\n p = p * b;\n }\n\n return val;\n}",
"include<stdio.h>\nint main()\n{\n int celcius;\n float faren;\n scanf(\"%d\",&celcius);\n faren=(celcius*1.8)+32;\n printf(\"%.2f\",faren);\n \n}",
"public abstract void setDecimation(float decimation);",
"public double getPricePerSquareFoot(){\nreturn pricePerSquareFoot;\n}",
"@Override\n public float getPrecision() {\n return 0.09F;\n }",
"public int getDotsNumber ()\r\n {\r\n return dotsNumber;\r\n }",
"int main()\n{\n int p;\n float t;\n cin>>p>>t;\n if(t>13.30)\n if( p <= 13)\n cout<<\"$\"<<2<<\".00\";\n \telse\n cout<<\"$\"<<5<<\".00\";\n else\n if( p <= 13)\n cout<<\"$\"<<4<<\".00\";\n else\n cout<<\"$\"<<8<<\".00\";\n \n}",
"org.apache.xmlbeans.XmlDecimal xgetFractionalMinimum();",
"public void setPrecio(float precio) {\r\n this.precio = precio;\r\n }",
"public DecimalStyle getDecimalStyle() {\n return decimalStyle;\n }",
"@Test\n public void runQueriesWithDecimalValueCollision() throws Throwable\n {\n final int significandSizeInDecimalDigits = 512;\n // String.repeat(int) exists in JDK 11 and later, but this line was introduced on JDK 8\n String wideDecimalString = \"1.\" + StringUtils.repeat('0', significandSizeInDecimalDigits - 2) + '1';\n BigDecimal wideDecimal = new BigDecimal(wideDecimalString);\n // Sanity checks that this value was actually constructed as intended\n Preconditions.checkState(wideDecimal.precision() == significandSizeInDecimalDigits,\n \"expected precision %s, but got %s; string representation is \\\"%s\\\"\",\n significandSizeInDecimalDigits, wideDecimal.precision(), wideDecimalString);\n Preconditions.checkState(wideDecimalString.equals(wideDecimal.toPlainString()),\n \"expected: %s; actual: %s\", wideDecimalString, wideDecimal.toPlainString());\n\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (0, 1, 1.0)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (2, 0, \" + wideDecimalString + ')');\n\n // EQ queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec = 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n assertRows(execute(\"SELECT * FROM %s WHERE dec = \" + wideDecimalString),\n row(2, 0, wideDecimal));\n\n // LT/LTE queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec < \" + wideDecimalString),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec <= \" + wideDecimalString),\n row(0, 1, BigDecimal.valueOf(1.0D)),\n row(2, 0, wideDecimal));\n\n assertEmpty(execute(\"SELECT * FROM %s WHERE dec < 1.0\"));\n\n assertRows(execute(\"SELECT * FROM %s WHERE dec <= 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n // GT/GTE queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec > 1.0\"),\n row(2, 0, wideDecimal));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec >= \" + wideDecimalString),\n row(2, 0, wideDecimal));\n\n assertEmpty(execute(\"SELECT * FROM %s WHERE dec > \" + wideDecimalString));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec >= 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)),\n row(2, 0, wideDecimal));\n }",
"void setMaxPrecision(int value);",
"public void setField_737(java.math.BigDecimal value);",
"public final void mT__218() throws RecognitionException {\n try {\n int _type = T__218;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:216:8: ( 'decimal' )\n // InternalMyDsl.g:216:10: 'decimal'\n {\n match(\"decimal\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"void setValue(BigDecimal value);",
"public void setDecimalScale(int scale) {\n this.mScale = scale;\n }",
"@Test\n public void testBigDecimalConstructorDefaultCurrency() {\n new Money(new BigDecimal(\"1.231\"));\n }",
"int getPrecision(Object elementID) throws Exception;",
"int main()\n{\n int units,r;\n cin>>units;\n if (units<=200) {\n r=units*0.5;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=200 && units<=400){\n r=0.65*units+100;\n cout<<\"Rs.\"<<r;\n }\n else if (units>=400 && units<=600){\n r=0.8*units+200;\n cout<<\"Rs.\"<<r;\n }\n else{\n r=1.25*units+425;\n cout<<\"Rs.\"<<r;\n }\n}",
"public DecimalFormat decimalFormat() {\n return decimalFormat;\n }",
"public static String formatDecimal3Places(double x) {\n double scaleFactor = 1000.0;\n return String.format(\"%.3f\", round(x * scaleFactor) / scaleFactor);\n }",
"BigDecimal getVolume();",
"double roundTwoDecimals(double d) { \n DecimalFormat twoDForm = new DecimalFormat(\"#.##\"); \n return Double.valueOf(twoDForm.format(d));\n }",
"public static int findDecimal(int currentDecimal, int previousNum, int lastDecimal) {\n if (previousNum > currentDecimal) {\n return lastDecimal - currentDecimal;\n //if if previous is greater than current then subtract that\n } else {\n return lastDecimal + currentDecimal;\n //if previous value is smaller than current then add current to total\n }\n}",
"public void setDecimal(org.xmlsoap.schemas.soap.encoding.Decimal decimal)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.xmlsoap.schemas.soap.encoding.Decimal target = null;\r\n target = (org.xmlsoap.schemas.soap.encoding.Decimal)get_store().find_element_user(DECIMAL$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.xmlsoap.schemas.soap.encoding.Decimal)get_store().add_element_user(DECIMAL$0);\r\n }\r\n target.set(decimal);\r\n }\r\n }",
"@Test\n public void testMultiplic() {\n System.out.println(\"multiplic\");\n float num1 = 0.0F;\n float num2 = 0.0F;\n float expResult = 0.0F;\n float result = Calculadora_teste.multiplic(num1, num2);\n assertEquals(expResult, result, 0.0);\n \n }"
] | [
"0.6662191",
"0.6597821",
"0.65699357",
"0.6480049",
"0.6480049",
"0.6047243",
"0.5910934",
"0.5890632",
"0.5890632",
"0.58100617",
"0.58100617",
"0.58100617",
"0.57908607",
"0.57271135",
"0.5677114",
"0.56562614",
"0.55709684",
"0.55165184",
"0.55015993",
"0.5496151",
"0.5495974",
"0.5466408",
"0.543811",
"0.537851",
"0.53606516",
"0.535063",
"0.5333171",
"0.531502",
"0.5308457",
"0.53022367",
"0.52834773",
"0.5282973",
"0.5258176",
"0.5255971",
"0.5233289",
"0.52060014",
"0.5202512",
"0.5197185",
"0.51897866",
"0.51786083",
"0.5152857",
"0.5150575",
"0.51365185",
"0.51300144",
"0.510746",
"0.5099808",
"0.5098787",
"0.50986016",
"0.5085172",
"0.508467",
"0.50834996",
"0.5081884",
"0.5077787",
"0.50765765",
"0.50670403",
"0.5055068",
"0.5051803",
"0.5049008",
"0.50398576",
"0.5030537",
"0.5030146",
"0.502869",
"0.5025158",
"0.5025079",
"0.50209314",
"0.50207204",
"0.50179034",
"0.5011556",
"0.5006231",
"0.50054634",
"0.49867564",
"0.49843207",
"0.49719492",
"0.497175",
"0.49692687",
"0.49687836",
"0.49650365",
"0.4961154",
"0.49589083",
"0.49559176",
"0.49544555",
"0.49507266",
"0.49506953",
"0.49469268",
"0.49465784",
"0.4946095",
"0.49434486",
"0.494207",
"0.49407008",
"0.4933381",
"0.49292937",
"0.4928585",
"0.49274307",
"0.49271706",
"0.49241862",
"0.49212635",
"0.49204394",
"0.49178743",
"0.49097857",
"0.49057046"
] | 0.6772834 | 0 |
hex = decimal / 'ABCDEFabcdef' | private boolean hex() {
return ALT(GO() && decimal() || OK() && SET("ABCDEFabcdef"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Hexadecimal(int decimal){\n this.decimal = decimal;\n HexadecConverter hexCon = new HexadecConverter();\n this.hexString = new StringBuilder(hexCon.decToStr(decimal));\n }",
"private String formatHex(int decimal) {\n char[] bin = Integer.toBinaryString(decimal).toCharArray();\n //System.out.println(\"bin is \"+String.valueOf(bin) +\" length:\"+bin.length);\n while(bin.length< 4) {\n for(int i =4-bin.length; i<4;i++){\n bin = (\"0\"+ String.valueOf(bin)).toCharArray();\n }\n }\n //System.out.println(\"bin is \"+String.valueOf(bin));\n int len = bin.length -1;\n char[] temp = {bin[len-3], bin[len-2], bin[len-1], bin[len] };\n return formatHex(Integer.toHexString(Integer.parseInt(String.valueOf(temp), 2 )));\n }",
"private static int dec2hex(int dec) {\n if (dec > 255 || dec < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 255\");\n }\n return (dec / 100) * 256 + ((dec % 100) / 10) * 16 + dec % 100 % 10;\n }",
"private static String dec2hex(int dec) {\r\n\t\t// Initialize StringBuilder\r\n\t\tStringBuilder hex = new StringBuilder(\"0x\");\r\n\t\tint insert_position = 2;\r\n\r\n\t\t// Add a \"-\" for negative numbers and then work with the absolute value\r\n\t\tif (dec < 0) {\r\n\t\t\thex.insert(0, \"-\");\r\n\t\t\tinsert_position = 3;\r\n\t\t}\r\n\t\tdec = Math.abs(dec); // Get absolute value\r\n\r\n\t\t// Use do...while to make it work with dec = 0\r\n\t\tString hex_str_digit;\r\n\t\tdo {\r\n\t\t\tint hex_digit = dec % 16;\r\n\t\t\tdec /= 16;\r\n\t\t\thex_str_digit = dec_2_hex[hex_digit];\r\n\t\t\thex.insert(insert_position, hex_str_digit);\r\n\t\t} while(dec > 0);\r\n\r\n\t\t// Return hex string\r\n\t\treturn hex.toString();\r\n\t}",
"private static String pasarAHexadecimal(byte[] digest){\n String hash = \"\";\n for(byte aux : digest) {\n int b = aux & 0xff;\n if (Integer.toHexString(b).length() == 1) hash += \"0\";\n hash += Integer.toHexString(b);\n }\n return hash;\n }",
"public static String integer_to_hex(String chars){\n\t\tint decimal_number=0,i,j=1;\n\t\tString hex=\"\";\n\t\tfor(i=(chars.length()-1);i>=0;i--){ //converts decimal char array into integer form\n\t\t\tdecimal_number+=(j*char_to_int(chars.charAt(i)));\n\t\t\tj=j*10;\n\t\t}\n\t\tdo{ //Creates hexadecimal number based on division and mod of 16\n\t\t\tj=decimal_number%16;\n\t\t\thex=int_to_char_hex(j)+hex;\n\t\t\tdecimal_number=decimal_number/16;\n\t\t} while(decimal_number>0);\n\t\treturn hex;\n\t}",
"public String decimalToHexa(int numero) {\n\t\tSystem.out.print(\"Convirtiendo decimal (\" + numero + \") a hexadecimal >> \");\n\t\treturn Integer.toHexString(numero);\n\t}",
"static String decimel_to_hexa(int deci_address){\n\t\tString disp = \"\";\n\t\tfor(int i=0;i<4;i++){\n\t\t\tchar hex = hexa[deci_address%16];\n\t\t\tdisp = hex+disp;\n\t\t\tdeci_address/=16;\n\t\t}\n\t\treturn disp;\n\t}",
"private int hexToDecimal(String s)\n {\n String digits = \"0123456789ABCDEF\";//digits to define value based on position on this string\n s = s.toUpperCase();//changes the parameter value to uppercase\n int val = 0;//value starts with 0\n \n \n //loop for the as many characters as in \"s\"\n for (int i = 0; i < s.length(); i++)\n {\n char c = s.charAt(i);//gets character at position i from user input\n \n int d = digits.indexOf(c);//get index value of character from digits\n \n val = 16 * val + d;//calculates decimal num. Times 16 with itself each loop and adds the value of the character from digits in decimal form\n \n }\n return val;\n }",
"public String binToHex(String input) {\r\n int decimal = Integer.parseInt(input,2);\t\r\n\t\treturn Integer.toString(decimal,16);\t\r\n\t}",
"public static String unHex(String arg) { \r\n\t String str = \"\";\r\n\t for(int i=0;i<arg.length();i+=2)\r\n\t {\r\n\t String s = arg.substring(i, (i + 2));\r\n\t int decimal = Integer.parseInt(s, 16);\r\n\t str = str + (char) decimal;\r\n\t } \r\n\t return str;\r\n\t}",
"public static String decimal2Hex(int d) {\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tif (d == 0)\n\t\t\treturn \"0\";\n\t\tString hex = \"\";\n\t\twhile (d > 0) {\n\t\t\tint digit = d % 16; // rightmost digit\n\t\t\thex = digits.charAt(digit) + hex; // string concatenation\n\t\t\td = d / 16;\n\t\t}\n\t\treturn hex;\n\t}",
"private static char toHex(int nibble)\n\t{\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}",
"protected static String convertHex( String base )\r\n\t{\r\n\t\treturn \"H\" + HexConvertor.convertHex( base.getBytes() ); \r\n\t}",
"private static char toHex(int nibble) {\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}",
"private String makeHex(byte[] buffer) {\n byte current;\n int length = buffer.length;\n String blank = \"\"; // it's easier to change\n StringBuffer ret = new StringBuffer(2*length);\n\n // do for each half byte\n for(int i=0;i<(2*length);i++)\n {\n\t// mask half byte and move it to the right\n\tcurrent = i%2==1 ? (byte) (buffer[(i/2)] & 0x0F)\n\t : (byte) ((buffer[(i/2)] >> 4) & 0x0F);\n\t\n\t// convert half byte to ASCII char\t\t \n\tret.append((char) (current < 0x0A ? current+0x30 : current+0x37) + (i%2==1 ? blank : \"\"));\n }\n return ret.toString();\n }",
"private static char toHexDigit(int h) {\n char out;\n if (h <= 9) out = (char) (h + 0x30);\n else out = (char) (h + 0x37);\n //System.err.println(h + \": \" + out);\n return out;\n }",
"public String octaToHexa(int octal) {\n\t\tSystem.out.print(\"Convirtiendo octal (\" + octal + \") a Hexadecimal >> \");\n\t\tInteger numero = 0;\n\t\ttry{\n\t\t\tnumero = Integer.valueOf(String.valueOf(octal), 8);\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.err.print(\"\\nERROR : El numero \" + octal +\" no es octal\");\n\t\t}\n\t\treturn Integer.toHexString(numero.intValue());\n\t}",
"private static String hexDigit(byte x) {\n StringBuffer sb = new StringBuffer();\n char c;\n c = (char) ((x >> 4) & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n c = (char) (x & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n return sb.toString();\n }",
"private BigInteger hextodecimal(String hex) {\n\t\treturn new BigInteger(hex,16);\n\t}",
"private String Hexa(int num) {\n if (num < 0)\n {\n return Integer.toHexString(num).substring(4);\n }\n String str = Integer.toHexString(num);\n while (str.length()<4)\n {\n str = \"0\" + str;\n }\n return str;\n }",
"private static String binToHex(String bin) {\n\t\tString hex = \"\";\n\t\twhile (bin.length() % 4 != 0) { // comprueba si la cadena tiene longitud multiplo de 4\n\t\t\tbin = \"0\" + bin; // si no, le aņado un cero y vuelvo a comprobar si es multiplo de 4\n\t\t}\n\t\t// este while va cogiendo cachitos de 4, los pasa a hexadecimal y acumula en la variable hex\n\t\twhile (bin.length() != 0) { // el while continua hasta que la cadena tenga longitud cero\n\t\t\tString four = bin.substring(bin.length()-4); // cojo los 4 ultimos\n\t\t\thex = byteToHex(four) + hex; // paso 4 bits a hexadecimal y acumulo en hex\n\t\t\tbin = bin.substring(0, bin.length() - 4); // al string original le quito los cuatro bits que ya he procesado\n\t\t}\n\t\treturn hex; // cuando ha terminado el while, en hex tengo el hexadecimal completo\n\t\t\n\t}",
"private void toHex(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder tempsb = new StringBuilder(binary);\n\t\t\n\t\t\tfor (int i = 0;i<binary.length();i+=4){//maps each nibble to its binary value\n\t\t\t\tif (tempsb.substring(i,i+4).equals(\"0000\")) \n\t\t\t\t\tsb.append('0');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0001\"))\n\t\t\t\t\tsb.append('1');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0010\"))\n\t\t\t\t\tsb.append('2');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0011\"))\n\t\t\t\t\tsb.append('3');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0100\"))\n\t\t\t\t\tsb.append('4');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0101\"))\n\t\t\t\t\tsb.append('5');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0110\"))\n\t\t\t\t\tsb.append('6');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0111\"))\n\t\t\t\t\tsb.append('7');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1000\"))\n\t\t\t\t\tsb.append('8');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1001\"))\n\t\t\t\t\tsb.append('9');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1010\"))\n\t\t\t\t\tsb.append('A');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1011\"))\n\t\t\t\t\tsb.append('B');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1100\"))\n\t\t\t\t\tsb.append('C');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1101\"))\n\t\t\t\t\tsb.append('D');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1110\"))\n\t\t\t\t\tsb.append('E');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1111\"))\n\t\t\t\t\tsb.append('F');\n\t\t\t}\n\t\t\tsb.insert(0,\"0x\");\n\t\t\tbinary = sb.toString();\n\t}",
"private String toHex(byte[] data) {\r\n char[] chars = new char[data.length * 2];\r\n for (int i = 0; i < data.length; i++) {\r\n chars[i * 2] = HEX_DIGITS[(data[i] >> 4) & 0xf];\r\n chars[i * 2 + 1] = HEX_DIGITS[data[i] & 0xf];\r\n }\r\n return new String(chars);\r\n}",
"private String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n\n return buf.toString();\n }",
"private static int hex2dec(int hex) {\n if (hex > 0x255 || hex < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 0x255 (597)\");\n }\n return (hex / 256) * 100 + ((hex % 256) / 16) * 10 + hex % 256 % 16;\n }",
"@Test(dataProvider = \"dataForHexadecimal\")\n public void testToHexadecimal(int num, String hexadecimal) {\n String result = Tools.toHexadecimal(num);\n assertEquals(result, hexadecimal);\n System.out.println(\"testToHexadecimal()\");\n }",
"static String decimel_to_hexa_8bit(int deci_address){\n\t\tString disp = \"\";\n\t\tfor(int i=0;i<2;i++){\n\t\t\tchar hex = hexa[deci_address%16];\n\t\t\tdisp = hex+disp;\n\t\t\tdeci_address/=16;\n\t\t}\n\t\treturn disp;\n\t}",
"public String binarioToHexa(String binario) {\n\t\tSystem.out.print(\"Convirtiendo binario (\" + binario + \") a hexadecimal >> \");\n\t\tInteger numero = 0;\n\t\ttry{\n\t\t\tnumero = Integer.valueOf(binario, 2);\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.err.print(\"\\nERROR : El numero \" + binario + \" no es binario\");\n\t\t}\n\t\treturn Integer.toHexString(numero);\n\t}",
"private static String convertToHex(byte[] data) {\r\n StringBuffer buf = new StringBuffer();\r\n for (int i = 0; i < data.length; i++) {\r\n int halfbyte = (data[i] >>> 4) & 0x0F;\r\n int two_halfs = 0;\r\n do {\r\n if ((0 <= halfbyte) && (halfbyte <= 9)) {\r\n buf.append((char) ('0' + halfbyte));\r\n }\r\n else {\r\n buf.append((char) ('a' + (halfbyte - 10)));\r\n }\r\n halfbyte = data[i] & 0x0F;\r\n } while(two_halfs++ < 1);\r\n }\r\n return buf.toString();\r\n }",
"private static String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n return buf.toString();\n }",
"public int hexaToDecimal(String hexa) {\n\t\tSystem.out.print(\"Convirtiendo hexadecimal (\" + hexa + \") a Decimal >> \");\n\t\tInteger numero = 0;\n\t\ttry{\n\t\t\tnumero = Integer.valueOf(hexa, 16);\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.err.print(\"\\nERROR : El numero \" + hexa +\" no es hexadecimal\");\n\t\t}\n\t\treturn numero.intValue();\n\t}",
"public Hexadecimal(String hexString){\n this.hexString = new StringBuilder(hexString.toUpperCase());\n HexadecConverter hexCon = new HexadecConverter();\n this.decimal = hexCon.strToDec(hexString);\n }",
"static int hexa_to_deci(String hexa_address){\n\t\tint deci_val = 0;\n\t\tint multiply = 1;\n\t\tfor(int i=hexa_address.length()-1;i>=0;i--){\n\t\t\tint j=0;\n\t\t\tfor(;j<16;j++)\n\t\t\t\tif(hexa_address.charAt(i)==hexa[j])\n\t\t\t\t\tbreak;\n\t\t\tdeci_val+=(multiply*j);\n\t\t\tmultiply*=16;\n\t\t}\n\t\treturn deci_val;\n\t}",
"private void toDec(){\n\t\tlong temp = Long.parseLong(binary.substring(binary.length()/2, binary.length()));\n\t\tlong tempbin = 0;\n\t\tint j = 0;//splits the string in half with 2 for loops \n\t\tfor (int i = 0; i < binary.length()/2;i++){//second half of string\n\t\t\ttempbin+=((long)(Math.pow(2,j))*(temp%10));//convert binary to dec adding as it runs\n\t\t\ttemp/=10;\n\t\t\tj++;\n\t\t}\n\t\ttemp = Long.parseLong(binary.substring(0, binary.length()/2));//first half of string\n\t\tfor (int i = 0; i <= binary.length()/2;i++){\n\t\t\ttempbin+=((long)(Math.pow(2,j))*(temp%10));\n\t\t\ttemp/=10;\n\t\t\tj++;\n\t\t}\n\t\tbinary = Long.toString(tempbin);\n\t}",
"public static String toHexadecimal(final byte[] bytes) {\n\t\treturn new String(toHexadecimalChars(bytes));\n\t}",
"public int hexToDec(String input) {\r\n\t int decimal= Integer.parseInt(input,16); \r\n\t\treturn decimal;\t\t\r\n\t}",
"public static String hex_mult(String hex1, String hex2){\n\t\tint decimal1=0,decimal2=0,i,j=1;\n\t\tString hex_result=\"\";\n\t\tfor(i=(hex1.length()-1);i>=0;i--){ //Converts hexadecimal value 1 into decimal form\n\t\t\tdecimal1+=(j*char_to_int(hex1.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tj=1;\n\t\tfor(i=(hex2.length()-1);i>=0;i--){ //Converts hexadecimal value 2 into decimal form\n\t\t\tdecimal2+=(j*char_to_int(hex2.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tdecimal1*=decimal2;\n\t\thex_result=integer_to_hex(\"\"+decimal1); //Calls function to convert into hex value\n\t\treturn hex_result;\n\t}",
"public static String formatByteAsHex(byte a)\n {\n char guarismos[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};\n int i = signedByte2unsignedInteger(a);\n byte nibbleH = (byte)(i >> 4), nibbleL = (byte)(i & 0x0F);\n\n return \"\" + guarismos[nibbleH] + guarismos[nibbleL];\n }",
"public String toHexString()\n\t{\n\t\t// holds the string builder object to return\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\t// for every byte\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\tint intCurrent = bytes[i] & 0xFF;\n\t\t\t\n\t\t\t// check to see if a leading 0 is needed\n\t\t\tif (intCurrent < 0x10)\n\t\t\t{\n\t\t\t\t// append a 0\n\t\t\t\tsb.append(0);\n\t\t\t}\n\t\t\t\n\t\t\tString s = Integer.toHexString(intCurrent).toUpperCase();\n\t\t\t\n\t\t\t// append the character\n\t\t\tsb.append(s);\n\t\t}\n\t\t\n\t\t// return the string\n\t\treturn sb.toString();\n\t}",
"private String toHex(byte[] array)\n {\n BigInteger bi = new BigInteger(1, array);\n String hex = bi.toString(16);\n int paddingLength = (array.length * 2) - hex.length();\n if(paddingLength > 0) \n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n else\n return hex;\n }",
"private String toHex(byte[] bytes) {\n StringBuilder s = new StringBuilder(bytes.length * 2);\n for (byte b : bytes) {\n s.append(String.format(\"%02x\", b));\n }\n return s.toString();\n }",
"private static String toHex(byte[] hash) {\n StringBuilder hashedInput = new StringBuilder(\"\");\n for (int i = 0; i < hash.length; i++) {\n String hex = Integer.toHexString(0xff & hash[i]);\n if (hex.length() == 1) {\n hashedInput.append('0');\n }\n hashedInput.append(hex);\n }\n return hashedInput.toString();\n }",
"@Test\n public void testBytesToHexString() {\n String testHex = ByteUtils.bytesToHexString(testBytes); \n assertEquals(testHex.length(), testBytes.length * 2);\n }",
"private static String getBinaryFromDecimal(int decimal)\n\t{\n\n\t\tif( decimal == 0 )\n\t\t{\n\t\t\treturn \"00000000\";\n\t\t}\n\n\t\tif( decimal == 1 )\n\t\t{\n\t\t\treturn \"00000001\";\n\t\t}\n\n\t\tchar[] binary = {'0', '0', '0', '0', '0', '0', '0', '0'};\n\t\tint exponent, value;\n\n\t\tdo\n\t\t{\n\t\t\texponent = getNearestPowerOfTwo(decimal);\n\t\t\tbinary[7-exponent] = '1';\n\t\t\tvalue = (int)Math.pow(2, exponent);\n\t\t\tdecimal = decimal - value;\n\t\t}\n\t\twhile( decimal > 0 );\n\n\t\treturn new String(binary);\n\t}",
"public String byte2hex(byte[] b) {\n String hs = \"\";\n String stmp = \"\";\n for (int n = 0; n < b.length; n++) {\n stmp = (java.lang.Integer.toHexString(b[n] & 0XFF));\n if (stmp.length() == 1) {\n hs = hs + \"0\" + stmp;\n } else {\n hs = hs + stmp;\n }\n\n if (n < b.length - 1) {\n hs = hs + \"\";\n }\n }\n\n return hs;\n }",
"public static int hex2Decimal(String s) {\n\t\tString digits = \"0123456789ABCDEF\";\n\t\ts = s.toUpperCase();\n\t\tint x = s.indexOf(\"X\");\n\t\tif (x >= 0) {\n\t\t\ts = s.substring(x + 1);\n\t\t}\n\t\tint val = 0;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\treturn val;\n\t}",
"@Test\n public void testToHex() \n {\n System.out.println(\"toHex\");\n String argument = \"12\";\n Converter instance = new Converter();\n String expResult = \"C\";\n String result = instance.toHex(argument);\n \n //assert that the result we expect comes out. If the result that is expecte is generated then the test will pass. If not, then it will fail\n assertEquals(expResult, result);\n assertEquals(\"D\", instance.toHex(\"13\"));\n assertEquals(\"7B\", instance.toHex(\"123\"));\n assertEquals(\"D\", instance.toHex(\"13\"));\n assertEquals(\"2710\", instance.toHex(\"10000\"));\n }",
"public static String byteArrayToHexString(byte[] a) \r\n{\r\n\tStringBuilder sb = new StringBuilder(a.length * 2);\r\n\tfor(byte b: a)\r\n\tsb.append(String.format(\"%02x\", b));\r\n\treturn sb.toString();\r\n}",
"private static String toHex(byte[] array) {\r\n\t\tBigInteger bi = new BigInteger(1, array);\r\n\t\tString hex = bi.toString(16);\r\n\t\tint paddingLength = (array.length * 2) - hex.length();\r\n\t\tif (paddingLength > 0)\r\n\t\t\treturn String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\r\n\t\telse\r\n\t\t\treturn hex;\r\n\t}",
"public static char[] toHexadecimalChars(final byte[] bytes) {\n\t\tfinal char[] chars = new char[bytes.length * 2];\n\t\tfor (int i = 0, j = 0; i < bytes.length; i++, j += 2) {\n\t\t\tfinal int v = bytes[i] & 0xFF;\n\t\t\tchars[j] = toHexChar(v >>> 4);\n\t\t\tchars[j + 1] = toHexChar(v & 0x0F);\n\t\t}\n\t\treturn chars;\n\t}",
"public static String formatIntAsHex(int a)\n {\n char guarismos[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};\n String msg = \"\";\n byte b;\n\n b = (byte)((a & 0xFF000000) >> 24);\n msg += formatByteAsHex(b);\n b = (byte)((a & 0x00FF0000) >> 16);\n msg += formatByteAsHex(b);\n b = (byte)((a & 0x0000FF00) >> 8);\n msg += formatByteAsHex(b);\n b = (byte)((a & 0x000000FF));\n msg += formatByteAsHex(b);\n\n return msg;\n }",
"private int[] charToHexa(char c){\n int[] hex = new int[2];\n String h = Integer.toHexString((int) c);\n if (h.length() == 1){\n h = \"0\" + h;\n }\n hex[0] = Integer.parseInt(h.substring(0,1), 16);\n hex[1] = Integer.parseInt(h.substring(1), 16);\n return hex;\n }",
"private static String toHex(byte[] array)\n\t {\n\t BigInteger bi = new BigInteger(1, array);\n\t String hex = bi.toString(16);\n\t int paddingLength = (array.length * 2) - hex.length();\n\t if(paddingLength > 0)\n\t return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n\t else\n\t return hex;\n\t }",
"public static byte[] hexStringToByteArray(String hex) \r\n{\r\n\tif((hex.length()%2)==1) // Falls die Länge des Strings ungerade ist, wird eine 1 angehängt\r\n\t{\r\n\t\tchar c = '1';\r\n\t\thex += c;\r\n\t\tSystem.out.println(\"Fehler in Convert.hexStringToByteArray: Ungerade String-Zeichenfolge!\");\r\n\t}\r\n\tint l = hex.length();\r\n\tbyte[] data = new byte[l/2];\r\n\tfor (int i = 0; i < l; i += 2) \r\n\t{\r\n\t\tdata[i/2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i+1), 16));\r\n\t}\r\n\treturn data;\r\n}",
"private static String bytesToHex(byte[] bytes) {\n StringBuilder result = new StringBuilder();\n\n for (byte byt : bytes) {\n result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));\n }\n\n return result.toString();\n }",
"private static String toHex(final byte[] array) {\n final BigInteger bi = new BigInteger(1, array);\n final String hex = bi.toString(16);\n final int paddingLength = (array.length * 2) - hex.length();\n if (paddingLength > 0) {\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n } else {\n return hex;\n }\n }",
"private String toHexString(byte[] bytes) {\n StringBuilder hexString = new StringBuilder();\n for (int i = 0; i < bytes.length; i++) {\n String hex = Integer.toHexString(0xFF & bytes[i]);\n if (hex.length() == 1) {\n hexString.append('0');\n }\n hexString.append(hex);\n }\n\n return hexString.toString().toUpperCase();\n }",
"static String convert(String bits) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(String.valueOf(hexLookUp.charAt(Integer.parseInt(bits, 2))));\n\t\tString hex = stringBuilder.toString();\n\t\treturn hex;\n\t}",
"public String hex(int number) {\n if(number == 0) {\n return \"0x0\";\n }\n StringBuilder result = new StringBuilder();\n int curr = 0;\n char ch = ' ';\n while(number > 0) {\n curr = number % 16;\n number = number / 16;\n if(curr < 10) {\n ch = (char)(curr + '0');\n }\n else {\n curr = curr % 10;\n ch = (char)(curr + 'A');\n }\n result.append(ch);\n }\n result.append(\"x0\");\n result.reverse();\n return result.toString();\n }",
"public static String prettyHex(final byte value) {\n return prettyHex(new byte[] {value});\n }",
"public static String getCorrectHexValue(int inp) {\n String hx = Integer.toHexString((char)inp);\n\n if (hx.length() == 0)\n return \"00\";\n else if (hx.length() == 1)\n return \"0\" + hx;\n else if (hx.length() == 2)\n return hx;\n else if (hx.length() == 4)\n return hx.substring(2);\n else {\n System.out.println(\"Hex Error: \" + inp);\n }\n\n return null;\n }",
"private static String toHex(byte buffer[]) {\n\t\tStringBuffer sb = new StringBuffer(buffer.length * 2);\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tsb.append(Character.forDigit((buffer[i] & 0xf0) >> 4, 16));\n\t\t\tsb.append(Character.forDigit(buffer[i] & 0x0f, 16));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"static private String hexEncode(byte[] bytes) {\n StringBuffer result = new StringBuffer();\n for (int i = 0; i < bytes.length; i++) {\n byte b = bytes[i];\n result.append(DIGITS[(b & 0xf0) >> 4]);\n result.append(DIGITS[b & 0x0f]);\n }\n return result.toString();\n }",
"private static String byteToHex(byte b) {\n\t\tchar hexDigit[] = {\n\t\t\t\t'0', '1', '2', '3', '4', '5', '6', '7',\n\t\t\t\t'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'\n\t\t};\n\t\tchar[] array = {hexDigit[(b >> 4) & 0x0f], hexDigit[b & 0x0f]};\n\t\treturn new String(array);\n\t}",
"public static String toHexString(int b)\n\t{\n\t\tchar[] digits = new char[2];\n\t\tb = b & 255;\n\t\tdigits[0] = hexDigits[b / 0x10];\n\t\tdigits[1] = hexDigits[b % 0x10];\n\t\treturn new String(digits);\n\t}",
"private static String byteToHexString(byte b) {\n int n = b;\n if (n < 0) {\n n += 256;\n }\n int d1 = n >> 4;\n int d2 = n % 16;\n return hexDigits[d1] + hexDigits[d2];\n }",
"public String toHex(String arg) throws UnsupportedEncodingException {\n\t return String.format(\"%064x\", new BigInteger(1, arg.getBytes(\"UTF8\")));\n\t}",
"private static String toHex(byte[] array) {\r\n BigInteger bi = new BigInteger(1, array);\r\n String hex = bi.toString(16);\r\n int paddingLength = (array.length * 2) - hex.length();\r\n if (paddingLength > 0) {\r\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\r\n } else {\r\n return hex;\r\n }\r\n }",
"@Test\n public void testDecToHex() {\n Assert.assertEquals(\"41\", Cipher_Helper.decToHex(65));\n Assert.assertEquals(\"5A\", Cipher_Helper.decToHex(90));\n Assert.assertEquals(\"4D\", Cipher_Helper.decToHex(77));\n }",
"private static int transformHexCharToInt(byte val) throws HyracksDataException {\n switch (val) {\n case '0':\n return 0;\n case '1':\n return 1;\n case '2':\n return 2;\n case '3':\n return 3;\n case '4':\n return 4;\n case '5':\n return 5;\n case '6':\n return 6;\n case '7':\n return 7;\n case '8':\n return 8;\n case '9':\n return 9;\n case 'a':\n case 'A':\n return 10;\n case 'b':\n case 'B':\n return 11;\n case 'c':\n case 'C':\n return 12;\n case 'd':\n case 'D':\n return 13;\n case 'e':\n case 'E':\n return 14;\n case 'f':\n case 'F':\n return 15;\n default:\n throw new RuntimeDataException(ErrorCode.INVALID_FORMAT);\n }\n }",
"private static String byteToHexString(final byte hash) {\n\t\tint n = hash;\n\t\tif (n < 0) {\n\t\t\tn = 256 + n;\n\t\t}\n\t\tint d1 = n / 16;\n\t\tint d2 = n % 16;\n\t\treturn FileHashingUtils.hexDigits[d1] + FileHashingUtils.hexDigits[d2];\n\t}",
"public static int decimalToAnyBase(int n, int b){\n int val = 0;\n\n int p = 1;\n while(n > 0){\n int d = n % b;\n n = n / b;\n val += p * d;\n p = p * 10;\n }\n\n return val;\n}",
"public static String hexToString(String txtInHex) {\n \tint groupLength = 2;\n StringBuilder sb = new StringBuilder(txtInHex.length() / groupLength);\n \n for (int i = 0; i < txtInHex.length() - groupLength + 1; i += groupLength) {\n String hex = txtInHex.substring(i, i + groupLength);\n sb.append((char) Integer.parseInt(hex, 16));\n }\n \n return sb.toString();\n }",
"public static String dectohex(long dec) {\n return Long.toHexString(dec).toUpperCase();\n }",
"public static String stupidStringToHex(String s){\n\t\tfinal double div = 96;\n\t\tint length = (int)(s.length() / 3);\n\t\treturn makeHexColor((addString(s.substring(0, length - 1)) % div) / div, (addString(s.substring(length, (2 * length) - 1)) % div) / div, (addString(s.substring((2 * length) - 1, s.length() - 1)) % div) / div);\n\t}",
"public void binToHex(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toHex();\n\t\t\tthis.outHex();\n\t\t}\n\t}",
"public static String hex_sum(String hex1, String hex2){\n\t\tint decimal1=0,decimal2=0,i,j=1;\n\t\tString hex_result=\"\";\n\t\tfor(i=(hex1.length()-1);i>=0;i--){ //Converts hexadecimal value 1 into decimal form\n\t\t\tdecimal1+=(j*char_to_int(hex1.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tj=1;\n\t\tfor(i=(hex2.length()-1);i>=0;i--){ //Converts hexadecimal value 2 into decimal form\n\t\t\tdecimal2+=(j*char_to_int(hex2.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tdecimal1+=decimal2;\n\t\thex_result=integer_to_hex(\"\"+decimal1); //Calls function to convert into hex value\n\t\treturn hex_result;\n\t}",
"public static String stringToHex(String string) \n {\n StringBuilder buf = new StringBuilder(200);\n for (char ch: string.toCharArray()) \n {\n buf.append(String.format(\"%02X\", (int) ch)); //Cambiado %02x por %02X pra que las letras del hexadecimal salgan en mayusculas\n }\n return buf.toString();\n }",
"private static String hex(String binStr) {\n\n\n\t\tString newStr = new String();\n\n\t\ttry {\n\t\t\tString hexStr = \"0123456789ABCDEF\";\n\t\t\tbyte[] p = binStr.getBytes();\n\t\t\tfor (int k = 0; k < p.length; k++) {\n\t\t\t\tint j = (p[k] >> 4) & 0xF;\n\t\t\t\tnewStr = newStr + hexStr.charAt(j);\n\t\t\t\tj = p[k] & 0xF;\n\t\t\t\tnewStr = newStr + hexStr.charAt(j) + \" \";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"Failed to convert into hex values: \" + e);\n\t\t}\n\t\treturn newStr;\n\t}",
"private StringBuilder hexConversion(StringBuilder input) {\n\t\tStringBuilder finalRes = new StringBuilder();\n\t\tString currentVal = \"\";\n\t\tchar tempVal = ' ';\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\t\n\t\t\ttempVal = input.charAt(i);\n\t\t\t\n\t\t\tif(isOperator(input.charAt(i)) == false)\n\t\t\t{\n\t\t\t\tcurrentVal = currentVal + Character.toString(tempVal);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(currentVal);\n\t\t\t\tString digits = \"0123456789ABCDEF\";\n\t\t\t\tint val = 0;\n\t\t\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tchar c = currentVal.charAt(j);\n\t\t\t\t\tint d = digits.indexOf(c);\n\t\t\t\t\tval = 16 * val + d;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfinalRes.append(val + Character.toString(tempVal));\n\t\t\t\tcurrentVal = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tSystem.out.println(currentVal);\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tint val = 0;\n\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t{\n\t\t\tchar c = currentVal.charAt(j);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\t\n\t\tfinalRes.append(val);\n\t\t\n\t\t\n\t\treturn finalRes;\n\t}",
"private String decToHex(int d) {\n\t\treturn \"\" + Integer.toHexString(d);\n\t}",
"short digits();",
"public static String toHex(byte[] bytes)\n {\n\n if (bytes == null)\n {\n return null;\n }\n\n StringBuilder builder = new StringBuilder();\n for (int i = 0; i < bytes.length; i++)\n {\n int value = (int) bytes[i];\n\n builder.append(HEX_CHARS.charAt((value >> 4) & 0x0F));\n builder.append(HEX_CHARS.charAt(value & 0x0F));\n }\n\n return builder.toString();\n }",
"public static int HexToInt(int hex) {\n int ret = 0;\n int i = 0;\n\n while (hex > 0) {\n ret += (hex % 10) * Math.pow(BASE, i);\n hex /= 10;\n i++;\n }\n\n return ret;\n }",
"public static String bytetohex(byte[] bytearray) {\n\t\tStringBuffer sb = new StringBuffer();\n\t\tfor (byte b : bytearray) {\n\t\t\tString x = Integer.toHexString((int) (b & 0xFF));\n\t\t\tif (x.length() == 1) {\n\t\t\t\tsb.append(String.valueOf(0));\n\t\t\t}\n\t\t\tsb.append(x);\n\t\t}\n\t\tif (sb.length() % 2 != 0) {\n\t\t\tsb.insert(0, 0);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public static BigInteger getHex(int i)\n {\n\tBigInteger bii = new BigInteger(\"\"+i);\n\tBigInteger tmp = bii;\n\ttmp = tmp.multiply(bi2);\n\ttmp = tmp.add(bim1);\n\ttmp = tmp.multiply(bii); //i*(2*i - 1)\n\treturn tmp;\n }",
"public String interpretHexadecimal(String angles) {\n\t\t//An easy way to break apart a list of things is to make a Scanner on it\n\t\t//This Scanner is unrelated to any other variables with the same name because this\n\t\t//one is only meaningful inside this method. Also, this scanner does not read from the\n\t\t//console! It only operates over the one String you created it on, namely angles. \n\t\tScanner s = new Scanner(angles);\n\t\t//You can tell each Scanner what you want it to use to break up the String. \n\t\t//Making it a comma, when you call next() you get whatever is between the commas.\n\t\t//Pretty convenient. \n\t\ts.useDelimiter(\",\");\n\t\t\n\t\t//TODO: Complete this method :) \n\t\tString hexNumber1=\"\";\n\t\tString hexNumber2=\"\";\n\t\tString hexNumber=\"\";\n\t\tString result=\"\";\n\t\tint k = 0;\n\t\tint i = 0;\n\t\t\n\t\twhile (s.hasNext()){\n\t\t\tif (i==0){\n\t\t\t\thexNumber1=Integer.toHexString((int)Math.floor(Double.parseDouble(s.next())/22.5));\n\t\t\t}\n\t\t\telse if(i==1){\n\t\t\t\thexNumber2=Integer.toHexString((int)Math.floor(Double.parseDouble(s.next())/22.5));\n\t\t\t\thexNumber=hexNumber1+hexNumber2;\n\t\t\t\tk = Integer.parseInt(hexNumber,16);\n\t\t\t\tchar a = (char)k;\n\t\t\t\tresult += a;\n\t\t\t\ti=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t\t\n\t}",
"public static String toHex(int num) {\n if(num==0) return \"0\";\n StringBuilder sb=new StringBuilder();\n while(num!=0){\n sb.append(intToHex(num&15));\n num >>>= 4; //Its not >> but >>>. >> will copy the sign bit. 10000 will become 11000 with >>, and 01000 with >>>.\n } //>> is called arithmetic shift. >>> is logical shift.\n return sb.reverse().toString();\n }",
"protected static final int getDecFromHex(String inputHex) {\r\n\t\t// msb should be leftmost but for parsing , we use it like lsb per gsv's protocol specification\r\n\t\tString lsb = inputHex.substring(0, 2);\r\n\t\tString msb = inputHex.substring(2, 4);\r\n\r\n\t\tint val = ( Integer.parseInt(msb, 16) * 256 ) + ( Integer.parseInt(lsb, 16) * 1 );\r\n//\t\tGQDKPMConstants.logger.debug(\"incoming lsb = \" + lsb +\" lsb hex-dec = \"+Integer.parseInt(lsb, 16) * 1 +\r\n//\t\t\t\t\" , msb = \"+ msb + \" msb hex-dec = \"+Integer.parseInt(msb, 16) * 256 + \" , val = \" + val );\r\n\t\treturn val;\r\n\t}",
"public int strToDec(String str){\n int decimal = 0;\n Stack<Integer> hexStack = new Stack<>();\n\n for(int i = 0; i < str.length(); i++)\n {\n hexStack.push(this.hexabet.indexOf(str.charAt(i)));\n }\n\n for(int i = 0; hexStack.size() > 0; i++)\n {\n decimal += hexStack.pop() * Math.pow(16, i);\n }\n return decimal;\n }",
"private int decToOctal(int decimal)\n {\n\t\t ArrayList<Integer> oct_num = new ArrayList<Integer>();\n\t\t int octal= 0;\n\t\t \n\t\t \n\t \n\t while(decimal != 0)\n\t {\n\t \t oct_num.add(decimal%8);//remainder represents one digit in octal. Adding it to the arraylist.\n\t \t decimal /= 8;//\"%\" does not divide the number, it only gets the remainder, so it requires this division to reach 0.\n\t }\n\t \n\t \n\t \n\t //for loop to combine values of each oct_num array into one integer value\n\t int unit = 1;//first value of the array list represents unit of 1\n\t for(int i = 0; i < oct_num.size(); i++) \n\t { \t\n\t \toctal = octal + (oct_num.get(i) * unit) ;\n\t unit *= 10;//unit is timed by ten after each loop\n\t \n\t }\n\t\t return octal;\n }",
"public static String toHex(byte[] b) {\r\n\tStringBuffer buf;\r\n\tint i;\r\n\r\n\tbuf = new StringBuffer(b.length * 2);\r\n\r\n\tfor (i = 0; i < b.length; i++) {\r\n\t buf.append(HEX.charAt((b[i] >> 4) & 15));\r\n\t buf.append(HEX.charAt(b[i] & 15));\r\n\t}\r\n\treturn buf.toString();\r\n }",
"private String convertToHex(byte[] raw) {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < raw.length; i++) {\n sb.append(Integer.toString((raw[i] & 0xff) + 0x100, 16).substring(1));\n }\n return sb.toString();\n }",
"private static char toHexChar(final int number) {\n\t\tif (number >= 0x00 && number <= 0x09) {\n\t\t\t// ASCII codes from 0 to 9\n\t\t\treturn (char) (0x30 + number);\n\t\t} else if (number >= 0x0a && number <= 0x0f) {\n\t\t\t// ASCII codes from 'a' to 'f'\n\t\t\treturn (char) (0x57 + number);\n\t\t}\n\t\treturn 0;\n\t}",
"private static int toDecimal(String binary) {\n\t\tint decimal = 0;\n\n\t\tfor(int i = binary.length()-1; i >= 0; i--) {\n\t\t\tif(i == 4) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 1;}\n\t\t\t}\n\t\t\telse if(i == 3) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 2;}\n\t\t\t}\n\t\t\telse if(i == 2) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 4;}\n\t\t\t}\n\t\t\telse if(i == 1) {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 8;}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(binary.charAt(i) == '1') {decimal += 16;}\n\t\t\t}\n\t\t}\n\n\t\treturn decimal;\n\t}",
"public final void mHEX() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:573:5: ( ( 'A' .. 'F' | 'a' .. 'f' | '0' .. '9' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:573:7: ( 'A' .. 'F' | 'a' .. 'f' | '0' .. '9' )\n {\n if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {\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 String decToHex(int input) {\r\n\t String Hexcode = Integer.toHexString(input);\r\n\t\treturn Hexcode;\t\t\r\n\t}",
"private String ByteArrayToHexString(byte [] inarray) {\n int i, j, in;\n String [] hex = {\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"A\",\"B\",\"C\",\"D\",\"E\",\"F\"};\n String out= \"\";\n\n for(j = 0 ; j < inarray.length ; ++j)\n {\n in = (int) inarray[j] & 0xff;\n i = (in >> 4) & 0x0f;\n out += hex[i];\n i = in & 0x0f;\n out += hex[i];\n }\n return out;\n }",
"private static String toHex(byte[] array) throws NoSuchAlgorithmException {\n\n BigInteger bi = new BigInteger(1, array);\n String hex = bi.toString(16);\n int paddingLength = (array.length * 2) - hex.length();\n if (paddingLength > 0) {\n return String.format(\"%0\" + paddingLength + \"d\", 0) + hex;\n } else {\n return hex;\n }\n }"
] | [
"0.7305943",
"0.72916436",
"0.66362786",
"0.63377196",
"0.63240814",
"0.62708646",
"0.6265755",
"0.6244518",
"0.6205297",
"0.6121477",
"0.6049216",
"0.60467964",
"0.5960746",
"0.589422",
"0.5892163",
"0.58890927",
"0.5864716",
"0.58600277",
"0.58448535",
"0.5843575",
"0.580554",
"0.57804483",
"0.5780274",
"0.5779193",
"0.5759821",
"0.5744168",
"0.5718006",
"0.5705538",
"0.57031715",
"0.5681761",
"0.56659615",
"0.56544584",
"0.5628468",
"0.5625353",
"0.5601727",
"0.55990314",
"0.559793",
"0.5559937",
"0.555201",
"0.5543221",
"0.55406654",
"0.55372924",
"0.5524493",
"0.5520404",
"0.55139774",
"0.55103624",
"0.5485575",
"0.5481383",
"0.5458054",
"0.54402214",
"0.54363906",
"0.5434264",
"0.54076344",
"0.5399602",
"0.5396372",
"0.5396368",
"0.5391943",
"0.5388874",
"0.53813744",
"0.5381079",
"0.53792596",
"0.5366995",
"0.53654593",
"0.5361223",
"0.53516567",
"0.5350517",
"0.5343926",
"0.5336318",
"0.532865",
"0.53085744",
"0.53031105",
"0.53007895",
"0.52887785",
"0.5282751",
"0.5276634",
"0.5264395",
"0.5263369",
"0.5261976",
"0.52595115",
"0.5257703",
"0.52568746",
"0.52541167",
"0.5253567",
"0.52512556",
"0.5250306",
"0.52349967",
"0.52270293",
"0.5222012",
"0.521861",
"0.5216556",
"0.52136135",
"0.51977926",
"0.5190757",
"0.5188256",
"0.5183278",
"0.51674783",
"0.5166995",
"0.51649904",
"0.5159644",
"0.5157402"
] | 0.52892447 | 72 |
hexes = hex = (hex hexes)? | private boolean hexes() {
return OPT(GO() && hex() && hexes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String unHex(String arg) { \r\n\t String str = \"\";\r\n\t for(int i=0;i<arg.length();i+=2)\r\n\t {\r\n\t String s = arg.substring(i, (i + 2));\r\n\t int decimal = Integer.parseInt(s, 16);\r\n\t str = str + (char) decimal;\r\n\t } \r\n\t return str;\r\n\t}",
"public void pasteHexes(LinkedList hexes)\n {\n pasting = true;\n resetCursor();\n pasteHexes = hexes;\n }",
"private static String pasarAHexadecimal(byte[] digest){\n String hash = \"\";\n for(byte aux : digest) {\n int b = aux & 0xff;\n if (Integer.toHexString(b).length() == 1) hash += \"0\";\n hash += Integer.toHexString(b);\n }\n return hash;\n }",
"static String convert(String bits) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(String.valueOf(hexLookUp.charAt(Integer.parseInt(bits, 2))));\n\t\tString hex = stringBuilder.toString();\n\t\treturn hex;\n\t}",
"public String getHexa() {\n\t\treturn String.format(\"#%02x%02x%02x\", getRed(), getGreen(), getBlue());\t\t\t\t\n\t}",
"public static int[] getColorHex(String hex){\n\t\tchar[] chars = hex.toCharArray();\n\t\t int index = chars[0]=='#'?1:0;\n\t\t return new int[]{\n\t\t (chars[index+0]<65?chars[index+0]&(0xF):9+chars[index+0]&(0xF))<<4 | (chars[index+1]<65?chars[index+1]&(0xF):9+chars[index+1]&(0xF)),\n\t\t (chars[index+2]<65?chars[index+2]&(0xF):9+chars[index+2]&(0xF))<<4 | (chars[index+3]<65?chars[index+3]&(0xF):9+chars[index+3]&(0xF)),\n\t\t (chars[index+4]<65?chars[index+4]&(0xF):9+chars[index+4]&(0xF))<<4 | (chars[index+5]<65?chars[index+5]&(0xF):9+chars[index+5]&(0xF))\n\t\t };\n\t}",
"private boolean hex() {\r\n return ALT(GO() && decimal() || OK() && SET(\"ABCDEFabcdef\"));\r\n }",
"private static int hex2dec(int hex) {\n if (hex > 0x255 || hex < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 0x255 (597)\");\n }\n return (hex / 256) * 100 + ((hex % 256) / 16) * 10 + hex % 256 % 16;\n }",
"private static String binToHex(String bin) {\n\t\tString hex = \"\";\n\t\twhile (bin.length() % 4 != 0) { // comprueba si la cadena tiene longitud multiplo de 4\n\t\t\tbin = \"0\" + bin; // si no, le aņado un cero y vuelvo a comprobar si es multiplo de 4\n\t\t}\n\t\t// este while va cogiendo cachitos de 4, los pasa a hexadecimal y acumula en la variable hex\n\t\twhile (bin.length() != 0) { // el while continua hasta que la cadena tenga longitud cero\n\t\t\tString four = bin.substring(bin.length()-4); // cojo los 4 ultimos\n\t\t\thex = byteToHex(four) + hex; // paso 4 bits a hexadecimal y acumulo en hex\n\t\t\tbin = bin.substring(0, bin.length() - 4); // al string original le quito los cuatro bits que ya he procesado\n\t\t}\n\t\treturn hex; // cuando ha terminado el while, en hex tengo el hexadecimal completo\n\t\t\n\t}",
"public String getHex() {\n return hex;\n }",
"private String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n\n return buf.toString();\n }",
"private BigInteger hextodecimal(String hex) {\n\t\treturn new BigInteger(hex,16);\n\t}",
"private byte[] fromHex(String hex)\n {\n byte[] binary = new byte[hex.length() / 2];\n for(int i = 0; i < binary.length; i++)\n {\n binary[i] = (byte)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);\n }\n return binary;\n }",
"private static String toHex(byte[] hash) {\n StringBuilder hashedInput = new StringBuilder(\"\");\n for (int i = 0; i < hash.length; i++) {\n String hex = Integer.toHexString(0xff & hash[i]);\n if (hex.length() == 1) {\n hashedInput.append('0');\n }\n hashedInput.append(hex);\n }\n return hashedInput.toString();\n }",
"@Test\n public void testToHex() \n {\n System.out.println(\"toHex\");\n String argument = \"12\";\n Converter instance = new Converter();\n String expResult = \"C\";\n String result = instance.toHex(argument);\n \n //assert that the result we expect comes out. If the result that is expecte is generated then the test will pass. If not, then it will fail\n assertEquals(expResult, result);\n assertEquals(\"D\", instance.toHex(\"13\"));\n assertEquals(\"7B\", instance.toHex(\"123\"));\n assertEquals(\"D\", instance.toHex(\"13\"));\n assertEquals(\"2710\", instance.toHex(\"10000\"));\n }",
"private static String hexify(byte bytes[]) {\n\n char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};\n\n StringBuilder buf = new StringBuilder(bytes.length * 2);\n for (byte aByte : bytes) {\n buf.append(hexDigits[(aByte & 0xf0) >> 4]);\n buf.append(hexDigits[aByte & 0x0f]);\n }\n return buf.toString();\n }",
"@Test\n public void testDecToHex() {\n Assert.assertEquals(\"41\", Cipher_Helper.decToHex(65));\n Assert.assertEquals(\"5A\", Cipher_Helper.decToHex(90));\n Assert.assertEquals(\"4D\", Cipher_Helper.decToHex(77));\n }",
"public static String hex_mult(String hex1, String hex2){\n\t\tint decimal1=0,decimal2=0,i,j=1;\n\t\tString hex_result=\"\";\n\t\tfor(i=(hex1.length()-1);i>=0;i--){ //Converts hexadecimal value 1 into decimal form\n\t\t\tdecimal1+=(j*char_to_int(hex1.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tj=1;\n\t\tfor(i=(hex2.length()-1);i>=0;i--){ //Converts hexadecimal value 2 into decimal form\n\t\t\tdecimal2+=(j*char_to_int(hex2.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tdecimal1*=decimal2;\n\t\thex_result=integer_to_hex(\"\"+decimal1); //Calls function to convert into hex value\n\t\treturn hex_result;\n\t}",
"public List<Hex> getHexes() {\n return hexList;\n }",
"public String hex() {\r\n return this.hex;\r\n }",
"private static byte[] fromHex(String hex) {\n byte[] bytes = new byte[hex.length() / 2];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }",
"private static byte[] fromHex(String hex) throws NoSuchAlgorithmException\n {\n byte[] bytes = new byte[hex.length() / 2];\n for(int i = 0; i<bytes.length ;i++)\n {\n bytes[i] = (byte)Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }",
"private StringBuilder hexConversion(StringBuilder input) {\n\t\tStringBuilder finalRes = new StringBuilder();\n\t\tString currentVal = \"\";\n\t\tchar tempVal = ' ';\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\t\n\t\t\ttempVal = input.charAt(i);\n\t\t\t\n\t\t\tif(isOperator(input.charAt(i)) == false)\n\t\t\t{\n\t\t\t\tcurrentVal = currentVal + Character.toString(tempVal);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(currentVal);\n\t\t\t\tString digits = \"0123456789ABCDEF\";\n\t\t\t\tint val = 0;\n\t\t\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t\t\t{\n\t\t\t\t\tchar c = currentVal.charAt(j);\n\t\t\t\t\tint d = digits.indexOf(c);\n\t\t\t\t\tval = 16 * val + d;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfinalRes.append(val + Character.toString(tempVal));\n\t\t\t\tcurrentVal = \"\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// converting the last currentVal\n\t\t\n\t\tSystem.out.println(currentVal);\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tint val = 0;\n\t\tfor(int j = 0; j < currentVal.length(); j++)\n\t\t{\n\t\t\tchar c = currentVal.charAt(j);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\t\n\t\tfinalRes.append(val);\n\t\t\n\t\t\n\t\treturn finalRes;\n\t}",
"private static String hex(String binStr) {\n\n\n\t\tString newStr = new String();\n\n\t\ttry {\n\t\t\tString hexStr = \"0123456789ABCDEF\";\n\t\t\tbyte[] p = binStr.getBytes();\n\t\t\tfor (int k = 0; k < p.length; k++) {\n\t\t\t\tint j = (p[k] >> 4) & 0xF;\n\t\t\t\tnewStr = newStr + hexStr.charAt(j);\n\t\t\t\tj = p[k] & 0xF;\n\t\t\t\tnewStr = newStr + hexStr.charAt(j) + \" \";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.info(\"Failed to convert into hex values: \" + e);\n\t\t}\n\t\treturn newStr;\n\t}",
"public String encodeHex(String hexa) {\n if (!hexa.matches(\"^[0-9a-fA-F]+$\")) {\n return \"\";\n }\n\n final List<Long> matched = new ArrayList<Long>();\n final Matcher matcher = WORD_PATTERN.matcher(hexa);\n\n while (matcher.find()) {\n matched.add(Long.parseLong('1' + matcher.group(), 16));\n }\n\n // conversion\n final long[] result = new long[matched.size()];\n for (int i = 0; i < matched.size(); i++) {\n result[i] = matched.get(i);\n }\n\n return this.encode(result);\n }",
"private static byte[] fromHex(String hex) throws NoSuchAlgorithmException {\n byte[] bytes = new byte[hex.length() / 2];\n for (int i = 0; i < bytes.length; i++) {\n bytes[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return bytes;\n }",
"public static byte[] hexStringToByteArray(String hex) \r\n{\r\n\tif((hex.length()%2)==1) // Falls die Länge des Strings ungerade ist, wird eine 1 angehängt\r\n\t{\r\n\t\tchar c = '1';\r\n\t\thex += c;\r\n\t\tSystem.out.println(\"Fehler in Convert.hexStringToByteArray: Ungerade String-Zeichenfolge!\");\r\n\t}\r\n\tint l = hex.length();\r\n\tbyte[] data = new byte[l/2];\r\n\tfor (int i = 0; i < l; i += 2) \r\n\t{\r\n\t\tdata[i/2] = (byte) ((Character.digit(hex.charAt(i), 16) << 4) + Character.digit(hex.charAt(i+1), 16));\r\n\t}\r\n\treturn data;\r\n}",
"public CodePointIterator hexEncode() {\n return hexEncode(false);\n }",
"private static byte[] fromHex(String hex) {\r\n byte[] binary = new byte[hex.length() / 2];\r\n for (int i = 0; i < binary.length; i++) {\r\n binary[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\r\n }\r\n return binary;\r\n }",
"private static int dec2hex(int dec) {\n if (dec > 255 || dec < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 255\");\n }\n return (dec / 100) * 256 + ((dec % 100) / 10) * 16 + dec % 100 % 10;\n }",
"private static byte[] fromHex(String hex)\n\t {\n\t byte[] binary = new byte[hex.length() / 2];\n\t for(int i = 0; i < binary.length; i++)\n\t {\n\t binary[i] = (byte)Integer.parseInt(hex.substring(2*i, 2*i+2), 16);\n\t }\n\t return binary;\n\t }",
"public static String hex_sum(String hex1, String hex2){\n\t\tint decimal1=0,decimal2=0,i,j=1;\n\t\tString hex_result=\"\";\n\t\tfor(i=(hex1.length()-1);i>=0;i--){ //Converts hexadecimal value 1 into decimal form\n\t\t\tdecimal1+=(j*char_to_int(hex1.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tj=1;\n\t\tfor(i=(hex2.length()-1);i>=0;i--){ //Converts hexadecimal value 2 into decimal form\n\t\t\tdecimal2+=(j*char_to_int(hex2.charAt(i)));\n\t\t\tj=j*16;\n\t\t}\n\t\tdecimal1+=decimal2;\n\t\thex_result=integer_to_hex(\"\"+decimal1); //Calls function to convert into hex value\n\t\treturn hex_result;\n\t}",
"public static float[ ] hexToRGBA( int hex )\n\t{\n\t\tfloat r = ( ( hex >> 16 ) & 255 ) / 255F;\n\t\tfloat g = ( ( hex >> 8 ) & 255 ) / 255F;\n\t\tfloat b = ( hex & 255 ) / 255F;\n\t\tfloat a = ( ( hex >> 24 ) & 255 ) / 255F;\n\t\treturn new float[ ] { r, g, b, a };\n\t}",
"@Test\n public void testFromHex() {\n System.out.println(\"fromHex\");\n String hex = \"\";\n String expResult = \"\";\n String result = Crypto.fromHex(hex);\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 }",
"private String toHex(byte[] data) {\r\n char[] chars = new char[data.length * 2];\r\n for (int i = 0; i < data.length; i++) {\r\n chars[i * 2] = HEX_DIGITS[(data[i] >> 4) & 0xf];\r\n chars[i * 2 + 1] = HEX_DIGITS[data[i] & 0xf];\r\n }\r\n return new String(chars);\r\n}",
"private static char toHex(int nibble)\n\t{\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}",
"@Override\n\tpublic void visit(HexValue arg0) {\n\t\t\n\t}",
"private static byte[] fromHex(final String hex) {\n final byte[] binary = new byte[hex.length() / 2];\n for (int i = 0; i < binary.length; i++) {\n binary[i] = (byte) Integer.parseInt(hex.substring(2 * i, 2 * i + 2), 16);\n }\n return binary;\n }",
"static int hexa_to_deci(String hexa_address){\n\t\tint deci_val = 0;\n\t\tint multiply = 1;\n\t\tfor(int i=hexa_address.length()-1;i>=0;i--){\n\t\t\tint j=0;\n\t\t\tfor(;j<16;j++)\n\t\t\t\tif(hexa_address.charAt(i)==hexa[j])\n\t\t\t\t\tbreak;\n\t\t\tdeci_val+=(multiply*j);\n\t\t\tmultiply*=16;\n\t\t}\n\t\treturn deci_val;\n\t}",
"private int[] charToHexa(char c){\n int[] hex = new int[2];\n String h = Integer.toHexString((int) c);\n if (h.length() == 1){\n h = \"0\" + h;\n }\n hex[0] = Integer.parseInt(h.substring(0,1), 16);\n hex[1] = Integer.parseInt(h.substring(1), 16);\n return hex;\n }",
"private String toHex(byte[] bytes) {\n StringBuilder s = new StringBuilder(bytes.length * 2);\n for (byte b : bytes) {\n s.append(String.format(\"%02x\", b));\n }\n return s.toString();\n }",
"static String decimel_to_hexa(int deci_address){\n\t\tString disp = \"\";\n\t\tfor(int i=0;i<4;i++){\n\t\t\tchar hex = hexa[deci_address%16];\n\t\t\tdisp = hex+disp;\n\t\t\tdeci_address/=16;\n\t\t}\n\t\treturn disp;\n\t}",
"private static byte[] hexStr2Bytes(String hex) {\n // Adding one byte to get the right conversion\n // values starting with \"0\" can be converted\n byte[] bArray = new BigInteger(\"10\" + hex, 16).toByteArray();\n\n // Copy all the REAL bytes, not the \"first\"\n byte[] ret = new byte[bArray.length - 1];\n for (int i = 0; i < ret.length; i++)\n ret[i] = bArray[i + 1];\n return ret;\n }",
"static void stax_to_mem(String passed){\n\t\tmemory.put(hexa_to_deci(registers.get('H')+registers.get('L')),registers.get('A'));\n\t}",
"public String getHexValue() {\n return hexValue;\n }",
"public void binToHex(){\n\t\tthis.inputBin();\n\t\tif(checkValue()==true){\n\t\t\tthis.toHex();\n\t\t\tthis.outHex();\n\t\t}\n\t}",
"private static String toHex(byte buffer[]) {\n\t\tStringBuffer sb = new StringBuffer(buffer.length * 2);\n\t\tfor (int i = 0; i < buffer.length; i++) {\n\t\t\tsb.append(Character.forDigit((buffer[i] & 0xf0) >> 4, 16));\n\t\t\tsb.append(Character.forDigit(buffer[i] & 0x0f, 16));\n\t\t}\n\t\treturn sb.toString();\n\t}",
"private static char toHex(int nibble) {\n\t\treturn hexDigit[(nibble & 0xF)];\n\t}",
"public String convertToAssemblyHex(String hex)\n {\n if(hex.equals(\"69400100\"))\n {\n return \"MOVEZ X0 data\";\n } else if(hex.equals(\"7c200001\"))\n {\n return \"LDUR X1, X0, #0\";\n } else if(hex.equals(\"5a000202\"))\n {\n return \"CBZ X2, #32\";\n } else if(hex.equals(\"00a0000c\"))\n {\n return \"B #12\";\n } else if(hex.equals(\"04881422\"))\n {\n return \"ADDI X2, X2, #20\";\n }else if(hex.equals(\"06581022\"))\n {\n return \"SUB X2, X1, X2\";\n }else if(hex.equals(\"02220002\"))\n {\n return \"PUSH X2\";\n }else if(hex.equals(\"00000000\"))\n {\n return \"NOP\";\n }else if(hex.equals(\"03330003\"))\n {\n return \"POP X3\";\n }else if(hex.equals(\"7c000003\"))\n {\n return \"STUR X3, X0, #0\";\n }else if(hex.equals(\"06502033\"))\n {\n return \"EOR X3, X2, X3\";\n }else if(hex.equals(\"5a000043\"))\n {\n return \"CBZ X3, #4\";\n }else if(hex.equals(\"11111111\"))\n {\n return \"HALT\";\n } else if(hex.equals(\"00000def\"))\n {\n return \"STACK VALUE: \" + Integer.parseInt(\"def\", 16);\n } else if(hex.equals(\"00abab00\") || hex.equals(\"0000ab00\"))\n {\n return \"DATA VALUE: \" + Integer.parseInt(\"ab\", 16);\n }\n return \"\";\n }",
"public Hex() {\n\t\t//represents no food, critter, rock\n\t\trock = false;\n\t\tfood = 0;\n\t\tcritter = null;\n\t}",
"public boolean isHex()\n {\n return hex;\n }",
"public String interpretHexadecimal(String angles) {\n\t\t//An easy way to break apart a list of things is to make a Scanner on it\n\t\t//This Scanner is unrelated to any other variables with the same name because this\n\t\t//one is only meaningful inside this method. Also, this scanner does not read from the\n\t\t//console! It only operates over the one String you created it on, namely angles. \n\t\tScanner s = new Scanner(angles);\n\t\t//You can tell each Scanner what you want it to use to break up the String. \n\t\t//Making it a comma, when you call next() you get whatever is between the commas.\n\t\t//Pretty convenient. \n\t\ts.useDelimiter(\",\");\n\t\t\n\t\t//TODO: Complete this method :) \n\t\tString hexNumber1=\"\";\n\t\tString hexNumber2=\"\";\n\t\tString hexNumber=\"\";\n\t\tString result=\"\";\n\t\tint k = 0;\n\t\tint i = 0;\n\t\t\n\t\twhile (s.hasNext()){\n\t\t\tif (i==0){\n\t\t\t\thexNumber1=Integer.toHexString((int)Math.floor(Double.parseDouble(s.next())/22.5));\n\t\t\t}\n\t\t\telse if(i==1){\n\t\t\t\thexNumber2=Integer.toHexString((int)Math.floor(Double.parseDouble(s.next())/22.5));\n\t\t\t\thexNumber=hexNumber1+hexNumber2;\n\t\t\t\tk = Integer.parseInt(hexNumber,16);\n\t\t\t\tchar a = (char)k;\n\t\t\t\tresult += a;\n\t\t\t\ti=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn result;\n\t\t\n\t}",
"private String makeHex(byte[] buffer) {\n byte current;\n int length = buffer.length;\n String blank = \"\"; // it's easier to change\n StringBuffer ret = new StringBuffer(2*length);\n\n // do for each half byte\n for(int i=0;i<(2*length);i++)\n {\n\t// mask half byte and move it to the right\n\tcurrent = i%2==1 ? (byte) (buffer[(i/2)] & 0x0F)\n\t : (byte) ((buffer[(i/2)] >> 4) & 0x0F);\n\t\n\t// convert half byte to ASCII char\t\t \n\tret.append((char) (current < 0x0A ? current+0x30 : current+0x37) + (i%2==1 ? blank : \"\"));\n }\n return ret.toString();\n }",
"protected static String convertHex( String base )\r\n\t{\r\n\t\treturn \"H\" + HexConvertor.convertHex( base.getBytes() ); \r\n\t}",
"public void convert_Hex_To_Binary(String hex) {\n String binary_string = hexToBinary(hex, true);\n int[] data = new int[64];\n for (int k = 0; k < data.length; k++)\n data[k] = Character.getNumericValue(binary_string.charAt(k));\n key_user = data;\n }",
"public Hex getHex(int g, int h) {\n return hexes[g][h];\n }",
"public String asciiToHex(String ascii) {\n char[] chars = ascii.toCharArray();\n String hex = \"\";\n for (int i = 0; i < chars.length; i++) {\n hex += \" \" + (Integer.toHexString((int) chars[i]));\n }\n return hex;\n }",
"private void toHex(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tStringBuilder tempsb = new StringBuilder(binary);\n\t\t\n\t\t\tfor (int i = 0;i<binary.length();i+=4){//maps each nibble to its binary value\n\t\t\t\tif (tempsb.substring(i,i+4).equals(\"0000\")) \n\t\t\t\t\tsb.append('0');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0001\"))\n\t\t\t\t\tsb.append('1');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0010\"))\n\t\t\t\t\tsb.append('2');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0011\"))\n\t\t\t\t\tsb.append('3');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0100\"))\n\t\t\t\t\tsb.append('4');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0101\"))\n\t\t\t\t\tsb.append('5');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0110\"))\n\t\t\t\t\tsb.append('6');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"0111\"))\n\t\t\t\t\tsb.append('7');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1000\"))\n\t\t\t\t\tsb.append('8');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1001\"))\n\t\t\t\t\tsb.append('9');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1010\"))\n\t\t\t\t\tsb.append('A');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1011\"))\n\t\t\t\t\tsb.append('B');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1100\"))\n\t\t\t\t\tsb.append('C');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1101\"))\n\t\t\t\t\tsb.append('D');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1110\"))\n\t\t\t\t\tsb.append('E');\n\t\t\t\telse if (tempsb.substring(i,i+4).equals(\"1111\"))\n\t\t\t\t\tsb.append('F');\n\t\t\t}\n\t\t\tsb.insert(0,\"0x\");\n\t\t\tbinary = sb.toString();\n\t}",
"public static byte[] convert(String hex) {\n/* 51 */ ByteArrayOutputStream baos = new ByteArrayOutputStream();\n/* 52 */ for (int i = 0; i < hex.length(); i += 2) {\n/* 53 */ char c1 = hex.charAt(i);\n/* 54 */ if (i + 1 >= hex.length())\n/* 55 */ throw new IllegalArgumentException(); \n/* 56 */ char c2 = hex.charAt(i + 1);\n/* 57 */ byte b = 0;\n/* 58 */ if (c1 >= '0' && c1 <= '9') {\n/* 59 */ b = (byte)(b + (c1 - 48) * 16);\n/* 60 */ } else if (c1 >= 'a' && c1 <= 'f') {\n/* 61 */ b = (byte)(b + (c1 - 97 + 10) * 16);\n/* 62 */ } else if (c1 >= 'A' && c1 <= 'F') {\n/* 63 */ b = (byte)(b + (c1 - 65 + 10) * 16);\n/* */ } else {\n/* 65 */ throw new IllegalArgumentException();\n/* 66 */ } if (c2 >= '0' && c2 <= '9') {\n/* 67 */ b = (byte)(b + c2 - 48);\n/* 68 */ } else if (c2 >= 'a' && c2 <= 'f') {\n/* 69 */ b = (byte)(b + c2 - 97 + 10);\n/* 70 */ } else if (c2 >= 'A' && c2 <= 'F') {\n/* 71 */ b = (byte)(b + c2 - 65 + 10);\n/* */ } else {\n/* 73 */ throw new IllegalArgumentException();\n/* 74 */ } baos.write(b);\n/* */ } \n/* 76 */ return baos.toByteArray();\n/* */ }",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n int int0 = JavaCharStream.hexval('2');\n assertEquals(2, int0);\n }",
"public final void mRULE_HEX() throws RecognitionException {\n try {\n int _type = RULE_HEX;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalSpeADL.g:23480:10: ( ( '0x' | '0X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' )+ ( '#' ( ( 'b' | 'B' ) ( 'i' | 'I' ) | ( 'l' | 'L' ) ) )? )\n // InternalSpeADL.g:23480:12: ( '0x' | '0X' ) ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' )+ ( '#' ( ( 'b' | 'B' ) ( 'i' | 'I' ) | ( 'l' | 'L' ) ) )?\n {\n // InternalSpeADL.g:23480:12: ( '0x' | '0X' )\n int alt1=2;\n int LA1_0 = input.LA(1);\n\n if ( (LA1_0=='0') ) {\n int LA1_1 = input.LA(2);\n\n if ( (LA1_1=='x') ) {\n alt1=1;\n }\n else if ( (LA1_1=='X') ) {\n alt1=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 1, 1, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 1, 0, input);\n\n throw nvae;\n }\n switch (alt1) {\n case 1 :\n // InternalSpeADL.g:23480:13: '0x'\n {\n match(\"0x\"); \n\n\n }\n break;\n case 2 :\n // InternalSpeADL.g:23480:18: '0X'\n {\n match(\"0X\"); \n\n\n }\n break;\n\n }\n\n // InternalSpeADL.g:23480:24: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' )+\n int cnt2=0;\n loop2:\n do {\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( ((LA2_0>='0' && LA2_0<='9')||(LA2_0>='A' && LA2_0<='F')||LA2_0=='_'||(LA2_0>='a' && LA2_0<='f')) ) {\n alt2=1;\n }\n\n\n switch (alt2) {\n \tcase 1 :\n \t // InternalSpeADL.g:\n \t {\n \t if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='f') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt2 >= 1 ) break loop2;\n EarlyExitException eee =\n new EarlyExitException(2, input);\n throw eee;\n }\n cnt2++;\n } while (true);\n\n // InternalSpeADL.g:23480:58: ( '#' ( ( 'b' | 'B' ) ( 'i' | 'I' ) | ( 'l' | 'L' ) ) )?\n int alt4=2;\n int LA4_0 = input.LA(1);\n\n if ( (LA4_0=='#') ) {\n alt4=1;\n }\n switch (alt4) {\n case 1 :\n // InternalSpeADL.g:23480:59: '#' ( ( 'b' | 'B' ) ( 'i' | 'I' ) | ( 'l' | 'L' ) )\n {\n match('#'); \n // InternalSpeADL.g:23480:63: ( ( 'b' | 'B' ) ( 'i' | 'I' ) | ( 'l' | 'L' ) )\n int alt3=2;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0=='B'||LA3_0=='b') ) {\n alt3=1;\n }\n else if ( (LA3_0=='L'||LA3_0=='l') ) {\n alt3=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 3, 0, input);\n\n throw nvae;\n }\n switch (alt3) {\n case 1 :\n // InternalSpeADL.g:23480:64: ( 'b' | 'B' ) ( 'i' | 'I' )\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 if ( input.LA(1)=='I'||input.LA(1)=='i' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n case 2 :\n // InternalSpeADL.g:23480:84: ( 'l' | 'L' )\n {\n if ( input.LA(1)=='L'||input.LA(1)=='l' ) {\n input.consume();\n\n }\n else {\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private String toHexString(byte[] bytes) {\n StringBuilder hexString = new StringBuilder();\n for (int i = 0; i < bytes.length; i++) {\n String hex = Integer.toHexString(0xFF & bytes[i]);\n if (hex.length() == 1) {\n hexString.append('0');\n }\n hexString.append(hex);\n }\n\n return hexString.toString().toUpperCase();\n }",
"public void toHexMode(){\r\n for(int i=2;i<numbers.length;i++){\r\n numbers[i].setEnabled(true);\r\n }\r\n for(JButton letter : letters){\r\n letter.setEnabled(true);\r\n }\r\n this.revalidate();\r\n this.repaint();\r\n }",
"public final void hexColor() throws RecognitionException {\n try {\n // css21.g:210:5: ( HASH )\n // css21.g:210:7: HASH\n {\n match(input,HASH,FOLLOW_HASH_in_hexColor1530); if (state.failed) return ;\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 ;\n }",
"private static String bytesToHex(byte[] bytes) {\n StringBuilder result = new StringBuilder();\n\n for (byte byt : bytes) {\n result.append(Integer.toString((byt & 0xff) + 0x100, 16).substring(1));\n }\n\n return result.toString();\n }",
"static void shld_to_mem(String passed){\n\t\tint memo_address = hexa_to_deci(passed.substring(5));\n\t\tmemory.put(memo_address, registers.get('L'));\n\t\tmemo_address++;\n\t\tmemory.put(memo_address, registers.get('H'));\n\t}",
"public void setUseHex(boolean useHex) {\n\t\tthis.useHex = useHex;\n\t}",
"@Test\n public void testHexAndBytesTransformation() {\n byte[] bytes = ByteUtils.stringToBytes(ByteUtils.bytesToHexString(testBytes));\n assertArrayEquals(testBytes, bytes); \n }",
"public HashMap<HexLocation, Hex> parseHexesFromJSON(JSONArray hexesJSON){\n\n HashMap<HexLocation, Hex> newHexesMap = new HashMap<>();\n for (int h = 0; h < hexesJSON.length(); h++)\n {\n //I'm doing it manually because 1) it freaks out about Hex's toString() for some reason\n // and 2) because I have to convert the hex's TYPE string to a HexType enum value.\n JSONObject currHexStringJSON = hexesJSON.getJSONObject(h);\n JSONObject currHexLocJSON = currHexStringJSON.getJSONObject(\"location\");\n int hlX = currHexLocJSON.getInt(\"x\");\n int hlY = currHexLocJSON.getInt(\"y\");\n HexLocation newHexLoc = new HexLocation(hlX, hlY);\n\n Hex newHex;\n HexType currHexType;\n int currHexNum = 0;\n //it could be a desert/ocean hex - check if it contains a resource/number:\n if (currHexStringJSON.has(\"resource\")) {\n //if it DOES have a resource, it also has a number, so it's a regular hex:\n String currHexTypeStr = currHexStringJSON.getString(\"resource\");\n currHexType = Converter.stringToHexType(currHexTypeStr);\n //currHexType = exchangeStringForHexType(currHexTypeStr.toString());\n currHexNum = currHexStringJSON.getInt(\"number\");\n }\n //I'm commenting this out for now. It looks like the server doesn't hold water hexes\n /*else if (currHexStringJSON.has(\"number\")){\n //if it doesn't have a resource, but DOES have a number, it's a desert hex:\n currHexType = HexType.DESERT;\n currHexNum = currHexStringJSON.getInt(\"number\");\n }*/\n else {\n //if it doesn't have a resource OR a number, it's an ocean hex:\n currHexType = HexType.DESERT;\n currHexNum = 0;\n }\n newHex = new Hex(newHexLoc, currHexType);\n newHex.setNumber(currHexNum);\n\n newHexesMap.put(newHex.getLocation(), newHex);\n }\n\n return newHexesMap;\n }",
"public String toHex(String arg) throws UnsupportedEncodingException {\n\t return String.format(\"%064x\", new BigInteger(1, arg.getBytes(\"UTF8\")));\n\t}",
"private static int transformHexCharToInt(byte val) throws HyracksDataException {\n switch (val) {\n case '0':\n return 0;\n case '1':\n return 1;\n case '2':\n return 2;\n case '3':\n return 3;\n case '4':\n return 4;\n case '5':\n return 5;\n case '6':\n return 6;\n case '7':\n return 7;\n case '8':\n return 8;\n case '9':\n return 9;\n case 'a':\n case 'A':\n return 10;\n case 'b':\n case 'B':\n return 11;\n case 'c':\n case 'C':\n return 12;\n case 'd':\n case 'D':\n return 13;\n case 'e':\n case 'E':\n return 14;\n case 'f':\n case 'F':\n return 15;\n default:\n throw new RuntimeDataException(ErrorCode.INVALID_FORMAT);\n }\n }",
"private static Collection<Text> createHex(Byte... bytes) {\n Collection<Text> result = new ArrayList<>();\n StringBuilder stringBuilder = new StringBuilder();\n boolean isPreByteNull = bytes[0] == null;\n for (Byte each : bytes) {\n if (isPreByteNull != (each == null)) {\n Text text = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n text.getStyleClass().add(isPreByteNull ? \"var\" : \"fix\");\n result.add(text);\n stringBuilder = new StringBuilder();\n isPreByteNull = each == null;\n }\n stringBuilder.append(' ');\n if (each == null) {\n stringBuilder.append(VAR_CHAR).append(VAR_CHAR);\n } else {\n stringBuilder.append(Hex.byte2HexBin(each));\n }\n }\n for (int i = 0; i < (16 - bytes.length); i++) {\n stringBuilder.append(\" \");\n }\n stringBuilder.append(\" \");\n Text text = new Text(stringBuilder.toString());\n //noinspection HardCodedStringLiteral\n text.getStyleClass().add(isPreByteNull ? \"var\" : \"fix\");\n result.add(text);\n return result;\n }",
"public static String hexToASCII(String hexValue)\n \t{\n \t StringBuilder output = new StringBuilder(\"\");\n \t for (int i = 0; i < hexValue.length(); i += 2)\n \t {\n \t String str = hexValue.substring(i, i + 2);\n \t output.append((char) Integer.parseInt(str, 16));\n \t }\n \t return output.toString();\n \t}",
"private void outHex(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"public final void mHEX() throws RecognitionException {\n try {\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:573:5: ( ( 'A' .. 'F' | 'a' .. 'f' | '0' .. '9' ) )\n // /Users/devdatta.kulkarni/Documents/Cassandra/apache-cassandra-0.8.6-src/src/java/org/apache/cassandra/cql/Cql.g:573:7: ( 'A' .. 'F' | 'a' .. 'f' | '0' .. '9' )\n {\n if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {\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 static String asciiToHex(String asciiValue)\n \t{\n \t char[] chars = asciiValue.toCharArray();\n \t StringBuffer hex = new StringBuffer();\n \t for (int i = 0; i < chars.length; i++)\n \t {\n \t hex.append(Integer.toHexString((int) chars[i]));\n \t }\n \t return hex.toString();\n \t}",
"static int[] hexStringToBits(String hex) {\n int[] bits = new int[128];\n for (int i = 0; i < hex.length(); i++) {\n int n = (int)hex.charAt(i);\n for (int j = 0; j < 4; j++) {\n bits[4 * i + j] = (n >> (3 - j)) & 1;\n }\n }\n return bits;\n }",
"private byte[] fromHex(String hexString) {\n int len = hexString.length() / 2;\n byte[] ret = new byte[len];\n for (int i = 0; i < len; i++) {\n ret[i] = (byte) Short.parseShort(hexString.substring(i * 2, i *\n 2 + 2), 16);\n }\n return ret;\n }",
"public LinkedList copyableHexes()\n {\n LinkedList\t\tcopyableHexes = new LinkedList();\n ListIterator\t\tit = map.selectedHexesIterator();\n int\t\t\tx = 0;\n int\t\t\ty = 0;\n Point h;\n \n if (!map.anyHexesSelected())\n return null;\n \n // Create our new list of copyable hexes\n \n // Get the first hex, initialize x,y (the delta between this and the next hex)\n h = (Point) it.next();\n x = (int) h.getX();\n y = (int) h.getY();\n // Make sure to set the 'isEven' argument (last one)\n copyableHexes.addLast(new CopyableMUXHex(map.getHexTerrain(h), map.getHexElevation(h), 0, 0, x % 2 == 0 ? true : false));\n \n while (it.hasNext())\n {\n // Get the next hex\n h = (Point) it.next();\n copyableHexes.addLast(new CopyableMUXHex(map.getHexTerrain(h), map.getHexElevation(h), (int) h.getX() - x, (int) h.getY() - y));\n // Set up these values for our next hex\n x = (int) h.getX();\n y = (int) h.getY();\n }\n \n return copyableHexes;\n }",
"public static String toHex(byte[] bytes){\r\n\t\treturn hexEncode(bytes);\r\n\t}",
"public String binarioToHexa(String binario) {\n\t\tSystem.out.print(\"Convirtiendo binario (\" + binario + \") a hexadecimal >> \");\n\t\tInteger numero = 0;\n\t\ttry{\n\t\t\tnumero = Integer.valueOf(binario, 2);\n\t\t}catch (NumberFormatException e) {\n\t\t\tSystem.err.print(\"\\nERROR : El numero \" + binario + \" no es binario\");\n\t\t}\n\t\treturn Integer.toHexString(numero);\n\t}",
"private static String toHex(byte[] digest) {\n\t\tchar[] result = new char[digest.length * 2];\n\t\tint pos = 0;\n\t\tfor (int i = 0; i < digest.length; i++) {\n\t\t\tresult[pos++] = hexChar((digest[i] & 0xf0) >> 4);\n\t\t\tresult[pos++] = hexChar(digest[i] & 0x0f);\n\t\t}\n\t\treturn new String(result);\n\t}",
"public static void main(String[] args) {\n\t\tint a=0x10017FDC;\n\t\ta=a>>13;\n\t\tSystem.out.println(a);\n\t\tint b=0x0800B;\n\t\tSystem.out.println(b);\n\t}",
"public String getHexCode() {\r\n return this.hexCode;\r\n }",
"public final EObject ruleHexLiteral() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token lv_value_1_0=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3887:28: ( ( () ( (lv_value_1_0= RULE_HEX ) ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3888:1: ( () ( (lv_value_1_0= RULE_HEX ) ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3888:1: ( () ( (lv_value_1_0= RULE_HEX ) ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3888:2: () ( (lv_value_1_0= RULE_HEX ) )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3888:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3889:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getHexLiteralAccess().getHexLiteralAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3894:2: ( (lv_value_1_0= RULE_HEX ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3895:1: (lv_value_1_0= RULE_HEX )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3895:1: (lv_value_1_0= RULE_HEX )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:3896:3: lv_value_1_0= RULE_HEX\r\n {\r\n lv_value_1_0=(Token)match(input,RULE_HEX,FOLLOW_RULE_HEX_in_ruleHexLiteral8961); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getHexLiteralAccess().getValueHEXTerminalRuleCall_1_0()); \r\n \t\t\r\n }\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElement(grammarAccess.getHexLiteralRule());\r\n \t }\r\n \t\tsetWithLastConsumed(\r\n \t\t\tcurrent, \r\n \t\t\t\"value\",\r\n \t\tlv_value_1_0, \r\n \t\t\"HEX\");\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"private String convertToHex(byte[] raw) {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < raw.length; i++) {\n sb.append(Integer.toString((raw[i] & 0xff) + 0x100, 16).substring(1));\n }\n return sb.toString();\n }",
"public Hexadecimal(String hexString){\n this.hexString = new StringBuilder(hexString.toUpperCase());\n HexadecConverter hexCon = new HexadecConverter();\n this.decimal = hexCon.strToDec(hexString);\n }",
"static void ana_with_reg(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(registers.get(passed.charAt(4)));\n\t\tval1 = val1&val2;\n\t\tregisters.put('A',decimel_to_hexa_8bit(val1));\n\t\tmodify_status(registers.get('A'));\n\t}",
"public static String integer_to_hex(String chars){\n\t\tint decimal_number=0,i,j=1;\n\t\tString hex=\"\";\n\t\tfor(i=(chars.length()-1);i>=0;i--){ //converts decimal char array into integer form\n\t\t\tdecimal_number+=(j*char_to_int(chars.charAt(i)));\n\t\t\tj=j*10;\n\t\t}\n\t\tdo{ //Creates hexadecimal number based on division and mod of 16\n\t\t\tj=decimal_number%16;\n\t\t\thex=int_to_char_hex(j)+hex;\n\t\t\tdecimal_number=decimal_number/16;\n\t\t} while(decimal_number>0);\n\t\treturn hex;\n\t}",
"@Test(timeout = 4000)\n public void test117() throws Throwable {\n int int0 = JavaCharStream.hexval('7');\n assertEquals(7, int0);\n }",
"public String decodeHex(String hash) {\n final StringBuilder result = new StringBuilder();\n final long[] numbers = this.decode(hash);\n\n for (final long number : numbers) {\n result.append(Long.toHexString(number).substring(1));\n }\n\n return result.toString();\n }",
"public ToHexString() {\n this(true);\n }",
"private int hexToDecimal(String s)\n {\n String digits = \"0123456789ABCDEF\";//digits to define value based on position on this string\n s = s.toUpperCase();//changes the parameter value to uppercase\n int val = 0;//value starts with 0\n \n \n //loop for the as many characters as in \"s\"\n for (int i = 0; i < s.length(); i++)\n {\n char c = s.charAt(i);//gets character at position i from user input\n \n int d = digits.indexOf(c);//get index value of character from digits\n \n val = 16 * val + d;//calculates decimal num. Times 16 with itself each loop and adds the value of the character from digits in decimal form\n \n }\n return val;\n }",
"@Test(timeout = 4000)\n public void test118() throws Throwable {\n int int0 = JavaCharStream.hexval('6');\n assertEquals(6, int0);\n }",
"public static String makeHexColorInt(int... vals){\n\t\treturn \"\"+formatNumberString(Integer.toHexString((int)vals[0]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[1]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[2]),2);\n\t}",
"@Test\n public void testToHex_String() {\n System.out.println(\"toHex\");\n String txt = \"\";\n String expResult = \"\";\n String result = Crypto.toHex(txt);\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 }",
"public static final String toHex(byte hash[]) {\r\n StringBuffer buf = new StringBuffer(hash.length * 2);\r\n int i;\r\n\r\n for (i = 0; i < hash.length; i++) {\r\n if (((int) hash[i] & 0xff) < 0x10) {\r\n buf.append(\"0\");\r\n }\r\n buf.append(Long.toString((int) hash[i] & 0xff, 16));\r\n }\r\n return buf.toString();\r\n }",
"private static String convertStringToHex(String input){\n\t\tchar[] chars = input.toCharArray();\n\t\tStringBuffer hexOutput = new StringBuffer();\n\t\t\n\t\tfor(int i = 0; i < chars.length; i++){\n\t\t\thexOutput.append(Integer.toHexString((int)chars[i]));\n\t\t}\n\n\t\treturn hexOutput.toString();\n\t}",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n int int0 = JavaCharStream.hexval('3');\n assertEquals(3, int0);\n }",
"public static byte[] toAscii(String hex) {\n\t\thex = hex.toLowerCase().replaceAll(\"[^0-9a-f]\", \"\");\n\t\tbyte[] res = new byte[hex.length() >> 1];\n\t\tbyte currentByte = 0;\n\t\tfor (int i = 0; i < hex.length(); i++) {\n\t\t\tchar c = hex.charAt(i);\n\t\t\tif ('0' <= c && c <= '9') {\n\t\t\t\tcurrentByte |= (byte) ((c - '0') << ((i + 1) & 1) * 4);\n\t\t\t} else if ('a' <= c && c <= 'f') {\n\t\t\t\tcurrentByte |= (byte) ((10 + c - 'a') << ((i + 1) & 1) * 4);\n\t\t\t}\n\t\t\tif ((i & 1) == 1) {\n\t\t\t\tres[i >> 1] = currentByte;\n\t\t\t\tcurrentByte = 0;\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}"
] | [
"0.6018517",
"0.5994877",
"0.57664806",
"0.57652605",
"0.57173",
"0.57163703",
"0.5682819",
"0.56357986",
"0.5596762",
"0.5520412",
"0.551198",
"0.5504237",
"0.5481408",
"0.54730046",
"0.5462786",
"0.54145086",
"0.54101294",
"0.53975904",
"0.5367353",
"0.5362994",
"0.53629655",
"0.5347952",
"0.53399813",
"0.5303687",
"0.52937865",
"0.5255988",
"0.5253079",
"0.524657",
"0.5244682",
"0.52446324",
"0.5240528",
"0.52274424",
"0.5227183",
"0.52238166",
"0.5219044",
"0.5209314",
"0.5201294",
"0.52002",
"0.5192203",
"0.51910853",
"0.51873463",
"0.51799977",
"0.51765627",
"0.5175518",
"0.51562697",
"0.51432025",
"0.5138749",
"0.5137313",
"0.51345533",
"0.5127096",
"0.5125413",
"0.51248544",
"0.5116587",
"0.5108754",
"0.50904465",
"0.50888276",
"0.508687",
"0.5085158",
"0.5070934",
"0.50706166",
"0.5058661",
"0.5053636",
"0.50536114",
"0.50518805",
"0.5034778",
"0.50245655",
"0.5020671",
"0.5016445",
"0.50115067",
"0.4997765",
"0.49886757",
"0.49772182",
"0.49767077",
"0.49719772",
"0.49706322",
"0.4969616",
"0.49556214",
"0.49524775",
"0.49487337",
"0.49425086",
"0.4939526",
"0.4934638",
"0.49333113",
"0.4931168",
"0.49308568",
"0.49301097",
"0.4926682",
"0.49265233",
"0.4926231",
"0.4924565",
"0.49224132",
"0.49223977",
"0.49222374",
"0.4921191",
"0.49209633",
"0.4913973",
"0.4913763",
"0.49054533",
"0.49054387",
"0.49005884"
] | 0.58155555 | 2 |
digits = ('1..9' decimals) / '0' hexes | private boolean digits() {
return ALT(
GO() && RANGE('1','9') && decimals() || OK() && CHAR('0') && hexes()
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"short digits();",
"private static String digits(long val, int digits) {\n\tlong hi = 1L << (digits * 4);\n\treturn Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }",
"private static String digits(long val, int digits) {\n long hi = 1L << (digits * 4);\n return Long.toHexString(hi | (val & (hi - 1))).substring(1);\n }",
"private int hexToDecimal(String s)\n {\n String digits = \"0123456789ABCDEF\";//digits to define value based on position on this string\n s = s.toUpperCase();//changes the parameter value to uppercase\n int val = 0;//value starts with 0\n \n \n //loop for the as many characters as in \"s\"\n for (int i = 0; i < s.length(); i++)\n {\n char c = s.charAt(i);//gets character at position i from user input\n \n int d = digits.indexOf(c);//get index value of character from digits\n \n val = 16 * val + d;//calculates decimal num. Times 16 with itself each loop and adds the value of the character from digits in decimal form\n \n }\n return val;\n }",
"public String digit(String digit);",
"int[] getDigits();",
"protected String correctDigits(int start, int digits)\n\t{\n\t\tString end = Integer.toString(start);\n\t\twhile(end.length() < digits)\n\t\t{\n\t\t\tend = \"0\" + end;\n\t\t}\n\t\treturn end;\n\t}",
"Rule Digit() {\n // No effect on value stack\n return CharRange('0', '9');\n }",
"public int getDecimalDigits() { return 1; }",
"public int getDecimalDigits() { return 1; }",
"private String formatHex(int decimal) {\n char[] bin = Integer.toBinaryString(decimal).toCharArray();\n //System.out.println(\"bin is \"+String.valueOf(bin) +\" length:\"+bin.length);\n while(bin.length< 4) {\n for(int i =4-bin.length; i<4;i++){\n bin = (\"0\"+ String.valueOf(bin)).toCharArray();\n }\n }\n //System.out.println(\"bin is \"+String.valueOf(bin));\n int len = bin.length -1;\n char[] temp = {bin[len-3], bin[len-2], bin[len-1], bin[len] };\n return formatHex(Integer.toHexString(Integer.parseInt(String.valueOf(temp), 2 )));\n }",
"void overflowDigits() {\n for (int i = 0; i < preDigits.length(); i++) {\n char digit = preDigits.charAt(i);\n // This could be implemented with a modulo, but compared to the main\n // loop this code is too quick to measure.\n if (digit == '9') {\n preDigits.setCharAt(i, '0');\n } else {\n preDigits.setCharAt(i, (char)(digit + 1));\n }\n }\n }",
"public static String integer_to_hex(String chars){\n\t\tint decimal_number=0,i,j=1;\n\t\tString hex=\"\";\n\t\tfor(i=(chars.length()-1);i>=0;i--){ //converts decimal char array into integer form\n\t\t\tdecimal_number+=(j*char_to_int(chars.charAt(i)));\n\t\t\tj=j*10;\n\t\t}\n\t\tdo{ //Creates hexadecimal number based on division and mod of 16\n\t\t\tj=decimal_number%16;\n\t\t\thex=int_to_char_hex(j)+hex;\n\t\t\tdecimal_number=decimal_number/16;\n\t\t} while(decimal_number>0);\n\t\treturn hex;\n\t}",
"public static void printNumbers() {\n\t\tSystem.out.println(56);\n\t\tSystem.out.println(0b11); // 3 binary\n\t\tSystem.out.println(017); // 15 octal\n\t\tSystem.out.println(0x1F); //31 hexadecimal\n\t}",
"private void initDigits(Set<String> s) {\n\t\tfill(s,'0','9');\n }",
"@Test\n public void computeDigits()\n {\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 1.0));\n assertEquals(1, BinaryEncoder.computeDigits(1.0, 1.0));\n assertEquals(1, BinaryEncoder.computeDigits(2.0, 1.0));\n assertEquals(2, BinaryEncoder.computeDigits(3.0, 1.0));\n assertEquals(2, BinaryEncoder.computeDigits(4.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(4.5, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(5.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(6.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(7.0, 1.0));\n assertEquals(3, BinaryEncoder.computeDigits(8.0, 1.0));\n assertEquals(4, BinaryEncoder.computeDigits(9.0, 1.0));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 0.1));\n assertEquals(4, BinaryEncoder.computeDigits(1.0, 0.1));\n assertEquals(5, BinaryEncoder.computeDigits(2.0, 0.1));\n assertEquals(5, BinaryEncoder.computeDigits(3.0, 0.1));\n assertEquals(6, BinaryEncoder.computeDigits(4.0, 0.1));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 0.01));\n assertEquals(7, BinaryEncoder.computeDigits(1.0, 0.01));\n assertEquals(8, BinaryEncoder.computeDigits(2.0, 0.01));\n assertEquals(9, BinaryEncoder.computeDigits(3.0, 0.01));\n assertEquals(9, BinaryEncoder.computeDigits(4.0, 0.01));\n\n assertEquals(1, BinaryEncoder.computeDigits(0.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(1.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(2.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(3.0, 10.0));\n assertEquals(1, BinaryEncoder.computeDigits(4.0, 10.0));\n assertEquals(2, BinaryEncoder.computeDigits(30.0, 10.0));\n assertEquals(2, BinaryEncoder.computeDigits(40.0, 10.0));\n }",
"@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }",
"public static int alldigits(int x) {\n count1=0;\n do {\n x = x / 10;\n count1++;\n } while (x != 0);\n return count1;\n }",
"public static void main(String args[]){\nSystem.out.println(Integer.toOctalString(8)); \nSystem.out.println(Integer.toOctalString(19)); \nSystem.out.println(Integer.toOctalString(81)); \n}",
"private void validateDigits(List<Integer> digits) throws DigitException {\n int validDigits = 0;\n for (int digit : digits) {\n if (digit % 2 == 0 || digit == 9) {\n validDigits = validDigits + 1;\n }\n }\n if (validDigits == 0) {\n int number = convertToNumber(digits);\n throw new DigitException(\"Invalid number: \" + number + \" that would cause division by 0\");\n }\n }",
"public static void calculateDecimalNumber() {\n\t\tint number = 121;\n\t\tint base = 4;\n\t\tint remain = 0;\n\t\tint commaShift = 0;\n\t\tint decimalnumber = 0;\n\n\t\tswitch (base) {\n\t\tcase 1: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(1, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 2: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(2, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 3: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(3, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 4: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(4, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 5: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(5, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 6: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(6, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 7: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(7, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 8: {\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(8, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\t\tcase 9:\n\t\t\twhile (number != 0) {\n\t\t\t\tremain = number % 10;\n\t\t\t\tdecimalnumber = decimalnumber + (int) (remain * (Math.pow(9, commaShift)));\n\t\t\t\tnumber = number / 10;\n\t\t\t\tcommaShift = commaShift + 1;\n\t\t\t}\n\t\t\tSystem.out.println(\"decimalnumber:\" + decimalnumber);\n\t\t\tbreak;\n\t\t}\n\n\t}",
"public int getE04(final int digitNumber);",
"public void daffodilNum(int digit) {\n int count = 0;\n for (int i = (int) Math.pow(10, digit-1); i < (int) Math.pow(10, digit); i++) {\n int sum = 0;\n for (int index = 0; index < digit; index++) {\n int curDigit = (i / ((index == 0) ? 1 : ((int) Math.pow(10, index)))) % 10;\n sum += Math.pow(curDigit, 3);\n }\n if (sum == i) {\n System.out.print(i);\n System.out.print(' ');\n count++;\n if (count == 2) {\n System.out.println();\n count = 0;\n }\n }\n }\n }",
"private static int getHexDigit(String s, int i) {\n char c = s.charAt(i);\n if (c >= '0' && c <= '9') {\n return c - '0';\n } else if (c >= 'a' && c <= 'f') {\n return c - 'a' + 0xa;\n } else if (c >= 'A' && c <= 'F') {\n return c - 'A' + 0xa;\n } else {\n throw new IllegalArgumentException(s);\n }\n }",
"public int countDigitOne(int n) {\n int res = 0;\n for(long i = 1 ; i <= n; i *= 10){\n long k = n/i, r = n % i;\n res += (k + 8) / 10 * i + ((k%10 == 1)?(r+1):0);\n }\n return res;\n }",
"public void testDIGITS4() throws Exception {\n\t\tObject retval = execLexer(\"DIGITS\", 241, \"0.1\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"DIGITS\", expecting, actual);\n\t}",
"private static String formatPRECIO(String var1)\r\n\t{\r\n\t\tString temp = var1.replace(\".\", \"\");\r\n\t\t\r\n\t\treturn( String.format(\"%09d\", Integer.parseInt(temp)) );\r\n\t}",
"public static int hex2Decimal(String s) {\n\t\tString digits = \"0123456789ABCDEF\";\n\t\ts = s.toUpperCase();\n\t\tint x = s.indexOf(\"X\");\n\t\tif (x >= 0) {\n\t\t\ts = s.substring(x + 1);\n\t\t}\n\t\tint val = 0;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar c = s.charAt(i);\n\t\t\tint d = digits.indexOf(c);\n\t\t\tval = 16 * val + d;\n\t\t}\n\t\treturn val;\n\t}",
"public void setNumDigits(int digits) {\r\n \r\n //Set Value\r\n numDigits = digits;\r\n \r\n }",
"public Hexadecimal(int decimal){\n this.decimal = decimal;\n HexadecConverter hexCon = new HexadecConverter();\n this.hexString = new StringBuilder(hexCon.decToStr(decimal));\n }",
"private String Hexa(int num) {\n if (num < 0)\n {\n return Integer.toHexString(num).substring(4);\n }\n String str = Integer.toHexString(num);\n while (str.length()<4)\n {\n str = \"0\" + str;\n }\n return str;\n }",
"public void testDIGITS6() throws Exception {\n\t\tObject retval = execLexer(\"DIGITS\", 243, \"one\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.FAIL, retval);\n\t\tObject expecting = \"FAIL\";\n\n\t\tassertEquals(\"testing rule \"+\"DIGITS\", expecting, actual);\n\t}",
"public String getDigits() {\n return _digits;\n }",
"public static int anyBaseToDecimal(int n, int b){\n int val = 0;\n\n int p = 1;\n while(n > 0){\n int d = n % 10;\n n = n / 10;\n val += p * d;\n p = p * b;\n }\n\n return val;\n}",
"public static int digits(int a) {\n\t\tint digits=0; // initialize to 0 first\n\t\twhile(a !=0) { // while a is not 0 do under\n\t\t\ta = a/10; // since its dividing by integer if the number is lower than 10 it will return 0;\n\t\t\tdigits++; // when a/10 != 0 add 1 to digits \n\t\t}\n\t\treturn digits; // return digits\n\t}",
"public static int getDigits(int i) {\n\t\tif (i < 10) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 1 + getDigits(i / 10);\n\t}",
"public void testGetOnesDigit() {\n\t\tNumberConverter test5 = new NumberConverter(295);\n\t\tNumberConverter test9 = new NumberConverter(109);\n\t\tNumberConverter test11 = new NumberConverter(311);\n\t\tNumberConverter test0 = new NumberConverter(310);\n\t\tNumberConverter test00 = new NumberConverter(2);\n\t\tassertEquals(\"Should have returned last digit\", test5.getNthDigit(1), 5);\n\t\tassertEquals(\"Should have returned last digit\", test9.getNthDigit(1), 9);\n\t\tassertEquals(\"Should have returned last digit\", test11.getNthDigit(1),\n\t\t\t\t1);\n\t\tassertEquals(\"Should have returned last digit\", test0.getNthDigit(1), 0);\n\t\tassertEquals(\"Should have returned last digit\", test00.getNthDigit(1),\n\t\t\t\t2);\n\t}",
"public String decimalNumberOct(double d) {\n m = \"\";\n c = 0;\n i = 0;\n long z = (long) d;\n while (z != 0) {\n //11001 ------- 25\n c += ((z % 10) * (Math.pow(8, i)));\n z /= 10;\n i++;\n }\n if ((long) d != d) {\n i = -1;\n m += d;\n f = m.indexOf('.') + 1;\n f = m.length() - f;\n f = -f;\n double a = d - (long) d;\n while (i >= f) {\n //11001 ------- 25\n a *= 10;\n c += (long) a * ((Math.pow(8, i)));\n i--;\n a -= (long) a;\n }\n }\n m = \"\";\n m += c;\n return m;\n }",
"public void testDIGITS1() throws Exception {\n\t\tObject retval = execLexer(\"DIGITS\", 238, \"1\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"DIGITS\", expecting, actual);\n\t}",
"public static void main(String[] args) {\n\t\tint var=98;\n\t\tint sumofdigit=addDigits(var);\n\t\tSystem.out.println(sumofdigit);\n\n\t}",
"private static char toHexDigit(int h) {\n char out;\n if (h <= 9) out = (char) (h + 0x30);\n else out = (char) (h + 0x37);\n //System.err.println(h + \": \" + out);\n return out;\n }",
"private static int getDigit(int position, int value, int radix) {\n return value / (int) Math.pow(radix,position) % radix;\n }",
"private static int fromDigit(char ch) {\n if (ch >= '0' && ch <= '9')\n return ch - '0';\n if (ch >= 'A' && ch <= 'F')\n return ch - 'A' + 10;\n if (ch >= 'a' && ch <= 'f')\n return ch - 'a' + 10;\n throw new IllegalArgumentException(\"invalid hex digit '\" + ch + \"'\");\n }",
"public static int decimalToAnyBase(int n, int b){\n int val = 0;\n\n int p = 1;\n while(n > 0){\n int d = n % b;\n n = n / b;\n val += p * d;\n p = p * 10;\n }\n\n return val;\n}",
"private void multiplyDigits(List<Integer> digits) {\n log.debug(\"method=multiplyDigitsStart, digits=\" + digits);\n for (int i = 0; i < digits.size(); i++) {\n if (digits.get(i) == 8 || digits.get(i) == 9) {\n digits.set(i, digits.get(i) * 2);\n }\n }\n log.debug(\"method=multiplyDigitsEnd, digits=\" + digits);\n }",
"private String format(String s){\n\t\tint len = s.length();\n\t\tfor (int i = 0; i < 6 - len; i++){\n\t\t\ts = \"0\" + s;\n\t\t}\n\t\t\n\t\treturn s;\n\t}",
"public void testDIGITS2() throws Exception {\n\t\tObject retval = execLexer(\"DIGITS\", 239, \"12\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"DIGITS\", expecting, actual);\n\t}",
"static int find(int decimal_number) \r\n { \r\n if (decimal_number == 0) \r\n return 0; \r\n \r\n else\r\n \r\n return (decimal_number % 2 + 10 * \r\n find(decimal_number / 2)); \r\n }",
"static long calcComplement(long value, long digits)\r\n {\n if ( value > 0.5*Math.pow(16, digits) )\r\n {\r\n return value - (int)Math.pow(16, digits);\r\n }\r\n else\r\n {\r\n return value;\r\n }\r\n }",
"private static int hex2dec(int hex) {\n if (hex > 0x255 || hex < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 0x255 (597)\");\n }\n return (hex / 256) * 100 + ((hex % 256) / 16) * 10 + hex % 256 % 16;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint num = 999;\n\t\tString numXXX = \"\";\n\t\t\n\t\tif ((num < 100) & (num >=10) ){\n\t\t\tnumXXX = \"0\" + num;\t\t\n\t\t} else if (num < 10) {\n\t\t\tnumXXX = \"00\" + num; \t\n\t\t} else {\n\t\t\tnumXXX = \"\" + num;\n\t\t}\n\t\t\n\t\tint hundred = Character.digit(numXXX.charAt(0),10);\n\t\tint ten = Character.digit(numXXX.charAt(1),10);\n\t\tint digit = Character.digit(numXXX.charAt(2),10);\n\t\t\n\t\t//System.out.println(numXXX + \":\" + hundred + ten + digit);\n\t\t\n\t\tString hundredStr = \"\";\n\t\tString tenStr = \"\";\n\t\tString digitStr = \"\";\n\t\t\n\t\tswitch (hundred) {\n\t\t\tcase 1: \n\t\t\t\thundredStr = \"one hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 2: \n\t\t\t\thundredStr = \"two hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 3: \n\t\t\t\thundredStr = \"three hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 4: \n\t\t\t\thundredStr = \"four hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 5: \n\t\t\t\thundredStr = \"five hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 6: \n\t\t\t\thundredStr = \"six hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 7: \n\t\t\t\thundredStr = \"seven hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 8: \n\t\t\t\thundredStr = \"eight hundred\";\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\thundredStr = \"nine hundred\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\tswitch (ten) {\n\t\t\tcase 1:\n\t\t\t\tif (digit == 0){\n\t\t\t\t\ttenStr = \"ten\";\n\t\t\t\t} else {\n\t\t\t\t\tswitch (digit) {\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\ttenStr = \"eleven\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\ttenStr = \"twelve\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\ttenStr = \"thirteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\ttenStr = \"fourteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\ttenStr = \"fifteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\ttenStr = \"sixteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\ttenStr = \"seventeen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\ttenStr = \"eighteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\ttenStr = \"nineteen\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n \t\t\tcase 2: \n \t\t\t\ttenStr = \"twenty\";\n \t\t\t\tbreak;\n \t\t\tcase 3: \n \t\t\t\ttenStr = \"thirty\";\n \t\t\t\tbreak;\n \t\t\tcase 4: \n \t\t\t\ttenStr = \"fourty\";\n \t\t\t\tbreak;\n \t\t\tcase 5: \n \t\t\t\ttenStr = \"fifty\";\n \t\t\t\tbreak;\n \t\t\tcase 6: \n \t\t\t\ttenStr = \"sixty\";\n \t\t\t\tbreak;\n \t\t\tcase 7: \n \t\t\t\ttenStr = \"seventy\";\n \t\t\t\tbreak;\n \t\t\tcase 8: \n \t\t\t\ttenStr = \"eighty\";\n \t\t\t\tbreak;\n \t\t\tcase 9: \n \t\t\t\ttenStr = \"ninety\";\n \t\t\t\tbreak;\t\n }\n\t\t\n\t\tif ((ten != 1) | (ten == 0)){\n\t\t\tswitch (digit) {\n\t\t\t\tcase 0:\n\t\t\t\t\tif ((ten == 0) & (hundred == 0)){\n\t\t\t\t\t\tdigitStr = \"zero\";\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tdigitStr = \"one\";\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tdigitStr = \"two\";\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tdigitStr = \"three\";\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tdigitStr = \"four\";\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tdigitStr = \"five\";\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tdigitStr = \"six\";\n\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\tdigitStr = \"seven\";\n\t\t\t\tbreak;\n\t\t\t\tcase 8:\n\t\t\t\t\tdigitStr = \"eight\";\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\tdigitStr = \"nine\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (ten == 0){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + digitStr);\n\t\t} else if (ten == 1){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr);\n\t\t} else if ((ten != 1) & (digit == 0)){\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr);\n\t\t} else {\n\t\t\tSystem.out.println(num + \" => \" + hundredStr + \" \" + tenStr + \"-\" + digitStr);\n\t\t}\n\t\t\n\t}",
"public static int fractionDigits(String percent) {\n\t return BCMath.numberPrecision(percent) + 8;\n }",
"public static void main(String[] args) {\n List<Integer> res = sequentialDigits(744, 1928);\n }",
"public static String decimal2Hex(int d) {\n\t\tString digits = \"0123456789ABCDEF\";\n\t\tif (d == 0)\n\t\t\treturn \"0\";\n\t\tString hex = \"\";\n\t\twhile (d > 0) {\n\t\t\tint digit = d % 16; // rightmost digit\n\t\t\thex = digits.charAt(digit) + hex; // string concatenation\n\t\t\td = d / 16;\n\t\t}\n\t\treturn hex;\n\t}",
"public void contarDigitos(int numero) { //recibe como parametro un valor entero\r\n while (numero > 0) {\r\n numero = numero / 10; //se divide entre 10 el numero ingresado y luego este ocupa su lugar\r\n contador++; //cada vez que se divida entre 10 se aumenta en 1 el contador, el cual\r\n //indica los digitos que tiene el numero ingresado\r\n }\r\n }",
"private int getNumDigits(int x) {\n int ans = 1;\n for (int digit = 9; digit >=0; digit--) {\n int power_of_ten = (int) Math.pow(10, digit);\n if (x / power_of_ten > 0) {\n ans = digit + 1;\n break;\n }\n }\n \n return ans;\n }",
"private static String hexDigit(byte x) {\n StringBuffer sb = new StringBuffer();\n char c;\n c = (char) ((x >> 4) & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n c = (char) (x & 0xf);\n if (c > 9) {\n c = (char) ((c - 10) + 'a');\n } else {\n c = (char) (c + '0');\n }\n sb.append(c);\n return sb.toString();\n }",
"public String decimalToHexa(int numero) {\n\t\tSystem.out.print(\"Convirtiendo decimal (\" + numero + \") a hexadecimal >> \");\n\t\treturn Integer.toHexString(numero);\n\t}",
"public void testDIGITS3() throws Exception {\n\t\tObject retval = execLexer(\"DIGITS\", 240, \"1234567890\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"DIGITS\", expecting, actual);\n\t}",
"public void testGetDigitsNumberIsZero() {\n\t\tNumberConverter test = new NumberConverter(0);\n\t\tassertEquals(\"Should have returned ones digit as 0\",\n\t\t\t\ttest.getNthDigit(1), 0);\n\t\tassertEquals(\"Should have returned tens digit as 0\",\n\t\t\t\ttest.getNthDigit(2), 0);\n\t\tassertEquals(\"Should have returned hundreds digit as 0\",\n\t\t\t\ttest.getNthDigit(3), 0);\n\t}",
"public static boolean checkdigitsequal() {\n int count2=0;\n for (a = 0; a < 10; a++) {\n if (digits[a] == 0)\n {\n count2++;\n if(count2==10)return true;\n }\n else return false;\n }\n return false;\n }",
"public int getNumDigits() {\r\n \r\n //Return Value\r\n return numDigits;\r\n \r\n }",
"public static void main(String[] args) {\n int a,b,c;\n int data;\n for (int i = 100; i < 999; i++) {\n\t\t\ta=i/100;//百位\n\t\t\tb=(i-a*100)/10;//十位\n\t\t\tc=i-100*a-10*b;//个位\n\t\t\tdata=a*a*a+b*b*b+c*c*c;\n\t\t\tif(data==i){\n\t\t\t\tSystem.out.println(\"水鲜花数字:\"+i);\n\t\t\t}\n\t\t}\n\t}",
"private static String create50DigitString(){\n StringBuilder sb = new StringBuilder(\"1\");\n for(int i = 1; i < 50; i++){\n sb.append(\"0\");\n }\n return sb.toString();\n }",
"public static int getDigit(int number){\r\n int j = 0 ;\r\n j = number % 10;\r\n j += number / 10;\r\n return j;\r\n }",
"private static int dec2hex(int dec) {\n if (dec > 255 || dec < 0) {\n throw new IllegalArgumentException(\"Value must be between 0 and 255\");\n }\n return (dec / 100) * 256 + ((dec % 100) / 10) * 16 + dec % 100 % 10;\n }",
"private int decToOctal(int decimal)\n {\n\t\t ArrayList<Integer> oct_num = new ArrayList<Integer>();\n\t\t int octal= 0;\n\t\t \n\t\t \n\t \n\t while(decimal != 0)\n\t {\n\t \t oct_num.add(decimal%8);//remainder represents one digit in octal. Adding it to the arraylist.\n\t \t decimal /= 8;//\"%\" does not divide the number, it only gets the remainder, so it requires this division to reach 0.\n\t }\n\t \n\t \n\t \n\t //for loop to combine values of each oct_num array into one integer value\n\t int unit = 1;//first value of the array list represents unit of 1\n\t for(int i = 0; i < oct_num.size(); i++) \n\t { \t\n\t \toctal = octal + (oct_num.get(i) * unit) ;\n\t unit *= 10;//unit is timed by ten after each loop\n\t \n\t }\n\t\t return octal;\n }",
"public static void main(String[] args) {\n System.out.println(countDigitOne(11));\n }",
"private static int decimalToBase(int base, int num) {\n\t\tint pow = 1, rem = 0, i, res = 0;\n\t\tfor (i = num; i > 0; i = i /base) {\n\t\t\trem = i % base;\n\t\t\tres = res + pow*rem;\n\t\t\tpow = pow * 10;\n\t\t}\n\t\treturn res;\n\t}",
"public int getInterdigitInterval();",
"public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }",
"private void correctDigits(List<Integer> digits) {\n log.debug(\"method=correcrDigitsStart, digits=\" + digits);\n int number = convertToNumber(digits);\n digits.clear();\n digits.addAll(getDigits(number));\n log.debug(\"method=correctDigitsEnd, digits=\" + digits);\n }",
"public static String makeHexColorInt(int... vals){\n\t\treturn \"\"+formatNumberString(Integer.toHexString((int)vals[0]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[1]),2)+\"\"+formatNumberString(Integer.toHexString((int)vals[2]),2);\n\t}",
"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 static int decimals() {\n return 0;\n }",
"public static void alldigitscheck(int x, int l) {\n do {\n int y = x % 10;\n digits[y] = digits[y] + l;\n x = x / 10;\n } while (x != 0);\n }",
"private void checkHexValue(String value, int digits) throws XmlParserException {\n\t\tif (!Helper.isHex(value)) {\n\t\t\tthrow new XmlParserException(\"Value [%s] isn't valid hexadecimal value!\", value);\n\t\t}\n\n\t\tif (value.length() != digits) {\n\t\t\tthrow new XmlParserException(\"Value [%s] must have exactly [%s] digit(s)!\", value, digits);\n\t\t}\n\n\t}",
"@Test(timeout = 4000)\n public void test072() throws Throwable {\n int int0 = JavaCharStream.hexval('e');\n assertEquals(14, int0);\n }",
"public static int digits(ByteReader r, int length) {\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < length; i++)\n\t\t\tsum = sum * DECIMAL_RADIX + digit(r);\n\t\treturn sum;\n\t}",
"public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.next();\n double n=0;\n int dcount=0;\n int pointer=0;\n for(int i=0;i<s.length();i++)\n {\n if(s.charAt(i)!='.')\n {\n n=n*10+(s.charAt(i)-'0');\n if(pointer==1)\n dcount++;\n }\n else\n pointer=1;\n }\n n=n/Math.pow(10,dcount);\n System.out.printf(\"%.6f\",n);\n }",
"private void setDigitsAfterDot(int digits) {\n // check for logical error\n if(digits < 0) {\n // error ..\n eHandler.newError(ErrorType.INVALID_ARGUMENT, \"setDigitsAfterDot\" , \"Negative digits number\");\n\n // exit from method\n return;\n } // end of if statement\n\n // set the digitsAfterDot\n digitsAfterDot = digits;\n\n }",
"public static void digitLerres(int a) {\n\t\tswitch (a) {\n\t\tcase 0:\n\t\t\tSystem.out.println(\"нула\");\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tSystem.out.println(\"едно\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tSystem.out.println(\"две\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tSystem.out.println(\"три\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tSystem.out.println(\"четири\");\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tSystem.out.println(\"пет\");\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tSystem.out.println(\"шест\");\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tSystem.out.println(\"седем\");\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tSystem.out.println(\"осем\");\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tSystem.out.println(\"девет\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Error\");\n\t\t\tbreak;\n\t\t}\n\t}",
"int main()\n{\n int num,rem;\n cin>>num;\n rem=num%10;\n cout<<rem+(num/1000);\n}",
"static public String nf(int num, int digits) {\n\t\tif (formatInt==null) nfInitFormats();\n\t\tformatInt.setMinimumIntegerDigits(digits);\n\t\treturn formatInt.format(num);\n\t}",
"private static int solve(ArrayList<Integer> digits, int b, int c) {\n for (int i=0;i<digits.size();i++) {\r\n int num = digits.get(i);\r\n int numDigits=b-1;\r\n for (int j=0; j<i && numDigits>0 ; j++) {\r\n num = num*10 + digits.get(j);\r\n }\r\n for (int j=i+1;j<digits.size();j++) {\r\n num = num*10 + digits.get(j);\r\n }\r\n }\r\n \r\n return 0;\r\n }",
"private boolean isHexadecimalDigit(final char c) {\n return (c <= 'f' && map[c] >= 0);\n }",
"@Test(timeout = 4000)\n public void test118() throws Throwable {\n int int0 = JavaCharStream.hexval('6');\n assertEquals(6, int0);\n }",
"public static int binaryToDecimal(int s){\n\t\tint multiplier= 1;\t\n\t\tint result=0;\n\t\twhile(s>0){\n\t\t\tint binaryDigit= s%10;\n\t\t\tresult= result+ binaryDigit*multiplier;\n\t\t\tmultiplier= multiplier*2; \n\t\t\ts= s/10;\n\t\t} \n\t\treturn result;\n\t}",
"private static long getResult(Triplet... triplets) {\n\t\tlong result = triplets[0].value;\n\t\tfor (int i = 1; i < triplets.length; i++) {\n\t\t\tresult = result*10 + triplets[i].value % 10;\n\t\t}\n\t\t//now discover first digit.\n\t\tString value = String.valueOf(result);\n\t\tfor (char c = '0'; c <= '9'; c++) {\n\t\t\tif (value.indexOf(c) < 0) {\n\t\t\t\tresult = result + (c - '0') * 1000000000L;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private String tenthsToFixedString(int x) {\n int tens = x / MAGIC_NUMBER_TEN;\n return new String(\"\" + tens + \".\" + (x - MAGIC_NUMBER_TEN * tens));\n }",
"@Test(timeout = 4000)\n public void test125() throws Throwable {\n int int0 = JavaCharStream.hexval('0');\n assertEquals(0, int0);\n }",
"public static void main(String[] args) {\n f_menu();\r\n int cifras=0,n=f_number_user(),n2;\r\n do {\r\n if (n==0){\r\n cifras=1;\r\n }else {\r\n n = n / 10;\r\n cifras++;\r\n }\r\n }while (n!=0);\r\n n2=10*n*cifras;\r\n System.out.println(\"the number is: \"+n2+\" the number have: \"+cifras+\"digits\");\r\n }",
"static double roundDigits(double x, int digits) {\n if(Double.isNaN(x)) return x;\n double sgn = x < 0 ? -1 : 1;\n x = Math.abs(x);\n double power_of_10 = (int)Math.pow(10, digits);\n return sgn*(digits == 0\n // go to the even digit\n ? (x % 1 >= 0.5 && !(Math.floor(x)%2==0))\n ? Math.ceil(x)\n : Math.floor(x)\n : Math.floor(x * power_of_10 + 0.5) / power_of_10);\n }",
"private static char[] initNum() {\n\t\tchar[] values = {'0', '1', '2', '3', '4', '5',\n\t\t\t\t'6', '7', '8', '9'};\n\t\tchar[] answer = new char[4];\n\t\t\n\t\tint countReady = 0;\n\t\t\n\t\twhile(countReady != 4) {\n\t\t\tint tempChar = rndChar();\n\t\t\tif(values[tempChar] != 'x') {\n\t\t\t\tanswer[countReady] = values[tempChar];\n\t\t\t\tvalues[tempChar] = 'x';\n\t\t\t\tcountReady++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn answer;\n\t}",
"public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }",
"private void fastZeroPaddingNumber(final StringBuffer buf, int value, final int minDigits, final int maxDigits) {\n\t\tint limit = decimalBuf.length < maxDigits ? decimalBuf.length : maxDigits;\n\t\tint index = limit - 1;\n\t\twhile (true) {\n\t\t\tdecimalBuf[index] = decDigits[(value % 10)];\n\t\t\tvalue /= 10;\n\t\t\tif (index == 0 || value == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tindex--;\n\t\t}\n\t\tint padding = minDigits - (limit - index);\n\t\twhile (padding > 0 && index > 0) {\n\t\t\tdecimalBuf[--index] = decDigits[0];\n\t\t\tpadding--;\n\t\t}\n\t\twhile (padding > 0) {\n\t\t\t// when pattern width is longer than decimalBuf, need extra\n\t\t\t// leading zeros - ticke#7595\n\t\t\tbuf.append(decDigits[0]);\n\t\t\tpadding--;\n\t\t}\n\t\tbuf.append(decimalBuf, index, limit - index);\n\t}",
"public static int digitCounter(int n){\r\n int counter=1;\r\n while(n>10){\r\n n=n/10;\r\n counter++;\r\n }\r\n System.out.println(\"conter : \" +counter);\r\n return counter;\r\n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n int int0 = JavaCharStream.hexval('9');\n assertEquals(9, int0);\n }",
"@Test(timeout = 4000)\n public void test073() throws Throwable {\n int int0 = JavaCharStream.hexval('d');\n assertEquals(13, int0);\n }",
"private static int numOfDecimalDigit(String text) {\n\t\treturn text.substring(text.indexOf(\".\") + 1, text.length()).length();\r\n\t}"
] | [
"0.7048387",
"0.677173",
"0.67224884",
"0.6144689",
"0.6122303",
"0.6046712",
"0.60243106",
"0.5961806",
"0.5915216",
"0.5915216",
"0.5884776",
"0.5879443",
"0.58063316",
"0.57655007",
"0.5707676",
"0.56780446",
"0.5667928",
"0.56568545",
"0.5624368",
"0.55696243",
"0.5530605",
"0.5527759",
"0.55232483",
"0.552291",
"0.5521807",
"0.5513746",
"0.54610234",
"0.5460443",
"0.54544693",
"0.54518",
"0.54255295",
"0.5410289",
"0.5408692",
"0.54013944",
"0.53975016",
"0.5384548",
"0.53776765",
"0.53713554",
"0.53710705",
"0.53620726",
"0.53589994",
"0.5357946",
"0.5354663",
"0.5347343",
"0.5342685",
"0.5331261",
"0.5319489",
"0.5303627",
"0.52853614",
"0.5279418",
"0.5274801",
"0.52737164",
"0.5271234",
"0.5270839",
"0.5268284",
"0.5257237",
"0.52551246",
"0.5253617",
"0.5250556",
"0.5245897",
"0.5241001",
"0.52364296",
"0.5231513",
"0.52262014",
"0.52104646",
"0.5205206",
"0.5203008",
"0.5202207",
"0.51872754",
"0.5178292",
"0.517803",
"0.51639766",
"0.5157529",
"0.5156837",
"0.5155861",
"0.51515245",
"0.5140587",
"0.5139018",
"0.5129096",
"0.51284486",
"0.51222223",
"0.51210856",
"0.5118263",
"0.5113768",
"0.5105049",
"0.5104322",
"0.51042",
"0.5102436",
"0.5097429",
"0.50961965",
"0.5090609",
"0.5089332",
"0.5083825",
"0.50805753",
"0.5068864",
"0.50644547",
"0.50618887",
"0.5059509",
"0.5056838",
"0.50546825"
] | 0.6465418 | 3 |
noquote = "'"! literal | private boolean noquote() {
return NOT(GO() && CHAR('\'')) && literal();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"public void disableQuoteChar() {\n this.quoteChar = NO_QUOTING;\n }",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && literal() && nodquotes());\r\n }",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"private boolean noquotes() {\r\n return OPT(GO() && noquote() && noquotes());\r\n }",
"@Test\n public void testStringLiteralEscapedTick() throws Exception {\n String sql = \"SELECT 'O''Leary' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"O'Leary\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public void quote() {\n text.append(\"\\'\");\n }",
"String applyQuote(String name);",
"private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }",
"public Quotes() { }",
"boolean isQuote();",
"private String stripQuotes( String quoted ) { return quoted.substring( 1, quoted.length() - 1 ); }",
"private static String unquote(String raw) {\r\n String result;\r\n if (null == raw) {\r\n result = null;\r\n } else {\r\n if (raw.length() >= 2 && raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\r\n result = raw.substring(1, raw.length() - 1);\r\n } else {\r\n if (raw.equals(\"null\")) {\r\n result = null;\r\n } else {\r\n result = raw;\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"protected String getQuote() {\n return \"\\\"\";\n }",
"@Override\n public String doQuote(String identifier) {\n return \"\\\"\" + identifier + \"\\\"\";\n }",
"public boolean isLiteral() {\n return false;\n }",
"public void doubleQuote() {\n text.append(\"\\\"\");\n }",
"public String getQuote();",
"public char openQuote() {\n \t\treturn '\"';\n \t}",
"private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }",
"public static String WithoutQuoations(String text)\n {\n text = text.replace(\"\\\"\", \"\");\n return text;\n }",
"private String q(String s) {\r\n\t\treturn '\"' + s + '\"';\r\n\t}",
"private static String unquote(String s) {\n int length = s.length();\n if (length >= 2 && s.charAt(0) =='\"' && s.charAt(length - 1) == '\"') {\n return s.substring(1, length - 1);\n }\n return s;\n }",
"@Test\n public void testStringLiteralEscapedTick3() throws Exception {\n String sql = \"SELECT 'a''b''c' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"a'b'c\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public void delLiteral();",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = QUOTE_SINGLE;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:13: ( '\\\\'' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:16: '\\\\''\n\t\t\t{\n\t\t\tmatch('\\''); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public void testRestartabilityWithAntiquotations() {\n checkCorrectRestart(\n \"''\\n\" +\n \" ${\\n\" +\n \" [\\n\" +\n \" \\\"pure string\\\",\\n\" +\n \" \\\"string with ${antiquotation}\\\",\\n\" +\n \" ''ind string with ${multiple} ${antiquotations}''\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \"''\\n\");\n }",
"public static String getNoApostropheString(String s) {\r\n\t\tif (s == null) {\r\n\t\t\ts = \"\";\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif ((i == 0) && (s.toCharArray()[i] == '\\'')) {\r\n\t\t\t\ts = '\\'' + s;\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (s.toCharArray()[i] == '\\'') {\r\n\t\t\t\t\ts = s.substring(0, i) + '\\'' + s.substring(i);\r\n\t\t\t\t\ti++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\r\n\t}",
"@Override\n public String applyQuoteIfNeeded(final String identifier) {\n return applyQuote(identifier);\n }",
"@Test\n public void testStringLiteralEscapedTick2() throws Exception {\n String sql = \"SELECT '''abc''' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"'abc'\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"@Override\n\tpublic String sqlQuote(String name) {\n\t\treturn String.format(\"\\\"%s\\\"\", name);\n//\t\treturn name;\n\t}",
"@Override\n\tprotected void testForOpenDoubleQuotes() {\n\t}",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n try {\n int _type = QUOTE_SINGLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:14: ( '\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:16: '\\\\''\n {\n match('\\''); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static String quote(String str) {\n return (str != null ? \"'\" + str + \"'\" : null);\n }",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"public final void mQUOTE_TRIPLE() throws RecognitionException {\n try {\n int _type = QUOTE_TRIPLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:14: ( '\\\\'\\\\'\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:16: '\\\\'\\\\'\\\\''\n {\n match(\"'''\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }",
"public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"@SuppressWarnings({ \"unused\", \"null\" })\n public static @NotNull String jcrQueryLiteral(@NotNull String value) {\n if (value == null) {\n throw new IllegalArgumentException(\"Invalid query string value: \" + value);\n }\n return \"'\" + StringUtils.replace(value, \"'\", \"''\") + \"'\";\n }",
"@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }",
"private static boolean QuotStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeQuot(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"@Override\r\n\tprotected void convertStringConst(String str) {\r\n\t\tappend(\"\\'\\\"\", str.replace(\"\\'\",\"\\'\\'\"), \"\\\"\\'\");\r\n\t}",
"private static String dequote(String s)\r\n {\r\n String t = s.trim();\r\n if (t.startsWith(\"\\\"\") && t.endsWith(\"\\\"\"))\r\n {\r\n return t.substring(1, t.length()-1);\r\n }\r\n return t;\r\n }",
"@Test\n public void testStringLiteralEscapedTick4() throws Exception {\n String sql = \"SELECT \\\" \\\"\\\" \\\" FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \" \\\" \");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"public char closeQuote() {\n \t\treturn '\"';\n \t}",
"StringLiteralExp createStringLiteralExp();",
"public final String quote(String name) {\n \t\tif ( name == null ) {\n \t\t\treturn null;\n \t\t}\n \n \t\tif ( name.charAt( 0 ) == '`' ) {\n \t\t\treturn openQuote() + name.substring( 1, name.length() - 1 ) + closeQuote();\n \t\t}\n \t\telse {\n \t\t\treturn name;\n \t\t}\n \t}",
"public static String unDoubleQuote(String str){\n if(isDoubleQuoted(str)) return trimBothEnds(str,1);\n else return str;\n }",
"private String dequote(String str)\n {\n if (str.length() >= 2 && str.charAt(0) == '\"' && str.charAt(str.length()-1) == '\"')\n return str.substring(1, str.length() - 1);\n\n return str;\n }",
"public String quotate(String content){\n\n return \"'\"+content+\"'\";\n }",
"private void doublequote( String[] valeurs) {\n\t\t// TODO Auto-generated method stub\n\t\tint i = -1;\n\t\ttry{\n\t\t\tfor(i = 0; i < valeurs.length; i++)\n\t\t\t\tvaleurs[i] = valeurs[i].replaceAll(\"'\", \"''\");\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"IMPOSSIBLE D'ACCEDER A VALEURS \" + i);\n\t\t}\n\t}",
"private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }",
"public Quotes(String alias) {\n\t\tthis(alias, QUOTES);\n\t}",
"private static String stripQuotes(String text) {\n Matcher matcher = quotePattern.matcher(text);\n text = matcher.replaceAll(\"\");\n return text;\n }",
"private String replaceSingleQuotes(String toReplace) {\n if (!StringUtils.isBlank(toReplace)) {\n return toReplace.replaceAll(\"'\", \"\");\n } else {\n return toReplace;\n }\n\n }",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"public static String maskQuoteAndBackslash(String s)\t{\n\t\tStringBuffer sb = new StringBuffer(s.length());\n\t\tfor (int i = 0; i < s.length(); i++)\t{\n\t\t\tchar c = s.charAt(i);\n\t\t\tswitch (c)\t{\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tsb.append('\\\\');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.append(c);\n\t\t}\n\t\treturn sb.toString();\n\t}",
"@Override\n\tprotected void testForOpenSingleQuotes() {\n\t}",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n String string0 = SQLUtil.normalize(\"'\", false);\n assertEquals(\"''\", string0);\n }",
"public static String quote(String text) {\n\t\treturn \"\\\"\" + text + \"\\\"\";\n\t}",
"private String stripQuotes(String word) {\n\t\tString workWord = new String (word);\n\t\tif (workWord != null && workWord.length() > 1) {\n\t\t\tif (workWord.endsWith(new String(\"\\'\")) || workWord.endsWith(new String(\"\\\"\"))) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-1);\n\t\t\t}\n\t\t\telse if (workWord.endsWith(new String(\"\\'s\")) || workWord.endsWith(new String(\"\\'d\")) ) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-2);\n\t\t\t}\n\t\t\tif (workWord.startsWith(new String(\"\\'\")) || workWord.startsWith(new String(\"\\\"\")) && workWord.length() > 1) {\n\t\t\t workWord = workWord.substring(1);\n\t\t\t}\n\t\t}\n\t return workWord;\n\t}",
"private void emitStringLiteralExpression(StringLiteralExpression expression) {\n boolean containsSingleQuote = expression.string.value.contains(\"'\");\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n\n this.prettyPrinter.append(expression.string.value);\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n }",
"private String stripQuotes(String inStr) {\n \t\n \tif(inStr.startsWith(\"\\\"\") || inStr.startsWith(\"'\")) {\n \tinStr = inStr.substring(1);\n \t}\n \tif(inStr.endsWith(\"\\\"\") || inStr.endsWith(\"'\")) {\n \tinStr = inStr.substring(0, inStr.length() - 1);\n \t}\n \treturn inStr;\n\t}",
"private String encodeSQL(String text) {\r\n text = text.replaceAll(\"'\", \"''\");\r\n return \"'\" + text + \"'\";\r\n }",
"public String no(String str) {\n\t\treturn str;\r\n\t}",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"public static char getDefaultAttributeQuoteChar()\n {\n return defaults.attribute_quote_char;\n }",
"private static boolean QuotStringLiteral_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!QuotStringLiteral_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"QuotStringLiteral_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }",
"static String wrap(Object value)\n/* */ {\n/* 156 */ if ((value == null) || (\"-\".equals(value))) {\n/* 157 */ return \"-\";\n/* */ }\n/* */ try\n/* */ {\n/* 161 */ svalue = value.toString();\n/* */ } catch (Throwable e) { String svalue;\n/* 163 */ ExceptionUtils.handleThrowable(e);\n/* */ \n/* 165 */ return \"-\";\n/* */ }\n/* */ \n/* */ String svalue;\n/* 169 */ StringBuilder buffer = new StringBuilder(svalue.length() + 2);\n/* 170 */ buffer.append('\"');\n/* 171 */ int i = 0;\n/* 172 */ while (i < svalue.length()) {\n/* 173 */ int j = svalue.indexOf('\"', i);\n/* 174 */ if (j == -1) {\n/* 175 */ buffer.append(svalue.substring(i));\n/* 176 */ i = svalue.length();\n/* */ } else {\n/* 178 */ buffer.append(svalue.substring(i, j + 1));\n/* 179 */ buffer.append('\"');\n/* 180 */ i = j + 1;\n/* */ }\n/* */ }\n/* */ \n/* 184 */ buffer.append('\"');\n/* 185 */ return buffer.toString();\n/* */ }",
"public static String removeSingleQuotation(String line) {\n\t\tif (line.contains(\"'\")) {\n\t\t\tline = line.replace(\"'\", \"\");\n\t\t}\n\t\treturn line;\n\t}",
"public static boolean isStringLiteral(String token)\n {\n return isLiteral( '\"', '\"', token );\n }",
"public String unvisitedString(Vector<Parser> visited) {\n\treturn \"QuotedString\";\n}",
"public static String deSingleQuote(String text) {\n return dequote(text, '\\'');\n }",
"static String escape(String str,char quote) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(quote);\n\t\tsb.append(str.replaceAll(Character.toString(quote), \"\\\\\"+quote));\n\t\tsb.append(quote);\n\t\treturn sb.toString();\n\t}",
"public static String dequote(String str, char quote)\n {\n // Is there anything to dequote?\n if (str == null)\n {\n return null;\n }\n\n return dequote(str, 0, str.length(), quote);\n }",
"private static String[] removeEscapes(String[] args) {\n for (int i = 0; i < args.length; i++) {\n args[i] = args[i].replace(\"\\\\\\\"\", \"\"); // NOI18N\n }\n return args;\n }",
"public static String jsonQuote(String value) {\n\tif (value == null)\n\t return null;\n\telse\n\t return String.format(\"\\\"%s\\\"\", value);\n }",
"public static String dequoteFull(String str, char quote)\n {\n if (str == null)\n {\n return null;\n }\n\n return dequoteFull(str, 0, str.length(), quote);\n }",
"@Override\r\n\tprotected String inverseTranslateUnquotedConst(String symbol)\r\n\t{\n\t\tif(symbol.equals(\"datime\"))\r\n\t\t{\r\n\t\t\treturn \"<http://xsb.sourceforge.net/manual1/manual1.pdf#datime>\";\r\n\t\t}\r\n\t\t\r\n\t\treturn symbol;\r\n\t}",
"String getLiteral();",
"String getLiteral();",
"java.util.Optional<Boolean> getShellQuote();",
"private static String quoteParam(String param) {\n return '\"' + param + '\"';\n }",
"@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }",
"public static void maybeQuote (int version, StringBuffer buf,\n String value)\n {\n // special case - a \\n or \\r shouldn't happen in any case\n if (isToken(value)) {\n buf.append(value);\n } else {\n buf.append('\"');\n buf.append(escapeDoubleQuotes(value));\n buf.append('\"');\n }\n }",
"private void eatTripleQuote() {\n position += 3;\n while (position < length) {\n if (data.charAt(position) == '\\'' && isTripleQuoteAtPosition()) {\n tokenStart += 3;\n tokenEnd = position;\n isEscaped = true;\n position += 3;\n return;\n }\n\n position++;\n }\n\n tokenEnd = position;\n }",
"@Test public void testCaretNegation() {\n String sql = \"select * from foo where ^a = 1\";\n String expected = \"SELECT *\\n\"\n + \"FROM `FOO`\\n\"\n + \"WHERE (^(`A` = 1))\";\n sql(sql).ok(expected);\n }",
"static boolean QuotStringLiteral(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral\")) return false;\n if (!nextTokenIs(b, OPENINGQUOT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, OPENINGQUOT);\n r = r && QuotStringLiteral_1(b, l + 1);\n r = r && consumeToken(b, CLOSINGQUOT);\n exit_section_(b, m, null, r);\n return r;\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"public final void mQUOTED_STRING() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:23: ( QUOTE_SINGLE (~ QUOTE_SINGLE )* QUOTE_SINGLE )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:25: QUOTE_SINGLE (~ QUOTE_SINGLE )* QUOTE_SINGLE\n {\n mQUOTE_SINGLE(); \n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:38: (~ QUOTE_SINGLE )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>='\\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='\\uFFFF')) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:39: ~ QUOTE_SINGLE\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='$')||(input.LA(1)>='&' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n mQUOTE_SINGLE(); \n\n }\n\n }\n finally {\n }\n }",
"@Test(timeout = 4000)\n public void test42() throws Throwable {\n String string0 = SQLUtil.normalize(\"S\\\"oRi-d%o\", false);\n assertEquals(\"S \\\"oRi-d%o\\\"\", string0);\n }"
] | [
"0.7211131",
"0.7113372",
"0.7009239",
"0.7002929",
"0.69512343",
"0.69047815",
"0.6836965",
"0.681775",
"0.6569497",
"0.6508203",
"0.6446784",
"0.6393236",
"0.6354772",
"0.6313203",
"0.6290002",
"0.6258737",
"0.61979216",
"0.6161585",
"0.6154969",
"0.61458784",
"0.61106354",
"0.6106673",
"0.60520405",
"0.6048391",
"0.6039782",
"0.6036108",
"0.60354835",
"0.60095334",
"0.600496",
"0.59816694",
"0.59574866",
"0.59492064",
"0.59374183",
"0.5916601",
"0.58714616",
"0.58696693",
"0.5863846",
"0.5860084",
"0.5854889",
"0.5841079",
"0.5840694",
"0.5834878",
"0.5807034",
"0.5785831",
"0.578523",
"0.5766698",
"0.5764853",
"0.5737561",
"0.57106537",
"0.5703221",
"0.56915647",
"0.56867945",
"0.5670965",
"0.56525296",
"0.56514513",
"0.5645196",
"0.56441337",
"0.5638624",
"0.55938977",
"0.5577548",
"0.55752426",
"0.55633795",
"0.5554385",
"0.5550117",
"0.5546608",
"0.55439323",
"0.55352634",
"0.5533086",
"0.55328786",
"0.551153",
"0.5492932",
"0.54911906",
"0.54801303",
"0.5435482",
"0.5428114",
"0.54073614",
"0.54017645",
"0.53995377",
"0.53925914",
"0.53883576",
"0.53868",
"0.53857946",
"0.5379648",
"0.5377704",
"0.5377004",
"0.5374197",
"0.5354156",
"0.53455955",
"0.53409934",
"0.53409934",
"0.5340095",
"0.53363353",
"0.5323891",
"0.53228194",
"0.5322603",
"0.53187776",
"0.53168094",
"0.5308422",
"0.5302986",
"0.52996475"
] | 0.78420717 | 0 |
noquotes = noquote = (noquote noquotes)? | private boolean noquotes() {
return OPT(GO() && noquote() && noquotes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }",
"private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && literal() && nodquotes());\r\n }",
"boolean isQuote();",
"public void disableQuoteChar() {\n this.quoteChar = NO_QUOTING;\n }",
"public String getQuote();",
"public Quotes() { }",
"private String stripQuotes( String quoted ) { return quoted.substring( 1, quoted.length() - 1 ); }",
"public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}",
"@Override\n\tprotected void testForOpenDoubleQuotes() {\n\t}",
"String applyQuote(String name);",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"public void setQuoted( boolean quote ) {\n quote_ = quote;\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"public char openQuote() {\n \t\treturn '\"';\n \t}",
"protected String getQuote() {\n return \"\\\"\";\n }",
"@Override\n\tprotected void testForOpenSingleQuotes() {\n\t}",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"public void quote() {\n text.append(\"\\'\");\n }",
"java.util.Optional<Boolean> getShellQuote();",
"public void doubleQuote() {\n text.append(\"\\\"\");\n }",
"public Quotes(String alias) {\n\t\tthis(alias, QUOTES);\n\t}",
"@attribute(value = \"\", required = false)\t\r\n\tpublic void setQuoteText(Boolean quote) {\r\n\t\tthis.quoteText = quote;\r\n\t}",
"@Override\n public String applyQuoteIfNeeded(final String identifier) {\n return applyQuote(identifier);\n }",
"private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }",
"private void eatTripleQuote() {\n position += 3;\n while (position < length) {\n if (data.charAt(position) == '\\'' && isTripleQuoteAtPosition()) {\n tokenStart += 3;\n tokenEnd = position;\n isEscaped = true;\n position += 3;\n return;\n }\n\n position++;\n }\n\n tokenEnd = position;\n }",
"private String stripQuotes(String word) {\n\t\tString workWord = new String (word);\n\t\tif (workWord != null && workWord.length() > 1) {\n\t\t\tif (workWord.endsWith(new String(\"\\'\")) || workWord.endsWith(new String(\"\\\"\"))) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-1);\n\t\t\t}\n\t\t\telse if (workWord.endsWith(new String(\"\\'s\")) || workWord.endsWith(new String(\"\\'d\")) ) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-2);\n\t\t\t}\n\t\t\tif (workWord.startsWith(new String(\"\\'\")) || workWord.startsWith(new String(\"\\\"\")) && workWord.length() > 1) {\n\t\t\t workWord = workWord.substring(1);\n\t\t\t}\n\t\t}\n\t return workWord;\n\t}",
"private static String stripQuotes(String text) {\n Matcher matcher = quotePattern.matcher(text);\n text = matcher.replaceAll(\"\");\n return text;\n }",
"private String dequote(String str)\n {\n if (str.length() >= 2 && str.charAt(0) == '\"' && str.charAt(str.length()-1) == '\"')\n return str.substring(1, str.length() - 1);\n\n return str;\n }",
"private static String unquote(String raw) {\r\n String result;\r\n if (null == raw) {\r\n result = null;\r\n } else {\r\n if (raw.length() >= 2 && raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\r\n result = raw.substring(1, raw.length() - 1);\r\n } else {\r\n if (raw.equals(\"null\")) {\r\n result = null;\r\n } else {\r\n result = raw;\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"private static String unquote(String s) {\n int length = s.length();\n if (length >= 2 && s.charAt(0) =='\"' && s.charAt(length - 1) == '\"') {\n return s.substring(1, length - 1);\n }\n return s;\n }",
"private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }",
"public char closeQuote() {\n \t\treturn '\"';\n \t}",
"public static void quoteText(boolean useQuotes) {\r\n\t\tXLS2CSV2.useQuotes=useQuotes;\r\n\t}",
"public String getQuotes() {\r\n\t\treturn this.quotes;\r\n\t}",
"protected void testForOpenQuotes() {\n\t\tif (this.inQuotes) {\n\t\t\tgetProcessor().recordUnevenQuotes();\n\t\t}\n\t}",
"public static String unDoubleQuote(String str){\n if(isDoubleQuoted(str)) return trimBothEnds(str,1);\n else return str;\n }",
"private static String dequote(String s)\r\n {\r\n String t = s.trim();\r\n if (t.startsWith(\"\\\"\") && t.endsWith(\"\\\"\"))\r\n {\r\n return t.substring(1, t.length()-1);\r\n }\r\n return t;\r\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"@Override\n\tprotected boolean isInClearText() {\n\t\treturn !this.inQuotes;\n\t}",
"private String replaceSingleQuotes(String toReplace) {\n if (!StringUtils.isBlank(toReplace)) {\n return toReplace.replaceAll(\"'\", \"\");\n } else {\n return toReplace;\n }\n\n }",
"public void testRestartabilityWithAntiquotations() {\n checkCorrectRestart(\n \"''\\n\" +\n \" ${\\n\" +\n \" [\\n\" +\n \" \\\"pure string\\\",\\n\" +\n \" \\\"string with ${antiquotation}\\\",\\n\" +\n \" ''ind string with ${multiple} ${antiquotations}''\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \"''\\n\");\n }",
"public static boolean getDefaultAttributeQuote()\n {\n return defaults.attribute_quote;\n }",
"public static String WithoutQuoations(String text)\n {\n text = text.replace(\"\\\"\", \"\");\n return text;\n }",
"private String q(String s) {\r\n\t\treturn '\"' + s + '\"';\r\n\t}",
"private String stripQuotes(String inStr) {\n \t\n \tif(inStr.startsWith(\"\\\"\") || inStr.startsWith(\"'\")) {\n \tinStr = inStr.substring(1);\n \t}\n \tif(inStr.endsWith(\"\\\"\") || inStr.endsWith(\"'\")) {\n \tinStr = inStr.substring(0, inStr.length() - 1);\n \t}\n \treturn inStr;\n\t}",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = QUOTE_SINGLE;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:13: ( '\\\\'' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:16: '\\\\''\n\t\t\t{\n\t\t\tmatch('\\''); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public String no(String str) {\n\t\treturn str;\r\n\t}",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"public final String quote(String name) {\n \t\tif ( name == null ) {\n \t\t\treturn null;\n \t\t}\n \n \t\tif ( name.charAt( 0 ) == '`' ) {\n \t\t\treturn openQuote() + name.substring( 1, name.length() - 1 ) + closeQuote();\n \t\t}\n \t\telse {\n \t\t\treturn name;\n \t\t}\n \t}",
"private void skipQuotedChars(char pair) {\r\n \t\tint ch = readCharBackward();\r\n \t\t\r\n \t\twhile (ch != -1) {\r\n \t\t\tif (ch == pair) {\r\n \t\t\t\tch = readCharBackward();\r\n \t\t\t\tif (ch == '\\\\') {\r\n \t\t\t\t\tint backSlashCount = 0;\r\n \t\t\t\t\twhile (ch == '\\\\') {\r\n \t\t\t\t\t\tbackSlashCount++;\r\n \t\t\t\t\t\tch = readCharBackward();\r\n \t\t\t\t\t}\r\n \t\t\t\t\treleaseChar(); // Return the last non-slash char to the buffer\r\n \t\t\t\t\tif ((backSlashCount/2)*2 == backSlashCount) {\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tch = readCharBackward();\r\n \t\t}\r\n \t}",
"public String getInspirationalQuote() {\n\t\treturn inspirationalQuote;\n\t}",
"public String no(String str) {\n\t\t\treturn str;\r\n\t\t}",
"public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }",
"public static String quote(String str) {\n return (str != null ? \"'\" + str + \"'\" : null);\n }",
"private static String[] removeEscapes(String[] args) {\n for (int i = 0; i < args.length; i++) {\n args[i] = args[i].replace(\"\\\\\\\"\", \"\"); // NOI18N\n }\n return args;\n }",
"public static void main(String[] args)\t{\r\n\t\t\r\n\t\tSystem.out.println(\"A \\\"quoted\\\" String is\");\r\n\t\tSystem.out.println(\"'much' better if you learn\");\r\n\t\tSystem.out.println(\"the rules of \\\"escape sequences.\\\"\");\r\n\t\tSystem.out.println(\"Also, \\\"\\\" represents an empty String.\");\r\n\t\tSystem.out.println(\"Don't forget: use \\\\\\\" instead of \\\" !\");\r\n\t\tSystem.out.println(\"'' is not the same as \\\"\");\r\n\t\t\r\n\t}",
"private static int checkQuotation(String s) {\r\n\t\tint equalsPos = s.indexOf(\"=\");\r\n\t\tint quotePos = s.indexOf(\"\\\"\");\r\n\t\treturn (equalsPos + 1 == quotePos ? quotePos : 0);\r\n\t}",
"public String quote(String s) {\r\n\t\treturn this.getQuotes().concat(s).concat(this.getQuotes());\r\n\t}",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n try {\n int _type = QUOTE_SINGLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:14: ( '\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:16: '\\\\''\n {\n match('\\''); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean isLiteral() {\n return false;\n }",
"@Override\n public String doQuote(String identifier) {\n return \"\\\"\" + identifier + \"\\\"\";\n }",
"public static char getDefaultAttributeQuoteChar()\n {\n return defaults.attribute_quote_char;\n }",
"public static void maybeQuote (int version, StringBuffer buf,\n String value)\n {\n // special case - a \\n or \\r shouldn't happen in any case\n if (isToken(value)) {\n buf.append(value);\n } else {\n buf.append('\"');\n buf.append(escapeDoubleQuotes(value));\n buf.append('\"');\n }\n }",
"public String unvisitedString(Vector<Parser> visited) {\n\treturn \"QuotedString\";\n}",
"final public IASTLiteralTextNode LanguageVariantsQuotedStringArgument() throws ParseException {\r\n IASTLiteralTextNode node = null;\r\n Token token = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case AMPERSAND:\r\n jj_consume_token(AMPERSAND);\r\n break;\r\n default:\r\n jj_la1[19] = jj_gen;\r\n ;\r\n }\r\n token = jj_consume_token(STRING);\r\n node = getRawLiteralTextNodeSpanning(token, token);\r\n {if (true) return node;}\r\n throw new Error(\"Missing return statement in function\");\r\n }",
"private void doublequote( String[] valeurs) {\n\t\t// TODO Auto-generated method stub\n\t\tint i = -1;\n\t\ttry{\n\t\t\tfor(i = 0; i < valeurs.length; i++)\n\t\t\t\tvaleurs[i] = valeurs[i].replaceAll(\"'\", \"''\");\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"IMPOSSIBLE D'ACCEDER A VALEURS \" + i);\n\t\t}\n\t}",
"public String getQuoteCharacter() {\n return this.quoteCharacter;\n }",
"public final void mQUOTE_TRIPLE() throws RecognitionException {\n try {\n int _type = QUOTE_TRIPLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:14: ( '\\\\'\\\\'\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:16: '\\\\'\\\\'\\\\''\n {\n match(\"'''\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public String quotate(String content){\n\n return \"'\"+content+\"'\";\n }",
"@Override\n public Boolean tryToEscape() {\n return null;\n }",
"@Override\n\tprotected void handleSingleQuote() {\n\n\t\tif (this.trackSingleQuotes) {\n\t\t\tboolean ignoreThisQuote = false;\n\n\t\t\tif (!this.inSingleQuotes) {\n\t\t\t\tif (!this.lastCharTokenDelim) {\n\t\t\t\t\t//We are not in single quotes and the last character was not a word delimiter...\n\t\t\t\t\t//This is therefore probably an apostrophe and should be ignored\n\t\t\t\t\tignoreThisQuote = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!ignoreThisQuote) {\n\t\t\t\tthis.inQuotes = !this.inQuotes;\n\t\t\t}\n\n\t\t\t//If no longer in single quotes this indicates the end of a sentence if the last char was a sentence delimiter\n\t\t\tif (!ignoreThisQuote && !this.inSingleQuotes) {\n\t\t\t\ttestForQuotedEndOfSentence();\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testStringLiteralEscapedTick() throws Exception {\n String sql = \"SELECT 'O''Leary' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"O'Leary\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"public static String removeSingleQuotation(String line) {\n\t\tif (line.contains(\"'\")) {\n\t\t\tline = line.replace(\"'\", \"\");\n\t\t}\n\t\treturn line;\n\t}",
"private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }",
"private static boolean QuotStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeQuot(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"@Override\r\n\tprotected String inverseTranslateUnquotedConst(String symbol)\r\n\t{\n\t\tif(symbol.equals(\"datime\"))\r\n\t\t{\r\n\t\t\treturn \"<http://xsb.sourceforge.net/manual1/manual1.pdf#datime>\";\r\n\t\t}\r\n\t\t\r\n\t\treturn symbol;\r\n\t}",
"public static String dequoteFull(String str, char quote)\n {\n if (str == null)\n {\n return null;\n }\n\n return dequoteFull(str, 0, str.length(), quote);\n }",
"protected String stripQuotes(String s) {\n s = s.trim();\n if (s.length() > 2) {\n return s.substring(1, s.length() - 1);\n }\n return s;\n }",
"private String removeOutsides(String in){\n\t\t\n\t\tStringBuilder str = new StringBuilder();\n\t\tint firstQuote = in.indexOf(\"\\\"\");\n\t\tint secondQuote = in.indexOf(\"\\\"\", firstQuote + 1);\n\t\tfor(int i = firstQuote + 1; i < secondQuote; i++){\n\t\t\tstr.append(in.charAt(i));\n\t\t}\n\n\t\treturn str.toString();\n\t}",
"public static final CharSequence stripDoubleQuotes(CharSequence cs) {\n if (cs.length() >= 2) {\n if (cs.charAt(0) == '\"') {\n cs = cs.subSequence(1, cs.length());\n }\n if (cs.charAt(cs.length() - 1) == '\"') {\n cs = cs.subSequence(0, cs.length() - 1);\n }\n }\n return cs;\n }",
"public void setInsertSpaces(boolean substitute);",
"public static String removeQuotes(String name)\r\n/* 28: */ {\r\n/* 29: 31 */ if (name.trim().isEmpty()) {\r\n/* 30: 32 */ return \"\";\r\n/* 31: */ }\r\n/* 32: 34 */ StringBuffer buffer = new StringBuffer(name);\r\n/* 33: */ int index;\r\n/* 34: 36 */ while ((index = buffer.indexOf(\"\\\"\")) >= 0)\r\n/* 35: */ {\r\n/* 36: */ int index;\r\n/* 37: 37 */ buffer.replace(index, index + 1, \"\");\r\n/* 38: */ }\r\n/* 39: 39 */ return buffer.toString();\r\n/* 40: */ }",
"@Override\n\tpublic String sqlQuote(String name) {\n\t\treturn String.format(\"\\\"%s\\\"\", name);\n//\t\treturn name;\n\t}",
"@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }",
"@Override\n public String necessaryParentheses() {\n // per il primo nodo, supponiamo che il padre abbia precedenza negativa (vedere il prossimo metodo per la\n // spiegazione)\n return necessaryParentheses(-1, false);\n }",
"private void doctypeSystemIdentifierDoubleQuotedState()\n throws SAXException, IOException {\n for (;;) {\n /*\n * Consume the next input character:\n */\n char c = read();\n switch (c) {\n case '\"':\n /*\n * U+0022 QUOTATION MARK (\") Switch to the after DOCTYPE\n * system identifier state.\n */\n systemIdentifier = longStrBufToString();\n afterDoctypeSystemIdentifierState();\n return;\n case '\\u0000':\n /* EOF Parse error. */\n err(\"End of file inside system identifier.\");\n /*\n * Set the DOCTYPE token's correctness flag to incorrect.\n * Emit that DOCTYPE token.\n */\n tokenHandler.doctype(doctypeName, publicIdentifier,\n longStrBufToString(), false);\n /*\n * Reconsume the EOF character in the data state.\n */\n unread(c);\n return;\n default:\n /*\n * Anything else Append the current input character to the\n * current DOCTYPE token's system identifier.\n */\n appendLongStrBuf(c);\n /*\n * Stay in the DOCTYPE system identifier (double-quoted)\n * state.\n */\n continue;\n }\n }\n }",
"void stringifyPair(boolean quoted, StringBuffer buf) {\n\t\tString special = null;\n\t\tif ((rest instanceof Pair) && rest(rest) == null)\n\t\t\tspecial = (first == \"quote\") ? \"'\" : (first == \"quasiquote\") ? \"`\"\n\t\t\t\t: (first == \"unquote\") ? \",\" : (first == \"unquote-splicing\") ? \",@\"\n\t\t\t\t: null;\n\n\t\tif (special != null) {\n\t\t\tbuf.append(special); stringify(second(this), quoted, buf);\n\t\t} else {\n\t\t\tbuf.append('(');\n\t\t\tstringify(first, quoted, buf);\n\t\t\tObject tail = rest;\n\t\t\twhile (tail instanceof Pair) {\n\t\t\t\tbuf.append(' ');\n\t\t\t\tstringify(((Pair)tail).first, quoted, buf);\n\t\t\t\ttail = ((Pair)tail).rest;\n\t\t\t}\n\t\t\tif (tail != null) {\n\t\t\t\tbuf.append(\" . \");\n\t\t\t\tstringify(tail, quoted, buf);\n\t\t\t}\n\t\t\tbuf.append(')');\n\t\t}\n\t}",
"public static String dequote(String str, char quote)\n {\n // Is there anything to dequote?\n if (str == null)\n {\n return null;\n }\n\n return dequote(str, 0, str.length(), quote);\n }",
"@Test\n public void testStringLiteralEscapedTick2() throws Exception {\n String sql = \"SELECT '''abc''' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"'abc'\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public static String getNoApostropheString(String s) {\r\n\t\tif (s == null) {\r\n\t\t\ts = \"\";\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif ((i == 0) && (s.toCharArray()[i] == '\\'')) {\r\n\t\t\t\ts = '\\'' + s;\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (s.toCharArray()[i] == '\\'') {\r\n\t\t\t\t\ts = s.substring(0, i) + '\\'' + s.substring(i);\r\n\t\t\t\t\ti++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\r\n\t}",
"public void delLiteral();",
"private Phrase(boolean dummy) {\n }",
"public final void mQUOTE_DOUBLE() throws RecognitionException {\n try {\n int _type = QUOTE_DOUBLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:38:14: ( '\\\"' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:38:16: '\\\"'\n {\n match('\\\"'); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public ArgumentList(boolean quoteStringsWSpaces)\n\t{\n\t\tm_quoteStringsWSpaces = quoteStringsWSpaces;\n\t}"
] | [
"0.7881624",
"0.7789928",
"0.72842973",
"0.70634174",
"0.69589585",
"0.6558412",
"0.6521797",
"0.6451023",
"0.6273673",
"0.62305444",
"0.62070537",
"0.6205011",
"0.6182555",
"0.6172229",
"0.61621267",
"0.6129115",
"0.6084809",
"0.60370284",
"0.60140157",
"0.5985054",
"0.5914255",
"0.5903525",
"0.589079",
"0.5856702",
"0.57846105",
"0.57422876",
"0.5716842",
"0.5678915",
"0.5677227",
"0.56343085",
"0.56155926",
"0.5614281",
"0.5597474",
"0.5589832",
"0.5584968",
"0.5575283",
"0.55651015",
"0.55646706",
"0.5556706",
"0.5507461",
"0.54908216",
"0.5479074",
"0.54783756",
"0.54733974",
"0.54358613",
"0.5414715",
"0.53979975",
"0.53967166",
"0.53879756",
"0.5378425",
"0.5376079",
"0.5349159",
"0.53224957",
"0.53172636",
"0.5308563",
"0.5304091",
"0.53001803",
"0.5285904",
"0.52716154",
"0.5271512",
"0.5264815",
"0.52515525",
"0.5236612",
"0.52229273",
"0.5216313",
"0.52027786",
"0.51917577",
"0.5179074",
"0.5168789",
"0.51558316",
"0.51187724",
"0.5096687",
"0.50724614",
"0.506328",
"0.50597274",
"0.5048791",
"0.5047488",
"0.50130355",
"0.5011616",
"0.50019383",
"0.4998676",
"0.49947324",
"0.4985524",
"0.49762097",
"0.4974859",
"0.497288",
"0.4969651",
"0.49661657",
"0.49602103",
"0.4944263",
"0.49402383",
"0.49345288",
"0.4931881",
"0.49272135",
"0.4924597",
"0.49205902",
"0.4920136",
"0.49060437",
"0.49047136",
"0.4901486"
] | 0.8056558 | 0 |
nodquotes = ('"'! literal) = (... nodquotes)? | private boolean nodquotes() {
return OPT(GO() && NOT(GO() && CHAR('"')) && literal() && nodquotes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }",
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"private boolean noquotes() {\r\n return OPT(GO() && noquote() && noquotes());\r\n }",
"@Test\n public void testStringLiteralEscapedTick() throws Exception {\n String sql = \"SELECT 'O''Leary' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"O'Leary\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"public boolean isLiteral() {\n return false;\n }",
"@Test\n public void testStringLiteralEscapedTick3() throws Exception {\n String sql = \"SELECT 'a''b''c' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"a'b'c\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"public Quotes() { }",
"boolean isQuote();",
"@Test\n public void testStringLiteralEscapedTick2() throws Exception {\n String sql = \"SELECT '''abc''' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"'abc'\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"private static boolean QuotStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeQuot(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"@Test\n public void testStringLiteralEscapedTick4() throws Exception {\n String sql = \"SELECT \\\" \\\"\\\" \\\" FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \" \\\" \");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"String applyQuote(String name);",
"public void testRestartabilityWithAntiquotations() {\n checkCorrectRestart(\n \"''\\n\" +\n \" ${\\n\" +\n \" [\\n\" +\n \" \\\"pure string\\\",\\n\" +\n \" \\\"string with ${antiquotation}\\\",\\n\" +\n \" ''ind string with ${multiple} ${antiquotations}''\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \"''\\n\");\n }",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"public void quote() {\n text.append(\"\\'\");\n }",
"StringLiteralExp createStringLiteralExp();",
"public void doubleQuote() {\n text.append(\"\\\"\");\n }",
"public void disableQuoteChar() {\n this.quoteChar = NO_QUOTING;\n }",
"@Override\n\tprotected void testForOpenDoubleQuotes() {\n\t}",
"private void eatTripleQuote() {\n position += 3;\n while (position < length) {\n if (data.charAt(position) == '\\'' && isTripleQuoteAtPosition()) {\n tokenStart += 3;\n tokenEnd = position;\n isEscaped = true;\n position += 3;\n return;\n }\n\n position++;\n }\n\n tokenEnd = position;\n }",
"public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}",
"Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }",
"private static boolean QuotStringLiteral_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!QuotStringLiteral_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"QuotStringLiteral_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }",
"String getLiteral();",
"String getLiteral();",
"static boolean QuotStringLiteral(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral\")) return false;\n if (!nextTokenIs(b, OPENINGQUOT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, OPENINGQUOT);\n r = r && QuotStringLiteral_1(b, l + 1);\n r = r && consumeToken(b, CLOSINGQUOT);\n exit_section_(b, m, null, r);\n return r;\n }",
"public static boolean isStringLiteral(String token)\n {\n return isLiteral( '\"', '\"', token );\n }",
"public void delLiteral();",
"public String getQuote();",
"private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }",
"protected String getQuote() {\n return \"\\\"\";\n }",
"@Override\n public String doQuote(String identifier) {\n return \"\\\"\" + identifier + \"\\\"\";\n }",
"Literal createLiteral();",
"Literal createLiteral();",
"public boolean containsLiteral();",
"private void emitStringLiteralExpression(StringLiteralExpression expression) {\n boolean containsSingleQuote = expression.string.value.contains(\"'\");\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n\n this.prettyPrinter.append(expression.string.value);\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n }",
"@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = QUOTE_SINGLE;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:13: ( '\\\\'' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:16: '\\\\''\n\t\t\t{\n\t\t\tmatch('\\''); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"private String q(String s) {\r\n\t\treturn '\"' + s + '\"';\r\n\t}",
"public final void mQUOTE_TRIPLE() throws RecognitionException {\n try {\n int _type = QUOTE_TRIPLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:14: ( '\\\\'\\\\'\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:16: '\\\\'\\\\'\\\\''\n {\n match(\"'''\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private static String unquote(String raw) {\r\n String result;\r\n if (null == raw) {\r\n result = null;\r\n } else {\r\n if (raw.length() >= 2 && raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\r\n result = raw.substring(1, raw.length() - 1);\r\n } else {\r\n if (raw.equals(\"null\")) {\r\n result = null;\r\n } else {\r\n result = raw;\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"private static boolean stringLiteralExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringLiteralExpression_0\")) return false;\n boolean r;\n r = consumeToken(b, RAW_SINGLE_QUOTED_STRING);\n if (!r) r = consumeToken(b, RAW_TRIPLE_QUOTED_STRING);\n if (!r) r = stringTemplate(b, l + 1);\n return r;\n }",
"public char openQuote() {\n \t\treturn '\"';\n \t}",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"@Override\n\tprotected void testForOpenSingleQuotes() {\n\t}",
"private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }",
"public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }",
"SimpleLiteral createSimpleLiteral();",
"private String stripQuotes( String quoted ) { return quoted.substring( 1, quoted.length() - 1 ); }",
"public Quotes(String alias) {\n\t\tthis(alias, QUOTES);\n\t}",
"private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }",
"final public IASTLiteralTextNode LanguageVariantsQuotedStringArgument() throws ParseException {\r\n IASTLiteralTextNode node = null;\r\n Token token = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case AMPERSAND:\r\n jj_consume_token(AMPERSAND);\r\n break;\r\n default:\r\n jj_la1[19] = jj_gen;\r\n ;\r\n }\r\n token = jj_consume_token(STRING);\r\n node = getRawLiteralTextNodeSpanning(token, token);\r\n {if (true) return node;}\r\n throw new Error(\"Missing return statement in function\");\r\n }",
"@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }",
"public String quotate(String content){\n\n return \"'\"+content+\"'\";\n }",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n try {\n int _type = QUOTE_SINGLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:14: ( '\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:16: '\\\\''\n {\n match('\\''); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public static boolean isLiteral(char openDelimiter, char endDelimiter, String token)\n {\n return ( token.charAt( 0 ) == openDelimiter\n && token.charAt( token.length() -1 ) == endDelimiter )\n ;\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"public Literal getLiteralString(String literalData);",
"protected token readQuotedReservedWord() throws IOException, DasmError {\n charBuf.reset();\n for (;;) {\n readNextChar();\n if (isSeparator(nextChar))\n throw new DasmError(\"Unterminated ''-enclosed name\");\n if (nextChar == '\\'') {\n if (charBuf.size() == 0)\n throw new DasmError(\"Empty ''-enclosed name\");\n readNextChar(); // skip close quote\n if (!isSeparator(nextChar))\n throw new DasmError(\n \"Missed separator after ''-enclosed name\");\n return new str_token(sym.Word, charBuf.toString());\n }\n char chval = (char) nextChar;\n if (nextChar == '\\\\') chval = nameEscape();\n charBuf.add(chval);\n }\n }",
"@Override\n public String applyQuoteIfNeeded(final String identifier) {\n return applyQuote(identifier);\n }",
"private static boolean isValidLiteral(String literal)\r\n\t{\r\n\t\tboolean result = true;\r\n\t\t\r\n\t\tchar[] literalChars = new char[literal.length()];\r\n\t\tliteral.getChars(0, literalChars.length, literalChars, 0);\r\n\t\t\r\n\t\tfor (int i = 0; i < literalChars.length; i++)\r\n\t\t{\r\n\t\t\tif (i == 0 && !Character.isJavaIdentifierStart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (i != 0 && !Character.isJavaIdentifierPart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public Literal setLiteralString(String literalData);",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"private static String unquote(String s) {\n int length = s.length();\n if (length >= 2 && s.charAt(0) =='\"' && s.charAt(length - 1) == '\"') {\n return s.substring(1, length - 1);\n }\n return s;\n }",
"public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }",
"private static String quote(String identifierPart, char quotingChar) {\n if (identifierPart == null) {\n return null;\n }\n\n if (identifierPart.isEmpty()) {\n return new StringBuilder().append(quotingChar).append(quotingChar).toString();\n }\n\n if (identifierPart.charAt(0) != quotingChar && identifierPart.charAt(identifierPart.length() - 1) != quotingChar) {\n identifierPart = identifierPart.replace(quotingChar + \"\", repeat(quotingChar));\n identifierPart = quotingChar + identifierPart + quotingChar;\n }\n\n return identifierPart;\n }",
"public interface QuotedL1Node {\n\n}",
"@Override\n public String visit(StringLiteralExpr n, Object arg) {\n return null;\n }",
"public static void main(String[] args)\t{\r\n\t\t\r\n\t\tSystem.out.println(\"A \\\"quoted\\\" String is\");\r\n\t\tSystem.out.println(\"'much' better if you learn\");\r\n\t\tSystem.out.println(\"the rules of \\\"escape sequences.\\\"\");\r\n\t\tSystem.out.println(\"Also, \\\"\\\" represents an empty String.\");\r\n\t\tSystem.out.println(\"Don't forget: use \\\\\\\" instead of \\\" !\");\r\n\t\tSystem.out.println(\"'' is not the same as \\\"\");\r\n\t\t\r\n\t}",
"java.util.Optional<Boolean> getShellQuote();",
"@Override\n\tpublic Object visitStringLiteral(StringLiteral literal) {\n\t\treturn null;\n\t}",
"public final void mQUOTED_STRING() throws RecognitionException {\n try {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:23: ( QUOTE_SINGLE (~ QUOTE_SINGLE )* QUOTE_SINGLE )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:25: QUOTE_SINGLE (~ QUOTE_SINGLE )* QUOTE_SINGLE\n {\n mQUOTE_SINGLE(); \n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:38: (~ QUOTE_SINGLE )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>='\\u0000' && LA5_0<='&')||(LA5_0>='(' && LA5_0<='\\uFFFF')) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:390:39: ~ QUOTE_SINGLE\n \t {\n \t if ( (input.LA(1)>='\\u0000' && input.LA(1)<='$')||(input.LA(1)>='&' && input.LA(1)<='\\uFFFF') ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n mQUOTE_SINGLE(); \n\n }\n\n }\n finally {\n }\n }",
"public static boolean isLiteral (char c) {\n if (c != '*' && c != '?' && c != '(' && c != '[' && c != '\\\\' && c!= '|' && c!='^' && c!='.' && c!=')' && c!=']') return true;\n else return false;\n }",
"@Test\n\tpublic void testStringLiteral() throws ParseException {\n\n\t\t// non-empty string\n\t\tStringLiteral stringLiteral = langParser(\"'abc'\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"abc\");\n\n\t\t// empty string\n\t\tstringLiteral = langParser(\"''\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"\");\n\t}",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"public LiteralExpression (String str){\n _value = str;\n }",
"@Test\n public void testStringLiteral() throws Exception {\n String sql = \"SELECT 'abc' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"abc\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"@Override\r\n\tprotected void convertStringConst(String str) {\r\n\t\tappend(\"\\'\\\"\", str.replace(\"\\'\",\"\\'\\'\"), \"\\\"\\'\");\r\n\t}",
"RealLiteralExp createRealLiteralExp();",
"@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }",
"InvalidLiteralExp createInvalidLiteralExp();",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"@Override\n public String toString()\n {\n return literal;\n }",
"private boolean nocurlies() {\r\n return OPT(GO() && NOT(GO() && CHAR('}')) && literal() && nocurlies());\r\n }",
"public final String quote(String name) {\n \t\tif ( name == null ) {\n \t\t\treturn null;\n \t\t}\n \n \t\tif ( name.charAt( 0 ) == '`' ) {\n \t\t\treturn openQuote() + name.substring( 1, name.length() - 1 ) + closeQuote();\n \t\t}\n \t\telse {\n \t\t\treturn name;\n \t\t}\n \t}",
"private static boolean needSingleQuotation(char paramChar)\n/* */ {\n/* 2498 */ return ((paramChar >= '\\t') && (paramChar <= '\\r')) || ((paramChar >= ' ') && (paramChar <= '/')) || ((paramChar >= ':') && (paramChar <= '@')) || ((paramChar >= '[') && (paramChar <= '`')) || ((paramChar >= '{') && (paramChar <= '~'));\n/* */ }",
"@Override\n public String visit(TextBlockLiteralExpr n, Object arg) {\n return null;\n }",
"private static String quote(final String input) {\n\t return CharUtil.addDoubleQuotes(CharUtil.quoteControl(input));\n\t}",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"static String wrap(Object value)\n/* */ {\n/* 156 */ if ((value == null) || (\"-\".equals(value))) {\n/* 157 */ return \"-\";\n/* */ }\n/* */ try\n/* */ {\n/* 161 */ svalue = value.toString();\n/* */ } catch (Throwable e) { String svalue;\n/* 163 */ ExceptionUtils.handleThrowable(e);\n/* */ \n/* 165 */ return \"-\";\n/* */ }\n/* */ \n/* */ String svalue;\n/* 169 */ StringBuilder buffer = new StringBuilder(svalue.length() + 2);\n/* 170 */ buffer.append('\"');\n/* 171 */ int i = 0;\n/* 172 */ while (i < svalue.length()) {\n/* 173 */ int j = svalue.indexOf('\"', i);\n/* 174 */ if (j == -1) {\n/* 175 */ buffer.append(svalue.substring(i));\n/* 176 */ i = svalue.length();\n/* */ } else {\n/* 178 */ buffer.append(svalue.substring(i, j + 1));\n/* 179 */ buffer.append('\"');\n/* 180 */ i = j + 1;\n/* */ }\n/* */ }\n/* */ \n/* 184 */ buffer.append('\"');\n/* 185 */ return buffer.toString();\n/* */ }"
] | [
"0.77221656",
"0.76017255",
"0.7363377",
"0.72639656",
"0.695362",
"0.6865179",
"0.68236876",
"0.6561846",
"0.6464036",
"0.6432831",
"0.6403067",
"0.6346338",
"0.63011616",
"0.62834984",
"0.6222911",
"0.62077224",
"0.61835444",
"0.61189926",
"0.6104667",
"0.6103148",
"0.605332",
"0.6046056",
"0.60209835",
"0.601555",
"0.59638894",
"0.59577036",
"0.59574676",
"0.5941577",
"0.5917219",
"0.5876492",
"0.5870098",
"0.5870098",
"0.5864089",
"0.5846864",
"0.58362854",
"0.58113265",
"0.5798343",
"0.57731354",
"0.5704535",
"0.5661124",
"0.5661124",
"0.5640873",
"0.56347",
"0.563361",
"0.56316656",
"0.56292367",
"0.5621436",
"0.5610027",
"0.5597952",
"0.55925006",
"0.55710053",
"0.557075",
"0.55573845",
"0.55484295",
"0.552766",
"0.55256563",
"0.55202335",
"0.5498062",
"0.54719126",
"0.5454018",
"0.54534876",
"0.54501474",
"0.543384",
"0.5431892",
"0.54283255",
"0.541907",
"0.54135233",
"0.5409432",
"0.54046875",
"0.5389546",
"0.53816533",
"0.5361235",
"0.53597444",
"0.53594327",
"0.5326944",
"0.5319553",
"0.53183126",
"0.5315221",
"0.5314817",
"0.5305024",
"0.53020793",
"0.53011584",
"0.52811295",
"0.5265075",
"0.5261108",
"0.5260056",
"0.5257111",
"0.5249592",
"0.5223511",
"0.5210939",
"0.5210939",
"0.5210939",
"0.5210939",
"0.5201621",
"0.518019",
"0.5177895",
"0.5160461",
"0.5159776",
"0.51391315",
"0.5131465"
] | 0.79104733 | 0 |
nobquotes = ('`'! literal) = (... nobquotes)? | private boolean nobquotes() {
return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && literal() && nodquotes());\r\n }",
"private boolean noquotes() {\r\n return OPT(GO() && noquote() && noquotes());\r\n }",
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"private String doubleQuote( String raw ) { return '\"' + raw + '\"'; }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"public boolean isLiteral() {\n return false;\n }",
"boolean isQuote();",
"private static String adqlCharLiteral( String txt ) {\n return \"'\" + txt.replaceAll( \"'\", \"''\" ) + \"'\";\n }",
"public void disableQuoteChar() {\n this.quoteChar = NO_QUOTING;\n }",
"default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"public Quotes() { }",
"@Test\n public void testStringLiteralEscapedTick() throws Exception {\n String sql = \"SELECT 'O''Leary' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"O'Leary\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }",
"@Override\n\tprotected void testForOpenDoubleQuotes() {\n\t}",
"public void delLiteral();",
"@Test\n public void testStringLiteralEscapedTick3() throws Exception {\n String sql = \"SELECT 'a''b''c' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"a'b'c\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"String applyQuote(String name);",
"private static boolean QuotStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeQuot(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"public void quote() {\n text.append(\"\\'\");\n }",
"private void eatTripleQuote() {\n position += 3;\n while (position < length) {\n if (data.charAt(position) == '\\'' && isTripleQuoteAtPosition()) {\n tokenStart += 3;\n tokenEnd = position;\n isEscaped = true;\n position += 3;\n return;\n }\n\n position++;\n }\n\n tokenEnd = position;\n }",
"public void doubleQuote() {\n text.append(\"\\\"\");\n }",
"private String stripQuotes( String quoted ) { return quoted.substring( 1, quoted.length() - 1 ); }",
"public void testRestartabilityWithAntiquotations() {\n checkCorrectRestart(\n \"''\\n\" +\n \" ${\\n\" +\n \" [\\n\" +\n \" \\\"pure string\\\",\\n\" +\n \" \\\"string with ${antiquotation}\\\",\\n\" +\n \" ''ind string with ${multiple} ${antiquotations}''\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \"''\\n\");\n }",
"@Test\n public void testStringLiteralEscapedTick2() throws Exception {\n String sql = \"SELECT '''abc''' FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node constantNode = verifyExpressionSymbol(selectNode, Select.SYMBOLS_REF_NAME, 1, Constant.ID);\n verifyProperty(constantNode, Constant.VALUE_PROP_NAME, \"'abc'\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"public String getQuote();",
"private static final String quote(String s) {\n return s == null ? \"(null)\" : \"\\\"\" + s + '\"';\n }",
"private static boolean QuotStringLiteral_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!QuotStringLiteral_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"QuotStringLiteral_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }",
"public void testImapQuote() {\n \n // Simple strings should come through with simple quotes\n assertEquals(\"\\\"abcd\\\"\", Utility.imapQuoted(\"abcd\"));\n \n // Quoting internal double quotes with \\\n assertEquals(\"\\\"ab\\\\\\\"cd\\\"\", Utility.imapQuoted(\"ab\\\"cd\"));\n \n // Quoting internal \\ with \\\\\n assertEquals(\"\\\"ab\\\\\\\\cd\\\"\", Utility.imapQuoted(\"ab\\\\cd\"));\n }",
"public boolean containsLiteral();",
"@Test\n public void testStringLiteralEscapedTick4() throws Exception {\n String sql = \"SELECT \\\" \\\"\\\" \\\" FROM a.g1\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \" \\\" \");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"a.g1\");\n \n verifySql(sql, fileNode);\n }",
"private static String unquote(String raw) {\r\n String result;\r\n if (null == raw) {\r\n result = null;\r\n } else {\r\n if (raw.length() >= 2 && raw.startsWith(\"\\\"\") && raw.endsWith(\"\\\"\")) {\r\n result = raw.substring(1, raw.length() - 1);\r\n } else {\r\n if (raw.equals(\"null\")) {\r\n result = null;\r\n } else {\r\n result = raw;\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"static boolean QuotStringLiteral(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral\")) return false;\n if (!nextTokenIs(b, OPENINGQUOT)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, OPENINGQUOT);\n r = r && QuotStringLiteral_1(b, l + 1);\n r = r && consumeToken(b, CLOSINGQUOT);\n exit_section_(b, m, null, r);\n return r;\n }",
"public Quotes() {\n\t\tthis(\"quotes\", null);\n\t}",
"String getLiteral();",
"String getLiteral();",
"protected String getQuote() {\n return \"\\\"\";\n }",
"private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }",
"public static boolean isStringLiteral(String token)\n {\n return isLiteral( '\"', '\"', token );\n }",
"private static String unquote(String s) {\n int length = s.length();\n if (length >= 2 && s.charAt(0) =='\"' && s.charAt(length - 1) == '\"') {\n return s.substring(1, length - 1);\n }\n return s;\n }",
"private static String quote(String text) {\r\n String result;\r\n if (null == text) {\r\n result = text;\r\n } else {\r\n result = \"\\\"\" + text + \"\\\"\";\r\n }\r\n return result;\r\n }",
"public char openQuote() {\n \t\treturn '\"';\n \t}",
"@Override\n\tprotected void testForOpenSingleQuotes() {\n\t}",
"Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }",
"public final void mQUOTE_TRIPLE() throws RecognitionException {\n try {\n int _type = QUOTE_TRIPLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:14: ( '\\\\'\\\\'\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:39:16: '\\\\'\\\\'\\\\''\n {\n match(\"'''\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private static boolean stringLiteralExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringLiteralExpression_0\")) return false;\n boolean r;\n r = consumeToken(b, RAW_SINGLE_QUOTED_STRING);\n if (!r) r = consumeToken(b, RAW_TRIPLE_QUOTED_STRING);\n if (!r) r = stringTemplate(b, l + 1);\n return r;\n }",
"@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }",
"StringLiteralExp createStringLiteralExp();",
"private String stripQuotes(String word) {\n\t\tString workWord = new String (word);\n\t\tif (workWord != null && workWord.length() > 1) {\n\t\t\tif (workWord.endsWith(new String(\"\\'\")) || workWord.endsWith(new String(\"\\\"\"))) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-1);\n\t\t\t}\n\t\t\telse if (workWord.endsWith(new String(\"\\'s\")) || workWord.endsWith(new String(\"\\'d\")) ) {\n\t\t\t\tworkWord = workWord.substring(0, workWord.length()-2);\n\t\t\t}\n\t\t\tif (workWord.startsWith(new String(\"\\'\")) || workWord.startsWith(new String(\"\\\"\")) && workWord.length() > 1) {\n\t\t\t workWord = workWord.substring(1);\n\t\t\t}\n\t\t}\n\t return workWord;\n\t}",
"Literal createLiteral();",
"Literal createLiteral();",
"@Override\n public String applyQuoteIfNeeded(final String identifier) {\n return applyQuote(identifier);\n }",
"private void emitStringLiteralExpression(StringLiteralExpression expression) {\n boolean containsSingleQuote = expression.string.value.contains(\"'\");\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n\n this.prettyPrinter.append(expression.string.value);\n\n if (containsSingleQuote) {\n this.prettyPrinter.append(\"\\\"\");\n } else {\n this.prettyPrinter.append(\"\\'\");\n }\n }",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"SimpleLiteral createSimpleLiteral();",
"@Override\n public String doQuote(String identifier) {\n return \"\\\"\" + identifier + \"\\\"\";\n }",
"java.util.Optional<Boolean> getShellQuote();",
"public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n\t\ttry {\n\t\t\tint _type = QUOTE_SINGLE;\n\t\t\tint _channel = DEFAULT_TOKEN_CHANNEL;\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:13: ( '\\\\'' )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:424:16: '\\\\''\n\t\t\t{\n\t\t\tmatch('\\''); \n\t\t\t}\n\n\t\t\tstate.type = _type;\n\t\t\tstate.channel = _channel;\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"private String q(String s) {\r\n\t\treturn '\"' + s + '\"';\r\n\t}",
"public Quotes(String alias) {\n\t\tthis(alias, QUOTES);\n\t}",
"public final void mQUOTE() throws RecognitionException {\r\n try {\r\n int _type = QUOTE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:7: ( '\\\"' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:288:9: '\\\"'\r\n {\r\n match('\\\"'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public Literal getLiteralString(String literalData);",
"@Override\n\tpublic Object visitStringLiteral(StringLiteral literal) {\n\t\treturn null;\n\t}",
"private static String escapeDoubleQuotes(String s) {\n\n if (s == null || s.length() == 0 || s.indexOf('\"') == -1) {\n return s;\n }\n\n StringBuffer b = new StringBuffer();\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (c == '\"')\n b.append('\\\\').append('\"');\n else\n b.append(c);\n }\n\n return b.toString();\n }",
"private String removeOutsides(String in){\n\t\t\n\t\tStringBuilder str = new StringBuilder();\n\t\tint firstQuote = in.indexOf(\"\\\"\");\n\t\tint secondQuote = in.indexOf(\"\\\"\", firstQuote + 1);\n\t\tfor(int i = firstQuote + 1; i < secondQuote; i++){\n\t\t\tstr.append(in.charAt(i));\n\t\t}\n\n\t\treturn str.toString();\n\t}",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"public static String unDoubleQuote(String str){\n if(isDoubleQuoted(str)) return trimBothEnds(str,1);\n else return str;\n }",
"public String quotate(String content){\n\n return \"'\"+content+\"'\";\n }",
"private static boolean needSingleQuotation(char paramChar)\n/* */ {\n/* 2498 */ return ((paramChar >= '\\t') && (paramChar <= '\\r')) || ((paramChar >= ' ') && (paramChar <= '/')) || ((paramChar >= ':') && (paramChar <= '@')) || ((paramChar >= '[') && (paramChar <= '`')) || ((paramChar >= '{') && (paramChar <= '~'));\n/* */ }",
"public static void maybeQuote (int version, StringBuffer buf,\n String value)\n {\n // special case - a \\n or \\r shouldn't happen in any case\n if (isToken(value)) {\n buf.append(value);\n } else {\n buf.append('\"');\n buf.append(escapeDoubleQuotes(value));\n buf.append('\"');\n }\n }",
"private static String stripQuotes(String text) {\n Matcher matcher = quotePattern.matcher(text);\n text = matcher.replaceAll(\"\");\n return text;\n }",
"public static boolean isLiteral(char openDelimiter, char endDelimiter, String token)\n {\n return ( token.charAt( 0 ) == openDelimiter\n && token.charAt( token.length() -1 ) == endDelimiter )\n ;\n }",
"public static void main(String[] args)\t{\r\n\t\t\r\n\t\tSystem.out.println(\"A \\\"quoted\\\" String is\");\r\n\t\tSystem.out.println(\"'much' better if you learn\");\r\n\t\tSystem.out.println(\"the rules of \\\"escape sequences.\\\"\");\r\n\t\tSystem.out.println(\"Also, \\\"\\\" represents an empty String.\");\r\n\t\tSystem.out.println(\"Don't forget: use \\\\\\\" instead of \\\" !\");\r\n\t\tSystem.out.println(\"'' is not the same as \\\"\");\r\n\t\t\r\n\t}",
"public static String WithoutQuoations(String text)\n {\n text = text.replace(\"\\\"\", \"\");\n return text;\n }",
"private static String dequote(String s)\r\n {\r\n String t = s.trim();\r\n if (t.startsWith(\"\\\"\") && t.endsWith(\"\\\"\"))\r\n {\r\n return t.substring(1, t.length()-1);\r\n }\r\n return t;\r\n }",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"public final void mQUOTE_SINGLE() throws RecognitionException {\n try {\n int _type = QUOTE_SINGLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:14: ( '\\\\'' )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:40:16: '\\\\''\n {\n match('\\''); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private static boolean isValidLiteral(String literal)\r\n\t{\r\n\t\tboolean result = true;\r\n\t\t\r\n\t\tchar[] literalChars = new char[literal.length()];\r\n\t\tliteral.getChars(0, literalChars.length, literalChars, 0);\r\n\t\t\r\n\t\tfor (int i = 0; i < literalChars.length; i++)\r\n\t\t{\r\n\t\t\tif (i == 0 && !Character.isJavaIdentifierStart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (i != 0 && !Character.isJavaIdentifierPart(literalChars[i]))\r\n\t\t\t{\r\n\t\t\t\tresult = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"public static String getNoApostropheString(String s) {\r\n\t\tif (s == null) {\r\n\t\t\ts = \"\";\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < s.length(); i++) {\r\n\t\t\tif ((i == 0) && (s.toCharArray()[i] == '\\'')) {\r\n\t\t\t\ts = '\\'' + s;\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\r\n\t\t\t\tif (s.toCharArray()[i] == '\\'') {\r\n\t\t\t\t\ts = s.substring(0, i) + '\\'' + s.substring(i);\r\n\t\t\t\t\ti++;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\r\n\t}",
"@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }",
"public static boolean isLiteral (char c) {\n if (c != '*' && c != '?' && c != '(' && c != '[' && c != '\\\\' && c!= '|' && c!='^' && c!='.' && c!=')' && c!=']') return true;\n else return false;\n }",
"@Test\n\tpublic void testStringLiteral() throws ParseException {\n\n\t\t// non-empty string\n\t\tStringLiteral stringLiteral = langParser(\"'abc'\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"abc\");\n\n\t\t// empty string\n\t\tstringLiteral = langParser(\"''\").stringLiteral();\n\t\tassertEquals(stringLiteral.getValue(), \"\");\n\t}",
"public Literal setLiteralString(String literalData);",
"private String stripQuotes(String inStr) {\n \t\n \tif(inStr.startsWith(\"\\\"\") || inStr.startsWith(\"'\")) {\n \tinStr = inStr.substring(1);\n \t}\n \tif(inStr.endsWith(\"\\\"\") || inStr.endsWith(\"'\")) {\n \tinStr = inStr.substring(0, inStr.length() - 1);\n \t}\n \treturn inStr;\n\t}",
"private String escape(String token) {\n return token.replace(\",\" , \"\");\n }",
"public char closeQuote() {\n \t\treturn '\"';\n \t}",
"@Override\n public String visit(TextBlockLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\r\n\tprotected void convertStringConst(String str) {\r\n\t\tappend(\"\\'\\\"\", str.replace(\"\\'\",\"\\'\\'\"), \"\\\"\\'\");\r\n\t}",
"static String wrap(Object value)\n/* */ {\n/* 156 */ if ((value == null) || (\"-\".equals(value))) {\n/* 157 */ return \"-\";\n/* */ }\n/* */ try\n/* */ {\n/* 161 */ svalue = value.toString();\n/* */ } catch (Throwable e) { String svalue;\n/* 163 */ ExceptionUtils.handleThrowable(e);\n/* */ \n/* 165 */ return \"-\";\n/* */ }\n/* */ \n/* */ String svalue;\n/* 169 */ StringBuilder buffer = new StringBuilder(svalue.length() + 2);\n/* 170 */ buffer.append('\"');\n/* 171 */ int i = 0;\n/* 172 */ while (i < svalue.length()) {\n/* 173 */ int j = svalue.indexOf('\"', i);\n/* 174 */ if (j == -1) {\n/* 175 */ buffer.append(svalue.substring(i));\n/* 176 */ i = svalue.length();\n/* */ } else {\n/* 178 */ buffer.append(svalue.substring(i, j + 1));\n/* 179 */ buffer.append('\"');\n/* 180 */ i = j + 1;\n/* */ }\n/* */ }\n/* */ \n/* 184 */ buffer.append('\"');\n/* 185 */ return buffer.toString();\n/* */ }",
"@Test\n\tpublic void testUnsafe()\n\t{\n\t\tString[] code = {\n\t\t\t\"var a\\n = 'Here is a unsafe character';\"\n\t\t};\n\t\t\n\t\tth.test(code, new LinterOptions().set(\"es3\", true));\n\t}",
"private boolean noangles() {\r\n return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles());\r\n }",
"@Override\n\tpublic boolean hasLiteral() {\n\t\treturn heldObj.hasLiteral();\n\t}",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n String string0 = SQLUtil.normalize(\"'\", false);\n assertEquals(\"''\", string0);\n }",
"private String clean(String in) {\n return (in == null ? \"\" : in.replaceAll(\"'\", \"\\\\'\"));\n }",
"public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }",
"private boolean escape() {\r\n return backslash() && (\r\n (digits() && (CHAR(';') || true)) || SET(\"rnqdgb\"));\r\n }",
"protected token readQuotedReservedWord() throws IOException, DasmError {\n charBuf.reset();\n for (;;) {\n readNextChar();\n if (isSeparator(nextChar))\n throw new DasmError(\"Unterminated ''-enclosed name\");\n if (nextChar == '\\'') {\n if (charBuf.size() == 0)\n throw new DasmError(\"Empty ''-enclosed name\");\n readNextChar(); // skip close quote\n if (!isSeparator(nextChar))\n throw new DasmError(\n \"Missed separator after ''-enclosed name\");\n return new str_token(sym.Word, charBuf.toString());\n }\n char chval = (char) nextChar;\n if (nextChar == '\\\\') chval = nameEscape();\n charBuf.add(chval);\n }\n }"
] | [
"0.80899817",
"0.7676593",
"0.7214343",
"0.717703",
"0.69746476",
"0.6762508",
"0.6678322",
"0.6571235",
"0.65553117",
"0.6422653",
"0.63554054",
"0.62762094",
"0.6224784",
"0.6149781",
"0.6091093",
"0.6043921",
"0.60038775",
"0.6003211",
"0.6001478",
"0.598332",
"0.5980488",
"0.59739614",
"0.5938223",
"0.59331894",
"0.5929646",
"0.58618724",
"0.58420444",
"0.5756829",
"0.5755602",
"0.5748735",
"0.5739455",
"0.57248294",
"0.57232356",
"0.5712477",
"0.5696076",
"0.56936204",
"0.56905264",
"0.56905264",
"0.5666811",
"0.5649434",
"0.5613919",
"0.56085056",
"0.5598766",
"0.55964684",
"0.5592109",
"0.5591239",
"0.5561896",
"0.55596",
"0.5556651",
"0.5552864",
"0.55137956",
"0.5486827",
"0.5486827",
"0.5464284",
"0.5457505",
"0.5427157",
"0.5423954",
"0.54191446",
"0.54013926",
"0.5394476",
"0.53662896",
"0.5363089",
"0.53456366",
"0.5342763",
"0.5330973",
"0.53294724",
"0.53286713",
"0.5324913",
"0.53240496",
"0.53059316",
"0.5302744",
"0.5298363",
"0.5297518",
"0.5291093",
"0.52901727",
"0.52785456",
"0.527444",
"0.52635986",
"0.5251982",
"0.524779",
"0.52446115",
"0.52418387",
"0.52399355",
"0.523244",
"0.5230957",
"0.5226266",
"0.5220984",
"0.52008057",
"0.5200431",
"0.5199339",
"0.5198723",
"0.51972115",
"0.519328",
"0.5186813",
"0.5152202",
"0.5149702",
"0.5139624",
"0.51382935",
"0.5129512",
"0.5129219"
] | 0.80888325 | 1 |
noangles = ('>'! literal) = (... noangles)? | private boolean noangles() {
return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }",
"public boolean isLiteral() {\n return false;\n }",
"private boolean checkAngle() {\n\t\tint bornes = FILTER_BORNES;\n\t\treturn checkAngleBornes(angle, 0d, bornes) || checkAngleBornes(angle, 90d, bornes) || checkAngleBornes(angle, 180d, bornes);\n\t}",
"boolean getNoOrientation();",
"AngleGreater createAngleGreater();",
"public void encircleFalseTest()\n\t{\n\t\tData d = new Data();\n\t\td.set(15, 29);\n\t\td.set(17, 19);\n\t\tassertFalse(d.isEncircled(29));\n\t}",
"@Test\n public void testEqualsFalse() {\n Rectangle r5 = new Rectangle(7, 5, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 254),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(0, 4, new Color(255, 155, 255),\n new Position2D(-50, 75));\n Rectangle r8 = new Rectangle(0, 4, new Color(0, 255, 255),\n new Position2D(-50, 75));\n Rectangle r9 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, 75));\n Rectangle r10 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(51, -75));\n Rectangle r11 = new Rectangle(1, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n Rectangle r12 = new Rectangle(1, 100, new Color(199, 155, 13),\n new Position2D(50, 0));\n\n assertNotEquals(r1, r5);\n assertNotEquals(r2, r6);\n assertNotEquals(r2, r7);\n assertNotEquals(r2, r8);\n assertNotEquals(r3, r9);\n assertNotEquals(r3, r10);\n assertNotEquals(r4, r11);\n assertNotEquals(r4, r12);\n }",
"Boolean isOmitNorms();",
"default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }",
"boolean needToAim(double angle);",
"@Test(timeout = 4000)\n public void test121() throws Throwable {\n Range range0 = Range.ofLength(0L);\n range0.toString();\n long long0 = range0.getEnd();\n assertEquals((-1L), long0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 0 ]/RB\", string0);\n \n Object object0 = new Object();\n boolean boolean0 = range0.equals(\"[ 0 .. -1 ]/0B\");\n assertFalse(boolean0);\n \n Range.CoordinateSystem.values();\n Range.CoordinateSystem.values();\n Range range1 = Range.parseRange(\"[ 1 .. 0 ]/RB\");\n boolean boolean1 = range0.equals(range1);\n assertFalse(boolean1);\n \n range0.complement(range1);\n long long1 = range1.getBegin();\n assertFalse(range1.equals((Object)range0));\n assertTrue(range1.isEmpty());\n assertEquals(1L, long1);\n }",
"private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }",
"public FloatColumn getAngleOutOfPlane() {\n return (FloatColumn) (isText ? textFields.computeIfAbsent(\"angle_out_of_plane\", FloatColumn::new) :\n getBinaryColumn(\"angle_out_of_plane\"));\n }",
"public Object visitBitwiseNegationExpression(GNode n) {\n Object a, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n \n dostring = false;\n \n if (a instanceof Long) {\n result = ~ (Long) a;\n }\n else {\n return \"~ \" + parens(a);\n }\n \n return result;\n }",
"protected boolean avoidNegativeCoordinates() {\n \t\treturn false;\n \t}",
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"public void noRotation()\n {\n double distance = Math.hypot(this.getX()-xMouse, this.getY()-yMouse);\n if(counter == 40 && noRotation == false && distance<300)\n {\n int rot = getRotation();\n turnTowards(xMouse, yMouse);\n int newRot = getRotation();\n if(Math.abs(rot-newRot)%360<40)\n {\n noRotation = true;\n }\n else\n {\n setRotation(rot);\n }\n }\n }",
"public final void mRANGLE() throws RecognitionException {\n try {\n int _type = RANGLE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2739:3: ( '>' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2740:3: '>'\n {\n match('>'); if (state.failed) return ;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public boolean isEmptyInterval(){\n\t\tif (leftbound<0)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"@Override\n\tpublic boolean isMyRectangle() {\n\t\treturn false;\n\t}",
"private boolean nocurlies() {\r\n return OPT(GO() && NOT(GO() && CHAR('}')) && literal() && nocurlies());\r\n }",
"public static void main(String[] args) {\n\n short angle1 = 0;\n short angle2 = 180;\n short angle3 = 0;\n\n int sumOfAngles = angle1 + angle2 + angle3;\n\n boolean validTriangle = sumOfAngles == 180;\n\n if (validTriangle){\n System.out.println(\"the shape is a triangle\");\n }\n if(!validTriangle){\n System.out.println(\"the shape is not valid\");\n }\n\n\n\n\n\n }",
"@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }",
"@Override\n\tpublic String toString() {\n\t\tFormula[] literals = new Formula[posLiterals.size() + negLiterals.size()];\n\t\tint i;\n\t\tfor (i = 0; i < posLiterals.size(); i++)\n\t\t\tliterals[i] = new Negation(posLiterals.get(i));\n\t\tfor (int j = 0; j < negLiterals.size(); j++)\n\t\t\tliterals[i++] = negLiterals.get(j);\n\t\t\n\t\treturn (literals.length > 1) ? new Disjunction(literals).toString() : literals[0].toString();\n\t}",
"boolean hasRect2Value();",
"public abstract String representInequality();",
"void take_angles() {\n\n rolls+=String.valueOf((Math.toDegrees(orientation[2]))%360+90)+\"\\n\";\n if(!touch_ground_switch.isChecked()&&angle_with_ground==0)\n angle_with_ground=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n else if (down_angle == 0)\n down_angle=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n else if(up_angle==0)\n {\n up_angle=adjust_angle_rotation(Math.toDegrees(orientation[2]) % 360 + 90);\n touch_ground_switch.setVisibility(View.INVISIBLE);\n if(!touch_ground_switch.isChecked())\n object_calculations_doesnt_touch_ground();\n else\n object_calculations_touch_ground();\n }\n}",
"AstroArg empty();",
"@Override\n public String visit(BooleanLiteralExpr n, Object arg) {\n return null;\n }",
"public int getGimbalPole(float[] quat) {\n float x = quat[0];\n float y = quat[1];\n float z = quat[2];\n float w = quat[3];\n final float t = y * x + z * w;\n return t > 0.499f ? 1 : (t < -0.499f ? -1 : 0);\n }",
"void resetAngle();",
"@Test(timeout = 4000)\n public void test033() throws Throwable {\n Range range0 = Range.ofLength(127L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n range0.complementFrom(linkedList0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 0 .. 125 ]/0B\", string0);\n }",
"AngleResource inclination();",
"AngleSmaller createAngleSmaller();",
"public TruthExpression() {\r\n\t\tsuper(new Expression[]{});\r\n\t\tthis.truthValue = TruthValue.FALSE;\r\n\t}",
"public boolean inVerticalBlank();",
"public boolean isBitRangeExpr() {\n return false;\n }",
"public void disableAnglePid() {\n\t\tgyroPid.disable();\n\t}",
"public boolean someLegalPos() {\n return !legalPos.isEmpty();\n }",
"Angle createAngle();",
"boolean getNoUnions();",
"public static boolean isBoomerang(int[][] points){\n if (points[0] == points[1] || points[0] == points[2] || points[1] == points[2]) return false;\n if ((points[0][0] - points[1][0])*(points[0][1] - points[2][1]) != (points[0][0] - points[2][0])*(points[0][1] - points[1][1])) return true;\n return false;\n }",
"@Test(dataProvider = \"DataForTest2\", expectedExceptions = RuntimeException.class)\n public void checkingAreaCircleTestExclusion(Double side) {\n\tSystem.out.println(\"CheckingAreaCircleTest test started\\n Check areas knit circle with a side \" + side\n\t\t+ \"\\nIf you initialize a null value appears in an exception, the test fails\");\n\tgeometOb.getQuadrate(side);\n\tSystem.out.println(\"The test fails\");\n }",
"@Test(timeout = 4000)\n public void test097() throws Throwable {\n Range range0 = Range.ofLength(9223372032559808565L);\n long long0 = range0.getLength();\n assertEquals(9223372032559808565L, long0);\n \n range0.equals(\"]?&0A@\");\n Range range1 = Range.of(9223372032559808565L);\n List<Range> list0 = range0.complement(range1);\n assertTrue(list0.contains(range0));\n \n boolean boolean0 = range0.equals(\"]?&0A@\");\n assertFalse(boolean0);\n \n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 9223372032559808565 ]/RB\", string0);\n \n Range.CoordinateSystem.values();\n range1.complement(range0);\n List<Range> list1 = range1.complement(range0);\n assertTrue(list1.contains(range1));\n assertFalse(list1.equals((Object)list0));\n assertEquals(1, list1.size());\n }",
"public boolean solid()\n {\n return false;\n }",
"public boolean istrianglevalid() {\n //if all of the sides are valid, then return true, else return false\n if (sideA > 0 && sideB > 0 && sideC > 0) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\n public void reAngle() {\n }",
"@Test\r\n\tpublic void testInvalid04() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid04\");\r\n\t}",
"@Override\n public boolean isVertex()\n {\n return getAngle() > Math.PI && getAngle() < 2 * Math.PI;\n }",
"void unsetStraight();",
"public void joystickDeadZone() {\n\t\tif (joystickLXAxis <= 0.075 && joystickLXAxis >= -0.075) {\n\t\t\tjoystickLXAxis = 0;\n\t\t} if (joystickLYAxis <= 0.075 && joystickLYAxis >= -0.075) {\n\t\t\tjoystickLYAxis = 0;\n\t\t}\n\t\tif (joystickRXAxis <= 0.075 && joystickRXAxis >= -0.075) {\n\t\t\tjoystickRXAxis = 0;\n\t\t} if (joystickRYAxis <= 0.075 && joystickRYAxis >= -0.075) {\n\t\t\tjoystickRYAxis = 0;\n\t\t}\n\t}",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"Boolean isOmitTf();",
"public double findAngle() {\n return 0d;\n }",
"public Wall(int x1, int y1,int x2,int y2) {\r\n\tthis.x1 = x1 + TRANSLATION;\r\n\tthis.x2 = x2 + TRANSLATION;\r\n\tthis.y1 = y1 + TRANSLATION;\r\n\tthis.y2 = y2 + TRANSLATION;\r\n\tbustedWall = false; \r\n}",
"public BooleanLit createFalse(Position pos) {\n return (BooleanLit) xnf.BooleanLit(pos, false).type(xts.Boolean());\n }",
"@Test(timeout = 4000)\n public void test11() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, (-1521L), (-1521L));\n Range range1 = Range.ofLength(357L);\n List<Range> list0 = range0.complement(range1);\n assertFalse(range0.isEmpty());\n assertTrue(list0.contains(range0));\n assertFalse(range1.isEmpty());\n }",
"@Override\r\n public Boolean isMinusI(Ring ring) {\r\n return (re.isZero(ring) && im.isMinusOne(ring));\r\n }",
"boolean isUnary() {\r\n\t\treturn (n2==null) && (t2==null);\r\n\t}",
"public void delLiteral();",
"public double getAngle();",
"public boolean almostZero(Coordinates a);",
"public String visit(FalseLiteral n, LLVMRedux argu) throws Exception {\n return \"false\";\n }",
"double getAngle();",
"double getAngle();",
"public boolean isWall();",
"public double getAngle() { return angle; }",
"public Rule nonFunctionTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\t// Don't allow simpleMap starting with '|' as this confuses with closinf Function.\n \t\t\t\tfirstOf(sequence(testNot(SP_PIPE), simpleMapType()), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), enforcedSequence(\n \t\t\t\tSQ_BRACKET_L, SQ_BRACKET_R))), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"public double getAngleYZ() {\r\n\t\tdouble l = this.lenght();\r\n\t\tif (l==0)\r\n\t\t\treturn 0;\r\n\t\treturn Math.asin(this.x/l);\r\n\t}",
"@Override\r\n\tpublic boolean isCircle() {\n\t\treturn false;\r\n\t}",
"boolean getNegated();",
"boolean isSolid();",
"public static Interval negation(Interval in){\r\n return new Interval(-in.getSecondExtreme(),-in.getFirstExtreme(),in.getSEincluded()==']'?'[':'(',in.getFEincluded()=='['?']':')');\r\n }",
"@Test\r\n\tpublic void testInvalid01() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid01\");\r\n\t}",
"@Test(timeout = 4000)\n public void test050() throws Throwable {\n Range range0 = Range.ofLength(10121L);\n range0.toString();\n boolean boolean0 = range0.equals((Object) null);\n assertFalse(boolean0);\n \n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 1 .. 10121 ]/RB\", string0);\n }",
"boolean hasQuatValue();",
"AngleEquals createAngleEquals();",
"public void drawNonEssentialComponents(){\n\t\t\n\t}",
"public Unit<Angle> radian() {return radian;}",
"public boolean noJustified(){\n return justification.equals(FormatAlignment.NO_JUSTIFY);\n }",
"public String asPolar(){\n// return \"<\" + this.getR() + \", ∠\" + this.getTheta() + \">\";\n return String.format(POLAR_FORMAT, this.getR(), this.getTheta());\n }",
"public static void addAngledRectangle(MapLocation start, Direction dir, MapLocation end, float avoidwidth, float desire, float speed) {\n Direction left;\n MapLocation leftStart;\n MapLocation leftEnd;\n MapLocation rightEnd;\n float x1;\n float y1;\n switch (angledRectangleCount) {\n case 0:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z1_p21x = Float.sum(rightEnd.x, x1);\n Z1_p21y = Float.sum(rightEnd.y, y1);\n Z1_p41x = Float.sum(leftStart.x, x1);\n Z1_p41y = Float.sum(leftStart.y, y1);\n Z1_dotsection2 = -Float.sum(x1 * Z1_p21x, y1 * Z1_p21y);\n Z1_dotsection4 = -Float.sum(x1 * Z1_p41x, y1 * Z1_p41y);\n Z1_p21MagSquared = Float.sum(Z1_dotsection2, Float.sum(Z1_p21x * Z1_p21x, Z1_p21y * Z1_p21y));\n Z1_p41MagSquared = Float.sum(Z1_dotsection4, Float.sum(Z1_p41x * Z1_p41x, Z1_p41y * Z1_p41y));\n Z1_desire = desire;\n Z1_center = start.add(dir, speed * 0.5f);\n Z1_maxdist = Z1_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 1:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z2_p21x = Float.sum(rightEnd.x, x1);\n Z2_p21y = Float.sum(rightEnd.y, y1);\n Z2_p41x = Float.sum(leftStart.x, x1);\n Z2_p41y = Float.sum(leftStart.y, y1);\n Z2_dotsection2 = -Float.sum(x1 * Z2_p21x, y1 * Z2_p21y);\n Z2_dotsection4 = -Float.sum(x1 * Z2_p41x, y1 * Z2_p41y);\n Z2_p21MagSquared = Float.sum(Z2_dotsection2, Float.sum(Z2_p21x * Z2_p21x, Z2_p21y * Z2_p21y));\n Z2_p41MagSquared = Float.sum(Z2_dotsection4, Float.sum(Z2_p41x * Z2_p41x, Z2_p41y * Z2_p41y));\n Z2_desire = desire;\n Z2_center = start.add(dir, speed * 0.5f);\n Z2_maxdist = Z2_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 2:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z3_p21x = Float.sum(rightEnd.x, x1);\n Z3_p21y = Float.sum(rightEnd.y, y1);\n Z3_p41x = Float.sum(leftStart.x, x1);\n Z3_p41y = Float.sum(leftStart.y, y1);\n Z3_dotsection2 = -Float.sum(x1 * Z3_p21x, y1 * Z3_p21y);\n Z3_dotsection4 = -Float.sum(x1 * Z3_p41x, y1 * Z3_p41y);\n Z3_p21MagSquared = Float.sum(Z3_dotsection2, Float.sum(Z3_p21x * Z3_p21x, Z3_p21y * Z3_p21y));\n Z3_p41MagSquared = Float.sum(Z3_dotsection4, Float.sum(Z3_p41x * Z3_p41x, Z3_p41y * Z3_p41y));\n Z3_desire = desire;\n Z3_center = start.add(dir, speed * 0.5f);\n Z3_maxdist = Z3_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 3:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z4_p21x = Float.sum(rightEnd.x, x1);\n Z4_p21y = Float.sum(rightEnd.y, y1);\n Z4_p41x = Float.sum(leftStart.x, x1);\n Z4_p41y = Float.sum(leftStart.y, y1);\n Z4_dotsection2 = -Float.sum(x1 * Z4_p21x, y1 * Z4_p21y);\n Z4_dotsection4 = -Float.sum(x1 * Z4_p41x, y1 * Z4_p41y);\n Z4_p21MagSquared = Float.sum(Z4_dotsection2, Float.sum(Z4_p21x * Z4_p21x, Z4_p21y * Z4_p21y));\n Z4_p41MagSquared = Float.sum(Z4_dotsection4, Float.sum(Z4_p41x * Z4_p41x, Z4_p41y * Z4_p41y));\n Z4_desire = desire;\n Z4_center = start.add(dir, speed * 0.5f);\n Z4_maxdist = Z4_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 4:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z5_p21x = Float.sum(rightEnd.x, x1);\n Z5_p21y = Float.sum(rightEnd.y, y1);\n Z5_p41x = Float.sum(leftStart.x, x1);\n Z5_p41y = Float.sum(leftStart.y, y1);\n Z5_dotsection2 = -Float.sum(x1 * Z5_p21x, y1 * Z5_p21y);\n Z5_dotsection4 = -Float.sum(x1 * Z5_p41x, y1 * Z5_p41y);\n Z5_p21MagSquared = Float.sum(Z5_dotsection2, Float.sum(Z5_p21x * Z5_p21x, Z5_p21y * Z5_p21y));\n Z5_p41MagSquared = Float.sum(Z5_dotsection4, Float.sum(Z5_p41x * Z5_p41x, Z5_p41y * Z5_p41y));\n Z5_desire = desire;\n Z5_center = start.add(dir, speed * 0.5f);\n Z5_maxdist = Z5_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 5:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z6_p21x = Float.sum(rightEnd.x, x1);\n Z6_p21y = Float.sum(rightEnd.y, y1);\n Z6_p41x = Float.sum(leftStart.x, x1);\n Z6_p41y = Float.sum(leftStart.y, y1);\n Z6_dotsection2 = -Float.sum(x1 * Z6_p21x, y1 * Z6_p21y);\n Z6_dotsection4 = -Float.sum(x1 * Z6_p41x, y1 * Z6_p41y);\n Z6_p21MagSquared = Float.sum(Z6_dotsection2, Float.sum(Z6_p21x * Z6_p21x, Z6_p21y * Z6_p21y));\n Z6_p41MagSquared = Float.sum(Z6_dotsection4, Float.sum(Z6_p41x * Z6_p41x, Z6_p41y * Z6_p41y));\n Z6_desire = desire;\n Z6_center = start.add(dir, speed * 0.5f);\n Z6_maxdist = Z6_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 6:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z7_p21x = Float.sum(rightEnd.x, x1);\n Z7_p21y = Float.sum(rightEnd.y, y1);\n Z7_p41x = Float.sum(leftStart.x, x1);\n Z7_p41y = Float.sum(leftStart.y, y1);\n Z7_dotsection2 = -Float.sum(x1 * Z7_p21x, y1 * Z7_p21y);\n Z7_dotsection4 = -Float.sum(x1 * Z7_p41x, y1 * Z7_p41y);\n Z7_p21MagSquared = Float.sum(Z7_dotsection2, Float.sum(Z7_p21x * Z7_p21x, Z7_p21y * Z7_p21y));\n Z7_p41MagSquared = Float.sum(Z7_dotsection4, Float.sum(Z7_p41x * Z7_p41x, Z7_p41y * Z7_p41y));\n Z7_desire = desire;\n Z7_center = start.add(dir, speed * 0.5f);\n Z7_maxdist = Z7_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 7:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z8_p21x = Float.sum(rightEnd.x, x1);\n Z8_p21y = Float.sum(rightEnd.y, y1);\n Z8_p41x = Float.sum(leftStart.x, x1);\n Z8_p41y = Float.sum(leftStart.y, y1);\n Z8_dotsection2 = -Float.sum(x1 * Z8_p21x, y1 * Z8_p21y);\n Z8_dotsection4 = -Float.sum(x1 * Z8_p41x, y1 * Z8_p41y);\n Z8_p21MagSquared = Float.sum(Z8_dotsection2, Float.sum(Z8_p21x * Z8_p21x, Z8_p21y * Z8_p21y));\n Z8_p41MagSquared = Float.sum(Z8_dotsection4, Float.sum(Z8_p41x * Z8_p41x, Z8_p41y * Z8_p41y));\n Z8_desire = desire;\n Z8_center = start.add(dir, speed * 0.5f);\n Z8_maxdist = Z8_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 8:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z9_p21x = Float.sum(rightEnd.x, x1);\n Z9_p21y = Float.sum(rightEnd.y, y1);\n Z9_p41x = Float.sum(leftStart.x, x1);\n Z9_p41y = Float.sum(leftStart.y, y1);\n Z9_dotsection2 = -Float.sum(x1 * Z9_p21x, y1 * Z9_p21y);\n Z9_dotsection4 = -Float.sum(x1 * Z9_p41x, y1 * Z9_p41y);\n Z9_p21MagSquared = Float.sum(Z9_dotsection2, Float.sum(Z9_p21x * Z9_p21x, Z9_p21y * Z9_p21y));\n Z9_p41MagSquared = Float.sum(Z9_dotsection4, Float.sum(Z9_p41x * Z9_p41x, Z9_p41y * Z9_p41y));\n Z9_desire = desire;\n Z9_center = start.add(dir, speed * 0.5f);\n Z9_maxdist = Z9_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 9:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z10_p21x = Float.sum(rightEnd.x, x1);\n Z10_p21y = Float.sum(rightEnd.y, y1);\n Z10_p41x = Float.sum(leftStart.x, x1);\n Z10_p41y = Float.sum(leftStart.y, y1);\n Z10_dotsection2 = -Float.sum(x1 * Z10_p21x, y1 * Z10_p21y);\n Z10_dotsection4 = -Float.sum(x1 * Z10_p41x, y1 * Z10_p41y);\n Z10_p21MagSquared = Float.sum(Z10_dotsection2, Float.sum(Z10_p21x * Z10_p21x, Z10_p21y * Z10_p21y));\n Z10_p41MagSquared = Float.sum(Z10_dotsection4, Float.sum(Z10_p41x * Z10_p41x, Z10_p41y * Z10_p41y));\n Z10_desire = desire;\n Z10_center = start.add(dir, speed * 0.5f);\n Z10_maxdist = Z10_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 10:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z11_p21x = Float.sum(rightEnd.x, x1);\n Z11_p21y = Float.sum(rightEnd.y, y1);\n Z11_p41x = Float.sum(leftStart.x, x1);\n Z11_p41y = Float.sum(leftStart.y, y1);\n Z11_dotsection2 = -Float.sum(x1 * Z11_p21x, y1 * Z11_p21y);\n Z11_dotsection4 = -Float.sum(x1 * Z11_p41x, y1 * Z11_p41y);\n Z11_p21MagSquared = Float.sum(Z11_dotsection2, Float.sum(Z11_p21x * Z11_p21x, Z11_p21y * Z11_p21y));\n Z11_p41MagSquared = Float.sum(Z11_dotsection4, Float.sum(Z11_p41x * Z11_p41x, Z11_p41y * Z11_p41y));\n Z11_desire = desire;\n Z11_center = start.add(dir, speed * 0.5f);\n Z11_maxdist = Z11_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 11:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z12_p21x = Float.sum(rightEnd.x, x1);\n Z12_p21y = Float.sum(rightEnd.y, y1);\n Z12_p41x = Float.sum(leftStart.x, x1);\n Z12_p41y = Float.sum(leftStart.y, y1);\n Z12_dotsection2 = -Float.sum(x1 * Z12_p21x, y1 * Z12_p21y);\n Z12_dotsection4 = -Float.sum(x1 * Z12_p41x, y1 * Z12_p41y);\n Z12_p21MagSquared = Float.sum(Z12_dotsection2, Float.sum(Z12_p21x * Z12_p21x, Z12_p21y * Z12_p21y));\n Z12_p41MagSquared = Float.sum(Z12_dotsection4, Float.sum(Z12_p41x * Z12_p41x, Z12_p41y * Z12_p41y));\n Z12_desire = desire;\n Z12_center = start.add(dir, speed * 0.5f);\n Z12_maxdist = Z12_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 12:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z13_p21x = Float.sum(rightEnd.x, x1);\n Z13_p21y = Float.sum(rightEnd.y, y1);\n Z13_p41x = Float.sum(leftStart.x, x1);\n Z13_p41y = Float.sum(leftStart.y, y1);\n Z13_dotsection2 = -Float.sum(x1 * Z13_p21x, y1 * Z13_p21y);\n Z13_dotsection4 = -Float.sum(x1 * Z13_p41x, y1 * Z13_p41y);\n Z13_p21MagSquared = Float.sum(Z13_dotsection2, Float.sum(Z13_p21x * Z13_p21x, Z13_p21y * Z13_p21y));\n Z13_p41MagSquared = Float.sum(Z13_dotsection4, Float.sum(Z13_p41x * Z13_p41x, Z13_p41y * Z13_p41y));\n Z13_desire = desire;\n Z13_center = start.add(dir, speed * 0.5f);\n Z13_maxdist = Z13_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 13:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z14_p21x = Float.sum(rightEnd.x, x1);\n Z14_p21y = Float.sum(rightEnd.y, y1);\n Z14_p41x = Float.sum(leftStart.x, x1);\n Z14_p41y = Float.sum(leftStart.y, y1);\n Z14_dotsection2 = -Float.sum(x1 * Z14_p21x, y1 * Z14_p21y);\n Z14_dotsection4 = -Float.sum(x1 * Z14_p41x, y1 * Z14_p41y);\n Z14_p21MagSquared = Float.sum(Z14_dotsection2, Float.sum(Z14_p21x * Z14_p21x, Z14_p21y * Z14_p21y));\n Z14_p41MagSquared = Float.sum(Z14_dotsection4, Float.sum(Z14_p41x * Z14_p41x, Z14_p41y * Z14_p41y));\n Z14_desire = desire;\n Z14_center = start.add(dir, speed * 0.5f);\n Z14_maxdist = Z14_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 14:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z15_p21x = Float.sum(rightEnd.x, x1);\n Z15_p21y = Float.sum(rightEnd.y, y1);\n Z15_p41x = Float.sum(leftStart.x, x1);\n Z15_p41y = Float.sum(leftStart.y, y1);\n Z15_dotsection2 = -Float.sum(x1 * Z15_p21x, y1 * Z15_p21y);\n Z15_dotsection4 = -Float.sum(x1 * Z15_p41x, y1 * Z15_p41y);\n Z15_p21MagSquared = Float.sum(Z15_dotsection2, Float.sum(Z15_p21x * Z15_p21x, Z15_p21y * Z15_p21y));\n Z15_p41MagSquared = Float.sum(Z15_dotsection4, Float.sum(Z15_p41x * Z15_p41x, Z15_p41y * Z15_p41y));\n Z15_desire = desire;\n Z15_center = start.add(dir, speed * 0.5f);\n Z15_maxdist = Z15_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 15:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z16_p21x = Float.sum(rightEnd.x, x1);\n Z16_p21y = Float.sum(rightEnd.y, y1);\n Z16_p41x = Float.sum(leftStart.x, x1);\n Z16_p41y = Float.sum(leftStart.y, y1);\n Z16_dotsection2 = -Float.sum(x1 * Z16_p21x, y1 * Z16_p21y);\n Z16_dotsection4 = -Float.sum(x1 * Z16_p41x, y1 * Z16_p41y);\n Z16_p21MagSquared = Float.sum(Z16_dotsection2, Float.sum(Z16_p21x * Z16_p21x, Z16_p21y * Z16_p21y));\n Z16_p41MagSquared = Float.sum(Z16_dotsection4, Float.sum(Z16_p41x * Z16_p41x, Z16_p41y * Z16_p41y));\n Z16_desire = desire;\n Z16_center = start.add(dir, speed * 0.5f);\n Z16_maxdist = Z16_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 16:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z17_p21x = Float.sum(rightEnd.x, x1);\n Z17_p21y = Float.sum(rightEnd.y, y1);\n Z17_p41x = Float.sum(leftStart.x, x1);\n Z17_p41y = Float.sum(leftStart.y, y1);\n Z17_dotsection2 = -Float.sum(x1 * Z17_p21x, y1 * Z17_p21y);\n Z17_dotsection4 = -Float.sum(x1 * Z17_p41x, y1 * Z17_p41y);\n Z17_p21MagSquared = Float.sum(Z17_dotsection2, Float.sum(Z17_p21x * Z17_p21x, Z17_p21y * Z17_p21y));\n Z17_p41MagSquared = Float.sum(Z17_dotsection4, Float.sum(Z17_p41x * Z17_p41x, Z17_p41y * Z17_p41y));\n Z17_desire = desire;\n Z17_center = start.add(dir, speed * 0.5f);\n Z17_maxdist = Z17_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 17:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z18_p21x = Float.sum(rightEnd.x, x1);\n Z18_p21y = Float.sum(rightEnd.y, y1);\n Z18_p41x = Float.sum(leftStart.x, x1);\n Z18_p41y = Float.sum(leftStart.y, y1);\n Z18_dotsection2 = -Float.sum(x1 * Z18_p21x, y1 * Z18_p21y);\n Z18_dotsection4 = -Float.sum(x1 * Z18_p41x, y1 * Z18_p41y);\n Z18_p21MagSquared = Float.sum(Z18_dotsection2, Float.sum(Z18_p21x * Z18_p21x, Z18_p21y * Z18_p21y));\n Z18_p41MagSquared = Float.sum(Z18_dotsection4, Float.sum(Z18_p41x * Z18_p41x, Z18_p41y * Z18_p41y));\n Z18_desire = desire;\n Z18_center = start.add(dir, speed * 0.5f);\n Z18_maxdist = Z18_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 18:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z19_p21x = Float.sum(rightEnd.x, x1);\n Z19_p21y = Float.sum(rightEnd.y, y1);\n Z19_p41x = Float.sum(leftStart.x, x1);\n Z19_p41y = Float.sum(leftStart.y, y1);\n Z19_dotsection2 = -Float.sum(x1 * Z19_p21x, y1 * Z19_p21y);\n Z19_dotsection4 = -Float.sum(x1 * Z19_p41x, y1 * Z19_p41y);\n Z19_p21MagSquared = Float.sum(Z19_dotsection2, Float.sum(Z19_p21x * Z19_p21x, Z19_p21y * Z19_p21y));\n Z19_p41MagSquared = Float.sum(Z19_dotsection4, Float.sum(Z19_p41x * Z19_p41x, Z19_p41y * Z19_p41y));\n Z19_desire = desire;\n Z19_center = start.add(dir, speed * 0.5f);\n Z19_maxdist = Z19_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n case 19:\n left = dir.rotateLeftDegrees(90);\n leftStart = start.subtract(dir, avoidwidth).add(left, avoidwidth);\n leftEnd = end.add(dir, avoidwidth).add(left, avoidwidth);\n rightEnd = leftEnd.subtract(left, Float.sum(avoidwidth, avoidwidth));\n x1 = -leftEnd.x;\n y1 = -leftEnd.y;\n Z20_p21x = Float.sum(rightEnd.x, x1);\n Z20_p21y = Float.sum(rightEnd.y, y1);\n Z20_p41x = Float.sum(leftStart.x, x1);\n Z20_p41y = Float.sum(leftStart.y, y1);\n Z20_dotsection2 = -Float.sum(x1 * Z20_p21x, y1 * Z20_p21y);\n Z20_dotsection4 = -Float.sum(x1 * Z20_p41x, y1 * Z20_p41y);\n Z20_p21MagSquared = Float.sum(Z20_dotsection2, Float.sum(Z20_p21x * Z20_p21x, Z20_p21y * Z20_p21y));\n Z20_p41MagSquared = Float.sum(Z20_dotsection4, Float.sum(Z20_p41x * Z20_p41x, Z20_p41y * Z20_p41y));\n Z20_desire = desire;\n Z20_center = start.add(dir, speed * 0.5f);\n Z20_maxdist = Z20_center.distanceTo(leftStart);\n angledRectangleCount++;\n break;\n }\n }",
"void setNoOrientation(boolean orientation);",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32767L, 9223372036854775554L);\n Object object0 = new Object();\n range0.toString();\n range0.equals(object0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n String string0 = range0.toString();\n assertEquals(\"[ 32767 .. 9223372036854775553 ]/0B\", string0);\n \n Range range1 = Range.parseRange(\"[ 32767 .. 9223372036854775553 ]/0B\", range_CoordinateSystem1);\n boolean boolean0 = range1.equals(range0);\n assertTrue(boolean0);\n \n range0.getEnd();\n List<Range> list0 = range1.complement(range0);\n assertEquals(1, list0.size());\n assertFalse(list0.contains(range1));\n }",
"@Override\n\tpublic float area() {\n\t\treturn 0;\n\t}",
"public RangeDirectionAngleRelativeToTrueNorth(byte[] bytes) {\n super(bytes);\n }",
"@Test\n public void testCondition4()\n {\n Double[] angles = {75.0, 75.0, 71.0};\n _renderable.orientation(angles);\n Double testVal[] = _renderable.orientation();\n assertEquals(\"x angle did not get set,\", angles[0], testVal[0], 2);\n assertEquals(\"y angle did not get set,\", angles[1], testVal[1], 2);\n assertEquals(\"z angle did not get set,\", angles[2], testVal[2], 2);\n }",
"public boolean legalOrNot(int x,int y) {\n\t\tif((x == 14 && y ==2) || (x== 2 && y == 14)) {\n\t\t\treturn true;\n\t\t}else if((x-y) == 1 || (x-y) == -1 ) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean literal() {\r\n return ALT((GO() && escape()) || (OK() && visible()));\r\n }",
"public final boolean aox() {\n return false;\n }",
"private double getRawAngle() {\n return (m_pot.getVoltage() / Constants.AIO_MAX_VOLTAGE) * Constants.Hood.POT_SCALE;\n }",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic double area() {\n\t\treturn 0;\n\t}",
"@Test(timeout = 4000)\n public void test122() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2147483647L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n String string0 = range0.toString(range_CoordinateSystem1);\n assertEquals(\"[ 2147483648 .. 2147483647 ]/RB\", string0);\n \n range0.toString();\n Range range1 = Range.parseRange(\"[ 2147483647 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n boolean boolean0 = range1.equals(range0);\n range0.complement(range1);\n assertFalse(range0.equals((Object)range1));\n \n boolean boolean1 = range1.equals((Object) null);\n assertTrue(boolean1 == boolean0);\n \n long long0 = range1.getEnd();\n assertTrue(range1.isEmpty());\n assertEquals(2147483645L, long0);\n }",
"@Test(timeout = 4000)\n public void test063() throws Throwable {\n Range range0 = Range.of((-2147483632L), 2133L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range1 = Range.of(range_CoordinateSystem0, (-2147483632L), 2133L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n String string0 = range1.toString(range_CoordinateSystem1);\n assertEquals(\"[ -2147483632 .. 2132 ]/0B\", string0);\n \n boolean boolean0 = range1.equals(range0);\n assertFalse(boolean0);\n \n String string1 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ -2147483632 .. 2134 ]/SB\", string1);\n \n Range.Comparators.values();\n long long0 = range0.getBegin();\n assertEquals((-2147483632L), long0);\n }",
"Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}",
"boolean getNoColor();",
"@Test(timeout = 4000)\n public void test034() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 2127L, 2127L);\n List<Range> list0 = range0.split(1L);\n List<Range> list1 = range0.complementFrom(list0);\n assertFalse(list1.isEmpty());\n \n range0.getBegin(range_CoordinateSystem0);\n range0.equals(range_CoordinateSystem0);\n long long0 = range0.getBegin(range_CoordinateSystem0);\n assertTrue(range0.isEmpty());\n assertEquals(2127L, long0);\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tboolean isRobotPlaced = this.posX != -1 && this.posY != -1 && this.direction != null;\r\n\t\tif (!isRobotPlaced) {\r\n\t\t\treturn \"Output: ROBOT MISSING\";\r\n\t\t}\r\n\t\treturn \"Output: \" + this.posX + \", \" + this.posY + \", \" + this.direction;\r\n\t}",
"public boolean generatesReferenceAreas() {\n return false;\n }"
] | [
"0.5436958",
"0.53659844",
"0.5324048",
"0.5207905",
"0.51757866",
"0.51538575",
"0.51447475",
"0.51336384",
"0.5107162",
"0.50939447",
"0.4980638",
"0.49787083",
"0.4958768",
"0.49231675",
"0.49066994",
"0.48955205",
"0.4879027",
"0.48672214",
"0.48661315",
"0.48625195",
"0.48397937",
"0.4801319",
"0.47868013",
"0.477726",
"0.47638375",
"0.476189",
"0.47459996",
"0.47059223",
"0.46981746",
"0.469331",
"0.4691594",
"0.4684912",
"0.4680572",
"0.467994",
"0.46775535",
"0.46600604",
"0.4643462",
"0.463907",
"0.4633692",
"0.46279988",
"0.46231782",
"0.46176225",
"0.46167132",
"0.4604197",
"0.46022803",
"0.45901322",
"0.45864105",
"0.45846304",
"0.45807984",
"0.45805356",
"0.45690304",
"0.45684347",
"0.45683238",
"0.45636192",
"0.45522845",
"0.4551365",
"0.45450774",
"0.45364273",
"0.45353466",
"0.45283642",
"0.4526599",
"0.45205453",
"0.45200306",
"0.4513135",
"0.4513135",
"0.4512163",
"0.45098478",
"0.45087272",
"0.4507771",
"0.45070204",
"0.45004034",
"0.4498674",
"0.44931892",
"0.44902083",
"0.44896835",
"0.44866493",
"0.4483787",
"0.44670555",
"0.44668043",
"0.44633883",
"0.44625682",
"0.44520506",
"0.44517133",
"0.44484943",
"0.44457176",
"0.4445396",
"0.44409674",
"0.443891",
"0.44339883",
"0.44262162",
"0.44232494",
"0.4416092",
"0.4416092",
"0.44120106",
"0.44100088",
"0.4409595",
"0.44091332",
"0.44080678",
"0.44048226",
"0.44046506"
] | 0.82264477 | 0 |
nocurlies = ('}'! literal) = (... nocurlies)? | private boolean nocurlies() {
return OPT(GO() && NOT(GO() && CHAR('}')) && literal() && nocurlies());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean noquote() {\r\n return NOT(GO() && CHAR('\\'')) && literal();\r\n }",
"public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }",
"public boolean isLiteral() {\n return false;\n }",
"public void delLiteral();",
"public void testRestartabilityWithAntiquotations() {\n checkCorrectRestart(\n \"''\\n\" +\n \" ${\\n\" +\n \" [\\n\" +\n \" \\\"pure string\\\",\\n\" +\n \" \\\"string with ${antiquotation}\\\",\\n\" +\n \" ''ind string with ${multiple} ${antiquotations}''\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \"''\\n\");\n }",
"UndefinedLiteralExp createUndefinedLiteralExp();",
"public Snippet visit(NotExpression n, Snippet argu) {\n\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f1 = n.identifier.accept(this, argu);\n\t _ret.returnTemp = \"! \"+f1.returnTemp;\n\t return _ret;\n\t }",
"private boolean nobquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('`')) && literal() && nobquotes());\r\n }",
"Rule SingleQuotedLiteral() {\n return Sequence(\n \"'\",\n ZeroOrMore(NoneOf(\"'\")),\n \"'\");\n }",
"private boolean noangles() {\r\n return OPT(GO() && NOT(GO() && CHAR('>')) && literal() && noangles());\r\n }",
"private boolean literals() {\r\n return OPT(GO() && literal() && literals());\r\n }",
"@Override\n public String visit(TextBlockLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\n\tpublic Object visitStringLiteral(StringLiteral literal) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Object visitLiteral(Literal literal) {\n\t\treturn null;\n\t}",
"public boolean containsLiteral();",
"Rule DoubleQuotedLiteral() {\n return Sequence(\n \"\\\"\",\n ZeroOrMore(NoneOf(\"\\\"\")),\n \"\\\"\");\n }",
"public void assertNotEval(final String expression, final String textPattern);",
"@Override\n public String visit(StringLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\n\tpublic void visit(NotExpression arg0) {\n\t\t\n\t}",
"private boolean noquotes() {\r\n return OPT(GO() && noquote() && noquotes());\r\n }",
"private boolean nodquotes() {\r\n return OPT(GO() && NOT(GO() && CHAR('\"')) && literal() && nodquotes());\r\n }",
"@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }",
"private static boolean stringLiteralExpression_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"stringLiteralExpression_0\")) return false;\n boolean r;\n r = consumeToken(b, RAW_SINGLE_QUOTED_STRING);\n if (!r) r = consumeToken(b, RAW_TRIPLE_QUOTED_STRING);\n if (!r) r = stringTemplate(b, l + 1);\n return r;\n }",
"@Override\n public String visit(BooleanLiteralExpr n, Object arg) {\n return null;\n }",
"public String visit(NotExpression n, String s) {\n n.f1.accept(this, null);\n return null;\n }",
"public void visit(Literal literal) {}",
"String getLiteral();",
"String getLiteral();",
"public String visit(FalseLiteral n, LLVMRedux argu) throws Exception {\n return \"false\";\n }",
"Literal createLiteral();",
"Literal createLiteral();",
"Rule Literal() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n SingleQuotedLiteral(),\n DoubleQuotedLiteral()),\n actions.pushLiteralNode());\n }",
"public Snippet visit(NonEqualsExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t Snippet f0 = n.identifier.accept(this, argu);\n\t n.nodeToken.accept(this, argu);\n\t Snippet f2 = n.identifier1.accept(this, argu);\n\t _ret.returnTemp = f0.returnTemp+\" != \"+f2.returnTemp;\n\t return _ret;\n\t }",
"@Test\r\n public void test() {\r\n assertEquals(Arrays.asList(\"()()()\", \"(())()\"), removeInvalidParentheses(\"()())()\"));\r\n assertEquals(Arrays.asList(\"(a)()()\", \"(a())()\"), removeInvalidParentheses(\"(a)())()\"));\r\n assertEquals(Arrays.asList(\"\"), removeInvalidParentheses(\")(\"));\r\n }",
"StringLiteralExp createStringLiteralExp();",
"public Object visitBitwiseNegationExpression(GNode n) {\n Object a, result;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n \n dostring = false;\n \n if (a instanceof Long) {\n result = ~ (Long) a;\n }\n else {\n return \"~ \" + parens(a);\n }\n \n return result;\n }",
"public Rule nonFunctionTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\t// Don't allow simpleMap starting with '|' as this confuses with closinf Function.\n \t\t\t\tfirstOf(sequence(testNot(SP_PIPE), simpleMapType()), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), enforcedSequence(\n \t\t\t\tSQ_BRACKET_L, SQ_BRACKET_R))), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"@Override\n public Literal not() {\n if (negation == null) {\n negation = new NotBoolVar(this);\n }\n return negation;\n }",
"SimpleLiteral createSimpleLiteral();",
"@Override\n public String visit(DoubleLiteralExpr n, Object arg) {\n return null;\n }",
"private String literal(String str) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"'\");\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\'':\n buffer.append(\"''\");\n break;\n default:\n buffer.append(str.charAt(i));\n break;\n }\n }\n buffer.append(\"'\");\n return buffer.toString();\n }",
"InvalidLiteralExp createInvalidLiteralExp();",
"<C> UnlimitedNaturalLiteralExp<C> createUnlimitedNaturalLiteralExp();",
"public static Object pregexpWrapQuantifierIfAny(Object vv, Object s, Object n) {\n Object x;\n Object i;\n char c;\n Object re = lists.car.apply1(vv);\n Object i2 = lists.cadr.apply1(vv);\n while (Scheme.numGEq.apply2(i2, n) == Boolean.FALSE) {\n try {\n try {\n char c2 = strings.stringRef((CharSequence) s, ((Number) i2).intValue());\n boolean x2 = unicode.isCharWhitespace(Char.make(c2));\n if (x2) {\n if ($Stpregexp$Mnspace$Mnsensitive$Qu$St != Boolean.FALSE) {\n x = Scheme.isEqv.apply2(Char.make(c2), Lit65);\n if (x != Boolean.FALSE) {\n Object x3 = Scheme.isEqv.apply2(Char.make(c2), Lit66);\n if (x3 == Boolean.FALSE) {\n Object x4 = Scheme.isEqv.apply2(Char.make(c2), Lit47);\n if (x4 != Boolean.FALSE) {\n if (x4 == Boolean.FALSE) {\n return vv;\n }\n } else if (Scheme.isEqv.apply2(Char.make(c2), Lit67) == Boolean.FALSE) {\n return vv;\n }\n } else if (x3 == Boolean.FALSE) {\n return vv;\n }\n } else if (x == Boolean.FALSE) {\n return vv;\n }\n Pair new$Mnre = LList.list1(Lit68);\n LList.chain4(new$Mnre, Lit69, Lit70, Lit71, re);\n Object new$Mnvv = LList.list2(new$Mnre, Lit72);\n if (Scheme.isEqv.apply2(Char.make(c2), Lit65) == Boolean.FALSE) {\n Object apply1 = lists.cddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply1, Lit73);\n Object apply12 = lists.cdddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply12, Boolean.FALSE);\n } catch (ClassCastException e) {\n throw new WrongType(e, \"set-car!\", 1, apply12);\n }\n } catch (ClassCastException e2) {\n throw new WrongType(e2, \"set-car!\", 1, apply1);\n }\n } else if (Scheme.isEqv.apply2(Char.make(c2), Lit66) != Boolean.FALSE) {\n Object apply13 = lists.cddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply13, Lit8);\n Object apply14 = lists.cdddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply14, Boolean.FALSE);\n } catch (ClassCastException e3) {\n throw new WrongType(e3, \"set-car!\", 1, apply14);\n }\n } catch (ClassCastException e4) {\n throw new WrongType(e4, \"set-car!\", 1, apply13);\n }\n } else if (Scheme.isEqv.apply2(Char.make(c2), Lit47) != Boolean.FALSE) {\n Object apply15 = lists.cddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply15, Lit73);\n Object apply16 = lists.cdddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply16, Lit8);\n } catch (ClassCastException e5) {\n throw new WrongType(e5, \"set-car!\", 1, apply16);\n }\n } catch (ClassCastException e6) {\n throw new WrongType(e6, \"set-car!\", 1, apply15);\n }\n } else if (Scheme.isEqv.apply2(Char.make(c2), Lit67) != Boolean.FALSE) {\n Object pq = pregexpReadNums(s, AddOp.$Pl.apply2(i2, Lit8), n);\n if (pq == Boolean.FALSE) {\n pregexpError$V(new Object[]{Lit74, Lit75});\n }\n Object apply17 = lists.cddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply17, lists.car.apply1(pq));\n Object apply18 = lists.cdddr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply18, lists.cadr.apply1(pq));\n i2 = lists.caddr.apply1(pq);\n } catch (ClassCastException e7) {\n throw new WrongType(e7, \"set-car!\", 1, apply18);\n }\n } catch (ClassCastException e8) {\n throw new WrongType(e8, \"set-car!\", 1, apply17);\n }\n }\n i = AddOp.$Pl.apply2(i2, Lit8);\n while (true) {\n if (Scheme.numGEq.apply2(i, n) == Boolean.FALSE) {\n Object apply19 = lists.cdr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply19, Boolean.FALSE);\n Object apply110 = lists.cdr.apply1(new$Mnvv);\n try {\n lists.setCar$Ex((Pair) apply110, i);\n break;\n } catch (ClassCastException e9) {\n throw new WrongType(e9, \"set-car!\", 1, apply110);\n }\n } catch (ClassCastException e10) {\n throw new WrongType(e10, \"set-car!\", 1, apply19);\n }\n } else {\n try {\n try {\n c = strings.stringRef((CharSequence) s, ((Number) i).intValue());\n boolean x5 = unicode.isCharWhitespace(Char.make(c));\n if (x5) {\n if ($Stpregexp$Mnspace$Mnsensitive$Qu$St != Boolean.FALSE) {\n break;\n }\n } else if (!x5) {\n break;\n }\n i = AddOp.$Pl.apply2(i, Lit8);\n } catch (ClassCastException e11) {\n throw new WrongType(e11, \"string-ref\", 2, i);\n }\n } catch (ClassCastException e12) {\n throw new WrongType(e12, \"string-ref\", 1, s);\n }\n }\n }\n if (!characters.isChar$Eq(Char.make(c), Lit47)) {\n Object apply111 = lists.cdr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply111, Boolean.TRUE);\n Object apply112 = lists.cdr.apply1(new$Mnvv);\n try {\n lists.setCar$Ex((Pair) apply112, AddOp.$Pl.apply2(i, Lit8));\n } catch (ClassCastException e13) {\n throw new WrongType(e13, \"set-car!\", 1, apply112);\n }\n } catch (ClassCastException e14) {\n throw new WrongType(e14, \"set-car!\", 1, apply111);\n }\n } else {\n Object apply113 = lists.cdr.apply1(new$Mnre);\n try {\n lists.setCar$Ex((Pair) apply113, Boolean.FALSE);\n Object apply114 = lists.cdr.apply1(new$Mnvv);\n try {\n lists.setCar$Ex((Pair) apply114, i);\n } catch (ClassCastException e15) {\n throw new WrongType(e15, \"set-car!\", 1, apply114);\n }\n } catch (ClassCastException e16) {\n throw new WrongType(e16, \"set-car!\", 1, apply113);\n }\n }\n return new$Mnvv;\n }\n } else if (!x2) {\n x = Scheme.isEqv.apply2(Char.make(c2), Lit65);\n if (x != Boolean.FALSE) {\n }\n Pair new$Mnre2 = LList.list1(Lit68);\n LList.chain4(new$Mnre2, Lit69, Lit70, Lit71, re);\n Object new$Mnvv2 = LList.list2(new$Mnre2, Lit72);\n if (Scheme.isEqv.apply2(Char.make(c2), Lit65) == Boolean.FALSE) {\n }\n i = AddOp.$Pl.apply2(i2, Lit8);\n while (true) {\n if (Scheme.numGEq.apply2(i, n) == Boolean.FALSE) {\n }\n i = AddOp.$Pl.apply2(i, Lit8);\n }\n if (!characters.isChar$Eq(Char.make(c), Lit47)) {\n }\n return new$Mnvv2;\n }\n i2 = AddOp.$Pl.apply2(i2, Lit8);\n } catch (ClassCastException e17) {\n throw new WrongType(e17, \"string-ref\", 2, i2);\n }\n } catch (ClassCastException e18) {\n throw new WrongType(e18, \"string-ref\", 1, s);\n }\n }\n return vv;\n }",
"@Override\n\tpublic boolean hasLiteral() {\n\t\treturn heldObj.hasLiteral();\n\t}",
"public Literal getLiteral();",
"public Literal getLiteral();",
"private String literal(Array list) {\n StringBuffer buffer = new StringBuffer();\n \n buffer.append(\"(\");\n for (int i = 0; i < list.size(); i++) {\n if (i > 0) {\n buffer.append(\",\");\n }\n buffer.append(literal(list.get(i)));\n }\n buffer.append(\")\");\n return buffer.toString();\n }",
"public void setContainsNoSurrogates() {\r\n noSurrogates = true;\r\n }",
"private static boolean QuotStringLiteral_1_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, PREDEFINEDENTITYREF);\n if (!r) r = consumeToken(b, CHARREF);\n if (!r) r = EscapeQuot(b, l + 1);\n if (!r) r = consumeToken(b, STRINGCHAR);\n exit_section_(b, m, null, r);\n return r;\n }",
"@Override\n public boolean visit(JsPostfixOperation x, JsContext<JsExpression> ctx) {\n return !(x.getArg() instanceof JsStringLiteral);\n }",
"@Override public String toDot() {\r\n return \"¬ \" + predicate.toDot();\r\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"@Override\n\tpublic String toString() {\n\t\tFormula[] literals = new Formula[posLiterals.size() + negLiterals.size()];\n\t\tint i;\n\t\tfor (i = 0; i < posLiterals.size(); i++)\n\t\t\tliterals[i] = new Negation(posLiterals.get(i));\n\t\tfor (int j = 0; j < negLiterals.size(); j++)\n\t\t\tliterals[i++] = negLiterals.get(j);\n\t\t\n\t\treturn (literals.length > 1) ? new Disjunction(literals).toString() : literals[0].toString();\n\t}",
"public void negateUnxepectedTagPenalty() {\n\t\tnegateUnxepectedTagPenalty = true;\n\t}",
"@Override\n public String visit(NoOpStmt n) {\n String _ret = null;\n Global.outputString += \"nop\\n\";\n return _ret;\n }",
"public ParseTreeNode visit(LiteralNode literalNode) {\n return null;\n }",
"@Test\n\tpublic void testExoticGood() {\n\t\tassertNoException(\"int foo(int a) { return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int b = 42; } return a; }\", \"(a (b))\");\n\t\tassertNoException(\"int foo(int a) { int c = -1; { int b = a; c = b + 3; } return c; }\", \"(a, c (b))\");\n\t\tassertNoException(\"int foo(int a) { a = 42; return a; }\", \"(a)\");\n\t\tassertNoException(\"int foo(int a) { { int a = 42; } return a; }\", \"(a (a))\");\n\t}",
"@Override\r\n\tpublic String repl() {\n\t\treturn null;\r\n\t}",
"RealLiteralExp createRealLiteralExp();",
"public node cnf() { rule: anything can sit immediately below ands\n //\n System.out.println( \" should not call \" );\n System.exit( 1 );\n return null;\n }",
"<C> InvalidLiteralExp<C> createInvalidLiteralExp();",
"public static boolean isLiteral (char c) {\n if (c != '*' && c != '?' && c != '(' && c != '[' && c != '\\\\' && c!= '|' && c!='^' && c!='.' && c!=')' && c!=']') return true;\n else return false;\n }",
"String getBooleanFalseExpression();",
"<C> StringLiteralExp<C> createStringLiteralExp();",
"@Test\r\n\tpublic void testInvalid01() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid01\");\r\n\t}",
"@Test\r\n\tpublic void testInvalid03() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid03\");\r\n\t}",
"@Override\n public String visit(UnaryExpr n, Object arg) {\n return null;\n }",
"private boolean literal() {\r\n return ALT((GO() && escape()) || (OK() && visible()));\r\n }",
"@Test\n void shouldNotRenderVariableInside() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\",\n new MapOf<>(\n new MapEntry<>(\"1\", \"A\"),\n new MapEntry<>(\"5\", \"B\"),\n new MapEntry<>(\"6\", \"C\")\n )\n ),\n Matchers.is(\n \"[[#2]][[1]][[/2]][[^4]][[5]][[/4]] [[#7]][[6]][[>9]][[/7]]\"\n )\n );\n }",
"public boolean isLiteral()\n {\n return this.literal;\n }",
"private static boolean checkNotOperations(String expression, Lexemes lexemes, SymbolTable table) {\n\t\tif (expression.contains(\"not\")) {\n\t\t\tString[] arr = expression.split(\"not\");\n\t\t\tint finalIndex = arr.length - 1;\n\n\t\t\tfor (int i = 0; i <= finalIndex; i++) {\n\t\t\t\tString s = arr[i];\n\n\t\t\t\tif (table.contains(s)) {\n\t\t\t\t\tint id = table.getIdOfVariable(s);\n\t\t\t\t\tlexemes.insertLexeme(\"ID\", ((Integer) id).toString());\n\t\t\t\t} else {\n\n\t\t\t\t\tif (s.equals(\"true\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"true\");\n\t\t\t\t\t} else if (s.equals(\"false\")) {\n\t\t\t\t\t\tlexemes.insertLexeme(\"CONST_BOOL\", \"false\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!checkAndOperations(s.trim(), lexemes, table)) return false;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (i < finalIndex) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"not\");\n\t\t\t\t} else if (expression.endsWith(\"not\")) {\n\t\t\t\t\tlexemes.insertLexeme(\"LOGOP\", \"not\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (!checkAndOperations(expression.trim(), lexemes, table)) return false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public Nawiasy(String str) {\r\n super(str);\r\n openBracket = str.equals(\"(\");\r\n }",
"@Test\r\n\tpublic void testInvalid02() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid02\");\r\n\t}",
"void blackhole(){ if (zzAtBOL) return; }",
"@Override\r\n public final RenderContext literal(String literal) {\n if (literal == null) {\r\n return this;\r\n }\r\n\r\n // Quoting is needed when explicitly requested...\r\n boolean needsQuote =\r\n (RenderNameStyle.QUOTED == cachedRenderNameStyle\r\n\r\n // [#2367] ... but in SQLite, quoting \"normal\" literals is generally\r\n // asking for trouble, as SQLite bends the rules here, see\r\n // http://www.sqlite.org/lang_keywords.html for details ...\r\n && configuration.dialect() != SQLDialect.SQLITE)\r\n\r\n ||\r\n\r\n // [#2367] ... yet, do quote when an identifier is a SQLite keyword\r\n (configuration.dialect() == SQLDialect.SQLITE\r\n && SQLITE_KEYWORDS.contains(literal.toUpperCase()))\r\n\r\n ||\r\n\r\n // [#1982] ... yet, do quote when an identifier contains special characters\r\n (!IDENTIFIER_PATTERN.matcher(literal).matches());\r\n\r\n if (RenderNameStyle.LOWER == cachedRenderNameStyle) {\r\n literal = literal.toLowerCase();\r\n }\r\n else if (RenderNameStyle.UPPER == cachedRenderNameStyle) {\r\n literal = literal.toUpperCase();\r\n }\r\n\r\n if (!needsQuote) {\r\n sql(literal);\r\n }\r\n else {\r\n switch (configuration.dialect().family()) {\r\n\r\n // MySQL supports backticks and double quotes\r\n case MARIADB:\r\n case MYSQL:\r\n sql(\"`\").sql(StringUtils.replace(literal, \"`\", \"``\")).sql(\"`\");\r\n break;\r\n\r\n // T-SQL databases use brackets\r\n case ASE:\r\n case SQLSERVER:\r\n case SYBASE:\r\n sql(\"[\").sql(StringUtils.replace(literal, \"]\", \"]]\")).sql(\"]\");\r\n break;\r\n\r\n // Most dialects implement the SQL standard, using double quotes\r\n case SQLITE:\r\n case CUBRID:\r\n case DB2:\r\n case DERBY:\r\n case FIREBIRD:\r\n case H2:\r\n case HSQLDB:\r\n case INGRES:\r\n case ORACLE:\r\n case POSTGRES:\r\n default:\r\n sql('\"').sql(StringUtils.replace(literal, \"\\\"\", \"\\\"\\\"\")).sql('\"');\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }",
"@Test\n\t\tpublic void noApplyHyp() {\n\t\t\tassertFailure(\" ;H; ;S; 1=1 |- {1}⊆S\");\n\t\t}",
"public final void mNOT() throws RecognitionException {\n try {\n int _type = NOT;\n // /Users/benjamincoe/HackWars/C.g:233:5: ( '!' )\n // /Users/benjamincoe/HackWars/C.g:233:7: '!'\n {\n match('!'); \n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }",
"@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }",
"public interface QuotedL1Node {\n\n}",
"Expression simplifyForSideEffect();",
"public boolean isLegalReplacement(byte[] repl) {\n return true;\n }",
"private static void testBadStrLiterals() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST BAD STRING LITERALS: BAD ESCAPED CHARS ON LINES 2-5; UNTERM ON LINES 6-11, BOTH ON LINES 12-14\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadStrLiterals\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadStrLiterals not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\twhile (token.sym != sym.EOF) {\n\t if (token.sym != sym.STRINGLITERAL) {\n\t\tSystem.err.println(\"ERROR TESTING BAD STRING LITERALS: bad token: \" +\n\t\t\t\t token.sym);\n\t }\n\t token = scanner.next_token();\n\t}\n }",
"@Override\n\tpublic boolean canLiteralSurvive(Frame frame) {\n\t\treturn heldObj.canLiteralSurvive(frame);\n\t}",
"public static void wellFormed(){\n System.out.println(\"A well-formed Java program has\");\n System.out.println(\"a main method with { and }\");\n System.out.println(\"braces.\");\n System.out.println(\"\");\n System.out.println(\"A System.out.println statement\");\n System.out.println(\"has ( and ) and usually a\");\n System.out.println(\"String that starts and ends\");\n System.out.println(\"with a \\\" character.\");\n System.out.println(\"(But we type \\\\\\\" instead!)\");\n }",
"public static String literal(String literal, int occurrences) {\n\t\treturn \"\\t\\t\\t\\t<lit cntt=\\\"\" + literal + \"\\\" count=\\\"\" + occurrences +\"\\\"/>\" + \"\\n\";\n\t}",
"public Object visitUnaryMinusExpression(GNode n) {\n Object a;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n \n dostring = false;\n \n if (a instanceof Long) {\n return - (Long) a;\n }\n else {\n return \"- \" + parens(a);\n }\n }",
"@Test\n public void nonBracket(){\n assertTrue(BalancedBrackets.hasBalancedBrackets(\"\"));\n }",
"@Test\n\tpublic void testUnsafe()\n\t{\n\t\tString[] code = {\n\t\t\t\"var a\\n = 'Here is a unsafe character';\"\n\t\t};\n\t\t\n\t\tth.test(code, new LinterOptions().set(\"es3\", true));\n\t}",
"@Override\n public boolean visit(JsPrefixOperation x, JsContext<JsExpression> ctx) {\n return !(x.getArg() instanceof JsStringLiteral);\n }",
"<C> RealLiteralExp<C> createRealLiteralExp();",
"default boolean isSpecial() { return false; }",
"@Override\r\n\tpublic boolean getCurlyBracesDenoteCodeBlocks(int languageIndex) {\r\n\t\treturn true;\r\n\t}",
"public void setLiteral(boolean isLiteral)\n {\n this.literal = isLiteral;\n }",
"private Token negationCheck(Token pToken, Token pPrevToken) {\n if (pPrevToken == null || pPrevToken instanceof BinaryOperator || pPrevToken instanceof LeftParen) {\n pToken = new NegOperator();\n }\n return pToken;\n }",
"@Test\n public void testRegexWithNonEscapedCurlyBraces() throws Exception {\n final String html = \"<html><head><title>foo</title><script>\\n\"\n + \" function test() {\\n\"\n + \" var regexp = /(^|{)#([^}]+)(}|$)/;\\n\"\n + \" var str = '|{#abcd}|';\\n\"\n + \" alert(str.match(regexp))\\n\"\n + \" }\\n\"\n + \"</script></head><body onload='test()'>\\n\"\n + \"</body></html>\";\n \n final String[] expectedAlerts = {\"{#abcd},{,abcd,}\"};\n final List<String> collectedAlerts = new ArrayList<String>();\n createTestPageForRealBrowserIfNeeded(html, expectedAlerts);\n loadPage(html, collectedAlerts);\n assertEquals(expectedAlerts, collectedAlerts);\n }",
"@Test\r\n\tpublic void testInvalid04() throws Exception {\r\n\r\n\t\tthis.compareFragmentCodeGeneration(\"expressions/literals\", \"invalid04\");\r\n\t}",
"@Test\n\tpublic void parenthesses_should_notbalanced_expr()\n\t{\n\t\tString result=\"\";String expr=\"\";\n\t\t\n\t\texpr=\"(a+b(a+c)\";\n\t\t result=com.bridgelabz.util.DataStructure.BalanaceParenthes(expr);\n\t\tassertTrue(\"not balanced\", result!=\"balaced\");\n\t}",
"private static boolean QuotStringLiteral_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"QuotStringLiteral_1\")) return false;\n int c = current_position_(b);\n while (true) {\n if (!QuotStringLiteral_1_0(b, l + 1)) break;\n if (!empty_element_parsed_guard_(b, \"QuotStringLiteral_1\", c)) break;\n c = current_position_(b);\n }\n return true;\n }"
] | [
"0.6242142",
"0.61560863",
"0.61179394",
"0.6104613",
"0.59687686",
"0.5931931",
"0.5829362",
"0.58261114",
"0.5690801",
"0.5662718",
"0.5632709",
"0.55769396",
"0.557187",
"0.55029476",
"0.548066",
"0.543862",
"0.5437054",
"0.54219073",
"0.5401659",
"0.53803015",
"0.5375397",
"0.5373763",
"0.5350367",
"0.53339887",
"0.5319794",
"0.53029335",
"0.52983546",
"0.52983546",
"0.5283786",
"0.52830786",
"0.52830786",
"0.5244024",
"0.5243938",
"0.52403533",
"0.52256554",
"0.5225123",
"0.52230537",
"0.5200793",
"0.5192091",
"0.5185746",
"0.5159998",
"0.51209295",
"0.5102655",
"0.5101502",
"0.50842196",
"0.5083336",
"0.5083336",
"0.50757277",
"0.5049058",
"0.5048505",
"0.5040415",
"0.50385714",
"0.50333107",
"0.5003768",
"0.50015837",
"0.49920577",
"0.4976551",
"0.4975878",
"0.49544406",
"0.49447048",
"0.49396485",
"0.49366692",
"0.4926209",
"0.49203333",
"0.49039307",
"0.48969203",
"0.4877415",
"0.48609063",
"0.48601758",
"0.48507163",
"0.4848143",
"0.48453805",
"0.48395088",
"0.48306677",
"0.4829524",
"0.48200932",
"0.4805578",
"0.4804219",
"0.47976792",
"0.47967565",
"0.47887155",
"0.47855872",
"0.47824803",
"0.47823733",
"0.47818205",
"0.477123",
"0.4767203",
"0.4762406",
"0.47622618",
"0.47541842",
"0.47470373",
"0.47336712",
"0.47107312",
"0.4703713",
"0.47013086",
"0.46980417",
"0.46968198",
"0.4692033",
"0.4689112",
"0.46885"
] | 0.73975337 | 0 |
endline = '\13'? '\10' | private boolean endline() {
return (CHAR('\r') || true) && CHAR('\n');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@DISPID(1610940416) //= 0x60050000. The runtime will prefer the VTID if present\n @VTID(22)\n boolean atEndOfLine();",
"private boolean isNewLine(int nextVal) {\n\t\treturn nextVal == CR || nextVal == LF || nextVal == EOF;\n\t}",
"@Override\n\tprotected void endOfLine() {\n\t}",
"public int getEndLine() {\r\n \r\n return endLine;\r\n }",
"boolean hasEndLineNumber();",
"private void newline() {}",
"public String getEndLine() {\r\n return this.endLine;\r\n }",
"public boolean isAtEnd()\n\t{\n\t\treturn (lineNow >= lineTime);\n\t}",
"public boolean isNewLine(char c) {\n\t\treturn c == '\\n' || c == '\\r';\n\t}",
"private static boolean isLineTerminator(final char c) {\r\n\r\n if ((c == '\\n') || (c == '\\r') || (c == '\\u0085') || (c == '\\u2028') || (c == '\\u2029')) {\r\n return true;\r\n }\r\n\r\n return (false);\r\n }",
"private static int findEndOfLine(final ChannelBuffer buffer) {\n final int n = buffer.writerIndex();\n for (int i = buffer.readerIndex(); i < n; i ++) {\n final byte b = buffer.getByte(i);\n if (b == '\\n') {\n return i;\n } else if (b == '\\r' && i < n - 1 && buffer.getByte(i + 1) == '\\n') {\n return i; // \\r\\n\n }\n }\n return -1; // Not found.\n }",
"public abstract void newLine();",
"public static boolean isNewLineCharacter(char c)\n {\n return (c == '\\r') || (c == '\\n');\n }",
"private String getLineSeparator(String givenStr) {\n if (givenStr.indexOf(\"\\r\\n\") == -1) {\n return \"\\n\";\n } else {\n return \"\\r\\n\";\n }\n }",
"private boolean isEndLineSpace(final String message) {\n\t\treturn message.contains(\"A line should not end with blank space\"); //$NON-NLS-1$\n\t}",
"public void gotoEndOfLine()\r\n\t{\r\n\t\twhile (thisc != '\\n') {\r\n\t\t\tif (thisc == EOF) return;\r\n\t\t\tnextC();\r\n\t\t}\r\n\t}",
"public void newLine()\n {\n rst += NEW_LINE;\n }",
"private boolean skipNewline() {\n\t\tif (nextChar == '\\n') {\n\n\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\tif (nextChar == '\\r') {\n\t\t\tlineNumber++;\n\t\t\tcolumnNumber = 1;\n\t\t\tnextChar = getChar();\n\n\t\t\t// skip over next char if '\\n'\n\t\t\tif (nextChar == '\\n')\n\t\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\t// newline char not found\n\t\treturn false;\n\t}",
"int getEndLineNumber();",
"protected abstract boolean definitelyNotLastLine(String message);",
"public static int getEndOfLineIndex() {\n return endOfLineIndex;\n }",
"public boolean hasEndLineNumber() {\n return ((bitField0_ & 0x00000040) != 0);\n }",
"@Pure\n public int getEndLine() {\n return this.endLine;\n }",
"public int getEndLIne() {\r\n return this.endLine;\r\n }",
"public boolean hasEndLineNumber() {\n return ((bitField0_ & 0x00000040) != 0);\n }",
"public int getCharEnd() {\n\t\treturn -1;\n\t}",
"public void setEndLine(int endLine) {\r\n this.endLine = endLine;\r\n }",
"private boolean isEndFound(String line) {\n\t\tif (end != null) {\n\t\t\tif (nothingAfterEnd) {\n\t\t\t\treturn line.endsWith(end);\n\t\t\t} else {\n\t\t\t\treturn line.contains(end);\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private boolean isEnd(String nextVal) throws java.io.IOException {\n\t\tif (Character.toString((char)PREPROCESSING).equals(nextVal)) {\n\t\t\tint pos = (int) reader.getFilePointer();\n\t\t\tthis.readUntilEndOfLine(nextVal.charAt(0));\n\t\t\tif (next.matches(\"^!end\"))\n\t\t\t\treturn true;\n\t\t\treader.seek(pos);\n\t\t}\n\t\treturn false;\n\n\t}",
"private boolean addNewLineAfterSemocolon(Token<CppTokenId> current) {\n if (!ts.isLastLineToken()) {\n ts.addAfterCurrent(current, 1, getIndent(), true);\n return true;\n }\n return false;\n }",
"public abstract AbstractLine newLine() throws IOException;",
"public boolean isEndOfHeader() {\n \t\t\tint i = count;\n \t\t\treturn i > 4 && buf[i - 4] == '\\r' && buf[i - 3] == '\\n'\n \t\t\t\t\t&& buf[i - 2] == '\\r' && buf[i - 1] == '\\n';\n \t\t}",
"public String nextLine() {\n\t\treturn null;\r\n\t}",
"boolean separatorLine(String mode);",
"public void setEndLine(final int endLine) {\n this.endLine = endLine;\n }",
"int getEndCharIndex();",
"public static char getDefaultEndEndModifier()\n {\n return defaults.end_end_modifier;\n }",
"private void linefeed() {\n try {\n out.write(lineSeparator);\n } catch (java.io.IOException ioe) {\n }\n ;\n }",
"public void setEndLineNumber(int foo) { endLineNumber = foo; }",
"private static boolean isTailChar(char ch) {\n if(ch == OLD_TAIL_CHAR || ch == NEW_TAIL_CHAR){\n return true;\n }else{\n return false;\n }\n }",
"String getIfEnd();",
"boolean getIsEndOfSentence();",
"public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}",
"public void newLine() {\n text.append(\"\\n\");\n }",
"public abstract AbstractLine newLine(byte[] data) throws IOException;",
"String getEnd();",
"public char getEndEndModifier() {\n\t\treturn (end_end_modifier);\n\t}",
"private String getNextLine () {\n String line;\n if (endOfText()) {\n line = \"\";\n } else {\n int lineEndLength = 1;\n char c = ' ';\n char d = ' ';\n char x = ' ';\n lineEnd = index;\n boolean endOfLine = false;\n while (! endOfLine) {\n if (lineEnd >= blockIn.length()) {\n endOfLine = true;\n } else {\n c = blockIn.charAt (lineEnd);\n if (c == GlobalConstants.CARRIAGE_RETURN) {\n x = GlobalConstants.LINE_FEED;\n endOfLine = true;\n }\n else\n if (c == GlobalConstants.LINE_FEED) {\n x = GlobalConstants.CARRIAGE_RETURN;\n endOfLine = true;\n }\n if (endOfLine) {\n if ((lineEnd + 1) < blockIn.length()) {\n d = blockIn.charAt (lineEnd + 1);\n if (d == x) {\n lineEndLength = 2;\n }\n }\n } else { \n // not end of line\n lineEnd++;\n }\n } // end if another char to look at\n } // end while not end of line\n lineStart = index;\n if (lineEnd < lineStart) {\n lineEnd = blockIn.length();\n }\n if (lineEnd >= lineStart) {\n index = lineEnd + lineEndLength;\n line = blockIn.substring (lineStart, lineEnd);\n if (line.equals (getBlockEnd())) {\n blockEnded = true;\n }\n } else {\n line = \"\";\n } // end if no line to return\n } // end if more of block left\n checkNextField();\n return line;\n }",
"public boolean endOfText () {\n if (index >= blockIn.length()) {\n blockEnded = true;\n textEnded = true;\n }\n return textEnded;\n }",
"public void markNewLine() throws IOException {\n\t\tout.write(\"\\n\");\n\t\tout.flush();\n\t}",
"private int getLineEnd(int i,Indexer indexer) {\n return (i + 1 == getLineCount() ? mText.length() + 1 : indexer.getCharIndex(i+1,0));\n }",
"boolean hasIsEndOfSentence();",
"void endLine() {\n\t\tif (loaded != null && loaded.length() > 0) {\n\t\t\tlineContainer.set(loaded.toString());\n\t\t}\n\t\tloaded = new StringBuilder();\n\t}",
"public String getNewLine() {\n return newLine;\n }",
"public void endl(){\n putc('\\n');\n }",
"public final void mNEWLINE() throws RecognitionException {\n try {\n int _type = NEWLINE;\n // /Users/benjamincoe/HackWars/C.g:168:9: ( ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )\n // /Users/benjamincoe/HackWars/C.g:169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n {\n // /Users/benjamincoe/HackWars/C.g:169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0=='\\r') ) {\n int LA3_1 = input.LA(2);\n\n if ( (LA3_1=='\\n') ) {\n alt3=1;\n }\n else {\n alt3=2;}\n }\n else if ( (LA3_0=='\\n') ) {\n alt3=3;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\", 3, 0, input);\n\n throw nvae;\n }\n switch (alt3) {\n case 1 :\n // /Users/benjamincoe/HackWars/C.g:169:6: '\\\\r\\\\n'\n {\n match(\"\\r\\n\"); \n\n\n }\n break;\n case 2 :\n // /Users/benjamincoe/HackWars/C.g:170:9: '\\\\r'\n {\n match('\\r'); \n\n }\n break;\n case 3 :\n // /Users/benjamincoe/HackWars/C.g:171:9: '\\\\n'\n {\n match('\\n'); \n\n }\n break;\n\n }\n\n //input.setLine(input.getLine()+1); \n \tchannel=HIDDEN;\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"public void endLine() {\n if (currentLine != null) {\n lines.add(currentLine);\n currentLine = null;\n }\n }",
"private boolean isEndOfCode() {\n return currentIndex >= codeLength;\n }",
"private void addLine()\n\t{\n\t\tlines.add(printerFormatter.markEOL());\n\t}",
"public int getEndLineNumber() {\n return this.endLine;\n }",
"public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }",
"private boolean isAtEnd() {\n return peek().type == EOF;\n }",
"public boolean getNeedLineBreak() {\n\t\treturn true;\n\t}",
"public static boolean presentLine() {\n\t\treturn presentLine(\"\\n\");\n\t}",
"private static int lastnlposition(byte[] data, int len) {\n int at = -1;\n for(int i=len-1; i >= 0; i--) {\n if(data[i] == '\\n') {\n at = i;\n break;\n }\n }\n return at;\n }",
"private void writeEndOfLine(final BufferedWriter file) throws IOException {\n file.write(\"\\\\\\\\\");\n file.newLine();\n }",
"public void endCharacter() {\n\t\tString name = \"Tori\";\n\t\tboolean startWith = name.endsWith(\"ori\");\n\t\tif(startWith) {\n\t\t\tSystem.out.println(\"it ends with the character\");\n\t\t}\n\t}",
"public final void mNEWLINE() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:17: ( ( '\\\\r' )? '\\\\n' )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: ( '\\\\r' )? '\\\\n'\n\t\t\t{\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: ( '\\\\r' )?\n\t\t\tint alt2=2;\n\t\t\tint LA2_0 = input.LA(1);\n\t\t\tif ( (LA2_0=='\\r') ) {\n\t\t\t\talt2=1;\n\t\t\t}\n\t\t\tswitch (alt2) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: '\\\\r'\n\t\t\t\t\t{\n\t\t\t\t\tmatch('\\r'); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmatch('\\n'); \n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"public int getEndLineNumber() {\n return endLineNumber_;\n }",
"public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }",
"public void appendLine() {\n\t\t\tmBuilder.append(NewLineChar);\n\t\t\tlastAppendNewLine = true;\n\t\t}",
"public Character getMultilineSymbol();",
"@Pure\n public Integer getEndCharacter() {\n return this.endCharacter;\n }",
"public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}",
"protected static String br() {\n return \"\\r\\n\";\n }",
"public synchronized boolean skipLineBreak() throws IOException {\n\t\tchar current = current();\n\t\tif ('\\r' == current && '\\n' == peek(1)) {\n\t\t\tskip(2);\n\t\t\treturn true;\n\t\t} else if (isNewLine(current)) {\n\t\t\tskip(1);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test(timeout = 4000)\n public void test013() throws Throwable {\n StringReader stringReader0 = new StringReader(\"d{IHR}D';Z<m5\\\"\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.BeginToken();\n javaCharStream0.UpdateLineColumn('d');\n assertEquals(1, javaCharStream0.getBeginLine());\n }",
"public void setEndLineNumber(int endLine) {\n this.endLine = endLine;\n }",
"@Test\n public void eofHandling() {\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \" \");\n assertLine(Language.CSS, new Line(Language.CSS, BLANK), \"\\t\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em;\");\n assertLine(Language.CSS, new Line(Language.CSS, COMMENT), \"/* comment */\");\n assertLine(Language.CSS, new Line(Language.CSS, CODE), \"margin: 1em; /* with comment */\");\n }",
"public final void mNEWLINE() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.NEWLINE;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:5: ( ( ( '\\\\r' )?\n\t\t\t// '\\\\n' ) )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:9: ( ( '\\\\r' )?\n\t\t\t// '\\\\n' )\n\t\t\t{\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:9: ( ( '\\\\r'\n\t\t\t\t// )? '\\\\n' )\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:10: ( '\\\\r'\n\t\t\t\t// )? '\\\\n'\n\t\t\t\t{\n\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:10: (\n\t\t\t\t\t// '\\\\r' )?\n\t\t\t\t\tint alt4 = 2;\n\t\t\t\t\tfinal int LA4_0 = this.input.LA(1);\n\n\t\t\t\t\tif ((LA4_0 == '\\r'))\n\t\t\t\t\t{\n\t\t\t\t\t\talt4 = 1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt4)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:11:\n\t\t\t\t\t\t// '\\\\r'\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.match('\\r');\n\n\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\tthis.match('\\n');\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"public void linefeed() {\r\n\t\tconsole.print(LINESEP);\r\n\t}",
"public boolean isNewline() {\n // -- if we need to add indentation, we are on a new line\n return addIndentation;\n }",
"void showNewLine(String lineNumber, String directionId);",
"protected abstract boolean isMultiLine();",
"public String getLineSeparator();",
"private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}",
"public static String getLineSeparator() {\r\n // /- - - - - - - - - - - - - - - - - - - - - -\r\n // Because 'CR + LF' caused many trouble!\r\n\t\t// And Now 'LF' have little trouble. \r\n\t\t// \r\n // return System.getProperty(\"line.separator\");\r\n // - - - - - - - - - -/\r\n\t\treturn \"\\n\";\r\n }",
"public int getEndLineNumber() {\n return endLineNumber_;\n }",
"@Test\n\tpublic void testEmptyLine() {\n\t\tString s = \" \\n\";\n\t\tassertTrue(\"Empty string with line ending\", StringUtil.isEmpty(s));\n\t}",
"@Override\r\n\t\tpublic Character getMultilineSymbol() {\n\t\t\treturn null;\r\n\t\t}",
"public final void mNEWLINE() throws RecognitionException {\r\n try {\r\n int _type = NEWLINE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Satmc.g:194:5: ( ( '\\\\r' )? '\\\\n' )\r\n // Satmc.g:194:7: ( '\\\\r' )? '\\\\n'\r\n {\r\n // Satmc.g:194:7: ( '\\\\r' )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0=='\\r') ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // Satmc.g:194:7: '\\\\r'\r\n {\r\n match('\\r'); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match('\\n'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"public char getEndTagChar() {\n\t\treturn (end_tag);\n\t}",
"public void testIsAtEnd() {\n assertTrue(test1.isAtEnd());\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertFalse(test1.isAtEnd());\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertTrue(test1.isAtEnd());\n }",
"public Character getMorelinesSymbol();",
"public boolean eos()\n \t{\n \t\tMatcherContext ctx = (MatcherContext) getContext();\n \t\tif (ctx == null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t\t// geting after potential spacing first\n \t\tOptionalMatcher opt=new OptionalMatcher(spacing());\n \t\topt.match(ctx);\n \n \t\t// First check if we just passed a '\\n' (in spacing)\n \t\t//System.out.println(\"EOS> checking afterNL\");\n \t\tif (isAfterNL())\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> checking '}'\");\n \t\t// '}' is eos too, but we should not consume it, so using a test\n \t\tSequenceMatcher seq = (SequenceMatcher) sequence(OPT_SP, test(eoi()));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// test foe end of input, that qualifies too\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, test('}'));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// Otherwise look for upcoming statement ending chars: ';' or '}'\n \t\t//System.out.println(\"EOS> checking ';'\");\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, ';');\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> False\");\n \t\treturn false;\n \t}",
"public Boolean isEnd() {\n\t\t// keep running\n\t\tif (currentNo == -1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// car production for this production line is done\n\t\telse if (currentNo >= expectedNo) {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\n\t\t\treturn true;\n\t\t} else {\n//\t\t\tSystem.out.println(\"isEnd of car Production line is \");\n//\t\t\tSystem.out.print(currentNo >= expectedNo);\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private boolean endsWithSpace(String str) {\r\n\t\treturn str.length() != 0 && str.charAt(str.length() - 1) == ' ';\r\n\t}",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }",
"private int getNextLine() {\n return peekToken().location.start.line;\n }",
"public String getEnd(){\n\t\treturn end;\n\t}"
] | [
"0.7108726",
"0.6965217",
"0.68675154",
"0.65293765",
"0.65106523",
"0.648367",
"0.64278936",
"0.641842",
"0.6312803",
"0.62941545",
"0.6287251",
"0.62862396",
"0.6267653",
"0.6266374",
"0.6266172",
"0.6165173",
"0.6142204",
"0.6089998",
"0.6062948",
"0.6043332",
"0.60393226",
"0.5991079",
"0.59751314",
"0.59545577",
"0.59399253",
"0.5931056",
"0.5921978",
"0.59153616",
"0.58850294",
"0.58840007",
"0.5867394",
"0.57995737",
"0.57866293",
"0.57799363",
"0.57688",
"0.5739451",
"0.57241297",
"0.57196087",
"0.5694618",
"0.56737614",
"0.56632006",
"0.56549245",
"0.5644067",
"0.56439126",
"0.56311315",
"0.5631058",
"0.5623247",
"0.56200427",
"0.5609528",
"0.56082314",
"0.5605918",
"0.5598755",
"0.5592012",
"0.5587656",
"0.5576138",
"0.55700576",
"0.5561226",
"0.556012",
"0.55580556",
"0.5553274",
"0.5545586",
"0.55413127",
"0.5539562",
"0.55350816",
"0.5520469",
"0.5515068",
"0.55024505",
"0.55012274",
"0.5473307",
"0.5472548",
"0.5464652",
"0.5442316",
"0.5439143",
"0.54352164",
"0.5428322",
"0.5421044",
"0.5415232",
"0.54082835",
"0.5396264",
"0.5392445",
"0.5389942",
"0.5388754",
"0.5379613",
"0.537812",
"0.5373807",
"0.5364134",
"0.5359321",
"0.535861",
"0.53483194",
"0.534724",
"0.53455186",
"0.5338414",
"0.53327906",
"0.5329843",
"0.53283226",
"0.5327817",
"0.5303568",
"0.5288703",
"0.52833545",
"0.5282437"
] | 0.7949284 | 0 |
Support functions Prepare for a choice or lookahead by recording the input position. | private boolean GO() {
if (save >= saves.length) {
saves = Arrays.copyOf(saves, saves.length * 2);
}
saves[save++] = in;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void prepare(Source s) {\r\n source = s;\r\n input = source.rawText();\r\n ok = true;\r\n start = in = out = marked = lookahead = 0;\r\n failures = new TreeSet<>();\r\n output = new StringBuffer();\r\n outCount = 0;\r\n }",
"protected abstract StackManipulation preparation();",
"Position<T> before(Position<T> p) throws IllegalStateException;",
"boolean prepareToMove();",
"boolean captureChoice(Scanner sc);",
"private void parseQuestionMark(@NotNull ParserState state) {\n if (state.is(m_types.C_FUN_PARAMS)) {\n state.mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Start of a new optional parameter :: let f x |>?<|(y ...\n else if (state.is(m_types.C_FUN_PARAM) && !state.hasScopeToken()) {\n state.complete().popEnd()\n .mark(m_types.C_FUN_PARAM)\n .mark(m_types.C_NAMED_PARAM);\n }\n // Condition ?\n else if (state.is(m_types.C_BINARY_CONDITION) && !state.isPrevious(m_types.C_MATCH_EXPR)) {\n IElementType nextType = state.rawLookup(1);\n // ... |>?<| ... : ...\n if (nextType != m_types.LIDENT) {\n state.popEnd();\n }\n }\n }",
"public void prepareSeqTurno(ActionEvent event) {\n if (this.getSelected() != null && seqTurnoController.getSelected() == null) {\n seqTurnoController.setSelected(this.getSelected().getSeqTurno());\n }\n }",
"private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"us-US\");\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }",
"public void prepare() {\r\n\t\tmyPreviousBet = 0;\r\n\t\tmyCurrentBet = 0;\r\n\t\tstage = 0;\r\n\t\tposition = -1;\r\n\t\tintel.reset();\r\n\t\tfor (int i = 0; i < boards.length; i++)\r\n\t\t\tboards[i] = \"UNKNOWN\";\r\n\t}",
"private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }",
"private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }",
"private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }",
"private void promptSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n getString(R.string.speech_prompt));\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n Toast.makeText(getApplicationContext(),\n getString(R.string.speech_not_supported),\n Toast.LENGTH_SHORT).show();\n }\n }",
"private void takeInUserInput(){\n\t\t// only take in input when it is in the ANSWERING phase\n\t\tif(spellList.status == QuizState.Answering){\n\t\t\tspellList.setAnswer(getAndClrInput());\n\t\t\tspellList.status = QuizState.Answered;\n\t\t\tansChecker=spellList.getAnswerChecker();\n\t\t\tansChecker.execute();\n\t\t}\t\n\n\t}",
"public void prepareRematch() {\r\n\t\tgame.prepareRematch();\r\n\t}",
"public int getInputPositionIncrement () { return 1; }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n choice=pos;\n }",
"public void prepare() {\n\t\twhile (lastEventEndTime<=curSimulation.time) {\n\t\t\t\n\t\t\t// generate the next event\n\t\t\tif (lastEvent!=null && lastEvent.type==Event.MOVE) {\n\t\t\t\t\n\t\t\t\t// currently moving -> generate a new PAUSE event\n\t\t\t\tMove move = (Move)lastEvent;\n\t\t\t\tPause pause = new Pause(this, lastEventEndTime, RandomWaypointModel.waitTimeDistribution.nextValue(), move.moveToX, move.moveToY);\n\t\t\t\taddEvent(pause);\n\t\t\t\t\n\t\t\t} else if (lastEvent!=null && lastEvent.type==Event.PAUSE) {\n\t\t\t\t\n\t\t\t\t// generate a new MOVEMENT event\n\t\t\t\tMove move = new Move(this, lastEventEndTime, lastEvent.x, lastEvent.y, curSimulation.size*curSimulation.rng.nextDouble(), curSimulation.size*curSimulation.rng.nextDouble(), RandomWaypointModel.velocityDistribution.nextValue());\n\t\t\t\taddEvent(move);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public void beginInput() {\n this.currentState = states.INPUT;\n this.currentIndex = 1;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"private void promptSpeechInput() {\n\t\tIntent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n\t\t\t\tRecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n\t\tintent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n\t\tintent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n\t\t\t\tgetString(R.string.speech_prompt));\n\t\ttry {\n\t\t\tstartActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n\t\t} catch (ActivityNotFoundException a) {\n\t\t\tToast.makeText(getActivity(),\n\t\t\t\t\tgetString(R.string.speech_not_supported),\n\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"void selectpos()\n {\n \n }",
"@Override\n public R visit(LimitOffsetClauses n, A argu) {\n R _ret = null;\n n.nodeChoice.accept(this, argu);\n return _ret;\n }",
"@Override\n\tpublic void prepare() {\n\t\t\n\t}",
"public void takePosition(int position, boolean won, short code) {\n\t\t\n\t\t\n\t}",
"private static int findPreviousStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1550 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 1551 */ localPrevArgs.src = paramArrayOfChar;\n/* 1552 */ localPrevArgs.start = paramInt1;\n/* 1553 */ localPrevArgs.current = paramInt2;\n/* */ \n/* 1555 */ while (localPrevArgs.start < localPrevArgs.current) {\n/* 1556 */ long l = getPrevNorm32(localPrevArgs, paramChar, paramInt3 | paramInt4);\n/* 1557 */ if (isTrueStarter(l, paramInt3, paramInt4)) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1561 */ return localPrevArgs.current;\n/* */ }",
"public void selectPosition(String nextPosition){\r\n switch (nextPosition){\r\n case \"barn\": barn(); break;\r\n case \"turkeyTalk\": turkeyTalk(); break;\r\n case \"seeTheLight\": seeTheLight(); break;\r\n case \"pigginOut\": pigginOut(); break;\r\n case \"theGobbling\": theGobbling(); break;\r\n case \"farmHouseTurkey\": farmHouseTurkey(); break;\r\n case \"threeLittlePigs\": threeLittlePigs(); break;\r\n case \"forTheGreaterGood\": forTheGreaterGood(); break;\r\n case \"youDied1\": youDied1();break;\r\n case \"youWin\": youWin(); break;\r\n case \"thePond\": thePond();break;\r\n default: break;\r\n \r\n }\r\n }",
"public abstract String whichToMove(boolean[] available, String lastMove, int whoseTurn, Scanner scanner);",
"@Override\n public StoryTree makeChoice() {\n Scanner reader = new Scanner(System.in);\n System.out.println(this.print());\n\n int choice = reader.nextInt();\n\n if(choice == 1) {\n return this.option1.outcome;\n }\n if(choice == 2) {\n return this.option2.outcome;\n } else {\n System.out.println(\"Invalid Input\");\n return this;\n }\n }",
"@Override\n\tpublic void setChoice(Input in, Output out) throws IOException {\n\t\t\n\t}",
"public void beforeInput() {\n }",
"public void beforeInput() {\n }",
"Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;",
"public LookaheadSequence(final Sequence seq) {\n mSeq = seq;\n mNext = seq.next();\n }",
"public abstract void prepare(View view);",
"public void prepareSeqPessoa(ActionEvent event) {\n if (this.getSelected() != null && seqPessoaController.getSelected() == null) {\n seqPessoaController.setSelected(this.getSelected().getSeqPessoa());\n }\n }",
"@Override\n protected void prepare()\n throws CommandException, CommandValidationException {\n Set<ValidOption> opts = new LinkedHashSet<ValidOption>();\n addOption(opts, \"file\", 'f', \"FILE\", false, null);\n printPromptOption =\n addOption(opts, \"printprompt\", '\\0', \"BOOLEAN\", false, null);\n addOption(opts, \"encoding\", '\\0', \"STRING\", false, null);\n addOption(opts, \"help\", '?', \"BOOLEAN\", false, \"false\");\n commandOpts = Collections.unmodifiableSet(opts);\n operandType = \"STRING\";\n operandMin = 0;\n operandMax = 0;\n\n processProgramOptions();\n }",
"protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\t\n\t\t\tif (name.equals(\"Action\"))\n\t\t\t\tp_Action = para[i].getParameterAsString();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tp_Hospitalization_ID=getRecord_ID();\n\t}",
"public void inputPrev() {\n --this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"public PlayerChoicePick getNextPlayerChoicePick();",
"private void seekToInternal(SeekPosition seekPosition) throws ExoPlaybackException {\n long j;\n long j2;\n MediaSource.MediaPeriodId mediaPeriodId;\n boolean z;\n int i;\n Throwable th;\n long j3;\n long j4;\n this.playbackInfoUpdate.incrementPendingOperationAcks(1);\n Pair<Object, Long> resolveSeekPosition = resolveSeekPosition(seekPosition, true);\n if (resolveSeekPosition == null) {\n mediaPeriodId = this.playbackInfo.getDummyFirstMediaPeriodId(this.shuffleModeEnabled, this.window, this.period);\n j2 = -9223372036854775807L;\n j = -9223372036854775807L;\n z = true;\n } else {\n Object obj = resolveSeekPosition.first;\n long longValue = ((Long) resolveSeekPosition.second).longValue();\n MediaSource.MediaPeriodId resolveMediaPeriodIdForAds = this.queue.resolveMediaPeriodIdForAds(obj, longValue);\n if (resolveMediaPeriodIdForAds.isAd()) {\n j2 = 0;\n j = longValue;\n z = true;\n } else {\n j2 = ((Long) resolveSeekPosition.second).longValue();\n j = longValue;\n z = seekPosition.windowPositionUs == -9223372036854775807L;\n }\n mediaPeriodId = resolveMediaPeriodIdForAds;\n }\n try {\n if (this.mediaSource != null) {\n if (this.pendingPrepareCount <= 0) {\n if (j2 == -9223372036854775807L) {\n setState(4);\n i = 2;\n try {\n resetInternal(false, false, true, false, true);\n j3 = j2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(i);\n return;\n }\n return;\n } catch (Throwable th2) {\n th = th2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j2, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(i);\n }\n throw th;\n }\n } else {\n i = 2;\n if (mediaPeriodId.equals(this.playbackInfo.periodId)) {\n MediaPeriodHolder playingPeriod = this.queue.getPlayingPeriod();\n j4 = (playingPeriod == null || !playingPeriod.prepared || j2 == 0) ? j2 : playingPeriod.mediaPeriod.getAdjustedSeekPositionUs(j2, this.seekParameters);\n if (C.usToMs(j4) == C.usToMs(this.playbackInfo.positionUs)) {\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, this.playbackInfo.positionUs, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(2);\n return;\n }\n return;\n }\n } else {\n j4 = j2;\n }\n long seekToPeriodPosition = seekToPeriodPosition(mediaPeriodId, j4);\n z |= j2 != seekToPeriodPosition;\n j3 = seekToPeriodPosition;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n }\n }\n }\n }\n i = 2;\n this.pendingInitialSeekPosition = seekPosition;\n j3 = j2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n }\n } catch (Throwable th3) {\n th = th3;\n i = 2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j2, j);\n if (z) {\n }\n throw th;\n }\n }",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n\tpublic void prepare() {\n\t}",
"@Override\n public void inputHandling() {\n if (input.clickedKeys.contains(InputHandle.DefinedKey.ESCAPE.getKeyCode())\n || input.clickedKeys.contains(InputHandle.DefinedKey.RIGHT.getKeyCode())) { \n if (sourceMenu != null) {\n exit();\n sourceMenu.activate(); \n return;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.UP.getKeyCode())) { \n if (selection > 0) {\n selection--;\n }\n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.DOWN.getKeyCode())) { \n if (selection < choices.size() - 1) {\n selection++;\n } \n }\n \n if (input.clickedKeys.contains(InputHandle.DefinedKey.ENTER.getKeyCode())) {\n if (choices.size() > 0) {\n use();\n }\n exit(); \n }\n }",
"public void prepareGame() {\n setInitialPosition();\n\n //Check NickName\n boolean nickNameEstablished = checkNickName();\n if (!nickNameEstablished) {\n Intent intent = new Intent(this, NickNameActivity.class);\n startActivityForResult(intent, NICKNAME_ACTIVITY_REQUEST_CODE);\n } else {\n setDynamicBackground();\n }\n }",
"public static void QBack() {\n System.out.println(\"Do you have a favorite Quarterback? \");\n char qbQuestion= sc.next().charAt(0);\n }",
"public void prev() {\n\t\tsynchronized (this) {\n\t\t\tint pos = getPreShuffledPos();\n\t\t\tif (pos > 0) {\n\t\t\t\tmPlayPos = mPlayOrder[pos - 1];\n\t\t\t} else {\n\t\t\t\tmPlayPos = mPlayOrder[mPlayListLen - 1];\n\t\t\t}\n\t\t\tstop(false);\n\t\t\tprepareAndPlayCurrent();\n\t\t}\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"public void prepare() {\n\t}",
"private void askSpeechInput() {\n Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,\n RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, Locale.getDefault());\n intent.putExtra(RecognizerIntent.EXTRA_PROMPT,\n \"Hi speak something\");\n speakOut(\"Open Mic\");\n try {\n startActivityForResult(intent, REQ_CODE_SPEECH_INPUT);\n } catch (ActivityNotFoundException a) {\n\n }\n }",
"@Override\r\n\tpublic void visit(Choose choose)\r\n\t{\n\t\t\r\n\t}",
"private static char reserveOrGoBack() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter (r)eserve to place a reservation, \"\n\t + \"or (b)ack to go back: \");\n char option = input.next().toLowerCase().charAt(0);\n\n return option;\n }",
"@Nullable\n/* */ protected abstract Prompt acceptValidatedInput(@NotNull ConversationContext paramConversationContext, @NotNull Number paramNumber);",
"private void handleChoiceCallback(ChoiceCallback cc)\n throws IOException {\n System.out.print(cc.getPrompt());\n\n String[] strChoices = cc.getChoices();\n for(int j = 0; j < strChoices.length; j++) {\n System.out.print(\"choice[\" + j + \"] : \" + strChoices[j]);\n }\n System.out.flush();\n cc.setSelectedIndex(Integer.parseInt((new BufferedReader\n (new InputStreamReader(System.in))).readLine()));\n }",
"protected abstract void preparePresenter( PlaceRequest request, T presenter );",
"public Point movePoint(){\n\t\tSystem.out.println(\"Enter new zero point for figure\");\n\t\tthis.in = new Scanner(System.in);\n\t\tString temp = in.nextLine();\n\t\tString[] data = temp.trim().split(\" \");\n\t\tint a = Integer.parseInt(data[0]);\n\t\tint\tb = Integer.parseInt(data[1]);\n\t\tPoint p = new Point(a, b);\n\t\treturn p;\n\t}",
"public abstract BasicInput createInput( boolean isSeq ) throws IOException;",
"public void moveToSelected() {\n if (selectionX != -1) {\n // This short circuits but if it's not multiplayer the second statement will do nothing\n if (map.moveEntity(map.getCurrentTurnHero(), selectionX, selectionY) && multiplayerGameManager\n .hookPlayerMove(selectionX, selectionY)) {\n map.updateVisibilityArray();\n visionChanged = true;\n // See if this hero has moved on a position that meets any movement objectives\n gameState.updateMovementGoal(selectionX, selectionY);\n }\n }\n\n if (map.getCurrentTurnHero().getActionPoints() < 2) {\n nextTurn();\n }\n }",
"public void advance() {\n\t\tif(isFinalFrame(current)) {\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\"); // input sanitization if last frame (cant advance further )\n\t\t\t\n\t\t}\n\t\tif (!current.movesFinished()) { // input sanitization -- cant advance if the user hasnt exercised all the frames moves\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\");\n\t\t}\n\t\telse current = frames.get(frames.indexOf(current) + 1); // else updates the current frame to frame at next index. \n\t}",
"private void assignInitPos(String init) throws InputMismatchException {\n\t\tif(init.equals(UP)) {\n\t\t\tinitPos = UP;\n\t\t}else if(init.equals(DOWN)) {\n\t\t\tinitPos = DOWN;\n\t\t}else if(init.equals(LEFT)) {\n\t\t\tinitPos = LEFT;\n\t\t}else if(init.equals(RIGHT)) {\n\t\t\tinitPos = RIGHT;\n\t\t}else {\n\t\t\tthrow new InputMismatchException(\"There is no such initial filling position.\");\n\t\t}\n\t}",
"private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}",
"public void beginTakingPlayers() {\n currentQuestionIndex = 0;\n setGameState(GameState.AWAITING_PLAYERS);\n }",
"static void actionPrompt() {\n prompt:\n while (true) {\n String line = \"\";\n System.out.println(\"\\nWhat do you want to do: (S)ave, (F)ill, (L)ine, (V)isible, (Q)uit: \");\n while (line.length() < 1)\n line = scan.nextLine().toUpperCase();\n char action = line.charAt(0);\n switch (action) {\n case 'Q':\n break prompt;\n case 'V':\n visible(); break;\n case 'L':\n line(); break;\n case 'F':\n fill(); break;\n case 'S':\n save(); break;\n default:\n System.out.println(\"Not a valid command.\");\n }\n }\n }",
"public abstract void advance();",
"private void previousQuestion()\r\n {\r\n Intent question = new Intent(AnswerActivity.this, QuestionActivity.class);\r\n Bundle bundle = new Bundle();\r\n bundle.putIntArray(QuestionActivity.FLASH_CARD_ARRAY, intArray);\r\n bundle.putInt(QuestionActivity.NUMBER_OF_FLASH_CARDS, numberOfFlashCards);\n bundle.putBoolean(PREVIOUS_QUESTION, true); \r\n bundle.putInt(QuestionActivity.CURRENT_INDEX, currentIndex);\r\n question.putExtras(bundle);\r\n startActivity(question);\r\n overridePendingTransition(R.anim.fade, R.anim.hold);\n finish();\r\n }",
"void keySequencePassed();",
"public void setSelectionStrategy( IAnswerSelectionStrategy iass );",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"public void makeMove(){\n System.out.println(\"Player choose x or o.\");\n String chose = keyword.nextLine();\n int row;\n int column;\n if (chose.equals(\"x\")){\n System.out.println(\"Type coordenates for first move.\");\n System.out.println(\"Type row.\");\n row = keyword.nextInt();\n System.out.println(\"Type column.\");\n column = keyword.nextInt();\n getBoard(row, column, \"x\");\n }\n else if (chose.equals(\"o\")){\n System.out.println(\"Type coordenates for first move.\");\n System.out.println(\"Type row.\");\n row = keyword.nextInt();\n System.out.println(\"Type column.\");\n column = keyword.nextInt();\n getBoard(row, column, \"o\");\n }\n }",
"public void presetABC() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }",
"public static void main(String[] args) {\n char option;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Welcome to MG's adventure world. Now your journey begins. Good luck!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n String input = getInput(scan, \"Cc\");\n System.out.println(\"You are in a dead valley.\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You walked and walked and walked and you saw a cave!\");\n cave();\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You entered a cave!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"Unfortunately, you ran into a GIANT!\");\n giant();\n System.out.println(\"Enter 'A' or 'a' to Attack, 'E' or 'E' to Escape, ANYTHING else is to YIELD\");\n input = getInput(scan, \"AaEe\", 10);\n System.out.println(\"Congratulations! You SURVIVED! Get your REWARD!\");\n System.out.println(\"There are three 3 tressure box in front of you! Enter the box number you want to open!\");\n box();\n input = getInput(scan);\n System.out.println(\"Hero! Have a good day!\");\n }",
"public interface InputProvider {\n\n public Answer getNextInput();\n\n public Answer getNextInput(Question question);\n\n // Get a copy of the template\n // and replace the questions with the answers\n public void generate(File file) throws IOException;\n\n\n}",
"private void setUpQuestion() {\n if (index == questions.size()) {\n endgame();\n } else {\n currentQuestion = questions.get(index);\n\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"TestObject\");\n query.getInBackground(currentQuestion.getQuestion(), new GetCallback<ParseObject>() {\n public void done(ParseObject object, ParseException e) {\n if (e == null) {\n\n String NewQuestion = object.getString(\"question\");\n lblQuestion.setText(NewQuestion);\n expectedAnswer = object.getBoolean(\"answer\");\n imgPicture.setImageResource(currentQuestion.getPicture());\n index++;\n } else {\n }\n }\n }); // this pulls values from parse\n }\n }",
"static void processInput(int option){\n\t\t\n\t\tswitch (option){\n\t\t\tcase 1:\t\tlistMovies();\n\t\t\t\t\t\tbreak;\n\t\t\tcase 2:\t\tshowMovieDetails();\n\t\t\t\t\t\tbreak;\n\t\t\tcase 3:\t\taddMovie();\n\t\t\t\t\t\tbreak;\n\t\t\tcase 4:\t\taddExampleSet();\n\t\t\t\t\t\tbreak;\n\t\t\tcase 5:\t\texit();\n\t\t\t\t\t\tbreak;\n\t\t\tdefault: \tSystem.out.println(\"Wrong input\");\n\t\t\t\t\t\tbreak;\n\t\t}\n\t}",
"abstract void prepare();",
"@Override\n public String ask(String question) {\n return answers[position++];\n }",
"static void backtocheckpoint1_version2() {\n System.out.println(\"You arrived to the main entrance of challenge 1... Are you ready to restart this challenge?\");\n strings = responses.nextLine();\n if (strings.contains(\"n\")) {\n System.out.println(\"It's not an option\"); \n backtocheckpoint1_version2();\n }else if (strings.contains(\"y\")) { \n Door2challenge();\n }else {\n System.out.println(\"I don't understand...type it correctly\");\n backtocheckpoint1_version2();//in case the player types something else that the system can't read\n }\n \n \n \n }",
"public void prepare() {\n long millis, nanos;\n TestCaseImpl tc = _testCase;\n \n nanos = Util.currentTimeNanos();\n prepare(tc);\n nanos = Util.currentTimeNanos() - nanos;\n tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, \n Util.nanosToMillis(nanos));\n }",
"public Pinky(Vector2D position) {\n\t\tsuper(position);\n\t\tstartPos = position;\n\t\tsteps = 0;\n\t\tmode = 'c';\n\t\tpreviousChoice = position.toDirection();\n\t\t\n\t}",
"private void goZhuSuOrder(int position){\n\t}",
"public boolean initiateMovePrompt(MapPanel caller) {\n\t\tif(activePath == null || !pf.isValidPath(activePath))\n\t\t\treturn false;\n\t\tlog.log(\"Now prompting player for move.\");\n\t\tMapViewListener l = caller.getMapViewListener();\n\t\tl.setStatus(GameState.PLAYER_CONFIRMING_MOVE);\n\t\tattackableFromHere = canAttackFromDestination();\n\t\twithinRange = findSquaresWithinAtkRange();\n\t\tl.setMoveMenu(caller, attackableFromHere.size() != 0);\n\t\treturn true;\n\t}",
"public Sequence position(PrimArray arg, int shift) {\n\t/* IntegerVars cannot have default arguments */\n\tPrimIntegerArray numbers;\n\tnumbers = (PrimIntegerArray) arg;\n\tif (numbers == null) {\n\t\treturn Sequence.usingx(shift, (IntegerVarArray.zeros(0)));\n\t}\n\treturn Sequence.usingx(shift, ((PrimIntegerArray) numbers.copy()));\n/*\nudanax-top.st:15709:SequenceSpace methodsFor: 'making'!\n{Sequence CLIENT login} position: arg {PrimArray}\n\twith: shift {IntegerVar}\n\t\"Essential. A sequence using the given numbers and shift. Leading and trailing zeros will be stripped, and a copy will be made so that noone modifies it\"\n\t\"IntegerVars cannot have default arguments\"\n\t\n\t| numbers {PrimIntegerArray} |\n\tnumbers _ arg cast: PrimIntegerArray.\n\tnumbers == NULL ifTrue:\n\t\t[^Sequence usingx: shift with: (IntegerVarArray zeros: Int32Zero)].\n\t^Sequence usingx: shift with: (numbers copy cast: PrimIntegerArray)!\n*/\n}",
"public void managePlayOptions() {\n\n Object mySavedGameState = GameStateFileStore.ReadObjectFromFile(\"GameState.ser\");\n GameState castedGameState = GameState.class.cast(mySavedGameState);\n currentLocation = castedGameState.getSavedPlayerLocation();\n LocationData[][] storedGameStateMap = castedGameState.getMapState();\n descriptionText = storedGameStateMap[currentLocation.x][currentLocation.y].getDescriptionText();\n System.out.println(descriptionText);\n\n AvailableMovements myMoveSet = new AvailableMovements(currentLocation, storedGameStateMap);\n myMoveSet.printStringDirections();\n availableDirections = myMoveSet.getDirectionalMap();\n choice = sc.nextLine();\n if (availableDirections.containsKey(choice)) {\n currentLocation = availableDirections.get(choice); //refactor this into walkToNewLocation\n castedGameState.setSavedPlayerLocation(currentLocation);\n GameStateFileStore.WriteObjectToFile(castedGameState);\n managePlayOptions();\n } else {\n System.out.println(\"Invalid option\");\n managePlayOptions();\n }\n\n }",
"protected void hint() {\n if (preEnded)\n return;\n if (connectionCalculator == null)\n return;\n int hintIndex = connectionCalculator.hint(balls, gameBoard);\n MyPoint hintPos;\n int hintType;\n if (hintIndex >= 0) {\n hintPos = gameBoard.ballLogicalPositionOfIndex(hintIndex).clone();\n switch (gesture) {\n case Swap:\n hintPos.translate(0, -gameBoard.getBallRadius() * 2);\n hintType = SourceManagement.ArrowHint;\n break;\n case Rotate:\n hintType = SourceManagement.RotateHint;\n break;\n default:\n return;\n }\n } else {\n hintType = SourceManagement.ArrowHint;\n if (!flameItem.isEmpty()) {\n hintPos = flameItem.getLogicalPosition().clone();\n hintPos.translate(0, -flameItem.getRadius() * 2);\n } else if (!starItem.isEmpty()) {\n hintPos = starItem.getLogicalPosition().clone();\n hintPos.translate(0, -starItem.getRadius() * 2);\n } else {\n return;\n }\n }\n if (gameEffectAdapter != null)\n gameEffectAdapter.hintAt(hintPos, hintType);\n }",
"private void setquestion() {\n qinit();\n question_count++;\n\n if (modeflag == 3) {\n modetag = (int) (Math.random() * 3);\n } else {\n modetag = modeflag;\n }\n\n WordingIO trueword = new WordingIO(vocabulary);\n\n if (modetag == 0) {\n\n MCmode(trueword);\n }\n\n if (modetag == 1) {\n BFmode(trueword);\n }\n\n if (modetag == 2) {\n TLmode(trueword);\n }\n\n if (time_limit != 0) {\n timingtoanswer(time_limit, jLabel2, answer_temp, jLabel5, jLabel6, jButton1);\n }\n }",
"@Override\n void advance() {\n }"
] | [
"0.54467297",
"0.53702873",
"0.5266862",
"0.5266475",
"0.5162263",
"0.5093459",
"0.49901646",
"0.49893096",
"0.49799117",
"0.49429798",
"0.49429798",
"0.49429798",
"0.49429798",
"0.49361765",
"0.4875361",
"0.48585758",
"0.48406026",
"0.48296195",
"0.48135704",
"0.47978732",
"0.47468004",
"0.47285357",
"0.47189298",
"0.47154596",
"0.47139928",
"0.47097653",
"0.4694179",
"0.46939728",
"0.46878716",
"0.46827337",
"0.46827337",
"0.46694535",
"0.46652383",
"0.46601802",
"0.46514833",
"0.4650847",
"0.46459526",
"0.46456087",
"0.46447873",
"0.46437782",
"0.46349245",
"0.46308208",
"0.46307224",
"0.46265003",
"0.4602116",
"0.45989296",
"0.45968682",
"0.4593307",
"0.4589549",
"0.45882326",
"0.45872682",
"0.45836985",
"0.45785305",
"0.4561306",
"0.45606488",
"0.45602423",
"0.45594746",
"0.45583996",
"0.45542988",
"0.45474243",
"0.45436123",
"0.454292",
"0.4541971",
"0.45272708",
"0.45238873",
"0.44981527",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.4498052",
"0.44956303",
"0.44947731",
"0.44940436",
"0.44925255",
"0.44850537",
"0.44806287",
"0.44759023",
"0.44758314",
"0.44681576",
"0.44677633",
"0.44667348",
"0.44604707",
"0.4459863",
"0.44587356",
"0.44568726",
"0.44541475",
"0.4454051",
"0.4448282"
] | 0.0 | -1 |
Check an alternative to see whether to try the next one. | private boolean OK() {
return in == saves[save-1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean checkError() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n int a = seq.next();\n int b = in.next();\n if (a != b) {\n attempts++;\n return true;\n }\n }\n return false;\n }",
"default boolean isNext(int vidxa, int vidxb) {\n return findIndexOfNext(vidxa, vidxb) != -1;\n }",
"private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }",
"private boolean checkNext(){\n boolean ret = this.hasNext;\n if ((this.allStatesIterator.hasNext()) || (this.allSubsetsIterator.hasNext()) || (this.allTransitionsIterator.hasNext())){\n hasNext = true;\n return hasNext;\n }\n hasNext = false;\n return ret;\n }",
"boolean usesNext() {\n return next != null;\n }",
"public boolean retry() {\n return tries++ < MAX_TRY;\n }",
"abstract int nextTry(String guess);",
"protected abstract boolean computeHasNext();",
"public boolean possibleNextInput() {\n return _index < _input.length();\n }",
"private static boolean isAllowedNext(final ITranslator<?, ?, ?, ?, ?, ?> current,\r\n\t\t\tfinal ITranslator<?, ?, ?, ?, ?, ?> next) {\n\t\treturn current.getSourceExpressionClass() == next.getTargetExpressionClass()\r\n\t\t\t\t&& current.getSourceTraceElementClass() == next.getTargetTraceElementClass();\r\n\t}",
"@Override\n public boolean tryAdvance(LongConsumer action){\n Objects.requireNonNull(action);\n if(count==-2){\n action.accept(first);\n count=-1;\n return true;\n }else{\n return false;\n }\n }",
"protected boolean switchToNext()\n {\n if (_nextParserIndex < _parsers.length) {\n delegate = _parsers[_nextParserIndex++];\n return true;\n }\n return false;\n }",
"boolean requiresRestart(Operation nextBestOp) {\n\t\t\treturn nextBestOp.val == Integer.MAX_VALUE;\n\n\t\t}",
"public boolean next () throws Exception;",
"private boolean checkCrash (Location next)\n {\n if (next == null) {\n return true;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n\n LocationType type = next.getType();\n //println(getLocation(next).getType()+\" : \"+next);\n if (type == LocationType.POWERUP) {\n PowerUp p = getPowerUp(next);\n\n if (p != null) { // Basically a workaround for the NPE\n // if (ENABLE_SOUND) {\n // sfx.gainedPowerUp();\n // }\n addSpeed(1);\n speedTimer += (int) frameRate * 2;\n removePowerUp(p);\n }\n\n return false;\n }\n\n if ((type == LocationType.PLAYER || type == LocationType.WALL) ||\n (next.getY() != last.getY() && (direction == LEFTKEY || direction == RIGHTKEY)) ||\n (next.getX() != last.getX() && (direction == UPKEY || direction == DOWNKEY))) { // This is to prevent bike from wrapping around edge of grid, because grid is a 1d array\n //sfx.lostALife(); //Commented out because you hear a shrill sound at the end for some reason\n return true;\n }\n\n return false;\n }",
"public Boolean isNextOk() {\n if (!isInputValid()) {\n return Boolean.FALSE;\n }\n createReservations();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n } else {\n switch (extractFeatureSet()) {\n case FREE:\n createGuestProfile();\n if (containsInputErrors()) {\n return Boolean.FALSE;\n }\n break;\n case PREMIUM:\n break;\n default:\n throw Assert.createUnreachable(\"Unknown feature set {0}.\",\n extractFeatureSet());\n }\n }\n return Boolean.TRUE;\n }",
"public abstract boolean isNextBlocked();",
"public boolean prepareNextAd() {\n boolean retVal = false;\n\n if (tozAdCampaign.size() <= 1) return (retVal);\n\n AppyAdService.getInstance().debugOut(TAG,\"Preparing next Ad... indexes: current=\"+curAd+\", next=\"+nextAd+\", base=\"+baseAd+\", last=\"+lastAd+\", repeatCycle=\"+repeatCycle);\n\n if ((repeatCycle != null) && (repeatCycle < 0)) return (false);\n\n if (curAd < lastAd) {\n nextAd = curAd + 1;\n retVal = true;\n AppyAdService.getInstance().debugOut(TAG,\"Prepared next Ad... next=\"+nextAd);\n }\n else if ((curAd == lastAd) && (curAd != baseViewIndex)) {\n nextAd = baseViewIndex;\n retVal = true;\n AppyAdService.getInstance().debugOut(TAG,\"Prepped next Ad... next=\"+nextAd+\" (Set to base view index, pending repeat cycle check.)\");\n if (repeatCycle != null) {\n repeatCycle--;\n if (repeatCycle < 0) {\n if (finalViewIndex != null) {\n if (finalViewIndex > lastAd) finalViewIndex = lastAd;\n if (finalViewIndex < 0) finalViewIndex = 0;\n nextAd = finalViewIndex;\n AppyAdService.getInstance().debugOut(TAG,\"Prepared next Ad... next=\"+nextAd+\" (Set to final view index)\");\n }\n }\n }\n }\n\n return (retVal);\n }",
"public boolean next() throws StandardException;",
"public void cantPlayGoNext() {\n\t switchTurn();\n }",
"private boolean checkRetryPolicy4Next() {\n\t\ttry {\n\t\t\tRetryPolicy policy = BackupService.getInstance().getRetryPolicy(CommonService.RETRY_BACKUP);\n\t\t\tNextScheduleEvent nextScheduleEvent = BackupService.getInstance().getNextScheduleEvent();\n\t\t\tif (nextScheduleEvent != null) {\n\t\t\t\tDate nextDate = nextScheduleEvent.getDate();\n\t\t\t\tjava.util.Calendar incomingBackup = getUTCNow();\n\t\t\t\tincomingBackup.setTimeInMillis(nextDate.getTime());\n\n\t\t\t\tjava.util.Calendar now = getUTCNow();\n\t\t\t\tnow.add(java.util.Calendar.MINUTE, policy.getNearToNextEvent());\n\n\t\t\t\tif (now.after(incomingBackup)) {\n\t\t\t\t\tlogger.debug(\"dealWithMissedBackup() - end with too near to next event\");\n\t\t\t\t\tString time = BackupConverterUtil.dateToString(nextDate);\n\t\t\t\t\tBackupService\n\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t.getNativeFacade()\n\t\t\t\t\t\t\t.addLogActivity(\n\t\t\t\t\t\t\t\t\tConstants.AFRES_AFALOG_WARNING,\n\t\t\t\t\t\t\t\t\tConstants.AFRES_AFJWBS_JOB_RETRY,\n\t\t\t\t\t\t\t\t\tnew String[] {\n\t\t\t\t\t\t\t\t\t\t\tWebServiceMessages.getResource(Constants.RETRYPOLICY_FOR_MISSED_SKIPPED_NEXT, time,\n\t\t\t\t\t\t\t\t\t\t\t\t\tWebServiceMessages.getResource(Constants.RETRYPOLICY_FOR_MISSED)), \"\", \"\", \"\", \"\" });\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (ServiceException e) {\n\t\t\tlogger.error(\"dealWithMissedBackup() - end\", e);\n\t\t}\n\t\treturn true;\n\t}",
"private void check2(){\n \n // All methods past the first rule check to see\n // if errorCode is still 0 or not; if not skips respective method\n if(errorCode == 0){\n \n if (!(fourthDigit == fifthDigit + 1)){\n valid = false;\n errorCode = 2;\n }\n }\n\t}",
"public static boolean isAlternative(String fieldPropAltName, String altName) {\n\t\tif (altName.length() == 0) {\n\t\t\t// No alternative, therefore no alternative separator\n\t\t\treturn fieldPropAltName.indexOf(ALT_SEP) < 0;\n\t\t}\n\n\t\t// We're looking for an alternative\n\t\tString altSuffix = ALT_SEP + altName;\n\t\treturn fieldPropAltName.endsWith(altSuffix);\n\t}",
"public void checkPairsAndNextStep() {\r\n\t\tsetPairs();\r\n\t\tif (this.criticalPairs != null || this.criticalPairGraGra != null) {\r\n\t\t\tthis.stepPanel.setStep(StepPanel.STEP_FINISH);\r\n\t\t\tthis.nextButton.setText(\"Finish\");\r\n\t\t\tif (this.criticalPairs != null) {\r\n\t\t\t\tthis.criticalPairGraGra = null;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public boolean tryAdvance(Consumer<? super SampleDescriptor> action) {\n boolean retVal;\n if (pos < samples.size()) {\n // Here we have another sample to process.\n retVal = true;\n action.accept(samples.get(pos));\n pos++;\n } else {\n // Denote we are at the end.\n retVal = false;\n }\n return retVal;\n }",
"@Override\n public boolean tryAdvance(DoubleConsumer action){\n Objects.requireNonNull(action);\n if(count==-2){\n action.accept(first);\n count=-1;\n return true;\n }else{\n return false;\n }\n }",
"private boolean canIGenerateNextRound() {\n\t\tint totalRounds = mTournament.getTotalRounds();\n\t\tint currentRouns = mTournament.getRounds().size();\n\n\t\tList<Integer> roundNumbers = new ArrayList<>();\n\t\tfor (ChesspairingRound round : mTournament.getRounds()) {\n\t\t\tif (roundNumbers.contains(round.getRoundNumber())) {\n\t\t\t\t// you have 2 rounds with the same id\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\troundNumbers.add(round.getRoundNumber());\n\t\t}\n\n\t\tif (currentRouns < totalRounds) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean nextItem();",
"void goToNext(boolean isCorrect);",
"public static boolean hasAlternative(final Context context) {\n return getAlternative(context) != null;\n }",
"public static boolean hasAlternative(final Context context) {\n return getAlternative(context) != null;\n }",
"private boolean mustTryConnection(int iteration) {\n\t\t\n\t\t//the goal is to not to retry so often when several attempts have been made\n\t\t//the first 3 attemps, will not retry (give time for the system to startup)\n\t\tif (iteration < ITERATIONS_WITHOUT_RETRIES) {\n\t\t\t//here it will enter with iteration 0..2\n\t\t\treturn false;\n\t\t}\n\t\tif (iteration < ITERATIONS_WITH_NORMAL_RATE) {\n\t\t\t//Here it will enter with iteration 3..40\n //Retry every 2 attempts.\n\t\t\t//in iteration 6, 8, 10, 12, 14\n\t\t\treturn iteration % STEPS_AT_NORMAL_RATE == 0;\n\t\t}\n\t\t//between 15 and 40 attempts, only retry every 10 steps\n\t\tif (iteration < ITERATIONS_WITH_MEDIUM_RATE) {\n\t\t\t//here it will enter with iteration 10, 20, 30\n\t\t\treturn iteration % STEPS_AT_MEDIUM_RATE == 0;\n\t\t}\n\t\t\n\t\t//after 40 attempts, retry every 100 * MIN_INTERVAL\n\t\treturn iteration % STEPS_AT_SLOW_RATE == 0;\n\t}",
"private boolean isWrong() {\n\t\treturn wrongMatches >= 5;\n\t}",
"public void testNext() {\r\n System.out.println(\"next\");\r\n \r\n PartialCombinationIterator instance = null;\r\n Iterator<int[]> iterator = null;\r\n try {\r\n iterator = new PartialCombinationIterator(TestConstants.twoThreeFourValidReactionScheme, TestConstants.twoThreeFourNumRGroups, TestConstants.twoThreeFourNumLinkers, TestConstants.twoThreeFourNumBuildingBlocks);\r\n } catch (ReactionSchemeException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n } catch (SmiLibIOException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n } catch (SmiLibException ex) {\r\n ex.printStackTrace();\r\n fail(\"Unexpected exception was thrown: \" + ex.getMessage());\r\n }\r\n \r\n int counter = 0;\r\n while (iterator.hasNext()) {\r\n int[] virtualReaction = iterator.next();\r\n assertTrue(counter + \": \" + Arrays.toString(expectedVirtualReactions[counter]) + \" == \" + Arrays.toString(virtualReaction), Arrays.equals(expectedVirtualReactions[counter], virtualReaction));\r\n counter++;\r\n }\r\n \r\n assertEquals(expectedVirtualReactions.length, counter);\r\n }",
"public static void checkAndClickNextButtonTriviaMode() {\r\n\t\tcheckNoSuchElementExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"btnnext\", \"\\\"Next\\\" button in trivia mode\");\r\n\t}",
"public abstract boolean isNextVisited();",
"private @Nullable\n Future<FeedType> loadNext(final AtomicReference<OptionType<URI>> next_ref) {\n final OptionType<URI> next_opt = next_ref.get();\n if (next_opt.isSome()) {\n final Some<URI> next_some = (Some<URI>) next_opt;\n final URI next = next_some.get();\n\n final Pair<ListenableFuture<FeedType>, URI> in_loading = this.loading.get();\n if (in_loading == null) {\n LOG.debug(\"no feed currently loading; loading next feed: {}\", next);\n return this.loadNextActual(next);\n }\n\n final URI loading_uri = in_loading.getRight();\n if (!loading_uri.equals(next)) {\n LOG.debug(\"different feed currently loading; loading next feed: {}\", next);\n return this.loadNextActual(next);\n }\n\n LOG.debug(\"already loading next feed, not loading again: {}\", next);\n }\n\n return null;\n }",
"protected boolean isAcceptableAfter(double offeredutil, Bid lnextBid)\n\t\t\tthrows Exception {\n\t\treturn offeredutil >= utilitySpace.getUtility(lnextBid);\n\t}",
"private boolean nextWorkorder() {\n\t\treturn Console.readString(\" Any other workorder? (y/n) \").equalsIgnoreCase(\"y\");\n\t}",
"private boolean skipToNext() throws IOException {\r\n short p = 0;\r\n\r\n while (p < RIFF_PATTERN.length) {\r\n int bRaw = source.read();\r\n byte b = (byte) bRaw;\r\n\r\n if (bRaw == EOF) return false;\r\n\r\n if (b == RIFF_PATTERN[p]) {\r\n p++;\r\n } else {\r\n p = 0;\r\n if (b == RIFF_PATTERN[0]) p++;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public abstract boolean next();",
"public abstract boolean next();",
"public boolean needTryAgain() {\n boolean z = this.mRetryConnectCallAppAbilityCount < 6;\n this.mRetryConnectCallAppAbilityCount++;\n return z;\n }",
"@Test\n public void nextTest() {\n this.it.next();\n this.it.next();\n assertThat(\"work3\", is(this.it.next()));\n }",
"@Override\n public Possible<T> or(Possible<T> alternate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n return self.isPresent() || alternate.isPresent();\n }\n\n @Override\n public T get() {\n if (self.isPresent()) {\n try {\n return self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent, fall through\n }\n }\n return alternate.get();\n }\n };\n }",
"public boolean checkWalkStep(int lastX, int lastY, int nextX, int nextY) {\n return true;\n }",
"@Override\n public boolean tryAdvance(IntConsumer action){\n Objects.requireNonNull(action);\n if(count==-2){\n action.accept(first);\n count=-1;\n return true;\n }else{\n return false;\n }\n }",
"@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }",
"static boolean E() {\n int save = next;\n if (E1()) return true;\n next = save; if (E2()) return true;\n next = save; if (E3()) return true;\n next = save; if (E4()) return true;\n next = save;\n return false;\n }",
"public boolean retry(ITestResult result) {\n\t\tif (counter < retryMaxLimit) {\n\t\t\tcounter++;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean tryAgainOnEOF()\n\t{\n\t\treturn false;\n\t}",
"boolean next() throws IOException;",
"private int correctOption(final String options, final int lastOption) {\n\n// Take int value by user thorough command line\n int option;\n\n// Count the iterations of while loop and show the options again to the user if user has chosen wrong option.\n int loop = 0;\n\n while (true) {\n\n System.out.println(options);\n option = scanner.nextInt();\n\n// If the input is in between the range specified, just break the loop and return the value\n if (option <= lastOption && option > 0)\n break;\n\n// If the attempts exceed close the resources and return -1 value which will close the program\n if (loop >= 2) {\n option = -1;\n break;\n } else\n System.err.println(\"\\nPlease select correct option\");\n\n loop++;\n }\n return option;\n }",
"public static boolean getNextJob() {\n\n\t\t// If jobsChosen == numPeople, that means we have to back up\n\t\tif (jobsChosen == numPeople) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// if we the last chosen job is at the end of the row, we have to back\n\t\t// up\n\t\tif (jobsChosen != 0) {\n\t\t\tif (currentCombo[jobsChosen - 1] == numPeople) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// We are good to get the next Job, try each job left to right until we\n\t\t// find a valid one\n\t\tfor (int i = 0; i < numPeople; i++) {\n\t\t\tif (isValid(i)) {\n\t\t\t\tcurrentCombo[jobsChosen] = i;\n\t\t\t\tjobsChosen++;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"boolean jumpPossible() {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n if (jumpPossible(k)) {\n return true;\n }\n }\n return false;\n }",
"private boolean checkCurrentIterator(Iterator<Integer> iter) {\n return iter != null;\n }",
"private boolean isValidOption(int option){\n return (option >= 0) && (option < this.count());\n }",
"private boolean sendTryTwice(byte[] head, byte[] chunk) {\n for (int action = 0; action < 2; action++) {\n if (send0(head, chunk)) {\n return true;\n }\n }\n return false;\n }",
"public abstract boolean shouldResolve(int i);",
"public boolean advance_lookahead() {\r\n this.lookahead_pos++;\r\n if (this.lookahead_pos < error_sync_size()) {\r\n return true;\r\n }\r\n return false;\r\n }",
"protected boolean hasNextStep() {\n\t\treturn iteration == 0;\n\t}",
"@Override\n\tpublic boolean canMoveToNext() {\n\t\treturn true;\n\t}",
"private static void askForContinue() {\n\t\t\t\n\t\t}",
"void tryToFindNextKing()\n {\n if (nodeIds.size() != 0)\n {\n int nextKingId = Collections.max(nodeIds);\n CommunicationLink nextKing = allNodes.get(nextKingId);\n nextKing.sendMessage(new Message(\n Integer.toString(nextKingId), nextKing.getInfo(), myInfo, KING_IS_DEAD));\n }\n }",
"public boolean isExhausted() {\n return this.mIterationShowCounter >= this.mMaxAdsPerIteration;\n }",
"public abstract void nextGuessResult(ResultPegs resultPegs);",
"private boolean _seqHasNext() {\n // If the ISPSeqComponent's builder has a next configuration, then the\n // observation has a next sequence too.\n if (_seqBuilder == null)\n return false;\n\n // Does the current seq builder have next\n if (_seqBuilder.hasNext())\n return true;\n\n // The current seq builder has no more are there more seqbuilders?\n _seqBuilder = _getTopLevelBuilder(_seqBuilderIndex + 1);\n if (_seqBuilder == null)\n return false;\n _seqBuilderIndex++;\n\n // Now reset the new seq builder run\n _doReset(_options);\n\n // Now that it has been moved, try again\n return _seqHasNext();\n }",
"private boolean switchFailoverWithDNS() throws Throwable {\n \t// switch failover\n \t// ping from master\n \t// switch failback\n \t// ping from master\n \treturn (setupAPCScript() &&\n \t\t\tpingFromMaster(hostname) &&\n \t\t\tapcCommand(1, \"Off\") &&\n \t\t\tpingFromMaster(hostname) &&\n \t\t\tapcCommand(1, \"On\") &&\n \t\t\tpingFromMaster(hostname));\n\t}",
"private boolean canChooseDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof Draw2Card) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }",
"public synchronized boolean next() throws IOException {\n\t\treturn next(true);\n\t}",
"protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}",
"public String getNextAnswer() {\r\n\t\t// Condition for getting the exact possible answers for the current question.\r\n\t\tif (counterAns < possibleAnswers.size()) {\r\n\t\t\tnextAnswer = possibleAnswers.get(counterAns).getPossibleAnswer();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the exact answers for the following question.\r\n\t\t\tcounterAns++;\r\n\t\t}\r\n\t\treturn nextAnswer;\r\n\t}",
"boolean nextStep();",
"@Test\n\tpublic void testNext() {\n\t\tIntArrayIterator instance = createIterator();\n\t\tboolean[] expResults = new boolean[] { true, true, true, true, true, true, false };\n\t\tboolean result = false;\n\t\tboolean exceptionResult = false;\n\t\t\n\t\t// iterate over the underlying array, testing proper\n\t\t// results for each iteration against the iterator\n\t\tfor(int i = 0; i <= testData.length; ++i) {\n\t\t\tresult = instance.hasNext();\n\t\t\tassertEquals(expResults[i], result);\n\n\t\t\ttry {\n\t\t\t\tint value = instance.next();\n\t\t\t\tassertEquals(testData[i], value);\n\t\t\t}\n\t\t\tcatch (NoSuchElementException e) {\n\t\t\t\t// on last iteration, next() should throw\n\t\t\t\tassertEquals(testData.length, i);\n\t\t\t\texceptionResult = true;\n\t\t\t}\n\t\t}\n\t\tassertEquals(true, exceptionResult);\n\t}",
"private void checkForMissingEpisodes(){\n\t\tcheckForMissingEpisodes(null, null);\n\t}",
"private boolean canChooseWildDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof WildDrawCard) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }",
"@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }",
"private void checkInlineQueries() throws Exceptions.OsoException, Exceptions.InlineQueryFailedError {\n Ffi.Query nextQuery = ffiPolar.nextInlineQuery();\n while (nextQuery != null) {\n if (!new Query(nextQuery, host).hasMoreElements()) {\n String source = nextQuery.source();\n throw new Exceptions.InlineQueryFailedError(source);\n }\n nextQuery = ffiPolar.nextInlineQuery();\n }\n }",
"@Override\n\tpublic boolean retry(ITestResult result) \n\t{\n\t\treturn false;\n\t}",
"private void badMatch() {\n\t\tArrayList<Integer> faceValues = new ArrayList<Integer>();\n\t\tInteger firstSelectableCardPos = null;\n\t\t\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\t\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tint face = thisCard.getCard();\n\t\t\tfaceValues.add(face);\n\t\t\t\n\t\t\t// can't select all cards\n\t\t\tif (thisCard.isLocked() || thisCard.getVisible()) {\n\t\t\t\tcontinue;\n\t\t\t} else if (firstSelectableCardPos == null) {\n\t\t\t\tfirstSelectableCardPos = card;\n\t\t\t}\n\t\t\t\n\t\t\t// if this is a different card, select the bad pair\n\t\t\tif (faceValues.get(firstSelectableCardPos) != face) {\n\t\t\t\tsolo.clickOnImage(firstSelectableCardPos);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\tpublic boolean wasRetried()\n\t\t{\n\t\t\treturn false;\n\t\t}",
"private static void check (int expected) {\n\t\tif (sym == expected) scan(); // if verified,read next\n\t\telse error(TokenCodes.tokenName[expected]+\"expected\" );\n\t\t}",
"@Test\n\tpublic void nextAttemptSecond() {\n\t\tMockito.when(mockBowlingGameController.isLastFrame()).thenReturn(false);\n\t\tMockito.when(mockBowlingGameController.getCurrentFrame()).thenReturn(bowler.getFrames().get(0));\n\t\tFrame frame = bowler.getFrames().get(0);\n\t\tframe.setFirstAttempt(5);\n\t\tif (!frame.isLastFrame()) {\n\t\t\tAssert.assertEquals(Attempt.SECOND, mockBowlingGameController.nextAttempt(Attempt.FIRST));\n\t\t}\n\t}",
"private void checkAsk(FyQuestion q, FyAnswer a) {\n\t\treturn;\r\n\t}",
"public static void advanceDealer() {\r\n\t\t//Advances when current dealer is player1.\r\n\t\tif (Main.curDealer.equals(Main.player1)) {\r\n\t\t\tMain.curDealer = Main.player2;\r\n\t\t\tMain.dealerIsPlayer1 = false;\r\n\t\t\tMain.dealerIsPlayer2 = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//Advances when current dealer is player2.\r\n\t\tif (Main.curDealer.equals(Main.player2)) {\r\n\t\t\tMain.curDealer = Main.player3;\r\n\t\t\tMain.dealerIsPlayer2 = false;\r\n\t\t\tMain.dealerIsPlayer3 = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//Advances when current dealer is player3.\r\n\t\tif (Main.curDealer.equals(Main.player3)) {\r\n\t\t\tMain.curDealer = Main.player1;\r\n\t\t\tMain.dealerIsPlayer3 = false;\r\n\t\t\tMain.dealerIsPlayer1 = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//For advancing the dealer when playing a four handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\t//Advances when current dealer is player3.\r\n \t\t\tif (Main.curDealer.equals(Main.player3)) {\r\n\t\t\t\tMain.curDealer = Main.player4;\r\n\t\t\t\tMain.dealerIsPlayer3 = false;\r\n\t\t\t\tMain.dealerIsPlayer4 = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n \t\t\t//Advances when current dealer is player4.\r\n\t\t\tif (Main.curDealer.equals(Main.player4)) {\r\n\t\t\t\tMain.curDealer = Main.player1;\r\n\t\t\t\tMain.dealerIsPlayer4 = false;\r\n\t\t\t\tMain.dealerIsPlayer1 = true;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void checkAnswer(String input) {\n\t\tif(counter==0)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"moo\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==1)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"neigh\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==2)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"oink\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==3)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"baa\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\tif(counter==4)\n\t\t{\n\t\t\tif(input.toLowerCase(Locale.getDefault()).equals(\"quack\"))\n \t{\n \t\tresume();\n \t}\n \telse\n \t{\n \t\twrong();\n \t}\n\t\t}\n\t\t\n\t}",
"private static Point chooseNextPos(Point currPos, Point droneNextDes, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre, List<List<List<Point>>> noFlyZonesCoords, Point previous1, Point previous2) throws IOException, InterruptedException {\r\n\t\tvar possibleNextPos = possibleNextPos(currPos, coord1, coord2, buildingSideGrad, buildingCentre);\r\n\t\tvar nextPosTemp1 = possibleNextPos.get(0);\r\n\t\tvar nextPosTemp2 = possibleNextPos.get(1);\r\n\t\t\r\n\t\tvar euclidDist1 = euclidDist(droneNextDes, nextPosTemp1); \r\n\t\tvar euclidDist2 = euclidDist(droneNextDes, nextPosTemp2);\r\n\t\t\r\n\t\tPoint nextPos = droneNextDes;\r\n\t\t\r\n\r\n\t\t//in the case that both directions result in no intersection, \r\n\t\t//it chooses the one that minimises the distance between the drone's next position and desired position \r\n\t\t//and doesn't result in the drone going back and fourth continuously \r\n\t\tif(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==true && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==true) {\r\n\t\t\tvar repeatedMoveDir1 = false; //in the case that previous1 and previous2 are null\r\n\t\t\tvar repeatedMoveDir2 = false;\r\n\t\t\tif(previous1!=null && previous2!=null) {\r\n\t\t\t\trepeatedMoveDir1 = computeDir(previous2, previous1)==computeDir(currPos, nextPosTemp1); //next move is equal to 2 moves before, indicating repeated move\r\n\t\t\t\trepeatedMoveDir2 = computeDir(previous2, previous1)==computeDir(currPos, nextPosTemp2);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(euclidDist1<euclidDist2 && repeatedMoveDir1==false || repeatedMoveDir2==true) {\r\n\t\t\t\tnextPos = nextPosTemp1;\r\n\t\t\t}\r\n\t\t\tif(repeatedMoveDir1==true || euclidDist2<euclidDist1 && repeatedMoveDir2==false){\r\n\t\t\t\tnextPos = nextPosTemp2;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==true && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==false) {\r\n\t\t\tnextPos = nextPosTemp1;\r\n\t\t}\r\n\t\telse if(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==false && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==true) { //\r\n\t\t\tnextPos = nextPosTemp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\treturn nextPos;\r\n\t}",
"private Boolean checkCycle() {\n Node slow = this;\n Node fast = this;\n while (fast.nextNode != null && fast.nextNode.nextNode != null) {\n fast = fast.nextNode.nextNode;\n slow = slow.nextNode;\n if (fast == slow) {\n System.out.println(\"contains cycle\");\n return true;\n }\n }\n System.out.println(\"non-cycle\");\n return false;\n }",
"private static Boolean errorCheck(String Buffer){\n if(Buffer.matches(\"Y\")) return true;\n if(Buffer.matches(\"N\")) return false;\n screenClear(); //Clears the screen and applies an error message.\n return moreInput(); //Recursive repeat upon error.\n }",
"public static boolean doTestsPass()\r\n {\r\n\r\n boolean result = true;\r\n result = result && FindMin(new int[]{3,4,5,6,1,2}) == 1;\r\n result = result && FindMin(new int[]{2,1}) == 1;\r\n result = result && FindMin(new int[]{1}) == 1;\r\n\r\n try {\r\n FindMin(null);\r\n result = false;\r\n }\r\n catch(Exception e)\r\n {\r\n result = result && true;\r\n }\r\n\r\n if(result)\r\n {\r\n System.out.println(\"All tests pass\\n\");\r\n }\r\n else\r\n {\r\n System.out.println(\"There are test failures\\n\");\r\n }\r\n return result;\r\n }",
"public void testConjunctionFailsToResolveWhenFirstPathFails() throws Exception\n {\n resolveAndAssertFailure(new String[] { \"h\", \"f :- g, h\" }, \"?- f\");\n }",
"public static void ChooseNextPlayer () {\n do {\r\n\r\n // MOVE TO THE NEXT PLAYER\r\n next_player++;\r\n\r\n // IF WE MOVED TOO FAR, WRAP AROUND TO ZERO\r\n if (next_player >= player_count)\r\n next_player = 0;\r\n\r\n } while (player[next_player].lost);\r\n\r\n }",
"@Test\n public void testListIteratorNext(){\n DoubleLinkedList<Integer> list1 = new DoubleLinkedList<Integer>();\n ListIterator<Integer> list1It = list1.iterator();\n try{\n list1It.next();\n fail(\"expected a NoSuchElementException to be thrown\");\n }\n catch(NoSuchElementException error){\n assertEquals(error.getMessage(), \"There is no next element in the list\");\n }\n list1It.add(1);\n list1It.previous();\n assertEquals(\"testing with an element in the next spot\", new Integer(1), list1It.next());\n }",
"public boolean hasNext()\r\n/* 30: */ {\r\n/* 31:36 */ return this.nextResult != null;\r\n/* 32: */ }",
"public static void checkAndClickNextButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t\tcheckElementNotInteractableExceptionByID(\"nextquest\", \"\\\"Next\\\" button\");\r\n\t}",
"public boolean retry(ITestResult result) {\n //You could mentioned maxRetryCnt (Maximiun Retry Count) as per your requirement. Here I took 2, If any failed testcases then it runs two times\n int maxRetryCnt = 1;\n if (retryCnt < maxRetryCnt) {\n System.out.println(\"Retrying \" + result.getName() + \" again and the count is \" + (retryCnt+1));\n retryCnt++;\n return true;\n }\n return false;\n }",
"public boolean isRetry();",
"private SuggestionBehaviors chooseBehavior(String nlQuestion,\n Interpretations interpretations,\n SuggestionParams params,\n String concreteLang) throws GrammarLookupFailure {\n\n boolean continuePossible = params.isEnableContinue() && nlQuestion.endsWith(CONTINUE_HINT);\n boolean alterPossible = params.isEnableAlter() && !nlQuestion.endsWith(CONTINUE_HINT);\n\n SuggestionBehaviors result = SuggestionBehaviors.DoNotSuggest;\n\n for (Interpretation interpretation : interpretations.getInterpretations()) {\n List<NameResult> nameTypes = interpretation.getNameResults();\n String template = templateCandidate(nlQuestion, nameTypes);\n List<TreeResult> suggestRules = grammarSuggester.suggestRules(\n template, concreteLang, nameTypes, 1, false, 0);\n\n if (suggestRules.isEmpty()) {\n continue;\n }\n\n Suggestion bestSuggestion = getBestLinearization(suggestRules.get(0).getLinearizations(),\n interpretation, interpretations.getWordTypes(), false);\n\n // the query is complete: give alter or continue suggestions if enabled\n if (template.trim().equalsIgnoreCase(bestSuggestion.getText().trim())\n && interpretations.isAllNamesComplete()) {\n if (continuePossible) {\n result = SuggestionBehaviors.Continue;\n }\n else if (alterPossible) {\n result = SuggestionBehaviors.Alter;\n }\n else {\n if (result != SuggestionBehaviors.Continue && result != SuggestionBehaviors.Alter) {\n result = SuggestionBehaviors.ReturnOriginal;\n }\n }\n }\n //the query is invalid or partial: give correct/complete suggestions\n else if (result == SuggestionBehaviors.DoNotSuggest) {\n result = SuggestionBehaviors.CorrectComplete;\n }\n }\n\n return result;\n }",
"private boolean attempt2GetPlayerFromHomeSucceds(Player player)\n {\n boolean blu = false;\n boolean red = false;\n boolean green = false;\n boolean yellow = false;\n if (player.getSteps_moved() == 0 && getValue_from_die() == 6)\n {\n if (getPerson_to_play() == 1)\n {\n blu = try2GetBluePlayerFromHome(player);\n if (blu)\n {\n BlueEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 2)\n {\n red = try2GetRedPlayerFromHome(player);\n if (red)\n {\n RedEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 3)\n {\n green = try2GetGreenPlayerFromHome(player);\n if (green)\n {\n GreenEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 4)\n {\n yellow = try2GetYellowPlayerFromHome(player);\n if (yellow)\n {\n YellowEatsPlayer(player);\n }\n }\n\n\n if (blu || red || green || yellow)\n {\n value_from_die = 0;\n ludo.setDrawScoreAllowed(false);\n playPlayerHasMovedMusic();\n return true;\n }\n }\n return false;\n }",
"public static void checkPlayer()\n\t{\n\t\ttry {\n\t\t\t\n\t\t\tscenarioResults = new String[127];\n\t\t\tArrayList<Integer> differences = new ArrayList<Integer>();\n\t\t\t//set scenarioResults to current result or player's bracket when not impossible\n\t\t\tfor(int i=0; i < 127; i++)\n\t\t\t{\n\t\t\t\tif(i < nextMatch){\n\t\t\t\t\tscenarioResults[i] = results[i];\n\t\t\t\t}else{\n\t\t\t\t\t//check if a pick has been disqualified by previous results. \n\t\t\t\t\t//If it is still possible, assume it happens, else add the match number to the list to iterate through.\n\t\t\t\t\tif(isValid(allPicks.get(checkIndex)[i],i)){\n\t\t\t\t\t\tscenarioResults[i] = allPicks.get(checkIndex)[i];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tscenarioResults[i] = \"\";\n\t\t\t\t\t\tdifferences.add(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if there aren't any matches to check specifically (i.e. no picked winners that lost in previous rounds)\n\t\t\t//\tjust check to see if they win if everything breaks right.\n\t\t\tif(differences.size() == 0)\n\t\t\t{\n\t\t\t\tif(outputScenarioWinner(\"any combination+\"))\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//find later round matches to iterate through, where the player is already guaranteed to be wrong\n\t\t\t\twrongMatches = new int[differences.size()];\n\n\n\t\t\t\tfor(int i = 0; i < wrongMatches.length; i++)\n\t\t\t\t{\n\t\t\t\t\twrongMatches[i] = differences.get(i).intValue();\n\t\t\t\t}\n\n\t\t\t\t//recurse through results, checking from left-most first. When you reach the end of the list of matches, check scores\n\t\t\t\t//\tand print the winner for the given combination.\n\t\t\t\tboolean isAlive = checkPlayerHelper(0,\"\");\n\n\t\t\t\t//if player is the winner, end execution\n\t\t\t\tif(isAlive)\n\t\t\t\t{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is ALIVE\");\n\t\t\t\t}else{\n\t\t\t\t\twriter.write(\"\\t\"+entrants[checkIndex]+\" is DEAD\");\n\t\t\t\t\tSystem.out.println(entrants[checkIndex]);\n\t\t\t\t}\n\t\t\t}\n\t\t\twriter.write(\"\\n\");\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"problem with output\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"private boolean selectedPieceHasNextMove(Position startingPosition) {\n\t\treturn false;\n\t}"
] | [
"0.60124695",
"0.57963103",
"0.5791183",
"0.56886035",
"0.558876",
"0.55725014",
"0.5531937",
"0.5503956",
"0.54718345",
"0.54173344",
"0.54141384",
"0.54112625",
"0.53409314",
"0.53206104",
"0.52640724",
"0.5254351",
"0.52466947",
"0.521114",
"0.5206918",
"0.52022594",
"0.51943195",
"0.51788574",
"0.51784706",
"0.51703185",
"0.5158571",
"0.51209277",
"0.51190853",
"0.51184714",
"0.511835",
"0.51128286",
"0.51128286",
"0.50823414",
"0.5059506",
"0.50427437",
"0.50063026",
"0.50036144",
"0.49956515",
"0.49861175",
"0.49838442",
"0.49803287",
"0.49783796",
"0.49783796",
"0.4965481",
"0.49613276",
"0.49571505",
"0.49520752",
"0.4935715",
"0.49311537",
"0.49292243",
"0.49172807",
"0.49086034",
"0.48992866",
"0.48853418",
"0.48845217",
"0.48641062",
"0.4854184",
"0.48493302",
"0.48392516",
"0.4833621",
"0.48200077",
"0.48189312",
"0.4818245",
"0.4814175",
"0.4810283",
"0.48099256",
"0.48023796",
"0.4794922",
"0.4793301",
"0.4791768",
"0.47841272",
"0.47715044",
"0.47689736",
"0.47686672",
"0.4765276",
"0.4762573",
"0.47498104",
"0.47453117",
"0.47285196",
"0.47270137",
"0.4723722",
"0.47226244",
"0.47129908",
"0.47093758",
"0.46948108",
"0.46935",
"0.4693328",
"0.46926755",
"0.4691941",
"0.46879625",
"0.46870714",
"0.46862853",
"0.46842653",
"0.46810365",
"0.46776512",
"0.46772355",
"0.46690264",
"0.4664996",
"0.46635777",
"0.46562895",
"0.4656262",
"0.4654443"
] | 0.0 | -1 |
Pop a saved position, and return the result of a choice. | private boolean ALT(boolean b) {
--save;
return b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int pop() {\n if (storeStack.isEmpty()) {\n return 0;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n int oppo = assistStack.pop();\n\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n return oppo;\n }",
"public ShapeCommand pop() {\r\n\t\tShapeCommand temp = this.items.get(this.items.size()-1);\r\n\t\tthis.items.remove(this.items.size()-1);\r\n\t\treturn temp;\r\n\t}",
"public TYPE pop();",
"public int pop();",
"public int pop() {\n peek();\n return right.pop();\n }",
"public String pop()\n {\n int next = prefs.getLastHintNumber() + 1;\n if (next >= hints.length) return null;\n\n prefs.updateLastHint(next, DateUtils.getToday());\n return hints[next];\n }",
"public int pop() throws IllegalStateException {\n if(isEmpty())\n throw new IllegalStateException();\n else\n {\n int tmp = top.getValue();\n top = top.getNext();\n sz--;\n return tmp;\n }\n }",
"private final Object pop() {\r\n\t\treturn eval_stack.remove(eval_stack.size() - 1);\r\n\t}",
"public Object pop() {\n Object valueToReturn = this.peek();\n this.collection.remove(this.collection.size()-1);\n return valueToReturn;\n }",
"public String pop();",
"public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}",
"public void pop();",
"public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}",
"@Override\n public E pop() {\n E result = peek();\n storage[ top-- ] = null;\n return result;\n\n }",
"public int pop() {\n\t return q.poll();\n\t }",
"public static String pop() {\n String take = list.get((list.size())-1);\n list.remove((list.size())-1);\n return take;\n }",
"@Override\n\tpublic int pop() {\n\t\treturn 0;\n\t}",
"public Object pop();",
"public int pop() {\n return q.poll();\n }",
"private void pop() {\r\n pop( false );\r\n }",
"public int pop() {\n int res= q1.remove();\n if (!q1.isEmpty())\n top = q1.peek();\n return res;\n }",
"public int pop() {\n\t\tpeek();\n\t\treturn output.pop();\n\t}",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public T pop();",
"public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }",
"public void popState();",
"public T pop() {\n\t\tT value = peek();\n\t\tstack.remove(value);\n\t\treturn value;\n\t}",
"public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }",
"@Override\r\n public T pop (){\r\n T elemento= (T) miLista.get(posicion-1);\r\n miLista.remove(posicion-1);\r\n posicion--;\r\n return elemento;\r\n }",
"public abstract Object pop();",
"public int pop() {\n q1.remove();\n int res = top;\n if (!q1.isEmpty()) {\n top = q1.peek();\n }\n return res;\n }",
"private synchronized BackStep pop() {\r\n\t\t\tBackStep bs;\r\n\t\t\tbs = stack[top];\r\n\t\t\tif (size == 1) {\r\n\t\t\t\ttop = -1;\r\n\t\t\t} else {\r\n\t\t\t\ttop = (top + capacity - 1) % capacity;\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\treturn bs;\r\n\t\t}",
"public Object pop() {\n\t\tif(this.isEmpty())\n throw new IllegalStateException(\"Stack is empty\");\n return items.remove(items.size() - 1);\n\t}",
"public int pop() {\n Integer poll = q1.poll();\n return poll == null ? -1 : poll;\n }",
"public int pop() {\n peek();\n return stack2.pop();\n }",
"public int pop() { return 0; }",
"public int pop() throws IllegalStateException {\n if (size == 0)\n throw new IllegalStateException(\"Empty stack\");\n int last = data[size-1];\n size--;\n return last;\n }",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public E pop();",
"public T pop() {\n \tT retVal = stack.get(stack.size() - 1); // get the value at the top of the stack\n \tstack.remove(stack.size() - 1); // remove the value at the top of the stack\n \treturn retVal;\n }",
"public int pop() {\n return One.poll();\n }",
"T pop(){\n\tif(m.size() == 0){\n\t throw new NoSuchElementException();\n\t}\n\tT answer = m.remove(0);\n\treturn answer;\n }",
"public int pop() {\n peek();\n return frontStack.pop();\n }",
"int pop();",
"int pop();",
"int pop();",
"int pop();",
"int pop();",
"public Coordinate pop(){\r\n if (empty()) {\r\n throw new EmptyStackException();\r\n }\r\n Coordinate temp = arr[size - 1];\r\n size--;\r\n return temp;\r\n }",
"public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}",
"public String pop() \r\n\t {\r\n\t if (top<0) \r\n\t {\r\n\t System.out.println(\"There is no letter in the message to delete\");\r\n\t return null;\r\n\t }\r\n\t else \r\n\t {\r\n\t \tString x = msg[top--]; //top-- is the top next next when the type of the first first time type\r\n\t \treturn x;\r\n\t }\r\n\t }",
"public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }",
"public int pop() {\n\t\tif (isEmpty())\n\t\t\treturn NEGATIVE_ONE;\n\t\tint ret = last.value;\n\t\tlast = last.prev;\n\t\treturn ret;\n\t}",
"public Object pop() {\n if (isEmpty())\n throw new EmptyStackException();\n\n Object value = peek();\n collection.remove(collection.size() - 1);\n return value;\n }",
"public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }",
"public T pop() {\n\t\treturn (T) this.deck.pop();\n\t}",
"public int pop(){\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\tswap(0,size()-1);\n\t\t\tPair p=heap.remove(size()-1);\n\t\t\tlocation.remove(p.element);\n\t\t\tpushDownRoot();\n\t\t\treturn (int) p.element;\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic String pop() {\n\t\tString last = vector.get(vector.size()-1);\r\n\t\tvector.remove(vector.size()-1);\r\n\t\treturn last;\r\n\t}",
"public Session pop() {\r\n\t\tint oldIndex = index;\r\n\t\tif (index >= 0) {\r\n\t\t\tindex--;\r\n\t\t\treturn stack[oldIndex];\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public void pop() {\n s.pop();\n }",
"public void back()\n {\n if(!moveRooms.empty()){\n currentRoom = moveRooms.pop();\n look();\n } \n }",
"@Nullable\n public Integer pop() {\n if(mIndex == -1){\n System.out.println(\"Error poping\");\n return null;\n }\n Integer temp = mArray[mIndex--];\n System.out.println(\"Pop \" + String.valueOf(temp) + \" from mArray[\" + String.valueOf((mIndex + 1)) + \"]\");\n return temp;\n }",
"abstract void pop();",
"public final Object pop()\n {\n synchronized (this.stack)\n {\n return this.stack[--this.pointer];\n }\n }",
"Object pop();",
"public Object pop() {\r\n\t\treturn al.removeElementAt(al.listSize - 1);\r\n\t}",
"public T pop() {\n return this.list[this.size-1];\n }",
"public int pop() {\n\t\treturn list.remove(list.size() - 1);\n\t}",
"public E pop () {\n\t\treturn stack.remove( stack.size()-1 );\t\t\n\t}",
"public Card pop()\n\t{\n\t\tint last = size() - 1;\n\t\tCard tempCard = card.get(last);\n\t\tcard.remove(last);\n\t\treturn tempCard;\n\t}",
"public int pop() {\n q1.pop();\n q2.push(q1.pop());\n return q1.pop();\n }",
"T pop();",
"T pop();",
"T pop();",
"public int pop() {\n if (!popStack.isEmpty()) {\n return popStack.pop();\n }\n shift();\n return popStack.pop();\n }",
"public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}",
"public int pop() {\n return stack.pop();\n }",
"@Override\n public T pop() {\n if (!isEmpty()) {\n T data = backing[size - 1];\n backing[size - 1] = null;\n size--;\n return data;\n } else {\n throw new NoSuchElementException(\"The stack is empty\");\n }\n }",
"public void popToPointer() {\n while (this.size() > undoPointer + 1) {\n super.pop();\n }\n }",
"public int pop() {\n return stack.pop();\n }",
"public E pop(){\n return this.stack.remove(stack.size()-1);\n }",
"public int pop() {\n return popStack.pop();\n }",
"@Override\n\tpublic Object pop() {\n\t\tif(this.vector.isEmpty()) throw new PilaVuota();\n\t\treturn this.vector.remove(this.vector.size()-1);\t\t\n\t}",
"public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }",
"public Item pop() {\n\t\tif (N < arr.length/4)\n\t\t\tresize (arr.length/2);\n\t\tItem s = arr[--N];\n\t\tarr[N] = null;\n\t\treturn s;\n\t}",
"public int pop() {\n return list.poll();\n }",
"@Override\r\n\tpublic E pop() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\tE answer = stack[t];\r\n\t\tstack[t] = null; // dereference to help garbage collection\r\n\t\tt--;\r\n\t\treturn answer;\r\n\t}",
"private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }",
"@Override\n public E pop() throws EmptyStackException{\n \n if(!isEmpty()){\n count--;\n E eval = stackArray[count];\n stackArray[count] = null;\n return eval;\n }\n \n else \n throw new EmptyStackException();\n }",
"public ExParValue pop() {\r\n\t\tExParValue v = null;\r\n\t\tif (value.next != null) {\r\n\t\t\tv = value;\r\n\t\t\tvalue = value.next;\r\n\t\t\t// System.out.println(\"ExPar.pop() Popping \" + v.toString() +\r\n\t\t\t// \" now on top: \" + value.toString());\r\n\t\t} else {\r\n\t\t\tnew ParameterValueError(\"ExPar.pop() without preceding push()\");\r\n\t\t}\r\n\t\t/*\r\n\t\t * if (value == null) {\r\n\t\t * System.out.println(\"ExPar.pop(): Value stack empty.\"); } else if\r\n\t\t * (value.next == null) {\r\n\t\t * System.out.println(\"ExPar.pop(): A single value is on the stack: \" +\r\n\t\t * value.toString()); } else {\r\n\t\t * System.out.println(\"ExPar.pop(): Value stack: \" + value.toString() +\r\n\t\t * \", \" + value.next.toString()); }\r\n\t\t */\r\n\t\treturn (v);\r\n\t}",
"public int pop() {\n int value = top.value;\n top = top.pre;\n top.next = null;\n size--;\n return value;\n }",
"public Object pop() {\n return stack.pop();\n }"
] | [
"0.6682881",
"0.6624522",
"0.6618015",
"0.65904224",
"0.6568526",
"0.65293354",
"0.6528542",
"0.6518888",
"0.6484496",
"0.6483976",
"0.64738697",
"0.64232767",
"0.639721",
"0.63962394",
"0.63958853",
"0.63882345",
"0.6372165",
"0.637135",
"0.636193",
"0.63441557",
"0.6342614",
"0.63258284",
"0.6317245",
"0.6317245",
"0.6317245",
"0.6317245",
"0.6317245",
"0.6317245",
"0.6317245",
"0.6317245",
"0.63137203",
"0.63070154",
"0.62961537",
"0.6291073",
"0.6288577",
"0.6281073",
"0.6279271",
"0.6274993",
"0.62598467",
"0.62570924",
"0.62501925",
"0.6245473",
"0.62434596",
"0.623944",
"0.623944",
"0.623944",
"0.623944",
"0.623944",
"0.62351215",
"0.6232573",
"0.6218143",
"0.6215625",
"0.6205231",
"0.6205231",
"0.6205231",
"0.6205231",
"0.6205231",
"0.6203887",
"0.6198058",
"0.6190898",
"0.6189683",
"0.61843437",
"0.6173115",
"0.616978",
"0.6164446",
"0.6152165",
"0.61519086",
"0.61342734",
"0.61332875",
"0.6120331",
"0.6109134",
"0.61021614",
"0.6101487",
"0.6096258",
"0.6079632",
"0.6069619",
"0.6066283",
"0.6059259",
"0.6053128",
"0.6050476",
"0.6043426",
"0.6043426",
"0.6043426",
"0.6042621",
"0.6041947",
"0.6036246",
"0.602319",
"0.60213566",
"0.6019716",
"0.6018551",
"0.6017842",
"0.6009766",
"0.6008215",
"0.60076797",
"0.60071325",
"0.60036635",
"0.5998983",
"0.59947264",
"0.59934574",
"0.5990263",
"0.5989898"
] | 0.0 | -1 |
After parsing x in x?, pop saved position, and adjust the result. | private boolean OPT(boolean b) {
--save;
return b || in == saves[save];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int popX() {\n\t\tif(x.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint xint = x.get(0);\n\t\tx.remove(0);\n\t\treturn xint;\n\t}",
"private void dec_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() - 1); }\n }",
"public void resetCurrX() {\n currX = getStartX;\n }",
"@Override\n\tpublic void incrementPop(int x) {\n\t\t\n\t}",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n input.backup(number);\n //zzMarkedPos -= number;\n }",
"public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}",
"@Override\n\tpublic void decrementPop(int x) {\n\t\t\n\t}",
"public void setX(int x){ xPosition = x; }",
"public int popY() {\n\t\tif(y.size() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint yint = y.get(0);\n\t\ty.remove(0);\n\t\treturn yint;\n\t}",
"private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }",
"private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }",
"void setFirstValueFreeAt(int x, int y) {\n \tboolean tr = false;\n \tif (state[--y][--x] == 'X') {\n \t\tstate[y][x] = '.';\n \t\tfor (int i = 0; i < state.length && !tr; i++) {\n\t\t\t\tfor (int j = 0; j < state[0].length && !tr; j++) {\n\t\t\t\t\tif (state[i][j] == '.' && i != y && j != x) {\n\t\t\t\t\t\tstate[i][j] = 'X';\n\t\t\t\t\t\ttr = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t}\n \tsetValueFreeAt(++x, ++y);\n }",
"public static int getOrigX() {\n return 1;\n }",
"void setX(int x) {\n position = position.setX(x);\n }",
"void setX(int newX) {\n this.xPos = newX;\n }",
"public int getX() { return position.x; }",
"private int findPos(String x) {\n\t int offset = 1;\n\t int currentPosition = myhash(x);\n\t \n\t while (array[currentPosition] != null && !array[currentPosition].element.getContent().equals(x)) {\n\t currentPosition += offset; // Compute ith probe\n\t offset += 2;\n\t if(currentPosition >= array.length)\n\t currentPosition -= array.length;\n\t }\n\t \n\t return currentPosition;\n\t }",
"public Builder clearPositionX() {\n bitField0_ = (bitField0_ & ~0x00000040);\n positionX_ = 0D;\n onChanged();\n return this;\n }",
"protected int toPixelEndX(int x) {\r\n\t\t// todo: maybe this can be optimized...\r\n\t\tint first = toPixelX(x);\r\n\t\tint next = toPixelX(x + 1);\r\n\t\tif (first == next) {\r\n\t\t\treturn first;\r\n\t\t}\r\n\t\treturn next - 1;\r\n\t}",
"public Builder clearPositionX() {\n bitField0_ = (bitField0_ & ~0x00000004);\n positionX_ = 0D;\n onChanged();\n return this;\n }",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }",
"public static int getNewX() {\n\t\treturn newX;\n\t}",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public void yypushback(int number) {\r\n if ( number > yylength() )\r\n zzScanError(ZZ_PUSHBACK_2BIG);\r\n\r\n zzMarkedPos -= number;\r\n }",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"public int getX(){ return xPosition; }",
"public Builder clearPositionX() {\n bitField0_ = (bitField0_ & ~0x00000008);\n positionX_ = 0D;\n onChanged();\n return this;\n }",
"protected abstract int getXOffset();",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void yypushback(int number) {\n if ( number > yylength() )\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"public void popToPointer() {\n while (this.size() > undoPointer + 1) {\n super.pop();\n }\n }",
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }",
"public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}",
"public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }",
"void removeHasXCoordinate(Object oldHasXCoordinate);",
"public int getXOffset();",
"public void setPreviousPosition(int xPos) {\n\t\tthis.previousPosition = xPos;\n\t}",
"public void yypushback(int number) {\n\t\tif ( number > yylength() )\n\t\t\tzzScanError(ZZ_PUSHBACK_2BIG);\n\n\t\tzzMarkedPos -= number;\n\t}",
"public void yypushback(int number) {\n if (number > yylength())\n zzScanError(ZZ_PUSHBACK_2BIG);\n\n zzMarkedPos -= number;\n }",
"private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"private final void yyResetPosition() {\n zzAtBOL = true;\n zzAtEOF = false;\n zzCurrentPos = 0;\n zzMarkedPos = 0;\n zzStartRead = 0;\n zzEndRead = 0;\n zzFinalHighSurrogate = 0;\n yyline = 0;\n yycolumn = 0;\n yychar = 0L;\n }",
"public int getTheXPosition(int x){\n\t\t\tif(x==5 || x==13 || x==21 || x==29){\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if(x==1 || x==9 || x==17 || x==25){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse if(x==6 || x==14 || x==22 || x==30){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\telse if(x==2 || x==10 || x==18 || x==26){\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t\telse if(x==7 || x==15 || x==23 || x==31){\n\t\t\t\treturn 4;\n\t\t\t}\n\t\t\telse if(x==3 || x==11 || x==19 || x==27){\n\t\t\t\treturn 5;\n\t\t\t}\n\t\t\telse if(x==8 || x==16 || x==24 || x==32){\n\t\t\t\treturn 6;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn 7;\n\t\t\t}\t\t\n\t}",
"public int getxPosition() {\n\t\treturn xPosition;\n\t}",
"public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}",
"public int pop() {\n\t\tpeek();\n\t\treturn output.pop();\n\t}",
"public void removeNumber(int x, int y) {\r\n\t\tupdateMoves();\r\n\t\tsetOpenTiles(getOpenTiles() + 1);\r\n\t\tint[][] temp = getGameBoard();\r\n\t\tboolean[][] tempX = getXValues();\r\n\t\tboolean[][] tempY = getYValues();\r\n\t\ttempX[x][temp[y][x]] = tempY[y][temp[y][x]] = false;\r\n\t\ttemp[y][x] = 0;\r\n\t\tsetXValues(tempX);\r\n\t\tsetYValues(tempY);\r\n\t\tsetGameBoard(temp);\r\n\t}",
"public void push(int x) {\n // 将 popStack 中数据导入 pushStack\n while (!popStack.isEmpty()) {\n pushStack.push(popStack.pop());\n }\n // 压入 x\n pushStack.push(x);\n // 将数据导回 popStack\n while (!pushStack.isEmpty()) {\n popStack.push(pushStack.pop());\n }\n\n }",
"public int getX() { return x; }",
"public int getX() { return x; }",
"public int getX() { return x; }",
"public float reverseEngineerX(float x) {\r\n\t\treturn x + this.getXPos();\r\n\t}",
"private void deleteFixup(Node<K, V> x) {\n\t\t\n\t}",
"public String withoutX(String str) {\r\n if (str.length() > 0 && str.charAt(0) == 'x') {\r\n str = str.substring(1);\r\n }\r\n\r\n if (str.length() > 0 && str.charAt(str.length() - 1) == 'x') {\r\n str = str.substring(0, str.length() - 1);\r\n }\r\n return str;\r\n }",
"public boolean decrementX()\n {\n return setPosition(this.position.getXPosition() - 1, this.position.getYPosition());\n }",
"@java.lang.Override\n public long getX() {\n return x_;\n }",
"protected int getX() {\n\t\treturn x;\n\t}",
"public void push(int x) { //全部放到第一个\n temp1.push(x);\n }",
"public void updateXLoc();",
"org.apache.xmlbeans.XmlInt xgetRawOffset();",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}"
] | [
"0.62953466",
"0.5749937",
"0.5424686",
"0.5401831",
"0.5370099",
"0.5350128",
"0.53278035",
"0.5261455",
"0.5203054",
"0.5170893",
"0.5170893",
"0.51312894",
"0.5114617",
"0.50739",
"0.5024695",
"0.5022538",
"0.5011434",
"0.501102",
"0.5006476",
"0.5003387",
"0.49911243",
"0.49872223",
"0.49870402",
"0.49870402",
"0.49870402",
"0.49870402",
"0.49870402",
"0.49819905",
"0.49793357",
"0.49790925",
"0.4966653",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4966553",
"0.4946682",
"0.49459422",
"0.49459422",
"0.49459422",
"0.49432236",
"0.49355587",
"0.49342445",
"0.4932746",
"0.4920106",
"0.4916454",
"0.49079287",
"0.490472",
"0.49026808",
"0.4899968",
"0.48985088",
"0.4885267",
"0.48852614",
"0.48812336",
"0.4879831",
"0.48782134",
"0.4870687",
"0.4867664",
"0.4867664",
"0.4867664",
"0.48668474",
"0.48634192",
"0.48502913",
"0.48461112",
"0.48461014",
"0.48433894",
"0.48349905",
"0.4828548",
"0.48263735",
"0.4807658"
] | 0.0 | -1 |
Backtrack to saved position, and return result of lookahead. | private boolean HAS(boolean b) {
in = saves[--save];
return b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected Token lookahead() {\n return m_current;\n }",
"private int forwardPosition() {\n\t\treturn (position + 1) % (maxPosition + 1);\n\t}",
"public void testRewind() {\n System.out.println(\"rewind\");\n BufferedCharSequence instance = null;\n BufferedCharSequence expResult = null;\n BufferedCharSequence result = instance.rewind();\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 }",
"public boolean isLookahead() {\n\n return this.isLookahead;\n }",
"public void restart_lookahead() throws Exception {\r\n for (int i = 1; i < error_sync_size(); i++) {\r\n Symbol[] symbolArr = this.lookahead;\r\n symbolArr[i - 1] = symbolArr[i];\r\n }\r\n this.cur_token = scan();\r\n this.lookahead[error_sync_size() - 1] = this.cur_token;\r\n this.lookahead_pos = 0;\r\n }",
"private synchronized BackStep peek() {\r\n\t\t\treturn stack[top];\r\n\t\t}",
"public Double peekAhead(int in);",
"public void read_lookahead() throws Exception {\r\n this.lookahead = new Symbol[error_sync_size()];\r\n for (int i = 0; i < error_sync_size(); i++) {\r\n this.lookahead[i] = this.cur_token;\r\n this.cur_token = scan();\r\n }\r\n this.lookahead_pos = 0;\r\n }",
"public boolean advance_lookahead() {\r\n this.lookahead_pos++;\r\n if (this.lookahead_pos < error_sync_size()) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private char peek() {\n return regEx.charAt(0);\n }",
"Position<T> before(Position<T> p) throws IllegalStateException;",
"private int backwardPosition() {\n\t\tif(getPosition() > 0) {\n\t\t\treturn getPosition() - 1;\n\t\t} else {\n\t\t\treturn getMaxPosition();\n\t\t}\n\t}",
"private void rewind() {\n currentPos = markPos;\n }",
"private void findPrev() {\n \tthis.find(false);\n }",
"@Override\n\tpublic T peek() {\n\n\t\tT result = stack[top-1];\n\t\treturn result;\n\t}",
"public String findForward() {\n\t\t\tString result=\"\";\n\t\t\treturn result ;\n\t\t}",
"Position<T> after(Position<T> p) throws IllegalStateException;",
"public E peekBack();",
"private void doAsTopOfStack() {\n int activePos = pos + inputUsed;\n int leftoverLength = length - inputUsed;\n\n if (rule.rhs.length == rhsUsed) { // rule exhausted\n if (leftoverLength == 0) { // input exhausted\n TD.knownRuleGoals.recordParsing(this);\n TD.dottedGoalStack.pop();\n ((RuleGoal)this).doWorkAfterDone();\n TD.dottedGoalStack.push(this);\n }\n } else {\n Symbol rhsAtDot = rule.rhs[rhsUsed];\n if (leftoverLength > 0) {\n Symbol inputAtDot = TD.input.symbolAt(activePos);\n if (rhsAtDot.equals(inputAtDot)) doWorkAfterMatch(1);\n }\n for (int len = 0; len <= leftoverLength; len++)\n (new Goal(rhsAtDot, activePos, len)).doWork();\n }\n }",
"public IClause back() {\n if (back==front)\n throw new BufferUnderflowException();\n\n return tab[back];\n }",
"public BacktrackingTokenizerMark mark() {\n\t\treturn new BacktrackingTokenizerMark(tokens, position);\n\t}",
"public Point previous(Point point)\n {\n assert(_index >= 0);\n assert(_index < _pattern.length);\n\n apply(point);\n\n // Don't need to code defensively. Long live assertions.\n if (--_index == -1) _index = _pattern.length - 1;\n\n return point;\n }",
"public void parse_lookahead(boolean z) throws Exception {\r\n this.lookahead_pos = 0;\r\n if (z) {\r\n debug_message(\"# Reparsing saved input with actions\");\r\n debug_message(\"# Current Symbol is #\" + cur_err_token().sym);\r\n debug_message(\"# Current state is #\" + ((Symbol) this.stack.peek()).parse_state);\r\n }\r\n Object obj = null;\r\n while (!this._done_parsing) {\r\n short s = get_action(((Symbol) this.stack.peek()).parse_state, cur_err_token().sym);\r\n if (s > 0) {\r\n cur_err_token().parse_state = s - 1;\r\n cur_err_token().used_by_parser = true;\r\n if (z) {\r\n debug_shift(cur_err_token());\r\n }\r\n this.stack.push(cur_err_token());\r\n this.tos++;\r\n if (!advance_lookahead()) {\r\n if (z) {\r\n debug_message(\"# Completed reparse\");\r\n return;\r\n }\r\n return;\r\n } else if (z) {\r\n debug_message(\"# Current Symbol is #\" + cur_err_token().sym);\r\n }\r\n } else if (s < 0) {\r\n int i = (-s) - 1;\r\n Symbol do_action = do_action(i, this, this.stack, this.tos);\r\n short[][] sArr = this.production_tab;\r\n short s2 = sArr[i][0];\r\n short s3 = sArr[i][1];\r\n if (z) {\r\n debug_reduce(i, s2, s3);\r\n }\r\n for (int i2 = 0; i2 < s3; i2++) {\r\n this.stack.pop();\r\n this.tos--;\r\n }\r\n short s4 = get_reduce(((Symbol) this.stack.peek()).parse_state, s2);\r\n do_action.parse_state = s4;\r\n do_action.used_by_parser = true;\r\n this.stack.push(do_action);\r\n this.tos++;\r\n if (z) {\r\n debug_message(\"# Goto state #\" + ((int) s4));\r\n }\r\n obj = do_action;\r\n } else if (s == 0) {\r\n report_fatal_error(\"Syntax error\", obj);\r\n return;\r\n }\r\n }\r\n }",
"protected char tokenLookAhead () throws TableFunctionMalformedException {\r\n\t\tint originalIndex = this.index;\r\n\t\tchar originalLook = this.look;\r\n\t\tString originalValue = new String(this.value);\r\n\t\tString originalNoCaseChangeValue = new String(this.noCaseChangeValue);\r\n\t\tchar originalToken = this.token;\r\n\t\tchar returnedToken = ' ';\r\n\t\t\r\n\t\tthis.scan();\r\n\t\t\r\n\t\treturnedToken = this.token;\t// this value will be the return value\r\n\t\t\r\n\t\t// revert global attributes\r\n\t\tthis.index = originalIndex;\r\n\t\tthis.look = originalLook;\r\n\t\tthis.value = originalValue;\r\n\t\tthis.noCaseChangeValue = originalNoCaseChangeValue;\r\n\t\tthis.token = originalToken;\r\n\t\t\r\n\t\treturn returnedToken;\r\n\t\t\r\n\t}",
"public void stepForward() {\n\t\tposition = forwardPosition();\n\t}",
"public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }",
"private int previousChar()\n {\n if (m_bufferOffset_ >= 0) {\n m_bufferOffset_ --;\n if (m_bufferOffset_ >= 0) {\n return m_buffer_.charAt(m_bufferOffset_);\n }\n else {\n // At the start of buffer, route back to string.\n m_buffer_.setLength(0);\n if (m_FCDStart_ == 0) {\n m_FCDStart_ = -1;\n m_source_.setIndex(0);\n return UCharacterIterator.DONE;\n }\n else {\n m_FCDLimit_ = m_FCDStart_;\n m_source_.setIndex(m_FCDStart_);\n return previousChar();\n }\n }\n }\n int result = m_source_.previous();\n int startoffset = m_source_.getIndex();\n if (result < LEAD_ZERO_COMBINING_CLASS_FAST_LIMIT_\n || m_collator_.getDecomposition() == Collator.NO_DECOMPOSITION\n || m_FCDStart_ <= startoffset || m_source_.getIndex() == 0) {\n return result;\n }\n int ch = m_source_.previous();\n if (ch < FULL_ZERO_COMBINING_CLASS_FAST_LIMIT_) {\n // if previous character is FCD\n m_source_.next();\n return result;\n }\n // Need a more complete FCD check and possible normalization.\n if (!FCDCheckBackwards(result, startoffset)) {\n normalizeBackwards();\n m_bufferOffset_ --;\n result = m_buffer_.charAt(m_bufferOffset_);\n }\n else {\n // fcd checks always reset m_source_ to the limit of the FCD\n m_source_.setIndex(startoffset);\n }\n return result;\n }",
"public int previous()\n {\n if (m_source_.getIndex() <= 0 && m_isForwards_) {\n // if iterator is new or reset, we can immediate perform backwards\n // iteration even when the offset is not right.\n m_source_.setToLimit();\n updateInternalState();\n }\n m_isForwards_ = false;\n if (m_CEBufferSize_ > 0) {\n if (m_CEBufferOffset_ > 0) {\n return m_CEBuffer_[-- m_CEBufferOffset_];\n }\n m_CEBufferSize_ = 0;\n m_CEBufferOffset_ = 0;\n }\n\n int result = NULLORDER;\n char ch = 0;\n do {\n int ch_int = previousChar();\n if (ch_int == UCharacterIterator.DONE) {\n return NULLORDER;\n }\n ch = (char)ch_int;\n if (m_collator_.m_isHiragana4_) {\n m_isCodePointHiragana_ = (ch >= 0x3040 && ch <= 0x309f);\n }\n if (m_collator_.isContractionEnd(ch) && !isBackwardsStart()) {\n result = previousSpecial(m_collator_, CE_CONTRACTION_, ch);\n }\n else {\n if (ch <= 0xFF) {\n result = m_collator_.m_trie_.getLatin1LinearValue(ch);\n }\n else {\n result = m_collator_.m_trie_.getLeadValue(ch);\n }\n if (RuleBasedCollator.isSpecial(result)) {\n result = previousSpecial(m_collator_, result, ch);\n }\n if (result == CE_NOT_FOUND_) {\n if (!isBackwardsStart()\n && m_collator_.isContractionEnd(ch)) {\n result = CE_CONTRACTION_;\n }\n else {\n if(RuleBasedCollator.UCA_ != null) {\n result = RuleBasedCollator.UCA_.m_trie_.getLeadValue(ch);\n }\n }\n\n if (RuleBasedCollator.isSpecial(result)) {\n if(RuleBasedCollator.UCA_ != null) { \n result = previousSpecial(RuleBasedCollator.UCA_, result, ch);\n }\n }\n }\n }\n } while (result == IGNORABLE && ch >= 0xAC00 && ch <= 0xD7AF);\n if(result == CE_NOT_FOUND_) {\n result = previousImplicit(ch);\n }\n return result;\n }",
"public int peek();",
"public TPDestination rewind() {\r\n if (stack.isEmpty()) { return null; }\r\n TPDestination tp = stack.remove(0);\r\n plugin.getServer().getPlayer(name).teleport(tp.getLocation());\r\n sendLocalizedString(\"teleport.tpback\", getName());\r\n return tp;\r\n }",
"public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }",
"public int peekRear();",
"public int peek() {\n int result;\n while(!stack.isEmpty()){\n cache.add(stack.removeLast());\n }\n result = cache.getLast();\n while(!cache.isEmpty()){\n stack.add(cache.removeLast());\n }\n System.out.println(result);\n return result;\n }",
"public void testPosition() {\n System.out.println(\"position\");\n BufferedCharSequence instance = null;\n int expResult = 0;\n int result = instance.position();\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 }",
"public String getForward() {\n index++;\n return (String) history.get(index);\n }",
"public void previous() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getPreviousMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getPreviousModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }",
"@Override\n public Integer peek() {\n return ar[pos-1];\n }",
"@Override\n public int getPositionFirstOperand() {\n return position + 1;\n }",
"protected int seekToOrBeforeUsingPositionAtOrAfter(Cell kv, boolean seekBefore) {\n CellScannerPosition position = ptSearcher.seekForwardToOrAfter(kv);\n\n if (CellScannerPosition.AT == position) {\n if (seekBefore) {\n ptSearcher.previous();\n return 1;\n }\n return 0;\n\n }\n\n if (CellScannerPosition.AFTER == position) {\n if (!ptSearcher.isBeforeFirst()) {\n ptSearcher.previous();\n }\n return 1;\n }\n\n if (position == CellScannerPosition.AFTER_LAST) {\n if (seekBefore) {\n ptSearcher.previous();\n }\n return 1;\n }\n\n throw new RuntimeException(\"unexpected CellScannerPosition:\" + position);\n }",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"private static int findPreviousStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1550 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 1551 */ localPrevArgs.src = paramArrayOfChar;\n/* 1552 */ localPrevArgs.start = paramInt1;\n/* 1553 */ localPrevArgs.current = paramInt2;\n/* */ \n/* 1555 */ while (localPrevArgs.start < localPrevArgs.current) {\n/* 1556 */ long l = getPrevNorm32(localPrevArgs, paramChar, paramInt3 | paramInt4);\n/* 1557 */ if (isTrueStarter(l, paramInt3, paramInt4)) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1561 */ return localPrevArgs.current;\n/* */ }",
"public void stepBackward() {\n\t\tposition = backwardPosition();\n\t}",
"public boolean try_parse_ahead(boolean z) throws Exception {\r\n virtual_parse_stack virtual_parse_stack = new virtual_parse_stack(this.stack);\r\n while (true) {\r\n short s = get_action(virtual_parse_stack.top(), cur_err_token().sym);\r\n if (s == 0) {\r\n return false;\r\n }\r\n if (s > 0) {\r\n int i = s - 1;\r\n virtual_parse_stack.push(i);\r\n if (z) {\r\n debug_message(\"# Parse-ahead shifts Symbol #\" + cur_err_token().sym + \" into state #\" + i);\r\n }\r\n if (!advance_lookahead()) {\r\n return true;\r\n }\r\n } else {\r\n int i2 = (-s) - 1;\r\n if (i2 == start_production()) {\r\n if (z) {\r\n debug_message(\"# Parse-ahead accepts\");\r\n }\r\n return true;\r\n }\r\n short[][] sArr = this.production_tab;\r\n short s2 = sArr[i2][0];\r\n short s3 = sArr[i2][1];\r\n for (int i3 = 0; i3 < s3; i3++) {\r\n virtual_parse_stack.pop();\r\n }\r\n if (z) {\r\n debug_message(\"# Parse-ahead reduces: handle size = \" + ((int) s3) + \" lhs = #\" + ((int) s2) + \" from state #\" + virtual_parse_stack.top());\r\n }\r\n virtual_parse_stack.push(get_reduce(virtual_parse_stack.top(), s2));\r\n if (z) {\r\n debug_message(\"# Goto state #\" + virtual_parse_stack.top());\r\n }\r\n }\r\n }\r\n }",
"private Token advance() {\n if(!isAtEnd()) current++;\n return previous();\n }",
"public void doWorkAfterMatch(int matchedLength) {\n rhsUsed += 1; inputUsed += matchedLength;\n doAsTopOfStack();\n // retract the dotted goal\n rhsUsed -= 1; inputUsed -= matchedLength;\n }",
"public void testFindPanelFirstRowBackwards() {\n JXList list = new JXList( new AbstractListModel() {\n private String[] data = { \"a\", \"b\", \"c\" };\n public Object getElementAt(int index) {\n return data[ index ];\n }\n public int getSize() {\n return data.length;\n }\n });\n JXFindPanel findPanel = new JXFindPanel(list.getSearchable());\n findPanel.init();\n PatternModel patternModel = findPanel.getPatternModel();\n patternModel.setBackwards(true);\n patternModel.setRawText(\"a\");\n int matchIndex = list.getSearchable().search(patternModel.getPattern(),\n patternModel.getFoundIndex(), patternModel.isBackwards());\n assertEquals(\"found match\", matchIndex, findPanel.doSearch());\n }",
"public IClause popBack() {\n if (back==front)\n throw new BufferUnderflowException();\n\n IClause c = tab[back--];\n if (back < 0)\n back = tab.length - 1;\n return c;\n }",
"public Double lookBack(int in);",
"private Token peek() {\n return tokens.get(current);\n }",
"@Override\n public Point peekNextPosition() {\n int nextX = (current.x + 1) % 3;\n int nextY = (current.y + 1) % 3;\n// System.out.println(\"Next X: \" + nextX);\n// System.out.println(\"Next Y: \" + nextY);\n boolean wrapsInX = nextX < current.x;\n boolean wrapsInY = nextY < current.y;\n boolean singleWrap = wrapsInX != wrapsInY;\n if (singleWrap) {\n return invalidPosition();\n } else {\n return new Point(nextX, nextY);\n }\n }",
"public ReplayedMatch fork() {\n return new ReplayedMatch(this.moveHistory);\n }",
"public int peek(){\n return runStack.peek();\n }",
"public int getCurrentFocusedPosition() {\n return mCurrentFocusedPopItemPosition;\n }",
"public Character peek()\r\n\t{\r\n\t\treturn stack[top-1];\r\n\t}",
"private Token peekToken() {\n return peekToken(0);\n }",
"public void past(int back);",
"int peek();",
"int peek();",
"public int getPreviousNode(XPathContext xctxt, int pos)\n throws TransformerException\n {\n\n XPath countMatchPattern = getCountMatchPattern(xctxt, pos);\n DTM dtm = xctxt.getDTM(pos);\n\n if (Constants.NUMBERLEVEL_ANY == m_level)\n {\n XPath fromMatchPattern = m_fromMatchPattern;\n\n // Do a backwards document-order walk 'till a node is found that matches \n // the 'from' pattern, or a node is found that matches the 'count' pattern, \n // or the top of the tree is found.\n while (DTM.NULL != pos)\n {\n\n // Get the previous sibling, if there is no previous sibling, \n // then count the parent, but if there is a previous sibling, \n // dive down to the lowest right-hand (last) child of that sibling.\n int next = dtm.getPreviousSibling(pos);\n\n if (DTM.NULL == next)\n {\n next = dtm.getParent(pos);\n\n if ((DTM.NULL != next) && ((((null != fromMatchPattern) && (fromMatchPattern.getMatchScore(\n xctxt, next) != XPath.MATCH_SCORE_NONE))) \n || (dtm.getNodeType(next) == DTM.DOCUMENT_NODE)))\n {\n pos = DTM.NULL; // return null from function.\n\n break; // from while loop\n }\n }\n else\n {\n\n // dive down to the lowest right child.\n int child = next;\n\n while (DTM.NULL != child)\n {\n child = dtm.getLastChild(next);\n\n if (DTM.NULL != child)\n next = child;\n }\n }\n\n pos = next;\n\n if ((DTM.NULL != pos)\n && ((null == countMatchPattern)\n || (countMatchPattern.getMatchScore(xctxt, pos)\n != XPath.MATCH_SCORE_NONE)))\n {\n break;\n }\n }\n }\n else // NUMBERLEVEL_MULTI or NUMBERLEVEL_SINGLE\n {\n while (DTM.NULL != pos)\n {\n pos = dtm.getPreviousSibling(pos);\n\n if ((DTM.NULL != pos)\n && ((null == countMatchPattern)\n || (countMatchPattern.getMatchScore(xctxt, pos)\n != XPath.MATCH_SCORE_NONE)))\n {\n break;\n }\n }\n }\n\n return pos;\n }",
"private int peek() {\n if (peeked == NotPeeked) {\n peeked = readChar();\n }\n return peeked;\n }",
"@Override\n\tpublic T peek() {\n\t\treturn last.getValue();\n\t}",
"public void testBacktracking() throws IOException {\n assertEquals(1, regexQueryNrHits(\"4934[314]\"));\n }",
"public void reset(BacktrackingTokenizerMark mark) {\n\t\tposition = mark.getPosition(tokens);\n\t}",
"public boolean canSeekBackwards() {\n/* 131 */ return true;\n/* */ }",
"public void testCurrPos() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }",
"private double getLookaheadForSpeed(double speed) {\n\t\tdouble lookahead = Constants.DELTA_LOOKAHEAD * (speed - Constants.MIN_LOOKAHEAD_SPEED) / Constants.DELTA_LOOKAHEAD_SPEED + Constants.MIN_LOOKAHEAD;\n\t\treturn Double.isNaN(lookahead) ? Constants.MIN_LOOKAHEAD : Math.max(Constants.MIN_LOOKAHEAD, Math.min(Constants.MAX_LOOKAHEAD, lookahead));\n\t}",
"public void backtrack() {\n advance();\n if (isGoal()) {\n if (print) {\n System.out.println(\"\\nGOAL!\");\n }\n winConfig = copyBoard();\n deadvance();\n }\n else {\n for (int i = 1; i < 10; i++) {\n board[currRow][currColumn] = i;\n if (print) {\n printThings(i);\n }\n if (isValid()) {\n backtrack();\n }\n }\n board[currRow][currColumn] = 0;\n deadvance();\n }\n }",
"public int peek() {\n\t\tif(!stackTmp.isEmpty()){\n\t\t\treturn stackTmp.peek();\n\t\t}\n\t\telse{\n\t\t\twhile(!stack.isEmpty()){\n\t\t\t\tint tmp = stack.peek();\n\t\t\t\tstackTmp.push(tmp);\n\t\t\t}\n\t\t\treturn stackTmp.peek();\n\t\t}\n\t}",
"public abstract Position nextPosition(Position position);",
"public int Front() {\n if (isEmpty())\n return -1;\n return buf[b];\n }",
"public void testPrev() {\n test1.prev();\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.prev();\n test1.moveToPos(8);\n assertTrue(test1.getValue().inRange(8));\n }",
"T peek();",
"T peek();",
"T peek();",
"T peek();",
"Position<T> last();",
"protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore) {\n // this does a deep copy of the key byte[] because the CellSearcher\n // interface wants a Cell\n CellScannerPosition position = ptSearcher.seekForwardToOrBefore(kv);\n\n if (CellScannerPosition.AT == position) {\n if (seekBefore) {\n ptSearcher.previous();\n return 1;\n }\n return 0;\n }\n\n return 1;\n }",
"@Override\n public int peekaboo(){\n if (callCheck())\n return EMPTY_INDEX;\n return last.getValue();\n }",
"@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if (index < arr.length) {//popping the delete function unneeded push\n delete(index);\n stack.pop();\n stack.pop();\n }\n System.out.println(\"backtracking performed\");\n }\n }",
"@Override\n public int nextPosition() {\n if (++p < tuples.size()) {\n lastTuple = tuples.get(p);\n return 0; // position is invalid in this scorer, returns 0\n }\n return NO_MORE_POS;\n }",
"private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}",
"public int peek() {\n\t return first;\n\t}",
"public T peek() {\r\n return get(size() - 1);\r\n\t}",
"private final int internalPrev(int n) {\n if (n == 0 || n == -1 || this.backwardsTrie == null) {\n return n;\n }\n resetState();\n while (n != -1 && n != 0 && breakExceptionAt(n)) {\n n = this.delegate.previous();\n }\n return n;\n }",
"public Position2D getPreviousPosition()\n {\n return previousPosition;\n }",
"@Test\n\tpublic void testLookaheadBeyondEnd()\n\t{\n\t\tth.addError(1, 7, \"Unmatched '{'.\");\n\t\tth.addError(1, 7, \"Unrecoverable syntax error. (100% scanned).\");\n\t\tth.test(\"({ a: {\");\n\t}",
"Token peek();",
"public int peekFront();",
"public HashSet < Integer > followPos ( int pos )\n {\n HashSet < Integer > followPos = new HashSet < Integer > ();\n\n HashSet < RegexNode > nodeList = getAllNodes ( this.regexNode );\n\n for ( RegexNode node : nodeList )\n {\n\n if ( node instanceof ConcatenationNode )\n {\n RegexNode n1 = node.getChildren ().get ( 0 );\n boolean foundPosInLastPosN1 = false;\n for ( RegexNode searchNode : n1.lastPos () )\n {\n if ( searchNode instanceof LeafNode )\n {\n LeafNode leafNode = ( LeafNode ) searchNode;\n if ( leafNode.getPosition () == pos )\n {\n foundPosInLastPosN1 = true;\n }\n }\n }\n if ( foundPosInLastPosN1 )\n {\n RegexNode n2 = node.getChildren ().get ( 1 );\n for ( RegexNode firstPosNode : n2.firstPos () )\n {\n followPos.add ( new Integer ( ( ( LeafNode ) firstPosNode )\n .getPosition () ) );\n }\n }\n }\n else if ( node instanceof KleeneNode )\n {\n RegexNode n = node.getChildren ().get ( 0 );\n boolean foundInLastPosN = false;\n for ( RegexNode searchNode : n.lastPos () )\n {\n if ( searchNode instanceof LeafNode )\n {\n LeafNode leafNode = ( LeafNode ) searchNode;\n if ( leafNode.getPosition () == pos )\n {\n foundInLastPosN = true;\n }\n }\n }\n if ( foundInLastPosN )\n {\n for ( RegexNode firstPosNode : n.firstPos () )\n {\n followPos.add ( new Integer ( ( ( LeafNode ) firstPosNode )\n .getPosition () ) );\n }\n }\n }\n }\n return followPos;\n }",
"private char advance() {\n current++;\n return source.charAt(current - 1);\n }",
"Object peek();",
"public int peek() {\n if (!popStack.isEmpty()) {\n return popStack.peek();\n }\n shift();\n return popStack.peek();\n }",
"public int scanAhead(Lemming lemming){\n return 3;\n }",
"private int currentPosition() {\n return robot.leftBack.getCurrentPosition();\n }",
"int peek() {\r\n\t\treturn stack[top-1];\r\n\t}",
"protected Position<Item<E>> findPosition(E e) {\n // In Java 10, the var keyword allows local variable type inference\n // If you are using older version of Java, modify this code\n // var walk = list.first();\n Position<Item<E>> walk = list.first();\n while (walk != null && !e.equals(value(walk)))\n walk = list.after(walk);\n return walk;\n }",
"public int peek() {\r\n readyForPop();\r\n return outStack.peek();\r\n }",
"public T peek();",
"public T peek();",
"public T peek();",
"public Token peek() {\n return peek;\n }"
] | [
"0.7174403",
"0.5660914",
"0.54604423",
"0.53823495",
"0.5293939",
"0.52664137",
"0.52642703",
"0.5242173",
"0.52385694",
"0.5158078",
"0.5157653",
"0.51116145",
"0.51075894",
"0.50230104",
"0.4956535",
"0.4955582",
"0.49483097",
"0.490529",
"0.48947483",
"0.48714244",
"0.48508388",
"0.4840995",
"0.48405513",
"0.48395705",
"0.48342776",
"0.48249766",
"0.47988746",
"0.47934818",
"0.47884223",
"0.47742274",
"0.47719595",
"0.47594783",
"0.47544888",
"0.47521123",
"0.4751961",
"0.47516456",
"0.4748806",
"0.47193623",
"0.4718755",
"0.46889693",
"0.46874952",
"0.46869674",
"0.46845916",
"0.46734518",
"0.46583208",
"0.46494517",
"0.46471158",
"0.46419054",
"0.46138293",
"0.4609522",
"0.4607418",
"0.46048653",
"0.46047086",
"0.45986244",
"0.4597613",
"0.45932734",
"0.4580362",
"0.4580362",
"0.45784378",
"0.45610547",
"0.45596457",
"0.45572862",
"0.45571148",
"0.45444983",
"0.45413",
"0.45403177",
"0.45295852",
"0.45241007",
"0.45195207",
"0.4518832",
"0.45186627",
"0.4518355",
"0.4518355",
"0.4518355",
"0.4518355",
"0.45102018",
"0.45069304",
"0.4501176",
"0.44945553",
"0.44838995",
"0.44746885",
"0.44697267",
"0.4461946",
"0.44618067",
"0.44593742",
"0.44569767",
"0.445385",
"0.44522962",
"0.44511595",
"0.44508722",
"0.4450775",
"0.4441771",
"0.44391516",
"0.44329762",
"0.4431366",
"0.443099",
"0.44217858",
"0.44207048",
"0.44207048",
"0.44207048",
"0.44174367"
] | 0.0 | -1 |
Backtrack to saved position and negate result. | private boolean NOT(boolean b) {
in = saves[--save];
return !b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }",
"private void negate()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.negate();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}",
"public abstract ArithValue negate();",
"public Position opposite(Position vp, Position ep) throws InvalidPositionException;",
"void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }",
"public Vector2f negate (Vector2f result)\n {\n return result.set(-x, -y);\n }",
"public Vector3 negateLocal () {\n return negate(this);\n }",
"public void invert()\n {\n assert isComplete;\n \n isInverted = !isInverted;\n }",
"public void revert()\n\t{\n\t\tswingingWay1 = !swingingWay1;\n\t}",
"public Vector2f negateLocal ()\n {\n return negate(this);\n }",
"public Vector2D neg()\n\t{\n\t\treturn this.mul(-1);\n\t}",
"public void invert() {\n\t\tthis.vector.setXYZ(-this.vector.x(), -this.vector.y(), -this.vector.z());\n\t\tthis.energy = -this.energy;\n\t}",
"public Node negaposi()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.PLUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Positive(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\tif(lexer.getToken()==Lexer.Token.MINUS)\r\n\t\t{\r\n\t\t\tNode fact = power();\r\n\t\t\tif(fact!=null)\r\n\t\t\t{\r\n\t\t\t\treturn new Negative(fact);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn power();\r\n\t}",
"public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }",
"public long setAmountNeg() {\n return -amount;\n }",
"abstract protected void revert();",
"public bit not()\n\t{\n\t\tbit notBit = new bit();\n\t\t\n\t\tnotBit.setValue(Math.abs(bitHolder.getValue() - 1));\n\t\t\n\t\treturn notBit;\n\t}",
"public boolean undo(){\n\t\t\n\t\tif(this.grillaPrevia == null){\n\t\t\treturn false;\n\t\t}else{\n\t\t\tthis.grilla= (int[][])copyArray(this.grillaPrevia);\t\n\t\t\tthis.currentKeyX = this.currentKeyXPrevia;\n\t\t\tthis.currentKeyY = this.currentKeyYPrevia;\n\t\t\tthis.selected = this.selectedPrevia;\n\t\t\tthis.grillaPrevia = null;\n\t\t\tthis.acumulatedScore -= (2*SenkuPegs.getInstance().getPegs()[this.currentPegType].getScoreValue());\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}",
"public boolean resetToPreviousPosition()\n {\n return setPosition( previousPosition);\n }",
"boolean undoMove();",
"public boolean RestorePoint() {\n\t\treturn true; \n\t}",
"public Vector3D negate() {\n return scale(-1);\n }",
"public Complex negate() {\n return new Complex(-re, -im);\n }",
"public void discardAndGoBack() {\n try {\n currentEditor.setValue(null);\n if (currentEditor instanceof RestrictedEntityEditor) {\n ((RestrictedEntityEditor) currentEditor).refreshListOfValues();\n }\n } catch (Exception ex) {\n throw new RuntimeException(\"Exception while discarding value of an editor. \", ex);\n }\n goBack();\n }",
"public static void invertFlag() {\n\t\trunFlag = !runFlag;\n\t}",
"public T negative() {\n T A = copy();\n ops.changeSign(A.mat);\n return A;\n }",
"public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }",
"void reverseTurnOrder() {\n turnOrder *= -1;\n }",
"public void negateBoolean(MethodVisitor mv) {\n // code to negate the primitive boolean\n Label endLabel = new Label();\n Label falseLabel = new Label();\n mv.visitJumpInsn(Opcodes.IFNE, falseLabel);\n mv.visitInsn(Opcodes.ICONST_1);\n mv.visitJumpInsn(Opcodes.GOTO, endLabel);\n mv.visitLabel(falseLabel);\n mv.visitInsn(Opcodes.ICONST_0);\n mv.visitLabel(endLabel);\n }",
"private void markNegativeCycle(boolean[] checked, int nodeIndex) {\n\t\thasNegativeCycle[nodeIndex] = true;\n\t\tchecked[nodeIndex] = true;\n\t\tdistances[nodeIndex] = Integer.MIN_VALUE;\n\t}",
"public void unapplyMove()\r\n\t{\r\n\t\tif (appliedMoves == null || appliedMoves.isEmpty()) return;\r\n\t\t\r\n\t\tdecrementPositionCount();\r\n\t\t\r\n\t\tboolean lastMoveRochade = isLastMoveRochade(); //Check before any changes to the board are made\r\n\t\tboolean isLastMoveEnPassentCapture = !lastMoveRochade && isLastMoveEnPassentCapture();\r\n\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMoveRochade)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t\t\r\n\t\t\tField kingFieldTo = lastMove.to;\r\n\t\t\tif (kingFieldTo.coordinate.x == 6)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[5][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[7][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\r\n\t\t\telse if (kingFieldTo.coordinate.x == 2)\r\n\t\t\t{\r\n\t\t\t\tField rookRochadeField = fields[3][kingFieldTo.coordinate.y];\r\n\t\t\t\tField rookBeforeRochadeField = fields[0][kingFieldTo.coordinate.y];\r\n\t\t\t\trookBeforeRochadeField.piece = rookRochadeField.piece;\r\n\t\t\t\trookRochadeField.piece = null;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\telse if (isLastMoveEnPassentCapture)\r\n\t\t{\r\n\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\tlastMove.to.piece = null;\r\n\t\t\t\r\n\t\t\tMove beforeLastMove = appliedMoves.get(appliedMoves.size() - 2);\r\n\t\t\tbeforeLastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif (lastMove.promotion != null)\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = new Pawn(lastMove.color);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlastMove.from.piece = lastMove.to.piece;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastMove.to.piece = lastMove.capture;\r\n\t\t}\r\n\t\t\r\n\t\tappliedMoves.remove(appliedMoves.size() - 1);\r\n\t}",
"void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }",
"@Override\n public void Invert() {\n\t \n }",
"protected boolean avoidNegativeCoordinates() {\n \t\treturn false;\n \t}",
"public Money negate() {\n return new Money(getAmount().negate(), getCurrency());\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"@Override\n public boolean revise(int position) throws ContradictionException {\n boolean revised = false;\n final DisposableIntIterator itr = scope[position].getSVariable()\n .getDomain().getIterator();\n try {\n while (itr.hasNext()) {\n final int a = itr.next();\n if (revise(position, a, Integer.MAX_VALUE)) {\n scope[position].removeVal(a);\n revised = true;\n }\n }\n } finally {\n itr.dispose();\n }\n return revised;\n }",
"private static Code negationNormalForm(Code.Load e, boolean negate) {\n\t\treturn negate(e, negate);\n\t}",
"void negarAnalise();",
"boolean getNegated();",
"public Binary negative(){\n\n Binary ret1= this.flip();\n Binary ret2= ret1.suma1();\n return ret2;\n }",
"@Override\n\tpublic Void visit(Negate neg) {\n\t\tprintIndent(\"~\");\n\t\tindent++;\n\t\tneg.expr.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"default void negate()\n {\n getAxis().negate();\n setAngle(-getAngle());\n }",
"public void stepBackward() {\n\t\tposition = backwardPosition();\n\t}",
"private Token negationCheck(Token pToken, Token pPrevToken) {\n if (pPrevToken == null || pPrevToken instanceof BinaryOperator || pPrevToken instanceof LeftParen) {\n pToken = new NegOperator();\n }\n return pToken;\n }",
"T negativeResult();",
"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 toggle()\n\t{\n\t\tbitHolder.setValue(Math.abs(bitHolder.getValue() - 1 ));\n\t\t\n\t}",
"public boolean goBack() {\n if(index > 0) {\n index--;\n return true;\n } else {\n return false;\n }\n }",
"@Override\r\n\tpublic vec3 minus() {\n\t\treturn null;\r\n\t}",
"@Override\n public CharMatcher negate() {\n return new Negated(this);\n }",
"private void trueRevertBlock() {\r\n\t\tthis.reverted = true;\r\n\t\tif (instances_.containsKey(this.block)) {\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> {\r\n\t\t\t\tTempBlock last = instances_.get(this.block).getLast();\r\n\t\t\t\tthis.block.setBlockData(last.newData); //Set the block to the next in line TempBlock\r\n\t\t\t});\r\n\t\t} else { //Set to the original blockstate\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> revertState());\r\n\t\t}\r\n\r\n\t\tREVERT_QUEUE.remove(this);\r\n\t\tif (this.revertTask != null) {\r\n\t\t\tthis.revertTask.run();\r\n\t\t}\r\n\r\n\t\tfor (TempBlock attached : attachedTempBlocks) {\r\n\t\t\tattached.revertBlock();\r\n\t\t}\r\n\t}",
"public void executeNot() {\n\t\tBitString destBS = mIR.substring(4, 3);\n\t\tBitString sourceBS = mIR.substring(7, 3);\n\t\tmRegisters[destBS.getValue()] = mRegisters[sourceBS.getValue()].copy();\n\t\tmRegisters[destBS.getValue()].invert();\n\n\t\tBitString notVal = mRegisters[destBS.getValue()];\n\t\tsetConditionalCode(notVal);\n\t}",
"public Direction opposite() {\n return opposite;\n }",
"public boolean canSeekBackwards() {\n/* 131 */ return true;\n/* */ }",
"public void neg_() {\n TH.THTensor_(neg)(this, this);\n }",
"public final void rewind() {\n branch = 0;\n }",
"static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }",
"private ArrayList<GridPiece> getOpposite(GridPiece origin) {\n originOpposite.clear();\n\n //Check for corners\n if (origin.column == 0 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n } else if (origin.column == game.gridSizeWidth - 1 && (origin.row == 0 || origin.row == game.gridSizeHeight - 1)) {\n originOpposite.add(falsePiece);\n return originOpposite;\n }\n\n if (originOpposite.size() > 0) {\n return originOpposite;\n }\n\n // Search Around\n\n boolean canCreateOp;\n\n // Search up\n if (game.gridMap.size() > origin.row + 1) {\n canCreateOp = false;\n\n for (int i = origin.row + 1; i < game.gridSizeHeight; i++) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search down\n }\n if (origin.row > 0) {\n canCreateOp = false;\n\n for (int i = origin.row - 1; i >= 0; i--) {\n if (game.gridMap.get(i).get(origin.column).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(i).get(origin.column).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(i).get(origin.column));\n break;\n }\n }\n\n\n // Search right\n }\n if (game.gridMap.get(0).size() > origin.column + 1) {\n canCreateOp = false;\n\n for (int i = origin.column + 1; i < game.gridSizeWidth; i++) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n\n // Search left\n }\n if (origin.column > 0) {\n canCreateOp = false;\n\n for (int i = origin.column - 1; i >= 0; i--) {\n if (game.gridMap.get(origin.row).get(i).state == game.STATE_NONE) {\n canCreateOp = true;\n } else if (game.gridMap.get(origin.row).get(i).state == game.STATE_FINAL && canCreateOp) {\n originOpposite.add(game.gridMap.get(origin.row).get(i));\n break;\n }\n }\n }\n\n noLine = true;\n\n if (originOpposite.size() == 0) {\n originOpposite.add(falsePiece);\n }\n\n return originOpposite;\n }",
"public void backDown(){\n backSolenoid.set(DoubleSolenoid.Value.kReverse);\n }",
"public DoubleExpression getOppositeProgress()\n {\n return opposite;\n }",
"private int backwardPosition() {\n\t\tif(getPosition() > 0) {\n\t\t\treturn getPosition() - 1;\n\t\t} else {\n\t\t\treturn getMaxPosition();\n\t\t}\n\t}",
"public Move undoMove ()\n {\n Move lastPlayedMove = Move.undoMove();\n setGridElement(lastPlayedMove.getRow(), lastPlayedMove.getColumn(), Player.NONE);\n return lastPlayedMove;\n }",
"public boolean getNegated() {\r\n return Negated;\r\n }",
"private static Code negationNormalForm(Code.FunCall e, boolean negate) {\n\t\treturn negate(e,negate);\n\t}",
"protected void subtract() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.max(min, value - incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}",
"@Override\n public void step(final EvaluationContext theContext)\n {\n // pop the value, negate, push the value\n //\n final Double theOperand = theContext.popValue();\n theContext.pushValue(-theOperand);\n }",
"public boolean growsNegative();",
"public void retract(){\n\t\tsolenoid1.set(false);\n\t\tsolenoid2.set(false);\n\t}",
"public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }",
"public Fraction opposite() {\n return new Fraction (-numerator, denominator).reduce();\n }",
"private void findPrev() {\n \tthis.find(false);\n }",
"public NegationExpression(Expression passinnum){\r\n\t\tthis.arg=passinnum;\r\n\t}",
"public boolean inPlace() {\n\t\treturn false;\n\t}",
"void find_negative_cycle(){\n \t\n \tfor(int j = 0; j<E ; j++)\n\t\t{\n\t\t\trelax(edge[j].src, edge[j].destination, edge[j].weight);\n\t\t}\n \tfor(int i = 0; i<V ; i++)\n\t\t{\n \t\tif(x[i] != dist[i])\n\t\t\t{\n \t\t\tNegCycle = true;\n\t\t\t\tSystem.out.println(\"Negative Cycle Found \");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n }",
"public Scalar neg() {\n\t\treturn mul(new RealScalar(-1));\n\t}",
"public void undo() {\n setExecuted(false);\n }",
"Relation getNegation();",
"@Override\n void undo() {\n assert false;\n }",
"private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}",
"public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}",
"public boolean getMoveRemainingStartsBack()\r\n {\r\n return (m_moveRemainingStartsBack);\r\n }",
"public void back() throws JSONException {\n if(usePrevious || this.index <= 0) {\n throw new JSONException(\"Stepping back two steps is not supported\");\n }\n this.index -= 1;\n this.character -= 1;\n this.usePrevious = true;\n this.eof = false;\n }",
"private void undoPosition() {\r\n String undoingBoard = listOfBoards.pop();\r\n listOfMoves.pop();\r\n for (Square sq : map.keySet()) {\r\n char piece = undoingBoard.charAt(sq.index() + 1);\r\n if (piece == '-') {\r\n map.put(sq, EMPTY);\r\n }\r\n if (piece == 'B') {\r\n map.put(sq, BLACK);\r\n }\r\n if (piece == 'W') {\r\n map.put(sq, WHITE);\r\n }\r\n if (piece == 'K') {\r\n map.put(sq, KING);\r\n }\r\n board[sq.col()][sq.row()] = map.get(sq);\r\n }\r\n _moveCount -= 1;\r\n _turn = _turn.opponent();\r\n _repeated = false;\r\n }",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"@Override\n\tprotected void resetFalseClause() {\n\t\t\n\t}",
"private void previous() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n\n Timeline.Window currentWindow = currentTimeline.getWindow(currentWindowIndex, new Timeline.Window());\n if (currentWindowIndex > 0 && (player.getCurrentPosition() <= MAX_POSITION_FOR_SEEK_TO_PREVIOUS\n || (currentWindow.isDynamic && !currentWindow.isSeekable))) {\n player.seekTo(currentWindowIndex - 1, C.TIME_UNSET);\n } else {\n player.seekTo(0);\n }\n }",
"public IClause popBack() {\n if (back==front)\n throw new BufferUnderflowException();\n\n IClause c = tab[back--];\n if (back < 0)\n back = tab.length - 1;\n return c;\n }",
"public E undo() {\n if (canUndo()) {\n future.addLast(present);\n present = past.pollLast();\n }\n return getCurrentState();\n }",
"public FindOperationEvaluator(boolean negate) {\r\n this.negate = negate;\r\n }",
"public void setNegative(boolean negative) {\n this.negative = negative;\n }",
"public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}",
"@Override\n public void backtrack() {\n if (!stack.isEmpty()) {\n int index = (Integer) stack.pop();\n\n if (index > arr.length) {//popping the insert function unneeded push\n insert((Integer) stack.pop());\n stack.pop();\n }\n if (index < arr.length) {//popping the delete function unneeded push\n delete(index);\n stack.pop();\n stack.pop();\n }\n System.out.println(\"backtracking performed\");\n }\n }",
"@Override\n protected void negativeClick() {\n\n }",
"void retract() {\n assert movesMade() > 0;\n Move move = _moves.remove(_moves.size() - 1);\n Piece replaced = move.replacedPiece();\n int c0 = move.getCol0(), c1 = move.getCol1();\n int r0 = move.getRow0(), r1 = move.getRow1();\n Piece movedPiece = move.movedPiece();\n set(c1, r1, replaced);\n set(c0, r0, movedPiece);\n _turn = _turn.opposite();\n }",
"public boolean posNeg(int a, int b, boolean negative) {\n throw new UnsupportedOperationException(\"Not implemented\");\n }",
"public final void negate(Matrix3f m1) {\n\t\n \tthis.set(m1);\n \tthis.negate();\n }",
"public void popToPointer() {\n while (this.size() > undoPointer + 1) {\n super.pop();\n }\n }",
"public IClause back() {\n if (back==front)\n throw new BufferUnderflowException();\n\n return tab[back];\n }",
"public Point2F negative()\r\n {return scale(-1);}"
] | [
"0.6532408",
"0.64666116",
"0.6126392",
"0.61078274",
"0.6080284",
"0.59553283",
"0.5857693",
"0.58524495",
"0.56818885",
"0.56638485",
"0.5633121",
"0.5608685",
"0.55804044",
"0.55659723",
"0.5546124",
"0.5530519",
"0.55051666",
"0.5496028",
"0.5492589",
"0.54904324",
"0.548",
"0.5475744",
"0.546504",
"0.5464508",
"0.5454729",
"0.543884",
"0.54265434",
"0.5425267",
"0.54017615",
"0.5393856",
"0.53820354",
"0.53809714",
"0.5378407",
"0.53753865",
"0.53746665",
"0.537002",
"0.5354641",
"0.5352339",
"0.53332114",
"0.53259575",
"0.53252065",
"0.5312985",
"0.5312484",
"0.53113735",
"0.5305589",
"0.5295346",
"0.5262564",
"0.5242923",
"0.5241876",
"0.5228907",
"0.5209927",
"0.5205955",
"0.5197838",
"0.5189716",
"0.5175217",
"0.51696336",
"0.5158618",
"0.514791",
"0.5138058",
"0.51356375",
"0.51356333",
"0.51267076",
"0.51266736",
"0.5125339",
"0.51214635",
"0.5121059",
"0.5115298",
"0.511283",
"0.5097448",
"0.50925654",
"0.5084105",
"0.5082838",
"0.5077251",
"0.5075592",
"0.5075422",
"0.507498",
"0.50703883",
"0.5068292",
"0.5067316",
"0.5066761",
"0.5064576",
"0.5061302",
"0.5060862",
"0.5060593",
"0.5058829",
"0.5050407",
"0.50453967",
"0.5034627",
"0.5033163",
"0.5029147",
"0.5022882",
"0.50170153",
"0.50168484",
"0.5013563",
"0.5013446",
"0.50103796",
"0.5001328",
"0.5000754",
"0.49989662",
"0.49945578"
] | 0.56684947 | 9 |
Record an error marker for the current input position. | private boolean MARK(Marker m) {
if (look > 0) return true;
if (marked > in) throw new Error("marked " + marked + " in " + in);
if (marked < in) {
markers.clear();
marked = in;
}
markers.add(m);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object... params) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Supplier<?> msgSupplier) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic boolean isErrorEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void error(Marker marker, Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"public void setError() {\r\n this.textErrorIndex = textIndex;\r\n }",
"public static MarkerException markLocation()\n {\n return getInstance().doMarkLocation();\n }",
"public String getErrorPosition() {\n return errorPosition;\n }",
"@Override\n\tpublic void error(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"public void printErrToken(){\r\n System.err.println(\"Invalid token at line: \" + lineNum + \" , column \" + colNum);\r\n }",
"private void setLatitudeError (float latitude, Exception e, int error) {\n this.latitude = latitude;\n latitudeErrorMessage = e.toString();\n latitudeError = error;\n }",
"private void error(@Nonnull Token pptok, boolean is_error)\r\n throws IOException,\r\n LexerException {\r\n StringBuilder buf = new StringBuilder();\r\n buf.append('#').append(pptok.getText()).append(' ');\r\n /* Peculiar construction to ditch first whitespace. */\r\n Token tok = source_token_nonwhite();\r\n ERROR:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case NL:\r\n case EOF:\r\n break ERROR;\r\n default:\r\n buf.append(tok.getText());\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n if (is_error)\r\n error(pptok, buf.toString());\r\n else\r\n warning(pptok, buf.toString());\r\n }",
"void setError();",
"private void error(String message) {\n errors++;\n System.err.println(\"Line \" + token.line + \",\"\n + \" Col \" + token.col + \": \"\n + message);\n }",
"public void report_error(String message, Object info) {\r\n StringBuilder m2 = new StringBuilder(\"Error\");\r\n if (info instanceof java_cup.runtime.Symbol) {\r\n java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);\r\n if (s.left >= 0) { \r\n m2.append(\" in line \"+(s.left+1));\r\n if (s.right >= 0)\r\n m2.append(\", column \"+(s.right+1));\r\n }\r\n }\r\n m2.append(\" : \"+message);\r\n System.err.println(m2);\r\n m = m2;\r\n \r\n }",
"private void logErrorMessage(String found, String expected)throws LexemeException {\n\t\tSystem.out.println(\"Error: (L\" + lexAnalyser.getLineCount()\n\t\t\t\t+ \") Error on token \\\"\" + found + \"\\\" Expected \" + expected);\n\n\t\tlogMessage(\"Error on token \\\"\" + found + \"\\\" Expected \" + expected);\n\t\tlog.closeLog();\n\t\tthrow new LexemeException(\"Error on token \\\"\" + found + \"\\\" Expected \"\n\t\t\t\t+ expected);\n\n\t}",
"public ParseResult failureAt (Object input, int errorPosition, int peel)\n {\n ParseResult r = failure(input, peel + 1);\n\n assertEquals(r.errorOffset, errorPosition, peel + 1,\n () -> \"The furthest parse error didn't occur at the expected location.\");\n\n return r;\n }",
"@FormatMethod\n private void reportError(\n SourcePosition position, @FormatString String message, Object... arguments) {\n errorReporter.reportError(position, message, arguments);\n }",
"public final void error(String error){\n lastKnownError = error;\n }",
"public void report_error(String message, Object info) {\n StringBuilder m = new StringBuilder(\"ERROR\");\n if (info instanceof java_cup.runtime.Symbol) {\n java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);\n if (s.left >= 0) { \n m.append(\" in line \"+(s.left+1));\n if (s.right >= 0)\n m.append(\", column \"+(s.right+1));\n }\n }\n m.append(\" : \"+message);\n System.out.println(m.toString());\n errores.add(m.toString());\n }",
"protected void error(int line, int column, @Nonnull String msg)\r\n throws LexerException {\r\n if (listener != null)\r\n listener.handleError(source, line, column, msg);\r\n //else\r\n // throw new LexerException(\"Error at \" + line + \":\" + column + \": \" + msg);\r\n }",
"public ParseResult failureAt (Object input, int error) {\n return failureAt(input, error, 1);\n }",
"@Override\n\tpublic void adjustToError() {\n\t\t\n\t}",
"@Override\n public final void syntaxError(Recognizer<?, ?> recognizer,\n Object offendingSymbol, int line, int charPositionInLine,\n String msg, RecognitionException e) {\n ResolveToken offendingToken = (ResolveToken) offendingSymbol;\n String input;\n if (recognizer == null) {\n input = offendingToken.getTokenSource().getInputStream().toString();\n }\n else {\n CommonTokenStream src =\n (CommonTokenStream) recognizer.getInputStream();\n input = src.getTokenSource().getInputStream().toString();\n }\n String[] lines = input.split(\"\\n\");\n String errorLine = lines[line - 1].replaceAll(\"\\t\", \" \");\n\n // Obtain the location from the token if it is not null\n Location location = null;\n if (offendingToken != null) {\n location = offendingToken.getLocation();\n }\n\n String errorMsg = buildErrorMsg(charPositionInLine, errorLine, msg);\n myStatusHandler.error(location, errorMsg);\n }",
"private void recordUnknownSymbolError(String name, int line, int col)\n {\n addError(\"Use of undefined identifier \" + name, line, col);\n }",
"public void printError(SourcePosition arg0, String arg1) {\n\n }",
"void drawError(String message);",
"protected abstract void error(String err);",
"public void error();",
"public void setErrorPosition(String errorPosition) {\n this.errorPosition = errorPosition == null ? null : errorPosition.trim();\n }",
"@Generated\n @Selector(\"seekToOffset:error:\")\n boolean seekToOffsetError(double offsetTime, @Nullable @ReferenceInfo(type = NSError.class) Ptr<NSError> outError);",
"@Override\n\tpublic void info(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"public abstract void setError(String message);",
"public void setErrorIndex(int index) {\r\n this.textErrorIndex = index;\r\n }",
"private void invalidPosition(long position) {\n IllegalStateException ex = new IllegalStateException(\"Attempt to write to position=\" + position);\n Slf4jExceptionHandler.WARN.on(getClass(), \"Attempt to update header at position=\" + position, ex);\n throw ex;\n }",
"public void setError(int value) {\n this.error = value;\n }",
"public static void registerError() {\r\n errorCount++;\r\n }",
"@Override\n\tpublic void info(Marker marker, String message, Throwable t) {\n\n\t}",
"public void addError(String message);",
"public int errorMessageOffset()\n {\n return offendingHeaderOffset() + offendingHeaderFrameLength();\n }",
"void set_marker_position (double p_position) {\n //\n // Ensure the specific value is legal.\n //\n double l_position = Range.clip\n (p_position , SERVO_MARKER_MIN\n , SERVO_MARKER_MAX); // Servo position is restricted to protect from mechanical damage\n\n\n\n //\n // Set the right value.\n //\n if (marker!= null)\n {\n marker.setPosition (l_position);\n }\n\n }",
"public final void AddError()\n\t{\n\t\terrorCount_++;\n\t\tentryValid_ = false;\n\t}",
"@Override\n\tpublic void info(Marker marker, Message msg, Throwable t) {\n\n\t}",
"abstract void error(String error);",
"@Override\n\tpublic void info(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(CharSequence message) {\n\n\t}",
"public void setErrorIndicatorPaint(Paint paint) {\n/* 158 */ this.errorIndicatorPaint = paint;\n/* 159 */ fireChangeEvent();\n/* */ }",
"@Override\n protected void visit(final SpreadsheetErrorParserToken token) {\n this.add(\n Expression.value(\n token.value()\n .kind()\n .toError()\n ),\n token\n );\n }",
"public void setErrorIndicatorStroke(Stroke stroke) {\n/* 188 */ this.errorIndicatorStroke = stroke;\n/* 189 */ fireChangeEvent();\n/* */ }",
"private void setLongitudeError (float longitude, Exception e, int error) {\n this.longitude = longitude;\n longitudeErrorMessage = e.toString();\n longitudeError = error;\n }",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message) {\n\n\t}",
"private void parseError() {\r\n System.out.print(\"Parse Error on:\");\r\n tokens.get(position).print();\r\n }",
"public void markAsFailed() {\n execution.setErrorReported();\n }",
"private void correctError()\r\n\t{\r\n\t\t\r\n\t}",
"protected void error(@Nonnull Token tok, @Nonnull String msg)\r\n throws LexerException {\r\n error(tok.getLine(), tok.getColumn(), msg);\r\n }",
"public void error(String message);",
"public void setError() {\n _hasError = true;\n _highlight = HighlightMode.ERROR;\n _error = NodeError.ERROR;\n }",
"protected void _notifySyntaxErrorOccurred(final int offset, final int length) {\n for (int i=0; i < _listeners.size(); i++) {\n ((InteractionsListener)_listeners.get(i)).\n interactionsErrorOccurred(offset, length);\n }\n }",
"public Symbol cur_err_token() {\r\n return this.lookahead[this.lookahead_pos];\r\n }",
"@Override\n\tpublic void log(Level level, Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"public static void addMarker(IResource resource,int type, int line, int offset,int length,String message){\r\n\t\ttry {\r\n\t\t\tIMarker marker = resource.createMarker(IMarker.PROBLEM);\r\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\t\tmap.put(IMarker.SEVERITY, Integer.valueOf(type));\r\n\t\t\tmap.put(IMarker.MESSAGE, message);\r\n\t\t\tmap.put(IMarker.CHAR_START,Integer.valueOf(offset));\r\n\t\t\tmap.put(IMarker.CHAR_END,Integer.valueOf(offset + length));\r\n\t\t\tmap.put(IMarker.LINE_NUMBER,Integer.valueOf(line));\r\n\t\t\tmarker.setAttributes(map);\r\n\t\t} catch(CoreException ex){\r\n\t\t\tHTMLPlugin.logException(ex);\r\n\t\t}\r\n\t}",
"public void makeError(){\n\t\tisError = true;\n\t}",
"private void reportExpectedError(@Nullable Token token, Object expected) {\n reportError(token, \"'%s' expected\", expected);\n }",
"void recordExecutionError() {\n hadExecutionError = true;\n }",
"@Override\n protected void addError(Type errorType, int line, int column, String key)\n {\n super.addError(errorType, line, column, this.messages.getString(key));\n }",
"abstract void errorLogError(String error);",
"public int getErrorIndex() {\r\n return textErrorIndex;\r\n }",
"private void syntaxError(String message, int line) {\n\t\tString error = String.format(\"Syntax error: %s on line %d.\", message,\r\n\t\t\t\tline);\r\n\t\terrors.add(error);\r\n\r\n\t\tthis.syntaxError = true;\r\n\t}",
"public void setError(CharSequence error) {\n/* 1515 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\t\t\tpublic void onError(int i, String s) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onError(int i, String s) {\n\t\t\t\t\n\t\t\t}",
"public void error(Exception e);",
"@Override\n\tpublic void onMoveError(String msg) {\n\n\t}",
"public Stroke getErrorIndicatorStroke() { return this.errorIndicatorStroke; }",
"public void setPosition ( TextPosition position ) throws OutOfBoundsException { _cursorPosition = position; }",
"public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setPosition(int value) {\n validate(fields()[7], value);\n this.position = value;\n fieldSetFlags()[7] = true;\n return this;\n }",
"public void setError(final XyzError error) {\n this.error = error;\n }",
"@Override public void incrementAddress( int offset )\n {\n super.incrementAddress( offset );\n if ( getPointer() > m_size )\n throw new RuntimeException( \"address out of range: \" + getPointer() );\n }",
"private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }",
"private void zzScanError(int errorCode) {\n String message;\n try {\n message = ZZ_ERROR_MSG[errorCode];\n }\n catch (ArrayIndexOutOfBoundsException e) {\n message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];\n }\n\n throw new Error(message);\n }"
] | [
"0.7093792",
"0.7064156",
"0.6876253",
"0.6843308",
"0.6805264",
"0.67862594",
"0.67712045",
"0.67691433",
"0.6749925",
"0.6728624",
"0.66958743",
"0.66911495",
"0.6675357",
"0.6649786",
"0.6648644",
"0.6629475",
"0.66109097",
"0.659994",
"0.6554925",
"0.6526648",
"0.6516573",
"0.63441193",
"0.63077664",
"0.628515",
"0.6134429",
"0.6081356",
"0.59112364",
"0.5892646",
"0.58422285",
"0.58023286",
"0.58016294",
"0.57786405",
"0.56711745",
"0.5647114",
"0.5642775",
"0.5634959",
"0.5616623",
"0.5579709",
"0.55776757",
"0.55624866",
"0.5559253",
"0.55550426",
"0.55497617",
"0.5543784",
"0.5538553",
"0.5535575",
"0.5515482",
"0.55085385",
"0.5507562",
"0.55065703",
"0.5502871",
"0.5488367",
"0.54830426",
"0.54733413",
"0.5465494",
"0.5463044",
"0.5452463",
"0.5445664",
"0.54276985",
"0.54115766",
"0.54061896",
"0.5399147",
"0.5397809",
"0.53871584",
"0.5378674",
"0.5374198",
"0.5373942",
"0.53651416",
"0.53515095",
"0.5345381",
"0.53215474",
"0.53063846",
"0.52990586",
"0.52961403",
"0.528901",
"0.52808666",
"0.52798253",
"0.52783895",
"0.5267658",
"0.52650803",
"0.525389",
"0.5249758",
"0.5249547",
"0.5249279",
"0.52308273",
"0.5230274",
"0.5223391",
"0.5217246",
"0.5207428",
"0.5207428",
"0.52041626",
"0.5202677",
"0.5202559",
"0.5197614",
"0.51939666",
"0.5191382",
"0.51898926",
"0.51894635",
"0.51894635",
"0.51894635",
"0.51894635"
] | 0.0 | -1 |
Choice of categories, e.g. Lu / Ll / Lt / Lm / Lo | private boolean CATS(Category... cs) {
if (in >= input.length()) return false;
int len = input.nextLength(in);
int ch = input.nextChar(in, len);
Category cat = Category.get(ch);
boolean ok = false;
for (Category c : cs) if (cat == c) ok = true;
if (! ok) return false;
in += len;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}",
"private Category classify() {\n Category category = null;\n if (name != null) {\n if (name.contains(\"potato\") || name.contains(\"apple\")) {\n category = Category.FOOD;\n } else if (name.contains(\"cloths\") || name.contains(\"pants\") || name.contains(\"shirt\")) {\n category = Category.CLOTHING;\n }\n }\n return category;\n }",
"String category();",
"private RunnerInfo.Category stringToCat(String catStr) {\n if (catStr.contains(\"Femme\")) {\n return RunnerInfo.Category.WOMEN;\n } else {\n return RunnerInfo.Category.MEN;\n }\n }",
"private Object getAnomizedCategory() {\r\n\tString categorie = (String) record.get(\"categorie\");\r\n\tif (categorie != null) {\r\n\t switch (categorie) {\r\n\t case \"AD\":\r\n\t case \"CO\":\r\n\t case \"FI\":\r\n\t case \"IBL\":\r\n\t case \"KI\":\r\n\t case \"KL\":\r\n\t case \"VO\":\r\n\t\tbreak;\r\n\t default:\r\n\t\tcategorie = null;\r\n\t\tbreak;\r\n\t }\r\n\t}\r\n\r\n\treturn categorie;\r\n }",
"List getCategoriesOfType(String typeConstant);",
"public String[] getCategoryList(){\n return new String[]{\n \"Macros\",\n \"Instrument Type\",\n \"TOF_NSCD\",\n \"NEW_SNS\"\n };\n }",
"String getCategory();",
"String getCategory();",
"@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }",
"String getCategoria();",
"public String categoryScan(String sIn)\r\n\t{\r\n\t\tString goBack = \"unassigned\";\r\n\t\t\r\n\t\tif(sIn.contains(\"PROFESSIONAL CATEGORY\") || sIn.contains(\"PROFESSIONAL/MANAGEMENT CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"PROFESSIONAL\";\r\n\t\t} else if(sIn.contains(\"HEALTHCARE CATEGORY\") || sIn.contains(\"HEALTH CARE/NURSING CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"HEALTHCARE\";\r\n\t\t} else if(sIn.contains(\"SALES / MARKETING CATEGORY\") || sIn.contains(\"SALES/MARKETING CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"SALES\";\r\n\t\t}else if(sIn.contains(\"SKILLS/TRADES CATEGORY\") || sIn.contains(\"SKILLED TRADES CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"SKILLS TRADES\";\r\n\t\t}else if(sIn.contains(\"GENERAL CATEGORY\"))\r\n\t\t{\r\n\t\t\tgoBack = \"GENERAL\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn goBack;\r\n\t}",
"private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}",
"@Test\n public void categoryFitsTypeTest() {\n final Category cardio = Category.CARDIO;\n final Type endurance = Type.ENDURANCE;\n final Type strength = Type.STRENGTH;\n\n assertEquals(\"Cardio category of Endurance Type\", cardio.getType(), endurance);\n assertNotEquals(\"Cardio category is not of Strength Type\", cardio.getType(), strength);\n }",
"private static boolean CharInCategory(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tUnicodeCategory chcategory = UnicodeCategory.GetUnicodeCategory(ch);\n\n\t\tint i = start + SETSTART + mySetLength;\n\t\tint end = i + myCategoryLength;\n\t\twhile (i < end)\n\t\t{\n\t\t\tint curcat = (short) set.charAt(i);\n\n\t\t\tif (curcat == 0)\n\t\t\t{\n\t\t\t\t// zero is our marker for a group of categories - treated as a unit\n\t\t\t\tRefObject<Integer> tempRef_i = new RefObject<Integer>(i);\n\t\t\t\tboolean tempVar = CharInCategoryGroup(ch, chcategory, set, tempRef_i);\n\t\t\t\t\ti = tempRef_i.argValue;\n\t\t\t\tif (tempVar)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (curcat > 0)\n\t\t\t{\n\t\t\t\t// greater than zero is a positive case\n\n\t\t\t\tif (curcat == SpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 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\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t--curcat;\n\n\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// less than zero is a negative case\n\t\t\t\tif (curcat == NotSpaceConst)\n\t\t\t\t{\n\t\t\t\t\tif (!Character.isWhitespace(ch))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 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\ti++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//curcat = -curcat;\n\t\t\t\t//--curcat;\n\t\t\t\tcurcat = -1 - curcat;\n\n\t\t\t\tif (chcategory != UnicodeCategory.forValue(curcat))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn false;\n\t}",
"public String categoryDesc() { //to show the description of the category\n String desc = \"\";\n if (category.equals(\"H\")) {\n desc = \"Trump category: Hardness\";\n } else if (category.equals(\"S\")) {\n desc = \"Trump category: Specific Gravity\";\n } else if (category.equals(\"C\")) {\n desc = \"Trump category: Cleavage\";\n } else if (category.equals(\"CA\")) {\n desc = \"Trump category: Crustal Abundance\";\n } else if (category.equals(\"EV\")) {\n desc = \"Trump category: Economic Value\";\n }\n return desc;\n }",
"public void setCategory (String mode) { category = mode; }",
"default List<String> getCategory(String category) {\n return new ArrayList<>(getCategories().get(category.toLowerCase()).values());\n }",
"private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }",
"public String getCategory();",
"public abstract String getCategory();",
"public abstract String getCategory();",
"public String FindCategory(double index){\n \n if(index < 18.5) \n return \"undernourished.\";\n\n if(index < 25) \n return \"regular.\";\n\n if(index < 30) \n return \"overweight.\";\n \n return \"obese.\"; //Could over accumulated with overweight in Test\n\n }",
"Integer checkCategory(Integer choice, \n List<DvdCategory> categories) throws DvdStoreException;",
"public void addCategory(String type) {\n\t\tif (type.equals(\"Cheese\")) {\n\t\t\taddIngredient(\"Pepperjack\");\n\t\t\taddIngredient(\"Mozzarella\");\n\t\t\taddIngredient(\"Cheddar\");\n\t\t}\n\t\tif (type.equals(\"Sauces\")) {\n\t\t\taddIngredient(\"Mayonnaise\");\n\t\t\taddIngredient(\"Baron Sauce\");\n\t\t\taddIngredient(\"Mustard\"); \n\t\t\taddIngredient(\"Ketchup\");\n\t\t}\n\t\tif (type.equals(\"Veggies\")) {\n\t\t\taddIngredient(\"Pickle\");\n\t\t\taddIngredient(\"Lettuce\");\n\t\t\taddIngredient(\"Tomato\");\n\t\t\taddIngredient(\"Onions\"); \n\t\t\taddIngredient(\"Mushrooms\");\n\t\t}\n\t}",
"public List<String> getCategories();",
"@Test\r\n\tpublic void testGetCategoryString() {\r\n\t\tManagedIncident incident = new ManagedIncident(\"jsmith\", Category.NETWORK, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Network\", incident.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident1 = new ManagedIncident(\"jsmith\", Category.DATABASE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Database\", incident1.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident2 = new ManagedIncident(\"jsmith\", Category.INQUIRY, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Inquiry\", incident2.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident3 = new ManagedIncident(\"jsmith\", Category.HARDWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Hardware\", incident3.getCategoryString());\r\n\t\t\r\n\t\tManagedIncident incident4 = new ManagedIncident(\"jsmith\", Category.SOFTWARE, Priority.LOW, \"Johnny\", \"lol\");\r\n\t\tassertEquals(\"Software\", incident4.getCategoryString());\r\n\t\t\r\n\t}",
"CodeType getCategory();",
"google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory();",
"@NonNull\n public static List<Category> getCategories() {\n if (CATEGORY == null) {\n CATEGORY = new ArrayList<>();\n CATEGORY.add(new Category(\"Bollywood\", R.drawable.bollywood, 1));\n CATEGORY.add(new Category(\"Hollywood\", R.drawable.hollywood3, 2));\n CATEGORY.add(new Category(\"Cricket\", R.drawable.cricket4, 3));\n CATEGORY.add(new Category(\"Science\", R.drawable.science1, 4));\n CATEGORY.add(new Category(\"Geography\", R.drawable.geography, 5));\n CATEGORY.add(new Category(\"History\", R.drawable.history, 6));\n }\n return CATEGORY;\n }",
"Category selectCategory(String name);",
"public int getCategory(){\n\t\treturn this.cat;\n\t}",
"List<ConfigCategory> getCategoryOfTypeAndDisplayName(String typeConstant, String catDisplayName);",
"private void checkCategoriaInDB(DB db ){\n\t\tString[] catDef = {\"Ambiente\", \"Animali\", \"Arte e Cultura\",\"Elettronica e Tecnologia\", \"Sport\", \"Svago\"};\n\t\tMap<Long, Categoria> categorie = db.getTreeMap(\"categorie\");\n\t\tfor(String nomeCat : catDef) {\n\t\t\tlong hashcode = (long)nomeCat.hashCode();\n\t\t\tif(!categorie.containsKey(hashcode))\n\t\t\t\tcategorie.put(hashcode, new Categoria(null ,nomeCat));\n\t\t}\n\t}",
"private static boolean CharInCategoryGroup(char ch, UnicodeCategory chcategory, String category, RefObject<Integer> i)\n\t{\n\t\ti.argValue++;\n\n\t\tint curcat = (short) category.charAt(i.argValue);\n\t\tif (curcat > 0)\n\t\t{\n\t\t\t// positive case - the character must be in ANY of the categories in the group\n\t\t\tboolean answer = false;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (!answer)\n\t\t\t\t{\n\t\t\t\t\t--curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\t// negative case - the character must be in NONE of the categories in the group\n\t\t\tboolean answer = true;\n\n\t\t\twhile (curcat != 0)\n\t\t\t{\n\t\t\t\tif (answer)\n\t\t\t\t{\n\t\t\t\t\t//curcat = -curcat;\n\t\t\t\t\t//--curcat;\n\t\t\t\t\tcurcat = -1 - curcat;\n\t\t\t\t\tif (chcategory == UnicodeCategory.forValue(curcat))\n\t\t\t\t\t{\n\t\t\t\t\t\tanswer = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti.argValue++;\n\t\t\t\tcurcat = (short) category.charAt(i.argValue);\n\t\t\t}\n\t\t\treturn answer;\n\t\t}\n\t}",
"private void suggestCategory() {\n String[] allCat = {\"Pizza\", \"Pasta\", \"Dessert\", \"Salad\", \"SoftDrinks\"};\n// for (ItemDTO i : allDetails) {\n// names.add(i.getName());\n// }\n\n TextFields.bindAutoCompletion(txtCat, allCat);\n }",
"public interface Categories {\n List<String> all();\n List<String> getAdCategories(Ad ad);\n void linkCategories(long id, String[] categories);\n}",
"Category getCategoryByName(String categoryName);",
"@FXML\n private String handleComboCategory(ActionEvent event)\n {\n String category;\n\n int selectedIndex = comboCategoryBox.getSelectionModel().getSelectedIndex();\n\n switch (selectedIndex)\n {\n case 0:\n category = \"blues\";\n break;\n case 1:\n category = \"hipHop\";\n break;\n case 2:\n category = \"pop\";\n break;\n case 3:\n category = \"rap\";\n break;\n case 4:\n category = \"rock\";\n break;\n case 5:\n category = \"techno\";\n break;\n case 6:\n txtOtherCategory.setVisible(true);\n category = txtOtherCategory.getText();\n break;\n default:\n throw new UnsupportedOperationException(\"Category not chosen\");\n }\n return category;\n }",
"@java.lang.Override public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }",
"static public Category getCategory(String categoryName){\n switch(categoryName) {\n case \"SPORTS\":\n return SPORTS;\n case \"HISTORY\":\n return HISTORY;\n case \"SCIENCE\":\n return SCIENCE;\n case \"MUSIC\":\n return MUSIC;\n default:\n return null;\n }\n }",
"public final List<String> getCategories() {\n return new ArrayList<>(questionGeneratorStrategyFactory.createPracticeQuestionStrategy().generateQuestions().keySet());\n }",
"public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }",
"public String getCategory(){\r\n\t\treturn this.category;\r\n\t}",
"public List<String> getTierOneAnswersCategories(Integer productId) {\n\tList<String> list = getHibernateTemplate().find(\"select cat.name from Category cat , Response resp, Request req where resp.requestId = req.id and req.productId=? and req.tier=1 and cat.categoryCode= resp.answer)\", productId); \n\treturn list;\n\n }",
"public void setCategory(String cat) {\t//TODO\n\t\tcategory = cat;\n\t}",
"public String getCategory() {\t//TODO - change to array list of categories\n\t\treturn category;\n\t}",
"private Category identifyCategory(Integer hcat) {\n\t\tCategory c = null;\n\t\t\n\t\tif (hcat != null) {\n\t\t\tc = this.categoryMap.get(Long.valueOf(hcat));\n\t\t\tif (c == null) {\n\t\t\t\tc = this.noCategory;\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\t\telse {\n\t\t\treturn this.noCategory;\n\t\t}\n\t}",
"@java.lang.Override\n public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }",
"public void setCategory (String category) {\n switch (category.toLowerCase()) {\n default -> this.category = Category.YOUTH;\n case \"novel\" -> this.category = Category.NOVEL;\n case \"theater\" -> this.category = Category.THEATER;\n case \"documentary\" -> this.category = Category.DOCUMENTARY;\n case \"speech\" -> this.category = Category.SPEECH;\n }\n }",
"public String getCategoryString(){\r\n\t\tMarketplaceConfig.Category c = MarketplaceConfig.Category.get(this.category);\r\n\t\tif(c == null || c.name() == null || \"\".equals(c.name())) return \"NONE\";\r\n\t\treturn c.name();\r\n\t}",
"public void setCategory(String category);",
"Category(int num) {\n this.num = num;\n }",
"public void setCategory(String cat)\n\t{\n\t\tif(cat!=null)\n\t\t\tthis.category = cat;\n\t}",
"public final EObject ruleCategory() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_2=null;\n AntlrDatatypeRuleToken lv_title_1_0 = null;\n\n AntlrDatatypeRuleToken lv_description_3_0 = null;\n\n EObject lv_pages_4_0 = null;\n\n EObject lv_pages_5_0 = null;\n\n\n enterRule(); \n \n try {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:322:28: ( (otherlv_0= 'category' ( (lv_title_1_0= ruleEString ) ) (otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) ) )? ( (lv_pages_4_0= rulePage ) ) ( (lv_pages_5_0= rulePage ) )* ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:323:1: (otherlv_0= 'category' ( (lv_title_1_0= ruleEString ) ) (otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) ) )? ( (lv_pages_4_0= rulePage ) ) ( (lv_pages_5_0= rulePage ) )* )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:323:1: (otherlv_0= 'category' ( (lv_title_1_0= ruleEString ) ) (otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) ) )? ( (lv_pages_4_0= rulePage ) ) ( (lv_pages_5_0= rulePage ) )* )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:323:3: otherlv_0= 'category' ( (lv_title_1_0= ruleEString ) ) (otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) ) )? ( (lv_pages_4_0= rulePage ) ) ( (lv_pages_5_0= rulePage ) )*\n {\n otherlv_0=(Token)match(input,15,FollowSets000.FOLLOW_15_in_ruleCategory626); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getCategoryAccess().getCategoryKeyword_0());\n \n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:327:1: ( (lv_title_1_0= ruleEString ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:328:1: (lv_title_1_0= ruleEString )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:328:1: (lv_title_1_0= ruleEString )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:329:3: lv_title_1_0= ruleEString\n {\n \n \t newCompositeNode(grammarAccess.getCategoryAccess().getTitleEStringParserRuleCall_1_0()); \n \t \n pushFollow(FollowSets000.FOLLOW_ruleEString_in_ruleCategory647);\n lv_title_1_0=ruleEString();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCategoryRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"title\",\n \t\tlv_title_1_0, \n \t\t\"EString\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:345:2: (otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) ) )?\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==13) ) {\n alt7=1;\n }\n switch (alt7) {\n case 1 :\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:345:4: otherlv_2= 'description' ( (lv_description_3_0= ruleEString ) )\n {\n otherlv_2=(Token)match(input,13,FollowSets000.FOLLOW_13_in_ruleCategory660); \n\n \tnewLeafNode(otherlv_2, grammarAccess.getCategoryAccess().getDescriptionKeyword_2_0());\n \n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:349:1: ( (lv_description_3_0= ruleEString ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:350:1: (lv_description_3_0= ruleEString )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:350:1: (lv_description_3_0= ruleEString )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:351:3: lv_description_3_0= ruleEString\n {\n \n \t newCompositeNode(grammarAccess.getCategoryAccess().getDescriptionEStringParserRuleCall_2_1_0()); \n \t \n pushFollow(FollowSets000.FOLLOW_ruleEString_in_ruleCategory681);\n lv_description_3_0=ruleEString();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCategoryRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"description\",\n \t\tlv_description_3_0, \n \t\t\"EString\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n\n }\n break;\n\n }\n\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:367:4: ( (lv_pages_4_0= rulePage ) )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:368:1: (lv_pages_4_0= rulePage )\n {\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:368:1: (lv_pages_4_0= rulePage )\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:369:3: lv_pages_4_0= rulePage\n {\n \n \t newCompositeNode(grammarAccess.getCategoryAccess().getPagesPageParserRuleCall_3_0()); \n \t \n pushFollow(FollowSets000.FOLLOW_rulePage_in_ruleCategory704);\n lv_pages_4_0=rulePage();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getCategoryRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"pages\",\n \t\tlv_pages_4_0, \n \t\t\"Page\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:385:2: ( (lv_pages_5_0= rulePage ) )*\n loop8:\n do {\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0==18) ) {\n alt8=1;\n }\n\n\n switch (alt8) {\n \tcase 1 :\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:386:1: (lv_pages_5_0= rulePage )\n \t {\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:386:1: (lv_pages_5_0= rulePage )\n \t // ../dk.itu.smdp.survey.xtext/src-gen/dk/itu/smdp/survey/xtext/parser/antlr/internal/InternalTaco.g:387:3: lv_pages_5_0= rulePage\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getCategoryAccess().getPagesPageParserRuleCall_4_0()); \n \t \t \n \t pushFollow(FollowSets000.FOLLOW_rulePage_in_ruleCategory725);\n \t lv_pages_5_0=rulePage();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getCategoryRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"pages\",\n \t \t\tlv_pages_5_0, \n \t \t\t\"Page\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public int getCategory(long days) {\n\t\tif (days >= 0 && days <= 30)\n\t\t\treturn 1;\n\t\telse if (days > 30 && days <= 60)\n\t\t\treturn 2;\n\t\telse if (days > 60 && days <= 90)\n\t\t\treturn 3;\n\t\telse if (days > 90)\n\t\t\t// else if (diff > 90 && diff < 120)\n\t\t\treturn 4;\n\t\t// else if (diff > 120 && diff < 150)\n\t\t// agedDebtors.setCategory(5);\n\t\t// else if (diff > 150 && diff < 180)\n\t\t// agedDebtors.setCategory(6);\n\t\treturn 0;\n\t}",
"private int getCategory(BodyDeclaration node) {\n switch(node.getNodeType()) {\n case ASTNode.METHOD_DECLARATION:\n MethodDeclaration methodDeclaration = (MethodDeclaration) node;\n if (methodDeclaration.isConstructor()) {\n return this.categories[CONSTRUCTOR_CATEGORY];\n }\n if (Flags.isStatic(methodDeclaration.getModifiers())) {\n return this.categories[STATIC_METHOD_CATEGORY];\n }\n return this.categories[METHOD_CATEGORY];\n case ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION:\n if (Flags.isStatic(node.getModifiers())) {\n return this.categories[STATIC_METHOD_CATEGORY];\n }\n return this.categories[METHOD_CATEGORY];\n case ASTNode.FIELD_DECLARATION:\n FieldDeclaration fieldDeclaration = (FieldDeclaration) node;\n if (Flags.isStatic(fieldDeclaration.getModifiers())) {\n return this.categories[STATIC_FIELD_CATEGORY];\n }\n return this.categories[FIELD_CATEGORY];\n case ASTNode.ENUM_CONSTANT_DECLARATION:\n return this.categories[STATIC_FIELD_CATEGORY];\n case ASTNode.TYPE_DECLARATION:\n case ASTNode.ENUM_DECLARATION:\n case ASTNode.ANNOTATION_TYPE_DECLARATION:\n AbstractTypeDeclaration abstractTypeDeclaration = (AbstractTypeDeclaration) node;\n if (Flags.isStatic(abstractTypeDeclaration.getModifiers())) {\n return this.categories[STATIC_TYPE_CATEGORY];\n }\n return this.categories[TYPE_CATEGORY];\n case ASTNode.INITIALIZER:\n Initializer initializer = (Initializer) node;\n if (Flags.isStatic(initializer.getModifiers())) {\n return this.categories[STATIC_INITIALIZER_CATEGORY];\n }\n return this.categories[INITIALIZER_CATEGORY];\n }\n return 0;\n }",
"public void setCatLevel(int value) {\n this.catLevel = value;\n }",
"ConfigCategory getCategoryOfTypeAndCode(String typeConstant, String categoryCode);",
"public String getCategory() {\n return \"论文\";\r\n }",
"@Override\n\t\t\t\tpublic String getKey() {\n\t\t\t\t\treturn \"category\";\n\t\t\t\t}",
"public RoomCategory getRoomCategory(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.roomcategory.v1.RoomCategory res){\n\t\tRoomCategory roomCategory = new RoomCategory();\n\t\t\n\t\troomCategory.setRoomTypeCode( res.getRoomTypeCode() );\n\t\troomCategory.setRoomTypeDescription( res.getRoomTypeDescription() );\n\t\t\n//\t\tCode to set the room description in UI\n\t\tString roomDescription = res.getRoomTypeDescription();\n\t\tif (roomDescription!=null && roomDescription.contains(\":\")) {\n\t\t\tint firstColonIndex=roomDescription.indexOf(\":\");\n\t\t\tint lastCOlonIndex= roomDescription.lastIndexOf(\":\");\n\t\t\tString removedString = (roomDescription.substring(firstColonIndex,lastCOlonIndex+1));\n\t\t\tString roomTypeToBediplayedonUI = roomDescription.replace(removedString, \"\");\n\t\t\t\n\t\t\troomCategory.setRoomTypeCode( res.getRoomTypeCode() + \"-RD-\" + roomDescription);\n\t\t\troomCategory.setRoomTypeDescription(roomTypeToBediplayedonUI);\n\t\t}\n\t\telse{\n\t\t\t//Start the fix of HBSI 52 - Phase 1 // Setting the default roomTypeCode and Description\n\t\t\troomCategory.setRoomTypeCode( res.getRoomTypeCode());\n\t\t\troomCategory.setRoomTypeDescription(res.getRoomTypeDescription());\n\t\t}\n\t\t //End the fix of HBSI 52 -Phase 1 \n\t\troomCategory.setRatePlanId( res.getRatePlanId() );\n\t\troomCategory.setRatePlanCode( res.getRatePlanCode() );\n\t\troomCategory.setRatePlanDescription( res.getRatePlanDescription() );\n\t\tif( res.getRateIndicator() != null ){\n\t\t\troomCategory.setRateIndicator( res.getRateIndicator() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setRateIndicator( \"\" );\n\t\t}\n\t\tif( res.getCorporateId() != null ){\n\t\t\troomCategory.setCorporateId( res.getCorporateId() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setCorporateId( \"\" );\n\t\t}\n\t\tif( res.getGuaranteeType() != null ){\n\t\troomCategory.setGuaranteeType( res.getGuaranteeType() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setGuaranteeType( \"\" );\n\t\t}\n\t\tif( res.getGuaranteeMethod() != null ){\n\t\troomCategory.setGuaranteeMethod( res.getGuaranteeMethod() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setGuaranteeMethod( \"\" );\n\t\t}\n\t\tif( res.getGuaranteeRequired() != null ){\n\t\troomCategory.setGuaranteeRequired( res.getGuaranteeRequired() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setGuaranteeRequired( \"\" );\n\t\t}\n\t\troomCategory.setRatePlanCategory( res.getRatePlanCategory() );\n\t\troomCategory.setStatus( res.getStatus() );\n\t\tif( res.getCurrency() != null ){\n\t\t\troomCategory.setCurrency( res.getCurrency() );\n\t\t}\n\t\telse{\n\t\t\troomCategory.setCurrency( \"\" );\n\t\t}\n\t\troomCategory.setPosnr( res.getPosnr() );\n\t\troomCategory.setOldPosnr( res.getOldPosnr() );\n\t\troomCategory.setMealplanDesc( res.getMealplanDesc() );\n\t\tif( res.getHotelId() != null ){\n\t\t\troomCategory.setHotelId( res.getHotelId().intValue() );\n\t\t}\n\t\tif( res.getRoomCategoryId() != null ){\n\t\t\troomCategory.setRoomCategoryId( res.getRoomCategoryId().intValue() );\n\t\t}\n\t\tif( res.getNoOfRoomsAvailable() != null ){\n\t\t\troomCategory.setNoOfRoomsAvailable( res.getNoOfRoomsAvailable().intValue() );\n\t\t}\n\t\tif( res.isRiskRoomCategory() != null ){\n\t\t\troomCategory.setRiskRoomCategory( res.isRiskRoomCategory().booleanValue() );\n\t\t}\n\t\tif( res.isAppleChoice() != null ){\n\t\t\troomCategory.setAppleChoice( res.isAppleChoice().booleanValue() );\n\t\t}\n\t\tif( res.getGuaranteeAmount() != null ){\n\t\t\troomCategory.setGuaranteeAmount( res.getGuaranteeAmount() );\n\t\t}\n\t\tif( res.getDisplayRoomPrice() != null ){\n\t\t\troomCategory.setDisplayRoomPrice( this.getRoomPrice( res.getDisplayRoomPrice() ) );\n\t\t}\n\t\tif( (res.getMealPlanType() != null) && (res.getMealPlanType().getCode() != null) ){\n\t\t\troomCategory.setMealPlanType( this.getMealPlanType( res.getMealPlanType() ) );\n\t\t}\n\t\tif( (res.getRoomPrices() != null) && (res.getRoomPrices().size() > 0) ){\n\t\t\tList<RoomPrice> roomPrices = new ArrayList<RoomPrice>();\n\t\t\tfor(int i=0; i < res.getRoomPrices().size(); i++){\n\t\t\t\tif( res.getRoomPrices().get(i) != null )\n\t\t\t\troomPrices.add( this.getRoomPrice( res.getRoomPrices().get(i) ) );\n\t\t\t}\n\t\t\troomCategory.setRoomPrices( roomPrices );\n\t\t}\n\t\tif( (res.getAmenities() != null) && (res.getAmenities().size() > 0) ){\n\t\t\tList<Amenity> amenities = new ArrayList<Amenity>(res.getAmenities().size());\n\t\t\tfor(int i=0; i < res.getAmenities().size(); i++){\n\t\t\t\tif( res.getAmenities().get(i) != null )\n\t\t\t\tamenities.add( this.getAmenity( res.getAmenities().get(i) ) );\n\t\t\t}\n\t\t\troomCategory.setAmenities( amenities );\n\t\t}\n\t\t\n\t\tif(res!=null && res.getHbsiRates()!=null && res.getHbsiRates().size()>0){\n\t\t\tList<HBSiRates> hbsiRates = new ArrayList<HBSiRates>(res.getHbsiRates().size());\n\t\t\tfor(int hbsiRate=0;hbsiRate<res.getHbsiRates().size();hbsiRate++)\n\t\t\t{\n\t\t\t\tif(res.getHbsiRates().get(hbsiRate)!=null)\n\t\t\t\t{\n\t\t\t\t\thbsiRates.add(this.getHBSiRate(res.getHbsiRates().get(hbsiRate)));\n\t\t\t\t\t//roomCategory.getHbsiRates().add(hbsiRate, getHBSiRate(res.getHbsiRates().get(hbsiRate)));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\troomCategory.setHbsiRates(hbsiRates);\n\t\t}\n\t\t\n\t\t//set Cancel Policy for room category\n\t\tif(res!=null && res.getCancelPolicy()!=null && res.getCancelPolicy().size()>0)\n\t\t{\n\t\t\tList<com.kcdata.abe.data.dto.CancelPolicy> canccelPolicies = new ArrayList<com.kcdata.abe.data.dto.CancelPolicy>(res.getCancelPolicy().size());\n\t\t\tfor(int cancelPolicy=0;cancelPolicy<res.getCancelPolicy().size();cancelPolicy++)\n\t\t\t{\n\t\t\t\tif(res.getCancelPolicy().get(cancelPolicy)!=null)\n\t\t\t\t{\n\t\t\t\t\tcanccelPolicies.add(this.getCancelPolicy(res.getCancelPolicy().get(cancelPolicy)));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\troomCategory.setCancelPolicy(canccelPolicies);\n\t\t}\n\t\treturn roomCategory;\n\t}",
"private static void catList() {\n\t\tSystem.out.println(\"List of preset Categories\");\n\t\tSystem.out.println(\"=========================\");\n\t\tSystem.out.println(\n\t\t\t\t\"Family\\nTeen\\nThriller\\nAnimated\\nSupernatural\\nComedy\\nDrama\\nQuirky\\nAction\\nComing of age\\nHorror\\nRomantic Comedy\\n\\n\");\n\t}",
"void selectCategory() {\n // If user is the active player, ask for the user's category.\n if (activePlayer.getIsHuman()) {\n setGameState(GameState.CATEGORY_REQUIRED);\n }\n // Or get AI active player to select best category.\n else {\n Card activeCard = activePlayer.getTopMostCard();\n activeCategory = activeCard.getBestCategory();\n }\n\n logger.log(\"Selected category: \" + activeCategory + \"=\" +\n activePlayer.getTopMostCard().getCardProperties()\n .get(activeCategory));\n logger.log(divider);\n\n setGameState(GameState.CATEGORY_SELECTED);\n }",
"int getProblemCategory();",
"public Set<String> getCategory(){return category;}",
"public String getCategory() {\n return this.category;\n }",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"public String getCategory() {\n return this.category;\n }",
"public String category() {\n return this.category;\n }",
"public String category() {\n return this.category;\n }",
"public List<String> getCategoryList(String cat) {\n ArrayList<String> ls = new ArrayList<String>();\n String[] keys = sortedStringKeys();\n\n for (String s : keys) {\n if (s.startsWith(cat)) { ls.add(getProperty(s)); }\n }\n return ls;\n }",
"public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }",
"private void categorizeData(){\n\t\tfor(String s :userData.keySet()){\n\t\t\tTransactionData trans = userData.get(s);\n\t\t\tif(trans.getCategory() == 'I'){\n\t\t\t\tignorableTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'R'){\n\t\t\t\trestaurantTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'G'){\n\t\t\t\tgaspumpTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'M'){\n\t\t\t\tmarketTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'T'){\n\t\t\t\ttaxiTransactions.add(trans);\n\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'S'){\n\t\t\t\tstayTransactions.add(trans);\n\t\t\t}\n\t\t\tif(trans.getCategory() == 'U'){\n\t\t\t\tunknownTransactions.add(trans);\n\t\t\t}\n\t\t}\n\t}",
"CategoriesType createCategoriesType();",
"CategoriesType createCategoriesType();",
"public Category(String n) {\n this.name = n;\n }",
"CodeOrNullListType getCategoryList();",
"private String getCategoriesForDebugging() {\n StringBuilder sb = new StringBuilder();\n String sep = \"\";\n for (SuggestionsSection section : mSections.values()) {\n sb.append(sep);\n sb.append(section.getCategory());\n sep = \", \";\n }\n\n return sb.toString();\n }",
"public void setCategory(String category){\n this.category = category;\n }",
"private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }",
"private boolean checkCaTegoryLegitness(int[] dice, int category) {\n\t\t// our boolean that is false at the beginning.\n\t\tboolean legitnessStatus = false;\n\t\t// we don't need to check anything for one to six or for check so\n\t\t// boolean\n\t\t// will be true. we don't need to check for one to six because if player\n\t\t// chose one to six we score++ every time we get that number\n\t\t// in the dice. and if there is no that number than the score\n\t\t// automatically will be 0.\n\t\tif (category >= 1 && category <= 6 || category == CHANCE) {\n\t\t\tlegitnessStatus = true;\n\t\t} else {\n\t\t\t// but if player chose something other than one to six or chance we\n\t\t\t// make 6 array lists.\n\t\t\tArrayList<Integer> ones = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> twos = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> threes = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fours = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> fives = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> sixes = new ArrayList<Integer>();\n\t\t\t// after that we get ones, twos and etc. until six from the dice\n\t\t\t// numbers we randomly got and add that numbers in the array it\n\t\t\t// belongs. for example if the integer on first dice is 5 we add 1\n\t\t\t// in array list called fives. finally, arrays size will give us how\n\t\t\t// many that number we have in our dices.\n\t\t\tfor (int i = 0; i < N_DICE; i++) {\n\t\t\t\tif (dice[i] == 1) {\n\t\t\t\t\tones.add(1);\n\t\t\t\t} else if (dice[i] == 2) {\n\t\t\t\t\ttwos.add(1);\n\t\t\t\t} else if (dice[i] == 3) {\n\t\t\t\t\tthrees.add(1);\n\t\t\t\t} else if (dice[i] == 4) {\n\t\t\t\t\tfours.add(1);\n\t\t\t\t} else if (dice[i] == 5) {\n\t\t\t\t\tfives.add(1);\n\t\t\t\t} else if (dice[i] == 6) {\n\t\t\t\t\tsixes.add(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// after we know how many ones, twos etc. we have its easy to check.\n\t\t\t// for THREE_OF_A_KIND if there is any of the arrays that size is\n\t\t\t// equal or more than 3 legitnessStatus should get true.\n\t\t\tif (category == THREE_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 3 || twos.size() >= 3 || threes.size() >= 3\n\t\t\t\t\t\t|| fours.size() >= 3 || fives.size() >= 3\n\t\t\t\t\t\t|| sixes.size() >= 3) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FOUR_OF_A_KIND if there is any of the arrays that size is\n\t\t\t\t// equal or more than 4 legitnessStatus should get true.\n\t\t\t} else if (category == FOUR_OF_A_KIND) {\n\t\t\t\tif (ones.size() >= 4 || twos.size() >= 4 || threes.size() >= 4\n\t\t\t\t\t\t|| fours.size() >= 4 || fives.size() >= 4\n\t\t\t\t\t\t|| sixes.size() >= 4) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for FULL_HOUSE we want any of our array list size to be equal\n\t\t\t\t// to three and after that we have that we want one more array\n\t\t\t\t// to be\n\t\t\t\t// equal to two. that means that we will have three similar dice\n\t\t\t\t// and two more similar dice.\n\t\t\t} else if (category == FULL_HOUSE) {\n\t\t\t\tif (ones.size() == 3 || twos.size() == 3 || threes.size() == 3\n\t\t\t\t\t\t|| fours.size() == 3 || fives.size() == 3\n\t\t\t\t\t\t|| sixes.size() == 3) {\n\t\t\t\t\tif (ones.size() == 2 || twos.size() == 2\n\t\t\t\t\t\t\t|| threes.size() == 2 || fours.size() == 2\n\t\t\t\t\t\t\t|| fives.size() == 2 || sixes.size() == 2) {\n\t\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// there is only 3 way we can get SMALL_STRAIGHT. these are if\n\t\t\t\t// dices show: 1,2,3,4 or 2,3,4,5, or 3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one. and so on for other two\n\t\t\t\t// ways.\n\t\t\t} else if (category == SMALL_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (threes.size() == 1 && fours.size() == 1\n\t\t\t\t\t\t&& fives.size() == 1 && sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// for LARGE_STRAIGHT there is only 2 ways. these are:1,2,3,4,5\n\t\t\t\t// or 2,3,4,5,6. for first one it\n\t\t\t\t// means we need our first array size to be one AND our second\n\t\t\t\t// array size to be one AND our third array size to be one AND\n\t\t\t\t// out fourth array list size to be one AND our fifth array list\n\t\t\t\t// size to be one. similar for second way starting from second\n\t\t\t\t// array list and going through to last sixth array list.\n\t\t\t} else if (category == LARGE_STRAIGHT) {\n\t\t\t\tif (ones.size() == 1 && twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t} else if (twos.size() == 1 && threes.size() == 1\n\t\t\t\t\t\t&& fours.size() == 1 && fives.size() == 1\n\t\t\t\t\t\t&& sixes.size() == 1) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t\t// and for YAHTZEE we want any of our array list size to be\n\t\t\t\t// five. it will mean that all dices show same thing. because if\n\t\t\t\t// for example array list ones size is five it means that we\n\t\t\t\t// added 1 in that array 5 times and it means that we see 5 same\n\t\t\t\t// number on all dices.\n\t\t\t} else if (category == YAHTZEE) {\n\t\t\t\tif (ones.size() == 5 || twos.size() == 5 || threes.size() == 5\n\t\t\t\t\t\t|| fours.size() == 5 || fives.size() == 5\n\t\t\t\t\t\t|| sixes.size() == 5) {\n\t\t\t\t\tlegitnessStatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finally it will return boolean of true or false.\n\t\treturn legitnessStatus;\n\t}",
"public String getCategory() {\r\n return category;\r\n }",
"public static Category getCategoryStringFromInt(int num) {\n for (Category item : Category.values ()) {\n if (item.num == num) {\n return item;\n }\n }\n return null;\n }",
"public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}",
"@Override\n public String getCategory() {\n return category;\n }",
"public String categoryTech() {\n\t\treturn \"Computer Science\";\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.print(\"\\nAdivinhe a categoria pela idade:\");\r\n\t\t\r\n\t\tint idade;\r\n\t\tScanner leia = new Scanner(System.in);\r\n\t\tidade = leia.nextInt();\r\n\t\t\r\n\t\tif(idade >= 10 && idade <= 14)\r\n\t\t{\r\n\t\t System.out.print(\"\\nCategoria Infantil\");\r\n\t\t}\r\n\t\telse if(idade >= 15 && idade <= 17)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"\\nCategoria Juvenil\");\r\n\t\t}\r\n\t\telse if(idade >= 18 && idade <=25)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"\\nCategoria Adulto\");\t\r\n\t\t}\t\r\n\t\t\r\n\r\n\t}",
"public void setCategory(Category cat) {\n this.category = cat;\n }",
"private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }",
"public void selectCategory() {\n\t\t\r\n\t}",
"public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }",
"public void category(String menuCategory) {\n for (WebElement element : categories) {\n\n if (menuCategory.equals(CategoryConstants.NEW_IN.toString())) {\n String newin = menuCategory.replace(\"_\", \" \");\n menuCategory = newin;\n }\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String elementText = element.getText();\n if (elementText.equals(menuCategory)) {\n element.click();\n\n break;\n }\n }\n }",
"private CategoriaLexica reconoceCategoria(String palabra) {\n\t\t\t\n\t\t// Comprobamos que no sea el fin de fichero\n\t\tif (palabra.equals(\"fin\"))\n\t\t\treturn CategoriaLexica.TFin;\n\t\t\n\t\t// Buscamos la categoria lexica a la que pertenece la palabra\n\t\tCategoriaLexica c = simbolo(palabra);\n\t\tif (c != null) \n\t\t\treturn c;\n\t\t\n\t\t// Miramos si es una palabra reservada\n\t\tif (palabrasReservadas.esReservada(palabra))\t\n\t\t\treturn CategoriaLexica.PalabraReservada;\n\t\t\n\t\t// Reconocer Identificadores\n\t\t// --------------------------------------------------------------\n\t\tPattern iden = Pattern.compile(\"([a-z]|á|é|í|ó|ú|ñ)([a-z]|[A-z]|[0-9]|á|é|í|ó|ú|ñ|Ñ)*\");\n\t\tMatcher m = iden.matcher(palabra);\n\t\t\n\t\tif (m.matches())\t\t\t\n\t\t\treturn CategoriaLexica.Identificador;\n\t\t\n\t\t// Reconocer Naturales o Enteros Pos \n\t\t// -------------------------------------------------------------- \n\t\tPattern natural = Pattern.compile(\"([0-9]|[1-9][0-9]*)\");\n\t\tm = natural.matcher(palabra);\t\n\t\t\n\t\tif (m.matches())\t\n\t\t\treturn CategoriaLexica.LitNatural;\n\t\t\n\t\t// Reconocer Enteros Negativos \n\t\t// -------------------------------------------------------------- \n\t\tPattern enteroNegativo = Pattern.compile(\"-[1-9][0-9]*\");\n\t\tm = enteroNegativo.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitEntero;\n\t\t \n\t\t// Reconocer Reales\n\t\t// -------------------------------------------------------------- \n\t\t// Forma Decimal \n\t\tPattern realDecimal = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)\\\\.([0-9]|[0-9]*[1-9])\");\n\t\tm = realDecimal.matcher(palabra);\n\t\t \n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\n\t\t// Forma Exponencial\n\t\tPattern realExponencial = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)(E|e)-?([0-9]|[1-9][0-9]*)\");\n\t\tm = realExponencial.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\t\t\n\t\t// Forma Decimal+Exp\n\t\tPattern realDecimalExponencial = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)\\\\.([0-9]|[0-9]*[1-9])\" +\n\t\t\t\t\"(E|e)-?([0-9]|[1-9][0-9]*)\");\n\t\tm = realDecimalExponencial.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\t\t\n\t\t// Reconocer Caracter\n\t\t// -------------------------------------------------------------- \n\t\tPattern caracter = Pattern.compile(\"'([^\\\\\\\\]|\\\\\\\\[tnr\\\\\\\\'])'\");\n\t\tm = caracter.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitCaracter;\n\t\t\n\t\t// Si no ha coincidido con ninguna otra expresion, es que el tipo es erroneo\n\t\treturn CategoriaLexica.TError;\t\n\t}",
"public String getCategory() {\n return category;\n }",
"public List<String> getCategories(Boolean internationalSelected){\n\t\tif (internationalSelected) {\n\t\t\treturn _intCategories;\n\t\t}\n\t\telse {\n\t\t\treturn _nzCategories;\n\t\t}\n\t}",
"public int getCategory() {\r\n\t\treturn category;\r\n\t}",
"CatType catType();",
"public String getCategory()\n\t{\n\t\treturn category;\n\t}",
"public String[] getCategoryList(){\n return new String[]{\n \"HIDDENOPERATOR\"\n };\n }"
] | [
"0.67147005",
"0.6693068",
"0.65589494",
"0.64980984",
"0.6325695",
"0.619408",
"0.6064879",
"0.60601693",
"0.60601693",
"0.6032222",
"0.6004948",
"0.5978063",
"0.59116316",
"0.59046894",
"0.59036046",
"0.58748156",
"0.5843288",
"0.5811989",
"0.57801396",
"0.5777553",
"0.5772542",
"0.5772542",
"0.5712908",
"0.57032",
"0.57019395",
"0.5697816",
"0.56897336",
"0.56872964",
"0.56610906",
"0.5657998",
"0.5651632",
"0.5650806",
"0.5629855",
"0.56152296",
"0.56019944",
"0.55981183",
"0.55843186",
"0.55835587",
"0.5581135",
"0.5544267",
"0.5541166",
"0.5535964",
"0.55347174",
"0.5534096",
"0.55287045",
"0.55200744",
"0.5511729",
"0.5509904",
"0.5503279",
"0.55009407",
"0.54987097",
"0.5495554",
"0.54752916",
"0.5471999",
"0.54558593",
"0.54551077",
"0.5449561",
"0.5448215",
"0.543153",
"0.5422495",
"0.5421898",
"0.541451",
"0.5389108",
"0.5388554",
"0.53852594",
"0.53671473",
"0.5359485",
"0.5350383",
"0.5337741",
"0.53371793",
"0.53371793",
"0.53340626",
"0.53284025",
"0.5325887",
"0.5321517",
"0.5321517",
"0.5321275",
"0.53170836",
"0.5315343",
"0.53149813",
"0.5313943",
"0.53123665",
"0.53039354",
"0.5299622",
"0.52866197",
"0.52836657",
"0.5280942",
"0.5275455",
"0.52741194",
"0.5273892",
"0.52714473",
"0.5259735",
"0.52524847",
"0.5248108",
"0.524728",
"0.52358913",
"0.52310604",
"0.52302575",
"0.5223075",
"0.52226627"
] | 0.5360733 | 66 |
Check if a character (ascii) appears next in the input. | private boolean CHAR(char ch) {
if (in >= input.length()) return false;
int len = input.nextLength(in);
int code = input.nextChar(in, len);
if (code != ch) return false;
in += len;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasChar();",
"boolean hasHasCharacter();",
"public static boolean isAscii(char ch) {\n/* 403 */ return (ch < '');\n/* */ }",
"private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static boolean isAsciiControl(char ch) {\n/* 441 */ return (ch < ' ' || ch == '');\n/* */ }",
"public boolean isAscii()\n { \n for (int i=0; i<val.length(); ++i)\n { \n int c = val.charAt(i);\n if (c > 0x7f) return false;\n }\n return true;\n }",
"public boolean characterInput(char c);",
"public abstract boolean isStarterChar(char c);",
"public boolean checkForChar(String str) {\n\t\tif (str.contains(\"a\") || str.contains(\"A\") || str.contains(\"e\") || str.contains(\"E\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TO DO\n\n\t\treturn false;\n\t}",
"public static boolean isAsciiAlpha(char ch) {\n/* 460 */ return (isAsciiAlphaUpper(ch) || isAsciiAlphaLower(ch));\n/* */ }",
"boolean getHasCharacter();",
"public boolean isChar(char c) \n\t{\n\t\tif (this.numBytes==1 && (charBytes[0]==c))\n\t\t\treturn true; \n\t\treturn false; \n\t}",
"private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }",
"public abstract boolean matches(char c);",
"public boolean isChar(String x) {\n\t\tfor (int i = 0; i < x.length(); i++) {\n\t\t\tchar c = x.charAt(i);\n\t\t\tif ((c == '-' || c == '+') && x.length() > 1)\n\t\t\t\tcontinue;\n\t\t\tif (((int) c > 64 && (int) c < 90) || ((int) c > 96 && (int) c < 123))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean checkChar(String s1, String s2);",
"public static boolean hasNextChar() {\n \t boolean result = scanner.hasNext();\n \t return result;\n }",
"boolean contains(char ch) {\n return _letters.indexOf(ch) >= 0;\n }",
"public static boolean isAsciiPrintable(char ch) {\n/* 422 */ return (ch >= ' ' && ch < '');\n/* */ }",
"private boolean isChar(char c){\n\t\tif(Character.isISOControl(c))\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean isEquivalent(char character, char anothercharacter);",
"public static boolean isCharacter(String word) {\r\n\t\treturn word.length() == 1;\r\n\t}",
"private boolean isOK(char ch) {\n if(String.valueOf(ch).matches(\"[<|\\\\[|\\\\-|\\\\||&|a-z|!]\")){\n return true;\n }\n return false;\n }",
"boolean eatChar (char c) {\n if (getChar () == c) { \n m_pos++;\n return true;\n }\n return false;\n }",
"public boolean isSpecialCharacter(String enteredCmd) {\n Pattern regex = Pattern.compile(\"[%@#€]+\");\n Matcher m = regex.matcher(enteredCmd);\n return m.matches();\n }",
"public static boolean isAsciiAlphanumeric(char ch) {\n/* 536 */ return (isAsciiAlpha(ch) || isAsciiNumeric(ch));\n/* */ }",
"public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }",
"public static boolean validAtom(char atom)\n\t{\n\t\tchar temp = Character.toUpperCase(atom);\n\t\treturn temp == 'C' || temp == 'H' || temp == 'O';\n\t}",
"boolean contains(char c) {\n for (char x : _chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"private boolean isValid() {\n return Character.isLetter(c);\n }",
"private static boolean isHex(char p_char) {\n return (p_char <= 'f' && (fgLookupTable[p_char] & ASCII_HEX_CHARACTERS) != 0);\n }",
"boolean contains(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return true;\n }\n }\n return false;\n }",
"public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }",
"public static boolean isIUPAC(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U':\n\t case 'R':\n\t case 'Y':\n\t case 'S':\n\t case 'W':\n\t case 'K':\n\t case 'M':\n\t case 'B':\n\t case 'D':\n\t case 'H':\n\t case 'V':\n\t case 'N':\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u':\n\t case 'r':\n\t case 'y':\n\t case 's':\n\t case 'w':\n\t case 'k':\n\t case 'm':\n\t case 'b':\n\t case 'd':\n\t case 'h':\n\t case 'v':\n\t case 'n': return true;\n\t default: return false;\n\t\t}\n\t}",
"boolean contains(char ch) {\n String check = Character.toString(ch);\n return _chars.contains(check);\n }",
"private static boolean m127620a(char c) {\n return Pattern.compile(\"[一-龥]\").matcher(String.valueOf(c)).matches();\n }",
"private\n static\n boolean\n isHexChar( char ch )\n {\n return ( ch >= '0' && ch <= '9' ) ||\n ( ch >= 'a' && ch <= 'f' ) ||\n ( ch >= 'A' && ch <= 'F' );\n }",
"private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }",
"public static boolean checkchar(String sentence){\n for (int i =0; i < sentence.length(); i++){ //just compare for the whole length \n if (Character.isLetter(sentence.charAt(i))==false){ //if it is not a letter\n return false; //return false\n }\n return true; //otherwise return true\n }\n return true;\n}",
"private boolean isValid(char input) {\n if (this.isLetter(input) || this.isDigit(input) || this.isOperator(input)\n || this.isIgnored(input)) {\n return true;\n } else return false;\n }",
"public boolean isValidForString(String str, char charCode, int position);",
"private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }",
"private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }",
"private static boolean isHex(char c) {\n\t\tboolean result = false;\n\t\tif (Character.isDigit(c)) {\n\t\t\tresult = true;\n\t\t}\n\t\telse if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f') {\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}",
"public boolean isValidChar(char c) {\n\t\tif (Character.isIdentifierIgnorable(c))\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn renderer.getFont().canDisplay(c);\r\n\t}",
"private boolean checkNameChar(String name) {\n\t\tString patternStr = \"[a-zA-Z]+\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(name);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}",
"public static boolean isAsciiAlphaLower(char ch) {\n/* 498 */ return (ch >= 'a' && ch <= 'z');\n/* */ }",
"private static int specialChar(char ch) {\n if ((ch > '\\u0621' && ch < '\\u0626') ||\n (ch == '\\u0627') ||\n (ch > '\\u062E' && ch < '\\u0633') ||\n (ch > '\\u0647' && ch < '\\u064A') ||\n (ch == '\\u0629')) {\n return 1;\n } else if (ch >= '\\u064B' && ch<= '\\u0652') {\n return 2;\n } else if (ch >= 0x0653 && ch <= 0x0655 ||\n ch == 0x0670 ||\n ch >= 0xFE70 && ch <= 0xFE7F) {\n return 3;\n } else {\n return 0;\n }\n }",
"boolean alreadyAdded(char c) {\n for (char x :_chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"public boolean nextCodePoint() throws IOException\n {\n font.ensureOpen();\n\n if (codePoint == null)\n {\n codePoint = freetype.FT_Get_First_Char(face, glyphIndex);\n }\n else if (glyphIndex.getValue() == 0)\n {\n return false;\n }\n else\n {\n codePoint = freetype.FT_Get_Next_Char(face, codePoint, glyphIndex);\n }\n\n return glyphIndex.getValue() != 0;\n }",
"public static boolean isUniqueChars(String str) {\n\t if(str.length() > 128) return false;\n\t \n\t //created hash table boolean to flag duplicate characters\n\t boolean [] check = new boolean [128];\n\t \n\t //run a for look in order to iterate through the string.\n for(int i = 0; i < str.length(); i++){\n //convert the characters of the string array into integers\n int val = str.charAt(i);\n //check the hash table for past characters seen, there are 128 ascii codes\n\t if(check[val]) return false;\n\t //turn on the true flag for characters you are seeing\n\t check[val] = true;\n\t }\n\t \n\t //pass the hash table therefore it is unique and true;\n\t return true;\n\n\t}",
"private static boolean isEmoji(char ch){\n return ch == 0xd83c || ch == 0xd83d;\n }",
"private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }",
"public boolean contains(char ch)\n\t{\n\t\treturn str.contains(Character.toString(ch));\n\t}",
"private boolean ifAlphabetOnly(String str){\n return str.chars().allMatch(Character :: isLetter);\n }",
"static boolean isCharacter(char c) {\n\t\t\tswitch (c) {\n\t\t\t\tcase CHARACTER:\n\t\t\t\tcase CHARACTER_UPPER:\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public static char checkInput() {\r\n\t\tchar ch = ' ';\r\n\t\tboolean check = true;\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tch = input.next(\".\").charAt(0);\t\t// samo jedan karakter dozvoljen\r\n\t\t\t\tcheck = false;\r\n\t\t\t}\r\n\t\t\tcatch (Exception e) {\t\t// hvatanje greske\r\n\t\t\t\tSystem.out.println(\"Pogresan unos, samo jedan karakter dozvoljen! Probaj ponovo:\");\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t}\r\n\t\t} while (check);\r\n\t\treturn ch;\r\n\t}",
"public boolean isCharacter(char a) {\n if (a >= 'a' && a <= 'z' || a >= 'A' && a <= 'Z' || a >= '0' && a <= '9' || a == '_')\n return true;\n return false;\n }",
"private boolean isGrLetter(char ch) {\n /*if ( ( (ch >= 'á') && (ch <= 'ù')) || ( (ch >= 'Á') && (ch <= 'Ù')) ||\n (ch == 'Ü') || (ch == 'Ý') || (ch == 'Þ') || (ch == 'ß') ||\n (ch == 'ü') || (ch == 'ý') || (ch == 'þ') ||\n (ch == '¢') || (ch == '¸') || (ch == '¹') || (ch == 'º') ||\n (ch == '¼') || (ch == '¾') || (ch == '¿') ||\n (ch == 'ú') || (ch == 'û') || (ch == 'À') || (ch == 'à')) {*/\n if ( ( (ch >= '\\u03b1') && (ch <= '\\u03c9')) || ( (ch >= '\\u0391') && (ch <= '\\u03a9')) ||\n \t(ch == '\\u03ac') || (ch == '\\u03ad') || (ch == '\\u03ae') || (ch == '\\u03af') ||\n \t(ch == '\\u03cc') || (ch == '\\u03cd') || (ch == '\\u03ce') ||\n \t(ch == '\\u0386') || (ch == '\\u0388') || (ch == '\\u0389') || (ch == '\\u038a') ||\n \t(ch == '\\u038c') || (ch == '\\u038e') || (ch == '\\u038f') ||\n \t(ch == '\\u03ca') || (ch == '\\u03cb') || (ch == '\\u0390') || (ch == '\\u03b0')) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"private boolean isEnLetter(char ch) {\n if ( ( (ch >= 'a') && (ch <= 'z')) || ( (ch >= 'A') && (ch <= 'Z'))) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"public static Boolean Letter(String arg){\n\t\tif(arg.matches(\"\\\\p{L}{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private byte ensureIsInAlphabet(byte input) {\n return (byte)(ALPHABET_START + (Math.abs(input) % ALPHABET_SIZE));\n }",
"public static boolean isAsciiAlphaUpper(char ch) {\n/* 479 */ return (ch >= 'A' && ch <= 'Z');\n/* */ }",
"char nextChar();",
"public static boolean lettersCheck(String name) {\r\n\t\treturn name.matches(\"^[\\\\p{L} .'-]+$\");\r\n\t}",
"boolean checkName (String name){\r\n \r\n // Use for loop to check each character\r\n for (int i = 0; i < name.length(); i++) {\r\n // If character is below 'A' in Unicode table then return false\r\n if (name.charAt(i) < 65 && name.charAt(i) != 32 && name.charAt(i) != 10){\r\n return false;\r\n }\r\n // Else if character is between 'Z' and 'a' in unicode table,\r\n // then return false\r\n else if (name.charAt(i) > 90 && name.charAt(i) < 97){\r\n return false;\r\n }\r\n else if (name.charAt(i) > 122)\r\n return false;\r\n }\r\n return true;\r\n }",
"private static boolean isAlphanum(char p_char) {\n return (p_char <= 'z' && (fgLookupTable[p_char] & MASK_ALPHA_NUMERIC) != 0);\n }",
"private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }",
"public static int checkCharType(char input){\n\n // Scanner scanner = new Scanner(System.in);\n // System.out.println(\"Enter a Character : \");\n // char input = scanner.next().charAt(0);\n //scanner.close();\n\n if(input >='a' && input <= 'z'){\n System.out.println(\"Small case Letter.\");\n return 1;\n }\n else if(input >='A' && input <= 'Z'){\n System.out.println(\"Capital Letter.\");\n return 2;\n }\n else if(input >='0' && input <= '9'){\n System.out.println(\"A Digit.\");\n return 3;\n }\n else{\n System.out.println(\"Special Character.\");\n return 4;\n }\n }",
"public static boolean onlyDigitsAscii(String input) {\n if (input.length() != 0) {\n int i = 0;\n while (i < input.length()) {\n int ascii = (int) input.charAt(i);\n if (48 <= ascii && ascii <= 57) {\n i++;\n } else {\n return false;\n }\n }\n }\n return false;\n }",
"private boolean isAlfabetico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase 'A':\r\n\t\t\treturn true;\r\n\t\tcase 'B':\r\n\t\t\treturn true;\r\n\t\tcase 'C':\r\n\t\t\treturn true;\r\n\t\tcase 'D':\r\n\t\t\treturn true;\r\n\t\tcase 'E':\r\n\t\t\treturn true;\r\n\t\tcase 'F':\r\n\t\t\treturn true;\r\n\t\tcase 'G':\r\n\t\t\treturn true;\r\n\t\tcase 'H':\r\n\t\t\treturn true;\r\n\t\tcase 'I':\r\n\t\t\treturn true;\r\n\t\tcase 'J':\r\n\t\t\treturn true;\r\n\t\tcase 'K':\r\n\t\t\treturn true;\r\n\t\tcase 'L':\r\n\t\t\treturn true;\r\n\t\tcase 'M':\r\n\t\t\treturn true;\r\n\t\tcase 'N':\r\n\t\t\treturn true;\r\n\t\tcase 'Ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'O':\r\n\t\t\treturn true;\r\n\t\tcase 'P':\r\n\t\t\treturn true;\r\n\t\tcase 'Q':\r\n\t\t\treturn true;\r\n\t\tcase 'R':\r\n\t\t\treturn true;\r\n\t\tcase 'S':\r\n\t\t\treturn true;\r\n\t\tcase 'T':\r\n\t\t\treturn true;\r\n\t\tcase 'U':\r\n\t\t\treturn true;\r\n\t\tcase 'V':\r\n\t\t\treturn true;\r\n\t\tcase 'W':\r\n\t\t\treturn true;\r\n\t\tcase 'X':\r\n\t\t\treturn true;\r\n\t\tcase 'Y':\r\n\t\t\treturn true;\r\n\t\tcase 'Z':\r\n\t\t\treturn true;\r\n\t\tcase 'a':\r\n\t\t\treturn true;\r\n\t\tcase 'b':\r\n\t\t\treturn true;\r\n\t\tcase 'c':\r\n\t\t\treturn true;\r\n\t\tcase 'd':\r\n\t\t\treturn true;\r\n\t\tcase 'e':\r\n\t\t\treturn true;\r\n\t\tcase 'f':\r\n\t\t\treturn true;\r\n\t\tcase 'g':\r\n\t\t\treturn true;\r\n\t\tcase 'h':\r\n\t\t\treturn true;\r\n\t\tcase 'i':\r\n\t\t\treturn true;\r\n\t\tcase 'j':\r\n\t\t\treturn true;\r\n\t\tcase 'k':\r\n\t\t\treturn true;\r\n\t\tcase 'l':\r\n\t\t\treturn true;\r\n\t\tcase 'm':\r\n\t\t\treturn true;\r\n\t\tcase 'n':\r\n\t\t\treturn true;\r\n\t\tcase 'ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'o':\r\n\t\t\treturn true;\r\n\t\tcase 'p':\r\n\t\t\treturn true;\r\n\t\tcase 'q':\r\n\t\t\treturn true;\r\n\t\tcase 'r':\r\n\t\t\treturn true;\r\n\t\tcase 's':\r\n\t\t\treturn true;\r\n\t\tcase 't':\r\n\t\t\treturn true;\r\n\t\tcase 'u':\r\n\t\t\treturn true;\r\n\t\tcase 'v':\r\n\t\t\treturn true;\r\n\t\tcase 'w':\r\n\t\t\treturn true;\r\n\t\tcase 'x':\r\n\t\t\treturn true;\r\n\t\tcase 'y':\r\n\t\t\treturn true;\r\n\t\tcase 'z':\r\n\t\t\treturn true;\r\n\t\tcase ' ':\r\n\t\t\treturn true;\r\n\t\tcase '*':\r\n\t\t\treturn true;// debido a búsquedas\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public boolean isVowel(int charCode);",
"private static boolean isLetter( char s ){\n\t\tif ( Character.isLetter(s)) return true; \n\t\tthrow new IllegalArgumentException(\"Name of town '\"+ s +\"' should be a letter\");\n\t}",
"private static boolean isUnreservedCharacter(char p_char) {\n return (p_char <= '~' && (fgLookupTable[p_char] & MASK_UNRESERVED_MASK) != 0);\n }",
"private static boolean isSchemeCharacter (char p_char) {\n return (p_char <= 'z' && (fgLookupTable[p_char] & MASK_SCHEME_CHARACTER) != 0);\n }",
"public static char inputChar(String p) {\n String c;\n while (true) {\n System.out.print(p);\n c = in.nextLine();\n if (c.length() == 1) {\n return c.charAt(0);\n } else {\n System.err.print(\"Must enter character, enter again! \");\n }\n }\n }",
"private static boolean isYehHamzaChar(char ch) {\n if((ch==0xFE89)||(ch==0xFE8A)){\n return true;\n }else{\n return false;\n }\n }",
"boolean isIdentifierChar(char c);",
"private static boolean hasUniqueChars(String str) {\n\t\tfor(int i = 0; i < str.length(); i++) {\n\t\t\tfor(int j = i+1; j < str.length(); j++) {\n\t\t\t\tif( str.charAt(i) == str.charAt(j) )\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private static boolean isOperand(char ch) {\n return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');\n }",
"public static boolean hasSameCharInSequence(String password) throws InvalidSequenceException\r\n {\r\n char c1, c2, c3;\r\n if (password.length() > 2)\r\n {\r\n for (int i = 2; i < password.length(); i++)\r\n {\r\n c1 = password.charAt(i - 2);\r\n c2 = password.charAt(i - 1);\r\n c3 = password.charAt(i);\r\n if (c1 == c2 && c2 == c3)\r\n throw new InvalidSequenceException();\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean checkAllCharsUsingRegex(String input) {\n if (input.length() < 26) {\n return false;\n }\n //Even a single character is missing, return false\n String regex = \"(?i)(?=.*a)(?=.*b)(?=.*c)(?=.*d)(?=.*e)(?=.*f)\"\n + \"(?=.*g)(?=.*h)(?=.*i)(?=.*j)(?=.*k)(?=.*l)(?=.*m)(?=.*n)\"\n + \"(?=.*o)(?=.*p)(?=.*q)(?=.*r)(?=.*s)(?=.*t)(?=.*u)(?=.*v)\"\n + \"(?=.*w)(?=.*x)(?=.*y)(?=.*z).*\";\n\n if (input.matches(regex)) {\n return true;\n }\n return false;\n }",
"private static boolean isTashkeelChar(char ch) {\n return ( ch >='\\u064B' && ch <= '\\u0652' );\n }",
"private static boolean m44512a(char c) {\n return c == 10 || c == 13 || c == 9 || c == ' ';\n }",
"public static boolean isUnique(String input) {\r\n // Create a Set to insert characters\r\n Set<Character> set = new HashSet<>();\r\n\r\n // get all characters form String\r\n char[] characters = input.toCharArray();\r\n\r\n for (Character c : characters) {\r\n if (!set.add(c)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private static boolean isReservedCharacter(char p_char) {\n return (p_char <= ']' && (fgLookupTable[p_char] & RESERVED_CHARACTERS) != 0);\n }",
"public static boolean isAllCharacterUnique(String sIn) {\n if (sIn.length() > 32768) {\n return false;\n }\n for (char c : sIn.toCharArray()) {\n if (sIn.indexOf(c) != sIn.lastIndexOf(c)) return false;\n }\n return true;\n }",
"public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public static boolean IsECMAWordChar(char ch)\n\t{\n\t\treturn CharInClass(ch, ECMAWordClass);\n\t}",
"public boolean skipCharacter( char c )\r\n {\r\n String literal = Pattern.quote( new Character(c).toString() );\r\n \r\n Pattern charOnce = Pattern.compile( \"\\\\G\" + literal + \"{1}\" );\r\n String str = feed.findWithinHorizon( charOnce, 0 );\r\n \r\n if( str == null )\r\n return false;\r\n else\r\n return true;\r\n }",
"static boolean isOperator(char c) {\n return \"+\\u2212\\u00d7\\u00f7/*\".indexOf(c) != -1;\n }",
"public static boolean isLetter(char c)\n {\n return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');\n }",
"private static boolean check_if_operator(char c)\n {\n return c == '+' || c == '-' || c == '*' || c == '/' || c == '^'|| c == 'r'\n || c == '(' || c == ')'|| c == 's' || c == 'c' || c == 't' || c == 'l';\n }",
"public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"private boolean isAlphanumeric(char c) {\n if (c < '0' || c > 'z') {\n return false;\n }\n if (c <= '9' || c >= 'a') {\n return true;\n }\n if (c >= 'A' && c <= 'Z') {\n return true;\n }\n return false;\n }",
"public int isSameCharaters(String input) {\n\t\tif(input.length() > 1 && input.charAt(0) == input.charAt(input.length() - 1)) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}",
"public static boolean uniqueCharString(String s){\r\n HashMap<Character, Integer> map = new HashMap<Character, Integer>();\r\n for (int i = 0; i < s.length(); i++){\r\n if (map.get(s.charAt(i)) == null){\r\n map.put(s.charAt(i), 1);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean hasLeadingChar(char c,String s) {\n \tif(s == null || s.length()==0) {\n \t\treturn false;\n \t}\n \t\n \treturn (s.charAt(0) == c);\n }",
"public boolean isLetterOrDigitAhead()\n {\n\n int pos = currentPosition;\n\n while (pos < maxPosition)\n {\n if (Character.isLetterOrDigit(str.charAt(pos)))\n return true;\n\n pos++;\n }\n\n return false;\n }"
] | [
"0.7934053",
"0.76211226",
"0.7516301",
"0.743277",
"0.71485835",
"0.713835",
"0.7101688",
"0.7061137",
"0.70085895",
"0.69841933",
"0.6972116",
"0.69178796",
"0.6841322",
"0.6794729",
"0.6736092",
"0.67227936",
"0.67059326",
"0.6701728",
"0.66824424",
"0.6680958",
"0.66407365",
"0.66326565",
"0.66298777",
"0.65946263",
"0.6572597",
"0.65703064",
"0.6565683",
"0.65352786",
"0.64400494",
"0.6429041",
"0.64281785",
"0.6411427",
"0.6408853",
"0.6407569",
"0.63892186",
"0.6368773",
"0.63522786",
"0.63267463",
"0.6321646",
"0.63149947",
"0.63097477",
"0.630809",
"0.6263497",
"0.6252989",
"0.6231373",
"0.6212616",
"0.61993635",
"0.6193979",
"0.61796904",
"0.61719817",
"0.61689556",
"0.616872",
"0.61607623",
"0.61414593",
"0.61350083",
"0.6129617",
"0.6126432",
"0.6116014",
"0.60862845",
"0.60827625",
"0.6066002",
"0.60631955",
"0.6056229",
"0.60556144",
"0.6055025",
"0.6054917",
"0.6042597",
"0.60353386",
"0.6030536",
"0.5992679",
"0.5986962",
"0.59835714",
"0.59800684",
"0.5964895",
"0.596257",
"0.5960133",
"0.5949176",
"0.59405774",
"0.5939906",
"0.5935309",
"0.59244996",
"0.5921858",
"0.58967066",
"0.58917546",
"0.58893013",
"0.5888467",
"0.58866775",
"0.5875058",
"0.58720976",
"0.58711773",
"0.586455",
"0.58505684",
"0.5849938",
"0.584828",
"0.58449054",
"0.58420366",
"0.5840633",
"0.58391035",
"0.58377093",
"0.5836212"
] | 0.7025557 | 8 |
Check if a character in a given range appears next in the input. | private boolean RANGE(char first, char last) {
if (in >= input.length()) return false;
int len = input.nextLength(in);
int code = input.nextChar(in, len);
if (code < first || code > last) return false;
in += len;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract boolean matches(char c);",
"boolean hasHasCharacter();",
"boolean hasChar();",
"private void parseRange(Node node) {\r\n if (switchTest) return;\r\n int low = node.low();\r\n int high = node.high();\r\n ok = false;\r\n if (in < input.length()) {\r\n int ch = input.codePointAt(in);\r\n ok = (ch >= low) && (ch <= high);\r\n if (ok) {\r\n int n = Character.charCount(ch);\r\n in += n;\r\n if (tracing) traceInput();\r\n }\r\n }\r\n }",
"boolean contains(char c) {\n for (char x : _chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"public abstract boolean isStarterChar(char c);",
"public abstract boolean checkMoveRange(String destination);",
"public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }",
"boolean checkChar(String s1, String s2);",
"public boolean isEquivalent(char character, char anothercharacter);",
"public boolean duplicatedigitInNumberRange(int num)\r\n\t\r\n\t{\r\n\r\n\t\tMap<Character,Integer> map = new HashMap<Character, Integer>();\r\n\t\tchar[] char1= String.valueOf(num).toCharArray();\r\n\t//\tint count=1;\r\n\t\tboolean f=true;\r\n\tfor(char c:char1)\r\n\t{\r\n\t\tif(f=true)\r\n\t\t{\r\n\t\tif(map.containsKey(c))\r\n\t\t{\r\n\t\t\tf=false;\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tmap.put(c,1);\r\n\t\t\t\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn f;\r\n\t\r\n\t}",
"@Override\n\t\tpublic boolean inRange(String value) {\n\t\t\treturn true;\n\t\t}",
"public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }",
"boolean contains(char ch) {\n return _letters.indexOf(ch) >= 0;\n }",
"private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }",
"private static boolean CharInClassInternal(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tint min;\n\t\tint max;\n\t\tint mid;\n\t\tmin = start + SETSTART;\n\t\tmax = min + mySetLength;\n\n\t\twhile (min != max)\n\t\t{\n\t\t\tmid = (min + max) / 2;\n\t\t\tif (ch < set.charAt(mid))\n\t\t\t{\n\t\t\t\tmax = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\t// The starting position of the set within the character class determines\n\t\t// whether what an odd or even ending position means. If the start is odd, \n\t\t// an *even* ending position means the character was in the set. With recursive \n\t\t// subtractions in the mix, the starting position = start+SETSTART. Since we know that \n\t\t// SETSTART is odd, we can simplify it out of the equation. But if it changes we need to \n\t\t// reverse this check. \n\t\tDebug.Assert((SETSTART & 0x1) == 1, \"If SETSTART is not odd, the calculation below this will be reversed\");\n\t\tif ((min & 0x1) == (start & 0x1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (myCategoryLength == 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn CharInCategory(ch, set, start, mySetLength, myCategoryLength);\n\t\t}\n\t}",
"private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }",
"private static boolean checkIfCanBreak( String s1, String s2 ) {\n\n if (s1.length() != s2.length())\n return false;\n\n Map<Character, Integer> map = new HashMap<>();\n for (Character ch : s2.toCharArray()) {\n map.put(ch, map.getOrDefault(ch, 0) + 1);\n }\n\n for (Character ch : s1.toCharArray()) {\n\n char c = ch;\n while ((int) (c) <= 122 && !map.containsKey(c)) {\n c++;\n }\n\n if (map.containsKey(c)) {\n map.put(c, map.getOrDefault(c, 0) - 1);\n\n if (map.get(c) <= 0)\n map.remove(c);\n }\n }\n\n return map.size() == 0;\n }",
"private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }",
"private static boolean ifPalindrome(char[] input, int start, int end){\r\n\t\t//the idea is to scan from 1st to the mid point to see the reverse side char same as the picked one and return\r\n\t\tfor(int i=start;i<=(start+end)/2;i++){ //notice that we use <= other than<\r\n\t\t\tif(input[i] ==input[start+end-i]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we come here that means it is a palindrome for selected start/end\r\n\t\treturn true;\r\n\t}",
"public static void printAlphabetInRange(char beginning, char ending ){\n\n if(beginning<ending){\n System.out.println(\"we need to increment from \" + beginning+\" till \"+ending);\n for (char i = beginning; i <=ending ; i++) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else if (beginning>ending){\n System.out.println(\"we need to decrement from \" + beginning+\" till \"+ending);\n for (char i = beginning; i >=ending ; i--) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else{\n System.out.println(\"They are same character\");\n }\n\n }",
"public static boolean hasSameCharInSequence(String password) throws InvalidSequenceException\r\n {\r\n char c1, c2, c3;\r\n if (password.length() > 2)\r\n {\r\n for (int i = 2; i < password.length(); i++)\r\n {\r\n c1 = password.charAt(i - 2);\r\n c2 = password.charAt(i - 1);\r\n c3 = password.charAt(i);\r\n if (c1 == c2 && c2 == c3)\r\n throw new InvalidSequenceException();\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean inRange (Position defPos, Position atkPos, int range) {\n\t\tint defX = defPos.getX();\n\t\tint defY = defPos.getY();\n\t\t\n\t\tint atkX = atkPos.getX();\n\t\tint atkY = atkPos.getY();\n\t\t\n\t\tif (defX -range <= atkX &&\n\t\t\t\tdefX + range >= atkX)\n\t\t{\n\t\t\tif (defY -range <= atkY &&\n\t\t\t\t\tdefY+range >= atkY)\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean checkForChar(String str) {\n\t\tif (str.contains(\"a\") || str.contains(\"A\") || str.contains(\"e\") || str.contains(\"E\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TO DO\n\n\t\treturn false;\n\t}",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"public static boolean is(CharSequence in, CharPred pred) {\n int max = in.length();\n switch (max) {\n case 0:\n return false;\n case 1:\n return pred.test(in.charAt(0));\n case 2:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(1));\n case 3:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 4:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 5:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(4))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(1))\n && pred.test(in.charAt(2));\n default:\n boolean odd = (max % 2) != 0;\n int mid = max / 2;\n if (odd) {\n if (pred.test(in.charAt(mid))) {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n } else {\n return false;\n }\n } else {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n }\n return true;\n\n }\n }",
"public static boolean stringInBounds (String plainText) {\r\n\t\t\r\n\t\tchar[] pText = plainText.toCharArray();\r\n\t\tboolean isCorrect;\r\n\t\tfor(int i = 0; i < plainText.length(); i++) {\r\n\t\t\tdo {\r\n\t\t\t\tif (plainText.charAt(i) < LOWER_BOUND || plainText.charAt(i) > UPPER_BOUND ) {\r\n\t\t\t\t\tisCorrect = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\tif(plainText.charAt(i) < LOWER_BOUND) {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) - RANGE);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) + RANGE);\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}else {\r\n\t\t\t\t\tisCorrect = true;\r\n\t\t\t\t}\r\n\t\t\t}while(isCorrect = false);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private boolean checkKey(char k)\n {\n \tint index = word.indexOf(k);\n \tif (index == -1)\n \t{\n \t\t//k doesn't exist in word\n \t\tguess_number--;\n \t\treturn false;\n \t}\n \telse\n \t{\n \t\t//k exist in the word\n \t\twhile (index != -1)\n \t\t{\n \t\t\t//update mask\n \t\t\tmask = mask.substring(0, index)+k+mask.substring(index+1);\n \t\t\t//update index\n \t\t\tindex = word.indexOf(k, index + 1);\n \t\t}\n \t\treturn true;\n \t}\n \t\n }",
"boolean alreadyAdded(char c) {\n for (char x :_chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"boolean contains(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return true;\n }\n }\n return false;\n }",
"public Character isUsedBy(Character character);",
"public boolean isChar(String x) {\n\t\tfor (int i = 0; i < x.length(); i++) {\n\t\t\tchar c = x.charAt(i);\n\t\t\tif ((c == '-' || c == '+') && x.length() > 1)\n\t\t\t\tcontinue;\n\t\t\tif (((int) c > 64 && (int) c < 90) || ((int) c > 96 && (int) c < 123))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public static boolean isAllCharacterUnique(String sIn) {\n if (sIn.length() > 32768) {\n return false;\n }\n for (char c : sIn.toCharArray()) {\n if (sIn.indexOf(c) != sIn.lastIndexOf(c)) return false;\n }\n return true;\n }",
"public boolean isCharacterInSameLocation(Character inputCharA, Character inputCharB) {\r\n\t\tString LocationCharA = inputCharA.getLocation();\r\n\t\tArrayList<Character> inputListLocation = getListCharacterInLocation(LocationCharA);\r\n\t\tif (inputListLocation.contains(inputCharA) && inputListLocation.contains(inputCharB))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"private boolean CHAR(char ch) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code != ch) return false;\r\n in += len;\r\n return true;\r\n }",
"public boolean isIndexInMyRange(String index) {\n\t\tif (this.getFromIndex().compareTo(this.getToIndex()) > 0) {\n\t\t\tif (index.compareTo(this.getFromIndex()) >= 0)\n\t\t\t\treturn true;\n\t\t\telse {\n\t\t\t\treturn (index.compareTo(this.getToIndex()) <= 0);\n\t\t\t}\n\t\t}\n\t\t// for the other nodes\n\t\telse\n\t\t\treturn (index.compareTo(this.getFromIndex()) >= 0 && index\n\t\t\t\t\t.compareTo(this.getToIndex()) <= 0);\n\n\t}",
"private static boolean hasUniqueChars(String str) {\n\t\tfor(int i = 0; i < str.length(); i++) {\n\t\t\tfor(int j = i+1; j < str.length(); j++) {\n\t\t\t\tif( str.charAt(i) == str.charAt(j) )\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean checkWin() {\n Iterator<Integer> seq = sequence.iterator();\n Iterator<Integer> in = input.iterator();\n\n while (seq.hasNext() && in.hasNext()) {\n seq.next();\n in.next();\n if (!seq.hasNext() && !in.hasNext()) {\n return true;\n }\n }\n return false;\n }",
"static boolean isBasePair(char c)\n{\n\treturn c >= 'A' && c <= 'Z';\n}",
"boolean getHasCharacter();",
"@Test\n public void shouldFindSubstringAtTheEndOfTheStringAfterOneCharacterPartialMatch() {\n // Given\n String string = \"AABc\";\n CharSequence charSequence = new StringBuilder(\"ABc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertTrue(containsCharSequence);\n }",
"public boolean hasNext() {\n for (int i = 0; i < len; i++) {\n // 0 + 4 - 2 = 2.\n if (index[i] < i + characters.length() - len) {\n return true;\n }\n }\n return false;\n }",
"public static boolean charsOccurIn(final String string, final String sub) {\n final int sl = string.length(), tl = sub.length();\n int t = 0;\n for(int s = 0; s < sl && t < tl; s++) {\n if(equals(string.charAt(s), sub.charAt(t))) t++;\n }\n return t == tl;\n }",
"private byte ensureIsInAlphabet(byte input) {\n return (byte)(ALPHABET_START + (Math.abs(input) % ALPHABET_SIZE));\n }",
"public boolean characterInput(char c);",
"public Boolean findUniqueness(final String inp) {\n boolean flag = true;\n for (int i = 0; i < inp.length(); i++) {\n for (int j = i + 1; j < inp.length(); j++) {\n if (inp.charAt(i) == inp.charAt(j)) {\n flag = false;\n }\n }\n }\n return flag;\n }",
"int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}",
"boolean isEndInclusive();",
"private static boolean Ncontains(String word, char a) \n {\n \t// return true of false if the String match char a\n for(int x = 0; x < word.length(); x++)\n {\n if(word.charAt(x) == a)\n return false;\n }\n return true;\n }",
"private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }",
"boolean isBeginInclusive();",
"private static boolean inArray(char c, char[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (c == array[i]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }",
"private boolean SET(String s) {\r\n if (in >= input.length()) return false;\r\n int ch = input.charAt(in);\r\n boolean found = false;\r\n for (int i = 0; i < s.length() && ! found; i++) {\r\n if (ch == s.charAt(i)) found = true;\r\n }\r\n if (found) in++;\r\n return found;\r\n }",
"private static boolean d(char paramChar)\r\n/* 685: */ {\r\n/* 686:678 */ return ((paramChar >= 'k') && (paramChar <= 'o')) || ((paramChar >= 'K') && (paramChar <= 'O')) || (paramChar == 'r') || (paramChar == 'R');\r\n/* 687: */ }",
"boolean checkName (String name){\r\n \r\n // Use for loop to check each character\r\n for (int i = 0; i < name.length(); i++) {\r\n // If character is below 'A' in Unicode table then return false\r\n if (name.charAt(i) < 65 && name.charAt(i) != 32 && name.charAt(i) != 10){\r\n return false;\r\n }\r\n // Else if character is between 'Z' and 'a' in unicode table,\r\n // then return false\r\n else if (name.charAt(i) > 90 && name.charAt(i) < 97){\r\n return false;\r\n }\r\n else if (name.charAt(i) > 122)\r\n return false;\r\n }\r\n return true;\r\n }",
"private boolean ifCorrect (int number){\n boolean check_correct = false;\n String temp = Integer.toString(number);\n char [] charArr = temp.toCharArray();\n for (int k = 0; k < temp.length()-1; k++){\n if (charArr[k] <= charArr[k+1]){\n check_correct = true;\n }\n else {\n check_correct = false;\n break;\n }\n }\n return check_correct;\n }",
"private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public static boolean isSequence(double start, double mid, double end)\r\n/* 140: */ {\r\n/* 141:324 */ return (start < mid) && (mid < end);\r\n/* 142: */ }",
"public static boolean hasNextChar() {\n \t boolean result = scanner.hasNext();\n \t return result;\n }",
"public static boolean correctRange(int [] input) {\n\t\treturn (input[0] > 0) && (input[1] > 0) && (input[2] > 0);\n\t}",
"boolean eatChar (char c) {\n if (getChar () == c) { \n m_pos++;\n return true;\n }\n return false;\n }",
"public boolean isLetterOrDigitAhead()\n {\n\n int pos = currentPosition;\n\n while (pos < maxPosition)\n {\n if (Character.isLetterOrDigit(str.charAt(pos)))\n return true;\n\n pos++;\n }\n\n return false;\n }",
"public boolean gHappy(String str) {\n for(int x=0; x<str.length(); x++)\n {\n if(str.charAt(x)=='g')\n {\n if(str.length()<2)\n return false;\n else if(x==0 && str.charAt(x+1) != 'g')\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && x+1==str.length())\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && str.charAt(x+1) != 'g')\n return false;\n }\n }\n\n return true;\n}",
"public boolean isValidForString(String str, char charCode, int position);",
"public boolean checkInclusion(String s1, String s2) {\n int left = 0;\n int right = 0;\n int count = s1.length();\n int len = s2.length();\n int[] map = new int[256];\n \n // fill the map\n for (int i = 0; i < s1.length(); i++)\n map[s1.charAt(i)]++;\n \n while (right < len) {\n // if contains a character from s1, decrement count\n if (map[s2.charAt(right)] >= 1)\n count--;\n \n // decrase used value and move right\n map[s2.charAt(right)]--;\n right++;\n \n // check for answer\n if (count == 0)\n return true;\n \n // if boundary is crossed, move left pointer\n if (right - left == s1.length()) {\n // restoration\n if (map[s2.charAt(left)] >= 0)\n count++;\n map[s2.charAt(left)]++;\n \n left++;\n }\n \n }\n \n return false;\n }",
"public static boolean checkRange(int x) {\n\n \n if (x >= 1 && x <= 9) { //check if input is between 1 and 9, inclusive\n return (true);\n }\n else {\n System.out.print(\"You did not enter an int in [1,9]; try again: \");\n return (false);\n \n }\n\n \n\n }",
"@Test\n public void whenStartWithPrefixThenTrue() {\n char[] word = {'H', 'e', 'l', 'l', 'o'};\n char[] pref = {'H', 'e'};\n boolean result = ArrayChar.startsWith(word, pref);\n assertThat(result, is(true));\n }",
"public static boolean isIUPAC(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U':\n\t case 'R':\n\t case 'Y':\n\t case 'S':\n\t case 'W':\n\t case 'K':\n\t case 'M':\n\t case 'B':\n\t case 'D':\n\t case 'H':\n\t case 'V':\n\t case 'N':\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u':\n\t case 'r':\n\t case 'y':\n\t case 's':\n\t case 'w':\n\t case 'k':\n\t case 'm':\n\t case 'b':\n\t case 'd':\n\t case 'h':\n\t case 'v':\n\t case 'n': return true;\n\t default: return false;\n\t\t}\n\t}",
"public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }",
"public boolean stringE(String str) {\n int count = 0;\n \n for (int i=0; i < str.length(); i++) {\n if (str.charAt(i) == 'e') count++;\n }\n \n return (count >= 1 && count <=3);\n}",
"public boolean checkInvalid7(String x) {\n if (x.length() > 3) {\n for (int i = 0; i < x.length() - 2; i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))\n && (consonants.contains(String.valueOf(x.charAt(i + 1))))\n && consonants.contains(String.valueOf(x.charAt(i + 2)))\n && ((x.charAt(i) != 'n') || x.charAt(i + 1) !=\n 'g' || x.charAt(i + 2) != 'h')) {\n return true;\n }\n }\n }\n return false;\n }",
"public static boolean isUniqueChars(String str) {\n\t if(str.length() > 128) return false;\n\t \n\t //created hash table boolean to flag duplicate characters\n\t boolean [] check = new boolean [128];\n\t \n\t //run a for look in order to iterate through the string.\n for(int i = 0; i < str.length(); i++){\n //convert the characters of the string array into integers\n int val = str.charAt(i);\n //check the hash table for past characters seen, there are 128 ascii codes\n\t if(check[val]) return false;\n\t //turn on the true flag for characters you are seeing\n\t check[val] = true;\n\t }\n\t \n\t //pass the hash table therefore it is unique and true;\n\t return true;\n\n\t}",
"private static boolean isUnique(String str) {\n\t\tfor(char c: str.toCharArray()) {\n\t\t\tif(str.indexOf(c) == str.lastIndexOf(c))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isCharAt(int row, int col, char c)\n {\n if (row < 0 || row >= SIZE || col < 0 || col >= SIZE) {\n return false;\n }\n\n if (map[row][col] == c) {\n return true;\n }\n else {\n return false;\n } \n }",
"private boolean matchSequences ( String sequence1, String sequence2 )\n{\n int matches = 0;\n\n // Check for sequences with less than 20 characters.\n if ( ( sequence1.length () <= 20 ) ||\n ( sequence2.length () <= 20 ) )\n {\n return sequence1.equalsIgnoreCase ( sequence2 );\n } // if\n\n // Count the matching bases in the first 20 characters.\n for ( int i = 0; i < 20; i++ )\n\n // Count the matching characters (but not N bases).\n if ( ( sequence1.charAt ( i ) == sequence2.charAt ( i ) ) &&\n ( sequence1.charAt ( i ) != 'x' ) &&\n ( sequence1.charAt ( i ) != 'n' ) )\n\n matches++;\n\n // Check for 90% identity (18/20) for a valid match\n if ( matches >= 18 ) return true;\n return false;\n}",
"private boolean isSubSequence(String s, String word){\n int startPointer = 0;\n for(int i=0; i<word.length(); i++){\n int location = s.indexOf(word.charAt(i), startPointer);\n if(location < 0)\n return false;\n startPointer = location+1;\n }\n return true;\n }",
"private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}",
"private boolean isFitPatternStr(char startC, String patternStr) {\n\n if (startC != patternStr.charAt(0)) {\n return false;\n }\n char inputChar = ' ';\n char patternchar = ' ';\n for (int i = 1; i < patternStr.length(); i++) {//the post\n patternchar = patternStr.charAt(i);\n inputChar = getNextChar();\n if (inputChar != patternchar) {\n throwParseError();\n }\n\n }\n return true;\n }",
"public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }",
"private static boolean m127620a(char c) {\n return Pattern.compile(\"[一-龥]\").matcher(String.valueOf(c)).matches();\n }",
"public static void main(String []abcd){\n\t\tchar A[]={'a','b','d','r','x','y','z'};\t//rendom sorted character in dense array\r\n\t\tint n=A.length;\t\t\t\t//assigning array length in n variable \r\n\t\tchar x='d';\t\t\t\t//the input character to be findout\r\n\t\tboolean Notfound=false;\t\t\t//just for while loop condition\r\n\t\tint lowerBound=1;\t\t\t//lowerBound varible assigned 1 \r\n\t\tint upperBound=n;\t\t\t//uppernound variable assigned with n (length of array)\r\n\t\t\r\n\t\twhile(!Notfound){\t\t\t//while loop start till NotFound variable beacme true\r\n\t\t\tif(upperBound < lowerBound)\t//if statement for the variable not found\r\n\t\t\t\t{System.out.print(\"Doesn't exitst\");\t//print statement\r\n\t\t\t\tbreak;}\t\t\t\t\t//breake the while loop\r\n\t\t\tint midPoint=lowerBound+(upperBound-lowerBound)/2;\t//calculating mid point vale and saving it in midPoint variable\r\n\t\t\tif((int)A[midPoint]<(int)x)\t\t\t\t//checking if the giving character is greater then mid point character by checking their assici code\r\n\t\t\t\tlowerBound=midPoint+1;\t\t\t\t//setting lb to mp+1\r\n\t\t\tif((int)A[midPoint]>(int)x)\t\t\t\t//checking if the giving character is less then mid point character by checking their assici code\r\n\t\t\t\tupperBound=midPoint-1;\t\t\t\t//setting up to mp-1\r\n\t\t\tif((int)A[midPoint]==(int)x)\t\t\t\t//checking if the giving character is equals to mid point character by checking their assici code\r\n\t\t\t\t{System.out.print(x+\" at:\"+midPoint);\t\t//printing statement \r\n\t\t\t\tNotfound=true;\t\t\t\t\t//making NotFound variable true\r\n\t\t\t\tbreak;}\t\t\t\t\t\t//breaking while loop\r\n\t\t}\t\t\t\t\t\t\t\t//end of main body\r\n\t\t\r\n\t}",
"public boolean checkInvalid2(String x) {\n for (int i = 0; i < x.length(); i++) {\n if (consonants.contains(String.valueOf(x.charAt(i)))) {\n count++;\n }\n }\n return count == x.length();\n\n }",
"private static boolean findCharInWord(String word, char charToFind) {\n boolean found=false;\n\n for (char c : word.toCharArray()) {\n if (c == charToFind) {\n found = true;\n break;\n }\n }\n return found;\n }",
"private boolean checkInCashe(String s) {\n return true;\n }",
"boolean containsPowertypeRange(Generalization powertypeRange);",
"public static boolean checkchar(String sentence, int total){\n \n if (total>sentence.length()){ //if the number entered is bigger than the total length\n for (int i =0; i < sentence.length(); i++) { //just compare for the whole length \n if (Character.isLetter(sentence.charAt(i))==false){ //if it is not a letter\n return false; //return false\n }\n }\n return true; //otherwise return true\n }\n \n else { //if number entered is less than the total length\n for(int i =0; i < total; i++){ //just look at the number of characters the user wants you to look at \n if(Character.isLetter(sentence.charAt(i))==false){ //if it not a letter \n return false;//return false\n }\n \n return true; //otherwise return true\n }\n \n }\n return true;\n \n }",
"private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }",
"private boolean isInRange(int c) {\n switch (border) {\n case between:\n return min <= c && c <= max;\n case min:\n return min <= c;\n case max:\n return c <= max;\n default:\n throw new IllegalStateException(\"Unexpected value: \" + border);\n }\n }",
"public static boolean Character(char a)\n {\n boolean valid = false;\n int convert;\n \n //converts the character a to its equivalent decimal value\n convert = (int)a;\n \n // checks if the character is within range\n // a-z or A-Z\n if (((convert >= 65) && (convert <= 90))||((convert >= 97) && (convert <= 122)))\n {\n valid = true;\n }\n else\n {\n //displays the error to the user by calling the displayError method in UserInterface class\n UserInterface.displayError(\"You have not entered a character. Enter again: \");\n }\n return valid;\n }",
"public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }",
"public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }",
"public boolean canWin(String s) {\n if (map.containsKey(s)) {\n return map.get(s);\n }\n for (int i=0;i<s.length()-1;i++) {\n if (s.charAt(i)=='+' && s.charAt(i+1)=='+') {\n String cur = s.substring(0,i)+\"--\"+s.substring(i+2, s.length());\n // 2号玩家没办法赢了 这种方案下1号玩家进必赢\n if (!canWin(cur)) {\n map.put(s, true);\n return true;\n }\n }\n }\n // 这种方案下 表示玩家不能继续游戏了 也就是不能赢了\n map.put(s, false);\n return false;\n }",
"private boolean isChoice(int n) {\n String string = this.msg;\n int n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 99) {\n if (n != 67) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 104) {\n if (n2 != 72) return false;\n }\n string = this.msg;\n n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 111) {\n if (n != 79) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 105) {\n if (n2 != 73) return false;\n }\n if ((n2 = (int)this.msg.charAt(n)) != 99) {\n if (n2 != 67) return false;\n }\n if ((n = (int)this.msg.charAt(n + 1)) == 101) return true;\n if (n != 69) return false;\n return true;\n }",
"static String isValid(String s) {\n if(s.isEmpty())return \"YES\";\n int[] alphabet = new int[26];\n // char - 97 = arr location;\n for(int i = 0;i<s.length();i++){\n int location = (int)s.charAt(i) - 'a';\n alphabet[location] += 1;\n }\n for(Integer x: alphabet){\n System.out.println(x);\n }\n int i = 0;\n while(alphabet[i]==0){\n i++;\n }\n int standard = alphabet[i];\n boolean used = false;\n for(;i<26;i++){\n if(alphabet[i]!=0){\n if(Math.abs(alphabet[i]-standard)==1){\n if(used){\n System.out.println(\"equal 1\");\n return \"NO\";\n }else{\n used = true;\n }\n }else if(Math.abs(alphabet[i]-standard)>1){\n\n System.out.println(\"gtr then 1\");\n return \"NO\";\n }\n }\n }\n return \"YES\";\n\n\n\n }",
"public static boolean hasAllUniqueChars3(String string) {\n String sorted = Stream.of(string.split(\"\")).sorted().collect(Collectors.joining());\n\n for(int i = 1; i < sorted.length(); i++) {\n if(sorted.charAt(i - 1) == sorted.charAt(i)) return false;\n }\n\n return true;\n }",
"@Test\n public void shouldNotFindSubstringWithMismatchedFirstCharacterAtTheEndOfThString() {\n // Given\n String string = \"123ABc\";\n CharSequence charSequence = new StringBuilder(\"cBc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertFalse(containsCharSequence);\n }",
"public static int letterLoop(String romConcat, char charSearch) {\n\t\tint count = 0;\r\n\t\t\r\n\t\tfor(int i = 0; i < romConcat.length(); i++) {\r\n\t\t\tchar currentChar = romConcat.charAt(i);\r\n\t\t\t\r\n\t\t\tif (currentChar == charSearch) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t}",
"private boolean isOK(char ch) {\n if(String.valueOf(ch).matches(\"[<|\\\\[|\\\\-|\\\\||&|a-z|!]\")){\n return true;\n }\n return false;\n }",
"public boolean checkInvalid5(String x) {\n for (int i = 0; i < x.length() - 1; i++) {\n if ((x.charAt(i) == x.charAt(i + 1)) && (x.charAt(i) != 'o')) {\n return true;\n }\n }\n return false;\n }"
] | [
"0.61873376",
"0.6064816",
"0.596771",
"0.59505266",
"0.58293563",
"0.5770396",
"0.5721948",
"0.5705434",
"0.56651306",
"0.5652043",
"0.5627884",
"0.56074923",
"0.5605044",
"0.5600233",
"0.55807686",
"0.5566635",
"0.556319",
"0.55327594",
"0.5525008",
"0.5515985",
"0.5508812",
"0.5489088",
"0.5480451",
"0.5476775",
"0.54520917",
"0.5449272",
"0.5446806",
"0.5444421",
"0.5443887",
"0.5439422",
"0.5438589",
"0.5437784",
"0.54361326",
"0.5433969",
"0.5427436",
"0.54272735",
"0.54216135",
"0.5417459",
"0.5414414",
"0.54104644",
"0.5408595",
"0.54080373",
"0.54026484",
"0.5395843",
"0.53947735",
"0.5388857",
"0.5380176",
"0.5367855",
"0.5357264",
"0.534146",
"0.533859",
"0.5320911",
"0.53196025",
"0.53193814",
"0.530998",
"0.5305074",
"0.5271768",
"0.5269605",
"0.52664447",
"0.5265739",
"0.5258659",
"0.525628",
"0.52471",
"0.52276963",
"0.52249354",
"0.52225184",
"0.52162313",
"0.52146184",
"0.5211595",
"0.52088493",
"0.52081615",
"0.5201494",
"0.5199757",
"0.5198734",
"0.5193433",
"0.51913947",
"0.51899886",
"0.5186281",
"0.5182488",
"0.51804614",
"0.51787245",
"0.5178482",
"0.5177881",
"0.5174856",
"0.5167044",
"0.51666623",
"0.5159653",
"0.5153685",
"0.51524776",
"0.5152455",
"0.51514876",
"0.5150398",
"0.51492393",
"0.51337206",
"0.5132518",
"0.51295406",
"0.51294714",
"0.51287764",
"0.5126507",
"0.5126291"
] | 0.71079963 | 0 |
Check for the given string next in the input. | private boolean STRING(String s) {
int n = input.match(s, in);
in += n;
return (n > 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean SET(String s) {\r\n if (in >= input.length()) return false;\r\n int ch = input.charAt(in);\r\n boolean found = false;\r\n for (int i = 0; i < s.length() && ! found; i++) {\r\n if (ch == s.charAt(i)) found = true;\r\n }\r\n if (found) in++;\r\n return found;\r\n }",
"private boolean checkInCashe(String s) {\n return true;\n }",
"static boolean gobble(String p, Scanner s){\r\n\tif (s.hasNext(p)) { s.next(); return true;}\r\n\telse { return false; }\r\n }",
"boolean hasString();",
"public Boolean test(String input);",
"private boolean startsWithAFilteredPAttern(String string)\n {\n Iterator<String> iterator = filteredFrames.iterator();\n while (iterator.hasNext())\n {\n if (string.trim().startsWith(iterator.next()))\n {\n return true;\n }\n }\n return false;\n }",
"public boolean canRecover(String input) {\n if(encode(input) != -1) return true;\n for(int i=0; i<input.length(); i++) {\n if(Character.isLowerCase(input.charAt(i))) {\n String next = input.substring(0, i) + Character.toUpperCase(input.charAt(i)) + input.substring(i+1);\n if(canRecover(next)) return true;\n }\n }\n return false;\n }",
"public boolean possibleNextInput() {\n return _index < _input.length();\n }",
"public static boolean check(String str) {\n return str.contains(\"oo\");\n }",
"boolean hasScStr();",
"public void CheckError(String s) {\r\n if (s.equals(token.get(lookAheadPossition))){\r\n System.out.println(\"Expected: \"+ s +\" at line:\"+ lookAheadPossition);\r\n lookAheadPossition=lookAheadPossition+1;\r\n }else {\r\n System.out.println(\"ERROR: at line:\"+ lookAheadPossition +\" expected-> \"+ s +\" --- \" + token.get(lookAheadPossition)+ \" <-detected.\" );\r\n System.exit(0);\r\n }\r\n }",
"public boolean equalsToStrings(String input, String string){\n return input.length() <= string.length() &&\n string.substring(0, input.length()).equalsIgnoreCase(input);\n }",
"public boolean isCorrect(String str);",
"private boolean isValidString(String task) \n\t{\n\t\tfor (int i = 0; i < names.length; i++) \n\t\t{\n\t\t\tif(task.equals(names[i]))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter string:\");\r\n\t\tString str = sc.nextLine();\r\n\t\t\r\n\t\tSystem.out.println(\"Index to search:\");\r\n\t\tint index = sc.nextInt();\r\n\t\t\r\n\t\tif(index >= str.length())\r\n\t\t\tSystem.out.println(\"Index doesnot exist!!\");\r\n\t\telse\r\n\t\t\tcheckString(str, index);\r\n\t\t\r\n\t\tsc.close();\r\n\t}",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Input string: \");\n String string = scanner.nextLine();\n System.out.print(\"Input substring: \");\n String substring = scanner.nextLine();\n\n if (string.contains(substring)){\n System.out.println(\"String contains the substring.\");\n }else {\n System.out.println(\"String no contains the substring.\");\n }\n }",
"public abstract boolean accepts(String string);",
"public boolean startHi(String str) {\n if (str.length() < 2) return false;\n \n String front;\n if (str.length() == 2) {\n front = str;\n } else {\n front = str.substring(0, 2);\n }\n \n return (front.equals(\"hi\"));\n \n}",
"private static boolean stringStartsWith(String string, String prefix){\n for(int i=0; i < prefix.length(); i++){\n if(string.charAt(i) != prefix.charAt(i)){\n return false;\n }\n }\n return true;\n }",
"public static boolean isTaken(String string) {\n return false;\n }",
"private static String validateInputStr() {\n String str = \"\";\n Scanner genericString = new Scanner(System.in);\n if (!genericString.hasNextInt()) {\n str = genericString.nextLine();\n return str;\n }\n else {\n validateInputStr();\n }\n return str;\n }",
"public boolean next(String key) {\n while(next()) {\n if (element.keyEquals(new CaseInsensitiveElement<V>(key, null))) return true;\n }\n return false;\n }",
"protected boolean checkInput(String input) {\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tfor(int j = 0; j < 10; j++) {\n\t\t\t\tif(refRadar[i][j].equals(input)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean igual(String str){\n\t\tboolean resp = false;\n\t\tif(str.length() != 3){\n\t\t\treturn resp;\n\t\t}// End if\n\t\tif(str.charAt(0) == 'F' && str.charAt(1) == 'I' && str.charAt(2) == 'M'){\n\t\t\tresp = true;\n\t\t}// End if\n\t\treturn resp;\t\n\t}",
"public boolean hasNextToken() {\n\t\treturn !inputString.isEmpty();\n\t}",
"@Then(\"I verify following components {string}\")\n\tpublic void i_verify_following_components(String string) {\n\t System.out.println(\"Checking ===\"+string);\n\t}",
"public static boolean checkInput(String saInput) {\r\n\t\treturn checkGenericPattern(saInput) && checkGenericPattern(unalter(saInput));\r\n\t}",
"public boolean contains(String s)\n {\n if(s==null)\n return false;\n\n if(s.isEmpty()) //base case\n return true;\n\n char first = s.charAt(0); //find next character\n if(childrenAdded.contains(first)) //if there is a trie for the character\n return children.get(first).contains(s.substring(1)); //search for the rest of the string in that trie\n else\n return false;\n }",
"private boolean isStringValid(String s){\n int[] result = getLeftRightCount(s);\n return result[0] == 0 && result[1] == 0;\n }",
"static private boolean isFirstOfPair(Token.Code code) {\r\n \t\t\t\treturn code == Token.Code.STRING;\r\n \t\t\t}",
"public boolean search(String s) {\n\t\tTreeNode node = root;\n\n\t\tboolean completed = false;\n\n\t\tfor (int i = 0; i<s.length(); i++){\n\n\t\t\tif (i == s.length()-1){\n\t\t\t\tcompleted = true;\n\t\t\t}\n\n\n\t\t\tnode = search(String.valueOf(s.charAt(i)), node, completed);\n\n\t\t\tif (foundFalse == true){\n\t\t\t\tfoundFalse = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\t\n\t \n\t}",
"public boolean is(String strIn) {\n for (char ch: allOps) {\n if (strIn.equals(ch + \"\")){\n return true;\n }\n }\n return false;\n }",
"public static boolean userInput(){\n String tempInput = \"y\"; //string to hold input for bulletproofing, default length is one character\n Scanner input = new Scanner(System.in);\n\n do { //bulletproofing input\n\n if (tempInput.length() != 1){ //if looping for second time, output error message\n System.out.println(\"Unaccepted input. Please reenter.\");\n }\n\n tempInput = input.nextLine(); //take input\n\n }while(tempInput.length() != 1); //loops again if input is not single character\n\n return tempInput.charAt(0) == 'y';\n }",
"public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }",
"public void testCheckString() {\n Util.checkString(\"test\", \"test\");\n }",
"@Override\r\n\tpublic boolean matches(String first, String last) {\n\t\treturn false;\r\n\t}",
"String getNext();",
"String getNext();",
"boolean doubleX(String str) {\n int i = str.indexOf(\"x\");\n if (str.length() <= i + 1) {\n return false;\n } else if (str.charAt(i + 1) == 'x') {\n return true;\n } else {\n return false;\n }\n }",
"public String user_string() {\n Scanner input = new Scanner(System.in);\n boolean conditional = true;\n while (conditional) {\n boolean condition = input.hasNextInt();\n if (!condition) {\n String user_input = input.nextLine();\n conditional = false; \n return user_input; \n }\n else {\n System.out.println(\"Invalid Input!\");\n conditional = true;\n input.next();\n }\n }\n return \"0\";\n }",
"public boolean isValid(String s) {\n\n if (s.length() % 2 != 0){\n return false;\n }\n\n HashMap<String, String> map = new HashMap<>();\n Stack st = new Stack();\n\n map.put(\"(\", \")\");\n map.put(\"{\", \"}\");\n map.put(\"[\", \"]\");\n\n for (int i = 0; i < s.length(); i++){\n String cur = String.valueOf(s.charAt(i));\n if (st.empty() && !map.containsKey(cur)){\n return false;\n }\n if (map.containsKey(cur)){\n st.push(cur);\n }\n else{\n String popElement = (String) st.pop();\n String expect = map.get(popElement);\n if (!expect.equals(cur)){\n return false;\n }\n }\n }\n return true ? st.empty() : false;\n }",
"public boolean pass(String word);",
"private static boolean stringTest(String s){\n try{ //depending on whether this is successful or not will return the relevant value\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException ex){\n return false;\n }\n }",
"public boolean isInputValid(ConversationContext context, String s)\r\n/* */ {\r\n/* 135 */ return (s.equalsIgnoreCase(\"one\")) || (s.equals(\"1\")) || (s.equalsIgnoreCase(\"two\")) || (s.equals(\"2\")) || (s.equalsIgnoreCase(\"zero\")) || (s.equals(\"0\"));\r\n/* */ }",
"boolean checkTrack (String s) {\n\t\tint n = track.size ();\n\t\tint last = -1;\n\t\tfor (int i=n-1; i>=0; i--) {\n\t\t\tString item = track.elementAt (i);\n\t\t\tif (item.startsWith (\"handleInputValue/\")) {\n\t\t\t\tlast = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (last == -1) {\n\t\t\ttrackReason = \"No handleInputValue in track\";\n\t\t\tshowTrack ();\n\t\t\tLog.finest (\"addTrack: \"+trackReason);\n\t\t\treturn false;\n\t\t}\n\t\tint count = 0;\n\t\tfor (int i=last+1; i<n; i++) {\n\t\t\tString item = track.elementAt (i);\n\t\t\tif (item.startsWith (\"handleInputDirect/\")) count++;\n\t\t}\n\t\tif (count > 1) {\n\t\t\ttrackReason = \"Muliple handleInputDirect after last handleInputValue\";\n\t\t\tLog.finest (\"addTrack: \"+trackReason);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean isValid(String word);",
"@Override\n public boolean hasNext() {\n return this.currIndex < this.circularString.size();\n }",
"private boolean anyOfSetInString(String inputStr, Set<String> items) {\n\n for (String s : items) {\n if (inputStr.contains(s)) {\n // Didn't use String.equals() as user can have the number saved with or without country code\n\n return true;\n }\n }\n\n return false;\n }",
"public static boolean hasToken(String s) {\n\t\tboolean founded=false;\n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\t\t\t\n\t\t\t\tfounded = true;\n\t\t\t}\n\t\t}\n\t\treturn founded;\n\t}",
"public abstract boolean isValid(String s);",
"public String nameCheck(String name) {\n\t\twhile(true) {\n\t\t\tif(Pattern.matches(\"[A-Z][a-z]{3,10}\", name)){\n\t\t\t\treturn name;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Name should have first capital alphabet and rest small alphabets.\");\n\t\t\t\tSystem.out.println(\"Enter again: \");\n\t\t\t\tname = sc.next();\n\t\t\t}\n\t\t}\n\t}",
"private boolean checkWord(String str)\n\t{\n\t\tfor (int i = 0; i < words.length(); i++)\n\t\t{\n\t\t\tif (equals(words.get(i), str))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isMatch(String s, String p) {\n\t\treturn isMatch1(s, 0, p, 0);\n\t}",
"private boolean secondCharIs(char expected) {\n if (reachedEnd()) {\n return false;\n }\n\n if (source.charAt(current) != expected) {\n return false;\n }\n\n current++;\n return true;\n }",
"public boolean checkInvalid5(String x) {\n for (int i = 0; i < x.length() - 1; i++) {\n if ((x.charAt(i) == x.charAt(i + 1)) && (x.charAt(i) != 'o')) {\n return true;\n }\n }\n return false;\n }",
"public boolean checkInput(String input){\n\t\t//make sure only input 0-9\n\t\tif(input.length() != 1){\n\t\t\treturn false;\n\t\t}\n\t\tchar c = input.charAt(0);\n\t\tif(!Character.isDigit(c)){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean isIn(String s1, String s2) {\n\t for(int i = 0; i <= s2.length() - s1.length(); i++) {\n\t \n\t if(s2.substring(i, i+s1.length()).equals(s1) ) {\n\t // System.out.println(\"+ \" + s2.substring(i, i+s1.length()) + \" \" + s1);\n\t return true;\n\t }\n\t }\n\t return false;\n\t}",
"private boolean memeChecker(String currentInput)\n\t{\n\t\tboolean hasMeme = false;\n\t\t// loop over all items in it, and look for a meme.\n\n\t\tfor (String currentPhrase : myMemes)\n\t\t{\n\t\t\tif (currentPhrase.equals(currentInput))\n\t\t\t{\n\t\t\t\thasMeme = true;\n\t\t\t}\n\t\t}\n\t\treturn hasMeme;\n\t}",
"private boolean evaluate(final String input) {\n return evaluate(input, true);\n}",
"private boolean matchString(String s, String key)\n {\n if (s.equals(key)) return true;\n int min = s.length()<key.length()?s.length():key.length();\n for (int i=0;i<min; ++i)\n {\n \n if(key.charAt(i) == '*')\n return true;\n if(s.charAt(i) != key.charAt(i) && key.charAt(i) != '?')\n return false;\n }\n for (int i=s.length();i<key.length();i++)\n {\n if (key.charAt(i)!='*') \n return false;\n }\n return true;\n }",
"public static boolean isUnique(String s) {\n if (s.length() > 128) return false;\n\n // we dont need to check the last element\n for (int i = 0; i < s.length() - 1; i++){\n String current = \"\";\n current += s.charAt(i);\n// System.out.println(current);\n if (s.substring(i + 1).contains(current))\n return false;\n }\n return true;\n }",
"private boolean has(String s) {\n\t\tboolean result = false;\n\t\tMyStack newBurger = new MyStack();\n\t\twhile (myBurger.size() != 0) {\n\t\t\tif (myBurger.peek().equals(s)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tnewBurger.push(myBurger.pop());\n\t\t\t}\n\t\t}\n\t\twhile (newBurger.size() != 0) {\n\t\t\tmyBurger.push(newBurger.pop());\n\t\t}\n\t\treturn result;\n\t}",
"private boolean isFitPatternStr(char startC, String patternStr) {\n\n if (startC != patternStr.charAt(0)) {\n return false;\n }\n char inputChar = ' ';\n char patternchar = ' ';\n for (int i = 1; i < patternStr.length(); i++) {//the post\n patternchar = patternStr.charAt(i);\n inputChar = getNextChar();\n if (inputChar != patternchar) {\n throwParseError();\n }\n\n }\n return true;\n }",
"public boolean isDone(String s) {\n return (s.equals(\"V\"));\n }",
"public Boolean findUniqueness(final String inp) {\n boolean flag = true;\n for (int i = 0; i < inp.length(); i++) {\n for (int j = i + 1; j < inp.length(); j++) {\n if (inp.charAt(i) == inp.charAt(j)) {\n flag = false;\n }\n }\n }\n return flag;\n }",
"@Override\n\tpublic boolean match(String str) {\n\t\treturn false;\n\t}",
"public abstract boolean mo70724g(String str);",
"public static boolean contains(final String string, final String sub) {\n final int tl = sub.length();\n if(tl == 0) return true;\n final int sl = string.length() - tl;\n for(int s = 0; s <= sl; s++) {\n int t = 0;\n while(equals(string.charAt(s + t), sub.charAt(t))) {\n if(++t == tl) return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic boolean compute(String input) {\n\t\tState state = this.initialState;\n\t\tfor (int i = 0; i < input.length(); ++i) {\n\t\t\tstate = this.transitionFunction().applyTo(state, Character.valueOf(input.charAt(i)));\n\t\t}\n\t\treturn this.acceptingStates.contains(state);\n\t}",
"public static boolean isValid(final String string) {\n int index1;\n for (index1 = 0; index1 < string.length(); index1++) {\n if (string.charAt(index1) == SEPARATOR) {\n boolean found = false;\n int index2;\n for (index2 = index1 + 1; index2 < string.length() && !found; index2++) {\n if (string.charAt(index2) == SEPARATOR) {\n found = true;\n String subStr = string.substring(index1, index2 + 1);\n boolean valid = false;\n for (int k = 0; k < availableTemplateElements.size() && !valid; k++) {\n valid = availableTemplateElements.get(k).isContainedBy(subStr);\n \n }\n if (!valid) {\n return false;\n } \n }\n }\n if (!found) {\n return false;\n }\n index1 = index2 - 1;\n }\n }\n return true;\n }",
"protected void readExpected(java.lang.String s) throws java.io.IOException {\n char c = readCharWord();\n for (int i = 0; i < s.length(); i++) {\n if (c != s.charAt(i)) {\n System.out.println(\"Was expecting '\"+s+\"', saw '\"+c+\n \"' instead of '\"+s.charAt(i)+\"'\");\n throw error();\n }\n c = next();\n }\n }",
"public boolean startsWith(final byte[] string, final byte[] sub, final InputInfo info)\n throws QueryException {\n\n final RuleBasedCollator rbc = rbc(info);\n return startsWith(rbc.getCollationElementIterator(string(string)),\n rbc.getCollationElementIterator(string(sub)));\n }",
"@Override\n public String nextString() {\n last = (last + 1) % str.length;\n return str[last];\n }",
"public static void main(String[] args)\r\n\t{\n\t\tSystem.out.print(\"enter string - \");\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString whole = input.next();\r\n\t\tSystem.out.print(\"enter sub-string to be searched - \");\r\n\t\tString part = input.next();\r\n\t\tinput.close();\r\n\t\tImplementStrStr sample = new ImplementStrStr();\r\n\t\tString result = sample.findSubString(whole, part);\r\n\t\tif(result==null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SubString not present\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SubString is present - \"+result);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString userInput= in.nextLine();\n\t\tuserInput.intern();\n\t\tString first = \"anton\";\n\t\tSystem.out.println(first==userInput);\n\t\t\n\t}",
"private Token scanString(LocatedChar firstChar) {\n\t\tStringBuffer buffer = new StringBuffer();\n\t\tappendSubsequentString(buffer);\n\t\tLocatedChar ch = input.peek();\n\t\tif(ch.matchChar('\"')) {\n\t\t\tinput.next();\n\t\t\treturn StringToken.make(firstChar, buffer.toString());\n\t\t} else {\n\t\t\tlexicalError(ch, \"malformed string\");\n\t\t\treturn findNextToken();\n\t\t}\n\t}",
"public static boolean checkString(String s, Predicate<String> pre1,Predicate<String> pre2) {\n return pre1.or(pre2).test(s);\n }",
"public static int checkValidity (String stringChoice) {\n int choice;\n Scanner parser = new Scanner(stringChoice);\n String modStringChoice = stringChoice.replaceAll(\"[\\\\d]\", \"\");\n if (modStringChoice.length() == 0 && parser.hasNextInt()) {\n choice = parser.nextInt();\n }\n else {\n choice = -1;\n }\n parser.close();\n return choice;\n }",
"private void run() {\n\t\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\tint n = sc.nextInt();\n\t\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\t\tint l = sc.nextInt();\n\t\t\t\t\tString s = sc.next();\n\t\t\t\t\tStack<Character> stack = new Stack<>();\n\t\t\t\t\tboolean ok = true;\n\t\t\t\t\tfor(int j=0;j<l && ok;j++) {\n\t\t\t\t\t\tchar cur = s.charAt(j);\n\t\t\t\t\t\tif(isRight(cur)) {\n\t\t\t\t\t\t\tboolean matched = false;\n\t\t\t\t\t\t\twhile(!stack.isEmpty()) {\n\t\t\t\t\t\t\t\tchar a = stack.pop();\n\t\t\t\t\t\t\t\tif(!ispar(a)) continue;\n\t\t\t\t\t\t\t\tif(isMatch(cur, a)) { matched = true; break; }\n\t\t\t\t\t\t\t\telse { ok = false; break; }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!matched) { ok = false; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstack.push(cur);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!stack.isEmpty()) ok = false;\n\t\t\t\t\tif(ok) System.out.println(\"Valid\");\n\t\t\t\t\telse System.out.println(\"Invalid\");\n\t\t\t\t}\n }",
"public static boolean startsWith(final String string, final String sub) {\n final int sl = string.length(), tl = sub.length();\n if(tl > sl) return false;\n for(int t = 0; t < tl; t++) {\n if(!equals(string.charAt(t), sub.charAt(t))) return false;\n }\n return true;\n }",
"public boolean search(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n return false;\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n return currentNode.isFinished;\n }",
"public boolean acceptable(String s){\n\t\tCharacter first = s.charAt(0);\n\t\tCharacter last = s.charAt(s.length() - 1);\n\t\t\n\t\treturn (super.acceptable(s) && !Character.isDigit(first) && Character.isDigit(last));\n\t}",
"boolean hasStringValue();",
"public boolean doubleX(String str) {\n int index = 0;\n for (char c : str.toCharArray()) {\n if(index + 1 < str.length() && c == str.charAt(index + 1)){\n return true;\n }\n index++;\n }\n return false;\n }",
"public boolean next() {\n\t\tif (done())\n\t\t\treturn false;\n\t\tmany(whitespace);\n\t\tString c=program.charAt(pos)+\"\";\n\t\tif (digits.contains(c))\n\t\t\tnextNumber();\n\t\telse if (letters.contains(c))\n\t\t\tnextKwId();\n\t\telse if (operators.contains(c))\n\t\t\tnextOp();\n\t\telse if (c.equals(\"#\")){\n\t\t\t//this is a comment, move past the first hashtag\n\t\t\tpast('#');\n\t\t\t//move past the second hastag, ignoring everything in between\n\t\t\tpast('#');\n\t\t\treturn next();\n\t\t} else {\n\t\t\tSystem.err.println(\"illegal character at position \"+pos);\n\t\t\tpos++;\n\t\t\treturn next();\n\t\t}\n\t\treturn true;\n }",
"public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nString s=sc.nextLine();\r\nchar c[]=s.toCharArray();\r\nint flag=0;\r\nfor(int i=0;i<c.length;i++)\r\n{ for(int j=i+1;j<c.length;j++)\r\n\tif(c[i]==c[j])\r\n\t\tflag=1;\r\n\telse\r\n\tcontinue;\r\n}\r\nif(flag==1)\r\n\tSystem.out.println(\"No\");\r\nelse\r\n\tSystem.out.println(\"Yes\");\r\n\t}",
"boolean checkChar(String s1, String s2);",
"public static void main(String[] args) {\n\t\tString s = \"ssss\";\n\t\tint count = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length();i++) {\n\t\t\tchar a = s.charAt(i);\n\t\t\tfor(int j = 0; j<s.length();j++) {\n\t\t\t\tif(s.charAt(j) == a && j!=i) {\n\t\t\t\t\tSystem.out.println(\"Invalid\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = count + 1;\n\t\t}\n\t\tif(count == s.length()) {\n\t\t\tSystem.out.println(\"Valid\");\n\t\t}\n\t}",
"private static boolean validateString(String string) {\n Pattern pattern = Pattern.compile(\"^([1-9]+[0-9]?|100)\\\\s([1-9]+\" +\n \"[0-9]?|100)\\\\s([1-9]+[0-9]?|100)$\");\n Matcher matcher = pattern.matcher(string);\n return matcher.matches();\n }",
"public boolean checkForAnagrams(String inp) {\n return (new StringBuffer(inp).reverse().toString().equals(inp));\n }",
"protected boolean isPatternFoundInString(String string) {\n if (!StringUtils.isEmpty(string)) {\n Matcher matcher = pattern.matcher(string);\n if (matcher.find()) {\n return true;\n }\n }\n return false;\n }",
"public boolean isActivationString(String word);",
"public boolean hasString() {\n/* 800 */ return true;\n/* */ }",
"public boolean gHappy(String str) {\n for(int x=0; x<str.length(); x++)\n {\n if(str.charAt(x)=='g')\n {\n if(str.length()<2)\n return false;\n else if(x==0 && str.charAt(x+1) != 'g')\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && x+1==str.length())\n return false;\n else if(x>0 && str.charAt(x-1) != 'g' && str.charAt(x+1) != 'g')\n return false;\n }\n }\n\n return true;\n}",
"boolean isCircular(String s);",
"public void containsString() {\n\t\t\tString name = \"martin\";\n\t\t\tboolean contains = name.contains(\"rti\");\n\t\t\tif(contains) {\n\t\t\t\tSystem.out.println(\"it contains\");\n\t\t\t}\n\t\t}",
"public boolean frontAgain(String str) {\r\n if (str.length() > 1 && str.substring(0, 2).equals(str.substring(str.length() - 2))) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public boolean isValid_(String s) {\n\n if (s.length() % 2 != 0){\n return false;\n }\n\n Stack st = new Stack();\n\n for (int i = 0; i < s.length(); i++){\n\n String cur = String.valueOf(s.charAt(i));\n\n if (cur.equals(\"(\")){\n st.push(\")\");\n continue;\n }\n else if (cur.equals(\"{\")){\n st.push(\"}\");\n continue;\n }\n else if (cur.equals(\"[\")){\n st.push(\"]\");\n continue;\n }\n else{\n if (st.empty()){\n return false;\n }else{\n String _cur = (String) st.pop();\n if (!_cur.equals(cur)){\n return false;\n }\n }\n }\n\n }\n return true ? st.empty() : false;\n }",
"public boolean insuranceCheck(String String) {\n\t\treturn false;\n\t}",
"private static void displayString () {\n Scanner userInput = new Scanner(System.in);\n String a = inputString();\n System.out.print(\"Insert string to test: \");\n String b = userInput.nextLine();\n System.out.println(a.endsWith(b));\n }"
] | [
"0.6048937",
"0.60433334",
"0.59653145",
"0.59354",
"0.57755154",
"0.57704014",
"0.57681376",
"0.57659763",
"0.57216185",
"0.5717842",
"0.57145756",
"0.5677877",
"0.5662536",
"0.5637876",
"0.5637253",
"0.5626249",
"0.5622912",
"0.5619605",
"0.5607981",
"0.55891705",
"0.556363",
"0.55566067",
"0.5554464",
"0.5554085",
"0.555106",
"0.5542158",
"0.55415064",
"0.5521455",
"0.55070895",
"0.5505247",
"0.5503767",
"0.5498785",
"0.5494301",
"0.54893297",
"0.54893297",
"0.54784346",
"0.5475731",
"0.5475731",
"0.54698104",
"0.5464051",
"0.5462593",
"0.5450582",
"0.54395974",
"0.54353744",
"0.5424378",
"0.54216033",
"0.5420957",
"0.5408136",
"0.54081136",
"0.54080033",
"0.53972846",
"0.53961164",
"0.53941226",
"0.53887904",
"0.53868824",
"0.5384646",
"0.5383049",
"0.53779787",
"0.5370383",
"0.5367971",
"0.5364467",
"0.5359466",
"0.5357979",
"0.5357318",
"0.5355588",
"0.5351841",
"0.53471607",
"0.53458405",
"0.53437257",
"0.53424907",
"0.53395545",
"0.53390175",
"0.53246886",
"0.5323991",
"0.5320671",
"0.5313866",
"0.5313196",
"0.5308193",
"0.53049535",
"0.52871275",
"0.5281457",
"0.5279946",
"0.5278264",
"0.5277177",
"0.52770555",
"0.52748835",
"0.5271427",
"0.5269933",
"0.526992",
"0.52674925",
"0.5263394",
"0.52602524",
"0.5259503",
"0.52562517",
"0.5251251",
"0.5249552",
"0.5249221",
"0.52488726",
"0.52415437",
"0.52403414"
] | 0.67341024 | 0 |
Check if a character (ascii) in a given range appears next in the input. | private boolean SET(String s) {
if (in >= input.length()) return false;
int ch = input.charAt(in);
boolean found = false;
for (int i = 0; i < s.length() && ! found; i++) {
if (ch == s.charAt(i)) found = true;
}
if (found) in++;
return found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean RANGE(char first, char last) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code < first || code > last) return false;\r\n in += len;\r\n return true;\r\n }",
"private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public abstract boolean matches(char c);",
"public static boolean isAscii(char ch) {\n/* 403 */ return (ch < '');\n/* */ }",
"boolean hasHasCharacter();",
"boolean hasChar();",
"public boolean isAscii()\n { \n for (int i=0; i<val.length(); ++i)\n { \n int c = val.charAt(i);\n if (c > 0x7f) return false;\n }\n return true;\n }",
"boolean checkChar(String s1, String s2);",
"public boolean checkForChar(String str) {\n\t\tif (str.contains(\"a\") || str.contains(\"A\") || str.contains(\"e\") || str.contains(\"E\")) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TO DO\n\n\t\treturn false;\n\t}",
"private static boolean c(char paramChar)\r\n/* 680: */ {\r\n/* 681:674 */ return ((paramChar >= '0') && (paramChar <= '9')) || ((paramChar >= 'a') && (paramChar <= 'f')) || ((paramChar >= 'A') && (paramChar <= 'F'));\r\n/* 682: */ }",
"boolean checkName (String name){\r\n \r\n // Use for loop to check each character\r\n for (int i = 0; i < name.length(); i++) {\r\n // If character is below 'A' in Unicode table then return false\r\n if (name.charAt(i) < 65 && name.charAt(i) != 32 && name.charAt(i) != 10){\r\n return false;\r\n }\r\n // Else if character is between 'Z' and 'a' in unicode table,\r\n // then return false\r\n else if (name.charAt(i) > 90 && name.charAt(i) < 97){\r\n return false;\r\n }\r\n else if (name.charAt(i) > 122)\r\n return false;\r\n }\r\n return true;\r\n }",
"boolean contains(char c) {\n for (char x : _chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"private byte ensureIsInAlphabet(byte input) {\n return (byte)(ALPHABET_START + (Math.abs(input) % ALPHABET_SIZE));\n }",
"private void parseRange(Node node) {\r\n if (switchTest) return;\r\n int low = node.low();\r\n int high = node.high();\r\n ok = false;\r\n if (in < input.length()) {\r\n int ch = input.codePointAt(in);\r\n ok = (ch >= low) && (ch <= high);\r\n if (ok) {\r\n int n = Character.charCount(ch);\r\n in += n;\r\n if (tracing) traceInput();\r\n }\r\n }\r\n }",
"public static boolean checkAllAlphabets(String input) {\n if (input.length() < 26) {\n return false;\n }\n\n //Even a single character is missing, return false\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n if (input.indexOf(ch) < 0 && input.indexOf((char) (ch + 32)) < 0) {\n return false;\n }\n }\n return true;\n }",
"public boolean isValidForString(String str, char charCode, int position);",
"private static boolean m127620a(char c) {\n return Pattern.compile(\"[一-龥]\").matcher(String.valueOf(c)).matches();\n }",
"public abstract boolean isStarterChar(char c);",
"public static boolean stringInBounds (String plainText) {\r\n\t\t\r\n\t\tchar[] pText = plainText.toCharArray();\r\n\t\tboolean isCorrect;\r\n\t\tfor(int i = 0; i < plainText.length(); i++) {\r\n\t\t\tdo {\r\n\t\t\t\tif (plainText.charAt(i) < LOWER_BOUND || plainText.charAt(i) > UPPER_BOUND ) {\r\n\t\t\t\t\tisCorrect = false;\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**\r\n\t\t\t\t\tif(plainText.charAt(i) < LOWER_BOUND) {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) - RANGE);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tchar nChar = (char) (plainText.charAt(i) + RANGE);\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}else {\r\n\t\t\t\t\tisCorrect = true;\r\n\t\t\t\t}\r\n\t\t\t}while(isCorrect = false);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static void printAlphabetInRange(char beginning, char ending ){\n\n if(beginning<ending){\n System.out.println(\"we need to increment from \" + beginning+\" till \"+ending);\n for (char i = beginning; i <=ending ; i++) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else if (beginning>ending){\n System.out.println(\"we need to decrement from \" + beginning+\" till \"+ending);\n for (char i = beginning; i >=ending ; i--) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else{\n System.out.println(\"They are same character\");\n }\n\n }",
"int getIndex(Character c)\n{\n int a = Character.getNumericValue('a');\n int z = Character.getNumericValue('z');\n int val = Character.getNumericValue(c);\n \n if (a <= val && val <= z) return val - a;\n return -1;\n}",
"public static boolean isIUPAC(final char base) {\n\tswitch(base) {\n\t case 'A':\n\t case 'C':\n\t case 'G':\n\t case 'T':\n\t case 'U':\n\t case 'R':\n\t case 'Y':\n\t case 'S':\n\t case 'W':\n\t case 'K':\n\t case 'M':\n\t case 'B':\n\t case 'D':\n\t case 'H':\n\t case 'V':\n\t case 'N':\n\t //\n\t case 'a':\n\t case 'c':\n\t case 'g':\n\t case 't':\n\t case 'u':\n\t case 'r':\n\t case 'y':\n\t case 's':\n\t case 'w':\n\t case 'k':\n\t case 'm':\n\t case 'b':\n\t case 'd':\n\t case 'h':\n\t case 'v':\n\t case 'n': return true;\n\t default: return false;\n\t\t}\n\t}",
"boolean contains(char ch) {\n return _letters.indexOf(ch) >= 0;\n }",
"public boolean isChar(String x) {\n\t\tfor (int i = 0; i < x.length(); i++) {\n\t\t\tchar c = x.charAt(i);\n\t\t\tif ((c == '-' || c == '+') && x.length() > 1)\n\t\t\t\tcontinue;\n\t\t\tif (((int) c > 64 && (int) c < 90) || ((int) c > 96 && (int) c < 123))\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private boolean verifySequence(String seq) {\n for (int i = 0; i < seq.length(); i++) {\n if (seq.charAt(i) != 'A' && seq.charAt(i) != 'T'\n && seq.charAt(i) != 'C' && seq.charAt(i) != 'G') {\n return false;\n }\n }\n return true;\n }",
"public boolean isEquivalent(char character, char anothercharacter);",
"private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public static boolean isUniqueChars(String str) {\n\t if(str.length() > 128) return false;\n\t \n\t //created hash table boolean to flag duplicate characters\n\t boolean [] check = new boolean [128];\n\t \n\t //run a for look in order to iterate through the string.\n for(int i = 0; i < str.length(); i++){\n //convert the characters of the string array into integers\n int val = str.charAt(i);\n //check the hash table for past characters seen, there are 128 ascii codes\n\t if(check[val]) return false;\n\t //turn on the true flag for characters you are seeing\n\t check[val] = true;\n\t }\n\t \n\t //pass the hash table therefore it is unique and true;\n\t return true;\n\n\t}",
"public boolean characterInput(char c);",
"public static boolean isAsciiControl(char ch) {\n/* 441 */ return (ch < ' ' || ch == '');\n/* */ }",
"private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }",
"boolean getHasCharacter();",
"private static boolean hasUniqueChars(String str) {\n\t\tfor(int i = 0; i < str.length(); i++) {\n\t\t\tfor(int j = i+1; j < str.length(); j++) {\n\t\t\t\tif( str.charAt(i) == str.charAt(j) )\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }",
"static boolean isBasePair(char c)\n{\n\treturn c >= 'A' && c <= 'Z';\n}",
"public static boolean onlyDigitsAscii(String input) {\n if (input.length() != 0) {\n int i = 0;\n while (i < input.length()) {\n int ascii = (int) input.charAt(i);\n if (48 <= ascii && ascii <= 57) {\n i++;\n } else {\n return false;\n }\n }\n }\n return false;\n }",
"public static boolean isAllCharacterUnique(String sIn) {\n if (sIn.length() > 32768) {\n return false;\n }\n for (char c : sIn.toCharArray()) {\n if (sIn.indexOf(c) != sIn.lastIndexOf(c)) return false;\n }\n return true;\n }",
"public static boolean isAsciiAlpha(char ch) {\n/* 460 */ return (isAsciiAlphaUpper(ch) || isAsciiAlphaLower(ch));\n/* */ }",
"@Override\n\t\tpublic boolean inRange(String value) {\n\t\t\treturn true;\n\t\t}",
"static String isValid(String s) {\n if(s.isEmpty())return \"YES\";\n int[] alphabet = new int[26];\n // char - 97 = arr location;\n for(int i = 0;i<s.length();i++){\n int location = (int)s.charAt(i) - 'a';\n alphabet[location] += 1;\n }\n for(Integer x: alphabet){\n System.out.println(x);\n }\n int i = 0;\n while(alphabet[i]==0){\n i++;\n }\n int standard = alphabet[i];\n boolean used = false;\n for(;i<26;i++){\n if(alphabet[i]!=0){\n if(Math.abs(alphabet[i]-standard)==1){\n if(used){\n System.out.println(\"equal 1\");\n return \"NO\";\n }else{\n used = true;\n }\n }else if(Math.abs(alphabet[i]-standard)>1){\n\n System.out.println(\"gtr then 1\");\n return \"NO\";\n }\n }\n }\n return \"YES\";\n\n\n\n }",
"public static boolean Character(char a)\n {\n boolean valid = false;\n int convert;\n \n //converts the character a to its equivalent decimal value\n convert = (int)a;\n \n // checks if the character is within range\n // a-z or A-Z\n if (((convert >= 65) && (convert <= 90))||((convert >= 97) && (convert <= 122)))\n {\n valid = true;\n }\n else\n {\n //displays the error to the user by calling the displayError method in UserInterface class\n UserInterface.displayError(\"You have not entered a character. Enter again: \");\n }\n return valid;\n }",
"boolean contains(char ch) {\n for (int i = 0; i < _chars.length(); i += 1) {\n if (_chars.charAt(i) == ch) {\n return true;\n }\n }\n return false;\n }",
"private boolean isOK(char ch) {\n if(String.valueOf(ch).matches(\"[<|\\\\[|\\\\-|\\\\||&|a-z|!]\")){\n return true;\n }\n return false;\n }",
"public abstract boolean checkMoveRange(String destination);",
"public static boolean isAsciiAlphaLower(char ch) {\n/* 498 */ return (ch >= 'a' && ch <= 'z');\n/* */ }",
"private boolean isGrLetter(char ch) {\n /*if ( ( (ch >= 'á') && (ch <= 'ù')) || ( (ch >= 'Á') && (ch <= 'Ù')) ||\n (ch == 'Ü') || (ch == 'Ý') || (ch == 'Þ') || (ch == 'ß') ||\n (ch == 'ü') || (ch == 'ý') || (ch == 'þ') ||\n (ch == '¢') || (ch == '¸') || (ch == '¹') || (ch == 'º') ||\n (ch == '¼') || (ch == '¾') || (ch == '¿') ||\n (ch == 'ú') || (ch == 'û') || (ch == 'À') || (ch == 'à')) {*/\n if ( ( (ch >= '\\u03b1') && (ch <= '\\u03c9')) || ( (ch >= '\\u0391') && (ch <= '\\u03a9')) ||\n \t(ch == '\\u03ac') || (ch == '\\u03ad') || (ch == '\\u03ae') || (ch == '\\u03af') ||\n \t(ch == '\\u03cc') || (ch == '\\u03cd') || (ch == '\\u03ce') ||\n \t(ch == '\\u0386') || (ch == '\\u0388') || (ch == '\\u0389') || (ch == '\\u038a') ||\n \t(ch == '\\u038c') || (ch == '\\u038e') || (ch == '\\u038f') ||\n \t(ch == '\\u03ca') || (ch == '\\u03cb') || (ch == '\\u0390') || (ch == '\\u03b0')) {\n return true;\n } // if\n else {\n return false;\n } // else\n }",
"public static boolean isUniqueChars2(String str) {\n int checker = 0;\n for (int i = 0; i < str.length(); i++) {\n int val = str.charAt(i) - 'a';\n if ((checker & (1 << val)) > 0) return false;\n checker |= 1 << val;\n }\n return true;\n }",
"private\n static\n boolean\n isHexChar( char ch )\n {\n return ( ch >= '0' && ch <= '9' ) ||\n ( ch >= 'a' && ch <= 'f' ) ||\n ( ch >= 'A' && ch <= 'F' );\n }",
"public static boolean isValid(int c) {\n return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||\n (0x10000 <= c && c <= 0x10FFFF);\n }",
"public static boolean hasSameCharInSequence(String password) throws InvalidSequenceException\r\n {\r\n char c1, c2, c3;\r\n if (password.length() > 2)\r\n {\r\n for (int i = 2; i < password.length(); i++)\r\n {\r\n c1 = password.charAt(i - 2);\r\n c2 = password.charAt(i - 1);\r\n c3 = password.charAt(i);\r\n if (c1 == c2 && c2 == c3)\r\n throw new InvalidSequenceException();\r\n }\r\n }\r\n return true;\r\n }",
"private static boolean m66068b(String str) {\n for (int i = 0; i < str.length(); i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127 || \" #%/:?@[\\\\]\".indexOf(charAt) != -1) {\n return true;\n }\n }\n return false;\n }",
"private static boolean checkIfCanBreak( String s1, String s2 ) {\n\n if (s1.length() != s2.length())\n return false;\n\n Map<Character, Integer> map = new HashMap<>();\n for (Character ch : s2.toCharArray()) {\n map.put(ch, map.getOrDefault(ch, 0) + 1);\n }\n\n for (Character ch : s1.toCharArray()) {\n\n char c = ch;\n while ((int) (c) <= 122 && !map.containsKey(c)) {\n c++;\n }\n\n if (map.containsKey(c)) {\n map.put(c, map.getOrDefault(c, 0) - 1);\n\n if (map.get(c) <= 0)\n map.remove(c);\n }\n }\n\n return map.size() == 0;\n }",
"public static boolean hasA( String w, String letter )\r\n { return w.indexOf(letter) != -1;\r\n }",
"public boolean isVowel(int charCode);",
"public static boolean is(CharSequence in, CharPred pred) {\n int max = in.length();\n switch (max) {\n case 0:\n return false;\n case 1:\n return pred.test(in.charAt(0));\n case 2:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(1));\n case 3:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 4:\n return pred.test(in.charAt(1))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(0))\n && pred.test(in.charAt(2));\n case 5:\n return pred.test(in.charAt(0))\n && pred.test(in.charAt(4))\n && pred.test(in.charAt(3))\n && pred.test(in.charAt(1))\n && pred.test(in.charAt(2));\n default:\n boolean odd = (max % 2) != 0;\n int mid = max / 2;\n if (odd) {\n if (pred.test(in.charAt(mid))) {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n } else {\n return false;\n }\n } else {\n for (int i = 0; i < mid; i++) {\n if (!pred.test(in.charAt(i))) {\n return false;\n } else if (!pred.test(in.charAt(max - (i + 1)))) {\n return false;\n }\n }\n }\n return true;\n\n }\n }",
"private boolean CHAR(char ch) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int code = input.nextChar(in, len);\r\n if (code != ch) return false;\r\n in += len;\r\n return true;\r\n }",
"private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }",
"public static boolean isUniqueSolInBits(String str){\n //init 32 bit int 0\n int checker = 0;\n for (int i = 0; i < str.length(); ++i){\n //map char 'a' to 'z' to 32 bit (only need 26 bits actually)\n int val = str.charAt(i) - 'a';\n if ((checker & (1 << val)) > 0) return false;\n checker |= (1 << val);\n }\n return true;\n }",
"private static boolean isHex(char p_char) {\n return (p_char <= 'f' && (fgLookupTable[p_char] & ASCII_HEX_CHARACTERS) != 0);\n }",
"private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }",
"public boolean isLetterOrDigitAhead()\n {\n\n int pos = currentPosition;\n\n while (pos < maxPosition)\n {\n if (Character.isLetterOrDigit(str.charAt(pos)))\n return true;\n\n pos++;\n }\n\n return false;\n }",
"public static boolean hasA( String w, String letter ) \n {\n return (w.indexOf(letter) > -1);\n }",
"static boolean isValidWord(String word){\n\t\tword = word.toLowerCase();\n\t\tchar check;\n\t\tfor(int i=0; i<word.length(); i++){\n\t\t\tcheck = word.charAt(i);\n\t\t\tif((check<97 || check>122)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public boolean stringE(String str) {\n int count = 0;\n \n for (int i=0; i < str.length(); i++) {\n if (str.charAt(i) == 'e') count++;\n }\n \n return (count >= 1 && count <=3);\n}",
"private boolean isChoice(int n) {\n String string = this.msg;\n int n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 99) {\n if (n != 67) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 104) {\n if (n2 != 72) return false;\n }\n string = this.msg;\n n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 111) {\n if (n != 79) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 105) {\n if (n2 != 73) return false;\n }\n if ((n2 = (int)this.msg.charAt(n)) != 99) {\n if (n2 != 67) return false;\n }\n if ((n = (int)this.msg.charAt(n + 1)) == 101) return true;\n if (n != 69) return false;\n return true;\n }",
"private static boolean Ncontains(String word, char a) \n {\n \t// return true of false if the String match char a\n for(int x = 0; x < word.length(); x++)\n {\n if(word.charAt(x) == a)\n return false;\n }\n return true;\n }",
"@Test\n public void shouldFindSubstringAtTheEndOfTheStringAfterOneCharacterPartialMatch() {\n // Given\n String string = \"AABc\";\n CharSequence charSequence = new StringBuilder(\"ABc\");\n\n // When\n boolean containsCharSequence = string.contains(charSequence);\n\n // Then\n assertTrue(containsCharSequence);\n }",
"private static boolean CharInClassInternal(char ch, String set, int start, int mySetLength, int myCategoryLength)\n\t{\n\t\tint min;\n\t\tint max;\n\t\tint mid;\n\t\tmin = start + SETSTART;\n\t\tmax = min + mySetLength;\n\n\t\twhile (min != max)\n\t\t{\n\t\t\tmid = (min + max) / 2;\n\t\t\tif (ch < set.charAt(mid))\n\t\t\t{\n\t\t\t\tmax = mid;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\t// The starting position of the set within the character class determines\n\t\t// whether what an odd or even ending position means. If the start is odd, \n\t\t// an *even* ending position means the character was in the set. With recursive \n\t\t// subtractions in the mix, the starting position = start+SETSTART. Since we know that \n\t\t// SETSTART is odd, we can simplify it out of the equation. But if it changes we need to \n\t\t// reverse this check. \n\t\tDebug.Assert((SETSTART & 0x1) == 1, \"If SETSTART is not odd, the calculation below this will be reversed\");\n\t\tif ((min & 0x1) == (start & 0x1))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (myCategoryLength == 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn CharInCategory(ch, set, start, mySetLength, myCategoryLength);\n\t\t}\n\t}",
"private boolean containsValidCharacters(String inputString)\r\n {\r\n boolean validityFlag = true;\r\n int inputStringLength = inputString.trim().length();\r\n for (int i = 0 ; i < inputStringLength ; i++)\r\n {\r\n char digit = inputString.charAt(i);\r\n if (!((digit >= 'A' && digit <= 'Z') || (digit >= 'a' && digit <= 'z') || (digit >= '0' && digit <= '9')))\r\n {\r\n validityFlag = false;\r\n break;\r\n }\r\n }\r\n return validityFlag;\r\n }",
"public static boolean checkchar(String sentence, int total){\n \n if (total>sentence.length()){ //if the number entered is bigger than the total length\n for (int i =0; i < sentence.length(); i++) { //just compare for the whole length \n if (Character.isLetter(sentence.charAt(i))==false){ //if it is not a letter\n return false; //return false\n }\n }\n return true; //otherwise return true\n }\n \n else { //if number entered is less than the total length\n for(int i =0; i < total; i++){ //just look at the number of characters the user wants you to look at \n if(Character.isLetter(sentence.charAt(i))==false){ //if it not a letter \n return false;//return false\n }\n \n return true; //otherwise return true\n }\n \n }\n return true;\n \n }",
"private static boolean isHex(char c) {\n\t\tboolean result = false;\n\t\tif (Character.isDigit(c)) {\n\t\t\tresult = true;\n\t\t}\n\t\telse if (c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f') {\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}",
"public boolean duplicatedigitInNumberRange(int num)\r\n\t\r\n\t{\r\n\r\n\t\tMap<Character,Integer> map = new HashMap<Character, Integer>();\r\n\t\tchar[] char1= String.valueOf(num).toCharArray();\r\n\t//\tint count=1;\r\n\t\tboolean f=true;\r\n\tfor(char c:char1)\r\n\t{\r\n\t\tif(f=true)\r\n\t\t{\r\n\t\tif(map.containsKey(c))\r\n\t\t{\r\n\t\t\tf=false;\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t{\r\n\t\t\tmap.put(c,1);\r\n\t\t\t\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t}\r\n\treturn f;\r\n\t\r\n\t}",
"public boolean isCharAt(int row, int col, char c)\n {\n if (row < 0 || row >= SIZE || col < 0 || col >= SIZE) {\n return false;\n }\n\n if (map[row][col] == c) {\n return true;\n }\n else {\n return false;\n } \n }",
"public boolean canRecover(String input) {\n if(encode(input) != -1) return true;\n for(int i=0; i<input.length(); i++) {\n if(Character.isLowerCase(input.charAt(i))) {\n String next = input.substring(0, i) + Character.toUpperCase(input.charAt(i)) + input.substring(i+1);\n if(canRecover(next)) return true;\n }\n }\n return false;\n }",
"public static boolean stringInBounds (String plainText) {\r\n\t\t// Variables\r\n\t\tboolean isValid = true;\r\n\t\t\r\n\t\t// Loops\r\n\t\tfor (int i = 0; i < plainText.length(); i++) {\r\n\t\t\t// Variables\r\n\t\t\tchar c = plainText.charAt(i);\r\n\t\t\t\r\n\t\t\t// Checks\r\n\t\t\tif (c < LOWER_BOUND || c > UPPER_BOUND) {\r\n\t\t\t\tisValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Return\r\n\t\treturn isValid;\r\n\t}",
"private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }",
"static int letterIslands(String s, int k) {\n /*\n * Write your code here.\n */\n\n }",
"public static boolean checkchar(String sentence){\n for (int i =0; i < sentence.length(); i++){ //just compare for the whole length \n if (Character.isLetter(sentence.charAt(i))==false){ //if it is not a letter\n return false; //return false\n }\n return true; //otherwise return true\n }\n return true;\n}",
"private static boolean ifPalindrome(char[] input, int start, int end){\r\n\t\t//the idea is to scan from 1st to the mid point to see the reverse side char same as the picked one and return\r\n\t\tfor(int i=start;i<=(start+end)/2;i++){ //notice that we use <= other than<\r\n\t\t\tif(input[i] ==input[start+end-i]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if we come here that means it is a palindrome for selected start/end\r\n\t\treturn true;\r\n\t}",
"private boolean checkInCashe(String s) {\n return true;\n }",
"public static boolean isUnique(String input) {\r\n // Create a Set to insert characters\r\n Set<Character> set = new HashSet<>();\r\n\r\n // get all characters form String\r\n char[] characters = input.toCharArray();\r\n\r\n for (Character c : characters) {\r\n if (!set.add(c)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean compareLetters(String romConcat, char smallNum, char bigNum) {\n\t\tint checkSmall = 0, checkBig = 0;\r\n\t\t\r\n\t\tif(romConcat.indexOf(smallNum) > -1) {\r\n\t\t\tcheckSmall = romConcat.indexOf(smallNum);\r\n\t\t}\r\n\t\t\r\n\t\tif(romConcat.indexOf(bigNum) > -1) {\r\n\t\t\tcheckBig = romConcat.indexOf(bigNum);\r\n\t\t}\r\n\t\t\r\n\t\tif(checkSmall == 0 || checkBig == 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse if(checkSmall < checkBig) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"private boolean isValid() {\n return Character.isLetter(c);\n }",
"public static boolean isA2ZN(int ch) {\n return range(ch, 'a', 'z') || range(ch, 'A', 'Z') || range(ch, '0', '9');\n }",
"private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }",
"public boolean isCharacterInSameLocation(Character inputCharA, Character inputCharB) {\r\n\t\tString LocationCharA = inputCharA.getLocation();\r\n\t\tArrayList<Character> inputListLocation = getListCharacterInLocation(LocationCharA);\r\n\t\tif (inputListLocation.contains(inputCharA) && inputListLocation.contains(inputCharB))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse return false;\r\n\t}",
"private boolean isOrdinal(int n) {\n String string = this.msg;\n int n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 111) {\n if (n != 79) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 114) {\n if (n2 != 82) return false;\n }\n string = this.msg;\n n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 100) {\n if (n != 68) return false;\n }\n string = this.msg;\n n = n2 + 1;\n if ((n2 = (int)string.charAt(n2)) != 105) {\n if (n2 != 73) return false;\n }\n string = this.msg;\n n2 = n + 1;\n if ((n = (int)string.charAt(n)) != 110) {\n if (n != 78) return false;\n }\n if ((n = (int)this.msg.charAt(n2)) != 97) {\n if (n != 65) return false;\n }\n if ((n = (int)this.msg.charAt(n2 + 1)) == 108) return true;\n if (n != 76) return false;\n return true;\n }",
"@Test void testHexCharLiteralOutsideRangeFails() {\n final String sql = \"^_unicode'cg'^XCF\";\n final String expected = \"Unknown character set 'unicode'\";\n expr(sql).fails(expected);\n }",
"private boolean isHexadecimalDigit(final char c) {\n return (c <= 'f' && map[c] >= 0);\n }",
"public static boolean isAsciiAlphaUpper(char ch) {\n/* 479 */ return (ch >= 'A' && ch <= 'Z');\n/* */ }",
"public static Boolean Letter(String arg){\n\t\tif(arg.matches(\"\\\\p{L}{1}\")){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private static boolean inArray(char c, char[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (c == array[i]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"boolean alreadyAdded(char c) {\n for (char x :_chars) {\n if (x == c) {\n return true;\n }\n }\n return false;\n }",
"public Character isUsedBy(Character character);",
"public static int checkCharType(char input){\n\n // Scanner scanner = new Scanner(System.in);\n // System.out.println(\"Enter a Character : \");\n // char input = scanner.next().charAt(0);\n //scanner.close();\n\n if(input >='a' && input <= 'z'){\n System.out.println(\"Small case Letter.\");\n return 1;\n }\n else if(input >='A' && input <= 'Z'){\n System.out.println(\"Capital Letter.\");\n return 2;\n }\n else if(input >='0' && input <= '9'){\n System.out.println(\"A Digit.\");\n return 3;\n }\n else{\n System.out.println(\"Special Character.\");\n return 4;\n }\n }",
"@Test\n public void whenStartWithPrefixThenTrue() {\n char[] word = {'H', 'e', 'l', 'l', 'o'};\n char[] pref = {'H', 'e'};\n boolean result = ArrayChar.startsWith(word, pref);\n assertThat(result, is(true));\n }",
"public boolean containsRange(Range range) {\n/* 317 */ if (range == null) {\n/* 318 */ return false;\n/* */ }\n/* 320 */ return (containsLong(range.getMinimumLong()) && containsLong(range.getMaximumLong()));\n/* */ }",
"private static boolean d(char paramChar)\r\n/* 685: */ {\r\n/* 686:678 */ return ((paramChar >= 'k') && (paramChar <= 'o')) || ((paramChar >= 'K') && (paramChar <= 'O')) || (paramChar == 'r') || (paramChar == 'R');\r\n/* 687: */ }",
"private boolean checkKey(char k)\n {\n \tint index = word.indexOf(k);\n \tif (index == -1)\n \t{\n \t\t//k doesn't exist in word\n \t\tguess_number--;\n \t\treturn false;\n \t}\n \telse\n \t{\n \t\t//k exist in the word\n \t\twhile (index != -1)\n \t\t{\n \t\t\t//update mask\n \t\t\tmask = mask.substring(0, index)+k+mask.substring(index+1);\n \t\t\t//update index\n \t\t\tindex = word.indexOf(k, index + 1);\n \t\t}\n \t\treturn true;\n \t}\n \t\n }",
"private boolean isValidBarcode(String barcode) {\n if (barcode.length() != isbnBarcodeLength) {\n return false;\n }\n final char[] barcodeChars = barcode.toCharArray();\n for (char i : barcodeChars) {\n if (i < isbnBarcodeValidStart || i > isbnBarcodeValidEnd) {\n return false;\n }\n }\n return true;\n }",
"public static boolean hasAllUniqueChars3(String string) {\n String sorted = Stream.of(string.split(\"\")).sorted().collect(Collectors.joining());\n\n for(int i = 1; i < sorted.length(); i++) {\n if(sorted.charAt(i - 1) == sorted.charAt(i)) return false;\n }\n\n return true;\n }"
] | [
"0.7003224",
"0.65243316",
"0.6420862",
"0.6412205",
"0.6385393",
"0.6304264",
"0.6180882",
"0.60238516",
"0.5968082",
"0.5968077",
"0.5958389",
"0.59267163",
"0.5900765",
"0.58909833",
"0.58902556",
"0.588006",
"0.5879958",
"0.58751065",
"0.5874837",
"0.5873382",
"0.5869868",
"0.586788",
"0.5859624",
"0.5859184",
"0.5795805",
"0.5775192",
"0.5760639",
"0.5748284",
"0.57359034",
"0.5695755",
"0.569158",
"0.5676924",
"0.56670606",
"0.5653907",
"0.5653509",
"0.5627568",
"0.5624278",
"0.56101114",
"0.55952895",
"0.55945396",
"0.559312",
"0.5588919",
"0.5579164",
"0.55590093",
"0.5548448",
"0.55459434",
"0.55364287",
"0.5532931",
"0.55284834",
"0.55246776",
"0.5521259",
"0.5499493",
"0.54899657",
"0.548763",
"0.54831624",
"0.54760814",
"0.5472903",
"0.5469116",
"0.54682225",
"0.54640496",
"0.5456527",
"0.54479516",
"0.5444585",
"0.5442468",
"0.54353666",
"0.5433671",
"0.54334664",
"0.54267305",
"0.5423954",
"0.5423292",
"0.54162794",
"0.540924",
"0.54058594",
"0.5396038",
"0.538562",
"0.5385206",
"0.53832126",
"0.5381072",
"0.5377075",
"0.5375874",
"0.53734154",
"0.536879",
"0.5368547",
"0.53676945",
"0.5361342",
"0.5357717",
"0.5356121",
"0.53518754",
"0.53512406",
"0.5346581",
"0.5345741",
"0.53439945",
"0.53430915",
"0.532336",
"0.5322418",
"0.5321775",
"0.53190464",
"0.5318879",
"0.5318358",
"0.5318127",
"0.53173244"
] | 0.0 | -1 |
Return the next character in the input. | private char NEXT() {
if (in >= input.length()) return '\0';
return (char) input.charAt(in);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"char nextChar();",
"public char nextChar() throws Exception {\n currentPos++;\n return currentChar();\n }",
"private char peekNextChar()\n {\n return (pos < (input.length() - 1)) ? input.charAt(pos + 1) : 0;\n }",
"char getNextChar () {\n m_pos++; \n return getChar ();\n }",
"private char nextChar() throws Exception {\n char next = this.source[this.position];\n this.position++;\n return next;\n }",
"public static int getNextChar()\r\n\r\n\t// Returns the next character on the input stream. If the end of file is reached, -1 is returned.\r\n\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn inStream.read();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}",
"public char nextChar() {\n this.inputStr = this.s.nextLine();\n\n if (!inputStr.isEmpty()) {\n for (int i = 0; i < inputStr.length(); i++) {\n if (inputStr.charAt(i) >= 'A' && inputStr.charAt(i) <= 'Z') {\n return inputStr.charAt(i);\n } else if (inputStr.charAt(i) >= 'a' && inputStr.charAt(i) <= 'z') {\n return inputStr.charAt(i);\n }\n }\n }\n return ' ';\n }",
"private char next(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex++);//return current character and advance to next\r\n \r\n }",
"private char next() {\n char c = peek();\n eat(c);\n return c;\n }",
"public static char readChar()\n {\n \tString ch = scanner.next();\n \treturn ch.charAt(0);\n }",
"public final char next() throws IOException {\n\t\t// Method \"hasNext\" peeks the next character (if required)\n\t\tif (!hasNext()) {\n\t\t\tthrow new NoSuchElementException();\n\t\t}\n\t\tif (state == ReaderState.PEEKED) {\n\t\t\tstate = ReaderState.CALL_FOR_NEXT;\n\t\t}\n\t\tfinal char next = (char) peekedCharacter;\n\t\tpeekedCharacter = -1;\n\t\treturn next;\n\t}",
"public char getNextKey() {\n char nextChar = _input.charAt(_index++);\n return nextChar;\n }",
"public char next()\n {\n char current = text[position];\n\n if (position > 0 && text[position - 1] == '\\n')\n {\n lineNo++;\n begin = position;\n }\n\n position++;\n\n return current;\n }",
"public Character next() {\n if (!hasNext())\n throw new NoSuchElementException();\n return string.charAt(index++);\n }",
"@Override\n public Character next() {\n assert(this.hasNext());\n\n char currCharacter = this.circularString.charAt(this.currIndex);\n ++this.currIndex;\n\n return currCharacter;\n }",
"private char advance() {\n current++;\n return source.charAt(current - 1);\n }",
"public char readChar() {\n return readNextLine().charAt(0);\n }",
"private void getNextChar() \n {\n try\n {\n int temp = in.read();\n if (temp == -1)\n eof = true;\n currentChar = (char)temp;\n }\n catch (IOException e)\n {\n System.err.println(\"Catastrophic File IO error.\\n\" + e);\n System.exit(1); \n //exit with nonzero exit code to indicate catastrophic error\n }\n }",
"public char read() {\n char ch = this.peek();\n this.index++;\n return ch;\n }",
"private int nextChar()\n {\n int result;\n\n // loop handles the next character whether it is in the buffer or not.\n if (m_bufferOffset_ < 0) {\n // we're working on the source and not normalizing. fast path.\n // note Thai pre-vowel reordering uses buffer too\n result = m_source_.next();\n }\n else {\n // we are in the buffer, buffer offset will never be 0 here\n if (m_bufferOffset_ >= m_buffer_.length()) {\n // Null marked end of buffer, revert to the source string and\n // loop back to top to try again to get a character.\n m_source_.setIndex(m_FCDLimit_);\n m_bufferOffset_ = -1;\n m_buffer_.setLength(0);\n return nextChar();\n }\n return m_buffer_.charAt(m_bufferOffset_ ++);\n }\n int startoffset = m_source_.getIndex();\n if (result < FULL_ZERO_COMBINING_CLASS_FAST_LIMIT_\n // Fast fcd safe path. trail combining class == 0.\n || m_collator_.getDecomposition() == Collator.NO_DECOMPOSITION\n || m_bufferOffset_ >= 0 || m_FCDLimit_ >= startoffset) {\n // skip the fcd checks\n return result;\n }\n\n if (result < LEAD_ZERO_COMBINING_CLASS_FAST_LIMIT_) {\n // We need to peek at the next character in order to tell if we are\n // FCD\n int next = m_source_.current();\n if (next == UCharacterIterator.DONE\n || next < LEAD_ZERO_COMBINING_CLASS_FAST_LIMIT_) {\n return result; // end of source string and if next character\n // starts with a base character is always fcd.\n }\n }\n\n // Need a more complete FCD check and possible normalization.\n if (!FCDCheck(result, startoffset)) {\n normalize();\n result = m_buffer_.charAt(0);\n m_bufferOffset_ = 1;\n }\n return result;\n }",
"public char readChar(){\n\t\tscanner.useDelimiter(EMPTY_PATTERN);\n\t\ttry {\n\t\t\tString ch=scanner.next();\n\t\t\tassert ch.length()==1:\"In.readChar() error\";\n\t\t\tscanner.useDelimiter(WHITESPACE_PATTERN);\n\t\t\treturn ch.charAt(0);\n\t\t}catch (NoSuchElementException e){\n\t\t\tthrow new NoSuchElementException(\"noSuchElement\");\n\t\t}\n\t}",
"private void nextChar() {\n\t\tif (this.c >= 0) {\n\t\t\ttry {\n\t\t\t\tif (this.c == '\\n') {\n\t\t\t\t\tthis.line++;\n\t\t\t\t\tthis.column = 0;\n\t\t\t\t}\n\t\t\t\tthis.c = this.input.read();\n\t\t\t\tthis.column++;\n\t\t\t} catch (final IOException e) {\n\t\t\t\tthis.c = -1;\n\t\t\t}\n\t\t}\n\t}",
"public char currentChar() throws Exception {\n // first line?\n if (currentPos == -2) {\n readLine();\n return nextChar();\n }\n\n // at end of file?\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n\n // at end of line?\n if (currentPos == -1 || currentPos == line.length()) {\n return PascalToken.EOL_CHAR;\n }\n\n // Need to read next line?\n if (currentPos > line.length()) {\n readLine();\n return nextChar();\n }\n // return char at current pos\n return line.charAt(currentPos);\n }",
"private int getNextChar() throws IOException{\n\t\tpos++;\n\t\tsourceReader.mark(20);\n\t\treturn sourceReader.read();\n\t}",
"public static char inputChar(String p) {\n String c;\n while (true) {\n System.out.print(p);\n c = in.nextLine();\n if (c.length() == 1) {\n return c.charAt(0);\n } else {\n System.err.print(\"Must enter character, enter again! \");\n }\n }\n }",
"char readChar();",
"public abstract char read_char();",
"public int nextC()\r\n\t{\r\n\t\tlastc = thisc;\t/* save current character, in case of backup */\r\n\t\t\r\n\t\t/* check for character waiting */\r\n\t\tif (holdc == 0) {\r\n\t\t\t/* no character waiting, get next from file,\r\n * ignore most control characters */\r\n\t\t\tdo {\r\n\t\t\t\tthisc = getC();\r\n\t\t\t\tif (thisc == EOF) return EOF;\r\n } while (thisc < 0x20 && ctlchars[thisc]);\r\n\r\n\t\t} else {\r\n\t\t\t/* we looked ahead, so use the saved character */\r\n\t\t\tthisc = holdc;\r\n\t\t\tholdc = 0;\r\n\t\t\tif (thisc == EOF) return EOF;\r\n\t\t}\r\n\t\r\n\t\t/* special rule for carriage return characters:\r\n\t\t * if CR is followed by LF, return just the LF\r\n\t\t * else replace the CR with a LF\r\n\t\t * but then we have to hold the character that isn't a LF,\r\n\t\t * unless it is an ignored character */\r\n\t\tif (thisc == '\\r') {\r\n\t\t holdc = getC();\r\n\t if (holdc < 0x20) {\r\n\t if (holdc == '\\n' || ctlchars[holdc]) holdc = 0;\r\n\t }\r\n\t\t thisc = '\\n';\r\n\t\t}\r\n\t\t\r\n\t\t/* capture the character in a buffer, for diagnostics */\r\n\t\tif (lastc == '\\n' || bufpos >= BUFSIZE) {\r\n\t\t\tprvsize = bufpos;\r\n\t\t\tbufpos = 0;\r\n\t\t\tcurrentbuf = 1 - currentbuf;\r\n\t\t}\r\n\t\tbuffer[currentbuf][bufpos++] = (byte)thisc;\r\n\t\r\n\t\treturn thisc;\r\n\t}",
"public char peek() {\n try {\n return this.input.charAt(this.index);\n } catch (StringIndexOutOfBoundsException e) {\n throw this.buildException(\"truncated input\");\n }\n }",
"private char readChar() {\r\n\t\tInputStream in = System.in;\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\tString line = null;\r\n\r\n\t\ttry {\r\n\t\t\tline = br.readLine();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn line.toLowerCase().charAt(0);\r\n\t}",
"public char peekChar() throws Exception {\n currentChar();\n\n if (line == null) {\n return PascalToken.EOF_CHAR;\n }\n int nextPos = currentPos + 1;\n\n return nextPos < line.length() ? line.charAt(nextPos) : PascalToken.EOL_CHAR;\n }",
"void readNextChar() throws ReaderException;",
"public char getNextToken(){\n\t\treturn token;\n\t}",
"public char getChar();",
"public char getChar() throws IOException {\r\n\t\treturn (char)lineReader.read();\r\n\t}",
"private int currentChar()\n {\n if (m_bufferOffset_ < 0) {\n m_source_.previousCodePoint();\n return m_source_.nextCodePoint();\n }\n\n // m_bufferOffset_ is never 0 in normal circumstances except after a\n // discontiguous contraction since it is always returned and moved\n // by 1 when we do nextChar()\n return UTF16.charAt(m_buffer_, m_bufferOffset_ - 1);\n }",
"public static char nextChar (Scanner s) throws NullPointerException {\n return s.findWithinHorizon(DOT, 1).charAt(0);\n }",
"char getPreviousReadChar();",
"public void testNextChar() {\n System.out.println(\"nextChar\");\n BufferedCharSequence instance = null;\n char expResult = ' ';\n char result = instance.nextChar();\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 }",
"public char readChar() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn (char) (-1);\n\t\treturn (char) last();\n\t}",
"char getReadChar();",
"public abstract char getStarterChar();",
"@Override\n public final char next() {\n if (++index < upper) {\n return text.charAt(index);\n }\n index = upper;\n return DONE;\n }",
"private void getNextChar() throws ParsingException {\n if (++pos < expression.length()) {\n ch = expression.charAt(pos);\n } else {\n // Just to stop execution\n ch = '&';\n }\n }",
"private char peek() {\n if (reachedEnd()) {\n return '\\0';\n }\n\n return source.charAt(current);\n }",
"public static char readCharacter(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.next().charAt(0);\n }",
"@Override\n\t\tpublic Character next() {\n\t\t\treturn elements.poll();\n\t\t}",
"public char next(char c) throws JSONException {\n char n = this.next();\n if(n != c) {\n throw this.syntaxError(\"Expected '\" + c + \"' and instead saw '\" + n + \"'\");\n }\n\n return n;\n }",
"public char getChar(String pPrompt) {\r\n\t\tSystem.out.print(pPrompt + \" \");\r\n\t\treturn input.nextLine().charAt(0);\r\n\t}",
"protected void readNextChar() throws IOException {\n nextChar = inputReader.read();\n switch (nextChar) {\n case -1: // EOF\n if (char_num == 0) {\n char_num = -1;\n break;\n }\n nextChar = '\\n';\n // fall thru\n case '\\n':\n line_num++;\n char_num = 0;\n break;\n default:\n line.append((char) nextChar);\n char_num++;\n return;\n }\n line.setLength(0);\n }",
"char getEChar();",
"public char keyboardReadChar() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n char charItem = ' ';\n try {\n charItem = (char) myReader.read();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadChar method\");\n } // catch\n return charItem;\n }",
"public char next() throws JSONException {\n int c;\n if(this.usePrevious) {\n this.usePrevious = false;\n c = this.previous;\n } else {\n try {\n c = this.reader.read();\n } catch (IOException e) {\n throw new JSONException(e);\n }\n\n if(c <= 0) {\n this.eof = true;\n c = 0;\n }\n }\n\n this.index += 1;\n if(this.previous == '\\r') {\n this.line += 1;\n this.character = c == '\\n' ? 0 : 1;\n } else if(c == '\\n') {\n this.line += 1;\n this.character = 0;\n } else {\n this.character += 1;\n }\n\n this.previous = (char) c;\n\n return this.previous;\n }",
"private char peek(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex>=iMessage.length()) return NONE;//return no character if beyond end of the message\r\n return iMessage.charAt(iIndex);//return current character\r\n \r\n }",
"char startChar();",
"private int getChar() {\n\n\t\ttry {\n\t\t\treturn stream.read();\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.print(e.getMessage());\n\t\t\tSystem.err.println(\"IOException occured in Lexer::getChar()\");\n\t\t\treturn -1;\n\t\t}\n\n\t}",
"public char readChar(String message) {\r\n\t\tSystem.out.println(message);\r\n\t\treturn scanner.nextLine().charAt(0);\r\n\t}",
"private char readChar() \n {\n \n String uInput = null;//user input\n do//do while loop to wait for a charater\n {\n try//collect user input\n {\n uInput = br.readLine();\n }\n catch(IOException ioe)//catch IOE\n {\n System.out.println(\"IO error trying to read number. Exiting now\");\n System.exit(1);\n }\n if(uInput.charAt(0)=='?')//special case for ? symbol\n {\n return uInput.charAt(0);\n }\n if(!Character.isLetter(uInput.charAt(0)))//check for charater\n {\n System.out.println(\"Invalid input, use ? for a list of commands\");\n System.out.printf(\"=> \");\n }\n }\n while(!Character.isLetter(uInput.charAt(0)));\n\n return uInput.charAt(0);//return character input\n \n }",
"public void getch(){\n pos++; \n nextch=fnb.charAt(pos);\n }",
"public static char getChar() throws IOException {\n\t\nString s = getString();\nreturn s.charAt(0);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Returns the first letter of the string, to help idiot proof it.\n\n}",
"public static char leerCaracter() { \n\t\tchar letra = sc.nextLine().charAt(0); // Lee una cadena y obtiene el primer caracter\n\t\treturn letra;\n\t}",
"private char getChar() {\n\t\t//Must declare as int, because -1 in char is 65535\n\t\tint c = '\\0';\n\t\ttry {\n\t\t\tc = inFile.read();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error occurred when trying to read characters\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (c == -1) {\n\t\t\teof = true;\n\t\t\treturn EndOfFile;\n\t\t} else if (c == '\\n' || c == '\\r') {\n\t\t\tlineNumber++;\n\t\t}\n\t\treturn (char) c;\t\n\t}",
"public char getChar(String key)\n {\n return getChar(key, '\\0');\n }",
"@Override\n public Character next() {\n int charValue;\n if (linePos >= LINE_LEN) {\n charValue = CARRIAGE_RETURN;\n asciiBase = 0;\n linePos = -2;\n lines++;\n // Skips lines starting with alphanumeric characters to preserve formatting\n while (Character.isLetterOrDigit((char)(lines % ASCII_RANGE) + ASCII_START)) {\n lines++;\n }\n }\n else if (linePos < 0) {\n charValue = LINE_FEED;\n }\n else {\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n while (Character.isLetterOrDigit((char)charValue)) {\n asciiBase++;\n charValue = ((asciiBase + linePos + lines) % ASCII_RANGE) + ASCII_START;\n }\n itemsToSend--;\n }\n linePos++;\n return new Character((char) charValue);\n }",
"private char peek() {\n return regEx.charAt(0);\n }",
"public _char get_char() {\n return local_char;\n }",
"char getChar () { \n return m_pos < m_len ? m_buffer.charAt (m_pos) : '\\0';\n }",
"public static char getUniqueChar() {\n return CHARS.charAt(getNextPosition());\n }",
"public final char yycharat(int pos) {\n return input.readText().charAt(pos);\n }",
"public char readChar() {\n return ((char) readLong());\n }",
"public char getChar()\n throws IOException\n {\n return (char) lineNumberReader.read();\n }",
"public static char getKeyCharacter()\n {\n \n //Prompts and reads the key character in String\n final int MINIMUM_LENGTH = 0, MAXIMUM_LENGTH = 1;\n Scanner key = new Scanner(System.in);\n System.out.print(\"Please enter a single character to act as a key: \");\n String fh = key.nextLine();\n \n //Checks for key character length and loops for proper input\n while (fh.length() == MINIMUM_LENGTH|| fh.length() > MAXIMUM_LENGTH)\n {\t\n System.out.print(\"Please enter a single character to act as a key: \");\n fh = key.nextLine();\n }\n \n //Converts String to char\n char gKC = fh.charAt(0);\n return gKC;\n }",
"public CharStackNode getNext() {\n //TODO add code here\n return next;\n }",
"private String next() {\n if (console) {\n return con.next();\n }\n return scan.next();\n }",
"char getKeyPressChar();",
"public char charAt(int index);",
"public static char getKey() {\n try {\n return (char) Input.read(true);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return 0;\n }",
"public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }",
"protected void nextChar() {\r\n\t\t\r\n//\t\tif (index < text.length) {\r\n//\t\t\tlook = text[index++];\r\n//\t\t} else {\r\n//\t\t\tlook = ' ';\r\n//\t\t}\r\n\t\tlook = (index < text.length)?(text[index++]):(' ');\r\n\t}",
"public static char readChar(String prompt) throws IOException {\r\n\t\tchar value = 0;\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tSystem.out.print(prompt + \" _>\");\r\n\t\t\t\tvalue = (char)reader.read();\r\n\t\t\t\t// alternative value = (char)reader.readLine().charAt(0);\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.err.println(ex.getLocalizedMessage());\r\n\t\t\t\tthrow ex;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn value;\r\n\t}",
"@Override\r\n\tpublic char play(char lastPlayed) {\n\t\tString inputStr;\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Next character: \");\r\n\t\tinputStr = input.nextLine();\r\n\t\twhile (inputStr.length() > 1) {\r\n\t\t\tSystem.out.print(\"Next character: \");\r\n\t\t\tinputStr = input.nextLine();\r\n\t\t}\r\n\t\treturn inputStr.charAt(0);\r\n\t}",
"public static char in(String s)\n {\n if (s != null && s.length() > 0)\n {\n System.out.print(s);\n System.out.flush();\n }\n\n InputStreamReader reader = new InputStreamReader(System.in);\n int ch;\n try\n {\n while ((ch = reader.read()) < 0)\n {\n }\n }\n catch (IOException e)\n {\n ch = 0x0;\n }\n\n return (char)ch;\n }",
"@Override\n protected List<CharSequence> getNextInput() {\n if (!mInputIterator.hasNext())\n // No more input, so we're done.\n return null;\n else {\n // Start a new cycle.\n incrementCycle();\n\n // Return a list containing character sequences to search.\n return mInputIterator.next();\n }\n }",
"public int get_char() {\n return local_char;\n }",
"public char charAt(int charOffset);",
"@Override\n public final char current() {\n return (index != upper) ? text.charAt(index) : DONE;\n }",
"public char Get() {\n\t\treturn myChar;\n\t}",
"public char returnNextColor(char c){\r\n\t\t\r\n\t\tif(c == 'o'){\r\n\t\t\treturn col[0];\r\n\t\t}\r\n\t\tfor(int i = 0; i < col.length-1; i++){\r\n\t\t\tif(c == col[i]){\r\n\t\t\t\treturn col[i+1];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn col[0];\r\n\t}",
"public char getChar() {\n return this.s;\n }",
"public static char getChar(String inKey) {\r\n String string = getProperties().get(inKey).toString();\r\n char result = 0;\r\n if (string == null || string.length() < 1) {\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getChar: no char property for: \" + inKey);\r\n }\r\n } else {\r\n result = string.charAt(0);\r\n }\r\n\r\n if (LOG.isErrorEnabled() && string.length() > 1) {\r\n LOG.error(\"Char property for (\" + inKey + \") longer than a single char: \" + string);\r\n }\r\n\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"getChar: \" + inKey + \", result \" + result);\r\n }\r\n return result;\r\n }",
"public Node getNext(char c)\n {\n if (c >= 'a' && c <= 'z')\n {\n return nexts[c - 97];\n }\n if (c >= 'A' && c <= 'Z')\n {\n return nexts[c - 10];\n }\n return null;\n }",
"char getChar(int offset) throws BadLocationException;",
"public char peek() {\r\n return characters[size -1];\r\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }",
"public final char yycharat(int pos) {\n return zzBuffer[zzStartRead+pos];\n }"
] | [
"0.7949732",
"0.7933735",
"0.78827035",
"0.7866954",
"0.7780462",
"0.7707355",
"0.765971",
"0.7642913",
"0.7607807",
"0.7465509",
"0.73925644",
"0.73862356",
"0.7355236",
"0.73357356",
"0.72389466",
"0.72254866",
"0.720758",
"0.714755",
"0.7146327",
"0.7139611",
"0.7119531",
"0.708239",
"0.705837",
"0.7054694",
"0.70429564",
"0.70018476",
"0.6999452",
"0.69292575",
"0.6907734",
"0.6882246",
"0.6867469",
"0.686161",
"0.68536675",
"0.68488634",
"0.6799523",
"0.67903465",
"0.6789635",
"0.67734957",
"0.67538637",
"0.67450696",
"0.674092",
"0.67092276",
"0.6707078",
"0.6700994",
"0.66850436",
"0.6682858",
"0.6653551",
"0.6650157",
"0.66481125",
"0.6628655",
"0.659823",
"0.65962124",
"0.6594584",
"0.6590076",
"0.65796304",
"0.65684617",
"0.6562129",
"0.6562059",
"0.6552231",
"0.6533267",
"0.65097076",
"0.6499499",
"0.6476636",
"0.64594305",
"0.64407176",
"0.64377093",
"0.64269835",
"0.63884276",
"0.6381352",
"0.6380915",
"0.63517624",
"0.63448524",
"0.6334826",
"0.63244164",
"0.6313127",
"0.63114375",
"0.6301209",
"0.6293498",
"0.6264601",
"0.62573326",
"0.62516934",
"0.6245951",
"0.6238759",
"0.6225595",
"0.62042266",
"0.6181011",
"0.6173354",
"0.61675835",
"0.61523426",
"0.6144742",
"0.6143986",
"0.6143891",
"0.6125729",
"0.6120412",
"0.6120412",
"0.6120412",
"0.6120412",
"0.6120412",
"0.6120412",
"0.6120412"
] | 0.8368726 | 0 |
Produce an error message from the markers at the current input position. | private String message() {
if (markers.size() == 0) return "";
String s = "expecting ";
boolean first = true;
for (Marker m : markers) {
if (! first) s = s + ", ";
first = false;
s = s + m.toString().toLowerCase().replaceAll("_"," ");
}
return s;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object... params) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Supplier<?> msgSupplier) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, String message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Message msg, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(Marker marker, Supplier<?> msgSupplier, Throwable t) {\n\n\t}",
"public void report_error(String message, Object info) {\n StringBuilder m = new StringBuilder(\"ERROR\");\n if (info instanceof java_cup.runtime.Symbol) {\n java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);\n if (s.left >= 0) { \n m.append(\" in line \"+(s.left+1));\n if (s.right >= 0)\n m.append(\", column \"+(s.right+1));\n }\n }\n m.append(\" : \"+message);\n System.out.println(m.toString());\n errores.add(m.toString());\n }",
"void drawError(String message);",
"private void showErrors() {\n \t\tfor (Iterator it = this.errors.iterator(); it.hasNext();) {\n \t\t\ttry {\n \t\t\t\tObject err = it.next();\n \t\t\t\t\n \t\t\t\t/* errors can be represented by PositionedError, UnpositionedError or String */\n \t\t\t\tif (err instanceof PositionedError) {\n \t\t\t\t\tPositionedError error = (PositionedError)err;\n \t\t\t\t\tTokenReference token = error.getTokenReference();\n \t\n \t\t\t\t log.debug(\"file: \" + token.getFile() + \", \" + \"line: \" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\t\t\t\t\t+ token.getLine() + \", \" + \"path: \" //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t\t\t\t\t+ token.getPath());\n \n \t\t\t\t\tIResource resource = ProjectProperties.findResource(token\n \t\t\t\t\t\t\t.getPath().getAbsolutePath(), currentProject);\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = null;\n \t\t\t\t\tif (resource != null) {\n \t\t\t\t\t\tmarker = resource.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t\tif (token.getLine() > 0) {\n \t\t\t\t\t\t\tmarker.setAttribute(IMarker.LINE_NUMBER, token.getLine());\n \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// for the cases, when error refers to a generated piece of code\n \t\t\t\t\t\tmarker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t}\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, error\n \t\t\t\t\t\t\t.getFormattedMessage().getMessage());\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(\n \t\t\t\t\t\t\tIMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t\telse { /* create unpositioned error at the scope of the project */\t\t\t\t\t\n \t\t\t\t\tString msg;\n \t\t\t\t\tif (err instanceof UnpositionedError) {\n \t\t\t\t\t\tmsg = ((UnpositionedError)err).getFormattedMessage().getMessage();\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tmsg = (String)err; // for internal errors\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, msg);\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}",
"private void error(String message) {\n errors++;\n System.err.println(\"Line \" + token.line + \",\"\n + \" Col \" + token.col + \": \"\n + message);\n }",
"public void report_error(String message, Object info) {\r\n StringBuilder m2 = new StringBuilder(\"Error\");\r\n if (info instanceof java_cup.runtime.Symbol) {\r\n java_cup.runtime.Symbol s = ((java_cup.runtime.Symbol) info);\r\n if (s.left >= 0) { \r\n m2.append(\" in line \"+(s.left+1));\r\n if (s.right >= 0)\r\n m2.append(\", column \"+(s.right+1));\r\n }\r\n }\r\n m2.append(\" : \"+message);\r\n System.err.println(m2);\r\n m = m2;\r\n \r\n }",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message) {\n\n\t}",
"private void error(@Nonnull Token pptok, boolean is_error)\r\n throws IOException,\r\n LexerException {\r\n StringBuilder buf = new StringBuilder();\r\n buf.append('#').append(pptok.getText()).append(' ');\r\n /* Peculiar construction to ditch first whitespace. */\r\n Token tok = source_token_nonwhite();\r\n ERROR:\r\n for (;;) {\r\n switch (tok.getType()) {\r\n case NL:\r\n case EOF:\r\n break ERROR;\r\n default:\r\n buf.append(tok.getText());\r\n break;\r\n }\r\n tok = source_token();\r\n }\r\n if (is_error)\r\n error(pptok, buf.toString());\r\n else\r\n warning(pptok, buf.toString());\r\n }",
"private void logErrorMessage(String found, String expected)throws LexemeException {\n\t\tSystem.out.println(\"Error: (L\" + lexAnalyser.getLineCount()\n\t\t\t\t+ \") Error on token \\\"\" + found + \"\\\" Expected \" + expected);\n\n\t\tlogMessage(\"Error on token \\\"\" + found + \"\\\" Expected \" + expected);\n\t\tlog.closeLog();\n\t\tthrow new LexemeException(\"Error on token \\\"\" + found + \"\\\" Expected \"\n\t\t\t\t+ expected);\n\n\t}",
"java.lang.String getErrorInfo();",
"java.lang.String getErrorInfo();",
"java.lang.String getErrorInfo();",
"java.lang.String getErrorInfo();",
"private void err4() {\n\t\tString errMessage = CalculatorValue.checkMeasureValue(text_Operand4.getText());\n\t\tif (errMessage != \"\") {\n\t\t\t// System.out.println(errMessage);\n\t\t\tlabel_errOperand4.setText(CalculatorValue.measuredValueErrorMessage);\n\t\t\tif (CalculatorValue.measuredValueIndexofError <= -1)\n\t\t\t\treturn;\n\t\t\tString input = CalculatorValue.measuredValueInput;\n\t\t\toperand4ErrPart1.setText(input.substring(0, CalculatorValue.measuredValueIndexofError));\n\t\t\toperand4ErrPart2.setText(\"\\u21EB\");\n\t\t} else {\n\t\t\terrMessage = CalculatorValue.checkErrorTerm(text_Operand4.getText());\n\t\t\tif (errMessage != \"\") {\n\t\t\t\t// System.out.println(errMessage);\n\t\t\t\tlabel_errOperand4.setText(CalculatorValue.errorTermErrorMessage);\n\t\t\t\tString input = CalculatorValue.errorTermInput;\n\t\t\t\tif (CalculatorValue.errorTermIndexofError <= -1)\n\t\t\t\t\treturn;\n\t\t\t\toperand4ErrPart1.setText(input.substring(0, CalculatorValue.errorTermIndexofError));\n\t\t\t\toperand4ErrPart2.setText(\"\\u21EB\");\n\t\t\t}\n\t\t}\n\t}",
"public void printError(SourcePosition arg0, String arg1) {\n\n }",
"public void addError(String message);",
"private void err3() {\n\t\tString errMessage = CalculatorValue.checkMeasureValue(text_Operand3.getText());\n\t\tif (errMessage != \"\") {\n\t\t\t// System.out.println(errMessage);\n\t\t\tlabel_errOperand3.setText(CalculatorValue.measuredValueErrorMessage);\n\t\t\tif (CalculatorValue.measuredValueIndexofError <= -1)\n\t\t\t\treturn;\n\t\t\tString input = CalculatorValue.measuredValueInput;\n\t\t\toperand3ErrPart1.setText(input.substring(0, CalculatorValue.measuredValueIndexofError));\n\t\t\toperand3ErrPart2.setText(\"\\u21EB\");\n\t\t} else {\n\t\t\terrMessage = CalculatorValue.checkErrorTerm(text_Operand3.getText());\n\t\t\tif (errMessage != \"\") {\n\t\t\t\t// System.out.println(errMessage);\n\t\t\t\tlabel_errOperand3.setText(CalculatorValue.errorTermErrorMessage);\n\t\t\t\tString input = CalculatorValue.errorTermInput;\n\t\t\t\tif (CalculatorValue.errorTermIndexofError <= -1)\n\t\t\t\t\treturn;\n\t\t\t\toperand3ErrPart1.setText(input.substring(0, CalculatorValue.errorTermIndexofError));\n\t\t\t\toperand3ErrPart2.setText(\"\\u21EB\");\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void error(CharSequence message) {\n\n\t}",
"private Text createError(String text, int offset) {\n\t\tText error = new Text(\"\");\n\t\terror.setFont(new Font(\"Minecraftia\", 30));\n\t\terror.setFill(Color.INDIANRED);\n\t\terror.getTransforms().add(new Rotate(-50, 300, 100, 20, Rotate.X_AXIS));\n\t\terror.setX(canvas.getWidth() / 2);\n\t\terror.setY(canvas.getHeight() / 2 + offset);\n\t\treturn error;\n\t}",
"private String errors() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(impossibleLapTime());\n\t\tsb.append(multipleStartTimes());\n\t\treturn sb.toString();\n\t}",
"public void printErrToken(){\r\n System.err.println(\"Invalid token at line: \" + lineNum + \" , column \" + colNum);\r\n }",
"@Override\n\tpublic boolean isErrorEnabled(Marker marker) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic void info(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"void showError(String message);",
"void showError(String message);",
"public void setError() {\r\n this.textErrorIndex = textIndex;\r\n }",
"@Override\n public String getMessage() {\n return ErrorMessage.INSTRUMENT_MARKED_DONE_ERROR;\n }",
"public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }",
"@Override\n\tpublic void fatal(Marker marker, String message) {\n\n\t}",
"@Override\r\n\tprotected String getErrorInfo(String str, String cmds) {\n\t\treturn null;\r\n\t}",
"public void error(String message);",
"private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }",
"private String getGUIErrorMsg(long errorcode) {\n\t\tif (errorcode == 0) {\n\t\t\treturn \"This popup shouldn't have launched!\";\n\t\t} else if (errorcode == 9) {\n\t\t\treturn \"Latitude input format incorrect!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 10) {\n\t\t\treturn \"Longitude input format incorrect!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 11) {\n\t\t\treturn \"Date input format incorrect!\\nValid dates go <year>-<month>-<day>\\nValid month values are 1- 12 and valid day values are 1 - 31.\";\n\t\t} else if (errorcode == 12) {\n\t\t\treturn \"Time input format incorrect!\\nValid times go <hour>-<minute>-<second>\\nValid hour values are 0 - 23 and valid minute and second values are 0 - 59\";\n\t\t} else if (errorcode == 1) {\n\t\t\treturn \"Invalid latitude!\\nValid Latitude values are -90 to 90 with negative values being south Latitude.\";\n\t\t} else if (errorcode == 2) {\n\t\t\treturn \"Invalid Longitude!\\nValid Longitude values are -180 to 180 with negative values being west latitude.\";\n\t\t} else if (errorcode == 3) {\n\t\t\treturn \"Invalid Year!\\nValid year values are \" + Integer.MIN_VALUE + \" - \" + Integer.MAX_VALUE + \".\";\n\t\t} else if (errorcode == 4) {\n\t\t\treturn \"Invalid Month!\\nValid month values are 1 - 12\";\n\t\t} else if (errorcode == 5) {\n\t\t\treturn \"Invalid Day!\\nValid day values are 1 - 31\";\n\t\t} else if (errorcode == 6) {\n\t\t\treturn \"Invalid Hour!\\nValid hour values are 0 - 23\";\n\t\t} else if (errorcode == 7) {\n\t\t\treturn \"Invalid Minute!\\nValid minute values are 0 - 59\";\n\t\t} else if (errorcode == 8) {\n\t\t\treturn \"Invalid Second!\\nValid second values are 0 - 59\";\n\t\t} \n\t\treturn \"Undefined Error Message!\";\n\t}",
"@FormatMethod\n private void reportError(\n SourcePosition position, @FormatString String message, Object... arguments) {\n errorReporter.reportError(position, message, arguments);\n }",
"WorldUps.UErr getError(int index);",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"private void parseError() {\r\n System.out.print(\"Parse Error on:\");\r\n tokens.get(position).print();\r\n }",
"public void showError(String errorMessage);",
"public void err2() {\n\t\tString errMessage = CalculatorValue.checkMeasureValue(text_Operand2.getText());\n\t\tif (errMessage != \"\") {\n\t\t\tlabel_errOperand2.setText(CalculatorValue.measuredValueErrorMessage);\n\t\t\tif (CalculatorValue.measuredValueIndexofError <= -1)\n\t\t\t\treturn;\n\t\t\tString input = CalculatorValue.measuredValueInput;\n\t\t\toperand2ErrPart1.setText(input.substring(0, CalculatorValue.measuredValueIndexofError));\n\t\t\toperand2ErrPart2.setText(\"\\u21EB\");\n\t\t}\n\t}",
"public ParseResult failureAt (Object input, int errorPosition, int peel)\n {\n ParseResult r = failure(input, peel + 1);\n\n assertEquals(r.errorOffset, errorPosition, peel + 1,\n () -> \"The furthest parse error didn't occur at the expected location.\");\n\n return r;\n }",
"@Override\n\tpublic void info(Marker marker, String message, Throwable t) {\n\n\t}",
"public String getErrorText()\n {\n if ( null == m_errorMsg )\n {\n StringBuilder buf = new StringBuilder( 400 );\n\n // Error checking should never happen if the collection of existing\n // names is null or empty, but take care anyway.\n if (!(null == m_existingElems || m_existingElems.size() < 1))\n {\n Iterator iter = m_existingElems.iterator();\n boolean first = true;\n while ( iter.hasNext())\n {\n if ( !first )\n buf.append( \", \" );\n buf.append( iter.next().toString());\n first = false;\n }\n }\n\n String [] args = new String[]\n {\n buf.toString()\n };\n String pattern = ms_res.getString( \"uniqueListConstraintError\" );\n m_errorMsg = MessageFormat.format( pattern, args );\n }\n return m_errorMsg;\n }",
"public void showError(String error);",
"String getError(int i) {\n if (i >= 0 & i < msgs.length)\n return msgs[i];\n else\n return \"Invalid Error Code\";\n }",
"java.lang.String getError();",
"java.lang.String getError();",
"java.lang.String getError();",
"public int errorMessageOffset()\n {\n return offendingHeaderOffset() + offendingHeaderFrameLength();\n }",
"void showError(String errorMessage);",
"void errorBox(String title, String message);",
"private String buildErrorMsg(int charPositionInLine, String line, String msg) {\n StringBuilder sb = new StringBuilder();\n sb.append(line);\n sb.append(\"\\n\");\n for (int i = 0; i < charPositionInLine; i++) {\n sb.append(\" \");\n }\n sb.append(\"^\\n\");\n sb.append(msg);\n\n return sb.toString();\n }",
"String getErrorMessage(E input);",
"public String getErrorPosition() {\n return errorPosition;\n }",
"public void ErrorMessage(String error) {\n \tJOptionPane.showMessageDialog(parent, error);\n }",
"@Override\n\tpublic void info(Marker marker, Object message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object... params) {\n\n\t}",
"public static MarkerException markLocation()\n {\n return getInstance().doMarkLocation();\n }",
"public String toString() {\n return \"Error on line \" + lineNum + \": \" + errorMessage;\n }",
"@Override\n\tpublic void fatal(Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}",
"@Override\n\tpublic void info(Marker marker, Message msg, Throwable t) {\n\n\t}",
"private void printErrorMenu() {\n System.out.println(\"Invalid input. Please check inputs and try again.\");\n }",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}",
"@Override\n\tpublic void fatal(Marker marker, CharSequence message, Throwable t) {\n\n\t}",
"@Override\n\tpublic void error(String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}",
"private void displayDuplicateInputError(){\n\t\tAlert alert = new Alert(Alert.AlertType.INFORMATION);\n\t\talert.setTitle(\"Duplicate Letter Dialog\");\n\t\talert.setHeaderText(\"Pay Attention!\");\n\t\talert.setContentText(\"You have already tried that letter, please try again\");\n\t\talert.showAndWait();\n\t}",
"@Override\n\tpublic void fatal(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}"
] | [
"0.74861634",
"0.7271662",
"0.71060336",
"0.7091347",
"0.7085931",
"0.70848215",
"0.70744246",
"0.70447314",
"0.70438135",
"0.7038158",
"0.7028931",
"0.69582236",
"0.69580907",
"0.6948794",
"0.69426376",
"0.69297105",
"0.6898703",
"0.6879714",
"0.675904",
"0.66856164",
"0.6588702",
"0.65839374",
"0.6498251",
"0.6492468",
"0.62986416",
"0.6217566",
"0.61465055",
"0.6108031",
"0.6088288",
"0.6023034",
"0.5965141",
"0.5934508",
"0.5929091",
"0.5929091",
"0.5929091",
"0.5929091",
"0.59067136",
"0.5902888",
"0.5889707",
"0.5882776",
"0.5867197",
"0.58575916",
"0.58513796",
"0.5850475",
"0.58315194",
"0.5795597",
"0.57390755",
"0.57390755",
"0.57371175",
"0.57321227",
"0.57265365",
"0.57174224",
"0.57078266",
"0.56998485",
"0.5671919",
"0.56670904",
"0.5663561",
"0.5655153",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.5654917",
"0.56483376",
"0.56327254",
"0.56253487",
"0.56220716",
"0.5604541",
"0.55973846",
"0.55933213",
"0.55926394",
"0.55901223",
"0.55901223",
"0.55901223",
"0.5582341",
"0.55734694",
"0.5553595",
"0.55535805",
"0.554318",
"0.5507341",
"0.5503241",
"0.5502191",
"0.5501459",
"0.54983443",
"0.54939234",
"0.5472043",
"0.54636157",
"0.5462913",
"0.54581636",
"0.54473996",
"0.5444548",
"0.54424393",
"0.54407465"
] | 0.6472552 | 24 |
Remove temporary nodes (brackets, postix, inclusions) | private Node prune(Node r) {
if (r == null) return null;
Op op = r.op();
r.left(prune(r.left()));
if (r.left() == null) r.ref(prune(r.ref()));
else r.right(prune(r.right()));
if (r.right() != null && r.right().op() == Temp) r.right(null);
if (op == Temp) return r.left();
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void removeBrackets(Element currentElement) {\r\n\t\tfor (Element removeBraces : currentElement.select(\":matchesOwn(\\\\((.*?)\\\\))\")) { // Removes characters in brackets\r\n\t\t\tremoveBraces.html(removeBraces.html().replaceAll(\"\\\\([^()]*\\\\)\", \"\"));\r\n\t\t}\r\n\t}",
"public void removeTransNotInTree(){\n // Get the list of transparents which take part into the tree\n Vector transparents=values.getListTransparents();\n Vector<FiniteStates> varsToRemove = new Vector<FiniteStates>();\n\n // Now remove the transparent in the PotentialTree if they do not\n // appear in the tree\n // Go on the set of variables, one by one\n for(int i=0; i < variables.size(); i++){\n FiniteStates var=(FiniteStates)variables.elementAt(i);\n\n // If transparent, consider if it must be removed\n if (var.getTransparency() == FiniteStates.TRANSPARENT){\n // Check if it is present in transparents\n for(int j=0; j < transparents.size(); j++){\n if (transparents.contains(var) == false)\n varsToRemove.addElement(var);\n \n }\n }\n }\n for(int i=0;i<varsToRemove.size();i++){\n variables.remove(varsToRemove.elementAt(i)); \n }\n }",
"private static void strip(final List<ValueNode> nodes, Collection c, ValueNode current) {\n if (current.blockName != null || current.isField()) {\n \n int cpt = 0;\n for (ValueNode node : nodes) {\n if (Objects.equals(node.path, current.path) &&\n Objects.equals(node.blockName, current.blockName)) {\n cpt++;\n }\n }\n if (c.size() > cpt) {\n final List toRemove = new ArrayList<>();\n final Iterator it = c.iterator();\n int i = 0;\n while (it.hasNext()) {\n Object o = it.next();\n if (i >= cpt) {\n toRemove.add(o);\n }\n i++;\n }\n c.removeAll(toRemove);\n }\n }\n }",
"public void prune() {\n this.getTree().prune();\n }",
"private void pruneTree(QuadNode node){\n int i;\n while(node.parent != null && node.quads[0] == null && node.quads[1] == null && node.quads[2] == null && node.quads[3] == null){\n i=0;\n if(node.x != node.parent.x){\n i++;\n }\n if(node.z != node.parent.z){\n i+=2;\n }\n node = node.parent;\n node.quads[i] = null;\n }\n }",
"private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }",
"private Node removeChildNodes(Node node) throws TransformerException {\r\n\r\n NodeList children = node.getChildNodes();\r\n int index = 0;\r\n int length = children.getLength();\r\n\r\n for (index = 0; index < length; index++) {\r\n Node n = children.item(index);\r\n String nString = nodeToString(n);\r\n\r\n // for(Node n : node.getChildNodes()){\r\n if (n != null) {\r\n if (n.hasChildNodes()) {// edit to remove children of children\r\n removeChildNodes(n);\r\n node.removeChild(n);\r\n } else\r\n node.removeChild(n);\r\n }\r\n }\r\n String nodeString = nodeToString(node);\r\n return node;\r\n }",
"private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }",
"private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }",
"public void updateChildNodes() {\n\t\tList<FTNonLeafNode> nodesToRemove = new ArrayList<FTNonLeafNode>();\n\t\tfor (FTNonLeafNode intermediateNode : intermediateNodes.values()) {\n\t\t\tList<FTNode> childNodesToRemove = new ArrayList<FTNode>();\n\t\t\tfor (String childName : intermediateNode.childNodes.keySet()) {\n\t\t\t\tif (intermediateNodes.containsKey(childName)) {\n\t\t\t\t\t// update child node if it has child node\n\t\t\t\t\tFTNonLeafNode childNode = intermediateNodes.get(childName);\n\t\t\t\t\tif ((childNode instanceof FTOrNode) || (childNode instanceof FTAndNode)) {\n\t\t\t\t\t\tintermediateNode.addChildNode(childName, intermediateNodes.get(childName));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// if parent node is an OR node\n\t\t\t\t\t\t// remove this child\n\t\t\t\t\t\tif (intermediateNode instanceof FTOrNode) {\n\t\t\t\t\t\t\tchildNodesToRemove.add(childNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if parent node is an AND node\n\t\t\t\t\t\t// remove the parent node and child node\n\t\t\t\t\t\t// and set their values to false in case they are referenced by other nodes\n\t\t\t\t\t\telse if (intermediateNode instanceof FTAndNode) {\n\t\t\t\t\t\t\tnodesToRemove.add(intermediateNode);\n\t\t\t\t\t\t\tnodesToRemove.add(childNode);\n\t\t\t\t\t\t\t// mark the nodes as they are not getting removed till after the loop\n\t\t\t\t\t\t\tintermediateNode.resolved = true;\n\t\t\t\t\t\t\tintermediateNode.nodeValue = false;\n\t\t\t\t\t\t\tchildNode.resolved = true;\n\t\t\t\t\t\t\tchildNode.nodeValue = false;\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\tintermediateNode.removeChildNodes(childNodesToRemove);\n\t\t\t// if no child node left for this intermediate node,\n\t\t\t// then its parent node should remove this intermediate node as well\n\t\t}\n\t\t// remove the no child nodes\n\t\tfor (FTNonLeafNode node : nodesToRemove) {\n\t\t\tintermediateNodes.remove(node.nodeName);\n\t\t}\n\t}",
"private void deleteFixup(Node<K, V> x) {\n\t\t\n\t}",
"void deleteUnusedTags();",
"private void removeClutterAroundMainContent()\r\n \t{\n \r\n \t\tNodes mainContent = xPathQuery(XPath.NON_STANDARD_MAIN_CONTENT.query);\r\n \t\tif (mainContent.size() > 0)\r\n \t\t\thasStandardLayout = false;\r\n \t\telse {\r\n \t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_1.query);\r\n \t\t\tif (mainContent.size() == 0)\r\n \t\t\t\tmainContent = xPathQuery(XPath.MAIN_CONTENT_2.query);\r\n \t\t}\r\n \t\tdeleteNodes(XPath.BODY_NODES.query);\r\n \t\tmoveNodesTo(mainContent, bodyTag);\r\n \t}",
"private void removeContentAfterIndexLink()\r\n \t{\r\n \t\tdeleteNodes(XPath.AFTER_INDEX_LINK.query);\r\n \t}",
"private String removeOuterBrackets(String expr) {\r\n int openPos = expr.indexOf(BRACKET_OPEN);\r\n if (openPos == -1) {\r\n throw new IllegalArgumentException(\"No opening bracket\");\r\n }\r\n \r\n int closePos = expr.lastIndexOf(BRACKET_CLOSE);\r\n if (closePos == -1) {\r\n throw new IllegalArgumentException(\"No closing bracket\");\r\n }\r\n \r\n String before = expr.substring(0, openPos);\r\n String middle = expr.substring(openPos + 1, closePos);\r\n String after = expr.substring(closePos + 1, expr.length());\r\n \r\n return before + middle + after;\r\n }",
"private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}",
"public void clearSubtree(int position) {\n currentBracket.resetSubtree(position);\n }",
"private void removeUnreachableEOGEdges(TranslationUnitDeclaration tu) {\n List<Node> eognodes =\n SubgraphWalker.flattenAST(tu).stream()\n .filter(node -> !(node.getPrevEOG().isEmpty() && node.getNextEOG().isEmpty()))\n .collect(Collectors.toList());\n Set<Node> validStarts =\n eognodes.stream()\n .filter(node -> node instanceof FunctionDeclaration)\n .collect(Collectors.toSet());\n while (!validStarts.isEmpty()) {\n eognodes.removeAll(validStarts);\n validStarts =\n validStarts.stream()\n .flatMap(node -> node.getNextEOG().stream())\n .filter(eognodes::contains)\n .collect(Collectors.toSet());\n }\n // remaining eognodes were not visited and have to be removed from the EOG\n for (Node unvisitedNode : eognodes) {\n unvisitedNode.getNextEOG().forEach(next -> next.getPrevEOG().remove(unvisitedNode));\n unvisitedNode.getNextEOG().clear();\n }\n }",
"private void trimX() {\n\t\tint indexIntoBranches = 0;\n\t\tfor (int i = 0; i < this.branches.size(); i++) {\n\t\t\tif (this.branches.get(i).size() == this.numXVertices) {\n\t\t\t\tindexIntoBranches = i;\n\t\t\t}\n\t\t}\n\n\t\tthis.allX = (ArrayList) this.branches.get(indexIntoBranches).clone(); // We need this for a set difference above\n\n\t\tfor (int k = 0; k < this.branches.get(indexIntoBranches).size(); k++) {\n\t\t\tfor (int j = 0; j < this.branches.get(indexIntoBranches).size(); j++) {\n\t\t\t\t// Ignore if the index is the same - otherwise remove the edges\n\t\t\t\tif (!(k == j)) {\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(k)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(j));\n\t\t\t\t\tthis.branches.get(indexIntoBranches).get(j)\n\t\t\t\t\t\t\t.removeNeighbor(this.branches.get(indexIntoBranches).get(k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void removeAll() \n { \n header.rightChild = nullNode; \n }",
"public HuffmanTree removeMin();",
"@Override\n public void clearAst() {\n this.root = null;\n }",
"public void emptySelectionLists() {\n\t\tArrayList selectionsCopy = new ArrayList();\n\t\tselectionsCopy.addAll(selections);\n\t\tIterator it = selectionsCopy.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tXsdNode node = (XsdNode) it.next();\n\t\t\tunselectNode(node);\n\t\t}\n\t\tlineNode = null;\n\t\telementFilters = new HashMap();\n\t}",
"private void cleanConditionally(Element e, String tag) {\n\n if (!cleanConditionally) {\n return;\n }\n\n Elements tagsList = e.getElementsByTag(tag);\n int curTagsLength = tagsList.size();\n\n /**\n * Gather counts for other typical elements embedded within. Traverse backwards so we can remove nodes\n * at the same time without effecting the traversal. TODO: Consider taking into account original\n * contentScore here.\n **/\n for (int i = curTagsLength - 1; i >= 0; i--) {\n Element ee = tagsList.get(i);\n if (ee.ownerDocument() == null) {\n continue; // it a child of something we've already killed, so it\n // has no document.\n }\n double weight = getClassWeight(ee);\n double contentScore = getContentScore(ee);\n\n LOG.debug(\"Cleaning Conditionally [\" + ee.getClass() + \"] (\" + ee.className() + \":\" + ee.id()\n + \")\" + contentScore);\n\n if (weight + contentScore < 0) {\n LOG.debug(\"Negative content score\");\n ee.remove();\n } else if (getCharCount(ee, ',') < 10) {\n /**\n * If there are not very many commas, and the number of non-paragraph elements is more than\n * paragraphs or other ominous signs, remove the element.\n **/\n int p = ee.getElementsByTag(\"p\").size();\n int img = ee.getElementsByTag(\"img\").size();\n int li = ee.getElementsByTag(\"li\").size() - 100;\n int input = ee.getElementsByTag(\"input\").size();\n\n Elements embeds = ee.getElementsByTag(\"embed\");\n int embedCount = embeds.size();\n // removed code that pays specific attention to youtube.\n double linkDensity = getLinkDensity(ee);\n int contentLength = ee.text().length();\n boolean toRemove = false;\n\n if (img > p) {\n toRemove = true;\n } else if (li > p && !\"ul\".equals(tag) && !\"ol\".equals(tag)) {\n toRemove = true;\n } else if (input > Math.floor(p / 3)) {\n toRemove = true;\n } else if (contentLength < 25 && (img == 0 || img > 2)) {\n toRemove = true;\n } else if (weight < 25 && linkDensity > 0.2) {\n toRemove = true;\n } else if (weight >= 25 && linkDensity > 0.5) {\n toRemove = true;\n } else if ((embedCount == 1 && contentLength < 75) || embedCount > 1) {\n toRemove = true;\n }\n\n if (toRemove) {\n LOG.debug(\"failed keep tests.\");\n ee.remove();\n }\n }\n }\n }",
"private void clearNonUsedQuadruples() {\n expandedQuadruples.removeIf(expandedQuadruple -> expandedQuadruple.getLevel() != 0);\n }",
"public void removeOddSubtrees () {\n\t\t// TODO\n\t\tif (root == null) return; \n if (root.key % 2 != 0) {\n root = null;\n }\n removeOddSubtrees(root);\n }",
"private final String RemoveExtraBrackets(String expression) {\r\n String newExpression = expression;\r\n int openParanthesis = 0;\r\n int closeParanthesis = 0;\r\n if ((expression.startsWith(\"(\") && expression.endsWith(\")\"))) {\r\n for (int i = 0; (i \r\n < (expression.length() - 1)); i++) {\r\n String charExpression = expression.substring(i, 1);\r\n if (charExpression.equals(\"(\")) {\r\n openParanthesis++;\r\n }\r\n else if (charExpression.equals(\")\")) {\r\n closeParanthesis++;\r\n }\r\n \r\n }\r\n \r\n if (((openParanthesis - 1) \r\n == closeParanthesis)) {\r\n newExpression = expression.substring(1, (expression.length() - 2));\r\n }\r\n \r\n }\r\n \r\n return newExpression;\r\n }",
"private void removeNoMoreExistingOriginalNodes() {\n for (Node mirrorNode : mirrorGraph.nodes()) {\n if (!isPartOfMirrorEdge(mirrorNode) && !originalGraph.has(mirrorNode)) {\n mirrorGraph.remove(mirrorNode);\n }\n }\n }",
"public String eraseNode() {\n\n String assist = lastIn.info;\n lastIn = lastIn.next;\n size--;\n return assist;\n }",
"public void clearTheStack() {\n int size = expStack.size();\n for (int i = size - 1; i >= 0; i--) {\n String str = expStack.get(i);\n if (!str.equals(\"(\")) {\n postFix.add(str);\n }\n }\n }",
"private static <K, V> @Nullable Node<K, V> removeMininumNodeInTree(@Var Node<K, V> current) {\n if (current.left == null) {\n // This is the minium node to delete\n return null;\n }\n\n if (!Node.isRed(current.left) && !Node.isRed(current.left.left)) {\n // Push red to left if necessary (similar to general removal strategy).\n current = makeLeftRed(current);\n }\n\n // recursive descent\n Node<K, V> newLeft = removeMininumNodeInTree(current.left);\n current = current.withLeftChild(newLeft);\n\n return restoreInvariants(current);\n }",
"void prune() {\n\n }",
"protected void xremove(Node<T> u) {\n\t\tif (u == r) {\n\t\t\tremove();\n\t\t} else {\n\t\t\tif (u == u.parent.left) {\n\t\t\t\tu.parent.left = nil;\n\t\t\t} else {\n\t\t\t\tu.parent.right = nil;\n\t\t\t}\n\t\t\tu.parent = nil;\n\t\t\tr = merge(r, u.left);\n\t\t\tr = merge(r, u.right);\n\t\t\tr.parent = nil;\n\t\t\tn--;\n\t\t}\n\t}",
"public void removeMin() {\n\t\troot = removeMin(root);\n\t}",
"private void removeWord(Node root,String word,int index){\n if(index == word.length()){ //not word.length()-1 because starts from empty root\n //visiting the last Node to Remove\n //but need to remove later when com back to its paren root.removeChild(ch);\n //cause need to check weather node has children or not\n System.out.println(root.value);\n root.isEndOfWord = false; //CARE can only physically 'E' but CAR Node R has E children so R.isEndOfWord =false\n return;\n }\n\n //1st get the 'ch' at the index of th word\n var ch = word.charAt(index);\n\n //get the child Node of ch in root/children\n var child = root.getChild(ch);\n\n //if word doesn't exist/ no any Characters\n if(child == null) return;\n\n //post order traversal visiting child 1st\n removeWord(child,word,index+1); //recursively remove/ go to the next indexes of the word\n\n //then visit root to remove last index\n System.out.println(root.value);\n // if the child doesn't have any children\n // or no any characters related to end of the removing word\n //ex: cant remove word 'CAT' cause 'CATEGORY' exist.\n //if doesnt have any children and it's not the end of another word, physically remove it\n if(!child.hasChildren() && !child.isEndOfWord)\n root.removeChild(ch); //CARE can only physically 'E' but CAR Node R has E children\n\n }",
"private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }",
"private List<MutateOperation> removeAll() {\n return removeDescendantsAndFilter(rootResourceName);\n }",
"public RegexNode StripEnation(int emptyType)\n\t{\n\t\tswitch (ChildCount())\n\t\t{\n\t\t\tcase 0:\n\t\t\t\treturn new RegexNode(emptyType, _options);\n\t\t\tcase 1:\n\t\t\t\treturn Child(0);\n\t\t\tdefault:\n\t\t\t\treturn this;\n\t\t}\n\t}",
"public static void removeSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll3 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll6 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n System.out.println(\"remove 1==\");\n Node r1 = ll1.remove(0);\n r1.printList();\n System.out.println(\"remove 2==\");\n Node r2 = ll2.remove(1);\n r2.printList();\n System.out.println(\"remove 3==\");\n Node r3 = ll3.remove(2);\n r3.printList();\n System.out.println(\"remove 4==\");\n Node r4 = ll4.remove(3);\n r4.printList();\n System.out.println(\"remove 5==\");\n Node r5 = ll5.remove(4);\n r5.printList();\n System.out.println(\"remove 6==\");\n Node r6 = ll6.remove(5);\n r6.printList();\n\n }",
"public void cutNode ()\n {\n copyNode();\n deleteNode();\n }",
"private void cleanStackIfNeeded(Iterator<DocumentReference> currentIterator)\n {\n while (!this.userAndGroupIteratorStack.isEmpty() && !this.userAndGroupIteratorStack.peek().hasNext()) {\n this.userAndGroupIteratorStack.pop();\n }\n }",
"private List<AxiomTreeNode> reduceNodeList(List<AxiomTreeNode> list, int remove) {\n\n List<AxiomTreeNode> reduced = new ArrayList<AxiomTreeNode>(list);\n\n reduced.remove(remove);\n\n return reduced;\n }",
"private E removeNode(Node n) {\n \tassert (n != sentinel);\n \tn.succ.pred = n.pred;\n \tn.pred.succ = n.succ;\n \tsize--;\n \treturn n.data;\n }",
"private void deNude() throws IOException {\r\n if (this.isNude) {\r\n writer.write('>');\r\n if (peekElement().hasChildren) writer.write('\\n');\r\n this.isNude = false;\r\n }\r\n }",
"public void clearRemovalTag() {\n\t levelOfRemoval = 0;\n\t}",
"private void removeRedundantGreyTable()\r\n \t{\r\n \t\tdeleteNodes(XPath.GREY_TABLE.query);\r\n \t}",
"void forceRemoveNodesAndExit(Collection<Node> nodesToRemove) throws Exception;",
"final void makeNonRecursive() { this.unboundedBoundSymbols = null; }",
"boolean ignoreInner();",
"public void testFlatteningInclusive()\n throws IOException, XMLStreamException\n {\n final String INPUT_DTD =\n \"<?xml version='1.0' encoding='UTF-8'?>\\n\"\n +\"<!ELEMENT root (branch+)>\\n\"\n +\"<!ATTLIST root attr CDATA #IMPLIED\\n\"\n +\" attr2 IDREF #IMPLIED>\\n\"\n +\"<!-- comment -->\\n\"\n +\"<!ENTITY % pe '<!-- comment! -->'>\\n\"\n +\"<!ELEMENT branch (child*)>\\n\"\n +\"<!ELEMENT child (#PCDATA)>\\n\"\n +\"<![INCLUDE[\\n\"\n +\"<!ATTLIST child attr CDATA 'def!'>\\n\"\n +\"]]>\\n\"\n +\"<!NOTATION myNot SYSTEM 'foobar:xyz'>\\n\"\n +\"%pe;\\n\"\n +\"<!ENTITY a 'A'>\\n\"\n +\"<?proc instr?>\\r\\n\"\n ;\n //StringReader strr = new StringReader(DTD);\n ReaderConfig cfg = ReaderConfig.createFullDefaults();\n for (int i = 0; i < 8; ++i) {\n boolean inclComments = (i & 4) != 0;\n boolean inclConditionals = (i & 2) != 0;\n boolean inclPEs = (i & 1) != 0;\n WstxInputSource input = DefaultInputResolver.sourceFromString\n (null, cfg, \"[dtd]\", /*xml version for compat checks*/ XmlConsts.XML_V_UNKNOWN, INPUT_DTD);\n StringWriter strw = new StringWriter();\n /*DTDSubset ss =*/ FullDTDReader.flattenExternalSubset\n (input, strw,\n inclComments, inclConditionals, inclPEs);\n strw.flush();\n String output = strw.toString();\n\n /* Ok, so... how do we test it? For now, let's actually\n * just re-parse it to ensure it seems valid? And let's also\n * compare second-time output.\n */\n input = DefaultInputResolver.sourceFromString\n (null, cfg, \"[dtd]\", /*xml version for compatibility checks*/ XmlConsts.XML_V_UNKNOWN, output);\n\n strw = new StringWriter();\n DTDSubset ss = FullDTDReader.flattenExternalSubset\n (input, strw, inclComments, inclConditionals, inclPEs);\n assertNotNull(ss);\n strw.flush();\n String output2 = strw.toString();\n\n assertEquals(output, output2);\n }\n }",
"private void clearFullTree()\r\n {\r\n fullXmlTree = new StringBuilder();\r\n }",
"public List<String> removeInvalidParentheses(String s) {\n int leftCount = 0;\n int rightCount = 0;\n int openCount = 0;\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if ( c == '(') leftCount++;\n if ( c == ')') {\n if (leftCount > 0) leftCount--;\n else rightCount++;\n }\n }\n Set<String> res = new HashSet<>();\n dfs(s, leftCount, rightCount, 0, 0, new StringBuilder(), res);\n return new ArrayList<String>(res);\n }",
"@Override\n protected TokenSet getIndentedElements() {\n return TokenSet.EMPTY;\n }",
"void removeNodeIterator(NodeIterator nodeIterator) {\n if (nodeIterator == null)\n return;\n if (iterators == null)\n return;\n removeStaleIteratorReferences();\n Iterator i = iterators.iterator();\n while (i.hasNext()) {\n Object iterator = ((Reference) i.next()).get();\n if (iterator == nodeIterator) {\n i.remove();\n return;\n } else if (iterator == null) {\n i.remove();\n }\n }\n}",
"private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n return p_seg;\n }",
"String removeBrackets( String reference ) {\n return new String( reference.replace(\"[\", \"\").replace(\"]\", \"\").trim() );\n }",
"public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }",
"private void deleteNode(Node n) {\n n.next.pre = n.pre;\n n.pre.next = n.next;\n }",
"protected BinaryNode<AnyType> remove(AnyType x, BinaryNode<AnyType> t) {\n\t\tif (t == null)\n\t\t\tthrow new ItemNotFoundException(x.toString());\n\t\tif (x.compareTo(t.element) < 0)\n\t\t\tt.left = remove(x, t.left);\n\t\telse if (x.compareTo(t.element) > 0)\n\t\t\tt.right = remove(x, t.right);\n\t\telse if (t.duplicate.size() != 0) {\n\t\t\tt.duplicate.remove(0);\n\t\t} else if (t.left != null && t.right != null) // Two children\n\t\t{\n\t\t\tt.element = findMin(t.right).element;\n\t\t\tt.right = removeMin(t.right);\n\t\t} else\n\t\t\tt = (t.left != null) ? t.left : t.right;\n\t\treturn t;\n\t}",
"public void clearNodeList() {\r\n\t\tfor (int i = 0; i < radix; i++) {\r\n\t\t\tmyArray[i] = new NodeList();\r\n\t\t}\r\n\t}",
"public static void removeNotRequiredSiblings(GroupConditions gc){\r\n\t\tif(gc == null){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tgc.getChildren().forEach(sn->{\r\n\t\t\tif(sn instanceof GroupConditions){\r\n\t\t\t\tGroupConditions child = GroupConditions.class.cast(sn);\r\n\t\t\t\tremoveNotRequiredSiblings(child);\r\n\t\t\t}\r\n\t\t\tif(sn instanceof FilterCondition){\r\n\t\t\t\tFilterCondition fc = FilterCondition.class.cast(sn);\r\n\t\t\t\tSelectExpression se = fc.findFirstByType(SelectExpression.class);\r\n\t\t\t\tif(se != null){\r\n\t\t\t\t\tremoveNotRequiredSiblings(se.findFirstByType(Where.class));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tgc.getChildren().removeIf(sn->sn instanceof GroupConditions && sn.getChildren().isEmpty());\r\n\t\t\r\n\t\tint size = gc.getChildren().size();\r\n\t\tint endIdx = size-1;\r\n\t\tList<int[]> found = childrenOperatorIndex(gc);\r\n\t\t// start with Operator, or end with, or within middle but there are multiple\r\n\t\tList<int[]> match = found.stream().filter(i-> i[0] == 0 || i[1] == endIdx || i[1] - i[0] > 0).collect(Collectors.toList());\r\n\t\tSet<Integer> set = new LinkedHashSet<>();\r\n\t\tmatch.forEach(i->{\r\n\t\t\tint start = i[0];\r\n\t\t\tint end = i[1];\r\n\t\t\tif(i[0] == 0 || i[1] == endIdx){\r\n\t\t\t\tfor(; start <= end; start++){\r\n\t\t\t\t\tset.add(start);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tfor(; start < end; start++){// last one not included\r\n\t\t\t\t\tset.add(start);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tList<Integer> idx = new LinkedList<>(set);\r\n\t\tCollections.reverse(idx);\r\n\t\tSystem.out.println(idx);\r\n\t\tidx.forEach(i->{\r\n\t\t\tgc.getChildren().remove(i.intValue());\r\n\t\t});\r\n\t}",
"private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }",
"protected void removeAllChildNodes(Node elem) {\n NodeList<Node> childNodes = elem.getChildNodes();\n for (int i = childNodes.getLength() - 1; i >= 0; i--) {\n elem.removeChild(childNodes.getItem(i));\n }\n }",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"public void removeAllSuccessors() {\n\t\tfor (int idx=0; idx < this.successorNodes.length; idx++) {\n\t\t\tBaseNode bn = (BaseNode) this.successorNodes[idx];\n\t\t\tbn.removeAllSuccessors();\n\t\t}\n\t\tthis.successorNodes = new BaseNode[0];\n this.useCount = 0;\n\t}",
"private void trimEntities() {\n \t\tList<String> chainIds = getActiveEntities();\n \t\tif (chainIds.size() > 0) {\n \t\t\tfor (Iterator<Atom> iter = atomVector.iterator();iter.hasNext();) {\n \t\t\t\tAtom atom = iter.next();\n \t\t\t\tif (!chainIds.contains(atom.chain_id)) {\n \t\t\t\t\titer.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"protected void compress(){\r\n\t\t\r\n \tmodCount++;\r\n\t\tArrayNode<T> current = beginMarker.next;\r\n\t\t\r\n\t\t//find non-full node\r\n\t\twhile (current != endMarker){\r\n\t\t\tif (current.getLength()== current.getArraySize()){\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tArrayNode<T> removing = current.next;\r\n\t\t\t\t//compression done\r\n\t\t\t\tif (removing==endMarker){\r\n\t\t\t\t\t//remove empty nodes\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t//empty node\r\n\t\t\t\twhile (removing.getArraySize()==0){\r\n\t\t\t\t\tremoving = removing.next;\r\n\t\t\t\t\tif (removing==endMarker)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t//not sure why this is needed\r\n\t\t\t\tif (removing==endMarker){\r\n\t\t\t\t\t//remove empty nodes\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t//move elements from \"removing\" node to \"current\"\r\n\t\t\t\tT temp = removing.removeFirst();\r\n\t\t\t\tcurrent.insertSorted(temp);\r\n\t\t\t\t\r\n\t\t\t\t//check current length, go to next if full, otherwise redo loop\r\n\t\t\t\tif (current.getLength()==current.getArraySize()){\r\n\t\t\t\t\tcurrent = current.next;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//do another sweep at end to remove empty nodes\r\n\t\tcurrent = beginMarker.next;\r\n\t\twhile (current != endMarker){\r\n\t\t\tif (current.getArraySize()==0){\r\n\t\t\t\tcurrent.prev.next = current.next;\r\n\t\t\t\tcurrent.next.prev = current.prev;\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t\tsize--;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcurrent = current.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void clear() {\n root = new Node ('i', false, 256);\n }",
"public E removeAny()\n\t{\n\t\tif (root != null)\n\t\t{\n\t\t\tE temp = root.element();\n\t\t\troot = removehelp(root, root.key());\n\t\t\tnodecount--;\n\t\t\treturn temp;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public List<Node[]> pruneOriginalCandidates(List<Node[]> candidates) {\n return null;\n }",
"private void removeRedundant(int beginIndex) {\n for (int k = beginIndex; k < getChildCount(); k++) {\n removeViewAt(k);\n }\n }",
"void tryRemoveNodes(Collection<Node> nodesToRemove) throws Exception;",
"public static void removeAllRegisteredTemplateElements() {\n availableTemplateElements.clear();\n }",
"abstract void removeNodeReferences(Node<T> node);",
"private static void removeTag(Element currentElement, char parentTag, char childTag) {\r\n\t\tcurrentElement.select(parentTag + \" > \" + childTag).remove();\r\n\t}",
"@Override public List<Node> visitText(@NotNull XQueryParser.TextContext ctx) {\n\t\tfor(int i = 0; i < r.size(); ){\n\t\t\tif(r.get(i).getNodeType() != Node.TEXT_NODE ){\n\t\t\t\tr.remove(i);\n\t\t\t} else i++;\n\t\t}\n\t\treturn visitChildren(ctx);\n\t}",
"private void clean() {\n // TODO: Your code here.\n for (Long id : vertices()) {\n if (adj.get(id).size() == 1) {\n adj.remove(id);\n }\n }\n }",
"@Test\n public void testRemove()\n {\n example.insert(6);\n example.insert(12);\n example.insert(3);\n example.insert(1);\n example.insert(8);\n example.remove(6);\n String testAns = example.printTree().toString();\n System.out.println(\"List is \" + example.printTree().toString());\n String ans2 = \"[8, 3, 12, 1]\";\n assertEquals(ans2, testAns);\n \n //Testing removing a node that has a child in the tree\n example2.insert(6);\n example2.insert(12);\n example2.insert(3);\n example2.insert(1);\n example2.insert(8);\n example2.remove(12);\n String ans3 = \"[6, 3, 8, 1]\";\n String testAns3 = example2.printTree().toString();\n assertEquals(ans3, testAns3);\n \n \n //Testing remove on a leaf\n example3.insert(6);\n example3.insert(12);\n example3.insert(3);\n example3.insert(1);\n example3.insert(8);\n example3.remove(1);\n String ans4 = \"[6, 3, 12, 8]\";\n String testAns4 = example3.printTree().toString();\n assertEquals(ans4, testAns4);\n \n }",
"public void unsetRegular()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(REGULAR$2, 0);\n }\n }",
"public void removeRandomLimitedDepth(){\n Node[] nodes = getRandomNonterminalNode(true); //limited depth so suppress trunc's destructiveness.\n if (nodes == null)\n return;\n \n // Generate random DecisionNode to replace\n DecisionNode replacementNode = DecisionNode.getRandom();\n \n // Update prev reference\n if (nodes[PREV].left == nodes[CURR]){\n //U.pl(\"Truncing: \" + nodes[PREV] + \", \" + nodes[CURR] + \", \" + nodes[NEXT]);\n nodes[PREV].left = replacementNode;\n } else {\n //U.pl(\"Truncing: \" + nodes[PREV] + \", \" + nodes[CURR] + \", \" + nodes[NEXT]);\n nodes[PREV].right = replacementNode;\n }\n }",
"public void flatten () {\n String tags2 = tags.toString();\n tags.delete (0, tags.length());\n int e2 = 0;\n int s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n while (s2 < tags2.length()) {\n e2 = indexOfNextSeparator (tags2, s2, true, true, slashToSeparate);\n merge (tags2.substring (s2, e2));\n s2 = indexOfNextWordStart (tags2, e2, slashToSeparate);\n }\n }",
"private void removeComments(Node node) {\n for (int i = 0; i < node.childNodeSize();) {\n Node child = node.childNode(i);\n if (child.nodeName().equals(\"#comment\")) {\n child.remove();\n } else {\n removeComments(child);\n i++;\n }\n }\n }",
"private void removeUnusedRevisions() {\n\n // Remove all revisions older than the one written by this transaction.\n final long oldestUsableRevisionNumber = this.targetRevisionNumber.get();\n for ( AbstractVersionedItem versionedItem : this.versionedItemsWritten ) {\n versionedItem.removeUnusedRevisions( oldestUsableRevisionNumber );\n }\n\n // Stop referencing the versioned items.\n this.versionedItemsWritten.clear();\n\n }",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"public void deleteMin() {\n root = deleteMin(root);\n }",
"private Boolean remove(StringIterator iter) \n {\n \treturn (remove(root, iter, 0));\n }",
"public TreeNode pruneTree(TreeNode root) {\n if (containsOne(root) == false) {\n return null;\n } else {\n return root;\n }\n }",
"public void leaveTemporaryScope(){\n if(currentTemporaryScopeDepth() == 1){\n resetTemporary();\n }\n if(currentTemporaryScopeDepth() != 0){\n temporaryConstants.remove(temporaryConstants.size() - 1);\n temporaryVariables.remove(temporaryVariables.size() - 1);\n }\n }",
"public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }",
"private void step4(Node node) {\n\t\tHashMap<String, ArrayList<String>> svn = node.svN;\r\n\t\tHashMap<String, ArrayList<String>> cn = node.cN;\r\n\t\tArrayList<String> keys = node.keysN;\r\n\t\tString c = checksubset(cn);\r\n\r\n\t\tif (c != null) {\r\n\t\t\tfor (int i = 0; i < keys.size(); i++) {\r\n\t\t\t\tif (svn.get(keys.get(i)).contains(c)) {\r\n\t\t\t\t\tsvn.get(keys.get(i)).remove(c);\r\n\t\t\t\t\tif (svn.get(keys.get(i)).size() <= 1) {\r\n\t\t\t\t\t\tsvn.remove(keys.get(i));\r\n\t\t\t\t\t\tkeys.remove(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcn.remove(c);\r\n\t\t}\r\n\t}",
"private static String fixBrackets(String reg) {\n while (reg.contains(\"()*\"))\n reg = removeChars(reg, reg.indexOf(\"()*\"), \"()*\".length());\n\n int i = reg.indexOf(\"(\");\n do {\n if (reg.charAt(i) == '(') {\n int j = 1;\n boolean leave = false;\n boolean removeBracket = true;\n do {\n if (reg.charAt(i + j) == '(') {\n bracketStack.push(i);\n bracketRemove.push(removeBracket);\n i = i + j;\n j = 1;\n removeBracket = true;\n } else if (reg.charAt(i + j) == ')') {\n if (removeBracket) {\n if (j == 2 && reg.contains(String.valueOf(QUOTE)))\n leave = false;\n else if (j > 2 && i + j + 1 < reg.length()\n && reg.charAt(i + j + 1) == '*') {\n i = i + j + 1;\n leave = true;\n }\n if (!leave) {\n reg = removeChars(reg, i + j, 1);\n reg = removeChars(reg, i, 1);\n if (bracketStack.size() > 0) {\n i = bracketStack.pop();\n removeBracket = bracketRemove.pop();\n j = 1;\n } else\n leave = true;\n }\n } else {\n if (bracketStack.size() > 0) {\n j = i + j + 1;\n i = bracketStack.pop();\n j = j - i;\n removeBracket = bracketRemove.pop();\n } else {\n i = i + j;\n leave = true;\n }\n }\n } else if (reg.charAt(i + j) == '|' && reg.charAt(i + j - 1) != QUOTE) {\n removeBracket = false;\n j++;\n } else\n j++;\n } while (!leave);\n }\n i++;\n } while (i < reg.length());\n\n return reg;\n }",
"static String eraseXML (StringBuffer fileTextWithXML) {\n\t\tboolean inTag = false;\n\t\tint length = fileTextWithXML.length();\n\t\tStringBuffer fileText = new StringBuffer();\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tchar c = fileTextWithXML.charAt(i);\n\t\t\tif(c == '<') inTag = true;\n\t\t\tif (!inTag) fileText.append(c);\n\t\t\tif(c == '>') inTag = false;\n\t\t}\n\t\treturn fileText.toString();\n\t}",
"private void preserveNecessaryTag() {\n Whitelist whitelist = Whitelist.none();\n whitelist.addTags(\"br\", \"h2\", \"a\", \"img\", \"p\", \"b\", \"i\", \"pre\", \"li\");\n\n // preserve img and its src value\n whitelist.addAttributes(\"img\", \"src\");\n // allow this protocol inside img src attribute value\n whitelist.addProtocols(\"img\", \"src\", \"http\", \"https\", \"data\", \"cid\");\n\n // preserve anchor and its href value\n whitelist.addAttributes(\"a\", \"href\");\n // allow this protocols value inside href attribute value\n whitelist.addProtocols(\"a\", \"href\", \"http\", \"https\", \"data\", \"cid\");\n\n postBodyHTMLContent = Jsoup.clean(postBodyHTMLContent, whitelist);\n }",
"public void testStripReadOnlyWithOle() {\n String fileName = \"stripedWithOle.docx\";\n String fileInput = inputDirectory + \"diagramn_and_formula.docx\";\n String expectedResult = expectedDirectory + fileName;\n ZipFile zipFileSource1;\n try {\n zipFileSource1 = new ZipFile(fileInput);\n Package packSource1 = Package.open(zipFileSource1, PackageAccess.ReadWrite);\n WordDocument docxSource1 = new WordDocument(packSource1);\n docxSource1.stripReadOnlyPartOfDocument();\n File destFile = new File(outputDirectory + fileName);\n assertTrue(docxSource1.save(destFile));\n OpenXmlAssert.assertEquals(new File(outputDirectory + fileName), new File(expectedResult));\n } catch (IOException e) {\n logger.error(e);\n fail(\"cannot open:\" + fileInput);\n } catch (OpenXML4JException e) {\n logger.error(e);\n fail(\"fail\" + e.getMessage());\n }\n }",
"private static Document removePractice(Document doc) {\n NodeList typeList = doc.getElementsByTagName(\"type\");\n System.out.println(\"No images \" + typeList.getLength());\n try {\n for (int x = typeList.getLength() - 1; x >= 0; x--) {\n Element typeElement = (Element) typeList.item(x);\n String typeValue = typeElement.getFirstChild().getNodeValue();\n System.out.println(\"Type \" + typeValue);\n if (typeValue.equalsIgnoreCase(\"practice\")) {\n Element image = (Element) typeElement.getParentNode();\n image.getParentNode().removeChild(image);\n }\n }\n NodeList typeList2 = doc.getElementsByTagName(\"type\");\n System.out.println(\"No images after\" + typeList2.getLength());\n } catch (Exception e) {\n System.out.println(\"No practice images found\");\n return doc;\n }\n return doc;\n }",
"private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }",
"public void makeEmpty() {\n root = null;\n }",
"private static void stripTrivialCycles(CFG cfg) {\n\t\tCollection<SDGEdge> toRemove = new LinkedList<SDGEdge>();\n\t\tfor (SDGEdge e : cfg.edgeSet()) {\n\t\t\tif (e.getSource().equals(e.getTarget())) {\n\t\t\t\ttoRemove.add(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcfg.removeAllEdges(toRemove);\n\t}",
"private void RemoveRootNode() {\n\t\t\n\t\troot_map.remove(this);\n\t\tis_node_set = false;\n\t\tif(left_ptr == null && right_ptr == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tleft_ptr.RemoveRootNode();\n\t\tright_ptr.RemoveRootNode();\n\t}",
"public void deleteMin() {\n if (isEmpty()) throw new NoSuchElementException(\"Symbol table underflow\");\n root = deleteMin(root);\n// TODO:adding check for assurance\n }"
] | [
"0.6119017",
"0.5784468",
"0.57708997",
"0.55307126",
"0.54586667",
"0.5434359",
"0.5386957",
"0.537198",
"0.5260378",
"0.5201869",
"0.5183372",
"0.5148364",
"0.51421666",
"0.5119504",
"0.5087404",
"0.5077235",
"0.50723183",
"0.5035507",
"0.5026854",
"0.5020751",
"0.50002104",
"0.49591085",
"0.49579307",
"0.494315",
"0.4936416",
"0.49206257",
"0.49116367",
"0.49089447",
"0.490517",
"0.48929048",
"0.48835242",
"0.48755163",
"0.4854421",
"0.48525846",
"0.48457766",
"0.4828352",
"0.48275143",
"0.48272136",
"0.48246574",
"0.4819592",
"0.48153076",
"0.48035106",
"0.47921455",
"0.4785764",
"0.47796384",
"0.47710615",
"0.47709253",
"0.477021",
"0.47639683",
"0.47608668",
"0.47419623",
"0.47326645",
"0.47289217",
"0.47262174",
"0.47234318",
"0.47231847",
"0.47055542",
"0.46983147",
"0.4689986",
"0.46824318",
"0.4682139",
"0.46773747",
"0.4665192",
"0.46649727",
"0.46649727",
"0.46565926",
"0.46542943",
"0.4653829",
"0.4649184",
"0.46488294",
"0.4642374",
"0.4640595",
"0.46381348",
"0.46324956",
"0.4629375",
"0.46282262",
"0.46261677",
"0.46245039",
"0.4616227",
"0.4613333",
"0.4611941",
"0.46070603",
"0.46034312",
"0.46026936",
"0.46026936",
"0.46010408",
"0.45975277",
"0.45955634",
"0.45891637",
"0.45846057",
"0.4582594",
"0.45800647",
"0.45717824",
"0.457177",
"0.4565398",
"0.45648348",
"0.4563428",
"0.45594734",
"0.45574927",
"0.45516652"
] | 0.54061407 | 6 |
Merge lists caused by inclusions. | private Node merge(Node r) {
if (r.op() == Empty) return r;
assert(r.op() == List);
if (r.left().op() == Rule) { merge(r.right()); return r; }
Node n = r.left();
assert(n.op() == List);
r.left(n.left());
if (n.right().op() == Empty) return r;
n.left(n.right());
n.right(r.right());
r.right(n);
merge(r);
return r;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setIncludedBy(String includer, List<String> included) {\n for (String target : included) {\n List<String> list = mIncludedBy.get(target);\n if (list == null) {\n list = new ArrayList<String>(2); // We don't expect many includes\n mIncludedBy.put(target, list);\n }\n if (!list.contains(includer)) {\n list.add(includer);\n }\n }\n }",
"public static <T> List<T> union(List<T> a, List<T> b) {\n\t\t\n\t\tHashMap<T, Boolean> include = new HashMap<T, Boolean>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tinclude.put(elt, true);\n\t\tfor (T elt : b)\n\t\t\tinclude.put(elt, true);\n\t\t\n\t\tList<T> toReturn = new ArrayList<T>();\n\t\tfor (T elt : include.keySet())\n\t\t\ttoReturn.add(elt);\n\t\t\n\t\treturn toReturn;\n\t}",
"private List<String> getIncludesFrom(String includer) {\n ensureInitialized();\n\n return mIncludes.get(includer);\n }",
"public static void main(String... args){\n\n List<List<Integer>> listN = new ArrayList<>();\n\n List<Integer> list1N = new ArrayList<>();\n list1N.add(1);\n list1N.add(2);\n list1N.add(3);\n\n\n List<Integer> list2N = new ArrayList<>();\n list2N.add(4);\n list2N.add(5);\n\n\n\n List<Integer> list3N = new ArrayList<>();\n list3N.add(5);\n list3N.add(6);\n\n\n List<Integer> list4N = new ArrayList<>();\n list4N.add(7);\n list4N.add(8);\n list4N.add(9);\n\n listN.add(list1N);\n listN.add(list2N);\n listN.add(list3N);\n listN.add(list4N);\n\n List<Integer> outputN = getMergedLLEfficient(listN);\n\n for(Integer elem : outputN)\n System.out.println(elem);\n }",
"public List<List<String>> accountsMerge(List<List<String>> accounts) {\n\n List<Account> accts = new ArrayList<>();\n Map<String, Account> mapMailToAccount = new HashMap<>();\n for (List<String> account : accounts) {\n String name = account.get(0);\n Account acct = new Account(name);\n accts.add(acct);\n for(int i=1;i<account.size();i++){\n String mail = account.get(i);\n Account mappedAcct = mapMailToAccount.get(mail);\n if (mappedAcct == null) {\n mapMailToAccount.put(mail, acct);\n acct.mails.add(mail);\n } else {\n union(acct, mappedAcct);\n }\n }\n }\n for (Account acct : accts) {\n if (acct.parent != acct) {\n acct.parent = find(acct);\n acct.parent.mails.addAll(acct.mails);\n }\n }\n List<List<String>> mergedAccounts = new ArrayList<>();\n for (Account acct : accts) {\n if (acct.parent == acct) {\n mergedAccounts.add(acct.convertToList());\n }\n }\n return mergedAccounts;\n}",
"protected List getDependenciesIncludeList()\n throws MojoExecutionException\n {\n List includes = new ArrayList();\n\n for ( Iterator i = getDependencies().iterator(); i.hasNext(); )\n {\n Artifact a = (Artifact) i.next();\n\n if ( project.getGroupId().equals( a.getGroupId() ) && project.getArtifactId().equals( a.getArtifactId() ))\n {\n continue;\n }\n\n includes.add( a.getGroupId() + \":\" + a.getArtifactId() );\n }\n\n return includes;\n }",
"private <T> ArrayList<T> intersection(ArrayList<T> list1, ArrayList<T> list2) {\n ArrayList<T> list = new ArrayList<T>();\n\n for (T t : list1) {\n if (list2.contains(t)) {\n list.add(t);\n }\n }\n\n return list;\n }",
"@VisibleForTesting\n /* package */ void setIncluded(String includer, List<String> included, boolean detectCycles) {\n // Remove previously linked inverse mappings\n List<String> oldIncludes = mIncludes.get(includer);\n if (oldIncludes != null && oldIncludes.size() > 0) {\n for (String includee : oldIncludes) {\n List<String> includers = mIncludedBy.get(includee);\n if (includers != null) {\n includers.remove(includer);\n }\n }\n }\n\n mIncludes.put(includer, included);\n // Reverse mapping: for included items, point back to including file\n setIncludedBy(includer, included);\n\n if (detectCycles) {\n detectCycles(includer);\n }\n }",
"public List<Atom> mergeComplementaryProvRelAtoms(List<Atom> discarded){\r\n\t\tList<Atom> body = getBody();\r\n\t\t//\t\tboolean someMerged = false;\r\n\t\tList<Atom> ret = new ArrayList<Atom>();\r\n\r\n\t\tfor(int i = 0; i < body.size(); ){ \r\n\t\t\tAtom a = body.get(i);\r\n\t\t\tboolean merged = false;\r\n\t\t\tfor(int j = i+1; j < body.size(); ){\r\n\t\t\t\tAtom b = body.get(j);\r\n\t\t\t\tAtom mergedAtom = mergeProvRelAtoms(a, b);\r\n\t\t\t\tif(mergedAtom != null){\r\n\t\t\t\t\t//\t\t\t\t\tbody.add(mergedAtom);\r\n\t\t\t\t\tdiscarded.add(body.get(i));\r\n\t\t\t\t\tdiscarded.add(body.get(j));\r\n\t\t\t\t\tbody.set(i, mergedAtom);\r\n\t\t\t\t\tbody.remove(j);\r\n\t\t\t\t\tret.add(mergedAtom);\r\n\t\t\t\t\t//\t\t\t\t\tbody.remove(i);\r\n\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!merged){\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//\t\t\tsomeMerged = someMerged || merged;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }",
"void processImports() {\n FamixImport foundImport;\n\t\tArrayList<FamixImport> foundImportsList;\n\t\tArrayList<FamixImport> alreadyIncludedImportsList;\n\t\timportsPerEntity = new HashMap<String, ArrayList<FamixImport>>();\n\t \n\t\ttry{\n\t for (FamixAssociation association : theModel.associations) {\n \tString uniqueNameFrom = association.from;\n\t \tfoundImport = null;\n\t if (association instanceof FamixImport) {\n\t \tfoundImport = (FamixImport) association;\n\t // Fill HashMap importsPerEntity \n\t \talreadyIncludedImportsList = null;\n\t \tif (importsPerEntity.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedImportsList = importsPerEntity.get(uniqueNameFrom);\n\t \t\talreadyIncludedImportsList.add(foundImport);\n\t \t\timportsPerEntity.put(uniqueNameFrom, alreadyIncludedImportsList);\n\t \t}\n\t \telse{\n\t\t\t \tfoundImportsList = new ArrayList<FamixImport>();\n\t\t \tfoundImportsList.add(foundImport);\n\t\t \timportsPerEntity.put(uniqueNameFrom, foundImportsList);\n\t \t}\n\t }\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.warn(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n }",
"public static <T> List<T> mergeWith(final List<T> extendee, final List<T> list2) {\n for (final T obj : list2) {\n if (!(extendee.contains(obj))) {\n extendee.add(obj);\n }\n }\n return extendee;\n }",
"private static void mergeLists() {\n\t\tint length = (photoList.size() / 2) - 1;\n\t\t\n\t\tif (photoList.size() % 2 == 0) {\n\t\t\tlength++;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tList<String> tL = new ArrayList<String>();\n\t\t\t\n\t\t\tPhoto p1 = photoList.get(i),\n\t\t\t\t p2 = photoList.get(photoList.size() - 1 - i);\n\t\t\t\n\t\t\tfor (String tag : p1.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (String tag : p2.getTagList()) {\n\t\t\t\ttL.add(tag);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int j = 0; j < tL.size() - 1; j++) {\n\t\t\t\tfor (int k = j; k < tL.size(); k++) {\n\t\t\t\t\tif (tL.get(j).equals(tL.get(k))) {\n\t\t\t\t\t\ttL.remove(k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tslideList.add(new Slide(p1.getPhotoId(), p2.getPhotoId(), tL));\n\t\t}\n\t}",
"public ArrayList<ArrayList> intersection (ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(Document d: docs)\n {\n if(docs2.contains(d))\n {\n docs3.add(d);\n int docIndex = docs.indexOf(d);\n int docIndex2 = docs2.indexOf(d);\n double oldRel = (double) relevance.get(docIndex);\n int oldOcc = (int) occurrence.get(docIndex);\n relevance3.add(oldRel+relevance2.get(docIndex2));\n if(oldOcc > occurrence2.get(docIndex2))\n {\n occurrence3.add(occurrence2.get(docIndex2));\n }\n else\n {\n occurrence3.add(oldOcc);\n }\n popularity3.add(d.popularity);\n }\n \n }\n data = new ArrayList<ArrayList> ();\n data.add(docs3);\n data.add(relevance3);\n data.add(occurrence3);\n data.add(popularity3);\n \n return data;\n }",
"private static <File> void merge(ArrayList<File> firstList, ArrayList<File> secondList,\r\n ArrayList<File> wholeList, Comparator<File> usedComparison) {\r\n int i = 0;\r\n int j = 0;\r\n int k = 0;\r\n while (i < firstList.size() && j < secondList.size()) {\r\n if (usedComparison.compare(firstList.get(i), secondList.get(j)) < 0) {\r\n wholeList.set(k++, firstList.get(i++));\r\n } else {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }\r\n while (i < firstList.size()) {\r\n wholeList.set(k++, firstList.get(i++));\r\n }\r\n while (j < secondList.size()) {\r\n wholeList.set(k++, secondList.get(j++));\r\n }\r\n }",
"public ArrayList<Object> union(ArrayList<Object> list1, ArrayList<Object> list2) {\r\n ArrayList<Object> retList = list1;\r\n for(Object o : list2)\r\n if(!list1.contains(o))\r\n retList.add(o);\r\n return retList;\r\n }",
"public static <T> List<T> union(List<List<T>> collections) {\n\t\tHashMap<T, Boolean> include = new HashMap<T, Boolean>();\n\t\t\n\t\tfor (List<T> collection : collections)\n\t\t\tfor (T elt : collection)\n\t\t\t\tinclude.put(elt, true);\n\t\t\n\t\tList<T> toReturn = new ArrayList<T>();\n\t\tfor (T elt : include.keySet())\n\t\t\ttoReturn.add(elt);\n\t\t\n\t\treturn toReturn;\n\t}",
"public ArrayList<ArrayList> union(ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n if(data == null || data2 == null)\n {\n return null;\n }\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(int i = 0; i < docs.size(); i++)\n {\n docs3.add(docs.get(i));\n relevance3.add(relevance.get(i));\n occurrence3.add(occurrence.get(i));\n popularity3.add(popularity.get(i));\n }\n \n for(Document d: docs2)\n {\n if(!docs3.contains(d))\n {\n docs3.add(d);\n int docIndex = docs2.indexOf(d);\n relevance3.add(relevance2.get(docIndex));\n occurrence3.add(occurrence2.get(docIndex));\n popularity3.add(d.popularity);\n }\n else\n {\n int docIndex = docs3.indexOf(d);\n int docIndex2 = docs2.indexOf(d);\n double oldRel = (double) relevance3.get(docIndex);\n int oldOcc = (int) occurrence3.get(docIndex);\n relevance3.set(docIndex, oldRel+relevance2.get(docIndex2));\n if(oldOcc > occurrence2.get(docIndex2))\n {\n occurrence3.set(docIndex, occurrence2.get(docIndex2));\n }\n } \n }\n ArrayList<ArrayList> data3 = new ArrayList();\n data3.add(docs3);\n data3.add(relevance3);\n data3.add(occurrence3);\n data3.add(popularity3);\n return data3; \n }",
"private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }",
"private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }",
"void include(Set<S> segments);",
"public Vector<YANG_Include> getIncludes() {\n\t\tVector<YANG_Include> includes = new Vector<YANG_Include>();\n\t\tfor (Enumeration<YANG_Linkage> el = getLinkages().elements(); el\n\t\t\t\t.hasMoreElements();) {\n\t\t\tYANG_Linkage linkage = el.nextElement();\n\t\t\tif (linkage instanceof YANG_Include)\n\t\t\t\tincludes.add((YANG_Include) linkage);\n\t\t}\n\t\treturn includes;\n\t}",
"private void computeConflicts() {\n\t\tthis.conflictGraph = new HashMap<Class, List<Class>>();\n\n\t\tfor (Class c : this.core) {\n\t\t\tif (c.getSuperClasses().size() >= 2) {\n\n\t\t\t\tList<List<Class>> linExts = new ArrayList<List<Class>>();\n\t\t\t\tfor (int i = 0; i < c.getSuperClasses().size(); i++) {\n\t\t\t\t\tlinExts.add(this.linearExts.get(c.getSuperClasses().get(i)));\n\t\t\t\t\tlinExts.get(i).add(c.getSuperClasses().get(i));\n\t\t\t\t}\n\n\t\t\t\tList<HashSet<Class>> diffs = new ArrayList<HashSet<Class>>();\n\n\t\t\t\t// Compute lini - linj for all i != j\n\t\t\t\tfor (List<Class> linExt : linExts) {\n\t\t\t\t\tfor (List<Class> linExt2 : linExts) {\n\t\t\t\t\t\tif (linExt != linExt2) {\n\t\t\t\t\t\t\tHashSet<Class> diff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt2) {\n\t\t\t\t\t\t\t\tif (!linExt.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\n\t\t\t\t\t\t\tdiff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt) {\n\t\t\t\t\t\t\t\tif (!linExt2.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Compute conflicts di * dj for all j != i\n\t\t\t\tfor (HashSet<Class> diff : diffs) {\n\t\t\t\t\tfor (HashSet<Class> diff2 : diffs) {\n\t\t\t\t\t\tif (diff != diff2) {\n\t\t\t\t\t\t\tfor (Class c1 : diff) {\n\t\t\t\t\t\t\t\tList<Class> conflicts = new ArrayList<Class>();\n\t\t\t\t\t\t\t\tif (this.conflictGraph.containsKey(c1))\n\t\t\t\t\t\t\t\t\tconflicts = this.conflictGraph.get(c1);\n\n\t\t\t\t\t\t\t\tfor (Class c2 : diff2) {\n\t\t\t\t\t\t\t\t\tconflicts.add(c2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.conflictGraph.put(c1, conflicts);\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}\n\t\t\t}\n\t\t}\n\t}",
"@Test\n @Ignore(\"Already ran, organisations merged\")\n public void mergeOrganisations() {\n List<List<Long>> idsList = new ArrayList<>();\n List<Long> mergingIds = new ArrayList<>(); //<mergingId, survivingId>\n List<Long> survivingIds = new ArrayList<>(); //<mergingId, survivingId>\n\n //ECS\n mergingIds.add(20066194L);\n survivingIds.add(17913930L);\n\n //Waveguide -->2\n mergingIds.add(19440239L);\n survivingIds.add(20067398L);\n\n //Goldman Sachs -->3\n mergingIds.add(1807900L);\n survivingIds.add(710854L);\n\n //Elekta -->5\n mergingIds.add(16374120L);\n survivingIds.add(9050265L);\n //Bank of England -->12\n mergingIds.add(1878532L);\n survivingIds.add(710744L);\n //Nordea -->14\n mergingIds.add(692179L);\n survivingIds.add(13109201L);\n //HSBC Bank PLC -- 28\n mergingIds.add(15315614L);\n survivingIds.add(710229L);\n\n //Lein applied diagnostics -->16\n mergingIds.add(20066543L);\n survivingIds.add(20015906L);\n\n //Mitsubishi -->17\n mergingIds.add(709719L);\n survivingIds.add(710917L);\n //Travelex -->18\n mergingIds.add(1808837L);\n survivingIds.add(3613025L);\n //zedsen -->19\n mergingIds.add(25361568L);\n survivingIds.add(24436501L);\n //RaymondJames ->20\n mergingIds.add(20019540L);\n survivingIds.add(20311840L);\n //Elektron -->22\n mergingIds.add(19440192L);\n survivingIds.add(12776071L);\n //Glaxo Smith Kline -->23\n mergingIds.add(25881446L);\n survivingIds.add(17430668L);\n //UCL -->24\n mergingIds.add(3604761L);\n survivingIds.add(711204L);\n //Safeguard -->25\n mergingIds.add(710501L);\n survivingIds.add(2721808L);\n //Francis Crick Institute-->26\n mergingIds.add(17488058L);\n survivingIds.add(24075580L);\n //Elekta 2 -->27\n mergingIds.add(20746251L);\n survivingIds.add(9050265L);\n //Scentrics -->29\n mergingIds.add(3648896L);\n survivingIds.add(4819987L);\n //Imperial --> 30\n mergingIds.add(1808803L);\n survivingIds.add(3585109L);\n //M&G -->33\n mergingIds.add(1369007L);\n survivingIds.add(17765068L);\n //World programming Company --> 34\n mergingIds.add(6570392L);\n survivingIds.add(6231419L);\n //British Airways --> 35\n mergingIds.add(710006L);\n survivingIds.add(710401L);\n //Deloitte--> 36\n mergingIds.add(3604552L);\n survivingIds.add(3586027L);\n //Morgan Stanley--> 37\n mergingIds.add(711029L);\n survivingIds.add(709877L);\n\n assertEquals(mergingIds.size(), survivingIds.size());\n\n for (int i = 0; i < mergingIds.size(); i++) {\n String uri = baseURI + \"/organisation/\" + mergingIds.get(i) + \"/mergeInto/\" + survivingIds.get(i);\n System.out.print(uri);\n String res = getFromVertec(uri, String.class).getBody();\n System.out.println(\"============= \" + res + \" ===================\");\n }\n\n }",
"public ArrayList<Object> fullUnion(ArrayList<Object> list1 , ArrayList<Object> list2){\r\n ArrayList<Object> retList = new ArrayList<Object>();\r\n retList.addAll(list1);\r\n retList.addAll(list2);\r\n return retList;\r\n }",
"ArrayList<Edge> merge(ArrayList<Edge> l1, ArrayList<Edge> l2) {\n ArrayList<Edge> l3 = new ArrayList<Edge>();\n IComparator<Edge> c = new CompareEdges();\n while (l1.size() > 0 && l2.size() > 0) {\n if (c.apply(l1.get(0), l2.get(0))) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n else {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n }\n while (l1.size() > 0) {\n l3.add(l1.get(0));\n l1.remove(0);\n }\n while (l2.size() > 0) {\n l3.add(l2.get(0));\n l2.remove(0);\n }\n return l3;\n }",
"@JsonIgnore\n public List<Application> getIncludedApplications()\n {\n List<Application> actual = new ArrayList<Application>();\n\n for (Application app : _apps) {\n if (!app.isSkipped()) {\n actual.add(app);\n }\n }\n\n return actual;\n }",
"public void mergeFrom(UniqueGroupList from) {\n final Set<Group> alreadyInside = this.toSet();\n from.internalList.stream()\n .filter(group -> !alreadyInside.contains(group))\n .forEach(internalList::add);\n\n assert CollectionUtil.elementsAreUnique(internalList);\n }",
"public void includes(Object includeRoots) {\n includes.from(includeRoots);\n }",
"public ArrayList<Predmet> union(ArrayList<ArrayList<Predmet>> listU){\n\t\tSet<Predmet> set = new HashSet<Predmet>();\n\t\t\n\t\tfor(ArrayList<Predmet> p : listU)\n\t\t\tset.addAll(p);\n\t\t\n\t\treturn new ArrayList<Predmet>(set);\n\t}",
"public static void merge(int[] list1, int[] list2, int[] temp){\n //Current index in three lists\n int current1 = 0;\n int current2 = 0;\n int current3 = 0;\n\n while(current1 < list1.length && current2 < list2.length){\n if(list1[current1] < list2[current2])\n temp[current3++] = list1[current1++];\n else\n temp[current3++] = list2[current2++];\n }\n //Rest of the list1 to temp\n while(current1 < list1.length)\n temp[current3++] = list1[current1++];\n //Rest of the list2 to temp\n while(current2 < list2.length)\n temp[current3++] = list2[current2++];\n }",
"public static void main(String[] args) {\n List<Integer> list1 = new ArrayList<>();\n List<Integer> list2 = new ArrayList<>();\n list1.add(2);\n list1.add(3);\n list1.add(4);\n list2.add(1);\n list2.add(5);\n list2.add(6);\n merge(list1, list2).forEach(item -> System.out.print(item + \" \"));\n }",
"public Merge() {\r\n this.listsOfSorted = new LinkedList<>();\r\n\r\n }",
"@Test\n public void test1() {\n final List<String> listA = Arrays.asList(\"Fremont\", \"Dublin\", \"anamole\", \"San Jose\" , \"SFO\", \"Dublin\", \"San Jose\", \"paramount\", \"y\");\n final List<String> listB = Arrays.asList(\"Dublin\", \"san mateo\", \"los angeles\", \"san mateo\", \"fremont\", \"anamole\", \"x\", \"x\", \"Y\");\n final List<String> common = FindIntersection.findCommonLists(listA, listB);\n System.out.println(Arrays.toString(FindIntersection.findCommonLists(listA, listB).toArray()));\n\n }",
"private List<ClassEntity> excludeInners(List<ClassEntity> list) {\n List<ClassEntity> result = new ArrayList<>();\n for (ClassEntity classEntity :\n list) {\n CompilationUnit cu = classEntity.getCu();\n int i = 0;\n for (Node node :\n cu.getTypes().get(0).getChildrenNodes()) {\n if (node instanceof ClassOrInterfaceDeclaration) {\n i++;\n }\n }\n if (i == 0) {\n result.add(classEntity);\n }\n }\n return result;\n }",
"private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }",
"private static Set<Configuration> flattenConfigurations(@NonNull Configuration configuration) {\n Set<Configuration> configs = Sets.newHashSet();\n configs.add(configuration);\n\n for (Configuration extend : configuration.getExtendsFrom()) {\n configs.addAll(flattenConfigurations(extend));\n }\n\n return configs;\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tint arr1[] = {3,2,11,4,6,7};\r\n\t\tint arr2[] = {1,2,8,4,9,7};\r\n\t\t\r\n\t\tList<Integer> list1 = new ArrayList<Integer>();\r\n\t\t\r\n\t\tList<Integer> list2 = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (int a : arr1) {\r\n\t\t\tlist1.add(a);\r\n\t\t}\r\n\t\tfor (int b : arr2) {\r\n\t\t\tlist2.add(b);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(list1);\r\n System.out.println(list2);\r\n \r\n list1.retainAll(list2);\r\n System.out.println(\"The Intersection values : \" + list1);\r\n \r\n\t}",
"@Test\n public void testUnionOfLists() {\n System.out.println(\"UnionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.UnionOfLists();\n Collections.sort(result);\n assertEquals(arr1, result);\n }",
"private boolean isIncluded(ArrayList<Instance> inputs, Instance ins){\n boolean isAdded = false;\n for (Instance i: inputs){\n if (i == ins)\n return true;\n Concept temp = i.getConcept();\n while (true){\n if (temp == null)\n break;\n if (temp == ins.getConcept())\n return true;\n temp = temp.getSuperConcept(); \n }\n }\n return isAdded;\n }",
"public List<Integer> interleaveLists(List<Integer> listOne, List<Integer> listTwo) {\n\t\tList<Integer> weave = new ArrayList<>();\n\t\tint i = 0;\n\t\tfor (i = 0; i < listOne.size() && i < listTwo.size(); i++) {\n\t\t\tweave.add(listOne.get(i));\n\t\t\tweave.add(listTwo.get(i));\n\t\t}\n\n\t\tif (listOne.size() > listTwo.size()) {\n\t\t\tfor(int j = i; j < listOne.size(); j++) {\n\t\t\t\tweave.add(listOne.get(j));\n\t\t\t}\n\t\t}\n\n\t\tif (listTwo.size() > listOne.size()) {\n\t\t\tfor(int k = i; k < listTwo.size(); k++) {\n\t\t\t\tweave.add(listTwo.get(k));\n\t\t\t}\n\t\t}\n\t\treturn weave;\n\t\t\n\t}",
"void doMerge() {\n int[] temp = new int[arr.length + brr.length];\n int count = 0;\n for (int i = 0; i < arr.length; i++) {\n temp[i] = arr[i];\n count++;\n }\n for (int i = 0; i < brr.length; i++) {\n temp[count++] = brr[i];\n }\n for (int i = 0; i < temp.length; i++) {\n System.out.println( temp[i] );\n }\n String a[] = {\"A\", \"E\", \"I\"};\n String b[] = {\"O\", \"U\"};\n List<String> list = new ArrayList( Arrays.asList( a ) );\n list.addAll( Arrays.asList( b ) );\n Object[] c = list.toArray();\n System.out.println( Arrays.toString( c ) );\n }",
"private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }",
"void assignToLists() {\n\n int lastOuterIndex = -1;\n int lastRightIndex = -1;\n for (int i = 0; i < rangeVariables.length; i++) {\n if (rangeVariables[i].isLeftJoin) {\n lastOuterIndex = i;\n }\n if(rangeVariables[i].isRightJoin) {\n lastOuterIndex = i;\n lastRightIndex = i;\n }\n\n if (lastOuterIndex == i) {\n joinExpressions[i].addAll(tempJoinExpressions[i]);\n } else {\n for (int j = 0; j < tempJoinExpressions[i].size(); j++) {\n assignToJoinLists(\n (Expression) tempJoinExpressions[i].get(j),\n joinExpressions, lastOuterIndex + 1);\n }\n }\n }\n\n for (int i = 0; i < queryExpressions.size(); i++) {\n assignToWhereLists((Expression) queryExpressions.get(i),\n whereExpressions, lastRightIndex);\n }\n }",
"@Override\r\n\t\tpublic final boolean combinePropertyLists()\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}",
"private ArrayList<String> joinResults(ArrayList<Message> messages){\n ArrayList<String> joinedResults = messages.get(0).getList();\n int size = messages.size();\n for(int i = 1; i< size; i++){\n ArrayList<String> results = messages.get(i).getList();\n for(String result: results){\n if(!joinedResults.contains(result)){\n joinedResults.add(result);\n }\n }\n }\n return joinedResults;\n }",
"@Deprecated\n public synchronized void mergeOutputList() {\n logger.debug3(\"Merging\");\n List oldTop = (List)listStack.pop();\n List newTop = (List)listStack.peek();\n newTop.addAll(oldTop);\n }",
"private static Set<Item> multiSetIntersection(List<Set<Item>> setList) {\n Set<Item> interQrels = new HashSet<>(setList.get(0));\r\n \r\n for (int i = 1; i< setList.size();i++) {\r\n interQrels.retainAll(setList.get(i)); // intersection with two (and one)\r\n }\r\n\r\n return interQrels;\r\n }",
"void collectAntecedents( ArrayList ts ) {\n if (antecedents == null) return;\n Iterator i = antecedents.iterator();\n while (i.hasNext()) {\n variable v = (variable) i.next();\n if (!ts.contains(v)) {\n ts.add(v);\n v.collectAntecedents(ts);\n }\n }\n }",
"@Override\n protected void mergeBuildBase_Filters( BuildBase target, BuildBase source, boolean sourceDominant,\n Map<Object, Object> context )\n {\n List<String> src = source.getFilters();\n if ( !src.isEmpty() )\n {\n List<String> tgt = target.getFilters();\n Set<String> excludes = new LinkedHashSet<String>( tgt );\n List<String> merged = new ArrayList<String>( tgt.size() + src.size() );\n merged.addAll( tgt );\n for ( String s : src )\n {\n if ( !excludes.contains( s ) )\n {\n merged.add( s );\n }\n }\n target.setFilters( merged );\n }\n }",
"public static <T> List<T> union(List<T> list1, List<T> list2) {\n Set<T> set = new HashSet<T>();\n\n set.addAll(list1);\n set.addAll(list2);\n\n return new ArrayList<T>(set);\n }",
"private void merge(List<Estado> states1, List<Estado> states2) {\n\t\tfor (Estado state : states2) {\n\t\t\tif (!contain(state, states1)) {\n\t\t\t\tstates1.add(state);\n\t\t\t}\n\n\t\t}\n\t}",
"void setExcludeList(SynchronizationRequest req, Zipper zipper) {\n\n try { \n String serverName = req.getServerName();\n List list = (List)_excludeCache.get(serverName);\n if (list == null) {\n Properties env = req.getEnvironmentProperties();\n // admin config context\n ConfigContext ctx = _ctx.getConfigContext();\n Domain domain = (Domain) ctx.getRootConfigBean();\n Server server = domain.getServers().getServerByName(serverName);\n if (server != null) {\n ServerDirector director=new ServerDirector(ctx, serverName);\n List excludes = director.constructExcludes();\n list = new ArrayList();\n int size = excludes.size();\n for (int i=0; i<size; i++) {\n String path = (String) excludes.get(i);\n String tPath = \n TextProcess.tokenizeConfig(path, serverName, env);\n list.add(tPath);\n }\n // add the list to the cache\n _excludeCache.put(serverName, list);\n }\n }\n _logger.log(Level.FINE, \"Excluded List \" + list);\n zipper.addToExcludeList(list);\n } catch (Exception e) {\n _logger.log(Level.FINE, \"Excluded List can not be set\", e);\n }\n }",
"public static List<Integer> join2(List<List<Integer>> lists){\n return lists.stream()\n .flatMap(Collection::stream)\n .sorted()\n .collect(Collectors.toList());\n }",
"public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }",
"public void mergeFrom(UniquePreferenceList from) {\n final Set<Preference> alreadyInside = this.toSet();\n from.internalList.stream()\n .filter(preferenceTag -> !alreadyInside.contains(preferenceTag))\n .forEach(internalList::add);\n\n assert CollectionUtil.elementsAreUnique(internalList);\n }",
"public void setIncludes( List<IncludeClasses> includes )\n {\n this.includes = includes;\n }",
"synchronized void toCrawlList_addAll(LinkedHashSet _toCrawlList, ArrayList _links)\n {\n _toCrawlList.addAll(_links);\n }",
"private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }",
"private <T> List<Object> merge(Deque<T> left, Deque<T> right, Comparator<? super T> comparator) {\n\t\tLinkedList<T> result = new LinkedList<T>();\n\t\tlong intersections = 0L;\n\t\twhile (!left.isEmpty() || !right.isEmpty()) {\n\t\t\tT leftInteger = left.poll();\n\t\t\tT rightInteger = right.poll();\n\t\t\tif (leftInteger != null && rightInteger != null) {\n\t\t\t\tint comparisionResult = comparator.compare(leftInteger, rightInteger);\n\t\t\t\tif (comparisionResult < 0) {\n\t\t\t\t\tresult.add(leftInteger);\n\t\t\t\t\tright.push(rightInteger);\n\t\t\t\t} else if (comparisionResult > 0) {\n\t\t\t\t\tresult.add(rightInteger);\n\t\t\t\t\tleft.push(leftInteger);\n\t\t\t\t\t//System.out.println(\"Number of intesections is: \" + intersections);\n\t\t\t\t\tintersections += left.size();\n\t\t\t\t} else {\n\t\t\t\t\tresult.add(rightInteger);\n\t\t\t\t\tresult.add(leftInteger);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (leftInteger != null && rightInteger == null) {\n\t\t\t\tresult.add(leftInteger);\n\t\t\t}\n\t\t\tif (leftInteger == null && rightInteger != null) {\n\t\t\t\tresult.add(rightInteger);\n\t\t\t}\n\t\t}\n\t\t//System.out.println(\"merged \" + result);\n\t\treturn Arrays.<Object>asList(Long.valueOf(intersections), result);\n\t}",
"void addBuiltInLists() {\n BackgroundTask\n .wrap(JournalAbbreviationLoader::getBuiltInAbbreviations)\n .onRunning(() -> isLoadingBuiltIn.setValue(true))\n .onSuccess(result -> {\n isLoadingBuiltIn.setValue(false);\n addList(Localization.lang(\"JabRef built in list\"), result);\n })\n .onFailure(dialogService::showErrorDialogAndWait)\n .executeWith(taskExecutor);\n\n BackgroundTask\n .wrap(() -> {\n if (abbreviationsPreferences.useIEEEAbbreviations()) {\n return JournalAbbreviationLoader.getOfficialIEEEAbbreviations();\n } else {\n return JournalAbbreviationLoader.getStandardIEEEAbbreviations();\n }\n })\n .onRunning(() -> isLoadingIeee.setValue(true))\n .onSuccess(result -> {\n isLoadingIeee.setValue(false);\n addList(Localization.lang(\"IEEE built in list\"), result);\n })\n .onFailure(dialogService::showErrorDialogAndWait)\n .executeWith(taskExecutor);\n }",
"private Vector<Object> mergeArrays( Object[]dt, Object[]ar ) {\n\t\tVector<Object> v = new Vector<Object>();\n\n\t\tfor( int i = 0; i < dt.length; ++i ) {\n\t\t\tlog.fine(\"mergeArrays: including base: \"+dt[i]);\n\t\t\tv.addElement( dt[i] );\n\t\t}\n\n\t\tfor( int i = 0; i < ar.length; ++i ) {\n\t\t\tif( v.contains( ar[i] ) == false ) {\n\t\t\t\tlog.fine(\"mergeArrays: adding missing: \"+ar[i]);\n\t\t\t\tv.addElement( ar[i] );\n\t\t\t}\n\t\t}\n\t\treturn v;\n\t}",
"public void markCsgListMerge() throws JNCException {\n markLeafMerge(\"csgList\");\n }",
"@Nullable\n public List<Reference> getIncludedBy(IResource included) {\n ensureInitialized();\n String mapKey = getMapKey(included);\n List<String> result = mIncludedBy.get(mapKey);\n if (result == null) {\n String name = getResourceName(included);\n if (!name.equals(mapKey)) {\n result = mIncludedBy.get(name);\n }\n }\n\n if (result != null && result.size() > 0) {\n List<Reference> references = new ArrayList<Reference>(result.size());\n for (String s : result) {\n references.add(new Reference(mProject, s));\n }\n return references;\n } else {\n return null;\n }\n }",
"private boolean[] merge(List<boolean[]> arrList) {\n\t\tint size = 0;\r\n\t\tfor (boolean[] arr : arrList) {\r\n\t\t\tsize += arr.length;\r\n\t\t}\r\n\t\t\r\n\t\t// Copy it into that.\r\n\t\tint current = 0;\r\n\t\tboolean[] merged = new boolean[size];\r\n\t\tfor (boolean[] arr : arrList) {\r\n\t\t\tSystem.arraycopy(arr, 0, merged, current, arr.length);\r\n\t\t\tcurrent += arr.length;\r\n\t\t}\r\n\t\t\r\n\t\tassert current == size : \"current is supposed to point to the end of the array at the end of execution.\";\r\n\t\treturn merged;\r\n\t}",
"public static <T> List<T> intersection(List<T> a, List<T> b) {\n\t\tList<T> acc = new ArrayList<T>();\n\t\tfor (T t : a)\n\t\t\tif (b.contains(t))\n\t\t\t\tacc.add(t);\n\t\treturn acc;\n\t}",
"static Set<SchemaModelImpl> getMegaIncludedModels(\n SchemaModelImpl sModel, String soughtNs, ResolveSession session) {\n //\n// if (true) {\n// // For optimization tests only\n // Uncomment and run tests to check how often the mega-include is called. \n// throw new RuntimeException(\"MEGA INCLUDE\");\n// }\n //\n Schema mySchema = sModel.getSchema();\n if (mySchema == null) {\n return Collections.EMPTY_SET;\n }\n //\n // If the current model has empty target namespace, then it can be included anywhere\n // If the current model has not empty target namespace, then it can be included only\n // to models with the same target namespace.\n String myTargetNs = mySchema.getTargetNamespace();\n if (myTargetNs != null && !Util.equal(soughtNs, myTargetNs)) {\n return Collections.EMPTY_SET;\n }\n //\n // The graph is lazy initialized in session and can be reused during\n // the resolve session.\n BidirectionalGraph<SchemaModelImpl> graph = \n session.getInclusionGraph(sModel, soughtNs);\n //\n // Now there is forward and back inclusion graphs.\n if (graph.isEmpty()) {\n return Collections.EMPTY_SET;\n }\n //\n // Look for the roots of inclusion.\n // Root s the top schema model, which includes current schema recursively,\n // but isn't included anywhere itself.\n Set<SchemaModelImpl> inclusionRoots = graph.getRoots(sModel, false);\n //\n HashSet<SchemaModelImpl> result = new HashSet<SchemaModelImpl>();\n for (SchemaModelImpl root : inclusionRoots) {\n // The namespace of the inclusion root has to be exectly the same\n // as required.\n if (Util.equal(root.getSchema().getTargetNamespace(), soughtNs)) {\n MultivalueMap.Utils.populateAllSubItems(graph, root, sModel, result);\n }\n }\n //\n result.remove(sModel);\n //\n return result;\n }",
"@Test\n public void testIntersectionOfLists() {\n System.out.println(\"IntersectionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr2);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.IntersectionOfLists();\n Collections.sort(result);\n assertEquals(arr2, result);\n }",
"public static void mergeSorted(ArrayList<Integer> A, ArrayList<Integer> B) {\n\t\tArrayList<Integer> ans = new ArrayList<Integer>();\n\n\t\tfor (int i : A) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tfor (int i : B) {\n\t\t\tans.add(i);\n\t\t}\n\n\t\tCollections.sort(ans);\n\t\tSystem.out.println(ans);\n\n\t}",
"void merge();",
"public ArrayList<Object> intersect(ArrayList<Object> list1, ArrayList<Object> list2)\r\n {\r\n ArrayList<Object> retList = new ArrayList<Object>();\r\n for(Object o : list1)\r\n if(list2.contains(o))\r\n retList.add(o);\r\n return retList;\r\n }",
"public void addConclusions() {\n\t\tif(conclusionNumbers1.size()==0) {\n\t\t\tconclusion1=\"\";\n\t\t}\n\t\telse if(conclusionNumbers1.size()==1) {\n\t\t\tconclusion1 = \"Bacteroides was detected from sample \"+conclusionNumbers1.get(0)+\".\";\n\t\t}\n\t\telse if(conclusionNumbers1.size()==2) {\n\t\t\tconclusion1 = \"Bacteroides was detected from samples \"+conclusionNumbers1.get(0) + \" and \"+ conclusionNumbers1.get(1) + \".\";\n\t\t}\n\t\telse {\n\t\t\tconclusion1 = \"Bacteroides was detected from samples \";\n\t\t\tfor(int i=0;i<conclusionNumbers1.size()-2;i++) {\n\t\t\t\tconclusion1+=conclusionNumbers1.get(i) + \", \";\n\t\t\t}\n\t\t\tconclusion1+= conclusionNumbers1.get(conclusionNumbers1.size()-2) + \" and \"+ conclusionNumbers1.get(conclusionNumbers1.size()-1) + \".\";\n\t\t}\n\t\t\n\t\tif(conclusionNumbers2.size()==0) {\n\t\t\tconclusion2=\"\";\n\t\t}\n\t\telse if(conclusionNumbers2.size()==1) {\n\t\t\tconclusion2 = \"no Bacteroides was detected from sample \"+conclusionNumbers2.get(0)+\".\";\n\t\t}\n\t\telse if(conclusionNumbers2.size()==2) {\n\t\t\tconclusion2 = \"no Bacteroides was detected from samples \"+conclusionNumbers2.get(0) + \" and \"+ conclusionNumbers2.get(1) + \".\";\n\t\t}\n\t\telse {\n\t\t\tconclusion2 = \"no Bacteroides was detected from samples \";\n\t\t\tfor(int i=0;i<conclusionNumbers2.size()-2;i++) {\n\t\t\t\tconclusion2+=conclusionNumbers2.get(i) + \", \";\n\t\t\t}\n\t\t\tconclusion2+= conclusionNumbers2.get(conclusionNumbers2.size()-2) + \" and \"+ conclusionNumbers2.get(conclusionNumbers2.size()-1) + \".\";\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tCollection c=new ArrayList();\n\t\t\n\t\tc.add(23);\n\t\tc.add(34);\n\t\t\n\t\tCollection c1=new ArrayList();\n\t\t\n\tc1.add(45);\n\tc1.add(67);\n\t\n\tc.addAll(c1);\n\tSystem.out.println(c);\n\t\n\t\n\tCollection c2=new ArrayList();\n\tc2.add(12);\n\tc2.add(23);\n\tc2.add(25);\n\t\n\tCollection c3=new ArrayList();\n\tc3.add(34);\n\tc3.add(45);\n\tc3.add(25);\n\tc3.add(25);\n\t\n\tc2.addAll(c3);\n\t\n\tSystem.out.println(c2);\n\tSystem.out.println(\"-------------------\");\n\t\n\t\n\tc2.removeAll(c3);\n\tSystem.out.println(c2);\n\t\n\tSystem.out.println(\"-------------------\");\n\tCollection c4=new ArrayList();\n\tc4.add(25);\n\tc4.add(23);\n\tc4.add(86);\n\tc4.add(98);\n\t\n\t\n\t\n\tCollection c5=new ArrayList();\n\tc5.add(25);\n\tc5.add(23);\n\tc5.add(12);\n\tc5.add(13);\n\t\n\tc4.retainAll(c5);\n\tSystem.out.println(c4);\n\t\n\tSystem.out.println(\"-------------------\");\n\t\n\tCollection c6=new ArrayList();\n\tc6.add(12);\n\tc6.add(23);\n\t\n\tObject a[]= c6.toArray();\n\tfor(int i=0;i < a.length ; i++)\n\t{\n\t\tSystem.out.println(a[i]);\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\tc4.clear();\n\tSystem.out.println(c4);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t}",
"public static <T> void intersectListTo1(List<T> list1, List<T> list2) {\n if (list1 == null)\n return;\n if (list2 == null) {\n list1.clear();\n return;\n }\n int origSize = list1.size();\n outer:\n for (int i = 0; i < list1.size(); i++) {\n T item = list1.get(i);\n for (int j = 0; j < list2.size(); j++) {\n if (list2.get(j).equals(item))\n continue outer;\n }\n list1.remove(item);\n i--;\n }\n }",
"private List<DataPoint> mergeSortedListsOfAttempts(List<List<QuizAttempt>> listsToMerge) {\n List<DataPoint> listFromMerging = new ArrayList<>();\n int numberOfLists = listsToMerge.size();\n int[] lengths = new int[numberOfLists];\n int[] positions = new int[numberOfLists];\n for (int i = 0; i < numberOfLists; ++i) {\n lengths[i] = listsToMerge.get(i).size();\n }\n\n Queue<QuizAttempt> pq = new PriorityQueue<>(Comparator.comparing(QuizAttempt::getTakenAt));\n\n for (int i = 0; i < numberOfLists; ++i) {\n if (positions[i] < lengths[i]) {\n pq.offer(listsToMerge.get(i).get(0));\n positions[i]++;\n }\n }\n\n int idx = 0;\n while (!pq.isEmpty()) {\n QuizAttempt attempt = pq.poll();\n LocalDateTime takenAt = attempt.getTakenAt();\n double scoreInPercentage = attempt.getScore().getScoreInPercentage();\n listFromMerging.add(new DataPoint(takenAt, scoreInPercentage));\n\n if (positions[idx] < lengths[idx]) {\n // process the idx-th list\n pq.offer(listsToMerge.get(idx).get(positions[idx]));\n positions[idx]++;\n }\n\n idx++;\n }\n\n return listFromMerging;\n }",
"public static List<String> listDiffWithExclusion(@Nonnull List<String> existing, @Nonnull List<String> updated,\n @Nonnull List<Pattern> exclusions) {\n existing.removeAll(updated);\n\n return existing.stream()\n .filter(s -> exclusions.stream().noneMatch(p -> p.matcher(s).find()))\n .collect(Collectors.toList());\n }",
"set.addAll(Arrays.asList(a));",
"private ArrayList<Integer> remove_duplicates(ArrayList<Integer> l) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n for (int i=0; i< l.size(); i++) {\n if (!(in(l.get(i), res))) {\n res.add(l.get(i));\n }\n }\n return res;\n }",
"public static ArrayList<Integer> union(ArrayList<Integer> list1,\r\n\t\t\tArrayList<Integer> list2) {\r\n\r\n\t\tArrayList<Integer> union = new ArrayList<>();\r\n\t\t//adding elements from first array list to the new array list\r\n\t\tfor (int i = 0; i < list1.size(); i++) {\r\n\t\t\tunion.add(list1.get(i));\r\n\t\t}\r\n\t\t\r\n\t\t//adding elements from the second array list to the new array list\r\n\t\tfor (int j = 0; j < list2.size(); j++) {\r\n\t\t\tunion.add(list2.get(j));\r\n\t\t}\r\n\r\n\t\t//returning combined list\r\n\t\treturn union;\r\n\t}",
"public ArrayList<Integer> intersect(final List<Integer> a, final List<Integer> b) {\n\t ArrayList<Integer> res = new ArrayList<>();\n\t \n\t int i1 = 0, i2 = 0;\n\t while (i1 < a.size() && i2 < b.size()) {\n\t //System.out.println(i1 + \" \" + i2 + \" \" + a.get(i1) + \" \" + b.get(i2));\n\t if (a.get(i1).equals(b.get(i2))) {\n\t res.add(a.get(i1));\n\t i1++;\n\t i2++;\n\t } else if (a.get(i1) < b.get(i2)) {\n\t i1++;\n\t } else if (a.get(i1) > b.get(i2)) {\n\t i2++;\n\t }\n\t }\n\t \n\t return res;\n\t}",
"public List<String> addAllDependancies(List<String> ids){\r\n\t\t// To preserve the original order, we start by adding all of the\r\n\t\t// columns to the set.\r\n\t\tLinkedHashSet<String> result = new LinkedHashSet<String>(ids);\r\n\t\tHashSet<String> visted = new HashSet<String>();\r\n\t\t// Process each column\r\n\t\tfor(String id: ids){\r\n\t\t\tgetColumnDependanciesRecursive(result, visted, id);\t\t\t\r\n\t\t}\r\n\t\t// Convert back to a list\t\t\r\n\t\treturn new ArrayList<String>(result);\r\n\t}",
"public Collection<String> getIncludedCarriers();",
"public String[] getIncludes()\n {\n return m_includes;\n }",
"ArrayList<Edge> mergeHelp(ArrayList<Edge> l) {\n if (l.size() <= 1) {\n return l;\n }\n ArrayList<Edge> l1 = new ArrayList<Edge>();\n ArrayList<Edge> l2 = new ArrayList<Edge>();\n for (int i = 0; i < l.size() / 2; i++) {\n l1.add(l.get(i));\n }\n for (int i = l.size() / 2; i < l.size(); i++) {\n l2.add(l.get(i));\n }\n l1 = mergeHelp(l1);\n l2 = mergeHelp(l2);\n return merge(l1, l2);\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tprivate static List<Object> mergeResult(List<Object> list1, List<Object> list2) {\n\t\tList<Object> result = new ArrayList<Object>();\n\t\tfor (int i = 0; i < list1.size(); i++) {\n\t\t\tfor (int j = 0; j < list2.size(); j++) {\n\t\t\t\tif (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) == Integer\n\t\t\t\t\t\t.parseInt(((Map) list2.get(j)).get(MongoDBConstants.DOCUMENT_ID).toString())) {\n\t\t\t\t\tMap data = new HashMap();\n\t\t\t\t\tint hour = (Integer.parseInt(((Map) list1.get(i)).get(MongoDBConstants.DOCUMENT_ID).toString()) + 8) % 24;\n\t\t\t\t\tdata.put(MongoDBConstants.DOCUMENT_ID, hour + \"\");\n\t\t\t\t\tdata.put(\"value\", Integer.parseInt(((Map) list1.get(i)).get(\"value\").toString())\n\t\t\t\t\t\t\t+ Integer.parseInt(((Map) list2.get(j)).get(\"value\").toString()));\n\t\t\t\t\tresult.add(data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }",
"public static List<Integer> getMergedLLEfficient(List<List<Integer>> list){\n if(list == null || list.size() == 0)\n return null;\n\n if(list.size() == 1){\n return list.get(0);\n }\n\n int k = list.size();\n\n List<Integer> output = mergeEfficient(list,k-1);\n return output;\n }",
"public static void main(String[] args) \r\n\t{\n\r\n\t\tint[] A = {1,5,8,7,3,6};\r\n\t\tint[] B = {2,9,4};\r\n\t\t\r\n\t\tList<Integer> list = Arrays.stream(A).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> list2 = Arrays.stream(B).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> combine = new ArrayList<>();\r\n\t\tcombine.addAll(list);\r\n\t\tcombine.addAll(list2);\r\n\t\t\r\n\t\tSystem.out.println(list);\r\n\t\tSystem.out.println(combine);\r\n\t\tCollections.sort(combine);\r\n\t\tSystem.out.println(combine);\r\n\t\r\n\t\tList<Integer> extractA = combine.subList(0, A.length);\r\n\t\tList<Integer> extractB = combine.subList(A.length, A.length+B.length);\r\n\t\t\r\n\t\tSystem.out.println(extractA);\r\n\t\tSystem.out.println(extractB);\r\n\t\t\r\n// second approch for integer to array\t\t\r\n\t\tint[] ints = {1, 2, 3};\r\n\t\tList<Integer> intList = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < ints.length; i++) \r\n\t\t{\r\n\t\t\t intList.add(ints[i]);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(intList);\r\n\t\t\r\n\t}",
"public int[] intersection(int[] nums1, int[] nums2) {\n \n HashSet<Integer> set = new HashSet<>();\n ArrayList<Integer> inter = new ArrayList<>();\n if(nums1.length > nums2.length)\n {\n for(int i = 0; i < nums1.length ;i ++)\n set.add(nums1[i]);\n\n for(int i = 0; i < nums2.length ;i ++)\n if(set.contains(nums2[i])&& !inter.contains(nums2[i]))\n inter.add(nums2[i]);\n }\n else {\n for(int i = 0; i < nums2.length ;i ++)\n set.add(nums2[i]);\n\n for(int i = 0; i < nums1.length ;i ++)\n if(set.contains(nums1[i]) && !inter.contains(nums1[i]))\n inter.add(nums1[i]);\n }\n\n int [] arr = new int[inter.size()];\n for(int i = 0; i < arr.length ;i ++)\n arr[i] = inter.get(i);\n return arr;\n\n }",
"public List<IncludeClasses> getIncludes()\n {\n return includes;\n }",
"private List<Integer> merge(List<Integer> firstList, List<Integer> secondList) {\n List<Integer> resultList = new ArrayList<>();\n\n if (firstList.size() == 1 && secondList.size() == 1) {\n resultList.add(Math.min(firstList.get(0), secondList.get(0)));\n resultList.add(Math.max(firstList.get(0), secondList.get(0)));\n return resultList;\n }\n\n int firstIndex = 0;\n int secondIndex = 0;\n\n while (firstIndex < firstList.size() && secondIndex < secondList.size()) {\n if (firstList.get(firstIndex) < secondList.get(secondIndex)) {\n resultList.add(firstList.get(firstIndex));\n firstIndex++;\n } else {\n resultList.add(secondList.get(secondIndex));\n secondIndex++;\n }\n }\n\n if (firstIndex < firstList.size()) {\n for (int i = firstIndex; i < firstList.size(); i++) {\n resultList.add(firstList.get(i));\n }\n }\n\n if (secondIndex < secondList.size()) {\n for (int i = secondIndex; i < secondList.size(); i++) {\n resultList.add(secondList.get(i));\n }\n }\n\n return resultList;\n }",
"public ArrayList<Integer> intersect(\n final List<Integer> A, final List<Integer> B) {\n ArrayList<Integer> res = new ArrayList<Integer>();\n int M = A.size();\n int N = B.size();\n if (M == 0 || N == 0) {\n return res;\n }\n int i = 0;\n int j = 0;\n while (i < M && j < N) {\n int a = A.get(i);\n int b = B.get(j);\n if (a == b) {\n res.add(a);\n i++;\n j++;\n } else if (a < b) {\n i++;\n } else {// a > b\n j++;\n }\n }\n return res;\n }",
"public void registerExcluded(List<String> excludedFiles) {\n excluded.addAll(excludedFiles);\n }",
"public static void main(String[] args) {\n\t\tInteger [] a= {1,4,7, 9, 2};\n\t\tInteger [] b={1,7,3,4,5};\n\t\tArrayList <Integer> c=new ArrayList<Integer>();\n\t\tfor(int i=0;i<a.length;i++)\n\t\t{\n\t\t\tfor(int j=0;j<b.length;j++)\n\t\t\t{\n\t\t\t\tif(a[i]==b[j])\n\t\t\t\t{\n\t\t\t\t\tif(!c.contains(a[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\tc.add(a[i]);\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\tSystem.out.println(\"First Method : \"+c);\n\t\t//second method\n\t\tList<Integer> arr1=Arrays.asList(a);\n\t\tList<Integer> arr2=Arrays.asList(b);\n\t\tHashSet<Integer> aset=new HashSet<>(arr1);\n\t\taset.retainAll(arr2);\n\t\tSystem.out.println(\"Second Method: \"+aset);\n\t\t\n\t}",
"private List<RubyModule> gatherModules(RubyModule baseModule) {\n // build a list of all modules to consider for inclusion\n List<RubyModule> modulesToInclude = new ArrayList<RubyModule>();\n while (baseModule != null) {\n modulesToInclude.add(baseModule);\n baseModule = baseModule.getSuperClass();\n }\n \n return modulesToInclude;\n }",
"Node[] merge(List<Node> nodeList1, List<Node> nodeList2, List<Node> exhaustedNodes);",
"@Updatable\n public List<String> getInclusionPrefixes() {\n if (inclusionPrefixes == null) {\n inclusionPrefixes = new ArrayList<>();\n }\n\n return inclusionPrefixes;\n }",
"public static <T extends Comparable<? super T>>\n void intersection(SLL<T> list1, SLL<T> list2, SLL<T> result) {\n\n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n\n T itemlist1=null, itemlist2=null;\n\n // get first item in each list\n if ( iterlist1 != null && iterlist2 != null ) {\n itemlist1 = iterlist1.info;\n itemlist2 = iterlist2.info;\n }\n\n while ( itemlist1 != null && itemlist2 != null ) {\n int compareResult = itemlist1.compareTo(itemlist2);\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //append to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n }\n }",
"protected void mergeWith(ExceptionHandler eh) {\n BasicBlock succ = eh.getEntry();\n if (this.start_states[succ.getID()] == null) {\n if (TRACE_INTRA) out.println(succ+\" not yet visited.\");\n this.start_states[succ.getID()] = this.s.copy();\n for (Iterator i = rf.iterator(); i.hasNext(); ) {\n Register r = (Register) i.next();\n if (r.isTemp())\n this.start_states[succ.getID()].registers[r.getNumber()] = null;\n }\n this.change = true;\n } else {\n //if (TRACE_INTRA) out.println(\"merging out set of \"+bb+\" \"+Strings.hex8(this.s.hashCode())+\" into in set of ex handler \"+succ+\" \"+Strings.hex8(this.start_states[succ.getID()].hashCode()));\n if (TRACE_INTRA) out.println(\"merging out set of \"+bb+\" into in set of ex handler \"+succ);\n for (Iterator i = rf.iterator(); i.hasNext(); ) {\n Register r = (Register) i.next();\n if (r.isTemp()) continue;\n if (this.start_states[succ.getID()].merge(r.getNumber(), this.s.registers[r.getNumber()]))\n this.change = true;\n }\n if (TRACE_INTRA && this.change) out.println(succ+\" in set changed\");\n }\n }",
"private String[] mergeStringLists(String[] stringlist1, String[] stringlist2) {\n if (stringlist1==null || stringlist1.length==0) return stringlist2;\n else if (stringlist2==null || stringlist2.length==0) return stringlist1;\n else {\n ArrayList<String> result=new ArrayList<String>(stringlist1.length);\n for (String e:stringlist1) result.add(e.trim());\n for (String e:stringlist2) if (!result.contains(e.trim())) result.add(e.trim());\n String[] resultlist=new String[result.size()];\n resultlist=result.toArray(resultlist);\n return resultlist;\n }\n }",
"public List<T> inorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n inorderHelper(list, root);\n }\n return list;\n }"
] | [
"0.59240395",
"0.5861367",
"0.568414",
"0.563436",
"0.56310487",
"0.56180835",
"0.5483344",
"0.5454408",
"0.54303694",
"0.5413189",
"0.53752595",
"0.53637344",
"0.5278764",
"0.52754456",
"0.5250816",
"0.5244519",
"0.52427596",
"0.52382475",
"0.51736474",
"0.51736474",
"0.51689726",
"0.5087464",
"0.5079788",
"0.5075561",
"0.5072321",
"0.5042171",
"0.50386035",
"0.5034604",
"0.5031361",
"0.50182927",
"0.50107557",
"0.5004322",
"0.49953267",
"0.498462",
"0.49787202",
"0.49719197",
"0.49568927",
"0.49521503",
"0.49429074",
"0.49401867",
"0.49328622",
"0.49302498",
"0.49284494",
"0.49132124",
"0.48845786",
"0.48655242",
"0.48650384",
"0.48644078",
"0.4856127",
"0.48547325",
"0.48318392",
"0.48216403",
"0.48155698",
"0.4795068",
"0.47869897",
"0.4784335",
"0.4769775",
"0.47657093",
"0.4764913",
"0.4764188",
"0.4763553",
"0.47610918",
"0.47587988",
"0.4749192",
"0.4746042",
"0.47440776",
"0.47423452",
"0.4742061",
"0.4736441",
"0.4735475",
"0.47240445",
"0.47224984",
"0.47216722",
"0.47139186",
"0.47132793",
"0.47079208",
"0.470747",
"0.47055498",
"0.4705368",
"0.47006795",
"0.46958816",
"0.469499",
"0.46945056",
"0.46868807",
"0.4676388",
"0.4676232",
"0.46710876",
"0.46706435",
"0.46641928",
"0.4657957",
"0.46575564",
"0.46567795",
"0.46487057",
"0.46431524",
"0.4642119",
"0.46393287",
"0.46280468",
"0.4602913",
"0.4597507",
"0.45918",
"0.4587599"
] | 0.0 | -1 |
Makes the MBean call to export the document packed in a SOAP message. | public int configTLS( String url ) {
if (tlsIsConfigured) {
log.debug("Already configured! Omit call of HttpCfgService!");
return CFG_RSP_ALREADY;
}
try {
int rsp = ((Integer) server.invoke(xdsHttpCfgServiceName,
"configTLS",
new Object[] { url },
new String[] { String.class.getName() } ) ).intValue();
if ( rsp == CFG_RSP_OK || rsp == CFG_RSP_ALREADY ) {
tlsIsConfigured = true;
}
log.debug("configTLS of HttpCfgService return (1..OK, 2..already configured, 0..ignored, -1..error):"+rsp);
return rsp;
} catch ( Exception x ) {
log.error( "Exception occured in configTLS: "+x.getMessage(), x );
return CFG_RSP_ERROR;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void writeSoapMessage(SOAPMessage message);",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.DoControl param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.DoControl.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonth param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForMonth.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public void generarDoc(){\n generarDocP();\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.DirectCharge param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.DirectCharge.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private SOAPMessage buildMessage(Document doc) throws SOAPException {\n MessageFactory mfact = MessageFactory.newInstance();\n SOAPMessage smsg = mfact.createMessage();\n SOAPPart prt = smsg.getSOAPPart();\n SOAPEnvelope env = prt.getEnvelope();\n SOAPBody bdy = env.getBody();\n bdy.addDocument(doc);\n smsg.saveChanges();\n\n return smsg;\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.Hello param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(sample.ws.HelloWorldWSStub.Hello.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.InitializeHelloWorldWS param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(sample.ws.HelloWorldWSStub.InitializeHelloWorldWS.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDay param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.TerminalDownloadQueryForDay.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetDictionaryPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private void marshallDocument(Virtualnetworkmanager root, PrintStream outputFile) throws JAXBException, SAXException {\n\t\t\n\t\t// Creating the JAXB context to perform a validation \n\t\tJAXBContext jc;\n\t\t// Creating an instance of the XML Schema \n\t\tSchema schema;\n\t\t\t\t\n\t\ttry {\n\t\t\tjc = JAXBContext.newInstance(PACKAGE);\n\t\t\tschema = SchemaFactory.newInstance(W3C_XML_SCHEMA_NS_URI).newSchema(new File(XSD_NAME));\n\t\t}\n\t\tcatch(IllegalArgumentException e) {\n\t\t\tSystem.err.println(\"Error! No implementation of the schema language is available\");\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\tSystem.err.println(\"Error! The instance of the schema or the file of the schema is not well created!\\n\");\n\t\t\tthrow new SAXException(\"The schema file is null!\");\n\t\t}\n\t\t\n\t\t// Creating the XML document \t\t\n\t\tMarshaller m = jc.createMarshaller();\n\t\tm.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\t\tm.setProperty(Marshaller.JAXB_SCHEMA_LOCATION, XSD_LOCATION+\" \"+XSD_NAME);\n\t\tm.setSchema(schema);\n\t\tm.marshal(root, outputFile);\n\t\t\n\t}",
"private ProduceDOCXResult(Model model,PackageData data, String input, String output, String dotx, String config) {\n super(model, data);\n this._input = input;\n this._output = output;\n this._dotx = dotx;\n this._config = config;\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.HelloAuthenticated param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(sample.ws.HelloWorldWSStub.HelloAuthenticated.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.AddFilesToUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.AddFilesToUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleBookPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectSrvInfo.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetEntrancePage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleRecordPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.DirectQuery.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public String write(Document serviceDoc) {\r\n\t\ttry {\r\n\t\t\tTransformerFactory transformerFactory = TransformerFactory\r\n\t\t\t\t\t.newInstance();\r\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\tStringWriter sw = new StringWriter();\r\n\t\t\tStreamResult xmlResult = new StreamResult(sw);\r\n\t\t\tDOMSource source = new DOMSource(serviceDoc);\r\n\t\t\ttransformer.transform(source, xmlResult);\r\n\t\t\tSystem.out.println(\"Writing XML document for Help When Outdoor\");\r\n\t\t\treturn sw.toString();\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public abstract void writeTo(OutputStream out)\n throws SOAPException, IOException;",
"public void dump( Result out ) throws JAXBException;",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPage param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleAlarmInfoPage.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public void addOutDocument(com.hps.july.persistence.Document arg0) throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n ejbRef().addOutDocument(arg0);\n }",
"public ExportaDatosWSBean() {\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.QqCharge param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.QqCharge.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCard param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.GetDownLoadCard.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public void exportSuccess(BeanXporterEvent e);",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlements param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlements.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.GetDirectAreaInfo.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public void export(OutputStream output) throws IOException {\n\t\tif (!documentPrepared) {\n\t\t\tprepareDocument();\n\t\t}\n\t\tif ((!fileAttached) && (attachZUGFeRDHeaders)) {\n\t\t\tthrow new IOException(\n\t\t\t\t\t\"File must be attached (usually with setTransaction) before perfoming this operation\");\n\t\t}\n\t\tdoc.save(output);\n\t\tif (!disableAutoClose) {\n\t\t\tclose();\n\t\t}\n\t}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderIDForPayment param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderIDForPayment.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.RemoveFilesFromUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.RemoveFilesFromUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.GetClients param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.GetClients.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrder.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"@WebService(targetNamespace = \"http://soap.spring.com/ws/poverenik\", name = \"Poverenik\")\n@SOAPBinding(style = SOAPBinding.Style.RPC)\npublic interface Poverenik {\n\n @WebMethod\n @WebResult(name = \"return\", targetNamespace = \"http://soap.spring.com/ws/poverenik\", partName = \"return\")\n public String sayHi(\n @WebParam(partName = \"text\", name = \"text\")\n String text\n );\n \n @WebMethod\n @WebResult(name = \"return\", targetNamespace = \"http://soap.spring.com/ws/poverenik\", partName = \"return\")\n public String saveExplanation(\n @WebParam(partName = \"xml\", name = \"xml\")\n String xml\n );\n \n @WebMethod\n @WebResult(name = \"return\", targetNamespace = \"http://soap.spring.com/ws/poverenik\", partName = \"return\")\n public String saveReport(\n @WebParam(partName = \"izvestaj\", name = \"izvestaj\")\n String izvestaj\n );\n}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(org.pahospital.www.radiologyservice.RadiologyServiceStub.RadiologyOrderID.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheck param, boolean optimizeContent)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(sample.ws.HelloWorldWSStub.HelloAuthenticatedWithEntitlementPrecheck.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public abstract OMElement serialize();",
"@WebService(name = \"DocumentValidationSchemaService\", targetNamespace = \"http://schema.validation.doc.jaxws.invoice.samples.integ.softfly.pl/\")\n@XmlSeeAlso({\n pl.softfly.integ.doc.entity.ObjectFactory.class,\n pl.softfly.integ.endpoint.entity.ObjectFactory.class,\n pl.softfly.integ.entity.ObjectFactory.class,\n pl.softfly.integ.samples.invoice.jaxws.doc.validation.schema.ObjectFactory.class,\n pl.softfly.integ.shipment.entity.ObjectFactory.class\n})\npublic interface DocumentValidationSchemaService {\n\n\n /**\n * @param arg0\n * @return returns pl.softfly.integ.doc.entity.DocumentHeader\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"validate\", targetNamespace = \"http://schema.validation.doc.jaxws.invoice.samples.integ.softfly.pl/\", className = \"pl.softfly.integ.samples.invoice.jaxws.doc.validation.schema.Validate\")\n @ResponseWrapper(localName = \"validateResponse\", targetNamespace = \"http://schema.validation.doc.jaxws.invoice.samples.integ.softfly.pl/\", className = \"pl.softfly.integ.samples.invoice.jaxws.doc.validation.schema.ValidateResponse\")\n public DocumentHeader validate(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n DocumentHeader arg0);\n\n}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.YPrint param, boolean optimizeContent,\r\n javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.YPrint.MY_QNAME, factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"@WebService(targetNamespace = \"http://example.org/signature\", name = \"SignatureDocumentLiteral\")\n@XmlSeeAlso({ ObjectFactory.class })\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface SignatureDocumentLiteral\n{\n\n @WebResult(name = \"SignatureOut\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOut\")\n @Action(input = \"http://example.org/action/SignatureInAlternate\", output = \"http://example.org/action/SignatureOutAlternate\")\n @WebMethod(operationName = \"Sign2\", action = \"http://example.org/action/SignatureInAlternate\")\n public java.lang.String sign2(@WebParam(partName = \"SignatureIn\", name = \"SignatureIn\", targetNamespace = \"http://example.org/signature\")\n java.lang.String signatureIn);\n\n @WebResult(name = \"SignatureOut\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOut\")\n @Action(input = \"http://example.org/action/SignatureInEmpty\", output = \"http://example.org/action/SignatureOutEmpty\")\n @WebMethod(operationName = \"Sign3\", action = \"http://example.org/action/SignatureInEmpty\")\n public java.lang.String sign3();\n\n @WebResult(name = \"SignatureOut\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOut\")\n @Action(input = \"http://example.org/action/SignatureInAlternateEmpty\", output = \"http://example.org/action/SignatureOutAlternateEmpty\")\n @WebMethod(operationName = \"Sign4\", action = \"http://example.org/action/SignatureInAlternateEmpty\")\n public java.lang.String sign4();\n\n @WebResult(name = \"SignatureOut\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOut\")\n @Action(input = \"http://example.org/action/SignatureInMultipart\", output = \"http://example.org/action/SignatureOutMultipart\")\n @WebMethod(operationName = \"Sign6\", action = \"http://example.org/action/SignatureInMultipart\")\n public java.lang.String sign6(@WebParam(partName = \"parameters\", name = \"SignatureInMultipartMessage\", targetNamespace = \"http://example.org/signature\")\n SignatureInMultipartMessage parameters);\n\n @WebResult(name = \"SignatureOut\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOut\")\n @Action(input = \"http://example.org/action/SignatureIn\", output = \"http://example.org/action/SignatureOut\")\n @WebMethod(operationName = \"Sign1\", action = \"http://example.org/action/SignatureIn\")\n public java.lang.String sign1(@WebParam(partName = \"SignatureIn\", name = \"SignatureIn\", targetNamespace = \"http://example.org/signature\")\n java.lang.String signatureIn);\n\n @Action(input = \"http://example.org/action/SignatureEmptyPartIn\", output = \"http://example.org/action/SignatureEmptyPartOut\")\n @WebMethod(operationName = \"Sign5\", action = \"http://example.org/action/SignatureEmptyPartIn\")\n public void sign5();\n\n @WebResult(name = \"SignatureOutHeaderMember\", targetNamespace = \"http://example.org/signature\", partName = \"SignatureOutHeaderMember\")\n @Action(input = \"http://example.org/action/SignatureHeaderIn\", output = \"http://example.org/action/SignatureHeaderReply\", fault = { @FaultAction(className = SignatureDocumentLiteralSign7SignatureHeaderFaultFaultMessage.class, value = \"http://example.org/action/SignatureHeaderFault\") })\n @WebMethod(operationName = \"Sign7\", action = \"http://example.org/action/SignatureHeaderIn\")\n public java.lang.String sign7(@WebParam(partName = \"SignatureInHeaderMember\", name = \"SignatureInHeaderMember\", targetNamespace = \"http://example.org/signature\")\n java.lang.String signatureInHeaderMember,\n @WebParam(partName = \"HeaderText\", mode = WebParam.Mode.INOUT, name = \"SignatureOutHeader\", targetNamespace = \"http://example.org/signature\", header = true)\n javax.xml.ws.Holder<java.lang.String> headerText) throws SignatureDocumentLiteralSign7SignatureHeaderFaultFaultMessage;\n\n}",
"@Test\n public void testExportServiceWithJaxWs() {\n \t//create a mock jaxws ws\n \tHelloBob hello = mock(HelloBob.class);\n \t\n \t //wait for the service to be available.\n waitForIt(100);\n \n ExporterService exporter = getExporterService(); //get the service\n \n //Register a mock LogService\n ServiceRegistration regLog = rose.registerService(hello,HelloBob.class);\n \n //export the logService \n ExportRegistration xreg = exporter.exportService(regLog.getReference(), null);\n \n //check that xreg is not null\n assertNotNull(xreg); \n \n //check that there is no exception\n assertNull(xreg.getException());\n \n //check that the export reference is not null\n assertNotNull(xreg.getExportReference());\n \n //check that the ServiceReference is equal to the logService one\n assertEquals(regLog.getReference(), xreg.getExportReference().getExportedService());\n \n //Check that the ExportReference has been published\n ExportReference xref = rose.getServiceObject(ExportReference.class);\n \n //Check that the published ExportReference is equal to the ExportRegistration one\n assertEquals(xreg.getExportReference(), xref);\n \n //get a proxy\n HelloBob proxy = getProxy(xreg,HelloBob.class);\n \n //check proxy != null\n assertNotNull(proxy);\n \n //check proxy calls\n for (int i = 1; i <= MAX_MOCK; i++) {\n proxy.hello(); //call the proxy\n verify(hello,times(i)).hello(); //verify the mock\n }\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.TerminalReturnCard.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"public interface SendOutService {\n\n String BEAN_NAME = \"SendOutService\";\n\n /**\n * Returns all the sendInfo nodes associated with given document.\n *\n * @param document document NodeRef\n * @return list of sendInfo nodes associated with given document\n */\n List<SendInfo> getDocumentSendInfos(NodeRef document);\n\n /**\n * Update searchable send info properties according to document's sendInfo child nodes\n *\n * @param document document NodeRef\n */\n void updateSearchableSendInfo(NodeRef document);\n\n /**\n * Build searchable send info data from document's sendInfo child nodes\n *\n * @param document document NodeRef\n * @return Map with documents properties populated with document's sendInfo values\n */\n Map<QName, Serializable> buildSearchableSendInfo(NodeRef document);\n\n /**\n * Sends out document.\n * Inspects all the given recipients and based on send mode sends out the document through DVK to those who support it (based on addressbook) and through email to others.\n * Registers sendInfo child entries under document and checks if given document is a reply outgoing letter and updates originating document info if needed.\n *\n * @param document subject document for sending out\n * @param names list of recipient names\n * @param emails list of recipient email addresses\n * @param modes list of recipient send modes\n * @param idCodes TODO\n * @param fromEmail from email address\n * @param subject mail subject\n * @param content mail content text\n * @param zipIt if attachments should be zipped into single file, or sent as separate files\n * @param fileNodeRefs list of file node refs as strings to match those files which should be sent out as attachments from given document\n * @return true\n */\n boolean sendOut(NodeRef document, List<String> names, List<String> emails, List<String> modes, List<String> idCodes, List<String> encryptionIdCodes, List<X509Certificate> allCertificates, \n \t\tString fromEmail, String subject, String content, List<NodeRef> fileRefs, boolean zipIt);\n\n /** @return {@code List<Pair<recipientName, recipientRegistrationNr>> } */\n List<Pair<String, String>> forward(NodeRef document, List<String> names, List<String> emails, List<String> modes, String fromEmail, String content, List<NodeRef> fileRefs);\n\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props);\n\n /**\n * If updateSearchableSendInfo is false then updateSearchableSendInfo() must manually be called later\n */\n NodeRef addSendinfo(NodeRef document, Map<QName, Serializable> props, boolean updateSearchableSendInfo);\n\n List<ContentToSend> prepareContents(NodeRef document, List<NodeRef> fileRefs, boolean zipIt) throws Exception;\n \n List<ContentToSend> prepareContents(List<EmailAttachment> attachments);\n\n void addSapSendInfo(Node document, String dvkId);\n\n boolean hasDocumentSendInfos(NodeRef document);\n\n Long sendForInformation(List<String> authorityIds, Node docNode, String emailTemplate, String subject, String content);\n\n Date getEarliestSendInfoDate(NodeRef docRef);\n\n}",
"public void exportObject(Target paramTarget) throws RemoteException {\n/* 147 */ this.ep.exportObject(paramTarget);\n/* */ }",
"@WebService(name = \"publish_portype\", targetNamespace = \"http://middleware.intra.bc/api/services/pubsub/push\")\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n@XmlSeeAlso({\n bc.intra.middleware.api.schema.fault.ObjectFactory.class,\n bc.intra.middleware.api.schema.pubsub.ObjectFactory.class,\n bc.intra.middleware.api.services.pubsub.push.ObjectFactory.class\n})\npublic interface PublishPortype {\n\n\n /**\n * \n * @param parameters\n * @return\n * returns bc.intra.middleware.api.services.pubsub.push.PublishResponseType\n * @throws PublishFaultMessage\n */\n @WebMethod(operationName = \"Publish\", action = \"http://www.proximus.com/middleware/services/pubsub/Publish\")\n @WebResult(name = \"PublishResponse\", targetNamespace = \"http://middleware.intra.bc/api/services/pubsub/push\", partName = \"parameters\")\n public PublishResponseType publish(\n @WebParam(name = \"PublishRequest\", targetNamespace = \"http://middleware.intra.bc/api/services/pubsub/push\", partName = \"parameters\")\n PublishRequestType parameters)\n throws PublishFaultMessage\n ;\n\n}",
"@WebService(name = \"ProductoService\", targetNamespace = \"http://ws.jwsclase2_2_1/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface ProductoService {\n\n\n /**\n * \n * @return\n * returns jwsclase2_2_2.wsresponse.Producto\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getProducto\", targetNamespace = \"http://ws.jwsclase2_2_1/\", className = \"jwsclase2_2_2.wsresponse.GetProducto\")\n @ResponseWrapper(localName = \"getProductoResponse\", targetNamespace = \"http://ws.jwsclase2_2_1/\", className = \"jwsclase2_2_2.wsresponse.GetProductoResponse\")\n @Action(input = \"http://ws.jwsclase2_2_1/ProductoService/getProductoRequest\", output = \"http://ws.jwsclase2_2_1/ProductoService/getProductoResponse\")\n public Producto getProducto();\n\n}",
"public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}",
"public void exportXML() throws Exception{\n\t\t \n\t\t try {\n\n\t // create DOMSource for source XML document\n\t\t Source xmlSource = new DOMSource(convertStringToDocument(iet.editorPane.getText()));\n\t\t \n\t\t JFileChooser c = new JFileChooser();\n\t\t\t\t\n\t\t\t\tint rVal = c.showSaveDialog(null);\n\t\t\t\tString name = c.getSelectedFile().getAbsolutePath() + \".xml\";\n\t \n\t File f = new File(name);\n\t \n\t if (rVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t // create StreamResult for transformation result\n\t\t Result result = new StreamResult(new FileOutputStream(f));\n\n\t\t // create TransformerFactory\n\t\t TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n\t\t // create Transformer for transformation\n\t\t Transformer transformer = transformerFactory.newTransformer();\n\t\t transformer.setOutputProperty(\"indent\", \"yes\");\n\n\t\t // transform and deliver content to client\n\t\t transformer.transform(xmlSource, result);\n\t\t \n\t\t }\n\t\t }\n\t\t // handle exception creating TransformerFactory\n\t\t catch (TransformerFactoryConfigurationError factoryError) {\n\t\t System.err.println(\"Error creating \" + \"TransformerFactory\");\n\t\t factoryError.printStackTrace();\n\t\t } // end catch 1\n\t\t \t catch (TransformerException transformerError) {\n\t\t System.err.println(\"Error transforming document\");\n\t\t transformerError.printStackTrace();\n\t\t } //end catch 2 \n\t\t \t catch (IOException ioException) {\n\t\t ioException.printStackTrace();\n\t\t } // end catch 3\n\t\t \n\t }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.AddUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.AddUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }",
"Document toXml() throws ParserConfigurationException, TransformerException, IOException;",
"public void execute() throws XDocletException {\n\t\tsetPublicId(DD_PUBLICID_20);\n\t\tsetSystemId(DD_SYSTEMID_20);\n\n\t\t// will not work .... dumper.xdt does not exist\n\t\t/*\n\t\tsetTemplateURL(getClass().getResource(\"resources/dumper.xdt\"));\n\t\tsetDestinationFile(\"dump\");\n\t\tSystem.out.println(\"Generating dump\");\n\t\tstartProcess();\n\t\t*/\n\n\n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_EJB_JAR_XML_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"ejb-jar.xml\");\n\t\tSystem.out.println(\"Generating ejb-jar.xml\");\n\t\tstartProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_BND_FILE_NAME);\n startProcess();\n\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_FILE_NAME);\n startProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_PME_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_EXT_PME_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_EXT_PME_FILE_NAME);\n startProcess();\n\n /*\n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_ACCESS_BEAN_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_ACCESS_FILE_NAME);\n System.out.println(\"Generating \" + WEBSPHERE_DD_ACCESS_FILE_NAME);\n startProcess();\n */\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_MAPXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/Map.mapxmi\");\n\t\tstartProcess();\n \n setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_DBXMI_TEMPLATE_FILE));\n setDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n System.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \".dbxmi\");\n startProcess();\n \n\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_SCHXMI_TEMPLATE_FILE));\n\t\tsetDestinationFile(\"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tSystem.out.println(\"Generating backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql.schxmi\");\n\t\tstartProcess();\n\t\t\n\t\tCollection classes = getXJavaDoc().getSourceClasses();\n\t\tfor (ClassIterator i = XCollections.classIterator(classes); i.hasNext();) {\n\t\t\tXClass clazz = i.next();\n\t\t\t//System.out.print(\">> \" + clazz.getName());\n\t\t\t// check tag ejb:persistence + sub tag table-name\n\t\t\tXTag tag = clazz.getDoc().getTag(\"ejb:persistence\");\n\t\t\tif (tag != null) {\n\t\t\t\tString tableName = tag.getAttributeValue(\"table-name\");\n\t\t\t\t//System.out.println(\"ejb:persistence table-name = '\" + tableName + \"'\");\n\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\tSystem.out.println(\"Generating \" + destinationFileName);\n\t\t\t\t\n\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_TBLXMI_TEMPLATE_FILE));\n\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\tsetHavingClassTag(\"ejb:persistence\");\n\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\tstartProcess();\n\t\t\t}\n\t\t\t// Now, check for relationships \n\t\t\tfor (Iterator methods = clazz.getMethods().iterator(); methods.hasNext();) {\n\t\t\t\tXMethod method = (XMethod)methods.next();\n\t\t\t\tif (method.getDoc().hasTag(\"websphere:relation\")) {\n\t\t\t\t\tString tableName = method.getDoc().getTagAttributeValue(\"websphere:relation\",\"table-name\");\n\t\t\t\t\tsetTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_RELATIONSHIP_TBLXMI_TEMPLATE_FILE));\n\t\t\t\t\tString destinationFileName = \"backends/\" + getDb() + \"/\" + getSchema() + \"_\" + getUser() + \"_sql_\" + tableName + \".tblxmi\";\n\t\t\t\t\tsetDestinationFile(destinationFileName);\n\t\t\t\t\tsetCurrentClass(clazz);\n\t\t\t\t\tsetCurrentMethod(method);\n\t\t\t\t\tSystem.out.println(\"\\tGenerating M-M Relationship table: \" + destinationFileName);\n\t\t\t\t\tstartProcess();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\t\n\n\t\t}\n\n/*\n if (atLeastOneCmpEntityBeanExists()) {\n setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE));\n setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME);\n startProcess();\n }\n*/\n }",
"@WebService(targetNamespace = \"http://www.pm.company.com/service/Pawel/\", name = \"Pawel\")\n@XmlSeeAlso({com.company.pm.schema.pawelschema.ObjectFactory.class})\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface Pawel {\n\n @WebResult(name = \"firstOperationResponse\", targetNamespace = \"http://www.pm.company.com/schema/PawelSchema\", partName = \"firstOperationResponse\")\n @WebMethod(operationName = \"FirstOperation\", action = \"http://www.pm.company.com/service/Pawel/FirstOperation\")\n public com.company.pm.schema.pawelschema.FirstOperationResponseType firstOperation(\n @WebParam(partName = \"firstOperationRequest\", name = \"firstOperationRequest\", targetNamespace = \"http://www.pm.company.com/schema/PawelSchema\")\n com.company.pm.schema.pawelschema.FirstOperationRequestType firstOperationRequest\n );\n}",
"@WebService(name = \"SoapService\", targetNamespace = \"http://test/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface SoapService {\n\n\n /**\n * \n * @param fileName\n * @return\n * returns java.lang.Integer\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getResult\", targetNamespace = \"http://test/\", className = \"test.GetResult\")\n @ResponseWrapper(localName = \"getResultResponse\", targetNamespace = \"http://test/\", className = \"test.GetResultResponse\")\n @Action(input = \"http://test/SoapService/getResultRequest\", output = \"http://test/SoapService/getResultResponse\")\n public Integer getResult(\n @WebParam(name = \"fileName\", targetNamespace = \"\")\n String fileName);\n\n /**\n * \n * @param path\n */\n @WebMethod\n @Oneway\n @RequestWrapper(localName = \"getFilePath\", targetNamespace = \"http://test/\", className = \"test.GetFilePath\")\n @Action(input = \"http://test/SoapService/getFilePath\")\n public void getFilePath(\n @WebParam(name = \"path\", targetNamespace = \"\")\n String path);\n\n}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.GetItemDataPrint param,\r\n boolean optimizeContent, javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.GetItemDataPrint.MY_QNAME,\r\n factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"@WebService(name = \"MyServ\", targetNamespace = \"http://myServ\")\r\n@XmlSeeAlso({\r\n ObjectFactory.class\r\n})\r\npublic interface MyServ {\r\n\r\n\r\n /**\r\n * \r\n * @param arg0\r\n * @return\r\n * returns double\r\n */\r\n @WebMethod(operationName = \"ConvertMtoKm\")\r\n @WebResult(targetNamespace = \"\")\r\n @RequestWrapper(localName = \"ConvertMtoKm\", targetNamespace = \"http://myServ\", className = \"myserv.ConvertMtoKm\")\r\n @ResponseWrapper(localName = \"ConvertMtoKmResponse\", targetNamespace = \"http://myServ\", className = \"myserv.ConvertMtoKmResponse\")\r\n public double convertMtoKm(\r\n @WebParam(name = \"arg0\", targetNamespace = \"\")\r\n double arg0);\r\n\r\n}",
"private static void printSOAPResponse(SOAPMessage soapResponse) throws Exception {\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n \n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n soapResponse.writeTo(stream);\n String message = new String(stream.toByteArray(), \"utf-8\");\n \n \n Source sourceContent = soapResponse.getSOAPPart().getContent();\n System.out.print(\"\\nResponse SOAP Message = \");\n StreamResult result = new StreamResult(System.out);\n transformer.transform(sourceContent, result);\n \n \n \n }",
"@WebService(wsdlLocation=\"http://portal.marketplace.losalpes.com.co:7001/soa-infra/services/default/ProcesoRetornoMaterial/returnmaterialadvice_client_ep?WSDL\",\n targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"ReturnMaterialAdvice\")\n@XmlSeeAlso(\n { co.com.losalpes.marketplace.ws.retornoMaterial.types.ObjectFactory.class })\npublic interface ReturnMaterialAdvice\n{\n @WebMethod(action=\"process\")\n @Action(input=\"process\", output=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice/ReturnMaterialAdvice/processResponse\")\n @ResponseWrapper(localName=\"processResponse\", targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n className=\"co.com.losalpes.marketplace.ws.retornoMaterial.types.ProcessResponse\")\n @RequestWrapper(localName=\"process\", targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n className=\"co.com.losalpes.marketplace.ws.retornoMaterial.types.Process\")\n @WebResult(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoRMA\")\n public String process(@WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"causa\")\n String causa, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"fecha\")\n XMLGregorianCalendar fecha, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"cantidadProducto\")\n int cantidadProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"valorProducto\")\n long valorProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"nombreProducto\")\n String nombreProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"categoriaProducto\")\n String categoriaProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"referenciaProducto\")\n String referenciaProducto, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoPO\")\n String numSeguimientoPO, @WebParam(targetNamespace=\"http://xmlns.oracle.com/MarketPlace_jws/ProcesoRetornoMaterial/ReturnMaterialAdvice\",\n name=\"numSeguimientoDA\")\n String numSeguimientoDA);\n}",
"ShippingDocument createShippingDocument();",
"private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@WebService(targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", name = \"Baeldung\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface Baeldung {\n\n @WebMethod\n @RequestWrapper(localName = \"helloStudent\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.HelloStudent\")\n @ResponseWrapper(localName = \"helloStudentResponse\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.HelloStudentResponse\")\n @WebResult(name = \"return\", targetNamespace = \"\")\n public java.lang.String helloStudent(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n com.uwefuchs.demo.soap.apachecxf.endpoint.Student arg0\n );\n\n @WebMethod\n @RequestWrapper(localName = \"hello\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.Hello\")\n @ResponseWrapper(localName = \"helloResponse\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.HelloResponse\")\n @WebResult(name = \"return\", targetNamespace = \"\")\n public java.lang.String hello(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0\n );\n\n @WebMethod\n @RequestWrapper(localName = \"getStudents\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.GetStudents\")\n @ResponseWrapper(localName = \"getStudentsResponse\", targetNamespace = \"http://endpoint.apachecxf.soap.demo.uwefuchs.com/\", className = \"com.uwefuchs.demo.soap.apachecxf.endpoint.GetStudentsResponse\")\n @WebResult(name = \"return\", targetNamespace = \"\")\n public com.uwefuchs.demo.soap.apachecxf.endpoint.StudentMap getStudents();\n}",
"public DocumentReport() {\n\n\t\tLOGGER.info(\"Create Document Processor\");\n\n\t\tresultsXMLWriter = new ResultsXMLWriter();\n\t\tgaugesWriter = new GaugeJSONWriter();\n\t\tgaugesWriter.setMode(processMode.toString());\n\t\tgaugesXMLWriter = new GaugeXMLWriter();\n\t\tstylesXMLWriter = new StylesXMLWriter();\n\t\tstylesWriter = new StylesJSONWriter();\n\t\tstylesWriter.setMode(processMode.toString());\n\t\t\n\t\txPathWriter = new XPathJSONWriter();\n\t\txPathDotWriter = new DotWriter();\n\t\txPathXMLWriter = new XMLWriter();\n\t\txPathWriter.setMode(processMode.toString());\n\t\t\n//\t\tdotWriter = new DotWriter();\n\t}",
"public void export(String URN) {\n try {\n DocumentBuilderFactory fabrique = DocumentBuilderFactory.newInstance();\n fabrique.setValidating(true);\n DocumentBuilder constructeur = fabrique.newDocumentBuilder();\n Document document = constructeur.newDocument();\n \n // Propriétés du DOM\n document.setXmlVersion(\"1.0\");\n document.setXmlStandalone(true);\n \n // Création de l'arborescence du DOM\n Element racine = document.createElement(\"monde\");\n racine.setAttribute(\"longueur\",Integer.toString(getLongueur()));\n racine.setAttribute(\"largeur\",Integer.toString(getLargeur()));\n document.appendChild(racine);\n for (Composant composant:composants) {\n racine.appendChild(composant.toElement(document)) ;\n }\n \n // Création de la source DOM\n Source source = new DOMSource(document);\n \n // Création du fichier de sortie\n File file = new File(URN);\n Result resultat = new StreamResult(URN);\n \n // Configuration du transformer\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,\"http://womby.zapto.org/monde.dtd\");\n \n // Transformation\n transformer.transform(source, resultat);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void marshal(T object, XMLStreamWriter output,\n AttachmentMarshaller am) throws JAXBException {\n try {\n output.flush();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n SAX2StaxContentHandler handler = new SAX2StaxContentHandler(output);\n if (object instanceof DataObject) {\n serializeDataObject((DataObject) object, new SAXResult(handler),\n am);\n return;\n }\n\n try {\n String value = serializePrimitive(object, javaType);\n String prefix = output.getPrefix(xmlTag.getNamespaceURI());\n //TODO, this is a hack, seems to be wrong. why should namespace returned is \"\"?\n if (xmlTag.getNamespaceURI().equals(\"\")) {\n output.writeStartElement(\"\", xmlTag.getLocalPart(), xmlTag.getNamespaceURI());\n// } else if (prefix == null) {\n// output.writeStartElement(xmlTag.getNamespaceURI(), xmlTag.getLocalPart());\n } else {\n output.writeStartElement(prefix, xmlTag.getLocalPart(), xmlTag.getNamespaceURI());\n output.writeNamespace(prefix, xmlTag.getNamespaceURI());\n }\n output.writeCharacters(value);\n output.writeEndElement();\n } catch (XMLStreamException e) {\n throw new SDODatabindingException(e);\n }\n }",
"String sendDocument(String uniqueId, String type, byte[] document) throws XRoadServiceConsumptionException;",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.GetBillInfo param,\r\n boolean optimizeContent, javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.GetBillInfo.MY_QNAME, factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"public void receiveResultCreaWMSDoc(\r\n es.mitc.redes.urbanismoenred.serviciosweb.v1_86.UrbrWSServiceStub.CreaWMSDocResponseE result\r\n ) {\r\n }",
"@WebService(targetNamespace = \"http://jaxws.intergrupo.com.co/\", name = \"InterfaceWebService\")\r\n@XmlSeeAlso({ObjectFactory.class})\r\npublic interface InterfaceWebService {\r\n\r\n @WebResult(name = \"return\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"vehiculoReportado\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.VehiculoReportado\")\r\n @WebMethod(action = \"urn:vehiculoReportado\")\r\n @ResponseWrapper(localName = \"vehiculoReportadoResponse\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.VehiculoReportadoResponse\")\r\n public boolean vehiculoReportado(\r\n @WebParam(name = \"placa\", targetNamespace = \"\")\r\n java.lang.String placa\r\n );\r\n\r\n @WebResult(name = \"return\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"saludo\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.Saludo\")\r\n @WebMethod\r\n @ResponseWrapper(localName = \"saludoResponse\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.SaludoResponse\")\r\n public java.lang.String saludo(\r\n @WebParam(name = \"nombre\", targetNamespace = \"\")\r\n java.lang.String nombre\r\n );\r\n\r\n @WebResult(name = \"vehiculo\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"consultarVehiculo\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.ConsultarVehiculo\")\r\n @WebMethod(action = \"urn:consultarVehiculo\")\r\n @ResponseWrapper(localName = \"consultarVehiculoResponse\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.ConsultarVehiculoResponse\")\r\n public co.com.intergrupo.cxf.Vehiculo consultarVehiculo(\r\n @WebParam(name = \"placa\", targetNamespace = \"\")\r\n java.lang.String placa\r\n );\r\n\r\n @WebResult(name = \"return\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"vehiculoAlDiaConImpuesto\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.VehiculoAlDiaConImpuesto\")\r\n @WebMethod(action = \"urn:vehiculoAlDiaConImpuesto\")\r\n @ResponseWrapper(localName = \"vehiculoAlDiaConImpuestoResponse\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.VehiculoAlDiaConImpuestoResponse\")\r\n public boolean vehiculoAlDiaConImpuesto(\r\n @WebParam(name = \"placa\", targetNamespace = \"\")\r\n java.lang.String placa\r\n );\r\n\r\n @WebResult(name = \"return\", targetNamespace = \"\")\r\n @RequestWrapper(localName = \"registradoRunt\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.RegistradoRunt\")\r\n @WebMethod(action = \"urn:registradoRunt\")\r\n @ResponseWrapper(localName = \"registradoRuntResponse\", targetNamespace = \"http://jaxws.intergrupo.com.co/\", className = \"co.com.intergrupo.cxf.RegistradoRuntResponse\")\r\n public boolean registradoRunt(\r\n @WebParam(name = \"placa\", targetNamespace = \"\")\r\n java.lang.String placa\r\n );\r\n}",
"@WebService(name = \"SharesBrokeringSystem\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface SharesBrokeringSystem {\n\n\n /**\n * \n * @param volume\n * @param client\n * @param company\n */\n @WebMethod\n @Oneway\n @RequestWrapper(localName = \"sellShares\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.SellShares\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/sellShares\")\n public void sellShares(\n @WebParam(name = \"client\", targetNamespace = \"\")\n Client client,\n @WebParam(name = \"company\", targetNamespace = \"\")\n Company company,\n @WebParam(name = \"volume\", targetNamespace = \"\")\n int volume);\n\n /**\n * \n * @return\n * returns java.util.List<org.me.sharesbrokeringsystem.Company>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"companyList\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.CompanyList\")\n @ResponseWrapper(localName = \"companyListResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.CompanyListResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/companyListRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/companyListResponse\")\n public List<Company> companyList();\n\n /**\n * \n * @param company\n * @return\n * returns org.me.sharesbrokeringsystem.Company\n * @throws CertificateException_Exception\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"moreCompanyInfo\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.MoreCompanyInfo\")\n @ResponseWrapper(localName = \"moreCompanyInfoResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.MoreCompanyInfoResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/moreCompanyInfoRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/moreCompanyInfoResponse\", fault = {\n @FaultAction(className = CertificateException_Exception.class, value = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/moreCompanyInfo/Fault/CertificateException\")\n })\n public Company moreCompanyInfo(\n @WebParam(name = \"_company\", targetNamespace = \"\")\n Company company)\n throws CertificateException_Exception\n ;\n\n /**\n * \n * @param password\n * @param username\n * @return\n * returns org.me.sharesbrokeringsystem.Client\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"logIn\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.LogIn\")\n @ResponseWrapper(localName = \"logInResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.LogInResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/logInRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/logInResponse\")\n public Client logIn(\n @WebParam(name = \"username\", targetNamespace = \"\")\n String username,\n @WebParam(name = \"password\", targetNamespace = \"\")\n String password);\n\n /**\n * \n * @param currentTrades\n * @return\n * returns org.me.sharesbrokeringsystem.UpdateCompaniesResponse.Return\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"updateCompanies\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.UpdateCompanies\")\n @ResponseWrapper(localName = \"updateCompaniesResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.UpdateCompaniesResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/updateCompaniesRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/updateCompaniesResponse\")\n public org.me.sharesbrokeringsystem.UpdateCompaniesResponse.Return updateCompanies(\n @WebParam(name = \"_currentTrades\", targetNamespace = \"\")\n org.me.sharesbrokeringsystem.UpdateCompanies.CurrentTrades currentTrades);\n\n /**\n * \n * @param password\n * @param username\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"signUp\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.SignUp\")\n @ResponseWrapper(localName = \"signUpResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.SignUpResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/signUpRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/signUpResponse\")\n public int signUp(\n @WebParam(name = \"username\", targetNamespace = \"\")\n String username,\n @WebParam(name = \"password\", targetNamespace = \"\")\n String password);\n\n /**\n * \n * @param client\n * @return\n * returns int\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"logOut\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.LogOut\")\n @ResponseWrapper(localName = \"logOutResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.LogOutResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/logOutRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/logOutResponse\")\n public int logOut(\n @WebParam(name = \"client\", targetNamespace = \"\")\n Client client);\n\n /**\n * \n * @param amount\n * @param client\n * @param currency\n * @return\n * returns double\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"depositAmount\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.DepositAmount\")\n @ResponseWrapper(localName = \"depositAmountResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.DepositAmountResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/depositAmountRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/depositAmountResponse\")\n public double depositAmount(\n @WebParam(name = \"client\", targetNamespace = \"\")\n Client client,\n @WebParam(name = \"amount\", targetNamespace = \"\")\n double amount,\n @WebParam(name = \"currency\", targetNamespace = \"\")\n String currency);\n\n /**\n * \n * @param volume\n * @param client\n * @param company\n */\n @WebMethod\n @Oneway\n @RequestWrapper(localName = \"buyShares\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.BuyShares\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/buyShares\")\n public void buyShares(\n @WebParam(name = \"client\", targetNamespace = \"\")\n Client client,\n @WebParam(name = \"company\", targetNamespace = \"\")\n Company company,\n @WebParam(name = \"volume\", targetNamespace = \"\")\n int volume);\n\n /**\n * \n * @return\n * returns java.util.List<org.me.sharesbrokeringsystem.Company>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getCompanies\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.GetCompanies\")\n @ResponseWrapper(localName = \"getCompaniesResponse\", targetNamespace = \"http://sharesbrokeringsystem.me.org/\", className = \"org.me.sharesbrokeringsystem.GetCompaniesResponse\")\n @Action(input = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/getCompaniesRequest\", output = \"http://sharesbrokeringsystem.me.org/SharesBrokeringSystem/getCompaniesResponse\")\n public List<Company> getCompanies();\n\n}",
"public void writeDocumentToOutput() {\n log.debug(\"Statemend of XML document...\");\r\n // writeDocumentToOutput(root,0);\r\n log.debug(\"... end of statement\");\r\n }",
"public String generatedXmlFile(Document doc){\n\t\tStringWriter sw = new StringWriter();\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\r\n\t\t\t\t\ttransformer.transform(new DOMSource(doc), new StreamResult(sw));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tthrow new RuntimeException(\"Error converting to String\", ex);\r\n\t\t\t\t}\r\n\t\t\t\treturn sw.toString();\r\n\t}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.AutoOPBillCharge param,\r\n boolean optimizeContent, javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.AutoOPBillCharge.MY_QNAME,\r\n factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.EditInfo param, boolean optimizeContent,\r\n javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.EditInfo.MY_QNAME, factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"protected void assembleDocument() {\n\n // Create the missive\n this.createMissive();\n }",
"public void buildDocument() {\n/* 220 */ setDocument(getDocumentLoader().getDocument(getClass()), \"text/html\", \"ISO-8859-1\");\n/* */ \n/* 222 */ syncAccessMethods();\n/* */ }",
"@WebService(targetNamespace = \"http://password_generator_ws.ws.campione_tech.com/\", name = \"PasswordGeneratorWSServer\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface PasswordGeneratorWSServer {\n\n @WebMethod(action = \"urn:GeneratePasswordAction\")\n @RequestWrapper(localName = \"generatePassword\", targetNamespace = \"http://password_generator_ws.ws.campione_tech.com/\", className = \"com.campione_tech.client.password_generator_ws.GeneratePassword\")\n @ResponseWrapper(localName = \"generatePasswordResponse\", targetNamespace = \"http://password_generator_ws.ws.campione_tech.com/\", className = \"com.campione_tech.client.password_generator_ws.GeneratePasswordResponse\")\n @WebResult(name = \"return\", targetNamespace = \"\")\n public java.lang.String generatePassword(\n @WebParam(name = \"length\", targetNamespace = \"\")\n java.lang.String length\n );\n\n @WebMethod(action = \"urn:VersionAction\")\n @RequestWrapper(localName = \"version\", targetNamespace = \"http://password_generator_ws.ws.campione_tech.com/\", className = \"com.campione_tech.client.password_generator_ws.Version\")\n @ResponseWrapper(localName = \"versionResponse\", targetNamespace = \"http://password_generator_ws.ws.campione_tech.com/\", className = \"com.campione_tech.client.password_generator_ws.VersionResponse\")\n @WebResult(name = \"return\", targetNamespace = \"\")\n public java.lang.String version();\n}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(\r\n org.apache.axiom.soap.SOAPFactory factory,\r\n org.tempuri.HISWebServiceStub.MainMethod param,\r\n boolean optimizeContent, javax.xml.namespace.QName elementQName)\r\n throws org.apache.axis2.AxisFault {\r\n try {\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody()\r\n .addChild(param.getOMElement(\r\n org.tempuri.HISWebServiceStub.MainMethod.MY_QNAME, factory));\r\n\r\n return emptyEnvelope;\r\n } catch (org.apache.axis2.databinding.ADBException e) {\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n }",
"@Override\n\tpublic void export(URNspec urn, HashMap mapDiagrams, FileOutputStream fos) throws InvocationTargetException {\n\t}",
"public Document getAsXMLDOM () {\r\n\r\n //code description\r\n\r\n return document;\r\n\r\n }",
"@WebService(targetNamespace = \"http://inf.ind.jdo/\", name = \"IndService\")\n@XmlSeeAlso({ObjectFactory.class})\npublic interface IndService {\n\n @WebResult(name = \"return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"onSaveDispense\", targetNamespace = \"http://inf.ind.jdo/\", className = \"action.spc.client.OnSaveDispense\")\n @WebMethod\n @ResponseWrapper(localName = \"onSaveDispenseResponse\", targetNamespace = \"http://inf.ind.jdo/\", className = \"action.spc.client.OnSaveDispenseResponse\")\n public java.lang.String onSaveDispense(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n java.lang.String arg0\n );\n}",
"String exportTo(CopybookExport exporter, String xmlCopybook);",
"public void exportar(Object bean) {\n\t\t\r\n\t}",
"@WebService(name = \"RPCLitSWA\", targetNamespace = \"http://org/apache/axis2/jaxws/proxy/rpclitswa\", wsdlLocation = \"RPCLitSWA.wsdl\")\r\n@SOAPBinding(style = Style.RPC)\r\npublic interface RPCLitSWA {\r\n\r\n\r\n /**\r\n * \r\n * @param request\r\n * @param dummyAttachmentINOUT\r\n * @param dummyAttachmentOUT\r\n * @param response\r\n * @param dummyAttachmentIN\r\n */\r\n @WebMethod\r\n public void echo(\r\n @WebParam(name = \"request\", partName = \"request\")\r\n String request,\r\n @WebParam(name = \"dummyAttachmentIN\", partName = \"dummyAttachmentIN\")\r\n String dummyAttachmentIN,\r\n @WebParam(name = \"dummyAttachmentINOUT\", mode = Mode.INOUT, partName = \"dummyAttachmentINOUT\")\r\n Holder<DataHandler> dummyAttachmentINOUT,\r\n @WebParam(name = \"response\", mode = Mode.OUT, partName = \"response\")\r\n Holder<String> response,\r\n @WebParam(name = \"dummyAttachmentOUT\", mode = Mode.OUT, partName = \"dummyAttachmentOUT\")\r\n Holder<String> dummyAttachmentOUT);\r\n\r\n}",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\n throws org.apache.axis2.AxisFault{\n\n \n try{\n\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\n emptyEnvelope.getBody().addChild(param.getOMElement(net.wit.webservice.TerminalServiceXmlServiceStub.GetTerminalCardType.MY_QNAME,factory));\n return emptyEnvelope;\n } catch(org.apache.axis2.databinding.ADBException e){\n throw org.apache.axis2.AxisFault.makeFault(e);\n }\n \n\n }",
"@WebService(targetNamespace = \"http://www.example.org/BuyMart/\", name = \"BuyMartPortType\")\n@XmlSeeAlso({ObjectFactory.class})\n@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\npublic interface BuyMartPortType {\n\n @WebMethod(operationName = \"GetOrders\")\n @WebResult(name = \"GetOrdersResponse\", targetNamespace = \"http://www.example.org/BuyMart/\", partName = \"parameters\")\n public GetOrdersResponse getOrders(\n @WebParam(partName = \"parameters\", name = \"GetOrdersRequest\", targetNamespace = \"http://www.example.org/BuyMart/\")\n GetOrdersRequest parameters\n );\n\n @WebMethod(operationName = \"UpdateOrders\")\n @WebResult(name = \"UpdateOrdersResponse\", targetNamespace = \"http://www.example.org/BuyMart/\", partName = \"parameters\")\n public UpdateOrdersResponse updateOrders(\n @WebParam(partName = \"parameters\", name = \"UpdateOrdersRequest\", targetNamespace = \"http://www.example.org/BuyMart/\")\n UpdateOrdersRequest parameters\n );\n\n @WebMethod(operationName = \"CreateOrders\")\n @WebResult(name = \"CreateOrdersResponse\", targetNamespace = \"http://www.example.org/BuyMart/\", partName = \"parameters\")\n public CreateOrdersResponse createOrders(\n @WebParam(partName = \"parameters\", name = \"CreateOrdersRequest\", targetNamespace = \"http://www.example.org/BuyMart/\")\n CreateOrdersRequest parameters\n );\n\n @WebMethod(operationName = \"DeleteOrders\")\n @WebResult(name = \"DeleteOrdersResponse\", targetNamespace = \"http://www.example.org/BuyMart/\", partName = \"parameters\")\n public DeleteOrdersResponse deleteOrders(\n @WebParam(partName = \"parameters\", name = \"DeleteOrdersRequest\", targetNamespace = \"http://www.example.org/BuyMart/\")\n DeleteOrdersRequest parameters\n );\n}",
"public static void outputXMLdoc() throws Exception {\n // transform the Document into a String\n DOMSource domSource = new DOMSource(doc);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer transformer = tf.newTransformer();\n transformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n transformer.setOutputProperty(OutputKeys.ENCODING,\"UTF-8\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n java.io.StringWriter sw = new java.io.StringWriter();\n StreamResult sr = new StreamResult(sw);\n transformer.transform(domSource, sr);\n String xml = sw.toString();\n\n\tSystem.out.println(xml);\n\n }",
"@RequestMapping(\"/admin/backup.xml\")\r\n public void backup(final ModelMap model, final OutputStream out) throws JAXBException {\r\n\r\n Backup backup = new Backup();\r\n backup.setJobCountPerDay(jobCountPerDayDao.getAll());\r\n backup.setIndustries(jobService.getIndustries());\r\n backup.setRegions(jobService.getRegions());\r\n backup.setRoles(roleDao.getAll());\r\n backup.setUsers(userService.getAllUsers());\r\n backup.setJobs(jobService.getJobs());\r\n\r\n marshaller.marshal(backup, new StreamResult(out));\r\n\r\n }",
"private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, registry.ClientRegistryStub.RemoveUser param, boolean optimizeContent, javax.xml.namespace.QName methodQName)\r\n throws org.apache.axis2.AxisFault{\r\n\r\n \r\n try{\r\n\r\n org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();\r\n emptyEnvelope.getBody().addChild(param.getOMElement(registry.ClientRegistryStub.RemoveUser.MY_QNAME,factory));\r\n return emptyEnvelope;\r\n } catch(org.apache.axis2.databinding.ADBException e){\r\n throw org.apache.axis2.AxisFault.makeFault(e);\r\n }\r\n \r\n\r\n }",
"ShipmentPackageContent createShipmentPackageContent();",
"protected abstract void buildExcelDocument(Map<String, Object> model,\n Workbook workbook, HttpServletRequest request,\n HttpServletResponse response) throws Exception;",
"public void build() throws IOException {\n if (packageWriter == null) {\n //Doclet does not support this output.\n return;\n }\n build(layoutParser.parseXML(ROOT), contentTree);\n }",
"@WebService(name = \"zperson_communic\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface ZpersonCommunic {\n\n\n /**\n * \n * @param employeeId\n * @param lastnameM\n * @param fstnameM\n * @param telAts\n * @param orgtxt\n * @param job\n * @param orgUnit\n * @param jobtxt\n * @param checkCommunities\n * @param outTab\n * @return\n * returns test.Bapireturn\n */\n @WebMethod(operationName = \"ZPersonalSearch\")\n @WebResult(name = \"Return\", targetNamespace = \"\")\n @RequestWrapper(localName = \"ZPersonalSearch\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\", className = \"test.ZPersonalSearch\")\n @ResponseWrapper(localName = \"ZPersonalSearchResponse\", targetNamespace = \"urn:sap-com:document:sap:soap:functions:mc-style\", className = \"test.ZPersonalSearchResponse\")\n public Bapireturn zPersonalSearch(\n @WebParam(name = \"CheckCommunities\", targetNamespace = \"\")\n String checkCommunities,\n @WebParam(name = \"EmployeeId\", targetNamespace = \"\")\n String employeeId,\n @WebParam(name = \"FstnameM\", targetNamespace = \"\")\n String fstnameM,\n @WebParam(name = \"Job\", targetNamespace = \"\")\n String job,\n @WebParam(name = \"Jobtxt\", targetNamespace = \"\")\n String jobtxt,\n @WebParam(name = \"LastnameM\", targetNamespace = \"\")\n String lastnameM,\n @WebParam(name = \"OrgUnit\", targetNamespace = \"\")\n String orgUnit,\n @WebParam(name = \"Orgtxt\", targetNamespace = \"\")\n String orgtxt,\n @WebParam(name = \"OutTab\", targetNamespace = \"\", mode = WebParam.Mode.INOUT)\n Holder<TableOfZpernComm> outTab,\n @WebParam(name = \"TelAts\", targetNamespace = \"\")\n String telAts);\n\n}",
"@WebService(targetNamespace = \"http://publicar.uytubeLogica/\", name = \"WebServices\")\r\n@XmlSeeAlso({ObjectFactory.class, net.java.dev.jaxb.array.ObjectFactory.class})\r\n@SOAPBinding(style = SOAPBinding.Style.RPC)\r\npublic interface WebServices {\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/cambiarPrivLDRRequest\", output = \"http://publicar.uytubeLogica/WebServices/cambiarPrivLDRResponse\")\r\n public void cambiarPrivLDR(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/operacionPruebaRequest\", output = \"http://publicar.uytubeLogica/WebServices/operacionPruebaResponse\")\r\n public void operacionPrueba();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRPublicasPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRPublicasPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray listarLDRPublicasPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRPorCategoriaRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRPorCategoriaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray listarLDRPorCategoria(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n Privacidad arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verificarDispUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/verificarDispUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean verificarDispUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueSigueRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueSigueResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarUsuariosQueSigue(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarCanalesPublicosPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarCanalesPublicosPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCanalArray listarCanalesPublicosPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarDatosUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarDatosUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtUsuario listarDatosUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/seguirUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/seguirUsuarioResponse\")\r\n public void seguirUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/valorarVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/valorarVideoResponse\")\r\n public void valorarVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n boolean arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoLDRdeUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoLDRdeUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccionArray infoLDRdeUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/mostrarInfoCanalRequest\", output = \"http://publicar.uytubeLogica/WebServices/mostrarInfoCanalResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCanal mostrarInfoCanal(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/agregarVideoListaRequest\", output = \"http://publicar.uytubeLogica/WebServices/agregarVideoListaResponse\")\r\n public void agregarVideoLista(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verDetallesVideoExtRequest\", output = \"http://publicar.uytubeLogica/WebServices/verDetallesVideoExtResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtInfoVideo verDetallesVideoExt(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/responderComentarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/responderComentarioResponse\")\r\n public void responderComentario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n DtFecha arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n java.lang.String arg4\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/memberVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/memberVideoResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean memberVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/agregarVisitaRequest\", output = \"http://publicar.uytubeLogica/WebServices/agregarVisitaResponse\")\r\n public void agregarVisita(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideosPorCategoriaRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideosPorCategoriaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideosPorCategoria(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n Privacidad arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevoUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevoUsuarioResponse\")\r\n public void nuevoUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n java.lang.String arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n java.lang.String arg4,\r\n @WebParam(partName = \"arg5\", name = \"arg5\")\r\n DtFecha arg5,\r\n @WebParam(partName = \"arg6\", name = \"arg6\")\r\n byte[] arg6,\r\n @WebParam(partName = \"arg7\", name = \"arg7\")\r\n java.lang.String arg7,\r\n @WebParam(partName = \"arg8\", name = \"arg8\")\r\n java.lang.String arg8,\r\n @WebParam(partName = \"arg9\", name = \"arg9\")\r\n Privacidad arg9,\r\n @WebParam(partName = \"arg10\", name = \"arg10\")\r\n java.lang.String arg10\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/verificarLoginRequest\", output = \"http://publicar.uytubeLogica/WebServices/verificarLoginResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean verificarLogin(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevaListaParticularRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevaListaParticularResponse\")\r\n public void nuevaListaParticular(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/nuevoComentarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/nuevoComentarioResponse\")\r\n public void nuevoComentario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n DtFecha arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n java.lang.String arg3\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/eliminarVideoListaRequest\", output = \"http://publicar.uytubeLogica/WebServices/eliminarVideoListaResponse\")\r\n public void eliminarVideoLista(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n int arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideoListaReproduccionRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideoListaReproduccionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideoListaReproduccion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/getEstadoValoracionRequest\", output = \"http://publicar.uytubeLogica/WebServices/getEstadoValoracionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public java.lang.String getEstadoValoracion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarCategoriasRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarCategoriasResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtCategoriaArray listarCategorias();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideoHistorialRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideoHistorialResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoHistorialArray listarVideoHistorial(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/memberListaReproduccionPropiaRequest\", output = \"http://publicar.uytubeLogica/WebServices/memberListaReproduccionPropiaResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public boolean memberListaReproduccionPropia(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarComentariosRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarComentariosResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtComentarioArray listarComentarios(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/obtenerDtsVideosListaReproduccionUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/obtenerDtsVideosListaReproduccionUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray obtenerDtsVideosListaReproduccionUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoListaReproduccionRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoListaReproduccionResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtListaReproduccion infoListaReproduccion(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/aniadirVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/aniadirVideoResponse\")\r\n public void aniadirVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n java.lang.String arg2,\r\n @WebParam(partName = \"arg3\", name = \"arg3\")\r\n int arg3,\r\n @WebParam(partName = \"arg4\", name = \"arg4\")\r\n DtFecha arg4,\r\n @WebParam(partName = \"arg5\", name = \"arg5\")\r\n java.lang.String arg5,\r\n @WebParam(partName = \"arg6\", name = \"arg6\")\r\n DtCategoria arg6,\r\n @WebParam(partName = \"arg7\", name = \"arg7\")\r\n Privacidad arg7\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueLeSigueRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarUsuariosQueLeSigueResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarUsuariosQueLeSigue(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoVideosCanalRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoVideosCanalResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray infoVideosCanal(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1,\r\n @WebParam(partName = \"arg2\", name = \"arg2\")\r\n Privacidad arg2\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarLDRdeUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarLDRdeUsuarioResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public net.java.dev.jaxb.array.StringArray listarLDRdeUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/bajaUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/bajaUsuarioResponse\")\r\n public void bajaUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n\t@WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/infoAddVideoRequest\", output = \"http://publicar.uytubeLogica/WebServices/infoAddVideoResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideo infoAddVideo(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n int arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/cargarDatosRequest\", output = \"http://publicar.uytubeLogica/WebServices/cargarDatosResponse\")\r\n public void cargarDatos();\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/listarVideosPublicosPorNombreRequest\", output = \"http://publicar.uytubeLogica/WebServices/listarVideosPublicosPorNombreResponse\")\r\n @WebResult(name = \"return\", targetNamespace = \"http://publicar.uytubeLogica/\", partName = \"return\")\r\n public DtVideoArray listarVideosPublicosPorNombre(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0\r\n );\r\n\r\n @WebMethod\r\n @Action(input = \"http://publicar.uytubeLogica/WebServices/dejarUsuarioRequest\", output = \"http://publicar.uytubeLogica/WebServices/dejarUsuarioResponse\")\r\n public void dejarUsuario(\r\n @WebParam(partName = \"arg0\", name = \"arg0\")\r\n java.lang.String arg0,\r\n @WebParam(partName = \"arg1\", name = \"arg1\")\r\n java.lang.String arg1\r\n );\r\n}",
"public java.util.Enumeration getOutDocument() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getOutDocument();\n }",
"@WebService(name = \"ISUSMS\", targetNamespace = \"http://ISU/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface ISUSMS {\n\n\n /**\n * \n * @param number\n * @param password\n * @param provider\n * @param message\n * @param username\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"sendSMSISU\", targetNamespace = \"http://ISU/\", className = \"isu.SendSMSISU\")\n @ResponseWrapper(localName = \"sendSMSISUResponse\", targetNamespace = \"http://ISU/\", className = \"isu.SendSMSISUResponse\")\n @Action(input = \"http://ISU/ISUSMS/sendSMSISURequest\", output = \"http://ISU/ISUSMS/sendSMSISUResponse\")\n public String sendSMSISU(\n @WebParam(name = \"username\", targetNamespace = \"\")\n String username,\n @WebParam(name = \"password\", targetNamespace = \"\")\n String password,\n @WebParam(name = \"provider\", targetNamespace = \"\")\n String provider,\n @WebParam(name = \"number\", targetNamespace = \"\")\n String number,\n @WebParam(name = \"message\", targetNamespace = \"\")\n String message);\n\n /**\n * \n * @param number\n * @param provider\n * @param message\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"sendSMS\", targetNamespace = \"http://ISU/\", className = \"isu.SendSMS\")\n @ResponseWrapper(localName = \"sendSMSResponse\", targetNamespace = \"http://ISU/\", className = \"isu.SendSMSResponse\")\n @Action(input = \"http://ISU/ISUSMS/sendSMSRequest\", output = \"http://ISU/ISUSMS/sendSMSResponse\")\n public String sendSMS(\n @WebParam(name = \"provider\", targetNamespace = \"\")\n String provider,\n @WebParam(name = \"number\", targetNamespace = \"\")\n String number,\n @WebParam(name = \"message\", targetNamespace = \"\")\n String message);\n\n /**\n * \n * @return\n * returns java.util.List<java.lang.String>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getCarriers\", targetNamespace = \"http://ISU/\", className = \"isu.GetCarriers\")\n @ResponseWrapper(localName = \"getCarriersResponse\", targetNamespace = \"http://ISU/\", className = \"isu.GetCarriersResponse\")\n @Action(input = \"http://ISU/ISUSMS/getCarriersRequest\", output = \"http://ISU/ISUSMS/getCarriersResponse\")\n public List<String> getCarriers();\n\n}",
"public void xmlPresentation () {\n System.out.println ( \"****** XML Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n Books books = new Books();\n books.setBooks(new ArrayList<Book>());\n\n bookArrayList = new Request().postRequestBook();\n\n for (Book aux: bookArrayList) {\n books.getBooks().add(aux);\n }\n\n try {\n javax.xml.bind.JAXBContext jaxbContext = JAXBContext.newInstance(Books.class);\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n jaxbMarshaller.marshal(books, System.out);\n } catch (JAXBException e) {\n System.out.println(\"Error: \"+ e);\n }\n ClientEntry.showMenu ( );\n }",
"protected abstract void toXml(PrintWriter result);",
"protected static void writeDocument(Output out, Document doc) {\n out.writeXML(doc);\n }"
] | [
"0.6360715",
"0.5773765",
"0.5771816",
"0.5605507",
"0.5602524",
"0.559795",
"0.5563151",
"0.5541741",
"0.5525463",
"0.55014414",
"0.5493032",
"0.5492475",
"0.5483994",
"0.5480459",
"0.546878",
"0.5467196",
"0.5452304",
"0.5436457",
"0.542666",
"0.5415674",
"0.5374915",
"0.5349499",
"0.5348633",
"0.5325317",
"0.5300202",
"0.5291686",
"0.52702266",
"0.5254572",
"0.5238788",
"0.522889",
"0.52138466",
"0.5203423",
"0.51917094",
"0.5188573",
"0.5181992",
"0.51616263",
"0.5160515",
"0.5131771",
"0.5122891",
"0.51142615",
"0.51073986",
"0.51045924",
"0.5097487",
"0.508358",
"0.50824654",
"0.5073754",
"0.50691634",
"0.5068267",
"0.5067443",
"0.5066872",
"0.5059362",
"0.50536704",
"0.5043889",
"0.50402534",
"0.5035636",
"0.50341916",
"0.5033832",
"0.5020344",
"0.5016311",
"0.49898356",
"0.49702814",
"0.49508405",
"0.49507996",
"0.49466604",
"0.4923682",
"0.49234918",
"0.49210516",
"0.48982623",
"0.48949108",
"0.48866817",
"0.48822048",
"0.48819798",
"0.48814932",
"0.4881253",
"0.48679626",
"0.4864488",
"0.48519143",
"0.48516557",
"0.48494488",
"0.48475793",
"0.484311",
"0.48358566",
"0.4831674",
"0.48282546",
"0.48277497",
"0.48261827",
"0.48105836",
"0.48076063",
"0.48052",
"0.48001602",
"0.47943088",
"0.4794302",
"0.47934532",
"0.47933775",
"0.47878245",
"0.47857422",
"0.4783206",
"0.47816056",
"0.47792915",
"0.47791275",
"0.47704"
] | 0.0 | -1 |
Returns the value of the 'Element Change' containment reference. If the meaning of the 'Element Change' containment reference isn't clear, there really should be more of a description here... | ElementChange getElementChange(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getxChange() {\n\t\treturn xChange;\n\t}",
"@javax.annotation.Nullable\n public String getChange() {\n return change;\n }",
"public Element getElement() {\n/* 78 */ return this.e;\n/* */ }",
"public native final Node changedNode() /*-{\n\t\treturn this.changedNode;\n\t}-*/;",
"public Double getChange();",
"ChangeSet getChangeSet();",
"public E getElement() { return element; }",
"public AbstractDNode getOriginalElement() {\n return element;\n }",
"public Object element() { return e; }",
"public int getChanged () {\n int d = getDiff () * 2;\n int s = getSize () * 2;\n\n for (int i = 0; i < references.length; i++) {\n if (references[i] != null) {\n d += references[i].getDiff ();\n s += references[i].getSize ();\n }\n }\n \n // own cluster change is twice as much important than \n // those referenced\n int ret = d * 100 / s;\n if (ret == 0 && d > 0) {\n ret = 1;\n }\n return ret;\n }",
"public String getElement() { return element; }",
"AttributeRaiseType getValueChange();",
"@Override\n public Object getModifiedElement()\n {\n return null;\n }",
"public native final EventFacade changedEvent() /*-{\n\t\treturn this.changedEvent;\n\t}-*/;",
"public E getElement() {\r\n return element;\r\n }",
"public ReferenceType getTargetElement();",
"public ObjectChangeSet getChangeSet() {\n return changeSet;\n }",
"public Element getElement()\n {\n return m_Element;\n }",
"public javax.xml.namespace.QName getReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFERENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getQNameValue();\n }\n }",
"public Object getElement()\r\n\t\t{ return element; }",
"public double getChange() \n\t{\n\t\treturn purchase.getPayment().getChange();\n\t}",
"@Override\n\tpublic Element getElement() {\n\t\treturn elem;\n\t}",
"public Object getElement() {\n return element;\n }",
"public PriceChangeEdit getPriceChange()\n\t{\n\t\treturn priceChange;\n\t}",
"Elem getPointedElem();",
"public Element getElement() {\r\n\t\treturn element;\r\n\t}",
"public FlowElement getElement() {\n return element;\n }",
"final public Element getElement() {\n return element;\n }",
"public Element getElement() {\n return element;\n }",
"public Element getElement() {\n return element;\n }",
"public int getChangeType() {\r\n return changeType;\r\n }",
"public Node getExpressionOrigin() {\n return element;\n }",
"public I_Element getElement() {\n\t\treturn element;\n\t}",
"public Element getElement() {\n return super.getElement();\n }",
"public java.lang.String getChangeOperation() {\r\n return changeOperation;\r\n }",
"public GraphElement getElement() {\n return this.element;\n }",
"public interface Change {\n\n int getSortingNumber();\n\n @Nonnull\n List<String> getLabels();\n\n @Nonnull\n String getVersion();\n}",
"public Object getElement();",
"@Override\n\t\tpublic E getElement() throws IllegalStateException {\n\t\t\treturn element;\n\t\t}",
"@objid (\"0b7379f2-02f7-422d-a07d-c3d9c66007b6\")\n public static SmDependency getContainedNodeDep() {\n return ContainedNodeDep;\n }",
"public String getElementReferenceIdentifier() {\n return this.toString();\n }",
"public Long getChangeNum() {\n return changeNum;\n }",
"public int getElem()\r\n\t{\r\n\t\treturn elem;\r\n\t}",
"public Element element() {\n\t\treturn _element;\n\t}",
"public ChangeDate getChangeDate() {\n return changeDate;\n }",
"public ChangeDate getChangeDate() {\n return changeDate;\n }",
"SolutionChange getPreviousChange();",
"public E getElement()\n\t{\n\t\treturn this.data;\n\t}",
"public Double getChange(int in);",
"@Override\r\n\tprotected Object getValue(Object element) {\r\n\t\treturn true;\r\n\t}",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\n\t\tif (propertyChange == null) {\n\t\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\n\t\t};\n\t\treturn propertyChange;\n\t}",
"Element getElement();",
"@Test\n\tpublic void testElementUpdatedEventSingle() {\n\t\tfinal DiagramElement e = addRootElementAndResetCounter(1);\n\n\t\t// Test the update event\n\t\tdiagram.modify(\"Set Position\", m -> m.setPosition(e, new Point(100, 100)));\n\n\t\tassertThat(ml.elementUpdatedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.modificationsCompletedEventsReceived, is(equalTo(1)));\n\t\tassertThat(ml.getTotalEventsReceived(), is(equalTo(2)));\n\t\tassertThat(ml.lastUpdateEvent.updatedFields, is(equalTo(EnumSet.of(DiagramElementField.POSITION))));\n\t}",
"public String getReference(){\r\n\t\t\r\n\t\treturn McsElement.getElementByXpath(driver,REFERENCE_INPUT).getAttribute(\"value\");\r\n\t}",
"@Test\r\n\tpublic void testChangesNotification() throws Exception {\r\n\t\tfinal AdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tfinal XMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider\r\n\t\t\t\t.getInstance().getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\tIChangesNotifierMonitor monitorMock = createMock(IChangesNotifierMonitor.class);\r\n\r\n\t\tmonitorMock.objectChanged(same(container), isA(ObjectChangedEvent.class));\r\n\t\texpectLastCall().once();\r\n\r\n\t\treplay(monitorMock);\r\n\r\n\t\tcontainer.addMonitor(monitorMock);\r\n\t\t// Won't work, because \"intProperty\" is served by XMLSetterGetterProperty which doesn't support monitoring.\r\n\t\t// container.getProperty(\"intProperty\").setValue(3);\r\n\t\t// Works, because \"floatProperty\" is served by XMLFieldProperty which support monitoring.\r\n\t\tcontainer.getProperty(\"floatProperty\").setValue(3);\r\n\t\tverify(monitorMock);\r\n\r\n\t}",
"public org.apache.xmlbeans.XmlQName xgetReference()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlQName target = null;\n target = (org.apache.xmlbeans.XmlQName)get_store().find_element_user(REFERENCE$0, 0);\n return target;\n }\n }",
"public Node getReference() {\n return this.reference;\n }",
"public native final EditorBaseEvent changedNode(Node val) /*-{\n\t\tthis.changedNode = val;\n\t\treturn this;\n\t}-*/;",
"public E getElement()\n {\n return this.data;\n }",
"public Location getElement(){\n\t\t\treturn element;\n\t\t}",
"public int getChange() {\n\t\treturn player.getDay(0).calculateChangeFactor();\n\t\t\n\t}",
"String getElement();",
"protected PropertyChangeSupport getPropertyChange() {\r\n\t\tif (propertyChange == null) {\r\n\t\t\tpropertyChange = new PropertyChangeSupport(this);\r\n\t\t}\r\n\t\t;\r\n\t\treturn propertyChange;\r\n\t}",
"public Value getValue() {\n if (!dirty && !expressionUsesTime) {\n return cachedValue;\n }\n try {\n // System.out.print(\"/// {\" + number + \"} calculate \" + element.getTagName() + \"#\" + element.getAttributeNS(null, \"id\")\n // + \".\" + attributeLocalName + \" = \" + expression + \": \");\n // System.out.println(\"Executing XPath: \" + expression);\n // dumpDocument(element.getOwnerDocument(), 0);\n\n // System.out.println(\"[\" + st + \"] \" + expression);\n // long t1 = java.util.Calendar.getInstance().getTime().getTime();\n // for (int i = 0; i < 100; i++) {\n // xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n // }\n // long t2 = System.currentTimeMillis();\n st++;\n //constraintEngine.xpathContext = new XPathContext(constraintEngine);\n \n \n //xpath = new XPath(expression, prefixResolver);\n //System.out.println(\"Constraint.getValue() width context: \" + constraintEngine.xpathContext);\n //constraintEngine.xpathContext.reset(); // xgx\n XObject xo = xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n st--;\n // long t3 = System.currentTimeMillis();\n // if (st == 0) {\n // System.out.println(\"evaluation: \" + (t2 - t1) / 100.0);\n // }\n Value v = Value.createValue(/*constraintEngine,*/ xo);\n Value newValue;\n if (type == Value.TYPE_UNKNOWN) {\n newValue = v;\n } else {\n newValue = v.convertTo(type, element);\n }\n if (!newValue.equals(cachedValue)) {\n // System.out.println(newValue);\n cachedValue = newValue;\n // propagate changes\n // System.out.println(\"== propagating:\");\n // System.out.println(\"== getting constraints that depend on \" + element.getNodeName() + \"/@\" + attributeNamespaceURI + \":\" + attributeLocalName);\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n attributeNamespaceURI, \n attributeLocalName));\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n null, \n null));\n propagateChanges(\n constraintEngine.getReverseBboxDependencies(element));\n } else {\n // System.out.println(\"unnecessary\");\n }\n // System.out.println(\"Result: \" + cachedValue);\n dirty = false;\n return cachedValue;\n } catch (javax.xml.transform.TransformerException te) {\n constraintEngine.stopTimer();\n throw new ConstraintException(\"Error evaluating XPath expression: \"\n + te.getMessageAndLocation(), te);\n }\n }",
"public T getValue(){\n \treturn element;\n }",
"public T getElement() {\n\t\treturn element;\n\t}",
"public String getLastChange() {\n return lastChange;\n }",
"public org.w3c.dom.Element getElement() {\n return element;\n }",
"public T getElement() {\r\n\t\t\r\n\t\treturn element;\r\n\t\r\n\t}",
"public Rectangle getChangedArea() {\n\t\treturn changedArea;\n\t}",
"public Object getNewValue()\n {\n return newValue;\n }",
"protected java.beans.PropertyChangeSupport getPropertyChange() {\r\n\tif (propertyChange == null) {\r\n\t\tpropertyChange = new java.beans.PropertyChangeSupport(this);\r\n\t};\r\n\treturn propertyChange;\r\n}",
"String getContainmentReference();",
"public org.apache.xmlbeans.XmlObject getValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlObject target = null;\n target = (org.apache.xmlbeans.XmlObject)get_store().find_element_user(VALUE$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"@Override\n public int getColChange() {\n return colChange;\n }",
"@Override\r\n public void afterChangeValueOf(final WebElement arg0, final WebDriver arg1) {\n\r\n }",
"public CacheChangeSet obtainCacheChangeSet() {\n if (changeSet == null) {\n changeSet = new CacheChangeSet();\n }\n return changeSet;\n }",
"public Object getValue() {\n return element == null ? null : element.getValue();\n }",
"public String getChangedflag() {\n return (String) getAttributeInternal(CHANGEDFLAG);\n }",
"public boolean isChangeType()\n {\n return hasChanges;\n }",
"Elem getElem();",
"public boolean comesFromDiagramElement() {\n return getOriginalElement() != null;\n }",
"public int getYChange() {\r\n \treturn yChange;\r\n }",
"@Override\r\n\tpublic ElementKind getElementKind() \r\n\t{\r\n\t\t/* if the Property is just a reference,\r\n\t\t * return the type of the referent */\r\n\t\tif (referent != null) return referent.getElementKind();\r\n\r\n\t\treturn ElementKind.PROPERTY;\r\n\t}",
"public long getStateChange() {\n return stateChange_;\n }",
"public E element();",
"String getElem();",
"public T getElement() {\n return element;\n }",
"Object getContainedValue();",
"public java.lang.String getConformsTo()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONFORMSTO$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@Override\n\tpublic Element getElement() {\n\t\treturn null;\n\t}",
"public long getStateChange() {\n return stateChange_;\n }",
"public Getter reqGetZoneChangeSetting() {\n\t\t\treqGetProperty(EPC_ZONE_CHANGE_SETTING);\n\t\t\treturn this;\n\t\t}",
"@Override\r\n public void beforeChangeValueOf(final WebElement arg0, final WebDriver arg1) {\n\r\n }",
"public boolean isChildChanged() {\n return CHILDCHANGED.equals(message);\n }",
"public String getNodeValue ();",
"public double getyChange() {\n\t\treturn yChange;\n\t}",
"@Override\n\t\tpublic String getValueDescription() {\n\t\t\treturn \"propertytoCheck=\" + expectpedValueOfPropertyToCheck + \"; propertytoChange=\"\n\t\t\t\t\t+ newValueOfPropertyToChange;\n\t\t}",
"public double getPercentChange() {\n return percentChange;\n }",
"public java.lang.String getOrigin()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ORIGIN$16, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }"
] | [
"0.59584844",
"0.5777816",
"0.5768658",
"0.5706116",
"0.562609",
"0.55803037",
"0.547668",
"0.5453738",
"0.542723",
"0.54266024",
"0.53941596",
"0.5344097",
"0.53274417",
"0.5325563",
"0.5316966",
"0.5299395",
"0.528561",
"0.52705526",
"0.52399254",
"0.5229107",
"0.52131057",
"0.52105165",
"0.51718026",
"0.5134374",
"0.5129658",
"0.51171106",
"0.5114772",
"0.5113234",
"0.5113141",
"0.5113141",
"0.51007587",
"0.5100473",
"0.50975424",
"0.5094171",
"0.50932765",
"0.50914794",
"0.5080456",
"0.5077869",
"0.5072374",
"0.50685614",
"0.50639623",
"0.5058473",
"0.50478256",
"0.50469065",
"0.50380355",
"0.50380355",
"0.5036687",
"0.5036349",
"0.5027927",
"0.5025982",
"0.50252616",
"0.499493",
"0.49877846",
"0.4969182",
"0.4968817",
"0.4955067",
"0.49550435",
"0.49547064",
"0.49496433",
"0.4939487",
"0.49342784",
"0.4928634",
"0.4926769",
"0.49256837",
"0.49246666",
"0.4918079",
"0.49123943",
"0.4904103",
"0.49016002",
"0.4897012",
"0.48629388",
"0.48593724",
"0.4858854",
"0.48561403",
"0.48385617",
"0.4833509",
"0.48328316",
"0.48307675",
"0.4828333",
"0.48106384",
"0.4805671",
"0.48049238",
"0.48041436",
"0.47968704",
"0.47930294",
"0.47872865",
"0.4779272",
"0.4777974",
"0.47768787",
"0.47750637",
"0.4763244",
"0.47630462",
"0.47601256",
"0.47553343",
"0.47495323",
"0.4739589",
"0.47369018",
"0.47328666",
"0.4726744",
"0.4723348"
] | 0.702232 | 0 |
Performs the crop status action. Calls method for player to select a crop. | public void perform(GameState state) {
selectCrop(state);
// returnBack(state); // add back in for command lines
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showCropStatus(int selection, GameState state) {\n System.out.println(\"| You have selected: \" + state.crops.get(selection - 1).getName());\n if (state.crops.get(selection - 1).getPlanted()) {\n \tSystem.out.println(\"| This crop has thirst level: \" + state.crops.get(selection - 1).getThirstLevel() + \"/\" + state.crops.get(selection - 1).getMaxThirstLevel());\n System.out.println(\"| It has grown for \" + state.crops.get(selection - 1).getCurrentGrowthLevel() + \" day(s).\");\n int days_left = state.crops.get(selection - 1).getDaysUntilHarvest() - state.crops.get(selection - 1).getCurrentGrowthLevel();\n System.out.println(\"| Day(s) left until harvest: \" + days_left);\n } else {\n System.out.println(\"| This crop has not been planted yet.\");\n }\n\n }",
"public void selectCrop(GameState state) {\n s = new Scanner(System.in);\n int selection = 0;\n String cropOptions = \"\";\n\n for (int i = 1; i <= state.crops.size(); i ++) {\n cropOptions = cropOptions.concat(\"| \" + i + \". \" + state.crops.get(i-1).getName() + \"\\n\");\n }\n \n if (cropOptions.length() == 0) {\n \tSystem.out.println(\"|--------------------|\\r\\n\" +\n \t\t \t\t\t \"| You have no crops! |\\r\\n\" +\n \t\t \t\t\t \"|--------------------|\");\n } else {\n\n\t System.out.println(\"|----------------|\\r\\n\" +\n\t \"| Select a crop. |\\r\\n\" +\n\t \"|----------------|\");\n\t\n\t do {\n\t System.out.println(cropOptions);\n\t selection = s.nextInt();\n\t \n\t\n\t } while(selection < 1 || selection > state.crops.size());\n\t \n\t showCropStatus(selection, state);\n\t \n }\n }",
"private void manageCrops() {\r\n// System.out.println(\"\\nThis is manage the crops option\");\r\n CropView.runCropsView();\r\n }",
"private void performCrop() {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(picUri, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n// cropIntent.putExtra(\"aspectX\", 1);\r\n// cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n// cropIntent.putExtra(\"outputX\", 256);\r\n// cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning li_history onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }",
"private void startCropImage() {\n }",
"public void handle(ActionEvent e) {\n Bounds selectionBounds = rubberBandSelection.getBounds();\n\n // show bounds info\n System.out.println( \"Selected area: \" + selectionBounds);\n\n // crop the image\n crop( selectionBounds);\n\n }",
"public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }",
"public void setCropType(int cropType) {\n\n this.cropType = cropType;\n }",
"public void actionPerformed(ActionEvent event) {\r\n String command = event.getActionCommand();\r\n\r\n if (command.equals(\"OK\")) {\r\n\r\n if (setVariables()) {\r\n callAlgorithm();\r\n }\r\n } else if (command.equals(\"Cancel\")) {\r\n dispose();\r\n } else if (command.equals(\"Help\")) {\r\n \t//MipavUtil.showHelp(\"U4023\");\r\n MipavUtil.showWebHelp(\"Cropping_images#Crop_Boundary_Pixels\");\r\n } else {\r\n super.actionPerformed(event);\r\n }\r\n }",
"public int getCropType() {\n\n return cropType;\n }",
"private void cropImage() {\n\t\t// Use existing crop activity.\n\t\tIntent intent = new Intent(\"com.android.camera.action.CROP\");\n\t\tintent.setDataAndType(mImageCaptureUri, IMAGE_UNSPECIFIED);\n\n\t\t// Specify image size\n\t\tintent.putExtra(\"outputX\", 100);\n\t\tintent.putExtra(\"outputY\", 100);\n\n\t\t// Specify aspect ratio, 1:1\n\t\tintent.putExtra(\"aspectX\", 1);\n\t\tintent.putExtra(\"aspectY\", 1);\n\t\tintent.putExtra(\"scale\", true);\n\t\tintent.putExtra(\"return-data\", true);\n\n\t\t// REQUEST_CODE_CROP_PHOTO is an integer tag you defined to\n\t\t// identify the activity in onActivityResult() when it returns\n\t\tstartActivityForResult(intent, REQUEST_CODE_CROP_PHOTO);\n\t}",
"public void setCropRect(Rect cropRect) {\n this.cropRect = cropRect;\n //invalidate();\n }",
"@Method(selector = \"crop:imagePath:width:height:x:ycompletionBlock:\")\n\tpublic native void crop(String name, String imagePath, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);",
"public String GetCropType()\n {\n return this.cropType;\n }",
"public void onCoverSelected() {\n final Optional<Uri> coverImageUriWrapper = entityToBind.getCoverImageUri();\n if (coverImageUriWrapper.isPresent()) {\n final int coverMaxWidth = assetsComputationHelper.getCoverMaxWidth();\n final int coverMaxHeight = assetsComputationHelper.getCoverMaxHeight();\n Glide.with(getContext())\n .load(coverImageUriWrapper.get())\n .override(coverMaxWidth, coverMaxHeight)\n .centerCrop()\n .into(coverImageView);\n }\n }",
"public void setCropName(String cropName) {\n\t\n\t\tthis.cropName = cropName;\n\t\n\t}",
"private void onSaveClicked() {\n if (mCropView == null) {\n return;\n }\n\n if (mSaving) return;\n mSaving = true;\n\n Bitmap croppedImage;\n\n // If the output is required to a specific size, create an new image\n // with the cropped image in the center and the extra space filled.\n if (outputX != 0 && outputY != 0 && !scale) {\n // Don't scale the image but instead fill it so it's the\n // required dimension\n croppedImage = Bitmap.createBitmap(outputX, outputY, Bitmap.Config.RGB_565);\n Canvas canvas = new Canvas(croppedImage);\n\n Rect srcRect = mCropView.getCropRect();\n Rect dstRect = new Rect(0, 0, outputX, outputY);\n\n int dx = (srcRect.width() - dstRect.width()) / 2;\n int dy = (srcRect.height() - dstRect.height()) / 2;\n\n // If the srcRect is too big, use the center part of it.\n srcRect.inset(Math.max(0, dx), Math.max(0, dy));\n\n // If the dstRect is too big, use the center part of it.\n dstRect.inset(Math.max(0, -dx), Math.max(0, -dy));\n\n // Draw the cropped bitmap in the center\n canvas.drawBitmap(mBitmap, srcRect, dstRect, null);\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n } else {\n Rect r = mCropView.getCropRect();\n\n int width = r.width();\n int height = r.height();\n\n // If we are circle cropping, we want alpha channel, which is the\n // third param here.\n croppedImage = Bitmap.createBitmap(width, height,\n circleCrop ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);\n\n Canvas canvas = new Canvas(croppedImage);\n\n if (circleCrop) {\n final int color = 0xffff0000;\n final Paint paint = new Paint();\n final Rect rect = new Rect(0, 0, croppedImage.getWidth(), croppedImage.getHeight());\n final RectF rectF = new RectF(rect);\n\n paint.setAntiAlias(true);\n paint.setDither(true);\n paint.setFilterBitmap(true);\n canvas.drawARGB(0, 0, 0, 0);\n paint.setColor(color);\n canvas.drawOval(rectF, paint);\n\n paint.setColor(Color.BLUE);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth((float) 4);\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));\n canvas.drawBitmap(mBitmap, r, rect, paint);\n }\n else {\n Rect dstRect = new Rect(0, 0, width, height);\n canvas.drawBitmap(mBitmap, r, dstRect, null);\n }\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n\n // If the required dimension is specified, scale the image.\n if (outputX != 0 && outputY != 0 && scale) {\n croppedImage = BitmapUtils.transform(new Matrix(), croppedImage,\n outputX, outputY, scaleUp, BitmapUtils.RECYCLE_INPUT);\n }\n }\n\n mImageView.setImageBitmapResetBase(croppedImage, true);\n mImageView.center(true, true);\n mImageView.getHighlightViews().clear();\n\n // save it to the specified URI.\n final Bitmap b = croppedImage;\n new AsyncTask<Void, Integer, IImage>() {\n ProgressDialog pd;\n\n @Override\n protected void onPreExecute() {\n pd = ProgressDialog.show(CropPhotoActivity.this, null,\n getResources().getString(R.string.saving_image));\n }\n\n @Override\n protected IImage doInBackground(Void[] params) {\n return saveOutput(b);\n }\n\n @Override\n protected void onPostExecute(IImage image) {\n pd.dismiss();\n mImageView.clear();\n b.recycle();\n\n if (image != null) {\n ArrayList<IImage> images = new ArrayList<>();\n images.add(image);\n\n Intent data = new Intent();\n data.putParcelableArrayListExtra(\"data\", images);\n setResult(Activity.RESULT_OK, data);\n finish();\n }\n }\n }.execute();\n }",
"@Override\n\t protected int getCropItem()\n\t {\n\t\t return cropID;\n\t }",
"public String getCropName(){\n return this.cropName;\n }",
"private void performCrop(Uri img) {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(img, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n // cropIntent.putExtra(\"aspectX\", 1);\r\n //cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n // cropIntent.putExtra(\"outputX\", 256);\r\n // cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning in onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }",
"protected void cropImage() {\n if (mOptions.noOutputImage) {\n setResult(null, null, 1);\n } else {\n Uri outputUri = getOutputUri();\n mCropImageView.saveCroppedImageAsync(\n outputUri,\n mOptions.outputCompressFormat,\n mOptions.outputCompressQuality,\n mOptions.outputRequestWidth,\n mOptions.outputRequestHeight,\n mOptions.outputRequestSizeOptions);\n }\n }",
"public void onSelectProfilePic() {\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n Profile profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n if (profile.getIcon().equals(\"icon\" + currentIndex)) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" has already selected this player icon!\");\n return;\n }\n\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" is not a high enough level for this profile picture!\");\n return;\n }\n\n playerRecord.setStyle(\"-fx-background-color: transparent\");\n PrintWriter user = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + playerPicked + \".txt\"));\n user.flush();\n user.write(profile.getWins() + \" \" + profile.getLosses() + \" \" + profile.getXp() + \" \"\n + profile.getWinStreak() + \" icon\" + currentIndex + \" \" + profile.getCarIcon());\n user.close();\n playerRecord.setText(profile.getName() + \" has changed profile pictures.\");\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public String getCropName() {\n\t\n\t\treturn cropName;\n\t\n\t}",
"public void takeCup() {\n updateMessageToUser();\n BufferedImage emptyPicture = null;\n try {\n emptyPicture = ImageIO.read(new File(\"./picts/vide2.jpg\"));\n } catch (IOException ee) {\n ee.printStackTrace();\n }\n currentPicture.setIcon(new ImageIcon(emptyPicture));\n if (currentWaterVolume > 1) {\n currentWaterVolume = 0;\n theFSM.raiseCupGrabbed();\n } else {\n addCupButton.setVisible(true);\n }\n takeCupButton.setVisible(false);\n theFSM.setCupPlaced(false);\n System.out.println(\"Cup taken\");\n }",
"private void beginCrop(Uri source) {\n // pass URI as intent to the CROP Activity;\n if (mPhotoFile != null) {\n Uri destination = FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile);\n Log.d(TAG, \"URI: \" + destination.toString());\n Crop.of(source, destination).asSquare().start(this);\n }\n }",
"private void onSaveClicked() {\n if (mCrop == null || mIsSaving) {\n return;\n }\n mIsSaving = true;\n Bitmap croppedImage = null;\n Rect r = mCrop.getCropRect();\n int width = r.width();\n int height = r.height();\n\n int outWidth = width, outHeight = height;\n if (mMaxX > 0 && mMaxY > 0 && (width > mMaxX || height > mMaxY)) {\n float ratio = (float) width / (float) height;\n if ((float) mMaxX / (float) mMaxY > ratio) {\n outHeight = mMaxY;\n outWidth = (int) ((float) mMaxY * ratio + .5f);\n } else {\n outWidth = mMaxX;\n outHeight = (int) ((float) mMaxX / ratio + .5f);\n }\n }\n if (IN_MEMORY_CROP && mRotateBitmap != null) {\n croppedImage = inMemoryCrop( mRotateBitmap, croppedImage, r,\n width * sampleSize,\n height * sampleSize,\n outWidth * sampleSize,\n outHeight * sampleSize );\n if (croppedImage != null) {\n mImageView.setImageBitmapResetBase( croppedImage, true );\n mImageView.center( true, true );\n mImageView.mHighlightViews.clear();\n }\n } else {\n try {\n croppedImage = decodeRegionCrop( croppedImage, r );\n } catch (IllegalArgumentException e) {\n setResultException( e );\n finish();\n return;\n }\n\n if (croppedImage != null) {\n mImageView.setImageRotateBitmapResetBase( new RotateBitmap( croppedImage, mExifRotation ), true );\n mImageView.center( true, true );\n mImageView.mHighlightViews.clear();\n }\n }\n if(croppedImage.getWidth() > mMaxX || croppedImage.getHeight() > mMaxY) {\n croppedImage = getResizedBitmap(croppedImage, mMaxX, mMaxY);\n }\n\n saveImage(croppedImage);\n }",
"public void doCut ( RunData data)\n\t{\n\t\t// get the state object\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\tString[] cutItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (cutItems == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile5\"));\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tVector cutIdsVector = new Vector ();\n\t\t\tString nonCutIds = NULL_STRING;\n\n\t\t\tString cutId = NULL_STRING;\n\t\t\tfor (int i = 0; i < cutItems.length; i++)\n\t\t\t{\n\t\t\t\tcutId = cutItems[i];\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (cutId);\n\t\t\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (ContentHostingService.allowRemoveResource (cutId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcutIdsVector.add (cutId);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tnonCutIds = nonCutIds + \" \" + properties.getProperty (ResourceProperties.PROP_DISPLAY_NAME) + \"; \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis15\"));\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\t// try-catch\n\t\t\t}\n\n\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t{\n\t\t\t\tif (nonCutIds.length ()>0)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis16\") +\" \" + nonCutIds);\n\t\t\t\t}\n\n\t\t\t\tif (cutIdsVector.size ()>0)\n\t\t\t\t{\n\t\t\t\t\tstate.setAttribute (STATE_CUT_FLAG, Boolean.TRUE.toString());\n\t\t\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\tVector copiedIds = (Vector) state.getAttribute (STATE_COPIED_IDS);\n\t\t\t\t\tfor (int i = 0; i < cutIdsVector.size (); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tString currentId = (String) cutIdsVector.elementAt (i);\n\t\t\t\t\t\tif ( copiedIds.contains (currentId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcopiedIds.remove (currentId);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (copiedIds.size ()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\t\t\t\t\t}\n\n\t\t\t\t\tstate.setAttribute (STATE_COPIED_IDS, copiedIds);\n\n\t\t\t\t\tstate.setAttribute (STATE_CUT_IDS, cutIdsVector);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t// if-else\n\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n state = \"select\";\r\n instruction.setText(\"Drag the rectangle to cover the whole shape which you want to select\");\r\n\r\n }",
"@Method(selector = \"crop:imageData:width:height:x:y:completionBlock:\")\n\tpublic native void crop(String name, NSData imageData, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);",
"@Override\n @SuppressLint(\"NewApi\")\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n\n // For API >= 23 we need to check specifically that we have permissions to read external storage.\n if (CropImage.isReadExternalStoragePermissionsRequired(this, imageUri)) {\n // request permissions and handle the result in onRequestPermissionsResult()\n cropImageUri = imageUri;\n Log.d(TAG, \"onActivityResult PICK_IMAGE_CHOOSER_REQUEST_CODE:\" + cropImageUri);\n requestPermissions(new String[]{Manifest.permission.READ_EXTERNAL_STORAGE}, CropImage.PICK_IMAGE_PERMISSIONS_REQUEST_CODE);\n } else {\n // no permissions required or already grunted, can start crop image activity\n Log.d(TAG, \"onActivityResult PICK_IMAGE_CHOOSER_REQUEST_CODE no permission:\" + imageUri);\n startCropImageActivity(imageUri);\n\n }\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n Uri resultUri = result.getUri();\n Log.d(TAG, \"CROP_IMAGE_ACTIVITY_REQUEST_CODE ok:\" + resultUri);\n cropImageUri = resultUri;\n if (optionFragment == null) {\n vpSubArea.setAdapter(new TabsAdapter(getSupportFragmentManager()));\n }\n optionFragment.setVoteImage(resultUri);\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n }\n }\n }",
"private void reDrowStatusCard() {\n \t\tint currentInstance= Storage_access.getCurrentProjectInstanceBDDID() ;\n \t\t\n \t\tdispatcher.execute(new GetActivityStateAction(currentInstance), new AsyncCallback<GetActivityStateActionResult>() {\n \n \t\n \n \t\t\t@Override public void onFailure(Throwable arg0) {\n \t\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!!!!!!!**** failed to get activities status\");\n \n \t\t\t}\n \n \t\t\t@Override public void onSuccess(GetActivityStateActionResult result) {\n \t\t\t\tfor (int i=0; i< Storage_access.getNumberOfCard(); i++) {\n \t\t\t\t\tString card = Storage_access.getCard(i);\n \t\t\t\t\tActivityState_dto a = result.getActivitiesState().get(\"\"+Storage_access.getBddIdCard(card));\n \t\t\t\t\tif (a == null) \n \t\t\t\t\t\tStorage_access.revoveFromSlot(i);\t\n \t\t\t\t\telse \n \t\t\t\t\t\tStorage_access.setSlotCard(i, a.getDay(), a.getPeriod());\t\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\teventBus.fireEvent( \n \t\t\t\t\t\tnew BoardViewChangedEvent(getView().getCombo_viewChoice1().getSelectedIndex(),\n \t\t\t\t\t\t\t\t\t\t\t\t getView().getCombo_viewChoice2().getSelectedIndex())\n \t\t\t\t\t\t);\n \t\t\t\t//Storage_access.printStorage();\n \t\t\t}\n \n \t\t\t});\n \n \t\t\n \t}",
"private void handleCrop(int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n Uri uri = Crop.getOutput(data);\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);\n mImageCaptureUri = uri;\n mImageView.setImageBitmap(bitmap);\n } catch (Exception e) {\n Log.d(TAG, e.getMessage());\n }\n\n } else if (resultCode == Crop.RESULT_ERROR) {\n Toast.makeText(this, Crop.getError(data).getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t\r\n\t\t\t\tcontroller.newShot();\r\n\t\t\t\tint selected = clubList.getSelectedIndex();\r\n\t\t\t\tif (selected >= 0){\r\n\t\t\t\t\tString selectedClub = (String)clubList.getModel().getElementAt(selected);\r\n\t\t\t\t\tcontroller.selectClub(selectedClub);\r\n\t\t\t\t\tcontroller.startShot();\r\n\t\t\t\t\t\r\n\t\t\t\t\tUI.getInstance().show(PanelNames.END_SHOT);\r\n\t\t\t\t\tclubList.clearSelection();\r\n\t\t\t\t}\r\n\t\t\t}",
"private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}",
"public void requestCopyPose()\r\n {\r\n \tAnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI(); \r\n \r\n boolean continueToCopy = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToCopy = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToCopy)\r\n {\r\n \tcontinueToCopy = poseIO.copyPose(currentPoseName, poseID);\r\n }\t \r\n \r\n \tif (continueToCopy)\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_TEXT,\r\n\t POSE_COPIED_TITLE_TEXT,\r\n\t JOptionPane.INFORMATION_MESSAGE);\r\n \t\tAnimatedSpriteEditor.getEditor().getFileManager().reloadSpriteType();\r\n EditorStateManager stateManager = AnimatedSpriteEditor.getEditor().getStateManager();\r\n stateManager.setState(EditorState.SELECT_POSE_STATE);\r\n stateManager.getPoseurStateManager().setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t}\r\n \telse\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_ERROR_TEXT,\r\n\t POSE_COPIED_ERROR_TITLE_TEXT,\r\n\t JOptionPane.ERROR_MESSAGE);\r\n \t}\r\n \t\r\n }",
"@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tsummaryPanel.updatePlayerStatus(player.getPlayerId());\n\t\t\t}",
"private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}",
"public void onClick(View v) {\n\t\t\tFile avator=new File(FileUtil.getImgPath(),\"avator.jpg\");\n\t\t\tif(avator.exists())\n\t\t\t\tavator.delete();\n\t\t\ttry {\n\t\t\t\tavator.createNewFile();\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\timageUri=Uri.fromFile(avator);//将file对象转换为uri对象。\n\t\t\tIntent intent=new Intent(\"com.android.camera.action.CROP\");\n\t\t\tintent.setAction(Intent.ACTION_PICK);\n\t\t\tintent.setType(\"image/*\");\n\t\t\tintent.putExtra(\"crop\", true);\n\t\t\tintent.putExtra(\"scale\", true);\n\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);\n\t\t\tstartActivityForResult(intent, ADAVTOR_CONST);\n\t\t}",
"public void onPagesCropped() {\n/* 560 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ try {\n/* 565 */ JSONObject jsonObj = new JSONObject();\n/* 566 */ if (this.mContext != null) {\n/* 567 */ String strCropPages = this.mContext.getResources().getString(R.string.pref_viewmode_user_crop);\n/* 568 */ jsonObj.put(\"Action\", strCropPages);\n/* */ } \n/* 570 */ jsonObj.put(\"Action event\", \"crop_pages\");\n/* */ \n/* 572 */ if (Utils.isNullOrEmpty(jsonObj.toString())) {\n/* 573 */ AnalyticsHandlerAdapter.getInstance().sendException(new Exception(\"takeUndoSnapshot with an empty string\"));\n/* */ }\n/* */ \n/* 576 */ takeUndoSnapshot(jsonObj.toString());\n/* 577 */ if (sDebug)\n/* 578 */ Log.d(TAG, \"snapshot: \" + jsonObj.toString()); \n/* 579 */ } catch (Exception e) {\n/* 580 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }",
"@Override\n public void performAction(UI client) {\n client.chooseCards(possibleCards, num, pickedCards);\n }",
"public void setCropSupply(CropSupply cropSupply) {\n\n this.cropSupply = cropSupply;\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n this.appFrame.getInfoPanel().cleanUp();\n\n // Here I assume the player is not null, because only valid player will be shown in the combo box\n this.gameStatus.setSelectedPlayer(\n (GuiPlayer)this.appFrame.getToolbarPanel().getSelectionComboBox().getSelectedItem());\n\n // Update balance label\n JLabel playerBalanceLabel = this.appFrame.getInfoPanel().getPlayerBalanceLabel();\n playerBalanceLabel.setText(String.format(\"Balance: %d\", this.gameStatus.getSelectedPlayer().getPoints()));\n }",
"protected abstract boolean takeAction (Shape selected, int x, int y);",
"public void actionPerformed(ActionEvent e) {\n\n\t\tif (e.getSource() == openImageOption) {\n\n\t\t\t// Create a JFileChooser Dialog Box to select image files\n\n\t\t\tJFileChooser selectFile = new JFileChooser();\n\n\t\t\t// Select for certain file types\n\n\t\t\tFileNameExtensionFilter filterFiles = new FileNameExtensionFilter(\"JPG, JPEG, GIF, PNG, & BMP Images\",\n\t\t\t\t\t\"jpg\", \"jpeg\", \"gif\", \"png\", \"bmp\");\n\n\t\t\tselectFile.setFileFilter(filterFiles);\n\n\t\t\tint returnVal = selectFile.showOpenDialog(selectFile);\n\n\t\t\t// If statements for selection approval\n\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\n\t\t\t\tFile imageFile = selectFile.getSelectedFile();\n\n\t\t\t\ttry {\n\n\t\t\t\t\toriginalImage = ImageIO.read(imageFile);\n\t\t\t\t\timagePane.removeAll();\n\t\t\t\t\t// imagePane.add(new ImagePanel(originalImage), \"Original\n\t\t\t\t\t// Image\");\n\t\t\t\t\toriginalPanel = new ImagePanel(originalImage);\n\t\t\t\t\timagePane.add(\"Original Image\", originalPanel);\n\n\t\t\t\t\t// Enable the Radio Buttons to allow for filter selection\n\t\t\t\t\tbutton1.setEnabled(true);\n\t\t\t\t\tbutton2.setEnabled(true);\n\t\t\t\t\tbutton3.setEnabled(true);\n\t\t\t\t\tbutton4.setEnabled(true);\n\t\t\t\t\tbutton5.setEnabled(true);\n\t\t\t\t\tbutton6.setEnabled(true);\n\t\t\t\t\tbutton7.setEnabled(true);\n\t\t\t\t\tbutton8.setEnabled(true);\n\t\t\t\t\tbutton9.setEnabled(true);\n\t\t\t\t\tbutton10.setEnabled(true);\n\t\t\t\t\tbutton11.setEnabled(true);\n\t\t\t\t\tbutton12.setEnabled(true);\n\t\t\t\t\tcropButton.setEnabled(true);\n\t\t\t\t\tfilterButton.setEnabled(true);\n\t\t\t\t\tregionFilterButton.setEnabled(true);\n\n\t\t\t\t} catch (Exception f) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else if (e.getSource() == saveImageOption) {\n\t\t\t// Save the File\n\t\t\tJFileChooser writeImage = new JFileChooser();\n\t\t\tFileNameExtensionFilter filteredFiles = new FileNameExtensionFilter(\"JPG\", \"jpg\");\n\t\t\twriteImage.setFileFilter(filteredFiles);\n\n\t\t\tint returnValue = writeImage.showSaveDialog(null);\n\n\t\t\tif (returnValue == JFileChooser.APPROVE_OPTION) {\n\t\t\t\ttry {\n\t\t\t\t\tFile file = writeImage.getSelectedFile();\n\t\t\t\t\tString fileName = file.getAbsolutePath();\n\t\t\t\t\tfile = new File(fileName + \".jpg\");\n\t\t\t\t\tImageIO.write(finalImage, \"JPG\", file);\n\n\t\t\t\t} catch (Exception g) {\n\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\n\t}",
"@FXML\n private void chooseBasicPfpAction()\n {\n accountPanel.setCenter(getChooseAvatarMenu());\n getAccountStage().sizeToScene();\n }",
"protected void onSelectionPerformed(boolean success) {\n }",
"private void pickCountry() {\r\n\t\tmch.clicked = false;\r\n\t\tloadButton.setVisible(false);\r\n\t\t\r\n\t\t//creates a temporary country to be moved around\r\n\t\tCountry tempC = null;\r\n\r\n\t\t//ensure the country that was clicked has yet to be claimed\r\n\t\tfor (int j = 0; j < CountryPicker.size(); j++) {\r\n\t\t\t//Add this country to the player's arrayList\r\n\t\t\tif (hoveredColor.equals(CountryPicker.get(j).getDetectionColor())) {\r\n\t\t\t\tCountryPicker.get(j).setClicked(true);\r\n\t\t\t\ttempC = CountryPicker.get(j);\r\n\t\t\t\t//colors the chosen country to the selecting player's color\r\n\t\t\t\tfor (int i = 0; i < CountryPicker.size(); i++) {\r\n\t\t\t\t\tif (CountryPicker.get(i).isClicked() == true) {\r\n\t\t\t\t\t\t threadz.recolorCountry(CountryPicker.get(i), players.get(turnCounter).getColor(), false );\r\n\t\t\t\t\t\tCountryPicker.remove(i);\r\n\t\t\t\t\t\ttempC.setTroops(1);\r\n\t\t\t\t\t\tplayers.get(turnCounter).addCountries(tempC);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Move on to the next player's turn\r\n\r\n\t\t\t\tturnCounter++;\r\n\t\t\t\tif (turnCounter >= players.size()) {\r\n\t\t\t\t\tturnCounter = 0;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if there are no countriies left, reset the turn so player one moves first\r\n\t\tif (CountryPicker.size() == 0) {\r\n\t\t\tturnCounter = 0;\r\n\t\t}\r\n\r\n\t}",
"@Override\n\tpublic List<Crop> activeCrops() {\n\t\treturn cropRepository.getActiveCrops();\n\t}",
"public interface Listener {\n void onCropImage(Bitmap original, Bitmap croppedBitmap);\n }",
"public native MagickImage cropImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;",
"private void posButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_posButtonActionPerformed\n //ResultConclusion last = Main.mainProject.getCurrentCase().getConclusion();\n //Main.mainProject.getStatistics().addValue(last, -1);\n\n // Main.mainProject.getCurrentCase().setConclusion(ResultConclusion.PERCEPTUALLY_SAME);\n // Main.mainProject.getStatistics().addValue(ResultConclusion.PERCEPTUALLY_SAME, 1);\n Main.mainProject.getCurrentCase().setResultRecursive(ResultConclusion.PERCEPTUALLY_SAME);\n\n Main.interfaceFrame.getStatFrame().update(Main.mainProject);\n\n updateIcons();\n updateCheckBoxes(Main.mainProject.getStatistics());\n }",
"private void beginCrop(Uri source) {\n Uri destination = Uri.fromFile(new File(getCacheDir(), \"cropped\"));\n Crop.of(source, destination).asSquare().start(this);\n }",
"@Override\n public void onCropWindowChanged() {\n Bitmap cropped = imageView.getCroppedImage();\n BitmapHelper.getInstance().setBitmap(cropped);\n bitmap=cropped;\n\n }",
"void setCrouching(boolean crouching);",
"@FXML\r\n\tprivate void updateStatus(ActionEvent event) {\r\n\t\tupdateAsset(AssetOperation.STATUS);\r\n\t}",
"@Override\n public void onClick(View v) {\n CropImage.activity()\n .setGuidelines(CropImageView.Guidelines.ON)\n .start(SettingActivityDonor.this);\n\n }",
"@Generated\n @Selector(\"setCropRectangle:atTime:\")\n public native void setCropRectangleAtTime(@ByValue CGRect cropRectangle, @ByValue CMTime time);",
"public void clipCompleted(){\n // unbind service\n getApplicationContext().unbindService(mConnection);\n mIsBound = false;\n\n // disabled and enable the specified buttons\n startButton.setEnabled(false);\n stopButton.setEnabled(true);\n resumeButton.setEnabled(false);\n pauseButton.setEnabled(false);\n stopPlayback.setEnabled(false);\n playButton.setEnabled(false);\n\n //reset items in list to default state\n adapter = new ListAdapter(this, audioList, durationList);\n mRecyclerView.setAdapter(adapter);\n findViewById(R.id.overlay).setVisibility(View.GONE);\n }",
"@Override\r\n\tpublic void onClick(View v) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\t//===== Get Selected user values======//\r\n\t\t\tString userName = (String) sp.getSelectedItem();\r\n\t\t\titerator = db.rawQuery(\"SELECT * FROM UserStage WHERE User='\"\r\n\t\t\t\t\t+ userName + \"';\", null);\r\n\t\t\titerator.moveToFirst();\r\n\t\t\tint stage = iterator.getInt(iterator.getColumnIndex(\"Stage\"));\r\n\t\t\tint level = iterator.getInt(iterator.getColumnIndex(\"Level\"));\r\n\t\t\titerator.close();\r\n\t\t\tdb.close();\r\n\t\t\t//===== Get Selected user values======//\r\n\t\t\t\r\n\t\t\t//===== Start The Game ======//\r\n\t\t\tController.stage=stage;\r\n\t\t\tController.setUserName(userName);\r\n\t\t\tnew MyProgressBarMenu(getApplicationContext(),this, level).execute();\r\n\t\t\t//===== Start The Game ======//\r\n\t\t} catch (Exception e) {\r\n\t\t\tMyAlertBox mab=new MyAlertBox(this,\"2: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"protected void execute() {\n\t\trightTalon.getMotionProfileStatus(status);\n\n\t\tif (status.isUnderrun) {\n\t\t\t// if either MP has underrun, stop both\n\t\t\tSystem.out.println(\"Motion profile has underrun!\");\n\t\t\tsetValue = SetValueMotionProfile.Disable;\n\t\t} else if (status.btmBufferCnt > kMinPointsInTalon) {\n\t\t\t// if we have enough points in the talon, go.\n\t\t\tsetValue = SetValueMotionProfile.Enable;\n\t\t} else if (status.activePointValid && status.isLast) {\n\t\t\t// if both profiles are at their last points, hold the last point\n\t\t\tsetValue = SetValueMotionProfile.Hold;\n\t\t}\n\n\t\trightTalon.set(ControlMode.MotionProfileArc, setValue.value);\n\t}",
"@Override\n\t\tprotected String doInBackground(String... arg0) {\n\t\t\tBitmap ret = takeScreenShot(0, 0 + mStatusBarHeight,\n\t\t\t\t\tmDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels\n\t\t\t\t\t\t\t- mStatusBarHeight);\n\n\t\t\t// CopyOfScreenShotActivity cc = new CopyOfScreenShotActivity(1);\n\t\t\t// Bitmap ret = cc.getScreenShot(cc.getDevice());\n\t\t\tif (ret != null) {\n\t\t\t\tif (cropRect != null) {// rectangle\n\t\t\t\t\tret = cropImage(ret, cropRect);\n\t\t\t\t\tif (mIsOval)\n\t\t\t\t\t\tret = Utils.getOval(ret);\n\t\t\t\t}\n\t\t\t\tcutSuccess = makeFile(ret);\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"protected void execute() {\n\t\tBBox bBox = bBoxLocator.getBBox();\n\t\tSmartDashboard.putBoolean(\"Can See With Vision\", wasDetected);\n\n\t\tif (bBox != null) {\n\t\t\twasDetected = true;\n\t\t\tpidAngle.setSetpoint(Robot.drivetrain.getHeading() + bBox.angleDeg);\n\t\t\tSmartDashboard.putNumber(\"PID Vision Setpoint Angle\", pidAngle.getSetpoint());\n\t\t}\n\n\t\tif (!waitForVision || wasDetected) {\n\t\t\tRobot.drivetrain.drive(driveOutput * (useAccelerationFiler ? filter.output() : 1), driveCurve);\n\t\t}\n\t}",
"@Override\n\tpublic boolean onTouch(View v, MotionEvent event) {\n\t\tLog.d(TAG, \"onTouch\");\n\t\treturn mCropView.onTouchEvent(event, this);\n\t}",
"public void savePicture() {\n\t\tLog.d(TAG, \"savePicture\");\n\t\t\n\t\tFile cropFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + \"/Lente/crop.jpg\");\n\t\tmCropView.setDrawingCacheEnabled(true);\n\t\tBitmap bm = Bitmap.createBitmap(mCropView.getDrawingCache());\n\t\tmCropView.setDrawingCacheEnabled(false);\n\t\t\n\t\ttry {\n\t\t FileOutputStream outputStream = new FileOutputStream(cropFile);\n\t\t Log.d(TAG, \"Compressing and saving...\");\n\t\t bm.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n\t\t outputStream.flush();\n\t\t outputStream.close();\n\t\t \n\t\t MediaScannerConnection.scanFile(getBaseContext(),\n\t new String[] { cropFile.toString() }, null,\n\t new MediaScannerConnection.OnScanCompletedListener() {\n\t public void onScanCompleted(String path, Uri uri) {\n\t Log.i(\"ExternalStorage\", \"Scanned \" + path + \":\");\n\t Log.i(\"ExternalStorage\", \"-> uri=\" + uri);\n\t //passUri(uri); //Pass the URI once obtained and move onto OCRopus\n\t }\n\t\t\t});\n\t }\n\t\t\n\t\tcatch (IOException e) {\n\t\t\tToast.makeText(ImageTextSelect.this, \"Failed to save selected image area.\", 2000).show();\n\t\t\tLog.e(TAG, \"IO Exception\");\n\t\t}\n\t}",
"public void saveActions()\r\n {\r\n\t imageCopy[0] = bufferedImage;\r\n\t imageCopy[1] = edited;\r\n\t imageCopy[2] = cropedPart;\r\n\t imageCopy[3] = bufferedImage;\r\n\t \r\n\t statesCopy[0] = isBlured;\r\n\t statesCopy[1] = isReadyToSave;\r\n\t statesCopy[2] = isChanged;\r\n\t statesCopy[3] = isInverted;\r\n\t statesCopy[4] = isRectangularCrop;\r\n\t statesCopy[5] = isCircularCrop;\r\n\t statesCopy[6] = isImageLoaded;\r\n\t \r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n startCropImageActivity(imageUri);\n }\n\n // handle result of CropImageActivity\n if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n mCroppedImageUri = result.getUri();\n mImageView.setImageURI(mCroppedImageUri);\n }\n }\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tif (getSelected() == null)\n\t\t\t{\n\t\t\t\tprintMsg(\"Select cards to play.\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgame.makeMove(activePlayer, getSelected());\n\t\t\t}\n\t\t}",
"public void passSelectedCard(int index){\n\t\tSystem.out.println(\"PLAYER SELECTED CARD INDEX \" + index);\n\t\twaitingUser = false;\n\t\tplaySubRound(index);\n\n\t\ttodoThread();\n\t}",
"private void handleCrop(int resultCode, Intent result) {\n if (resultCode == RESULT_OK) {\n try {\n Uri uri = Crop.getOutput(result);\n yourSelectedImage = MediaStore.Images.Media.getBitmap(this.getContentResolver(), Crop.getOutput(result));\n ivUserImage.setImageBitmap(yourSelectedImage);\n Uri tempUri = Util.getInstance().getImageUri(SignUp.this, yourSelectedImage);\n // createImageFromBitmap(yourSelectedImage);\n // tempFilePath = FileUtil.getPath(this,tempUri);\n tempFilePath = FileUtil.getPath(SignUp.this, tempUri);\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else if (resultCode == Crop.RESULT_ERROR) {\n // Toast.makeText(this, Crop.getError(result).getMessage(), Toast.LENGTH_SHORT).show();\n }\n }",
"public void onSelectCarPic() {\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n Profile profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n String carSelected = \"car\";\n switch(currentIndexCar) {\n case 0:\n carSelected = \"car\";\n break;\n case 1:\n carSelected = \"truck\";\n break;\n case 2:\n carSelected = \"bike\";\n break;\n case 3:\n carSelected = \"sportscar\";\n break;\n }\n\n if (profile.getCarIcon().equals(carSelected)) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" has already selected this vehicle!\");\n return;\n }\n\n if (!carIconLevelCheck(carSelected, profile.getLevel())) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n carIcon.setOpacity(.5);\n playerRecord.setText(profile.getName() + \" is not high enough level to choose this vehicle!\");\n return;\n }\n playerRecord.setStyle(\"-fx-background-color: transparent\");\n PrintWriter user = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + playerPicked + \".txt\"));\n user.flush();\n user.write(profile.getWins() + \" \" + profile.getLosses() + \" \" + profile.getXp() + \" \"\n + profile.getWinStreak() + \" \" + profile.getIcon() + \" \" + carSelected);\n user.close();\n playerRecord.setText(profile.getName() + \" has changed their vehicle to \" + carSelected + \".\");\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode != RESULT_OK) {\n\t\t\tLog.d(\"CS65\", \"Camera error: result not ok.\");\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (requestCode) {\n\t\tcase REQUEST_CODE_CHOOSE_FROM_GALLERY:\n\t\t\t// Allow user to choose image from internal gallery.\n\t\t\tLog.d(\"CS65\", \"entered choose from gallery request\");\n\t\t\tmImageCaptureUri = data.getData();\n\t\t\tcropImage();\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_TAKE_FROM_CAMERA:\n\t\t\t// Allow user to take a photo from the camera.\n\t\t\t// Send image taken from camera for cropping\n\t\t\tcropImage();\n\t\t\tbreak;\n\n\t\tcase REQUEST_CODE_CROP_PHOTO:\n\t\t\t// Update image view after image crop.\n\t\t\tBundle extras = data.getExtras();\n\t\t\t// Set the picture image in UI\n\t\t\tif (extras != null) {\n\t\t\t\t// Convert bitmap to a byte array and load.\n\t\t\t\tBitmap photo = (Bitmap) extras.getParcelable(\"data\");\n\t\t\t\tbitToByte(photo);\n\t\t\t\tloadImage();\n\t\t\t}\n\n\t\t\t// Delete temporary image taken by camera after crop.\n\t\t\tif (isTakenFromCamera) {\n\t\t\t\tFile f = new File(mImageCaptureUri.getPath());\n\t\t\t\tif (f.exists())\n\t\t\t\t\tf.delete();\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public void setState(CropState state) {\n setData(state.getData());\n }",
"protected void updateStatus() {\n super.updateStatus();\n if (!getHaveData()) {\n if (getAllowMultiple()) {\n setStatus(\"Select one or more files\");\n } else {\n setStatus(\"Select a file\");\n }\n }\n }",
"public void actionPerformed(ActionEvent event) {\n if (event.getActionCommand().equals(EDIT)) {\n if (!canvas.isAncestorOf(colorChooserPanel)) {\n colorChooser.setColor(currentColor);\n \n // Add the colorChooserPanel.\n canvas.addAsFrame(colorChooserPanel);\n colorChooserPanel.requestFocus();\n parent.setEnabled(false);\n // No repainting needed apparently.\n }\n }\n else if (event.getActionCommand().equals(OK)) {\n currentColor = colorChooser.getColor();\n \n if ((lastRow >= 0) && (lastRow < players.size())) {\n Player player = getPlayer(lastRow);\n player.setColor(currentColor);\n }\n \n // Remove the colorChooserPanel.\n canvas.remove(colorChooserPanel);\n parent.setEnabled(true);\n // No repainting needed apparently.\n \n fireEditingStopped();\n }\n else if (event.getActionCommand().equals(CANCEL)) {\n // Remove the colorChooserPanel.\n canvas.remove(colorChooserPanel);\n parent.setEnabled(true);\n // No repainting needed apparently.\n \n fireEditingCanceled();\n }\n else {\n logger.warning(\"Invalid action command\");\n }\n }",
"private void cropCurrRect() {\n\t\tRectangle cropRec = currRect.getBounds();\n\t\tBufferedImage img = currImage.getSubimage(cropRec.x, cropRec.y, cropRec.width, cropRec.height);\n\t\tAffineTransform rotAT = AffineTransform.getRotateInstance(-currRect.getTheta(), cropRec.width, cropRec.height);\n\n\t\tBufferedImageOp bio;\n\t\tbio = new AffineTransformOp(rotAT, AffineTransformOp.TYPE_BICUBIC);\n\t\tBufferedImage rotImg = bio.filter(img, null);\n\t\tColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);\n\t\tColorConvertOp op = new ColorConvertOp(cs, null);\n\t\trotImg = op.filter(rotImg, null);\n\t\t\n\t\tocrExtraction(rotImg);\n\t}",
"protected void execute() {\n \tint POV_value = Robot.m_oi.operator.getPOV();\n \tboolean input = true; \n \t//SmartDashboard.putNumber(\"POV Value\", POV_value);\n\t\tSmartDashboard.putNumber(\"Col Speed\", Robot.ss_Collector.getOutSpeed());\n \tswitch (POV_value){\n \tcase 0:\n \t\tthis.speed = .60;\n \t\tbreak;\n \tcase 45:\n \t\tthis.speed = .50;\n \t\tbreak;\n \tcase 90:\n \t\tthis.speed = .40; \n \t\tbreak;\n \tcase 135:\n \t\tthis.speed = .30;\n \t\tbreak;\n \tcase 180:\n \t\tthis.speed = .20;\n \t\tbreak;\n \tcase 270:\n \t\tthis.speed = .80;\n \t\tbreak;\n \tcase 315: \n \t\tthis.speed = .70;\n \t\tbreak;\n \tdefault:\n \t\tinput = false; \n \t\tbreak;\n \t}\n \t\n \tif (!running && input) {\n\t \trunning = true;\n \t\tthis.c_Drive = new C_CollectorDrive(false, -1, speed);\n \t\tc_Drive.start();\n \t}\n \t\n \telse if (running && !input) {\n \t\trunning = false;\n \t\tthis.c_Drive.cancel();\n \t}\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\r\n\t\tif (e.getSource() == buttonImport) {\r\n\t\t\t/**\r\n\t\t\t * Close this dialog if the profile names are globally unique.\r\n\t\t\t */\r\n\t\t\timportButtonAction();\r\n\t\t} else if (e.getSource() == buttonCancel) {\r\n\t\t\t/**\r\n\t\t\t * Nothing will be used from this import view. Set all available\r\n\t\t\t * profiles to null.\r\n\t\t\t */\r\n\t\t\tparsedProfiles.clear();\r\n\t\t\t/**\r\n\t\t\t * consume an empty set of profiles.\r\n\t\t\t */\r\n\t\t\tthis.setVisible(false);\r\n\t\t} else if (e.getSource() == cbContainsHeader) {\r\n\t\t\t/**\r\n\t\t\t * Skip header option changed. The same actions are needed as in the\r\n\t\t\t * previous delimiter case.\r\n\t\t\t */\r\n\t\t\tparseAction();\r\n\t\t} else if (e.getSource() == cbEnableLenCorrect) {\r\n\t\t\tif (cbEnableLenCorrect.isSelected()) {\r\n\t\t\t\tlabelLengthCorrecton.setEnabled(false);\r\n\t\t\t\ttextfieldLenCorrection.setEnabled(true);\r\n\t\t\t} else {\r\n\t\t\t\tlabelLengthCorrecton.setEnabled(true);\r\n\t\t\t\ttextfieldLenCorrection.setEnabled(false);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t/**\r\n\t\t\t * Default output if a action event occurs and no case covers the\r\n\t\t\t * action.\r\n\t\t\t */\r\n\t\t\tDebug.out\r\n\t\t\t\t\t.println(\"Undefined source in video data selection actionPerformed() ...\");\r\n\t\t}\r\n\t}",
"public CropSupply getCropSupply() {\n\n return cropSupply;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startSelectState();\n\t\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tgsv.startRectangleState();\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmIsSubCamera = true;\n\t\t\t\tDrawable subCameraDrawableSelect = getResources().getDrawable(\n\t\t\t\t\t\tR.drawable.ftp_subcamera_select);\n\t\t\t\tsubCameraDrawableSelect.setBounds(0, 0,\n\t\t\t\t\t\tsubCameraDrawableSelect.getMinimumWidth(),\n\t\t\t\t\t\tsubCameraDrawableSelect.getMinimumHeight());\n\t\t\t\tmSubCamera.setCompoundDrawables(null, subCameraDrawableSelect,\n\t\t\t\t\t\tnull, null);\n\n\t\t\t\tDrawable mainCameraDrawableNormal = getResources().getDrawable(\n\t\t\t\t\t\tR.drawable.ftp_camera_normal);\n\t\t\t\tmainCameraDrawableNormal.setBounds(0, 0,\n\t\t\t\t\t\tmainCameraDrawableNormal.getMinimumWidth(),\n\t\t\t\t\t\tmainCameraDrawableNormal.getMinimumHeight());\n\t\t\t\tmMainCamera.setCompoundDrawables(null,\n\t\t\t\t\t\tmainCameraDrawableNormal, null, null);\n\t\t\t}",
"public boolean isRectangularCrop() {\r\n return isRectangularCrop;\r\n }",
"public void UndoRedoAction()\r\n {\r\n BufferedImage[] tempImages = new BufferedImage[4];\r\n Boolean[] tempStates = new Boolean[7];\r\n \r\n tempImages[0] = bufferedImage;\r\n tempImages[1] = edited;\r\n tempImages[2] = cropedPart;\r\n tempImages[3] = bufferedImage;\r\n\r\n tempStates[0] = isBlured;\r\n tempStates[1] = isReadyToSave;\r\n tempStates[2] = isChanged;\r\n tempStates[3] = isInverted;\r\n tempStates[4] = isRectangularCrop;\r\n tempStates[5] = isCircularCrop;\r\n tempStates[6] = isImageLoaded;\r\n \r\n changeAction();\r\n \r\n imageCopy[0] = tempImages[0];\r\n imageCopy[1] = tempImages[1];\r\n imageCopy[2] = tempImages[2];\r\n imageCopy[3] = tempImages[3];\r\n\r\n statesCopy[0] = tempStates[0];\r\n statesCopy[1] = tempStates[1];\r\n statesCopy[2] = tempStates[2];\r\n statesCopy[3] = tempStates[3];\r\n statesCopy[4] = tempStates[4];\r\n statesCopy[5] = tempStates[5];\r\n statesCopy[6] = tempStates[6];\r\n \r\n repaint();\r\n \r\n }",
"public void drawCropRect(Graphics g, int endX, int endY)\n\t{\n\t\tint leftX, upperY;\n\t\tif(startX < endX)\n\t\t\tleftX = startX;\n\t\telse\n\t\t\tleftX = endX;\n\t\tif(startY < endY)\n\t\t\tupperY = startY;\n\t\telse\n\t\t\tupperY = endY;\n\n\t\tg.setColor(Color.GREEN);\n\t\tg.drawRect(leftX, upperY, Math.abs(endX - startX), Math.abs(endY - startY));\n\t}",
"public void doCopy ( RunData data )\n\t{\n\t\t// get the state object\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tVector copyItemsVector = new Vector ();\n\n\t\tString[] copyItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (copyItems == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile6\"));\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tString copyId = NULL_STRING;\n\t\t\tfor (int i = 0; i < copyItems.length; i++)\n\t\t\t{\n\t\t\t\tcopyId = copyItems[i];\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tResourceProperties properties = ContentHostingService.getProperties (copyId);\n\t\t\t\t\t/*\n\t\t\t\t\tif (properties.getProperty (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tString alert = (String) state.getAttribute(STATE_MESSAGE);\n\t\t\t\t\t\tif (alert == null || ((alert != null) && (alert.indexOf(RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING) == -1)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING);\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\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis15\"));\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\t// try-catch\n\t\t\t}\n\n\t\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.TRUE.toString());\n\n\t\t\t\tcopyItemsVector.addAll(Arrays.asList(copyItems));\n\t\t\t\tContentHostingService.eliminateDuplicates(copyItemsVector);\n\t\t\t\tstate.setAttribute (STATE_COPIED_IDS, copyItemsVector);\n\n\t\t\t}\t// if-else\n\t\t}\t// if-else\n\n\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t\tstartActivityForResult(i, RESULT_LOAD_COVER_IMAGE);\n\n\t\t\t}",
"private void cropEffect(int x, int y, int width, int height) {\n // int que estigui dins la imatge\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_CROP);\n effect.setParameter(\"xorigin\", x);\n effect.setParameter(\"yorigin\", y);\n effect.setParameter(\"width\", width);\n effect.setParameter(\"height\", height);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"public void crack_progress(Cracker cracker);",
"public void cropImage() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { // 마쉬멜로우 이상 버전일 때\n grantUriPermission(\"com.android.camera\", mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n Intent intent = new Intent(\"com.android.camera.action.CROP\");\n intent.setDataAndType(mImageCaptureUri, \"image/*\");\n\n List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, 0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n grantUriPermission(list.get(0).activityInfo.packageName, mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n int size = list.size();\n if (size == 0) {\n Toast.makeText(ManualRegistActivity.this, \"취소 되었습니다.\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n Toast.makeText(ManualRegistActivity.this, \"용량이 큰 사진의 경우 시간이 오래 걸릴 수 있습니다.\", Toast.LENGTH_SHORT).show();\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n intent.putExtra(\"crop\", \"true\");\n intent.putExtra(\"aspectX\", 1);\n intent.putExtra(\"aspectY\", 1);\n intent.putExtra(\"scale\", true);\n croppedFile = null;\n try {\n croppedFile = createImageFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n File folder = new File(Environment.getExternalStorageDirectory() + \"/BioCube/\");\n File tempFile = new File(folder.toString(), croppedFile.getName());\n\n mCurrentPhotoPath = tempFile.getAbsolutePath();\n mImageCaptureUri = FileProvider.getUriForFile(ManualRegistActivity.this,\n \"com.example.seongjun.biocube.provider\", tempFile);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n }\n\n intent.putExtra(\"return-data\", false);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, mImageCaptureUri);\n intent.putExtra(\"outputFormat\", Bitmap.CompressFormat.JPEG.toString());\n\n Intent i = new Intent(intent);\n ResolveInfo res = list.get(0);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n i.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n\n grantUriPermission(res.activityInfo.packageName, mImageCaptureUri,\n Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);\n }\n i.setComponent(new ComponentName(res.activityInfo.packageName, res.activityInfo.name));\n startActivityForResult(i, CROP_FROM_CAMERA);\n }\n }",
"@Override\r\n\tpublic void onClick(View arg0) {\n\t\tswitch(arg0.getId()) {\r\n\t\tcase R.id.tv_back:\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\tcase R.id.tv_done:\r\n\t\t\tString outPath = \"\";\r\n\t\t\tif(isFromSpaceCover) {\r\n\t\t\t\toutPath = photoClipUtil.saveClipImage(true);\r\n\t\t\t} else {\r\n\t\t\t\toutPath = photoClipUtil.saveClipImage();\r\n\t\t\t}\r\n\t\t\tif (outPath != null) {\r\n\t\t\t\tIntent intent = new Intent();\r\n\t\t\t\tintent.putExtra(CLIP_PATH, outPath);\r\n\t\t\t\tsetResult(RESULT_OK,intent);\r\n\t\t\t}\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public void doAction()\n {\n if (app.getBuilderEditorPanel().getBoardViewPanel().getBoard().willPopulate())\n {\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setPopulate(false);\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().resetBoard();\n app.getBuilderEditorPanel().getBoardViewPanel().refresh();\n }\n String levelType = app.getBuilderEditorPanel().getLevelTypeSelector().getSelectedItem().toString();\n int timeLimit = 0;\n if (!app.getBuilderEditorPanel().getTimeLimitSelector().getText().equals(\"\"))\n {\n timeLimit = Integer.parseInt(app.getBuilderEditorPanel().getTimeLimitSelector().getText());\n }\n int moveLimit = 0;\n if (!app.getBuilderEditorPanel().getMoveLimitSelector().getText().equals(\"\"))\n {\n moveLimit = Integer.parseInt(app.getBuilderEditorPanel().getMoveLimitSelector().getText());\n }\n boolean specialMoves = app.getBuilderEditorPanel().getSpecialMovesAllowedSelector().isSelected();\n int threeStar = Integer.parseInt(app.getBuilderEditorPanel().getThreeStarSelector().getText());\n int twoStar = Integer.parseInt(app.getBuilderEditorPanel().getTwoStarSelector().getText());\n int freq1 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"1\");\n int freq2 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"2\");\n int freq3 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"3\");\n int freq4 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"4\");\n int freq5 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"5\");\n int freq6 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"6\");\n int freqx1 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x1\");\n int freqx2 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x2\");\n int freqx3 = app.getBuilderEditorPanel().getOptionsPanel().getFrequencies().get(\"x3\");\n SquareFactory sf1 = new SquareFactory(freq1, freq2, freq3, freq4, freq5, freq6, freqx1, freqx2, freqx3);\n if (app.getBuilderEditorPanel().getCurrentLevel() != null)\n {\n if (levelType.equals(app.getBuilderEditorPanel().getCurrentLevel().getType()))\n {\n Board board = app.getBuilderEditorPanel().getBoardViewPanel().getBoard();\n board.setSquareFactory(new SquareFactory(freq1, freq2, freq3, freq4, freq5,\n freq6, freqx1, freqx2, freqx3));\n String bd = board.getBoardData();\n app.getBuilderEditorPanel().getCurrentLevel().setBoardData(bd);\n app.getBuilderEditorPanel().getCurrentLevel().saveLevel();\n } else {\n Board board = app.getBuilderEditorPanel().getBoardViewPanel().getBoard();\n board.setSquareFactory(new SquareFactory(freq1, freq2, freq3, freq4, freq5,\n freq6, freqx1, freqx2, freqx3));\n String bd = board.getBoardData();\n Level oldLevel = app.getBuilderEditorPanel().getCurrentLevel();\n int idx = game.getLevels().indexOf(oldLevel);\n if (levelType.equals(\"Release\"))\n {\n ReleaseLevel nl = new ReleaseLevel(oldLevel.getBasicLevel());\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Lightning\"))\n {\n LightningLevel nl = new LightningLevel(oldLevel.getBasicLevel());\n nl.setTimeLimit(timeLimit);\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Elimination\"))\n {\n EliminationLevel nl = new EliminationLevel(oldLevel.getBasicLevel());\n game.replaceLevel(nl, idx);\n } else if (levelType.equals(\"Puzzle\"))\n {\n PuzzleLevel nl = new PuzzleLevel(oldLevel.getBasicLevel());\n nl.setMoveLimit(moveLimit);\n game.replaceLevel(nl, idx);\n }\n app.getBuilderEditorPanel().setCurrentLevel(game.getLevels().get(idx));\n app.getBuilderEditorPanel().getCurrentLevel().setBoardData(bd);\n app.getBuilderEditorPanel().getCurrentLevel().saveLevel();\n }\n } else\n {\n Level l = null;\n File outFile = null;\n try\n {\n outFile = new File(getClass().getClassLoader().getResource(\"levels\").toURI().getPath(),\n \"level\" + (game.getLevels().size() + 1) + \".txt\");\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n\n SquareFactory sf = new SquareFactory(freq1, freq2, freq3, freq4, freq5, freq6, freqx1, freqx2, freqx3);\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setSquareFactory(sf);\n\n if (levelType.equals(\"Puzzle\"))\n {\n l = new PuzzleLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, moveLimit, specialMoves, outFile);\n } else if (levelType.equals(\"Elimination\"))\n {\n l = new EliminationLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, specialMoves, outFile);\n } else if (levelType.equals(\"Lightning\"))\n {\n l = new LightningLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, timeLimit, specialMoves, outFile);\n } else if (levelType.equals(\"Release\"))\n {\n l = new ReleaseLevel(\"NewLevel\", game.getLevels().size() + 1, 0, twoStar,\n threeStar, \"\", true, specialMoves, outFile);\n }\n app.getBuilderEditorPanel().getBoardViewPanel().getBoard().setLevel(l);\n assert l != null;\n l.setBoardData(app.getBuilderEditorPanel().getBoardViewPanel().getBoard().getBoardData());\n l.saveLevel();\n }\n game.reloadFromDisk();\n app.getBuilderLevelSelectPanel().updateLevelList(game);\n }",
"public void dispatchDraw(Canvas canvas) {\n if (this.mSelectHei > 0) {\n canvas.save();\n canvas.clipPath(this.mSelectDrawablePath);\n if (this.mSelectDrawableBac != null) {\n this.mSelectDrawableBac.setBounds(this.mSelectDrawableRectBac);\n this.mSelectDrawableBac.draw(canvas);\n }\n if (this.mSelectDrawable != null) {\n this.mSelectDrawable.setBounds(this.mSelectDrawableRect);\n this.mSelectDrawable.draw(canvas);\n }\n canvas.restore();\n }\n super.dispatchDraw(canvas);\n }",
"public void run()\n {\n this.currentArea = map[xPosition][yPosition];\n this.choices = currentArea.getAreaChoices();\n this.enemy = currentArea.getEnemy();\n this.combat = new Combat(this);\n \n Choice option = PlayerInputHelper.getOption(currentArea.getOpeningLine(), choices);\n choice = option;\n \n try\n {\n Method action = option.getAction();\n if(option.isMovement())\n {\n currentArea = (IArea)action.invoke(mover,option.getDirection());\n run();\n }\n \n else if (!option.isMovement())\n {\n try\n {\n if(option.getInvokeOn().equals(\"c\"))\n {\n action.invoke(combat);\n }\n else\n {\n action.invoke(this);\n }\n }\n catch(NullPointerException e)\n {\n action.invoke(this);\n }\n \n }\n \n else\n {\n System.out.println(option.toString());\n }\n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n \n \n }",
"@Override\r\n\t\t\tpublic void actionExecuted(GameAction action) {\r\n\t\t\t\tif(action != selectAction) return;\r\n\t\t\t\tattackedCollector = action.getCard().getCollector();\r\n\t\t\t}",
"@Override\n\tpublic void crop(int x, int y) {\n\n\t\tif (x >= this.frame.length || y >= this.frame[0].length) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[][] new_frame = new int[x+1][y+1];\n\n\t\tfor (int i = 0; i <=x; i++) {\n\t\t\tfor (int j = 0; j <=y; j++) {\n\n\t\t\t\tif(isInside(this.frame, i,j)) {\n\t\t\t\t\tnew_frame[i][j] = this.frame[i][j];\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t}\n\t\tthis.frame = new_frame;\n\t}",
"public void confirmSelection() {\n\t\t//create and display an AlertDialog requesting a filename for the new capture\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setTitle(\"What did you hear?\");\n\t\tfinal EditText inputText = new EditText(context);\n\t\tinputText.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);\n\t\tbuilder.setView(inputText);\n\n\t\tbuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() { \n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// execute the capture operations:\n\t\t\t\tfilename = inputText.getText().toString().trim();\n\t\t\t\tnew CaptureTask(context).execute();\n\t\t\t}\n\t\t});\n\t\tbuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n currentUser = (String) comboBox1.getSelectedItem();\n try {\n saveGame.setGameState(currentUser);\n } catch (IOException ex) {\n System.out.println(ex);\n }\n }",
"public void approveSelection(){\n\t\t\t\tFile file=getSelectedFile();\n\t\t\t\tSupportedImageFilesFilter filter=new SupportedImageFilesFilter();\n\t\t\t\tif (file.exists() && filter.accept(file)) \n\t\t\t\t\tsuper.approveSelection(); \n\t\t\t\telse \n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"The selected file is not supported or does not exist!\", \"Error\", JOptionPane.ERROR_MESSAGE); \n\t\t\t}",
"public void plantCrop(String owner, int plotNumber, String cropName){\n Land land = new Land();\n\n land.setCrop(cropName);\n land.setPlantTime(new Date(), cropName);\n land.setOwner(owner);\n land.setPlotNumber(plotNumber);\n\n Date plantTime = land.getPlantTime();\n Date finishedTime = land.getFinishedTime();\n Date witherTime = land.getWitherTime();\n int currentStatus = land.getCurrentStatus();\n String progressBar = land.getProgressBar();\n\n// SimpleDateFormat sdf = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n// String formattedPlantTime = sdf.format(plantTime);\n// String formattedFinishedTime = sdf.format(finishedTime);\n// String formattedWitherTime = sdf.format(witherTime);\n\n Connection conn = controller.getConnection();\n PreparedStatement stmt = null;\n String sql = \"INSERT INTO magnet.land (owner, plotNumber, plantTime, finishedTime, witherTime, cropName, currentStatus, progressBar) VALUES (?,?,?,?,?,?,?,?)\";\n\n try {\n stmt = conn.prepareStatement(sql);\n stmt.setString(1, owner);\n stmt.setInt(2, plotNumber);\n stmt.setTimestamp(3, new java.sql.Timestamp(plantTime.getTime()) );\n stmt.setTimestamp(4, new java.sql.Timestamp(finishedTime.getTime()));\n stmt.setTimestamp(5, new java.sql.Timestamp(witherTime.getTime()));\n stmt.setString(6, cropName);\n stmt.setInt(7, currentStatus);\n stmt.setString(8, progressBar);\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Override\n @SuppressLint(\"NewApi\")\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CropImage.PICK_IMAGE_CHOOSER_REQUEST_CODE && resultCode == Activity.RESULT_OK) {\n Uri imageUri = CropImage.getPickImageResultUri(this, data);\n\n // For API >= 23 we need to check specifically that we have permissions to read external storage.\n if (CropImage.isReadExternalStoragePermissionsRequired(this, imageUri)) {\n // request permissions and handle the result in onRequestPermissionsResult()\n mCropImageUri = imageUri;\n requestPermissions(new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE}, CropImage.PICK_IMAGE_PERMISSIONS_REQUEST_CODE);\n } else {\n // no permissions required or already grunted, can start crop image activity\n startCropImageActivity(imageUri);\n }\n } else if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {\n CropImage.ActivityResult result = CropImage.getActivityResult(data);\n if (resultCode == RESULT_OK) {\n mCropImageUri = result.getUri();\n InputStream imageStream = null;\n try {\n imageStream = getContentResolver().openInputStream(mCropImageUri);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n mCropImage = BitmapFactory.decodeStream(imageStream);\n imgRestaurant.setImageBitmap(mCropImage);\n\n } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) {\n Exception error = result.getError();\n Toast.makeText(NewRestaurantActivity.this, error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }"
] | [
"0.69410247",
"0.6578293",
"0.63592935",
"0.5940236",
"0.5882088",
"0.5749644",
"0.566394",
"0.5576808",
"0.5316996",
"0.52999157",
"0.5294699",
"0.5293466",
"0.5292681",
"0.5230776",
"0.52260065",
"0.51910204",
"0.5190445",
"0.51836973",
"0.51598555",
"0.5114523",
"0.5090504",
"0.5065851",
"0.5057264",
"0.50311303",
"0.50254995",
"0.5003389",
"0.49999052",
"0.49875084",
"0.49768227",
"0.49346638",
"0.49262935",
"0.48820165",
"0.48479804",
"0.48391542",
"0.48240888",
"0.48176923",
"0.47974238",
"0.47949532",
"0.47762892",
"0.47762364",
"0.475329",
"0.47517353",
"0.47391438",
"0.47376812",
"0.47322083",
"0.47131917",
"0.4708468",
"0.4707534",
"0.46959862",
"0.46937194",
"0.46829402",
"0.4673681",
"0.4660716",
"0.4640734",
"0.46382576",
"0.4633736",
"0.46337333",
"0.46332958",
"0.4607859",
"0.46017012",
"0.46006054",
"0.4596456",
"0.4585944",
"0.45824146",
"0.45822063",
"0.45771086",
"0.4572688",
"0.4568331",
"0.45446542",
"0.45390457",
"0.45375237",
"0.45325753",
"0.45319813",
"0.45263806",
"0.45252258",
"0.452423",
"0.4517937",
"0.45130277",
"0.45111135",
"0.45067757",
"0.44949794",
"0.44940978",
"0.44861618",
"0.44821984",
"0.4479731",
"0.44702005",
"0.44691062",
"0.4465204",
"0.4462061",
"0.4454275",
"0.44528905",
"0.44438323",
"0.4442685",
"0.44406903",
"0.44363907",
"0.4435183",
"0.44302478",
"0.44239232",
"0.44215673",
"0.44185606"
] | 0.6581018 | 1 |
Prompts user to select a crop. Prints warning if player has no crops. | public void selectCrop(GameState state) {
s = new Scanner(System.in);
int selection = 0;
String cropOptions = "";
for (int i = 1; i <= state.crops.size(); i ++) {
cropOptions = cropOptions.concat("| " + i + ". " + state.crops.get(i-1).getName() + "\n");
}
if (cropOptions.length() == 0) {
System.out.println("|--------------------|\r\n" +
"| You have no crops! |\r\n" +
"|--------------------|");
} else {
System.out.println("|----------------|\r\n" +
"| Select a crop. |\r\n" +
"|----------------|");
do {
System.out.println(cropOptions);
selection = s.nextInt();
} while(selection < 1 || selection > state.crops.size());
showCropStatus(selection, state);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void showCropStatus(int selection, GameState state) {\n System.out.println(\"| You have selected: \" + state.crops.get(selection - 1).getName());\n if (state.crops.get(selection - 1).getPlanted()) {\n \tSystem.out.println(\"| This crop has thirst level: \" + state.crops.get(selection - 1).getThirstLevel() + \"/\" + state.crops.get(selection - 1).getMaxThirstLevel());\n System.out.println(\"| It has grown for \" + state.crops.get(selection - 1).getCurrentGrowthLevel() + \" day(s).\");\n int days_left = state.crops.get(selection - 1).getDaysUntilHarvest() - state.crops.get(selection - 1).getCurrentGrowthLevel();\n System.out.println(\"| Day(s) left until harvest: \" + days_left);\n } else {\n System.out.println(\"| This crop has not been planted yet.\");\n }\n\n }",
"private void manageCrops() {\r\n// System.out.println(\"\\nThis is manage the crops option\");\r\n CropView.runCropsView();\r\n }",
"public void confirmSelection() {\n\t\t//create and display an AlertDialog requesting a filename for the new capture\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setTitle(\"What did you hear?\");\n\t\tfinal EditText inputText = new EditText(context);\n\t\tinputText.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_CAP_SENTENCES|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);\n\t\tbuilder.setView(inputText);\n\n\t\tbuilder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() { \n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t// execute the capture operations:\n\t\t\t\tfilename = inputText.getText().toString().trim();\n\t\t\t\tnew CaptureTask(context).execute();\n\t\t\t}\n\t\t});\n\t\tbuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t});\n\t\tbuilder.show();\n\t}",
"private void performCrop() {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(picUri, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n// cropIntent.putExtra(\"aspectX\", 1);\r\n// cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n// cropIntent.putExtra(\"outputX\", 256);\r\n// cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning li_history onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }",
"public void perform(GameState state) {\n\n selectCrop(state);\n\n// returnBack(state); // add back in for command lines\n }",
"private String userSelection(String[] decknames) {\n Scanner scanner = new Scanner(System.in);\n int deckoption = Integer.parseInt(scanner.nextLine());\n while(deckoption <= 0 || deckoption > decknames.length + 1) {\n System.out.print(\"try again\\ninput: \");\n deckoption = Integer.parseInt(scanner.nextLine());\n }\n // user wants to create a new deck\n if (deckoption > decknames.length) {\n System.out.print(\"type new deck name: \");\n return scanner.nextLine();\n }\n return decknames[deckoption - 1];\n }",
"public void requestCopyPose()\r\n {\r\n \tAnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI(); \r\n \r\n boolean continueToCopy = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToCopy = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToCopy)\r\n {\r\n \tcontinueToCopy = poseIO.copyPose(currentPoseName, poseID);\r\n }\t \r\n \r\n \tif (continueToCopy)\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_TEXT,\r\n\t POSE_COPIED_TITLE_TEXT,\r\n\t JOptionPane.INFORMATION_MESSAGE);\r\n \t\tAnimatedSpriteEditor.getEditor().getFileManager().reloadSpriteType();\r\n EditorStateManager stateManager = AnimatedSpriteEditor.getEditor().getStateManager();\r\n stateManager.setState(EditorState.SELECT_POSE_STATE);\r\n stateManager.getPoseurStateManager().setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t}\r\n \telse\r\n \t{\r\n \t\tJOptionPane.showMessageDialog(\r\n\t gui,\r\n\t POSE_COPIED_ERROR_TEXT,\r\n\t POSE_COPIED_ERROR_TITLE_TEXT,\r\n\t JOptionPane.ERROR_MESSAGE);\r\n \t}\r\n \t\r\n }",
"public void alertSelection() {\n JOptionPane.showMessageDialog(gui.getFrame(),\n \"`Please select a choice.\",\n \"Invalid Selection Error\",\n JOptionPane.ERROR_MESSAGE);\n }",
"public void setCropName(String cropName) {\n\t\n\t\tthis.cropName = cropName;\n\t\n\t}",
"private void startCropImage() {\n }",
"private int drawCards(){\n int input = JOptionPane.showConfirmDialog(null, FirstPlayer.showHand() + SecondPlayer.showHand() +\n \"Would you like to continue the game?\\n\", \"Draw another card?\", \n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n return input;\n }",
"public static int chooseCardFromCollection(Collection collection) {\n System.out.println(\"Please select the pokemons numbers you want. (beetween 1 and \" + collection.getAlCardsCollection().size() + \")\");\n return keyboardChoice.nextInt();\n }",
"private void pickCountry() {\r\n\t\tmch.clicked = false;\r\n\t\tloadButton.setVisible(false);\r\n\t\t\r\n\t\t//creates a temporary country to be moved around\r\n\t\tCountry tempC = null;\r\n\r\n\t\t//ensure the country that was clicked has yet to be claimed\r\n\t\tfor (int j = 0; j < CountryPicker.size(); j++) {\r\n\t\t\t//Add this country to the player's arrayList\r\n\t\t\tif (hoveredColor.equals(CountryPicker.get(j).getDetectionColor())) {\r\n\t\t\t\tCountryPicker.get(j).setClicked(true);\r\n\t\t\t\ttempC = CountryPicker.get(j);\r\n\t\t\t\t//colors the chosen country to the selecting player's color\r\n\t\t\t\tfor (int i = 0; i < CountryPicker.size(); i++) {\r\n\t\t\t\t\tif (CountryPicker.get(i).isClicked() == true) {\r\n\t\t\t\t\t\t threadz.recolorCountry(CountryPicker.get(i), players.get(turnCounter).getColor(), false );\r\n\t\t\t\t\t\tCountryPicker.remove(i);\r\n\t\t\t\t\t\ttempC.setTroops(1);\r\n\t\t\t\t\t\tplayers.get(turnCounter).addCountries(tempC);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Move on to the next player's turn\r\n\r\n\t\t\t\tturnCounter++;\r\n\t\t\t\tif (turnCounter >= players.size()) {\r\n\t\t\t\t\tturnCounter = 0;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//if there are no countriies left, reset the turn so player one moves first\r\n\t\tif (CountryPicker.size() == 0) {\r\n\t\t\tturnCounter = 0;\r\n\t\t}\r\n\r\n\t}",
"public String getCropName() {\n\t\n\t\treturn cropName;\n\t\n\t}",
"public void round(){\n if (player2.getName().equals(\"Computer\")) {\n battle(JOptionPane.showInputDialog(\"Player 1 enter: paper; rock; or scissors\"),\n new Computer().choice());\n } else {\n battle(JOptionPane.showInputDialog(\"Player 1 enter: paper; rock; or scissors\"),\n JOptionPane.showInputDialog(\"Player 2 enter: paper; rock; or scissors\"));\n }\n }",
"public void selectPressed() {\n\t\tif (edit) {\n\t\t\tdisplayCardHelp = !displayCardHelp;\n\t\t} else {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t}",
"public static String chooseCardsFromCollection() {\n System.out.println(\"Please select the pokemons you want. By their number and separated by a - (a dash).\");\n System.out.println(\"Ex : 1-6-23-3-87-34...\");\n System.out.println(\"NB: Only 60 ! No more, no less ;) \");\n return keyboardChoice.nextLine();\n }",
"public String getCropName(){\n return this.cropName;\n }",
"private void promptToOpen()\r\n {\r\n // WE'LL NEED THE GUI\r\n AnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n AnimatedSpriteEditorGUI gui = singleton.getGUI();\r\n \r\n // AND NOW ASK THE USER FOR THE POSE TO OPEN\r\n JFileChooser poseFileChooser = new JFileChooser(POSES_PATH);\r\n int buttonPressed = poseFileChooser.showOpenDialog(gui);\r\n \r\n // ONLY OPEN A NEW FILE IF THE USER SAYS OK\r\n if (buttonPressed == JFileChooser.APPROVE_OPTION)\r\n {\r\n // GET THE FILE THE USER ENTERED\r\n currentFile = poseFileChooser.getSelectedFile();\r\n currentFileName = currentFile.getName();\r\n currentPoseName = currentFileName.substring(0, currentFileName.indexOf(\".\"));\r\n saved = true;\r\n \r\n // AND PUT THE FILE NAME IN THE TITLE BAR\r\n String appName = gui.getAppName();\r\n gui.setTitle(appName + APP_NAME_FILE_NAME_SEPARATOR + currentFile); \r\n \r\n // AND LOAD THE .pose (XML FORMAT) FILE\r\n poseIO.loadPose(currentFile.getAbsolutePath());\r\n singleton.getStateManager().getPoseurStateManager().clearClipboardShape();\r\n }\r\n }",
"private static void pickNumOfPlayers()\n\t{\n\t\tprintBorder();\n\t\tSystem.out.print(\"Enter 1 for one player or 2 for two player: \");\n\t\tnumOfPlayers = input.nextInt(); // Throws error if input is not an int\n\t\tif (numOfPlayers == 2) isMultiplayer = true;\n\t\tSystem.out.println();\n\t}",
"public void setCropType(int cropType) {\n\n this.cropType = cropType;\n }",
"public String GetCropType()\n {\n return this.cropType;\n }",
"public void setCropSupply(CropSupply cropSupply) {\n\n this.cropSupply = cropSupply;\n }",
"public static byte rPSChoose(Scanner input, String userInput){\n System.out.println(\"1-Rock\\n2-Paper\\n3-Scissor\");\n do{ \n userInput=input.nextLine();\n switch(userInput){\n case \"1\": \n rock();\n return 1;\n case \"2\": \n paper();\n return 2;\n case \"3\": \n scissor();\n return 3;\n default:\n System.out.println(\"Type a valid option\");\n\n }\n }while (true);\n \n }",
"public static void RockPaper(){\n\n\t\t// Store user choice as generated option\n\t\tint userNum = getRandomNum();\n\t\t\n\t\t// Store computer choice as generated option\n\t\tint compNum = getRandomNum();\n\t\t\n\t\t// Determine which option was selected for user\n\t\tString userOption = whichRPS(userNum);\n\t\t\n\t\t// Determine which option was selected for computer\n\t\tString compOption = whichRPS(compNum);\n\t\t\n\t // Display user choice and computer choice\n\t System.out.println(\"You played \"+ userOption+\", and the computer played \"+ compOption);\n\t \n\t // Determine results of game\n\t \n\t // If user and computer choices are the same \n\t if (userNum == compNum) {\n\t\t System.out.println(\"It was a tie.\");\n\t } \n\t \n\t // Rock1 > Scissors3\n\t if (compNum==1 && userNum==3) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Scissors3 > Paper2\n\t if (compNum==3 && userNum==2) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Paper2 > Rock1\n\t if (compNum==2 && userNum==1) {\n\t\t System.out.println(\"You lost.\");\n\t }\n\t // Or else the user won\n\t else{\n\t System.out.println(\"You won.\");\n\t }\n\t return;\n\t}",
"public void askForName(){\r\n boolean shouldReturnMenu = false;\r\n String name;\r\n while(true){\r\n name = JOptionPane.showInputDialog (\"Please enter your name!\"); \r\n if(name == null){\r\n GameApp.returnFromMakeProfileToMainMenu();\r\n return;\r\n }\r\n else if (name.length() == 0){\r\n JOptionPane.showMessageDialog (null, \"Error! Please enter a proper name.\", \"Invalid Name\", JOptionPane.PLAIN_MESSAGE); \r\n }\r\n else if (name.length() > 14)\r\n {\r\n JOptionPane.showMessageDialog (null, \"Error! The name you have entered is too long. The name must not exceed 14 characters.\", \"Invalid Name\", JOptionPane.PLAIN_MESSAGE); \r\n }\r\n else if (fileExists(name)){\r\n int n = JOptionPane.showConfirmDialog(null,\"This profile already exists. Do you want to override the file?\",\"Do you want to override the file?\",JOptionPane.YES_NO_OPTION);\r\n System.out.println(\"HERE: \" + n);\r\n if (n == 0){\r\n //shouldReturnMenu = true;\r\n //break;\r\n makeProfile(name);\r\n }\r\n else if (n == 1){\r\n shouldReturnMenu = true;\r\n break;\r\n }\r\n else if (n == -1){\r\n shouldReturnMenu = true;\r\n break;\r\n }\r\n else{\r\n makeProfile(name);\r\n }\r\n //ASK DYKE\r\n break;\r\n }\r\n else{\r\n makeProfile(name);\r\n //shouldReturnMenu = false;\r\n break;\r\n \r\n }\r\n }\r\n if(shouldReturnMenu)\r\n GameApp.returnFromMakeProfileToMainMenu();\r\n else{\r\n System.out.println(\"Working!\");\r\n GameApp.makeToView(\"../profiles/\" + name + \".profile\");\r\n }\r\n }",
"@Override\r\n\tpublic boolean isChosen() {\n\t\treturn false;\r\n\t}",
"private void cropImage() {\n\t\t// Use existing crop activity.\n\t\tIntent intent = new Intent(\"com.android.camera.action.CROP\");\n\t\tintent.setDataAndType(mImageCaptureUri, IMAGE_UNSPECIFIED);\n\n\t\t// Specify image size\n\t\tintent.putExtra(\"outputX\", 100);\n\t\tintent.putExtra(\"outputY\", 100);\n\n\t\t// Specify aspect ratio, 1:1\n\t\tintent.putExtra(\"aspectX\", 1);\n\t\tintent.putExtra(\"aspectY\", 1);\n\t\tintent.putExtra(\"scale\", true);\n\t\tintent.putExtra(\"return-data\", true);\n\n\t\t// REQUEST_CODE_CROP_PHOTO is an integer tag you defined to\n\t\t// identify the activity in onActivityResult() when it returns\n\t\tstartActivityForResult(intent, REQUEST_CODE_CROP_PHOTO);\n\t}",
"private void promptPlayerTurn(Player player) {\r\n JOptionPane.showMessageDialog(\r\n null,\r\n player.getName() + \", it's your turn!\",\r\n \"Player Confirmation\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n }",
"@Override\n\tpublic void provideInitialChoice() throws RemoteException {\n\t\tgamePane.showAsStatus(\"Please choose your figure to decide who starts\");\n\t\tgamePane.showInitialChoicePane();\n\t}",
"public static int choicedialog() {\r\n List<String> choices = new ArrayList<>();\r\n choices.add(\"1a\");\r\n choices.add(\"1b\");\r\n choices.add(\"2\");\r\n choices.add(\"2u\");\r\n choices.add(\"3\");\r\n choices.add(\"3u\");\r\n choices.add(\"4\");\r\n choices.add(\"5\");\r\n\r\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"SET ZONE HERE\", choices);\r\n dialog.setTitle(\"Zone Selector\");\r\n dialog.setHeaderText(null);\r\n dialog.setContentText(\"Select Zone:\");\r\n \r\n Optional<String> result = dialog.showAndWait();\r\n if (result.isPresent()){\r\n if(result.get() == \"1a\") return 1;\r\n else if (result.get() == \"1b\") return 2;\r\n else if (result.get() == \"2\") return 3;\r\n else if (result.get() == \"2u\") return 4;\r\n else if (result.get() == \"3\") return 5;\r\n else if (result.get() == \"3u\") return 6;\r\n else if (result.get() == \"4\") return 7;\r\n else if (result.get() == \"5\") return 8;\r\n else return 0;\r\n } else return 0;\r\n }",
"private void beginCrop(Uri source) {\n // pass URI as intent to the CROP Activity;\n if (mPhotoFile != null) {\n Uri destination = FileProvider.getUriForFile(this,\n BuildConfig.APPLICATION_ID,\n mPhotoFile);\n Log.d(TAG, \"URI: \" + destination.toString());\n Crop.of(source, destination).asSquare().start(this);\n }\n }",
"void pickUp();",
"private void pickCards() throws IOExceptionFromController {\n Deck deck = game.getDeck();\n try {\n if (playerControllers.get(0).getClient().chooseYesNo(\"Do you want to randomize the playable God Powers pool?\")) {\n deck.pickRandom(game.getPlayerNum());\n playerControllers.get(0).getClient().displayMessage(\"Picking cards...\");\n } else {\n ArrayList<Card> choices = playerControllers.get(0).getClient().chooseCards(deck.getCards(), game.getPlayerNum(), null);\n for (Card card : choices) {\n deck.pickCard(card);\n }\n }\n } catch (IOException | InterruptedException e) {\n throw new IOExceptionFromController(e, playerControllers.get(0));\n }\n ArrayList<Card> cardPool = deck.getPickedCards();\n ArrayList<Card> chosenCards = new ArrayList<Card>();\n for (int i = 0; i < game.getPlayerNum(); i++) {\n int j = (i == game.getPlayerNum() - 1) ? 0 : i + 1;\n Card chosenCard;\n try {\n chosenCard = playerControllers.get(j).getClient().chooseCards(cardPool, 1, chosenCards).get(0);\n } catch (IOException | InterruptedException e) {\n throw new IOExceptionFromController(e, playerControllers.get(j));\n }\n cardPool.remove(chosenCard);\n chosenCards.add(chosenCard);\n players.get(j).setGodCard(chosenCard);\n playerControllers.get(j).setGodController(chosenCard.getController());\n broadcastMessage((players.get(j).getId() + \" is \" + chosenCard.getGod() + \" (\" + players.get(j).getColor() + \")\\n\"));\n broadcastMessage(\"Picking cards...\");\n }\n }",
"public void onSelectProfilePic() {\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n Profile profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n if (profile.getIcon().equals(\"icon\" + currentIndex)) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" has already selected this player icon!\");\n return;\n }\n\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" is not a high enough level for this profile picture!\");\n return;\n }\n\n playerRecord.setStyle(\"-fx-background-color: transparent\");\n PrintWriter user = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + playerPicked + \".txt\"));\n user.flush();\n user.write(profile.getWins() + \" \" + profile.getLosses() + \" \" + profile.getXp() + \" \"\n + profile.getWinStreak() + \" icon\" + currentIndex + \" \" + profile.getCarIcon());\n user.close();\n playerRecord.setText(profile.getName() + \" has changed profile pictures.\");\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void selectCard() {\n\t\tDeck from = isInMainDeck() ? mainDeck : c.getDeck();\n\t\tDeck to = isInMainDeck() ? c.getDeck() : mainDeck;\n\t\t\n\t\tselectedCard = from.getCurrent();\n\t\tif (selectedCard == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (!to.isFull(animators.size())) {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_CHOOSE_CARD);\n\t\t\tVector3f p = from.getPosFor(selectedCard);\n\t\t\tfrom.removeCurrent();\n\t\t\tanimators.add(new Animator(selectedCard, p, isInMainDeck(), to, to.getLastPos()));\n\t\t} else {\n\t\t\tselectedCard = null;\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t\tif (from.isEmpty()) {\n\t\t\tcirclePressed();\n\t\t}\n\t}",
"@Override\n public boolean onSelection(MaterialDialog dialog, View view, int which, CharSequence text) {\n if(which == 1){\n Crop.pickImage(ProductDetailActivity.this);\n }\n return true;\n }",
"public static int mainScreenPrompter(int choice){\n makeSpace();\n switch (choice){\n case 1:\n System.out.println(\"You have chosen schools\\n\" +\n \"-----------------------\");\n GuiMessages.printSchoolSelectionScreen();\n return 1;\n case 2:\n System.out.println(\"You have chosen teachers\\n\" +\n \"------------------------\");\n GuiMessages.printTeacherSelectionScreen();\n return 2;\n case 3:\n System.out.println(\"You have chosen classrooms\\n\" +\n \"--------------------------\");\n GuiMessages.printClassroomSelectionScreen();\n return 3;\n case 4:\n System.out.println(\"You have chosen students\\n\" +\n \"------------------------\");\n GuiMessages.printStudentSelectionScreen();\n return 4;\n default:\n System.out.println(\"Incorrect choice\\n\" +\n \"----------------\");\n return -1;\n }\n }",
"public void playRockPaperScissor() {\n\t\tSystem.out.println(\"The pirates ask you to play 'Rock Paper Scissors' in order to against the pirates. Now you have to choose what you want to throw. \" + \"\\n\" + \"You can choose between: \");\n\t\tArrayList<String> gameElements = new ArrayList<String>(3);\n\t\tgameElements.add(\"Rock\");\n\t\tgameElements.add(\"Paper\");\n\t\tgameElements.add(\"Scissors\");\n\t\tboolean state = false;\n\t\twhile (state == false) {\n\t\t\tSystem.out.println(\"(1) Rock\");\n\t\t\tSystem.out.println(\"(2) Paper\");\n\t\t\tSystem.out.println(\"(3) Scissors\");\n\t\t\tint selectedAction = scanner.nextInt();\n\t\t\ttry { if (selectedAction <= 3 && selectedAction > 0) {\n\t\t\t\tint decision = game.determineWinnningRPSGame();\n\t\t\t\tString piratesThrows = game.getWhatPiratesThrowRPS(decision, gameElements.get(selectedAction-1));\n\t\t\t\tSystem.out.println(\"The pirate throws \" + piratesThrows);\n\t\t\t\tif (decision == 0) {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tint piratesDemand = game.getPiratesDemand();\n\t\t\t\t\tSystem.out.println(\"You lose! Pirates demands: \" + piratesDemand + \" coins\");\n\t\t\t\t\tif (game.checkPirateSatisfaction()) {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tgame.backToMain();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tgame.removeAllGoods();\n\t\t\t\t\t\tint money = game.getMoney();\n\t\t\t\t\t\tgame.updateMoney(money * -1);\n\t\t\t\t\t\tgame.gameOver(\"You lose play rock paper scissor game! \\n the pirate took all of your money and your items in your ship!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (decision == 1) {\n\t\t\t\t\tSystem.out.println(\"You need to play again!\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstate = true;\n\t\t\t\t\tSystem.out.println(\"You Win!! You can Continue your journey to your destination!\");\n\t\t\t\t\tgame.backToMain();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please choose from actions above\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(INPUT_REQUIREMENTS);\n\t\t\t\tscanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"public int getCropType() {\n\n return cropType;\n }",
"private String promptLoadOrNew(){\r\n Object[] options = {\"Start A New Game!\", \"Load A Previous Game.\"};\r\n String result = (String) JOptionPane.showInputDialog(\r\n null,\r\n \"What would you like to do?\",\r\n \"Welcome!\",\r\n JOptionPane.PLAIN_MESSAGE,\r\n null,\r\n options,\r\n 1);\r\n return result;\r\n \r\n }",
"public void cancelSelection() {\n\t\tsd.hideSelectRect();\n\t\tspectroFragment.disableCaptureButtonContainer();\n\t\tselecting = false;\n\t}",
"private void showChoosePictureDialog() {\n String[] permissions = PermissionConstants.checkIfPermissionsAreGranted(this,\n PermissionConstants.READ_STORAGE, PermissionConstants.WRITE_STORGAE,\n PermissionConstants.CAMERA);\n if(permissions.length > 0) {\n PermissionConstants.askForPermissions(this, PERMISSIONS_REQUEST, permissions);\n } else {\n EasyImage.openChooserWithGallery(this, \"\", 0);\n }\n }",
"public void playScissor(ActionEvent e) throws IOException {\n try {\n //System.out.println(\"Class play: \" + game.getClass().toString());\n getWinnerRPS(game.play(3));\n playerPlays = \"Player plays scissors\";\n computerPlays = \"Computer plays \" + addRPSPlayed(game.getComputerPlays());\n myctr.setLabels();\n } catch(Exception n) {\n System.out.println(\"Game \\\"RockPaperScissors\\\" not initialized!\");\n }\n }",
"private void dropDown() {\n int newY = curY;\n\n while (newY > 0) {\n\n if (!tryMove(curPiece, curX, newY - 1)) {\n \n break;\n }\n \n --newY;\n }\n\n pieceDropped();\n }",
"@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tif (getSelected() == null)\n\t\t\t{\n\t\t\t\tprintMsg(\"Select cards to play.\\n\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tgame.makeMove(activePlayer, getSelected());\n\t\t\t}\n\t\t}",
"private void startUpConditions(){\n\t\t\tString strSize = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick a Board Size between 3-30.\");\n\t\t\ttry{\n\t\t\t\tselectedSize = Integer.parseInt(strSize);\n\t\t\t\t\n\t\t\tif(selectedSize < 2||selectedSize > 30){\n\t\t\t\tselectedSize = 10;\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\");\n\t\t\t\t}\n\t\t\t\n\t\t\t}catch(NumberFormatException exception){\n\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The Game has\"\n\t\t\t\t+ \" defaulted to a Board Size of 10.\"+\n\t\t\t\t\" Because you input characters other than numbers.\");\n\t\t\t\tselectedSize = 10;\t\t\t\t\n\t\t\t}\n\n\t\n\t\t//selecting the number of players within the game\n\t\t//verifying a valid input for the Players\n\t\t//It's awfully boring to play by yourself after all.\n\t\t\tString strPlay = JOptionPane.showInputDialog(null, \n\t\t\t\t\t\"Pick number of players between 2-10\");\n\t\t\ttry{\n\t\t\t\tif(strPlay==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to 2 players.\");\n\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t}\n//\t\t\t\tif(input == JOptionPane.CANCEL_OPTION){\n//\t\t\t\t\tSystem.exit(1);\n//\t\t\t\t}\n\t\t\t\tif(strPlay!=null){\n\t\t\t\t\tselectedPlayers = Integer.parseInt(strPlay);\n\t\t\t\t\t\n\t\t\t\t\tif(selectedPlayers < 2||selectedPlayers > 10){\n\t\t\t\t\t\tselectedPlayers = 2;\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t\t\t+\" has defaulted to 2 players.\"\n\t\t\t\t\t\t\t+\" Because you input a number that \"\n\t\t\t\t\t\t\t+\"was out of bounds.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"You input \"\n\t\t\t\t\t+ \"something that was not a number.\"\n\t\t\t\t\t+ \" The game has defaulted to 2 players.\");\n\t\t\t\tselectedPlayers = 2;\n\t\t\t}\n\t\t\t\n\t\t\tString goFirst = JOptionPane.showInputDialog(null, \"Pick\"\n\t\t\t+ \" who will go first.\");\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(goFirst==null){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" has defaulted to Player 1s turn.\");\n\t\t\t\t\tthis.firstTurn = 0;\n\t\t\t\t}\n\t\t\t\tif(goFirst!=null){\n\t\t\t\t\t this.firstTurn = Integer.parseInt(goFirst);\n\t\t\t\t}\n\t\t\t}catch(NumberFormatException exception){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"You input \"\n\t\t\t\t+ \"something other than a number.\"\n\t\t\t\t+ \" The Game has defaulted to player 1s turn.\");\n\t\t\t\tthis.firstTurn = 0;\n\t\t\t}finally{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The game\"\n\t\t\t\t\t+\" will now begin.\");\n\t\t\t}\n\t\t\t\n\t\t}",
"public boolean pickedup(Player player) {\n\t\treturn false;\n\t}",
"public void chooseCards() {\n\n if (availableGods.isEmpty()) {\n createChallenger();\n notifyChoose(cardsChosen, this.getGodListNames(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n } else {\n notifyChoose(true, this.getGodListNames(), this.getCurrentTurn().getCurrentPlayer().getNickname());\n }\n\n }",
"private ResourceCubeType humanResourceChoice() {\r\n\t\tfinal String[] playerOptions = new String[4];\r\n\r\n\t\t// Options for the JOption Pane\r\n\t\tplayerOptions[ResourceCubeType.FAVOR.getValue()] = ResourceCubeType.FAVOR.getName();\r\n\t\tplayerOptions[ResourceCubeType.FOOD.getValue()] = ResourceCubeType.FOOD.getName();\r\n\t\tplayerOptions[ResourceCubeType.GOLD.getValue()] = ResourceCubeType.GOLD.getName();\r\n\t\tplayerOptions[ResourceCubeType.WOOD.getValue()] = ResourceCubeType.WOOD.getName();\r\n\r\n\t\tfinal JFrame frame = new JFrame();\r\n\t\tfinal String humanResponse = (String) JOptionPane.showInputDialog(frame,\r\n\t\t\t\t\"Please select which type of Resource to gather from.\", \"Select Resource Type\",\r\n\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, playerOptions, playerOptions[0]);\r\n\r\n\t\treturn ResourceCubeType.getTypeForString(humanResponse);\r\n\t}",
"public void actionPerformed(ActionEvent event) {\r\n String command = event.getActionCommand();\r\n\r\n if (command.equals(\"OK\")) {\r\n\r\n if (setVariables()) {\r\n callAlgorithm();\r\n }\r\n } else if (command.equals(\"Cancel\")) {\r\n dispose();\r\n } else if (command.equals(\"Help\")) {\r\n \t//MipavUtil.showHelp(\"U4023\");\r\n MipavUtil.showWebHelp(\"Cropping_images#Crop_Boundary_Pixels\");\r\n } else {\r\n super.actionPerformed(event);\r\n }\r\n }",
"public void takeCup() {\n updateMessageToUser();\n BufferedImage emptyPicture = null;\n try {\n emptyPicture = ImageIO.read(new File(\"./picts/vide2.jpg\"));\n } catch (IOException ee) {\n ee.printStackTrace();\n }\n currentPicture.setIcon(new ImageIcon(emptyPicture));\n if (currentWaterVolume > 1) {\n currentWaterVolume = 0;\n theFSM.raiseCupGrabbed();\n } else {\n addCupButton.setVisible(true);\n }\n takeCupButton.setVisible(false);\n theFSM.setCupPlaced(false);\n System.out.println(\"Cup taken\");\n }",
"public void handle(ActionEvent e) {\n Bounds selectionBounds = rubberBandSelection.getBounds();\n\n // show bounds info\n System.out.println( \"Selected area: \" + selectionBounds);\n\n // crop the image\n crop( selectionBounds);\n\n }",
"public static int promptForMenuSelection(String[] options, boolean withQuit) {\n int choice = -1, lowerBound = 1;\n if(withQuit){\n var arr = new String[options.length + 1];\n arr[0] = \"Quit\";\n System.arraycopy(options, 0, arr, 1, arr.length);\n options = arr;\n lowerBound = 0;\n }\n displayScreen(options);\n return promptForInt(\"Please Select a Menu Item\", lowerBound, options.length);\n }",
"@Override\r\n\tpublic void pickUpSurpriseBox(Robot robot, SurpriseBox surpriseBox)\r\n\t{\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(robot.canPickUp(surpriseBox))\r\n\t\t\t{\r\n\t\t\t\trobot.pickUp(surpriseBox);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"This surprise box could not be picked up by this robot.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalStateException exc)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Either this robot or this surprise box is terminated; the robot cannot pick up the surprise box.\");\r\n\t\t}\r\n\t}",
"public static String promptForSelection(String title, String message, String[] options) {\n return (String) JOptionPane.showInputDialog(null,\n message,\n title,\n QUESTION_MESSAGE,\n null,\n options,\n options[0]);\n\n }",
"public static void userInputError(int input) //users inputs option that is out of bounds\n\t{\n\t\tSystem.out.println(\"ERROR: Selection Out Of Bounds! \\nOption \" + input + \" Does Not Exist\"); //error message\n\t\tSystem.out.println(\"Press 'Enter' To try Again\"); // prompt to try again\n\t}",
"@Method(selector = \"crop:imagePath:width:height:x:ycompletionBlock:\")\n\tpublic native void crop(String name, String imagePath, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);",
"public boolean isRectangularCrop() {\r\n return isRectangularCrop;\r\n }",
"@Override\n public void messagePrompt(String message) {\n JOptionPane.showMessageDialog(lobbyWindowFrame,message+\" is choosing the gods\");\n }",
"public static int getUserInput(){\r\n String input;\r\n Integer selection;\r\n while(true){\r\n try {\r\n input = JOptionPane.showInputDialog(null, \"Please enter the desired side size or press cancel for default size,\\n\"\r\n + \"you should enter a valid integer between 3 and 100.\");\r\n if (input == null) {\r\n selection = DEFAULT_SIZE;\r\n }\r\n else {\r\n selection = Integer.parseInt(input);\r\n if (selection > UPPER_BOUND) selection = UPPER_BOUND;\r\n else if (selection < LOWER_BOUND) selection = LOWER_BOUND;\r\n }\r\n break;\r\n }\r\n catch (NumberFormatException e){\r\n continue;\r\n }\r\n }\r\n return selection;\r\n \r\n }",
"private void chooseDeck() throws IOException {\n String deckname = userSelection(displayOptions());\n projectController.setDeck(deckname + \".anki\");\n }",
"private void mainMenu() {\r\n System.out.println(\"Please choose an option: \");\r\n System.out.println(\"1. New Player\");\r\n System.out.println(\"2. New VIP Player\");\r\n System.out.println(\"3. Quit\");\r\n }",
"private void performCrop(Uri img) {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(img, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n // cropIntent.putExtra(\"aspectX\", 1);\r\n //cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n // cropIntent.putExtra(\"outputX\", 256);\r\n // cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning in onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }",
"public void select() {\n \t\t\tString sinput = \"\";\r\n \t\t\tOption selected = null;\r\n \t\t\tErrorLog.debug(name + \" selected.\");\r\n \t\t\t\r\n \t\t\twhile (true) {\r\n \t\t\t\tSystem.out.println(toString()); //Print menu.\r\n \t\t\t\tsinput = read(); //Get user selection.\r\n \t\t\t\tif (!sinput.equalsIgnoreCase(\"exit\")) {\r\n \t\t\t\t\tselected = options.get(sinput); //Find corresponding option.\r\n \r\n \t\t\t\t\tif (selected != null) //Sinput corresponds to an extant option.\r\n \t\t\t\t\t\tselected.select(); //Select the selected.\r\n \t\t\t\t\telse\r\n \t\t\t\t\t\tprint(sinput + \" is not a valid option\");\r\n \t\t\t\t} else\r\n \t\t\t\t\t{print(\"Returning to previous menu.\"); break;}\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tErrorLog.debug (\"Quitting \" + name + \". Sinput:\"+sinput);\r\n \t\t\t\r\n \t\t\treturn;\r\n \t\t}",
"public void setCropRect(Rect cropRect) {\n this.cropRect = cropRect;\n //invalidate();\n }",
"private static Option playerInput() {\n\t\tsc = new Scanner(System.in);\n\t\tSystem.out.println(\"Do you choose Rock(0), Paper(1) or Scissors(2)?\");\n\t\treturn Option.values()[sc.nextInt()];\n\t}",
"private String getPlayerChoice() {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter choice:\\nr = rock\\np = paper\\ns = scissors\\nq = quit\");\n return userInput.nextLine().toUpperCase(); \n }",
"private void doView() {\n System.out.println(pickedAccount.toString());\n System.out.println(\"Cancel any reservation? (y/n)\");\n\n String command;\n command = input.next();\n if (command.toLowerCase().equals(\"y\")) {\n processCancelReservation();\n }\n }",
"public static void userSelection(){\n\t\tint selection;\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Which program would you like to run?\");\n\t\tselection=input.nextInt();\n\n\t\tif(selection == 1)\n\t\t\tmazeUnion();\n\t\tif(selection == 2)\n\t\t\tunionPathCompression();\n\t\tif(selection == 3)\n\t\t\tmazeHeight();\n\t\tif(selection == 4)\n\t\t\tmazeSize();\n\t\tif(selection == 5)\n\t\t\tsizePathCompression();\n\t}",
"public boolean canSelect (int x, int y){\n\t\tif (x < 0 || x > N || y < 0 || y > N) return false;\t//must select on the board\n\n\t\tif (pieceAt(x,y) != null){\t\t\t\t\t\t\t//occupied square\n\t\t\tif (pieceAt(x,y).isFire() == isFireTurn){\t\t//piece must belong to player\n\t\t\t\tif (!hasSelected || !hasMoved) return true;\n\t\t\t\telse return false;\n\t\t\t}\n\t\t\telse return false;\n\t\t}\n\t\t\n\t\telse{\t\t\t\t\t\t\t\t\t\t\t\t//empty square\n\t\t\t//System.out.println(\"CanSelect empty square: hasSelected: \" + hasSelected);\n\t\t\t//System.out.println(\"hasMoved: \" + hasMoved);\n\t\t\tif (hasSelected && !hasMoved){\n\t\t\t\t//System.out.println(\"hasSelected && !hasMoved, reached here\");\n\t\t\t\treturn validMove(currentX, currentY, x, y);\n\t\t\t}\n\t\t\telse if (hasMoved){\n\t\t\t\t//System.out.println(\"not (hasSelected && !hasMoved), ( \" + currentX + \",\" + currentY + \" )\");\n\t\t\t\t//System.out.println(pieceAt(currentX,currentY) == null);\n\t\t\t\tif (pieceAt(currentX,currentY) != null && \n\t\t\t\tpieceAt(currentX, currentY).hasCaptured()){\t\t\t//check if potential double capture\n\t\t\t\t\tif (canCaptureSomewhere(currentX, currentY)){\t//still check for no adjacent moves\n\t\t\t\t\t\treturn validMove(currentX, currentY, x, y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"can't return true for canSelect\");\n\t\t\t\treturn false;\t\t\t\t\t\t\t\t\t\t//return false if capturer can't double capture\n\t\t\t}\n\t\t\treturn false;\t\t\t\t\t\t\t\t//can't select empty squares unless moving\n\t\t}\n\t\t\n\t}",
"protected void cropImage() {\n if (mOptions.noOutputImage) {\n setResult(null, null, 1);\n } else {\n Uri outputUri = getOutputUri();\n mCropImageView.saveCroppedImageAsync(\n outputUri,\n mOptions.outputCompressFormat,\n mOptions.outputCompressQuality,\n mOptions.outputRequestWidth,\n mOptions.outputRequestHeight,\n mOptions.outputRequestSizeOptions);\n }\n }",
"public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }",
"public native MagickImage cropImage(Rectangle chopInfo)\n\t\t\tthrows MagickException;",
"public static void pickUpCannon(ClientContext ctx) {\n GameObject cannon = ctx.objects.select().id(6).poll();\n\n if (cannon.inViewport()) {\n cannon.interact((\"Pick-up\"), cannon.name());\n Condition.wait(new Callable<Boolean>() {\n @Override\n public Boolean call() throws Exception {\n return ctx.inventory.select().id(Items.CANNON_BASE_6).count() == 1;\n }\n }, 250, 20);\n }\n }",
"private void choosePrompt() {\r\n\t\tfor (int i = 0; i < mustChoose.size(); i++) {\r\n\t\t\tString prompt = \"**[Choose]** \";\r\n\t\t\t// Find the correct text to display\r\n\t\t\tif (mustChoose.get(i).contentEquals(\"Shrine\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Dragon Shrine\")) {\r\n\t\t\t\tprompt += \"**2** :moneybag: ~OR~ **1** :wastebasket:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Treasure Hunter\")) {\r\n\t\t\t\tprompt += \"a card to replace in the dungeon row (4-9)\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Underworld Dealing\")) {\r\n\t\t\t\tprompt += \"**1** :moneybag: ~OR~ **BUY 2** __Secret Tome__ **FOR 7** :moneybag:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"**3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Mister Whiskers\")) {\r\n\t\t\t\tprompt += \"**Dragon Attack** ~OR~ **-2** :warning:\";\r\n\t\t\t} else if (mustChoose.get(i).contentEquals(\"Wand of Wind\")) {\r\n\t\t\t\tif (GlobalVars.teleportRoomsPerRoom.length > 0) {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\" ┃ \"+\r\n\t\t\t\t\t\tUtils.arrayToString(GlobalVars.teleportRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprompt += \"**1** :crystal_ball: ~OR~ Take a **SECRET** from an adjacent room ``\"+\r\n\t\t\t\t\t\t\tUtils.arrayToString(GlobalVars.adjacentRoomsPerRoom[currentPlayer.getCurrentRoom()])+\"``\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}",
"private void cheatMoveDialog() {\n Dialog dialog = viewer.cheatMoveDialog();\n Optional<String> result = dialog.showAndWait();\n result.ifPresent(numberOfSpaces -> {\n int simulatedDiceRolled = Integer.parseInt(result.get());\n modelEngine.moveCurrentPlayer(simulatedDiceRolled);\n });\n }",
"private void decide(Player player, Card choiceCard) {\n player.removeCard(choiceCard);\n //Wild Draw\n if (choiceCard instanceof WildDrawCard) {\n //set wildDraw color\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildDrawCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n //set wildDraw penalty\n char ch = 0;\n if(canChooseWildDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseWildDrawPenalty();\n }\n else {\n ((WildDrawCard) choiceCard).changeState(state);\n for (int i = 0; i < ((WildDrawCard) choiceCard).getForcedCards()*state.getWildDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doWildDrawPenalty();\n }\n }\n\n //Wild\n else if (choiceCard instanceof WildCard) {\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n }\n\n //Reverse\n if (choiceCard instanceof ReverseCard) {\n ((ReverseCard) choiceCard).changeState(state);\n }\n\n //Skip\n if (choiceCard instanceof SkipCard) {\n ((SkipCard) choiceCard).changeState(state);\n }\n\n //Draw2\n if (choiceCard instanceof Draw2Card) {\n char ch = 0;\n if(canChooseDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseDrawPenalty();\n }\n else {\n ((Draw2Card) choiceCard).changeState(state);\n for (int i = 0; i < ((Draw2Card) choiceCard).getForcedCards()*state.getDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doDrawPenalty();\n }\n }\n changeCurrentCard(choiceCard);\n }",
"String userChosen();",
"public static void main(String[] args) {\n\t\tString choice = \"\";\n\t\t//int answer;*/\n\t\tint userinput;\n\t\tint rock = 0;\n\t\tint paper = 1;\n\t\tint scissors = 2;\n\t\t\n\t\tRockPaperScissors ans = new RockPaperScissors();\n\t\t\n\t\tSystem.out.println(\"Welcome to the Ultimate Rock Paper Scissors Game!\\n\");\n\t\tSystem.out.println(\"Enter one of the below responses to start the game:\\n\\n\");\n\t\tSystem.out.println(\"Rock: 0\\n\\nPaper: 1\\n\\nScissors: 2\\n\\n\");\n\t\tSystem.out.println(\"Hit any other key to exit.\\n\");\n\t\t\n\t\ttry {\n\t\tdo {\n\t\tSystem.out.print(\"Enter selection: \");\n\t\tuserinput = ans.getResponse();\n\t\t\n\t\tswitch(userinput) {\n\t\tcase 0:\n\t\t\tchoice = \"Rock\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tchoice = \"Paper\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tchoice = \"Scissors\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Invalid entry please try again\");\n\t\t\tSystem.exit(0);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"You chose \" + choice);\n\n\t\n\t\n\tint sysoutput = ans.getAnswer();\n\t\n\tswitch(sysoutput) {\n\tcase 0:\n\t\tchoice = \"Rock\";\n\t\tbreak;\n\tcase 1:\n\t\tchoice = \"Paper\";\n\t\tbreak;\n\tcase 2:\n\t\tchoice = \"Scissors\";\n\t\tbreak;\n\t}\n\tSystem.out.println(\"The computer selected \" + choice);\n\t\n\tans.getResult(userinput, sysoutput);\n\t\n\t\t}while(userinput != 5);\n\t\n\n}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Invalid entry please try again\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\n}",
"public boolean isCrops() {\n return this.type == Type.CROPS;\n }",
"public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }",
"void selectPlayers(){\n\t\tframe.repaintAll();\n\t\tint numPlayers = inputNumPlayers();\n\t\t\n\t\t// let each player choose a character\n\t\tfor(int i=0; i<numPlayers; i++){\n\t\t\tJPanel panel = new JPanel(new GridLayout(0, 1));\n\t\t\t\n\t\t\t// determine which characters are available\n\t\t\tList<String> playerNames = new ArrayList<String>();\n\t\t\tfor(Player p : game.getPlayers()){\n\t\t\t\tplayerNames.add(p.getCharacter());\n\t\t\t}\n\t\t\t\n\t\t\t// create buttons\n\t ButtonGroup bg = new ButtonGroup();\n\t\t\tJRadioButton greenBtn = new JRadioButton(GameOfCluedo.GREEN);\n\t\t\tJRadioButton mustardBtn = new JRadioButton(GameOfCluedo.MUSTARD);\n\t\t\tJRadioButton peacockBtn = new JRadioButton(GameOfCluedo.PEACOCK); \n\t\t\tJRadioButton plumBtn = new JRadioButton(GameOfCluedo.PLUM); \n\t\t\tJRadioButton scarlettBtn = new JRadioButton(GameOfCluedo.SCARLETT); \n\t JRadioButton whiteBtn = new JRadioButton(GameOfCluedo.WHITE); \n\t \n\t String playerName = getPlayerName();\n\t \n\t panel.add(new JLabel(\"Who will \"+playerName+\" play as?\"));\n\t addAvailableCharacterOptions(panel, playerNames, bg, greenBtn,\n\t\t\t\t\tmustardBtn, peacockBtn, plumBtn, scarlettBtn, whiteBtn);\n\t\t\tJOptionPane.showMessageDialog(frame, panel, \"Character select\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tgeneratePlayerFromInput(panel, playerName, greenBtn, mustardBtn, peacockBtn,\n\t\t\t\t\tplumBtn, scarlettBtn, whiteBtn);\n\t\t\t\n\t frame.repaintAll();\n\t\t}\n\t}",
"private void showMatchOverDialog(String winnerName) {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s won!\\nContinue?\", winnerName),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.startGame();\n } else {\n this.dispose();\n }\n }",
"public JDialogCropBoundaryParam() { }",
"public static void main(String[] args) {\nString kev = JOptionPane.showInputDialog(null, \"How many cats do you have?\");\n\t\t// 2. Convert their answer into an int\nint Cats = Integer.parseInt(kev);\n\t\t// 3. If they have 3 or more cats, tell them they are a crazy cat lady\nif (Cats > 2) {\n\tJOptionPane.showMessageDialog(null, \"You are a CRAZY CAT LADY!!!!\");\n}\n\t\t// 4. If they have less than 3 cats AND more than 0 cats, call the method below to show them a cat video\nelse if (Cats < 3 && Cats > 0) {\n\tplayVideo(\"www.youtube.com/watch?v=_0TTV5if3t8\");\n}\n\t\t// 5. If they have 0 cats, show them a video of A Frog Sitting on a Bench Like a Human\nelse if (Cats == 0){\n\tplayVideo(\"https://www.youtube.com/watch?v=deSXnbhHiDw\");\n}\n\t}",
"public void XScissor(Pokemon opponent, boolean isComputer)\r\n {\r\n window.addToTextBox(\"Scyther used X-Scissor!\");\r\n damage = 80;\r\n accuracy = 100;\r\n abilityType = \"Bug\";\r\n useAbility(opponent, damage, accuracy, abilityType, isComputer);\r\n }",
"public CropSupply getCropSupply() {\n\n return cropSupply;\n }",
"private void selectPDFFile() {\n JFileChooser jfc = new JFileChooser();\n jfc.setFileFilter(new PDFFilter());\n jfc.setMultiSelectionEnabled(false);\n int ret = jfc.showDialog(this, \"Open\");\n if (ret == 0) {\n readFile = jfc.getSelectedFile();\n inputField.setText(readFile.getAbsolutePath());\n String outString = readFile.getAbsolutePath();\n outString = outString.substring(0, outString.length() - 3);\n outString = outString + \"txt\";\n outputField.setText(outString);\n progressLabel.setBackground(INFO);\n progressLabel.setText(PRESS_EXTRACT);\n } else {\n System.out.println(NO_FILE_SELECTED);\n progressLabel.setBackground(WARNING);\n progressLabel.setText(SELECT_FILE);\n }\n }",
"private static void menuSelector(){\r\n\t\tint answer= getNumberAnswer();\r\n\t\tswitch (answer) {\r\n\t\tcase 0:\r\n\t\t\tshowShapeInfo(shapes[0]);\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcreateShape();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Its Perimeter is equal to: \" +calcShapePerimeter(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Its Area is equal to: \" +calcShapeArea(shapes[0]));\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Provide integer to use for scaling shape: \");\r\n\t\t\tscaleShape(shapes[0], getNumberAnswer());\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"That's not actually an option.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void discardPrompt() {\r\n\t\tfor (int i = 0; i < mustDiscard.size(); i++) {\r\n\t\t\tString prompt = \"**[Discard]** a card \";\r\n\t\t\tif (mustDiscard.get(i).contentEquals(\"Sleight of Hand\")) {\r\n\t\t\t\tprompt += \"to draw 2 cards\";\r\n\t\t\t} else if (mustDiscard.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"to choose one: **3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n crop = new javax.swing.JComboBox();\n inseason = new javax.swing.JComboBox();\n useThis = new javax.swing.JButton();\n done = new javax.swing.JButton();\n\n crop.setModel(new javax.swing.DefaultComboBoxModel(seasonality.Crops.editableCrops()));\n crop.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cropActionPerformed(evt);\n }\n });\n\n inseason.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"In Season\", \"Out Of Season\" }));\n\n useThis.setText(\"Use this Property\");\n useThis.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n useThisActionPerformed(evt);\n }\n });\n\n done.setText(\"Done/Continue To Game\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(useThis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(crop, 0, 251, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(inseason, 0, 134, Short.MAX_VALUE)))\n .addGap(18, 18, 18)\n .addComponent(done, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(184, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(113, 113, 113)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(crop, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)\n .addComponent(inseason))\n .addGap(18, 18, 18)\n .addComponent(useThis, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(done, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(324, 324, 324))\n );\n }",
"public void fourOption(String selection)\n {\n switch (selection)\n {\n case \"1\":\n registerplayerName(); break;\n case \"2\": \n if (getPlayerName().equals(\"\"))\n {\n System.out.println(\"Sorry, you must register a name first\");\n registerplayerName();\n }\n else \n {\n System.out.println(\"Game will Start!\");\n \n }\n break;\n case \"3\":\n helpMenu();break;\n case \"4\":\n System.out.println(\"to exist\"); break;\n default:\n System.out.println(\"Invalid input\"); break;\n }\n }",
"private void showLoserDialog() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"You Have Been Defeated \" + player1.getName() + \",Computer Wins!!\", new ButtonType(\"Close\", ButtonBar.ButtonData.NO), new ButtonType(\"Try Again?\", ButtonBar.ButtonData.YES));\n alert.setGraphic(new ImageView(new Image(this.getClass().getResourceAsStream(\"/Images/bronze.png\"))));\n alert.setHeaderText(null);\n alert.setTitle(\"Computer Wins\");\n alert.showAndWait();\n if (alert.getResult().getButtonData() == ButtonBar.ButtonData.YES) {\n onReset();\n }\n }",
"public AbstractPokemon.Type selectType()\n {\n JOptionPane typeSelector = new JOptionPane();\n Object message = \"Select which Pokemon this trainer is willing to capture:\";\n Object[] options = {AbstractPokemon.Type.FIRE_TYPE, AbstractPokemon.Type.WATER_TYPE, AbstractPokemon.Type.GRASS_TYPE, AbstractPokemon.Type.ANY_TYPE};\n int type = typeSelector.showOptionDialog(null, message, \"Selection\",\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, \n options[3]);\n AbstractPokemon.Type faveType;\n switch(type)\n {\n case 0: faveType = AbstractPokemon.Type.FIRE_TYPE; break;\n case 1: faveType = AbstractPokemon.Type.WATER_TYPE; break;\n case 2: faveType = AbstractPokemon.Type.GRASS_TYPE; break;\n case 3: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n default: faveType = AbstractPokemon.Type.ANY_TYPE; break;\n }\n return faveType;\n }",
"public static void main(String[] args) {\n\t\tboolean keepPlaying = false;\n\t\t\n\t\tdo\n\t\t{\n\t\t\t//initializing variables\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tString p1Name;\n\t\t\tString p2Name;\n\t\t\tint numbChips = 0;\n\t\t\tChipsGame chipsGame;\n\t\t\tint chosenNumberOfChips;\n\t\t\t\n\t\t\t\n\t\t\t//get name of the first player(there is no described restrictions for naming the 1st player)\n\t\t\tSystem.out.print(\"What is the name of the first player? \");\n\t\t\tp1Name = sc.nextLine();\n\t\t\t\n\t\t\t//get the name of the seccond player\n\t\t\tSystem.out.print(\"What is the name of the second player? \");\n\t\t\tp2Name = sc.nextLine();\n\t\t\t\n\t\t\t//checking that first and second player's names do not match each other\n\t\t\twhile(p1Name.equalsIgnoreCase(p2Name))\n\t\t\t{\n\t\t\t\tSystem.out.print(\"Both players cannot be named \"+p2Name+\". Enter a different name:\");\n\t\t\t\tp2Name = sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t\t//getting number of chips (it must be at least 3 and odd)\n\t\t\twhile (numbChips == 0) {\n\t\t\t\tSystem.out.print(\"How many chips does the initial pile contain? \");\n\t\t\t\ttry {\n\t\t\t\t\tnumbChips = sc.nextInt();\n\t\t\t\t\tif (numbChips < 3 || numbChips%2 == 0) {\n\t\t\t\t\t\tnumbChips = 0;\n\t\t\t\t\t\tSystem.out.println(\"The number of chips must be a positive odd integer greather than 2. Try Again\");\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\tSystem.out.println(\"The number of chips must be a positive odd integer greather than 2. Try Again\");\n\t\t\t\t\tsc.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//instantiating the game\n\t\t\tchipsGame = new ChipsGame(p1Name, p2Name, numbChips);\n\t\t\t\n\t\t\t//checking to see if there should be another round (game is over when the number of chips in the pile is 0)\n\t\t\twhile(!chipsGame.isGameOver())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n* * * * * * * * * * * * * * * * * * * * * * * * * * *\");\n\t\t\t\tSystem.out.println(chipsGame.getNextPlaySummary());//gets an String with description of the next play (whose turn, # of chips)\n\t\t\t\tchosenNumberOfChips = 0;//for the user to select how many he wants\n\t\t\t\t\n\t\t\t\t//loop to test that the user is entering a valid value\n\t\t\t\twhile(chosenNumberOfChips == 0)\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchosenNumberOfChips = sc.nextInt();\n\t\t\t\t\t\tif(chosenNumberOfChips < 1)//too small\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenNumberOfChips = 0;\n\t\t\t\t\t\t\tSystem.out.println(\"Ilegal move. You must take at least one chip.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(chosenNumberOfChips > chipsGame.howManyChipsCanBeTaken())//too big\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenNumberOfChips = 0;\n\t\t\t\t\t\t\tSystem.out.println(\"Ilegal move. You cant take more than \" + chipsGame.howManyChipsCanBeTaken());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse//right selection\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//informing that the current user selected chosenNumberOfChips\n\t\t\t\t\t\t\tchipsGame.play(chosenNumberOfChips);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// wrong input\n\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\tSystem.out.println(\"The value you enter is not valid. Try again.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(chipsGame.getSummaryOfPlayer(PosiblePlayers.Player1));\n\t\t\tSystem.out.print(chipsGame.getSummaryOfPlayer(PosiblePlayers.Player2));\n\t\t\tSystem.out.print(chipsGame.whoWins() + \" wins!\\n\\n\");\n\t\t\t\n\t\t\tSystem.out.println(\"Play another game? (y/n)\");\n\t\t\tString desicion = sc.next();\n\t\t\tkeepPlaying = desicion.equalsIgnoreCase(\"y\");\n\t\t\t\n\t\t\tif(!keepPlaying)\n\t\t\t\tsc.close();\n\t\t\t\n\t\t}while(keepPlaying);\n\t\t\n\t\tSystem.out.println(\"\\nThanks for Playing\");\n\t}",
"private void showGameOverDialog() {\n this.computerPaquetView.showOnceHiddenCards();\n int dialogResult = JOptionPane.showConfirmDialog (null, String.format(\"%s, you have lost!\\nPlay again?\", this.blackjackController.getHumanPlayer().getName()),\"\", JOptionPane.YES_NO_OPTION);\n if(dialogResult == JOptionPane.YES_OPTION){\n this.blackjackController.getHumanPlayer().resetBudget();\n this.startGame();\n } else {\n this.dispose();\n }\n }",
"private PieceType handlePromotion() {\n List<String> choices = new ArrayList<>();\n choices.add(\"Queen\");\n choices.add(\"Knight\");\n choices.add(\"Rook\");\n choices.add(\"Bishop\");\n\n ChoiceDialog<String> dialog = new ChoiceDialog<>(\"Queen\", choices);\n dialog.setTitle(\"Choice Dialog\");\n dialog.setHeaderText(\"♟ Your pawn has been promoted!\");\n dialog.setContentText(\"Please choose a type to promote to:\");\n\n PieceType returnPiece;\n Side currentSide = controller.getCurrentSide();\n Optional<String> result = dialog.showAndWait();\n if (result.isPresent()) {\n if (result.get().equals(\"Queen\")) {\n returnPiece = ChessPiece.ChessPieceType.QUEEN;\n } else if (result.get().equals(\"Knight\")) {\n returnPiece = ChessPiece.ChessPieceType.KNIGHT;\n } else if (result.get().equals(\"Rook\")) {\n returnPiece = ChessPiece.ChessPieceType.ROOK;\n } else {\n returnPiece = ChessPiece.ChessPieceType.BISHOP;\n }\n promotedPiece = result.get();\n } else {\n returnPiece = ChessPiece.ChessPieceType.QUEEN;\n Alert alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Interactive Chess\");\n alert.setHeaderText(\"You did not make a choice\");\n alert.setContentText(\"The default choice QUEEN will be used\");\n alert.showAndWait();\n promotedPiece = \"Queen\";\n }\n promotionEventHappened = true;\n\n return returnPiece;\n }",
"public static int getUserChoice(){\r\n return Input.getInt(\"Enter 1 to add a song, 2 to display all songs, or 3 to quit the program: \");\r\n }",
"public void playerMove()\n\t{\n\t\tint col = 0;\n\t\tint row = 0;\n\t\tint choice = 0;\n\t\twhile (true)\n\t\t{\n\t\t\tif (StdDraw.mousePressed())\n\t\t\t{\n\t\t\t\tif (StdDraw.mouseX() > 0.5)\t\t//checks if player is clicking on a number option\n\t\t\t\t{\n\t\t\t\t\tif (StdDraw.mouseY() < 0.25) //logic for checking which number is selected\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int a = 0; a < human.size(); a++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (human.get(a).equals(2))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchoice = 2;\n\t\t\t\t\t\t\t\t\thuman.remove(a);\n\t\t\t\t\t\t\t\t\tbreak;\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\telse if (StdDraw.mouseY() < 0.5)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int a = 0; a < human.size(); a++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (human.get(a).equals(4))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchoice = 4;\n\t\t\t\t\t\t\t\t\thuman.remove(a);\n\t\t\t\t\t\t\t\t\tbreak;\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\telse if (StdDraw.mouseY() < 0.75)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int a = 0; a < human.size(); a++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (human.get(a).equals(6))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchoice = 6;\n\t\t\t\t\t\t\t\t\thuman.remove(a);\n\t\t\t\t\t\t\t\t\tbreak;\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int a = 0; a < human.size(); a++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (human.get(a).equals(8))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tchoice = 8;\n\t\t\t\t\t\t\t\t\thuman.remove(a);\n\t\t\t\t\t\t\t\t\tbreak;\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}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (StdDraw.mousePressed()) //fills in players move\n\t\t\t{\n\t\t\t\tif (choice != 0)\n\t\t\t\t{\n\t\t\t\t\tif (StdDraw.mouseX() < 0.5)\n\t\t\t\t\t{\t\n\t\t\t\t\t\tcol = (int) ((StdDraw.mouseX() * 6));\t\t\t\t\t\t\n\t\t\t\t\t\trow = (int) ((StdDraw.mouseY() * 3));\n\t\t\t\t\t\tif (board[row][col] == 0) \n\t\t\t\t\t\t{\t\t// valid move (empty slot)\n\t\t\t\t\t\t\tboard[row][col] = choice;\n\t\t\t\t\t\t\tdraw.drawMove(col, row, choice);\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}\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.5996094",
"0.5829645",
"0.5731492",
"0.54667485",
"0.54471695",
"0.5402232",
"0.5401161",
"0.5320461",
"0.5229394",
"0.51922655",
"0.51729316",
"0.51621825",
"0.51528555",
"0.513276",
"0.51191115",
"0.51173514",
"0.5113317",
"0.5080433",
"0.5066277",
"0.5065658",
"0.5049979",
"0.49793655",
"0.4967644",
"0.49499425",
"0.49337682",
"0.49155843",
"0.48933166",
"0.4883142",
"0.4873587",
"0.4858981",
"0.4856627",
"0.48541713",
"0.48516294",
"0.48490843",
"0.4843968",
"0.48255107",
"0.48195195",
"0.4804525",
"0.47943324",
"0.47892126",
"0.47849697",
"0.47813538",
"0.47696158",
"0.47663805",
"0.47596702",
"0.47575945",
"0.47491002",
"0.47375315",
"0.47330567",
"0.4731594",
"0.47309512",
"0.4725551",
"0.4717402",
"0.4716882",
"0.4714807",
"0.47134572",
"0.47124133",
"0.47106606",
"0.4709209",
"0.47021586",
"0.4700211",
"0.4698333",
"0.46909532",
"0.46790436",
"0.46722892",
"0.46696535",
"0.4668749",
"0.46684808",
"0.46619907",
"0.46612367",
"0.46544725",
"0.46364382",
"0.46358308",
"0.46340156",
"0.4631836",
"0.46306312",
"0.46305346",
"0.46219614",
"0.4614415",
"0.46071392",
"0.46042615",
"0.4601756",
"0.46013168",
"0.45945197",
"0.45940527",
"0.45867825",
"0.45865753",
"0.4585202",
"0.45844296",
"0.45692784",
"0.45605028",
"0.4549688",
"0.4542001",
"0.45412368",
"0.45377612",
"0.4537237",
"0.45353287",
"0.45332435",
"0.4519881",
"0.45139793"
] | 0.7733978 | 0 |
Displays status information about selected crop. | public void showCropStatus(int selection, GameState state) {
System.out.println("| You have selected: " + state.crops.get(selection - 1).getName());
if (state.crops.get(selection - 1).getPlanted()) {
System.out.println("| This crop has thirst level: " + state.crops.get(selection - 1).getThirstLevel() + "/" + state.crops.get(selection - 1).getMaxThirstLevel());
System.out.println("| It has grown for " + state.crops.get(selection - 1).getCurrentGrowthLevel() + " day(s).");
int days_left = state.crops.get(selection - 1).getDaysUntilHarvest() - state.crops.get(selection - 1).getCurrentGrowthLevel();
System.out.println("| Day(s) left until harvest: " + days_left);
} else {
System.out.println("| This crop has not been planted yet.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void selectCrop(GameState state) {\n s = new Scanner(System.in);\n int selection = 0;\n String cropOptions = \"\";\n\n for (int i = 1; i <= state.crops.size(); i ++) {\n cropOptions = cropOptions.concat(\"| \" + i + \". \" + state.crops.get(i-1).getName() + \"\\n\");\n }\n \n if (cropOptions.length() == 0) {\n \tSystem.out.println(\"|--------------------|\\r\\n\" +\n \t\t \t\t\t \"| You have no crops! |\\r\\n\" +\n \t\t \t\t\t \"|--------------------|\");\n } else {\n\n\t System.out.println(\"|----------------|\\r\\n\" +\n\t \"| Select a crop. |\\r\\n\" +\n\t \"|----------------|\");\n\t\n\t do {\n\t System.out.println(cropOptions);\n\t selection = s.nextInt();\n\t \n\t\n\t } while(selection < 1 || selection > state.crops.size());\n\t \n\t showCropStatus(selection, state);\n\t \n }\n }",
"private void manageCrops() {\r\n// System.out.println(\"\\nThis is manage the crops option\");\r\n CropView.runCropsView();\r\n }",
"public String getCropName(){\n return this.cropName;\n }",
"protected void printNumberSelectedPicturesOnStatusLine( ) {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t \n\t\t\tpublic void run() {\n\t\t\t\tString text;\n\t\t\t\tint count = indexData.pictureSelected.cardinality();\n\t\t\t\tif (count == 1) {\n\t\t\t\t\ttext = \"1 picture selected.\";\n\t\t\t\t} else if (count == 0) {\n\t\t\t\t\ttext = \"NO pictures selected\";\n\t\t\t\t} else {\n\t\t\t\t\ttext = String.valueOf(count) + \" pictures selected\";\n\t\t\t\t}\n\t\t\t\tselPictures.setText(text);\t\n\t\t\t}\n\t\t});\n\t}",
"public String getCropName() {\n\t\n\t\treturn cropName;\n\t\n\t}",
"public String GetCropType()\n {\n return this.cropType;\n }",
"public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}",
"public String showStatus();",
"private void displayStatus(String status) {\n\t\tif (!status.equals(\"\")) {\n\t\t\tdouble x = LEFT_MARGIN;\n\t\t\tdouble y = nameY + IMAGE_MARGIN + IMAGE_HEIGHT + STATUS_MARGIN;\n\t\t\tGLabel pstatus = new GLabel(status);\n\t\t\tpstatus.setFont(PROFILE_STATUS_FONT);\n\t\t\tif (getElementAt(x, y) != null) {\n\t\t\t\tremove(getElementAt(x, y));\n\t\t\t}\n\t\t\tadd(pstatus, x, y);\n\t\t}\n\t}",
"public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }",
"public void showDetails(){\r\n\t\tSystem.out.println(\"Length is : \"+getLength());\r\n\t\tSystem.out.println(\"Width is : \"+getWidth());\r\n\t\tSystem.out.println(\"Area Of Rectangle is : \"+area());\r\n\t}",
"public void printRegionStatus() {\n for (int i = 0; i < numRegions; i++) {\n System.out.print(regionList[i].getRegionName() + \" is \");\n if (regionList[i].checkOpen()) {\n System.out.println(\"open. :D\");\n } else {\n System.out.println(\"closed. D:\");\n }\n }\n }",
"public int getCropType() {\n\n return cropType;\n }",
"private void updateStatus() {\n String statusString = dataModel.getStatus().toString();\n if (dataModel.getStatus() == DefinitionStatus.MARKER_DEFINITION) {\n statusString += \" Number of markers: \" + dataModel.getNumberOfMarkers() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n if (dataModel.getStatus() == DefinitionStatus.POINTS_DEFINITION) {\n statusString += \" Number of point fields: \" + dataModel.getNumberOfPoints() + \". Current position: \"\n + dataModel.getTempMousePosition();\n }\n statusLabel.setText(statusString);\n }",
"public void printPlayerStatus() {\n System.out.println(getName() + \" owns \" +\n getOwnedCountries().size() + \" countries and \"\n + getArmyCount() + \" armies.\");\n\n String ownedCountries = \"\";\n for (Country c : getOwnedCountries())\n {\n ownedCountries += c.getCountryName().name() + \": \" + c.getArmyOccupied() + \"\\n\";\n }\n System.out.println (ownedCountries);\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"public void printStatus();",
"public String getStatusView() {\r\n return statusView;\r\n }",
"@Override\n\t protected int getCropItem()\n\t {\n\t\t return cropID;\n\t }",
"private void updateInfoBarOnClick() {\n\t\tif (!selectedList.isEmpty()) {\n\t\t\tStringBuilder label = new StringBuilder(\"Se selecciono: \");\n\t\t\tfor (Render<? extends MovableDrawing> selectedDrawing : selectedList) {\n\t\t\t\tlabel.append(selectedDrawing.getFigure().toString()).append(\", \");\n\t\t\t}\n\t\t\tlabel.setLength(label.length() - 2);\n\t\t\tstatusPane.updateStatus(label.toString());\n\t\t} else {\n\t\t\tstatusPane.updateStatus(\"Ninguna figura encontrada\");\n\t\t}\n\t}",
"public void status() {\n\t\tString bName;\n\t\tSystem.out.println(\"=== Branches ===\");\n\t\tIterator iter = myBranch.entrySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry entry = (Map.Entry) iter.next();\n\t\t\tbName = (String) entry.getKey();\n\n\t\t\tif (currentBranch.equals(bName)) {\n\t\t\t\tSystem.out.println(\"*\" + bName);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(bName);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Staged Files ===\");\n\t\tfor (int i = 0; i < stagedFiles.size(); i++) {\n\t\t\tSystem.out.println(stagedFiles.get(i));\n\t\t}\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"=== Files Marked for Untracking ===\");\n\t\tfor (int i = 0; i < untrackedFiles.size(); i++) {\n\t\t\tSystem.out.println(untrackedFiles.get(i));\n\t\t}\n\t}",
"private void updateSelectedDetailsPanel() {\n\t\tfinal ObservableList<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (selectedItems.size() == 1) {\n\t\t\tselectedPanel.setVisible(true);\n\t\t\tfinal Project p = selectedItems.get(0);\n\t\t\tselectedName.setText(p.getName());\n\t\t\tfinal DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\n\t\t\tselectedBuildDate.setText(\n\t\t\t\t\tp.getLastBuildDateTime() == null ? \"-\" : p.getLastBuildDateTime().format(formatter));\n\t\t\tselectedBuildSize.setText(\n\t\t\t\t\tp.getLastBuildSize() == 0 ? \"-\" : (String.format(\"%,d\", p.getLastBuildSize() / 1024) + \" kb\"));\n\t\t\ttry {\n\t\t\t\tfinal Path path = Path.of(p.getProjectPath());\n\t\t\t\tselectedDirFiles.setText(String.format(\"%,d\", fileService.getFileCountOfDirectory(path)) + \" files\");\n\t\t\t\tselectedDirSize.setText(String.format(\"%,d\", fileService.getDirectorySize(path) / 1024) + \" kb\");\n\t\t\t} catch (final IOException e) {\n\t\t\t\tselectedDirSize.setText(\"-\");\n\t\t\t\tselectedDirFiles.setText(\"-\");\n\t\t\t\tlogger.trace(\"Error updating selected details panel.\", e);\n\t\t\t}\n\t\t\tselectedPath.setText(p.getProjectPath());\n\t\t\ttry {\n\t\t\t\tselectedImage.setImage(new Image(getResourceAsUrl(gameService.getGameItemPath(p.getGame())).toString()));\n\t\t\t} catch (final IOException e) {\n\t\t\t\tlogger.error(\"Failed to load image from project's game setting.\", e);\n\t\t\t}\n\t\t} else {\n\t\t\tselectedPanel.setVisible(false);\n\t\t}\n\t}",
"public void handle(ActionEvent e) {\n Bounds selectionBounds = rubberBandSelection.getBounds();\n\n // show bounds info\n System.out.println( \"Selected area: \" + selectionBounds);\n\n // crop the image\n crop( selectionBounds);\n\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"public void displayOperations() {\n\n System.out.println(\"\" +\n \"Select Operation for GasPump 2 : \\n\" +\n \"0.) Activate \\n\" +\n \"1.) Start \\n\" +\n \"2.) PayCredit \\n\" +\n \"3.) Reject \\n\" +\n \"4.) PayDebit \\n\" +\n \"5.) Pin \\n\" +\n \"6.) Cancel \\n\" +\n \"7.) Approved \\n\" +\n \"8.) Diesel \\n\" +\n \"9.) Regular \\n\" +\n \"10.) Super \\n\" +\n \"11.) StartPump\\n\" +\n \"12.) PumpGallon\\n\" +\n \"13.) StopPump \\n\" +\n \"14.) FullTank \\n\" +\n \"q.) Quit\\n\");\n }",
"public static void showStatus() {\n\t\tSystem.out.println(\"Copy and paste a repo from above you would like to expand the status of:\");\n\n\t\ttry {\n\t\t BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));\n\t\t String s = bufferRead.readLine();\n\n\t\t ProcessBuilder p1 = new ProcessBuilder(\"/usr/bin/git\",\"status\");\n\t\t\t\n\t\t\t// then change working directory to s with p.directory command\n\t\t\tp1.directory(new File(s));\n\n\t\t\tProcess process = p1.start();\n\t\t\tint errCode = process.waitFor();\n\t\t\t// find out if there was an error\n\t\t\t//System.out.println(\"Any errors? \" + (errCode == 0 ? \"No\" : \"Yes\"));\n\n\t\t\t// stringbuilder to take in the output from git status\n\t\t\tStringBuilder sb2 = new StringBuilder();\n\n\t\t\t// bufferreader to take in the output from git status\n\t\t\tBufferedReader reader = \n\t\t\t\tnew BufferedReader(new InputStreamReader(process.getInputStream()));\n\n\t\t\t// while loop to build string of output\n\t\t\tString line = \"\";\t\t\t\n\t\t\t\twhile ((line = reader.readLine())!= null) {\t\t \n\t\t\t\t\tsb2.append(line + \"\\n\");\n\t\t\t\t}\n\n\t\t\tString status = sb2.toString();\n\t\t\t// print out the status\n\t\t\tSystem.out.println(\"\\n**************************************************************\\n\");\n\t\t\tSystem.out.println(status);\n\n\t\t\t// recursion to restart process\n\t\t\texpand(true);\n\n\t\t} // try\n\t\t\n\t\tcatch(IOException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(\"\\n**************************************************************\\n\");\n\t\t\tSystem.out.println(\"Invalid working directory path! \\nPlease try again\\nIf you are wondering why you should expand a repository, its because its so much fun! :D\\n\");\n\t\t\texpand(true);\n\n\t\t} // catch\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} // catch\n\n\t}",
"public void showInfoWithStatus(String status) {\n this.show(status, infoImage, -1);\n }",
"private void showCurrentStatus(String header) {\r\n try {\r\n if (curObject != null) {\r\n curClass = curObject.getBClass();\r\n }\r\n if (curClass != null) {\r\n curPackage = curClass.getPackage();\r\n }\r\n\r\n String msg = header;\r\n if (curPackage != null) {\r\n msg += \"\\nCurrent Package = \" + curPackage;\r\n }\r\n if (curClass != null) {\r\n msg += \"\\nCurrent Class = \" + curClass;\r\n }\r\n if (curObject != null) {\r\n msg += \"\\nCurrent Object = \" + curObject;\r\n }\r\n JOptionPane.showMessageDialog(null, msg);\r\n } catch (Exception exc) {\r\n }\r\n }",
"public void setCropName(String cropName) {\n\t\n\t\tthis.cropName = cropName;\n\t\n\t}",
"private void updateSummary() {\n Bitmap cardBack;\n\n int selectedBackground = prefs.getSavedCardBackground();\n int selectedBackgroundColor = prefs.getSavedCardBackgroundColor();\n\n cardBack = bitmaps.getCardBack(selectedBackground, selectedBackgroundColor);\n\n image.setImageBitmap(cardBack);\n setSummary(String.format(Locale.getDefault(), \"%s %s\",\n context.getString(R.string.settings_background), selectedBackground + 1));\n }",
"public void printStatus() {\n printBranches();\n printAllStages();\n printModified();\n printUntracked();\n }",
"public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}",
"public void printCurrentState() {\n\t\t//getX() and getY() are methods from the Point class\n\t\tSystem.out.println(\"Avatar location: \" + avatar.getLocation().getX() + \",\" + avatar.getLocation().getY());\n\t\tSystem.out.println(\"Points: \" + avatar.getScore());\n\t}",
"public void perform(GameState state) {\n\n selectCrop(state);\n\n// returnBack(state); // add back in for command lines\n }",
"private void actionComboboxChangedImage ()\r\n\t{\r\n\r\n\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t//---- Check if the project is empty or not\r\n\t\tif (tableSize != 0)\r\n\t\t{\r\n\t\t\tif (isDisplaySamples) { helperDisplayDetectedSamples(); }\r\n\t\t\telse { helperDisplayInputImage(); }\r\n\r\n\t\t\thelperDisplaySamplesCombobox();\r\n\t\t\thelperDisplayResults();\r\n\t\t\thelperDisplayChart(true);\r\n\t\t}\r\n\t}",
"private void createStatusPanel(final Composite pp) {\n\t\t//\n\t\t// Create status panel\n\t\t//\n\t\tstatusPanel = new Composite(pp, SWT.NONE);\n\t\tstatusPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 3;\n\t\tlayout.horizontalSpacing = 5;\n\t\tlayout.verticalSpacing = 0;\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tstatusPanel.setLayout(layout);\n\n\t\t//\n\t\t// Create status sub-panels\n\t\t//\n\t\tcreateOffsetPanel(statusPanel);\n\t\tcreateValuePanel(statusPanel);\n\t\tcreateFileSizePanel(statusPanel);\n\t}",
"private void displayStatusPanel(String message, String title, int status) {\n JOptionPane.showMessageDialog(mainPanel, message, title, status);\n }",
"public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}",
"private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}",
"public void showSquareDetails(){\r\n view.printSquareDetails(model.getSideLength(), model.getColor());\r\n }",
"private void displayBuildingInfo() {\r\n\t\tui.buildingInfoPanel.buildingName.setText(currentBuilding.type.label);\r\n\t\tui.buildingInfoPanel.completed.setText(\"\" + currentBuilding.buildProgress);\r\n\t\tui.buildingInfoPanel.completedTotal.setText(\"\" + currentBuilding.type.hitpoints);\r\n\t\tui.buildingInfoPanel.hitpoints.setText(\"\" + currentBuilding.hitpoints);\r\n\t\tui.buildingInfoPanel.hitpointsTotal.setText(\"\" + currentBuilding.buildProgress);\r\n\t\tui.buildingInfoPanel.assignedWorkers.setText(\"\" + currentBuilding.assignedWorker);\r\n\t\tui.buildingInfoPanel.workerTotal.setText(\"\" + currentBuilding.getWorkers());\r\n\t\tui.buildingInfoPanel.assignedEnergy.setText(\"\" + currentBuilding.assignedEnergy);\r\n\t\tui.buildingInfoPanel.energyTotal.setText(\"\" + currentBuilding.getEnergy());\r\n\t\tui.buildingInfoPanel.efficiency.setText(String.format(\"%.3f%%\", currentBuilding.getEfficiency() * 100));\r\n\t\tui.buildingInfoPanel.tech.setText(currentBuilding.techId);\r\n\t\tui.buildingInfoPanel.cost.setText(\"\" + currentBuilding.type.cost);\r\n\t\tui.buildingInfoPanel.locationX.setText(\"\" + currentBuilding.location.x);\r\n\t\tui.buildingInfoPanel.locationY.setText(\"\" + currentBuilding.location.y);\r\n\t\tui.buildingInfoPanel.apply.setEnabled(true);\r\n\t\tui.buildingInfoPanel.buildingEnabled.setSelected(currentBuilding.enabled);\r\n\t\tui.buildingInfoPanel.buildingRepairing.setSelected(currentBuilding.repairing);\r\n\t\t\r\n\t\tui.buildingInfoPanel.completionPercent.setText(String.format(\" %.3f%%\", currentBuilding.buildProgress * 100.0 / currentBuilding.type.hitpoints));\r\n\t\tui.buildingInfoPanel.hitpointPercent.setText(String.format(\" %.3f%%\", currentBuilding.hitpoints * 100.0 / currentBuilding.buildProgress));\r\n\t\tui.buildingInfoPanel.workerPercent.setText(String.format(\" %.3f%%\", currentBuilding.assignedWorker * 100.0 / currentBuilding.getWorkers()));\r\n\t\tui.buildingInfoPanel.energyPercent.setText(String.format(\" %.3f%%\", currentBuilding.assignedEnergy * 100.0 / currentBuilding.getEnergy()));\r\n\t\t\r\n\t\tui.buildingInfoPanel.upgradeList.removeAllItems();\r\n\t\tui.buildingInfoPanel.upgradeList.addItem(\"None\");\r\n\t\tfor (int j = 0; j < currentBuilding.type.upgrades.size(); j++) {\r\n\t\t\tui.buildingInfoPanel.upgradeList.addItem(currentBuilding.type.upgrades.get(j).description);\r\n\t\t}\r\n\t\tui.buildingInfoPanel.upgradeList.setSelectedIndex(currentBuilding.upgradeLevel);\r\n\t\t\r\n\t\tui.buildingInfoPanel.resourceTableModel.rows.clear();\r\n\t\tfor (String r : currentBuilding.type.resources.keySet()) {\r\n\t\t\tif (\"worker\".equals(r) || \"energy\".equals(r)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tResource res = new Resource();\r\n\t\t\tres.type = r;\r\n\t\t\tres.amount = currentBuilding.getResource(r);\r\n\t\t\tui.buildingInfoPanel.resourceTableModel.rows.add(res);\r\n\t\t}\r\n\t\tui.buildingInfoPanel.resourceTableModel.fireTableDataChanged();\r\n\t}",
"@FXML public void showStatistics() {\n\t\tPopupMessage.getInstance().showAlert(AlertType.INFORMATION,\n\t\t\t\t\t\t\t\t\t\t\tgsTitle, \n\t\t\t\t\t\t\t\t\t\t\tgsHeader,\n\t\t\t\t\t\t\t\t\t\t\tgsDetailsFiles + Connect.getNumberofFilesFromStatistics()\n\t\t\t\t\t\t\t\t\t\t\t+ System.lineSeparator()\n\t\t\t\t\t\t\t\t\t\t\t+ gsDetailsCases + Connect.getCases());\n\t}",
"private void performCrop() {\n try {\r\n //call the standard crop action intent (the user device may not support it)\r\n Intent cropIntent = new Intent(\"com.android.camera.action.CROP\");\r\n //indicate image type and Uri\r\n cropIntent.setDataAndType(picUri, \"image/*\");\r\n //set crop properties\r\n cropIntent.putExtra(\"crop\", \"true\");\r\n //indicate aspect of desired crop\r\n// cropIntent.putExtra(\"aspectX\", 1);\r\n// cropIntent.putExtra(\"aspectY\", 1);\r\n //indicate output X and Y\r\n// cropIntent.putExtra(\"outputX\", 256);\r\n// cropIntent.putExtra(\"outputY\", 256);\r\n //retrieve data on return\r\n cropIntent.putExtra(\"return-data\", true);\r\n //start the activity - we handle returning li_history onActivityResult\r\n startActivityForResult(cropIntent, 2);\r\n }\r\n //respond to users whose devices do not support the crop action\r\n catch (ActivityNotFoundException anfe) {\r\n //display an error message\r\n String errorMessage = \"Whoops - your device doesn't support the crop action!\";\r\n Toast toast = Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n }",
"public void setCropType(int cropType) {\n\n this.cropType = cropType;\n }",
"@Override\n\tpublic void render() {\n\t\tJOptionPane.showMessageDialog(null,\n\t\t \"Cuboid Dimensions: \" + \n\t\t \"\\nHeight = \" + height + \n\t\t \"\\nWidth = \" + width + \n\t\t \"\\nDepth = \" + depth +\n\t\t \"\\nSurface Area = \" + surfaceArea() +\n\t\t \"\\nVolume = \" + volume());\n\t\t\n\t}",
"public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }",
"public void showStatus(Field field)\n {\n\n stepLabel.setText(\"\");\n stats.reset();\n\n fieldView.preparePaint();\n\n for(int row = 0; row < field.getDepth(); row++) {\n for(int col = 0; col < field.getWidth(); col++) {\n if(col <= field.getSavannaEnvironment().getEndCol()) {\n if(!\"Savanna\".equals(currentEnvironment)) {\n fieldView.drawMark(col, row, Color.gray);\n } else {\n fieldView.drawMark(col, row, Color.YELLOW);\n }\n } else if(col > field.getSavannaEnvironment().getEndCol() && col <= field.getForestEnvironment().getEndCol()) {\n if(!\"Forest\".equals(currentEnvironment)) {\n fieldView.drawMark(col, row, Color.gray);\n } else {\n fieldView.drawMark(col, row, Color.GREEN);\n }\n } else {\n if(!\"Desert\".equals(currentEnvironment)) {\n fieldView.drawMark(col, row, Color.gray);\n } else {\n fieldView.drawMark(col, row, Color.ORANGE);\n }\n }\n }\n }\n stats.generateCounts(field);\n stats.countFinished();\n\n population.setText(POPULATION_PREFIX + stats.getPopulationDetails(field, currentEnvironment));\n fieldView.repaint();\n }",
"private String getStatusDefaultMessage() {\r\n\r\n\t\tfinal Collection<GalleryMT20Item> allSelectedPhoto = _galleryMT20.getSelection();\r\n\t\tfinal int allPhotoSize = allSelectedPhoto.size();\r\n\r\n\t\treturn allPhotoSize == 0 //\r\n\t\t\t\t// hide status message when nothing is selected\r\n\t\t\t\t? UI.EMPTY_STRING\r\n\t\t\t\t: NLS.bind(Messages.Pic_Dir_StatusLabel_SelectedImages, allPhotoSize);\r\n\t}",
"private void viewSavedCourseList() {\n boolean detailed = yesNoQuestion(\"Would you like to look at the detailed version? (just names if no)\");\n\n System.out.println(\"The current active courses are:\\n \");\n for (int i = 0; i < courseList.getCourseList().size(); i++) {\n if (detailed) {\n System.out.println((i + 1) + \":\");\n detailedCoursePrint(courseList.getCourseList().get(i));\n } else {\n System.out.println((i + 1) + \": \" + courseList.getCourseList().get(i).getName());\n }\n }\n }",
"@GetMapping(\"/GetCPsByCurrentStatus/{Status}\")\n public Collection<AddfCount> getCurrentRedCPs(@PathVariable(\"Status\") int status){\n return this.addfCountService.getCurrentStatusCPs(status);\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"public void onPagesCropped() {\n/* 560 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ try {\n/* 565 */ JSONObject jsonObj = new JSONObject();\n/* 566 */ if (this.mContext != null) {\n/* 567 */ String strCropPages = this.mContext.getResources().getString(R.string.pref_viewmode_user_crop);\n/* 568 */ jsonObj.put(\"Action\", strCropPages);\n/* */ } \n/* 570 */ jsonObj.put(\"Action event\", \"crop_pages\");\n/* */ \n/* 572 */ if (Utils.isNullOrEmpty(jsonObj.toString())) {\n/* 573 */ AnalyticsHandlerAdapter.getInstance().sendException(new Exception(\"takeUndoSnapshot with an empty string\"));\n/* */ }\n/* */ \n/* 576 */ takeUndoSnapshot(jsonObj.toString());\n/* 577 */ if (sDebug)\n/* 578 */ Log.d(TAG, \"snapshot: \" + jsonObj.toString()); \n/* 579 */ } catch (Exception e) {\n/* 580 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }",
"@Override\n\tpublic List<Crop> activeCrops() {\n\t\treturn cropRepository.getActiveCrops();\n\t}",
"public void showStatus(String paramString) {\n/* 258 */ getAppletContext().showStatus(paramString);\n/* */ }",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"@Override\r\n\tpublic int displayCheck(CookVO vo) throws Exception {\n\t\treturn session.update(\"com.mapper.cook.display\", vo);\r\n\t}",
"public void changeAction()\r\n {\r\n bufferedImage = imageCopy[0];\r\n edited = imageCopy[1];\r\n cropedPart = imageCopy[2];\r\n bufferedImage = imageCopy[3];\r\n\r\n isBlured = statesCopy[0];\r\n isReadyToSave = statesCopy[1];\r\n isChanged = statesCopy[2];\r\n isInverted = statesCopy[3];\r\n isRectangularCrop = statesCopy[4];\r\n isCircularCrop = statesCopy[5];\r\n isImageLoaded = statesCopy[6];\r\n }",
"public void displaySaveGameView()\n {\n System.out.println(\"\\nSave Game View selected.\");\n }",
"public static void updateStatusBar(){\n\t\tstatus.setText(\"Sensors: \"+Sensor.idToSensor.size()+(TurnController.getInstance().getCurrentTurn()!=null?\", Turn: \"+TurnController.getInstance().getCurrentTurn().turn:\"\"));\n\t}",
"@Override\n\tpublic void onStatusChanged(Object arg0, STATUS status) {\n\t\tSystem.out.println(status);\n\t\tswitch (status) {\n\n\t\tcase LAYER_LOADED:\n\t\t\tif (!isPathShow && goodsMap != null && goodsMap.size() > 0) {\n\t\t\t\tshelfList.clear();\n\t\t\t\tsearchTime = 0;\n\t\t\t\tqueryLocator();\n\t\t\t\tisPathShow = true;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"private void displayFileChooser() {\n\n // Initiate file chooser, and set title\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"Save Poster\");\n\n // Set extension filter\n FileChooser.ExtensionFilter filter = new FileChooser.ExtensionFilter(\"Image\", \"*.jpg\");\n fileChooser.getExtensionFilters().add(filter);\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString);\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.canRead()) {\n userDirectory = new File(\"C:\\\\\");\n }\n\n // Set the initial save directory\n fileChooser.setInitialDirectory(userDirectory);\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // Set initial file name\n fileChooser.setInitialFileName(movieTitle);\n }\n\n // Show file chooser dialog\n File file = fileChooser.showSaveDialog(primaryStage);\n\n // Check file isn't null, so it the image view\n if (file != null && imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", file);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Update preferences with the new location, and local variable\n preferences.put(\"saveLocation\", file.getParentFile().toString());\n userDirectoryString = file.getParentFile().toString();\n }\n }",
"protected void printMove(GameStatus status, int index) {\n System.out.println(name + \" chose \" + index + \" \" + status.remainingCandidates.get(index).name\n + \"(\" + status.remainingCandidates.get(index).score(compatibilityScoreSet) + \")\\n\");\n }",
"protected void updateStatus() {\n super.updateStatus();\n if (!getHaveData()) {\n if (getAllowMultiple()) {\n setStatus(\"Select one or more files\");\n } else {\n setStatus(\"Select a file\");\n }\n }\n }",
"public String showVision()\r\n {\r\n balayer();\r\n String res=\"Vision : +\\n\";\r\n for (int i=0; i<LONGUEUR ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<LARGEUR; j++) {\r\n res+=Vision[i][j][0];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesHor[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n res += \"\\n\";\r\n for (int i=0; i<4 ; i++) {\r\n res+=\" | \";\r\n for (int j=0; j<4; j++) {\r\n res+=lignesVert[i][j];\r\n res+=\" | \";\r\n }\r\n res+=\"\\n\";\r\n }\r\n System.out.println(res);\r\n return res;\r\n }",
"@Override\n public String toString() {\n return getStatusIcon() + \" \" + getDescription();\n }",
"private void showImageDetail() {\n }",
"public void drawDetailedProfile(Cell c)\n\t{\n\tif(expData==null)\treturn;\n\t\n\tint squareSize=12;\n\t\n\tstrokeWeight(1);\n\tstroke(150);\n\tfor(int i=0;i<expData.getNumConditions();i++)\n\t\t{\n\t\t//draw empty square\n\t\tstrokeWeight(1);\n\t\tstroke(150);\n\t\tfill(200);\n\t\trect((int)(width*0.5-expData.getNumConditions()*squareSize*0.5)+i*squareSize, this.END_Y+20,squareSize,squareSize); \n\t\t\n\t\t//fill with genes colors\n\t\tnoStroke();\n\t\tint miniSize=(int)Math.max(1,((squareSize-1)/Math.ceil(Math.sqrt(c.term.geneExs.size()))));\n\t\tint contX=0;\n\t\tint contY=0;\n\t\tIterator<String> it=c.term.geneExs.keySet().iterator();\n\t\tfor(int j=0;j<Math.min((squareSize-1)*(squareSize-1), c.term.geneExs.size());j++)\n\t\t\t{\n\t\t\tString gene=it.next();\n\t\t\tColor co=getColor(c.term.geneExs.get(gene), i);\n\t\t\tfill(co.getRed(), co.getGreen(), co.getBlue());\n\t\t\t\n\t\t\trect((int)(width*0.5-expData.getNumConditions()*squareSize*0.5)+i*squareSize+1+contX*miniSize, this.END_Y+20+1+contY*miniSize,miniSize,miniSize); \n\t\t\t\n\t\t\tcontX++;\n\t\t\tif((contX+1)*miniSize>squareSize-1)\t{contX=0;contY++;}\n\t\t\t}\n\t\t}\n\t\n\tstrokeWeight(2);\n\tstroke(0);\n\tline((int)(width*0.5-expData.getNumConditions()*squareSize*0.5)+selectedCol*squareSize, this.END_Y+20+squareSize,(int)(width*0.5-expData.getNumConditions()*squareSize*0.5)+selectedCol*squareSize+squareSize,this.END_Y+20+squareSize);\n\t}",
"public void onSelectProfilePic() {\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n Profile profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n if (profile.getIcon().equals(\"icon\" + currentIndex)) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" has already selected this player icon!\");\n return;\n }\n\n if (!profilePicLevelCheck(currentIndex, profile.getLevel())) {\n playerRecord.setStyle(\"-fx-background-color:red\");\n playerRecord.setText(profile.getName() + \" is not a high enough level for this profile picture!\");\n return;\n }\n\n playerRecord.setStyle(\"-fx-background-color: transparent\");\n PrintWriter user = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + playerPicked + \".txt\"));\n user.flush();\n user.write(profile.getWins() + \" \" + profile.getLosses() + \" \" + profile.getXp() + \" \"\n + profile.getWinStreak() + \" icon\" + currentIndex + \" \" + profile.getCarIcon());\n user.close();\n playerRecord.setText(profile.getName() + \" has changed profile pictures.\");\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}",
"public void display()\n\t{\n\t\tmediaType = \"Picture\";\n\t\t\n\t\tSystem.out.println(mediaType + \": \" + name + \", \" + resolution + \" dpi, is rated \" + rating + \" stars.\" );\n\t}",
"@FXML\r\n private void displayPostion(MouseEvent event) {\r\n status.setText(\"X = \" + event.getX() + \". Y = \" + event.getY() + \".\");\r\n }",
"public String getStatus() {\r\n return \"[\" + getStatusIcon() + \"]\";\r\n }",
"public static void status(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n System.out.printf(\"\\nNOMBRE:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.printf(\"\\nPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.printf(\"\\nPuntos De mana (MP):\\t\"+puntosDeMana);\n System.out.printf(\"\\nNivel: \\t\\t\\t\"+nivel);\n\tSystem.out.printf(\"\\nExperiencia:\\t\\t\"+experiencia);\n\tSystem.out.printf(\"\\nOro: \\t\\t\"+oro);\n System.out.printf(\"\\nPotion:\\t\\t\\t\"+articulo1);\n System.out.printf(\"\\nHi-Potion:\\t\\t\"+articulo2);\n System.out.printf(\"\\nM-Potion:\\t\\t\"+articulo3);\n System.out.printf(\"\\n\\tEnemigos Vencidos:\\t\");\n\tSystem.out.printf(\"\\nNombre:\\t\\t\\tNo.Derrotas\");\n System.out.printf(\"\\nDark Wolf:\\t\\t\"+enemigoVencido1);\n\tSystem.out.printf(\"\\nDragon:\\t\\t\\t\"+enemigoVencido2);\n System.out.printf(\"\\nMighty Golem:\\t\\t\"+enemigoVencido3);\t\n }",
"@Override\n public String toString() {\n return getStatusIcon() + \" \" + description;\n }",
"@Override\n public String toString() {\n return getStatusIcon() + \" \" + description;\n }",
"@Override\n public String toString() {\n return \"[\" + getStatusIcon() + \"] \" + getDescription();\n }",
"public Collage(ProjectLib pl, String filename, String[] sources, int collage_status, String decision) {\n\t\tthis.collage_status = collage_status;\n\t\tthis.filename = filename;\n\t\tthis.PL = pl;\n\t\tthis.ck3_decision = decision.equals(\"T\")?true:false;\n\t\tfor(int i = 2;i < sources.length;i++) {\n\t\t\tString user = sources[i];\n\t\t\tusers.add(user);\n\t\t}\n\t}",
"public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }",
"public String getDump()\n {\n String dump = \"Video status:\\n\";\n\n dump += \"Read mode: \" + videocard.graphicsController.readMode + \"\\n\";\n dump += \"Write mode: \" + videocard.graphicsController.writeMode + \"\\n\";\n \n // dump += \"Graphics mode: \" + ...\n // dump += \"Text mode: \" + ...\n \n return dump;\n }",
"public void updateStatusPanel() {\n\t\ttable.redraw();\n\t\tcursor.redraw();\n\t\tint rowIndex = table.getSelectionIndex();\n\t\tint columnIndex = cursor.getColumn();\n\n\t\tif (rowIndex < 0 || columnIndex < 0 || columnIndex >= HexEditorConstants.TABLE_NUM_COLUMNS) {\n\t\t\tHexManager.log(\"updateStatusPanel(): incorrect cursor coordinates!\"); //$NON-NLS-1$\n\t\t\treturn;\n\t\t}\n\n\t\tString cellData = table.getTableItem(rowIndex).getText(columnIndex);\n\n\t\tif (columnIndex < 1 || columnIndex > HexEditorConstants.TABLE_NUM_DATA_COLUMNS || cellData.length() == 0 || cellData.equals(HexEditorConstants.TABLE_EMPTY_CELL)) {\n\t\t\t//\n\t\t\t// Cursor is out of data cells - nothing to display\n\t\t\t//\n\t\t\tstatusOffset.setText(\"\"); //$NON-NLS-1$\n\t\t\tstatusValue.setText(\"\"); //$NON-NLS-1$\n\t\t} // if\n\t\telse {\n\t\t\t//\n\t\t\t// Cursor is above the data cell - update offset panel\n\t\t\t//\n\t\t\tHexTablePointer p = new HexTablePointer(rowIndex, columnIndex - 1);\n\t\t\tint offset = p.getOffset();\n\t\t\tint tableSize = table.getBufferSize();\n\t\t\tint ratio = (tableSize > 1) ? (100 * offset / (tableSize - 1)) : 100;\n\t\t\tstatusOffset.setText(Messages.HexEditorControl_54 + HexUtils.zeroPadding(Integer.toHexString(offset).toUpperCase(), 8) + Messages.HexEditorControl_55 + HexUtils.zeroPadding(Integer.toHexString(tableSize - 1).toUpperCase(), 8) + \"h (\" + ratio + \"%) \"); //$NON-NLS-3$ //$NON-NLS-4$\n\n\t\t\t//\n\t\t\t// Update value panel\n\t\t\t//\n\t\t\tint number = Integer.parseInt(cellData, 16);\n\n\t\t\tString binString = Integer.toBinaryString(number);\n\t\t\tstatusValue.setText(Messages.HexEditorControl_58 + cellData + Messages.HexEditorControl_59 + number + Messages.HexEditorControl_60 + Integer.toOctalString(number) + Messages.HexEditorControl_61 + (\"00000000\".substring(binString.length()) + binString) + Messages.HexEditorControl_63); //$NON-NLS-5$\n\t\t} // else\n\n\t\t//\n\t\t// Update table/file size\n\t\t//\n\t\tstatusFileSize.setText(Messages.HexEditorControl_64 + fileSizeFormat.format(table.getBufferSize()) + Messages.HexEditorControl_65);\n\t}",
"public static String describeStatus(Move move){\n String name = String.format(\"%s (%d)\", names.get(move.getUID()), move.getUID());\n Stage stage = move.getStage();\n String message = \"\";\n switch(stage){\n case CLAIM_TERRITORY:\n message = String.format(\"%s is claiming a territory.\", name);\n break;\n case REINFORCE_TERRITORY:\n message = String.format(\"%s is reinforcing a territory.\", name);\n break;\n case TRADE_IN_CARDS:\n message = String.format(\"%s is trading in cards.\", name);\n break;\n case PLACE_ARMIES:\n message = String.format(\"%s is placing armies.\", name);\n break;\n case DECIDE_ATTACK:\n message = String.format(\"%s is deciding whether or not to attack.\", name);\n break;\n case START_ATTACK:\n message = String.format(\"%s is choosing where to attack.\", name);\n break;\n case CHOOSE_ATTACK_DICE:\n message = String.format(\"%s is deciding how many dice to attack with.\", name);\n break;\n case CHOOSE_DEFEND_DICE:\n message = String.format(\"%s is deciding how many dice to defend with.\", name);\n break;\n case ROLL_HASH:\n message = String.format(\"%s is sending their roll hash.\", name);\n break;\n case ROLL_NUMBER:\n message = String.format(\"%s is sending their roll number.\", name);\n break;\n case OCCUPY_TERRITORY:\n message = String.format(\"%s is deciding how many armies to move into the captured territory.\", name);\n break;\n case DECIDE_FORTIFY:\n message = String.format(\"%s is deciding whether or not to fortify.\", name);\n break;\n case START_FORTIFY:\n message = String.format(\"%s is choosing where to fortify.\", name);\n break;\n case FORTIFY_TERRITORY:\n message = String.format(\"%s is deciding how many armies to fortify with.\", name);\n break;\n default:\n break;\n }\n return message;\n }",
"public void onCoverSelected() {\n final Optional<Uri> coverImageUriWrapper = entityToBind.getCoverImageUri();\n if (coverImageUriWrapper.isPresent()) {\n final int coverMaxWidth = assetsComputationHelper.getCoverMaxWidth();\n final int coverMaxHeight = assetsComputationHelper.getCoverMaxHeight();\n Glide.with(getContext())\n .load(coverImageUriWrapper.get())\n .override(coverMaxWidth, coverMaxHeight)\n .centerCrop()\n .into(coverImageView);\n }\n }",
"public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}",
"public void takeCup() {\n updateMessageToUser();\n BufferedImage emptyPicture = null;\n try {\n emptyPicture = ImageIO.read(new File(\"./picts/vide2.jpg\"));\n } catch (IOException ee) {\n ee.printStackTrace();\n }\n currentPicture.setIcon(new ImageIcon(emptyPicture));\n if (currentWaterVolume > 1) {\n currentWaterVolume = 0;\n theFSM.raiseCupGrabbed();\n } else {\n addCupButton.setVisible(true);\n }\n takeCupButton.setVisible(false);\n theFSM.setCupPlaced(false);\n System.out.println(\"Cup taken\");\n }",
"private static void statusCommand() {\n String lineFormat = \"%-8s | %-15s | %s\\n\";\n\n List<Job> neededJobs = fetchNeededJobs();\n\n // table header\n if (neededJobs.size() < 2) {\n System.out.printf(lineFormat, \"STATE\", \"START TIME\", \"JOB DIRECTORY\");\n for (int i = 0; i < 78; i++) {\n System.out.print(((9 == i || 27 == i) ? \"+\" : \"-\"));\n }\n System.out.println();\n }\n\n // table rows\n ObjectCounter<JobState> counter = new ObjectCounter<JobState>();\n for (Job job : neededJobs) {\n Date startDate = job.getStartDate();\n JobState state = job.getState();\n counter.add(state);\n String startDateStr = (null == startDate) ? \"N/A\" : new SimpleDateFormat(\"yyyyMMdd HHmmss\").format(startDate);\n System.out.printf(lineFormat, state.toString(), startDateStr, job.getDir());\n }\n\n // table footer\n System.out.println();\n String sumFormat = \"%6d %s\\n\";\n System.out.printf(sumFormat, heritrix.getJobs().size(), \"TOTAL JOBS\");\n for (JobState state : JobState.values()) {\n if (counter.getMap().keySet().contains(state)) {\n System.out.printf(sumFormat, counter.get(state), state.toString());\n }\n }\n }",
"public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}",
"private void startCropImage() {\n }",
"@Override\n public String toString() {\n return \"[\" + getStatusIcon() + \"] \" + description;\n }",
"public void printStatus(){\n System.out.println(\"Nodes: \" + \n getVertexCount() + \" Edges: \" + \n getEdgeCount()); \n //and \" + getEdgeCount() + \" edges active.\");\n }",
"@FXML public void showInfo(ActionEvent e){\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\talert.setTitle(\"Picture Information\");\n\t\talert.setHeaderText(\"Current Photo Information\");\n\t\talert.setContentText(listOfPhotos.get(photoNumber).printAttributes());\n\n\t\talert.showAndWait();\n\t}",
"protected Pane getStatusPane() {\n\n return this.statusPane;\n }",
"public abstract String currentStatus();",
"public String diagnostic() {\n\t\tString output = \"\";\n\t\tString stateString = \"\";\n\t\tif (this.getState() == Player.HUMAN)\n\t\t\tstateString = \"is selected by the player\";\n\t\telse if (this.getState() == Player.COMPUTER)\n\t\t\tstateString = \"is selected by the computer\";\n\t\telse\n\t\t\tstateString = \"is not selected\";\n\t\t\t\n\t\toutput += \"The point \" + this.toString() + \" \" + stateString +\n\t\t\t\t\t\" and is associated with the rows:\\n\";\n\t\tfor (Row r : containingRows) {\n\t\t\toutput += r + \"\\n\";\n\t\t}\n\t\treturn output;\n\t}",
"String status();",
"String status();",
"@Override\n public String displayUponBeingSelected() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Information about '%s'\\n\", foodLabel));\n sb.append(String.format(\"Brand: %s\\n\", brand));\n sb.append(String.format(\"Category: %s\\n\", category));\n sb.append(String.format(\"Item type: %s\\n\", StringUtils.capitalize(categoryLabel)));\n sb.append(String.format(\"Measure(s): %s\\n\", StringUtils.join(measures, \", \")));\n sb.append(String.format(\"Food ID: %s\\n\", foodId));\n sb.append(String.format(\"Food URI: %s\\n\", foodUri));\n sb.append(String.format(\"Image link: %s\\n\", imageLink));\n sb.append(String.format(\"Yielding search term: %s\\n\", yieldingSearchTerm));\n sb.append(formatBasicNutrients());\n\n return sb.toString();\n\n }",
"public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }",
"public void cbMohexShowRollout()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n m_guiboard.aboutToDirtyStones();\n \n HexPoint p = HexPoint.get(pairs.get(0).first);\n HexColor color = HexColor.get(pairs.get(0).second);\n m_guiboard.setColor(p, color);\n m_guiboard.setAlphaColor(p, Color.blue);\n \n for (int i=1; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n if (value.equals(\"#\"))\n m_guiboard.setAlphaColor(point, Color.green);\n else\n m_guiboard.setAlphaColor(point, Color.red);\n \n m_guiboard.setText(point, Integer.toString(i));\n \n color = color.otherColor();\n m_guiboard.setColor(point, color);\n \t}\n \tm_guiboard.repaint();\n \n }",
"private void onSaveClicked() {\n if (mCropView == null) {\n return;\n }\n\n if (mSaving) return;\n mSaving = true;\n\n Bitmap croppedImage;\n\n // If the output is required to a specific size, create an new image\n // with the cropped image in the center and the extra space filled.\n if (outputX != 0 && outputY != 0 && !scale) {\n // Don't scale the image but instead fill it so it's the\n // required dimension\n croppedImage = Bitmap.createBitmap(outputX, outputY, Bitmap.Config.RGB_565);\n Canvas canvas = new Canvas(croppedImage);\n\n Rect srcRect = mCropView.getCropRect();\n Rect dstRect = new Rect(0, 0, outputX, outputY);\n\n int dx = (srcRect.width() - dstRect.width()) / 2;\n int dy = (srcRect.height() - dstRect.height()) / 2;\n\n // If the srcRect is too big, use the center part of it.\n srcRect.inset(Math.max(0, dx), Math.max(0, dy));\n\n // If the dstRect is too big, use the center part of it.\n dstRect.inset(Math.max(0, -dx), Math.max(0, -dy));\n\n // Draw the cropped bitmap in the center\n canvas.drawBitmap(mBitmap, srcRect, dstRect, null);\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n } else {\n Rect r = mCropView.getCropRect();\n\n int width = r.width();\n int height = r.height();\n\n // If we are circle cropping, we want alpha channel, which is the\n // third param here.\n croppedImage = Bitmap.createBitmap(width, height,\n circleCrop ? Bitmap.Config.ARGB_8888 : Bitmap.Config.RGB_565);\n\n Canvas canvas = new Canvas(croppedImage);\n\n if (circleCrop) {\n final int color = 0xffff0000;\n final Paint paint = new Paint();\n final Rect rect = new Rect(0, 0, croppedImage.getWidth(), croppedImage.getHeight());\n final RectF rectF = new RectF(rect);\n\n paint.setAntiAlias(true);\n paint.setDither(true);\n paint.setFilterBitmap(true);\n canvas.drawARGB(0, 0, 0, 0);\n paint.setColor(color);\n canvas.drawOval(rectF, paint);\n\n paint.setColor(Color.BLUE);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth((float) 4);\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC_IN));\n canvas.drawBitmap(mBitmap, r, rect, paint);\n }\n else {\n Rect dstRect = new Rect(0, 0, width, height);\n canvas.drawBitmap(mBitmap, r, dstRect, null);\n }\n\n // Release bitmap memory as soon as possible\n mImageView.clear();\n mBitmap.recycle();\n\n // If the required dimension is specified, scale the image.\n if (outputX != 0 && outputY != 0 && scale) {\n croppedImage = BitmapUtils.transform(new Matrix(), croppedImage,\n outputX, outputY, scaleUp, BitmapUtils.RECYCLE_INPUT);\n }\n }\n\n mImageView.setImageBitmapResetBase(croppedImage, true);\n mImageView.center(true, true);\n mImageView.getHighlightViews().clear();\n\n // save it to the specified URI.\n final Bitmap b = croppedImage;\n new AsyncTask<Void, Integer, IImage>() {\n ProgressDialog pd;\n\n @Override\n protected void onPreExecute() {\n pd = ProgressDialog.show(CropPhotoActivity.this, null,\n getResources().getString(R.string.saving_image));\n }\n\n @Override\n protected IImage doInBackground(Void[] params) {\n return saveOutput(b);\n }\n\n @Override\n protected void onPostExecute(IImage image) {\n pd.dismiss();\n mImageView.clear();\n b.recycle();\n\n if (image != null) {\n ArrayList<IImage> images = new ArrayList<>();\n images.add(image);\n\n Intent data = new Intent();\n data.putParcelableArrayListExtra(\"data\", images);\n setResult(Activity.RESULT_OK, data);\n finish();\n }\n }\n }.execute();\n }",
"@Method(selector = \"crop:imagePath:width:height:x:ycompletionBlock:\")\n\tpublic native void crop(String name, String imagePath, int width, int height, int x, int y, @Block App42ResponseBlock completionBlock);"
] | [
"0.63743675",
"0.6044512",
"0.5921551",
"0.58104706",
"0.56641895",
"0.5600984",
"0.5584975",
"0.5459584",
"0.5436353",
"0.54319614",
"0.5413602",
"0.53291154",
"0.5272458",
"0.52637845",
"0.523555",
"0.5212554",
"0.52064914",
"0.5188303",
"0.51725006",
"0.51292676",
"0.51249707",
"0.5083957",
"0.5074183",
"0.5072765",
"0.5064858",
"0.5057569",
"0.50523436",
"0.5038281",
"0.5031835",
"0.502954",
"0.500201",
"0.49977744",
"0.49933746",
"0.49717942",
"0.49484006",
"0.4938296",
"0.49306256",
"0.49294484",
"0.49207765",
"0.49172646",
"0.49078488",
"0.49046582",
"0.4878472",
"0.4868701",
"0.48678514",
"0.48675138",
"0.48634118",
"0.47991255",
"0.47803068",
"0.4775866",
"0.47703013",
"0.4765567",
"0.47649288",
"0.4762818",
"0.47582462",
"0.47556293",
"0.47403395",
"0.4734037",
"0.47309178",
"0.4728918",
"0.47209704",
"0.47201708",
"0.4693255",
"0.46850193",
"0.46827525",
"0.46766603",
"0.4659399",
"0.4659167",
"0.46590674",
"0.4645742",
"0.46417883",
"0.46347824",
"0.46337256",
"0.46327454",
"0.46327454",
"0.46209022",
"0.46161506",
"0.46086115",
"0.46079248",
"0.46063492",
"0.4600093",
"0.4593087",
"0.4592323",
"0.45890966",
"0.45833036",
"0.45828974",
"0.4581267",
"0.45793554",
"0.45716542",
"0.45700684",
"0.4569174",
"0.45617113",
"0.45600963",
"0.4557087",
"0.4557087",
"0.4547416",
"0.4546591",
"0.45418903",
"0.45417482",
"0.45394796"
] | 0.7964227 | 0 |
/ blog controllers for school section starts | @RequestMapping(value = "/school/submit-article", method = RequestMethod.POST)
public ModelAndView submitSchoolArticle(@ModelAttribute("article") BlogArticle article,
HttpSession session, BindingResult result) {
SchoolUser userData = (SchoolUser) session.getAttribute("SchoolStudent");
ModelAndView modelAndView = new ModelAndView();
int isUserPremium = userData.getPremium();
if(isUserPremium==1) {
modelAndView.addObject("isPremium", true);
} else {
modelAndView.addObject("isPremium", false);
}
article.setUser_saved(userData.getUsername());
//article.setShr_code(generateArticleShareCode());
boolean saved = articleService.saveArtcile(article);
if (saved)
return new ModelAndView("redirect:/school/user/write-article?success=true");
else
return new ModelAndView("redirect:/school/user/write-article?success=false");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@RequestMapping(value = \"blog\")\n public String blog(@CookieValue(name = \"id\", required = true) String userIdCookie, Model model) {\n\n model.addAttribute(\"posts\", postDao.findAll());\n model.addAttribute(\"title\", \"Between the Notes\");\n return \"post/blog\";\n }",
"public void index() {\n Integer pageNum = getParaToInt(\"pageNum\");\n Boolean includeContent = getParaToBoolean(\"includeContent\", false);\n\n if (pageNum == null) {\n mResult.fail(102);\n renderJson(mResult);\n return;\n }\n Page<Blog> blogAbstracts;\n if (!includeContent) {\n blogAbstracts = mBlogService.queryWithoutContent(pageNum);\n } else {\n blogAbstracts = mBlogService.queryAll(pageNum);\n }\n\n if (blogAbstracts.getList().size() == 0) {\n mResult.fail(107);\n } else {\n mResult.success(blogAbstracts.getList());\n }\n renderJson(mResult);\n }",
"@RequestMapping (\"/\")\n public String index(Model model) {\n Student student = new Student ();\n student.setName (\"Isabel Laurent\");\n student.setRealname(\"Ena Isabel Navarro-Laurent\");\n\n // Now let's create a course\n Course course = new Course ();\n course.setTitle(\"Java\");\n course.setYear(2018);\n course.setDescription(\"Introduction to Java\");\n\n // Add the course to an empty list\n Set<Course> courses = new HashSet<Course>();\n courses.add(course);\n\n // Add the list of courses to the student's course list\n student.setCourses(courses);\n\n // Save the student to the database\n studentRepository.save(student);\n\n // Grad all the students from the database and send them to\n // the template\n model.addAttribute(\"students\", studentRepository.findAll());\n return \"index\";\n }",
"@RequestMapping(value = \"\")\n public String index(Model model) {\n\n model.addAttribute(\"posts\", postDao.findAll());\n model.addAttribute(\"title\", \"All Posts\");\n return \"post/index\";\n }",
"private BlogManager(Controller c) {\r\n super();\r\n this.controller = c;\r\n this.init();\r\n }",
"@GetMapping(\"/\") //na adresie URL localhost:8080/\n public String home(Model model){\n model.addAttribute(\"header_title\", \"BLOG IT\");\n model.addAttribute(\"header_author\", \"mati\");\n\n //miejsce na implementacje\n\n return \"blog\"; //wartoscia zwracana jest nazwa szablony Thymeleaf-> domyslna lokalizacja to resource/templates\n //-> nie dopisujemy rozszerzenia .html lub jakiegokolwiek innego\n}",
"public BlogPostView() {\n this.blogPost = new BlogPost();\n }",
"PersonalDetailsController(){\n hrDB=new HRDatabase();\n }",
"@RequestMapping(value = \"\")\r\n\tpublic ModelAndView index()\r\n\t{\r\n\t\tList<Person> people = personService.findAllPeople();\r\n\t\treturn new ModelAndView(\"index\", \"people\", people);\r\n\t}",
"protected void index()\r\n\t{\n\t}",
"@Override\n public String getName() {\n return \"createblog.do\";\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\t\n\t\tAuthor author = new Author();\n\t\tauthor.setFirstName(\"fisseha\");\n\t\tauthor.setLastName(\"chari\");\n\t\treturn \"home\";\n\t}",
"@RequestMapping(value = \"/posts\", method = RequestMethod.GET)\n\tpublic String postsPage(Model model) {\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tmodel.addAttribute(\"username\", auth.getName());\n\t\tmodel.addAttribute(\"title\", \"WeSpeak | Bài viết kinh nghiệm\");\n\n\t\tList<Post> list = postDAO.listPostActive(1);\n\t\tmodel.addAttribute(\"postModel\", list);\n\t\tif (list != null) {\n\t\t\tList<Post> listImportant = new ArrayList<Post>();\n\t\t\tif (list.size() <= 4)\n\t\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\t\t\telse\n\t\t\t\tfor (int i = 0; i < 4; i++)\n\t\t\t\t\tlistImportant.add(list.get(i));\n\n\t\t\tmodel.addAttribute(\"postListImportant\", listImportant);\n\t\t}\n\t\treturn \"postsPage\";\n\t}",
"@RequestMapping(method = RequestMethod.GET)\n public ModelAndView home() {\n page = new ModelAndView();\n page.setViewName(\"Statistique\");\n page.addObject(\"resources\", resourceService.listMainMenu());\n page.addObject(\"proms\", articleService.getFiveLastProms());\n page.addObject(\"mostPlayedClasses\", statsService.listXMostPlayedClasses(5));\n page.addObject(\"mostPlayedRaces\", statsService.listXMostPlayedRaces(5));\n page.addObject(\"mostPlayedSpecializations\", statsService.listXMostPlayedSpecialization(5));\n page.addObject(\"usersWithoutAvatar\", statsService.listUsersWithoutAvatar());\n page.addObject(\"mostActiveUsers\", statsService.listMostActiveUsers(5));\n if (user != null)\n page.addObject(\"userResources\", resourceService.listUserResources(user.getGroup().getId()));\n return page;\n }",
"public void home_index()\n {\n Home.index(homer);\n }",
"public static void main(String[] args) { //type “psvm + tab” to autocreate this\n // directing the server to immediate files it should access. Just like index\n staticFileLocation(\"/public\");\n\n\n // routes as per their handlebars templates. Make sure to read and understand what they do\n get(\"/\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"index.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animalnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return new ModelAndView(model, \"animalForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/endangerednew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"endangeredForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/sightingsnew\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model,\"sightingsForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List peter = Endangered.relative_All();\n System.out.println(peter.get(0));\n model.put(\"endangered\", peter);\n return modelAndView(model, \"endangered.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/sightings\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n return modelAndView(model, \"sightings.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/saved\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List sightings = Sightings.retrieveFromSightings();\n model.put(\"sightings\", sightings);\n return new ModelAndView(model,\"sight.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/newanimal\", (request, response) -> {\n Map<String, Object> model = new HashMap<>();\n List animal = Animal.relative_All();\n model.put(\"animals\", animal);\n return new ModelAndView(model, \"wildlife.hbs\");\n }, new HandlebarsTemplateEngine());\n\n get(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n model.put(\"animal\", Animal.find(Integer.parseInt(request.params(\":id\"))));\n return new ModelAndView(model, \"editForm.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n get(\"/animals/:id/delete\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n Animal.find(Integer.parseInt(request.params(\":id\"))).delete();\n response.redirect(\"/animals\");\n return null;\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/animals/:id/edit\", (request, response) -> {\n Map<String, Object> model = new HashMap<String, Object>();\n int id = Integer.parseInt(request.params(\":id\"));\n String name = request.queryParams(\"name\");\n Animal animal = Animal.find(id);\n animal.setName(name);\n animal.update();\n return new ModelAndView(model, \"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n post(\"/succ\", (req, res) -> { //new\n Map<String, Object> model = new HashMap<>();\n String animalname = req.queryParams(\"animalname\");\n String rangername = req.queryParams(\"ranger\");\n String location = req.queryParams(\"location\");\n Sightings sightings = new Sightings(animalname,rangername,location);\n sightings.save();\n model.put(\"sightings\", sightings);\n return modelAndView(model, \"succ.hbs\");\n }, new HandlebarsTemplateEngine());\n\n\n\n //post methods\n post(\"/success\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n String health = req.queryParams(\"health\");\n String age = req.queryParams(\"age\");\n Endangered endangered = new Endangered(name, health, age);\n endangered.save();\n System.out.println(\"Please enter all input fields.\");\n return new ModelAndView(model,\"success.hbs\");\n }, new HandlebarsTemplateEngine());\n\n post(\"/wildlife\", (req, res) -> {\n Map<String, Object> model = new HashMap<>();\n String name = req.queryParams(\"name\");\n Animal animal = new Animal(name);\n animal.save();\n return new ModelAndView(model,\"ess.hbs\");\n }, new HandlebarsTemplateEngine());\n }",
"@GetMapping(\"/\")\n public String allThePosts(Model viewModel) {\n\n viewModel.addAttribute(\"posts\", postService.findAll());\n return \"/blog_template/index\";\n }",
"@RequestMapping(\"/homelist\")\n public Page<PostEntity> mainPage() {\n return postService.getPage(0);\n }",
"@RequestMapping(\"/\")\n\t public String index(Model model){\n\t return \"homepage\";\n\t }",
"@RequestMapping(value = {\"/\", \"/home\", \"/index\"})\n public ModelAndView index(Principal principal) {\n String userName = \"Guest\";\n if (principal != null) {\n userName = principal.getName();\n }\n logger.info(userName + \" entering method index()\");\n\n ModelAndView mav = new ModelAndView(\"master\");\n mav.addObject(\"title\", \"Home\");\n mav.addObject(\"stations\", stationService.getAllStations());\n mav.addObject(\"userClickHome\", true);\n return mav;\n }",
"private LessonController() {\n\t\tview = LessonPanel.getLessonPanel();\n\t\tview.clearPhraseTabelContent();\n\t\t//initAllPhrases();\n\t\taddALlListeners();\n\n\t\t//view.setVisible(true);\n\t}",
"@RequestMapping(\"/\")\r\n public ModelAndView mainPage(Writer responseWriter) throws IOException {\n ModelAndView result = new ModelAndView(\"index\");\r\n result.addObject(\"title\", \"My page\");\r\n result.addObject(\"recipes\", this.recipes);\r\n return result;\r\n }",
"public CoursesApp(School school) {\n this.mySchool = school;\n runCoursesApp();\n }",
"@RequestMapping(value = {\"/mainPage\"}, method = RequestMethod.GET)\n public String displayMainAjaxPage(Model model) {\n // This method does nothing except return the logical name of the \n // view component (/jsp/home.jsp) that should be invoked in response\n // to this request.\n //Mike Adams: need to filter out unpublished/unapproved blogs (marketing, saved drafts)\n List<Blog> allBlogs = blogDAO.getAllBlogs();\n List<Blog> pubBlogs = new ArrayList<>();\n\n for (int i = 0; i < allBlogs.size(); i++) {\n if (allBlogs.get(i).isPublished()) {\n pubBlogs.add(allBlogs.get(i));\n }\n }\n model.addAttribute(\"blogList\", pubBlogs);\n\n /**\n * ********** Mike Adams, Static page functionality code********\n */\n model.addAttribute(\"staticPageList\", blogDAO.getListOfStaticPages());\n /**\n * ************************************************************\n */\n return \"mainPage\";\n }",
"public DocumentController() {\n\t\tthis.content = this.getstartpage();\n\t\tthis.url = \"https://\";\n\t}",
"public DetailPageController() {\n\t\tsuper();\n\t}",
"@RequestMapping(\"/archive\")\n public String list(Model model) {\n model.addAttribute(\"posts\", educationFeedbackService.list());\n return \"admin/education/listArchive\";\n }",
"SiteWriterTemplate startSites() throws Exception;",
"public AboutController(){\n }",
"@RequestMapping(value = \"/index\", method = RequestMethod.GET)\n public ModelAndView displayIndex() {\n return new ModelAndView(\"index\", \"command\", new Person());\n }",
"public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }",
"public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}",
"public EstructuraOrganicaController(){\r\n\t\tloadDefault();\r\n\t}",
"@RequestMapping(\"/\")\n public ModelAndView index() {\n ModelAndView mav = new ModelAndView(\"index\");\n mav.addObject(\"userInfo\", new UserInfo());\n\n User user = (User) session.getAttribute(\"loginUser\");\n if (user != null) {\n List<Content> contents = contentService.showAll(user.getUserId());\n mav.addObject(\"contentList\", new ContentList(contents));\n }\n\n return mav;\n }",
"protected ModelAndView handleRequestInternal(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception {\n\t\t\n\t\tSystem.out.println(\"IN CourceController\");\n\t\tcs=new CourseService();\n\t\tArrayList<String>courseList=cs.getCourses();\n\t\tSystem.out.println(\"ArrayList get0 \"+courseList.get(0));\n\t\t\n\t\treturn new ModelAndView(\"show\", \"AL\", courseList);\n\t}",
"@RequestMapping(value = \"/*/landingPage.do\", method = RequestMethod.GET)\n public String landingPageView(HttpServletRequest request, Model model) {\n logger.debug(\"SMNLOG:Landing page controller\");\n\n\n return \"admin/landingPage\";\n }",
"@RequestMapping(value=\"/\")\r\npublic ModelAndView homePage(ModelAndView model) throws IOException\r\n{\r\n\tmodel.setViewName(\"home\");\r\n\treturn model;\r\n}",
"@RequestMapping(value = \"/home\")\n\tpublic ModelAndView ictHome() {\n\t\tModelAndView mav = new ModelAndView(\"ict/home\");\n\t\tmav.addObject(\"disComList\", disS.findAll());\n\t\treturn mav;\n\t}",
"@RequestMapping(value=\"/homepage\")\r\npublic ModelAndView homePage1(ModelAndView model) throws IOException\r\n{\r\n model.setViewName(\"home\");\r\n\treturn model;\r\n}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tString index() {\n\t\tif (StringUtil.isNullOrEmpty(configuration.getHue().getIp())\n\t\t\t\t|| StringUtil.isNullOrEmpty(configuration.getHue().getUser())) {\n\t\t\treturn \"redirect:/setup\";\n\t\t}\n\n\t\treturn \"redirect:/dailySchedules\";\n\t}",
"@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public String goHome(ModelMap model) {\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n model.addAttribute(\"pagetitle\", \"Pand-Eco\");\n return \"view_landing_page\";\n }",
"public void execute(){\r\n\t\tapplicationController.about();\r\n\t}",
"private void addTopicDetails() \n {\n baseLayout.addComponent(UIUtils.getSchoolBannerLayout());\n baseLayout.addComponent(getVideoPathLayout());\n baseLayout.addComponent(getNotesLayout());\n baseLayout.addComponent(getOtherNotesLayout());\n baseLayout.addComponent(getPreviousQuestionsLayout());\n baseLayout.addComponent(getQuizLayout());\n baseLayout.addComponent(addUserNotes());\n //baseLayout.setExpandRatio(tabsheetLayout,2);\n }",
"@RequestMapping(value = \"/about\")\n\tpublic ModelAndView index() {\n\t\treturn new ModelAndView(\"pepco.about\");\n\t}",
"public SalaculturalController() {\n jpa = new SalaculturalJpaController(PersistenceUtil.getEntityManagerFactory());\n salacultural = new Salacultural();\n lista = jpa.findSalaculturalEntities();\n jpa2 = new EdificioJpaController(PersistenceUtil.getEntityManagerFactory());\n edificios = jpa2.findEdificioEntities();\n edificio = new Edificio();\n tmpid = 0;\n }",
"@RequestMapping(value = { \"/broadband-user\", \"/broadband-user/login\" })\n\tpublic String userHome(Model model) {\n\t\tmodel.addAttribute(\"title\", \"CyberPark Broadband Manager System\");\n\t\treturn \"broadband-user/login\";\n\t}",
"@RequestMapping(value = \"/blog/{username}\", method = RequestMethod.GET)\n\tpublic String userPosts(@PathVariable String username, Model model) {\n\t\tUser author = userDao.findByUsername(username);\n\t\tList <Post> posts = postDao.findByAuthor_uid(author.getUid());\n\t\t\n\t\t//pass all of the posts into the template model.addattribute(\"name\", obj)\n\t\tmodel.addAttribute(\"posts\", posts);\n\t\treturn \"blog\";\n\t}",
"public void Call_My_Blog(View v) {\n Intent intent = new Intent(MainActivity.this, My_Blog.class);\n startActivity(intent);\n\n }",
"@RequestMapping(method = RequestMethod.GET)\r\n public String home(ModelMap model) throws Exception\r\n {\t\t\r\n return \"Home\";\r\n }",
"@RequestMapping(\"/\")\n\tpublic String getMainPage() {\n\t\treturn \"main-menu\";\n\t}",
"@RequestMapping(value = \"about.do\", method = RequestMethod.GET)\n public String getAbout(HttpServletRequest request, Model model) {\n logger.debug(\"About page Controller:\");\n return \"common/about\";\n }",
"public Controller() {\n\n lastSearches = new SearchHistory();\n\n }",
"@RequestMapping(\"/displayEducation\")\r\n\t\tpublic String displayEducation(ModelMap modelMap) {\r\n\t\t\tList<EducationQualification> education = educationRepo.findAll();\r\n\t\t\tmodelMap.addAttribute(\"education\", education);\r\n\t\t\treturn \"displayAllEducation\";\r\n\t}",
"public void addAuthorAction()\n\t{\n\t\tViewNavigator.loadScene(\"Add Author\", ViewNavigator.ADD_AUTHOR_SCENE);\n\t}",
"@RequestMapping(\"/authors\")\n public String getAuthors(Model model){\n model.addAttribute(\"authors\", authorRepository.findAll());\n return \"authors/list\";\n }",
"@Override\n public void addViewControllers(ViewControllerRegistry registry) {\n registry.addViewController(\"/book\").setViewName(\"book\");\n }",
"public void showPersonOverview() {\n try {\n // Load the fxml file and set into the center of the main layout\n FXMLLoader loader = new FXMLLoader(MainApp.class.getResource(\"view/PersonOverview.fxml\"));\n AnchorPane overviewPage = (AnchorPane) loader.load();\n rootLayout.setCenter(overviewPage);\n \n //give controller access into the main app \n PersonOverviewController controller = loader.getController();\n controller.setMainApp(this);\n\n } catch (IOException e) {\n // Exception gets thrown if the fxml file could not be loaded\n e.printStackTrace();\n }\n }",
"@RequestMapping(value = \"course\", method = RequestMethod.GET)\n public String course(Model model, @RequestParam int id){\n Course cor = courseDao.findOne(id);\n List<Recipe> recipes = cor.getRecipes();\n model.addAttribute(\"recipes\", recipes);\n model.addAttribute(\"title\", cor.getCourseName() + \" recipes\");\n return \"recipe/list-under\";\n }",
"@GetMapping(\"/schools\")\n public List<School> list() {\n List<School> schoolList = schoolRepository.findAll();\n return schoolList;\n }",
"@RequestMapping(\"/\")\n\tpublic String homePage() {\n\t\tlogger.info(\"Index Page Loaded\");\n\t\treturn \"index\";\n\t}",
"@FXML\r\n private void handleOverview() throws SQLException, IOException{\r\n Parent home_page_parent = FXMLLoader.load(getClass().getResource(\"overview.fxml\"));\r\n Scene home_page_scene = new Scene(home_page_parent);\r\n Stage app_stage = (Stage) ((Node) Overview).getScene().getWindow();\r\n app_stage.setScene(home_page_scene);\r\n app_stage.show();\r\n \r\n \r\n }",
"@RequestMapping(value=\"/main1\") \n public String main(Model model,Integer start){\n int count=allpageService.getCount();\n System.out.println(count);\n //List<page> pages1=allpageService.getOne((start-1)*8, 8);//start是页数\n model.addAttribute(\"count\",count);//总数\n //model.addAttribute(\"pages\",pages);\n // model.addAttribute(\"pages1\",pages1);//一页\n return \"main\"; \n }",
"private void controladorHome(Controlador controlador){\n \tthis.contLogout = controlador.getLogout();\n inicioUser.setControlLogout(contLogout);\n inicioAdmin.setControlLogout(contLogout);\n adminUsuarios.setControlLogout(contLogout);\n adminConfig.setControlLogout(contLogout);\n \t\n this.contToInicio = controlador.getToInicio();\n displayCollective.setControlToInicio(contToInicio);\n displayProject.setControlToInicio(contToInicio);\n informes.setControlToInicio(contToInicio);\n notif.setControlToInicio(contToInicio);\n nuevoColectivo.setControlToInicio(contToInicio);\n nuevoProyecto.setControlToInicio(contToInicio);\n perfil.setControlToInicio(contToInicio);\n\n this.contToPerfil = controlador.getToPerfil();\n inicioUser.setControlToPefil(contToPerfil);\n displayCollective.setControlToPefil(contToPerfil);\n displayProject.setControlToPefil(contToPerfil);\n informes.setControlToPefil(contToPerfil);\n notif.setControlToPefil(contToPerfil);\n nuevoColectivo.setControlToPefil(contToPerfil);\n nuevoProyecto.setControlToPefil(contToPerfil);\n\n this.contNotif = controlador.getNotif();\n inicioUser.setControlToNotif(contNotif);\n displayCollective.setControlToNotif(contNotif);\n displayProject.setControlToNotif(contNotif);\n informes.setControlToNotif(contNotif);\n notif.setControlToPefil(contToPerfil);\n nuevoColectivo.setControlToNotif(contNotif);\n nuevoProyecto.setControlToNotif(contNotif);\n perfil.setControlToNotif(contNotif);\n inicioAdmin.setControlToNotif(contNotif);\n adminUsuarios.setControlToNotif(contNotif);\n adminConfig.setControlToNotif(contNotif);\n }",
"@RequestMapping(value = \"/about\")\n\tpublic String mostrarAcerca() {\t\t\t\n\t\treturn \"acerca\";\n\t}",
"protected void displayHome(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tArticleDAO articleDAO = ArticleDAO.getInstance();\r\n\r\n\t\t// Getting all the articles as a list\r\n\t\tList<Article> listOfArticles = articleDAO.getAll();\r\n\r\n\t\trequest.setAttribute(\"Articles\", listOfArticles);\r\n\r\n\t\tRequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/home.jsp\");\r\n\t\tdispatcher.forward(request, response);\r\n\t}",
"protected CityController() {\r\n\t}",
"@RequestMapping(\"/\")\n public String index(Model model, Principal principal, Authentication authentication){\n //pull all categories from repo --> template\n model.addAttribute(\"categories\", categoryRepository.findAll());\n model.addAttribute(\"products\", productRepository.findAll());\n model.addAttribute(\"users\", userRepository.findAll());\n\n //check for currently logged in \"user\", if no current user then set to \"0\" to prevent errors\n String username = null;\n try {\n username = principal.getName();\n model.addAttribute(\"product_user_id\", userRepository.findByUsername(principal.getName()).getId());\n model.addAttribute(\"user_id\", userRepository.findByUsername(principal.getName()).getId());\n\n return \"index\";\n } catch (Exception e){\n model.addAttribute(\"product_user_id\", 0);\n return \"index\";\n }\n\n }",
"void displayAllPosts();",
"@RequestMapping(value = \"home.do\", method = RequestMethod.GET)\n public String getHome(HttpServletRequest request, Model model) {\n logger.debug(\"Home page Controller:\");\n return \"common/home\";\n }",
"@RequestMapping(value = { \"/\", \"/home\", \"/index\" })\r\n\tpublic ModelAndView index() {\r\n\t\tModelAndView mv = new ModelAndView(\"page\");\r\n\t\tmv.addObject(\"greeting\", \"welcome to spring web mvc new way to done \");\r\n\t\treturn mv;\r\n\t}",
"@GetMapping(\"/author/list\")\n public String viewAuthors(ModelMap model, @SortDefault(\"firstName\") Pageable pageable) {\n //\n //List<Author> listAuthors = authorservice.listAll();\n List<Author> listAuthors = authorservice.listAll();\n for (Author author : authorRepository.findAll()) {\n log.info(author.toString());\n }\n //\n model.addAttribute(\"authors\", authorservice.find(pageable));\n //model.addAttribute(\"authors\", book.getAuthors());\n //model.addAttribute(\"listAuthors\", listAuthors);\n return \"author/list\";\n }",
"@Override\r\n\tpublic void index() {\n\t\trender(\"index.jsp\");\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_course_detail);\n Toolbar toolbar = findViewById(R.id.toolbar);\n toolbar.setTitle(\"Notes\");\n setSupportActionBar(toolbar);\n Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n setVariables();\n setValues();\n }",
"@RequestMapping(value = \"/blog/{username}/{uid}\", method = RequestMethod.GET)\n\tpublic String singlePost(@PathVariable String username, @PathVariable int uid, Model model) {\n\t\tPost post = postDao.findOne(uid);\n\t\t\n\t\t//pass the post into the template\n\t\tmodel.addAttribute(\"post\", post);\n\t\treturn \"post\";\n\t}",
"@RequestMapping(value = \"/homed\", method = RequestMethod.GET)\r\n public String homeDebug(HttpServletRequest request, ModelMap model) throws ServletException, IOException { \r\n return(renderPage(request, model, \"home\", null, null, null, true)); \r\n }",
"public void renderSiteContent(){\r\n\t\tbuildTables();\r\n\t\tsiteDto = (Collection<SiteDto>) siteService.findSitesByAccountId(accountId, false);\r\n\t\t//siteDto = new ArrayList<SiteDto>();\r\n\t\tif(!(siteDto.isEmpty())){\r\n\t\t\t\r\n\t\t\trenderCombobox();\r\n\t\t\trenderArticleTable();\r\n\t\t\trenderImageTable();\r\n\t\t\tverticalLayout.addComponent(articleTable);\r\n\t\t\tverticalLayout.addComponent(imageTable);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tButton linkButton = new Button(\"Create new site\");\r\n\t\t\tlinkButton.setStyleName(BaseTheme.BUTTON_LINK);\r\n\t\t\tlinkButton.addClickListener(new ClickListener() {\r\n\t\t\t\t\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\tpublic void buttonClick(ClickEvent event) {\r\n\t\t\t\t\tfinal SiteUIManager siteUiManager = new SiteUIManager(siteDashboardTab,helper);\r\n\t\t\t\t\tVerticalLayout newlayout = siteUiManager.renderNewSite();\r\n\t\t\t\t\tTab tab1 = siteDashboardTab.addTab(newlayout, \"Create site\", null);\r\n\t\t\t\t\ttab1.setClosable(true);\r\n\t\t\t\t\tsiteDashboardTab.setSelectedTab(newlayout);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tverticalLayout.addComponent(linkButton);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tverticalLayout.addComponent(label);//article label\r\n\t\tverticalLayout.addComponent(label2);//image label\r\n\t\r\n\t}",
"@RequestMapping(value = \"\")\n public String index (Model model){\n model.addAttribute(\"priorities\", priorityDao.findAll());\n model.addAttribute(\"title\", \"Priorities\");\n\n return \"priority/index\";\n }",
"@Override\n\tpublic void editTutorial() {\n\t\t\n\t}",
"@GetMapping(value = {\"/\", \"/index\", \"\"})\n public String index(Model model) {\n model.addAttribute(\"titulo\", \"Hola Spring\");\n return \"index\";\n }",
"@RequestMapping(\"/\")\r\n String Adminhome() {\r\n return \"Welcome to Admin Home Page\";\r\n }",
"@RequestMapping(value = \"/\")\n public String index(Model model) {\n model.addAttribute(\"cityList\", cityRepository.findAll());\n return \"index\";\n }",
"@RequestMapping(value = \"/sc\", method = RequestMethod.GET)\n public ModelAndView listsc() {\n List<Group> groups = userBean.getAllGroups();\n List<WeekDay> weekDays = userBean.getAllWeekDay();\n ModelAndView view = new ModelAndView(\"sc\");\n // view.addObject(\"list\",list);\n view.addObject(\"group\", groups);\n view.addObject(\"week\", weekDays);\n return view;\n }",
"@RequestMapping(method = RequestMethod.GET, value = {\"/home\",\"/admin\"}, produces = \"application/json\")\n public String home(Model model) throws SQLException, ClassNotFoundException {\n int page = 1;\n int recordPerPage = 3;\n\n //Get Total Records From DB\n int totalRecords = storeService.getRecords();\n\n //Calculate numbers of pages\n int noOfPage = (int) Math.ceil(totalRecords * 1.0/recordPerPage);\n\n //Formula of pagination\n List<Store> getList = storeService.getPaginator((page - 1) * recordPerPage, recordPerPage);\n\n model.addAttribute(\"LISTSTORE\", getList);\n model.addAttribute(\"NOOFPAGE\", noOfPage);\n model.addAttribute(\"CURRENTPAGE\", page);\n //Set dường dẫn chạy file jsp\n return \"homepage\";\n }",
"@GetMapping(path = \"create_post\")\n public String create_post(Model model){\n model.addAttribute(\"feed\" , new Feed() );\n return \"create_post\";\n }",
"public void setupArticlesList();",
"@RequestMapping(value = \"/admin\", method = RequestMethod.GET)\n\tpublic ModelAndView adminPage() {\n\t\tModelAndView model = new ModelAndView();\n\t\tmodel.addObject(\"categories\", myService.listGroups());\n\t\tmodel.addObject(\"products\", myService.displayProducts());\n\t\tmodel.setViewName(\"adminmy\");\n\t\treturn model;\n\t}",
"public static void main(String[] args) {\n Student model = retriveStudentFromDatabase();\r\n\r\n //Create a view : to write student details on console\r\n View view = new View();\r\n\r\n Controller controller = new Controller(model, view);\r\n\r\n controller.updateView();\r\n\r\n //update model data\r\n controller.setStudentName(\"Gary\");\r\n\r\n controller.updateView();\r\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.home_content);\n init();\n }",
"private Posts() {\n }",
"@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}",
"public void storeBlog() {\r\n // notify user\r\n activityScreen.setString(Locale.get(\"blogManager.alert.storing\"));\r\n controller.show(activityScreen);\r\n // schedule process\r\n this.storageTerminationNotifier.schedule(new BlogStoreTerminator(), STORAGE_TIMEOUT);\r\n // start process\r\n this.prepareBlog();\r\n this.serializeBlog();\r\n }",
"private void display()\n {\n //Displaying the posts\n newsFeed.show();\n \n }",
"public static void index() {\n\t\tList<models.Todo> todos = models.Todo.findAllSorted();\t\n\t\trender(todos);\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_school_selection);\n\t}",
"public UserPersonalInfoController() {\n\t\tMainAllControllers = controllers.MainAllControllers.getInstance();\n\t}",
"@RequestMapping(value = \"/index\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\treturn \"index\";\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}",
"private void initializeCommunityControllers() {\n trObtainAllGroups = CommunityControllersFactory.createTrObtainAllGroups();\n trCreateNewGroup = CommunityControllersFactory.createTrCreateNewGroup();\n trDeleteGroup = CommunityControllersFactory.createTrDeleteGroup();\n trAddSubscription = CommunityControllersFactory.createTrAddSubscription();\n trDeleteSubscription = CommunityControllersFactory.createTrDeleteSubscription();\n trAddNewForum = CommunityControllersFactory.createTrAddNewForum();\n trDeleteForum = CommunityControllersFactory.createTrDeleteForum();\n trAddNewPost = CommunityControllersFactory.createTrAddNewPost();\n trDeletePost = CommunityControllersFactory.createTrDeletePost();\n trUpdatePost = CommunityControllersFactory.createTrUpdatePost();\n trLikePost = CommunityControllersFactory.createTrLikePost();\n trUnlikePost = CommunityControllersFactory.createTrUnlikePost();\n trReportPost = CommunityControllersFactory.createTrReportPost();\n trGetPostImage = CommunityControllersFactory.createTrGetPostImage();\n trAddGroupImage = CommunityControllersFactory.createTrAddGroupImage();\n trDeleteGroupImage = CommunityControllersFactory.createTrDeleteGroupImage();\n trGetGroupImage = CommunityControllersFactory.createTrGetGroupImage();\n trUnbanPost = CommunityControllersFactory.createTrUnbanPost();\n }",
"@GetMapping(value = \"/blog\")\n\tpublic String blog(final Model model) {\n\t\tfinal Flux<BlogPost> blogPostStream = this.blogPostRepository.findAll().log();\n\t\t\n\t\t// No need to fully resolve the Publisher! We will just let it drive (the \"blogPosts\" variable can be a Publisher<X>, in which case it will drive the execution of the engine and Thymeleaf will be executed as a part of the data flow)\n // Create a data-driver context variable that sets Thymeleaf in data-driven mode,\n // rendering HTML (iterations) as items are produced in a reactive-friendly manner.\n // This object also works as wrapper that avoids Spring WebFlux trying to resolve\n // it completely before rendering the HTML.\n\t\tmodel.addAttribute(\"blogPosts\", new ReactiveDataDriverContextVariable(blogPostStream, 1000));\n\t\t\n\t\t// Will use the same \"sse\" template, but only a fragment: #blogTableBody\n\t\treturn \"sse :: #blogTableBody\";\n\t}",
"@Transactional\n\t@Override\n\tpublic List<Lesson> showLessonByBranchId(int branchid) throws Exception {\n\t\treturn lessonDao.findAllByBranchid(branchid);\n\t}",
"public PersonasController() {\r\n }"
] | [
"0.59791183",
"0.57849777",
"0.5784015",
"0.5730187",
"0.5716911",
"0.56392616",
"0.5630397",
"0.5584371",
"0.55168545",
"0.5516552",
"0.55029655",
"0.5494971",
"0.5471126",
"0.54706717",
"0.54539734",
"0.54220134",
"0.54190266",
"0.5373744",
"0.53524095",
"0.5347851",
"0.53197753",
"0.530789",
"0.53070104",
"0.52948385",
"0.52766335",
"0.5271121",
"0.52402616",
"0.52371323",
"0.52275044",
"0.5226749",
"0.5213061",
"0.5189762",
"0.5180447",
"0.5176169",
"0.51429665",
"0.51066995",
"0.50995404",
"0.5093836",
"0.5082106",
"0.50801194",
"0.50529826",
"0.5039688",
"0.50389576",
"0.50385284",
"0.50344825",
"0.50338197",
"0.5023455",
"0.50200224",
"0.50173694",
"0.5015361",
"0.5006617",
"0.49960855",
"0.49957117",
"0.49930346",
"0.49919638",
"0.4991755",
"0.49859214",
"0.49677572",
"0.49660343",
"0.49656525",
"0.49587384",
"0.49571386",
"0.49564615",
"0.49489594",
"0.4932522",
"0.4932473",
"0.49271452",
"0.49269128",
"0.49245885",
"0.49217662",
"0.49214664",
"0.49171695",
"0.49146262",
"0.49138746",
"0.4901441",
"0.49002096",
"0.48956993",
"0.48948428",
"0.48937002",
"0.48933375",
"0.48904404",
"0.48882416",
"0.4887688",
"0.48864317",
"0.48843232",
"0.48805967",
"0.4878956",
"0.48744178",
"0.48730695",
"0.48687908",
"0.4867714",
"0.4864416",
"0.48624426",
"0.48610404",
"0.48581433",
"0.4851628",
"0.48503312",
"0.4848771",
"0.4838935",
"0.48379287",
"0.48376533"
] | 0.0 | -1 |
Do something with result | @Override
protected void onPostExecute(HttpResponse result) {
if (result != null)
try {
Log.i("Conexao", "Dentrodopost");
//result.getEntity().writeTo(new FileOutputStream(f));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void ComputeResult(Object result);",
"Result getResult();",
"public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}",
"void onResult(T result);",
"void onResult(T result);",
"public abstract void displayResult(Result result);",
"void mo24178a(ResultData resultdata);",
"public void setResult(Object result) {\n this.result = result;\n }",
"public static void resultMessage (int result) {\n System.out.println(\"The result of choosed operation is: \" + result);\n }",
"public void setResult() {\n }",
"void onResult(int ret);",
"V result() throws Exception;",
"@Override\n public void setResult(Object result) throws EngineException {\n \n }",
"protected void setResult(R result) {\n _result = result;\n }",
"public void setResult(Result result) {\n this.result = result;\n }",
"public void setResult(T result) {\n this.result = result;\n }",
"public abstract boolean mo66251a(Result<T> result);",
"public abstract String getResult();",
"public void mo5062c(Result result) {\n }",
"public void setResult(String result)\n {\n this.result = result;\n }",
"public String getResult();",
"public String getResult();",
"public String getResult();",
"int getResult();",
"public void setResult(String result) {\n this.result = result;\n }",
"protected void handleResult(String result) {}",
"public int getResult(){\r\n\t\t return result;\r\n\t }",
"void newResult(Result result);",
"public T getResult();",
"@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}",
"public void receiveResultexecute(\n loadbalance.LoadBalanceStub.ExecuteResponse result\n ) {\n }",
"public void setResult(String result) {\n this.result = result;\n }",
"public void returnResult() {\n\t\tSystem.out.printf(\"Result of your Numbers are: %d\", result());\n\t}",
"java.lang.String getResult();",
"abstract protected void reportResult(Result result);",
"@Override\n protected void run(Result result) throws Throwable {\n }",
"public IStatus getResult();",
"public void setResult(String result)\r\n\t{\r\n\t\tthis.result = result;\r\n\t}",
"private static Response process(Object result) {\n if (result == null) return Response.serverError().build();\n if (result instanceof Response.Status) return Response.status((Response.Status) result).build();\n return Response.ok(result).build();\n }",
"public MatchOther processResult(ResultItems resultItems, Task task);",
"public void setResult (String Result);",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\tLog.e(TAG,result);\t\n\t\t\t\t}",
"public void receiveResultexecute(\n com.exacttarget.wsdl.partnerapi.ExecuteResponseMsgDocument result\n ) {\n }",
"public void receiveResultperform(\n com.exacttarget.wsdl.partnerapi.PerformResponseMsgDocument result\n ) {\n }",
"public int getResult(){\n return localResult;\n }",
"private void retrieveResult() {\n if (result == null) {\n this.setResult(((DocumentBuilder)this.getHandler()).getResult());\n }\n }",
"protected abstract O getResult();",
"protected boolean gotResult (SurveyQuestion result) {\n _cache.questionUpdated(_survey, _questionIndex, result);\n Link.replace(Pages.ADMINZ, \"survey\", \"e\", _survey.surveyId);\n return true;\n }",
"public void run(TestResult result) {\n result.run(this);\n }",
"T getResult();",
"T getResult();",
"public void setResult(Result result) {\n\t\tthis._result = result;\n\t}",
"public boolean setResult(T result)\n/* */ {\n/* 204 */ return setResultInternal(result);\n/* */ }",
"public Object getResult()\n/* */ {\n/* 129 */ Object resultToCheck = this.result;\n/* 130 */ return resultToCheck != RESULT_NONE ? resultToCheck : null;\n/* */ }",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"boolean hasResult();",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"void onComplete(ResultModel result);",
"default void accept(Result<? extends T> result) {\n if (result.isSuccess()) {\n success(result.getValue());\n } else {\n error(result.getThrowable());\n }\n }",
"public static void setResult(String resultInfo) {\n }",
"@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void result(String result) {\n\t\t\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t\t\t}",
"protected R getResult() {\n\t\treturn result;\n\t}",
"@Override\n\tpublic void result(ContactResult arg0) {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void result(String result) {\n\t\t\t\t\tLog.e(TAG,result);\n\t\t\t\t}",
"public boolean isResult (Object value);",
"@Override\r\n\tpublic void process(ResultItems arg0, Task arg1) {\n\t\t\r\n\t}",
"public Object processScriptResult(Object result) throws ScriptException;",
"public void setResult(final Integer res) {\n this.result = res;\n }",
"public abstract void finished(Object result);",
"void onResult(AIResponse result);",
"public Result b(Result result) {\n f.obtainMessage(1, new AsyncTaskResult(this, result)).sendToTarget();\n return result;\n }",
"public int getResult() {return resultCode;}",
"public int getresult(){\n return result;}",
"public void markOperationAsExecuted(Engine.Result result) {\n assertInvariants(ItemProcessingState.TRANSLATED);\n final BulkItemRequest current = getCurrentItem();\n DocWriteRequest docWriteRequest = getRequestToExecute();\n switch (result.getResultType()) {\n case SUCCESS:\n final DocWriteResponse response;\n if (result.getOperationType() == Engine.Operation.TYPE.INDEX) {\n Engine.IndexResult indexResult = (Engine.IndexResult) result;\n response = new IndexResponse(\n primary.shardId(),\n requestToExecute.id(),\n result.getSeqNo(),\n result.getTerm(),\n indexResult.getVersion(),\n indexResult.isCreated()\n );\n } else if (result.getOperationType() == Engine.Operation.TYPE.DELETE) {\n Engine.DeleteResult deleteResult = (Engine.DeleteResult) result;\n response = new DeleteResponse(\n primary.shardId(),\n requestToExecute.id(),\n deleteResult.getSeqNo(),\n result.getTerm(),\n deleteResult.getVersion(),\n deleteResult.isFound()\n );\n\n } else {\n throw new AssertionError(\"unknown result type :\" + result.getResultType());\n }\n executionResult = new BulkItemResponse(current.id(), current.request().opType(), response);\n // set a blank ShardInfo so we can safely send it to the replicas. We won't use it in the real response though.\n executionResult.getResponse().setShardInfo(new ReplicationResponse.ShardInfo());\n locationToSync = TransportWriteAction.locationToSync(locationToSync, result.getTranslogLocation());\n break;\n case FAILURE:\n executionResult = new BulkItemResponse(\n current.id(),\n docWriteRequest.opType(),\n // Make sure to use request.index() here, if you\n // use docWriteRequest.index() it will use the\n // concrete index instead of an alias if used!\n new BulkItemResponse.Failure(\n request.index(),\n docWriteRequest.id(),\n result.getFailure(),\n result.getSeqNo(),\n result.getTerm()\n )\n );\n break;\n default:\n throw new AssertionError(\"unknown result type for \" + getCurrentItem() + \": \" + result.getResultType());\n }\n currentItemState = ItemProcessingState.EXECUTED;\n }",
"protected abstract void onCustomSuccess(T result);",
"public T result() {\n return result;\n }",
"int getResult() {\n return result;\n }",
"@Override\r\n\t\t\tpublic void onResult(int paramInt, String paramString) {\n\t\t\t}",
"com.rpg.framework.database.Protocol.ResponseCode getResult();",
"com.rpg.framework.database.Protocol.ResponseCode getResult();",
"com.rpg.framework.database.Protocol.ResponseCode getResult();",
"com.rpg.framework.database.Protocol.ResponseCode getResult();"
] | [
"0.72948575",
"0.7141055",
"0.71336895",
"0.7129854",
"0.7129854",
"0.711289",
"0.7019199",
"0.697846",
"0.6960566",
"0.6925557",
"0.68638057",
"0.6849008",
"0.683974",
"0.68275565",
"0.68216413",
"0.68106943",
"0.67878586",
"0.6753421",
"0.6742349",
"0.6721605",
"0.6706163",
"0.6706163",
"0.6706163",
"0.669917",
"0.6694779",
"0.6693926",
"0.668424",
"0.6681048",
"0.6677636",
"0.6670312",
"0.66667324",
"0.66492563",
"0.66440123",
"0.66193014",
"0.6617102",
"0.66147524",
"0.66095436",
"0.6599698",
"0.6586263",
"0.65714085",
"0.6569621",
"0.65473115",
"0.65473115",
"0.6515704",
"0.65143466",
"0.65126544",
"0.65065634",
"0.6495931",
"0.648957",
"0.6480819",
"0.64770335",
"0.64770335",
"0.6464082",
"0.6462158",
"0.6461566",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6461484",
"0.6460108",
"0.64562494",
"0.6427186",
"0.6425038",
"0.641384",
"0.641384",
"0.63793176",
"0.6363148",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6362927",
"0.6353395",
"0.63477355",
"0.6322864",
"0.6311196",
"0.63091314",
"0.63078266",
"0.63058317",
"0.63038117",
"0.6300801",
"0.629088",
"0.6290499",
"0.6283045",
"0.6281835",
"0.6270445",
"0.627004",
"0.62695646",
"0.62695646",
"0.62694424"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.