query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/Calcula el precio de venta de un Almuerzo, dados los ingredientes deseados
public int consultarPrecioVenta(String fruta, String proteina, String grano, String almidon) { Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon); return almuerzo.getPrecioVenta(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Double getPrecio(){\n\t\t// Implementar\n\t\tDouble precio = 0.0;\n\t\tfor (Ingrediente ingrediente : ingredientes) {\n\t\t\tprecio+=ingrediente.getPrecio();\n\t\t}\n\t\treturn precio;\n\t}", "private void sumarTotalVenta(int cantidad, double precioProducto) {\r\n\t\tdouble valorProductos = cantidad * pre...
[ "0.686782", "0.64245504", "0.63409746", "0.6191634", "0.6188195", "0.60470754", "0.6021241", "0.6006481", "0.596816", "0.5947058", "0.58878464", "0.5818194", "0.58091867", "0.5793516", "0.57722455", "0.5765485", "0.5757458", "0.5749575", "0.57460344", "0.57227486", "0.5708323...
0.5443118
57
/Verifica si se puede preparar un almuerzo, si hay ingredientes suficientes
public boolean sePuedePreparar(String fruta, String proteina, String grano, String almidon) { Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon); return almuerzo.sePuedePreparar(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean prepareOrder() throws IOException {\n\n Order order = getCurrentOrder();\n\n if (order == null) {\n\n return false;\n\n } else {\n\n boolean possible = true;\n\n HashMap<String, Double> currentStock = this.getInventory().getStock();\n\n ...
[ "0.6100653", "0.60094327", "0.589212", "0.58790284", "0.5854451", "0.58175397", "0.5790463", "0.5696644", "0.56337726", "0.5619582", "0.5584351", "0.5557393", "0.5556735", "0.5541755", "0.5525121", "0.5506123", "0.5492835", "0.5466768", "0.5461083", "0.54419744", "0.54222363"...
0.515216
58
/Registra la venta de un almuerzo. Primero valida si se puede preparar el plato Debe lanzar un error RuntimeException cuando no hay suficientes ingredientes
public void registrarVenta(String fruta, String proteina, String grano, String almidon) { if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) { throw new RuntimeException("Ingredientes insuficientes"); } Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon); almuerzo.registrarVenta(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void registerGoods(Goods goods, int quantity) throws StoreKeeperWorkException;", "public void agregar(Producto producto) throws BusinessErrorHelper;", "@FXML\n\tpublic void addIngredientToProduct(ActionEvent event) {\n\t\tIngredient ingredient = restaurant.returnIngredient(ChoiceIngredients.getValue());\n\t\tb...
[ "0.6283588", "0.61772937", "0.60551053", "0.6008922", "0.5912412", "0.5911443", "0.586681", "0.5842943", "0.583737", "0.5789092", "0.5777", "0.57528245", "0.5734453", "0.5705404", "0.57024366", "0.5688243", "0.56820804", "0.5679286", "0.5665541", "0.56453776", "0.5642584", ...
0.6952055
0
Complete GET/SET Start GetterSetterExtension Code Getter method ingredientes
public java.util.ArrayList<Ingrediente> getIngredientes(){ return this.ingredientes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getGetter() {\n return \"get\" + getCapName();\n }", "public void get() {\n }", "public Method getGetter() {\n return this.getter;\n }", "@Override\n public void get() {}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public String getNombre()\r\n/* 60: */ {...
[ "0.6382063", "0.6313085", "0.62727296", "0.6111604", "0.6036975", "0.5987767", "0.5987334", "0.5973391", "0.59346986", "0.5919601", "0.5903269", "0.5881384", "0.58612007", "0.58457047", "0.58247155", "0.5794569", "0.57851523", "0.577309", "0.57717013", "0.57698655", "0.572942...
0.568217
25
end method getIngredientes Setter method ingredientes
public void setIngredientes(java.util.ArrayList<Ingrediente> ingredientes){ this.ingredientes = ingredientes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.ArrayList<Ingrediente> getIngredientes(){\n return this.ingredientes;\n }", "public List<Ingrediente> verIngredientes(){\n\t\t// Implementar\n\t\treturn ingredientes;\n\t}", "public void rebajoIngredientes() {\n }", "@Override\r\n\tpublic List<String> getIngredients() {\r\n\t\tr...
[ "0.775676", "0.75845325", "0.72835815", "0.7197637", "0.7167827", "0.7029005", "0.6955665", "0.6859968", "0.6775932", "0.66549385", "0.6640351", "0.66334337", "0.6565132", "0.6521761", "0.6353154", "0.62550807", "0.62453836", "0.6240693", "0.62349063", "0.6226504", "0.6182409...
0.8294723
0
end method setIngredientes Getter method egresosPorCompras
public int getEgresosPorCompras(){ return this.egresosPorCompras; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Ingrediente> verIngredientes(){\n\t\t// Implementar\n\t\treturn ingredientes;\n\t}", "public java.util.ArrayList<Ingrediente> getIngredientes(){\n return this.ingredientes;\n }", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "public void rebajoIngredientes() {\n ...
[ "0.68339306", "0.652997", "0.64302343", "0.6425463", "0.63206834", "0.6303506", "0.6144364", "0.6109782", "0.6019197", "0.6013798", "0.6000801", "0.59427845", "0.59160537", "0.59007454", "0.58689445", "0.5867573", "0.58672994", "0.58541715", "0.5848905", "0.58460927", "0.5808...
0.6608394
1
end method getEgresosPorCompras Setter method egresosPorCompras
public void setEgresosPorCompras(int egresosPorCompras){ this.egresosPorCompras = egresosPorCompras; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEgresosPorCompras(){\n return this.egresosPorCompras;\n }", "public void setCompras(com.spirit.sri.reoc.Compras compras)\r\n {\r\n this._compras = compras;\r\n }", "public com.spirit.sri.reoc.Compras getCompras()\r\n {\r\n return this._compras;\r\n }", "publi...
[ "0.76281965", "0.70838666", "0.6472441", "0.6443287", "0.64419144", "0.6419319", "0.63766545", "0.63486177", "0.62894994", "0.62727576", "0.62412655", "0.6224435", "0.6216923", "0.62102354", "0.61884063", "0.61837316", "0.6178169", "0.6168343", "0.615838", "0.61525583", "0.61...
0.8058711
0
end method setEgresosPorCompras Getter method ingresosPorVentas
public int getIngresosPorVentas(){ return this.ingresosPorVentas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIngresosPorVentas(int ingresosPorVentas){\n this.ingresosPorVentas = ingresosPorVentas;\n }", "public int getEgresosPorCompras(){\n return this.egresosPorCompras;\n }", "public String mostrarVentas() {\n String ventas = \"\";\n for (int i = 0; i < posicionActual...
[ "0.72514725", "0.70729315", "0.6724749", "0.67055124", "0.6649393", "0.660319", "0.6568684", "0.65554255", "0.6429021", "0.63959354", "0.63604784", "0.6342199", "0.63391286", "0.6327653", "0.6318268", "0.6318113", "0.6261356", "0.6259633", "0.6250937", "0.6215087", "0.6213139...
0.77736896
0
end method getIngresosPorVentas Setter method ingresosPorVentas
public void setIngresosPorVentas(int ingresosPorVentas){ this.ingresosPorVentas = ingresosPorVentas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getIngresosPorVentas(){\n return this.ingresosPorVentas;\n }", "public Ventas() {\n setIdVenta(1);\n setIdCliente(1);\n setFecha(new Date());\n setEstado(0); \n }", "private void listarEntidades() {\r\n\t\tsetListEntidades(new ArrayList<EntidadDTO>());...
[ "0.76288337", "0.7030439", "0.6397973", "0.6347036", "0.6335755", "0.63270617", "0.6281816", "0.6236844", "0.6229611", "0.62193924", "0.62110853", "0.6162815", "0.61390805", "0.61357623", "0.6128387", "0.6119889", "0.61076045", "0.6090348", "0.60662204", "0.60603124", "0.6046...
0.7947872
0
Initialize adjacency map and data map
public Graph() { this.adjacencyMap = new HashMap<String, HashMap<String,Integer>>(); this.dataMap = new HashMap<String,E>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "public MapGraph()\n {\n this.nodes = new HashMap<Integer, MapNode>();\n this.edges = new HashMap<Integer, Set<MapEdge>>();\n this.nodesByName = new HashMap<String, Set<Integer>>();\n }", "private void initializeGraph()...
[ "0.69487387", "0.68089473", "0.6727009", "0.6692709", "0.64422196", "0.6431408", "0.6404696", "0.63935256", "0.6378204", "0.6348505", "0.63032925", "0.62771297", "0.6272855", "0.6244795", "0.62215704", "0.62140423", "0.6208045", "0.6178033", "0.6121243", "0.6089047", "0.60886...
0.70046765
0
Adds or updates a directed edge with the specified cost.
public void addDirectedEdge(String startVertex, String endVertex, int cost) { if(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } this.adjacencyMap.get(startVertex).put(endVertex, cost); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IEdge addEdge(String from, String to, Double cost);", "public void addEdge(Node src, Node dest, int cost){\n if(nodes.containsKey(src) && nodes.containsKey(dest)){\n Edge newEdge = new Edge(src, dest, cost);\n nodes.get(src).add(dest);\n src.addNodeEdge(newEdge);\n\...
[ "0.7636765", "0.7228424", "0.69937783", "0.69673866", "0.68473685", "0.6831297", "0.673324", "0.6599744", "0.6556007", "0.6545953", "0.65159065", "0.64912295", "0.6373426", "0.6370832", "0.6317994", "0.6248802", "0.6241789", "0.6223063", "0.62046415", "0.6180219", "0.61700046...
0.7656613
0
Adds a vertex to the graph by adding to the adjacency map an entry for the vertex. This entry will be an empty map. An entry in the dataMap will store the provided data.
public void addVertex(String vertexName, E data) { if(this.adjacencyMap.containsKey(vertexName)) { throw new IllegalArgumentException("Vertex already exists in the graph!"); } this.dataMap.put(vertexName, data); this.adjacencyMap.put(vertexName, new HashMap<String,Integer>()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addVertex( VKeyT key, VDataT data );", "public void addVertex(Vertex vertex){\n \n synchronized(vertexes){\n \n vertexes.put(vertex.getID(),vertex);\n }\n }", "@Override\r\n public void add(V vertexName) {\r\n if(!contains(vertexName))\r\n ...
[ "0.7518287", "0.71015924", "0.70485705", "0.7014766", "0.68534005", "0.67973477", "0.67592245", "0.67419714", "0.66567403", "0.66511923", "0.6647122", "0.6646341", "0.6512889", "0.6482433", "0.6455261", "0.6430384", "0.6380075", "0.63771516", "0.63485026", "0.6329368", "0.631...
0.7655431
0
Computes BreadthFirst Search of the specified graph.
public void doBreadthFirstSearch(String startVertexName, CallBack<E> callback) { if(!this.dataMap.containsKey(startVertexName)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } Set<String> visited = new HashSet<String>(); Queue<String> discovered = new PriorityQueue<String>(); discovered.add(startVertexName); while(!discovered.isEmpty()) { String V = discovered.poll(); if(!visited.contains(V)) { callback.processVertex(V, this.dataMap.get(V)); visited.add(V); SortedSet<String> neighbors = new TreeSet<String>(this.adjacencyMap.get(V).keySet()); for(String node : neighbors) { discovered.add(node); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void breadthFirstSearch(ArrayList<Node> graph) {\n\t\tSystem.out.println(\"BFS:\");\n\t\tif(graph.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tGraphUtils.cleanGraph(graph);\n\n\t\tQueue<Node> queue = new LinkedList<Node>();\n\t\tfor(Node node : graph) {\n\t\t\tif(node.state != Node.State.UNDISCOVE...
[ "0.79910386", "0.741231", "0.7007564", "0.6851833", "0.6799952", "0.67502975", "0.67402333", "0.6718978", "0.6641693", "0.6535959", "0.6331639", "0.63258207", "0.6287976", "0.62869865", "0.62802964", "0.6241183", "0.62220776", "0.6215524", "0.6177983", "0.6159334", "0.6129952...
0.54352945
78
Computes DepthFirst Search of the specified graph.
public void doDepthFirstSearch(String startVertexName, CallBack<E> callback) { if(!this.dataMap.containsKey(startVertexName)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } Stack<String> discovered = new Stack<String>(); Set<String> visited = new HashSet<String>(); discovered.push(startVertexName); while(!discovered.isEmpty()){ String V = discovered.pop(); if(!visited.contains(V)) { callback.processVertex(V, this.dataMap.get(V)); visited.add(V); SortedSet<String> nextV = new TreeSet<String>(this.adjacencyMap.get(V).keySet()); for(String next : nextV) { if(!visited.contains(next)) { discovered.push(next); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DepthFirstSearch(Graph graph) throws Exception {\n\n this.graph = graph;\n int n = graph.getNumV();\n\n parent = new int[n];\n Arrays.fill( parent , -1);\n\n visited = new boolean[n];\n Arrays.fill( visited , false );\n\n discoveryOrder = new int[n];\n ...
[ "0.7505775", "0.73500735", "0.71987075", "0.70437354", "0.67515504", "0.6721992", "0.66962445", "0.667737", "0.640528", "0.6404511", "0.63037604", "0.626259", "0.62559897", "0.61377203", "0.61118805", "0.6105471", "0.6077469", "0.60180706", "0.60064423", "0.5979376", "0.59256...
0.0
-1
Computes the shortest path and shortest path cost using Dijkstras's algorithm.
public int doDijkstras(String startVertex, String endVertex, ArrayList<String> shortestPath) { if(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } Set<String> visited = new HashSet<String>(); PriorityQueue<Vertex> minDist = new PriorityQueue<Vertex>(); Vertex firstV = new Vertex(startVertex,startVertex,0); minDist.add(firstV); for(String V : this.adjacencyMap.get(startVertex).keySet()) { minDist.add(new Vertex(V,startVertex,this.getCost(startVertex, V))); } //map of vertexName --> VertexObject HashMap<String, Vertex> mapV = new HashMap<String,Vertex>(); mapV.put(startVertex, firstV); /* * Init keys-->costs */ for(String key : this.getVertices()) { if(key.equals(startVertex)) { mapV.put(key, new Vertex(key,null,0)); } else { mapV.put(key, new Vertex(key,null,Integer.MAX_VALUE)); } } /* * Init List for shortest path */ LinkedList<String> list = new LinkedList<String>(); list.add(startVertex); HashMap<String,List<String>> path = new HashMap<String,List<String>>(); path.put(startVertex, list); while(!minDist.isEmpty()) { Vertex node = minDist.poll(); String V = node.current; int minimum = node.cost; System.out.println(minDist.toString()); visited.add(V); TreeSet<String> adj = new TreeSet<String>(this.adjacencyMap.get(V).keySet()); for(String successor : adj) { if(!visited.contains(successor) && !V.equals(successor)) { int newCost = this.getCost(V, successor)+minimum; if(newCost < mapV.get(successor).cost) { minDist.remove(mapV.get(successor)); minDist.add(new Vertex(successor,V,newCost)); mapV.put(successor, new Vertex(successor,V,newCost)); LinkedList<String> newList = new LinkedList<String>(path.get(V)); newList.add(successor); path.put(successor, newList); } } } } int smallestPath = mapV.get(endVertex).cost == Integer.MAX_VALUE ? -1 : mapV.get(endVertex).cost; if(smallestPath == -1) { shortestPath.add("None"); } else { for(String node : path.get(endVertex)) { shortestPath.add(node); } } return smallestPath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void computeShortestPath(){\n T current = start;\n boolean atEnd = false;\n while (!unvisited.isEmpty()&& !atEnd){\n int currentIndex = vertexIndex(current);\n LinkedList<T> neighbors = getUnvisitedNeighbors(current); // getting unvisited neighbors\n \n //what is ...
[ "0.732103", "0.72606224", "0.7222961", "0.7163612", "0.71130466", "0.70867", "0.7058521", "0.70164496", "0.7007999", "0.699821", "0.69651586", "0.6962594", "0.69184047", "0.6885524", "0.68707615", "0.6869327", "0.68600863", "0.6835411", "0.6825967", "0.6817437", "0.6800453", ...
0.7646254
0
TODO Autogenerated method stub
@Override public int compareTo(Vertex arg0) { Integer current = new Integer(this.cost); Integer other = new Integer(arg0.cost); return current.compareTo(other); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Returns a map with information about vertices adjacent to vertexName.
public Map<String,Integer> getAdjacentVertices(String vertexName) { return this.adjacencyMap.get(vertexName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\...
[ "0.69995195", "0.66393805", "0.6519776", "0.6425543", "0.64221245", "0.6344805", "0.62918687", "0.6276318", "0.62702423", "0.6162115", "0.6083971", "0.6077058", "0.60769665", "0.6068635", "0.60408586", "0.6015442", "0.5977686", "0.5962528", "0.5889833", "0.58895814", "0.58853...
0.8379503
0
Returns the cost associated with the specified edge.
public int getCost(String startVertex, String endVertex) { if(!this.dataMap.containsKey(startVertex) || !this.dataMap.containsKey(endVertex)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } return startVertex.equals(endVertex) ? 0 : this.adjacencyMap.get(startVertex).get(endVertex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int cost(Edge e) {\n\t\tif(mcg!=null)\n\t\t{\n\t\t\treturn mcg.cost(e);\n\t\t}\n\t\treturn 0;\n\t}", "public int edgeCost(Vertex a, Vertex b) {\n if (!myGraph.containsKey(b) || !myGraph.containsKey(a)) {\n throw new IllegalArgumentException(\"Vertex is not valid\");\n }\n i...
[ "0.7851349", "0.6692166", "0.6238737", "0.6178935", "0.61370987", "0.6097445", "0.60967815", "0.60967815", "0.6055283", "0.6040591", "0.60166544", "0.598195", "0.59650195", "0.5953937", "0.5947733", "0.5930195", "0.59108484", "0.59093404", "0.59088576", "0.5908053", "0.590615...
0.5854334
29
Returns the data component associated with the specified vertex.
public E getData(String vertex) { if(!this.dataMap.containsKey(vertex)) { throw new IllegalArgumentException("Vertex does not exist in the graph!"); } return this.dataMap.get(vertex); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VDataT getVertexData( VKeyT key ) throws NoSuchVertexException;", "public Collection< VDataT > vertexData();", "public V getVertex(int index);", "public Object getVertex(){\r\n return this.vertex;\r\n }", "Vertex getVertex(int index);", "Vertex getVertex();", "public int getvertex() {\n\t\tr...
[ "0.6620343", "0.64818966", "0.641264", "0.6329124", "0.6329111", "0.62180287", "0.6193482", "0.61474687", "0.6095077", "0.5943832", "0.5846368", "0.56342846", "0.56075865", "0.5571001", "0.555958", "0.5548474", "0.5540275", "0.55177176", "0.5502296", "0.5488966", "0.54516935"...
0.7873757
0
Returns a Set with all the graph vertices.
public Set<String> getVertices() { return this.dataMap.keySet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Set<Vertex> getVertices();", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to ...
[ "0.8589474", "0.8215868", "0.80291146", "0.80084777", "0.80084777", "0.78778434", "0.7725532", "0.7707044", "0.76789623", "0.7664325", "0.7649521", "0.7644897", "0.7623783", "0.75729686", "0.73459125", "0.73039275", "0.7209706", "0.7196308", "0.7163973", "0.713235", "0.712488...
0.71851707
18
Returns a string with information about the Graph.
public String toString() { String str = ""; SortedSet<String> sortedVertices = new TreeSet<String>(this.getVertices()); str += "Vertices: " + sortedVertices.toString() + "\nEdges:\n"; for(String vertex : sortedVertices) { if(this.dataMap.containsKey(vertex)) { HashMap<String,Integer> adjMap = this.adjacencyMap.get(vertex); SortedSet<String> sortedKeys = new TreeSet<String>(adjMap.keySet()); str += "Vertex(" + vertex + ")--->{"; for(String adj : sortedKeys) { str += adj +"="+ adjMap.get(adj) +", "; } str = str.trim(); if(!sortedKeys.isEmpty()) { StringBuilder s = new StringBuilder(str); s.deleteCharAt(str.length()-1); str = s.toString(); } str+="}\n"; } } return str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String rawGraphToString();", "public String apGraph() {\n if(root != null){\n root.nameAvl();\n return doBigGraph();\n }else{\n return \"\";\n }\n }", "@Override\n public String toString() {\n String str = \"graph [\\n\";\n\n ...
[ "0.7599708", "0.7534622", "0.73126644", "0.7216808", "0.71149045", "0.6940402", "0.6913582", "0.6909675", "0.68599296", "0.68426335", "0.68365985", "0.6824232", "0.6752631", "0.6751167", "0.67422765", "0.6730556", "0.67305315", "0.67284596", "0.6711221", "0.6699635", "0.66954...
0.69462174
5
Crea un nuevo objeto WebEventOpenDoor.
public WebEventOpenDoor(){ thread = null; dataInput = null; dataOutput = null; socket = null; serverSocket = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "EventChannel create();", "Event createEvent();", "Event createEvent();", "public EventoWS() {\n }", "public Open() {\n //creates a new open instance\n }", "public GarageDoorOpenCommand( GarageDoor aDoor ) {\r\n door = aDoor;\r\n }", "@Override\r\n\tpublic void open(long timeout) ...
[ "0.5879359", "0.5809636", "0.5809636", "0.5678077", "0.5596232", "0.54565495", "0.54497004", "0.5410945", "0.5378797", "0.5370565", "0.5354376", "0.53523993", "0.52852666", "0.52781314", "0.5271452", "0.52103955", "0.5197806", "0.5152567", "0.50624895", "0.5062394", "0.505951...
0.6631924
0
No se implementa para objeto.
@Override public String getCode() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Objet getObjetAlloue();", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void inizializza() {\...
[ "0.7033591", "0.6890691", "0.6650098", "0.66118747", "0.6506866", "0.6463589", "0.6437202", "0.63886", "0.6301744", "0.6287028", "0.62574786", "0.622609", "0.622609", "0.62104046", "0.6145228", "0.6143606", "0.6127322", "0.61132157", "0.6104417", "0.6100969", "0.6088397", "...
0.0
-1
No se implementa para objeto.
@Override public int getPinState(){ return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Objet getObjetAlloue();", "@Override\n\tpublic void visitarObjeto(Objeto o) {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void inizializza() {\...
[ "0.7033591", "0.6890691", "0.6650098", "0.66118747", "0.6506866", "0.6463589", "0.6437202", "0.63886", "0.6301744", "0.6287028", "0.62574786", "0.622609", "0.622609", "0.62104046", "0.6145228", "0.6143606", "0.6127322", "0.61132157", "0.6104417", "0.6100969", "0.6088397", "...
0.0
-1
Realiza las acciones del objeto WebEventOpenDoor.
@Override public void run() { while(true){ //----------------ACCIONES QUE REALIZA EL HILO----------------------- if(isActive()){ try { socket = serverSocket.accept(); //Espera una nueva conexion socket.setSoTimeout(10000); //Se espera recibir informacion durante 10 segundos dataInput = new BufferedReader(new InputStreamReader(socket.getInputStream()));//Se recibe informacion String data = dataInput.readLine(); System.out.println(data); //Se disparan recien aqui las transiciones para evitar inconvenientes en caso de TimeOut monitor.disparar(transitions.get(0)); monitor.disparar(transitions.get(1));//Se guarda en base de datos dataBase.insertEventWeb(data); monitor.disparar(transitions.get(2)); } catch (SocketTimeoutException ex) { //En caso que haya expirado el TimeOut tengo que System.out.println("El tiempo a expirado"); } catch (IOException ex) { System.out.println("Error en Socket"); } try { socket.close(); } catch (IOException ex) { System.out.println("Error al cerrar Socket"); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebEventOpenDoor(){\n thread = null;\n dataInput = null;\n dataOutput = null;\n socket = null;\n serverSocket = null;\n }", "protected void openDoors() {\n\n\t}", "@Override\n\tpublic void openDoor() {\n\t\t// existing functionality from class car\n\t\tsuper.openDoo...
[ "0.66582257", "0.6080596", "0.5971304", "0.55610836", "0.5551903", "0.5500177", "0.54665285", "0.543522", "0.53535616", "0.5330511", "0.5304726", "0.5304065", "0.5293005", "0.5286903", "0.5286903", "0.5212192", "0.52086556", "0.52082187", "0.5183898", "0.51724803", "0.5166271...
0.0
-1
Private constructor to prevent instantiation.
private ClinicFileLoader() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Instantiation(){}", "private Rekenhulp()\n\t{\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private Utils()\n {\n // P...
[ "0.76072574", "0.7588106", "0.7561221", "0.7483928", "0.74321055", "0.73261833", "0.7305497", "0.72746056", "0.7252279", "0.7251664", "0.7240739", "0.7200609", "0.71984166", "0.7195424", "0.7168416", "0.71607447", "0.7154586", "0.714646", "0.7137504", "0.713072", "0.71112275"...
0.0
-1
for every line given a file it creates a new patient and is stored in an array of Patients.
public static Patient[] getPatientListFromSequentialFile(String filename) throws IOException { Patient[] patientInfo = new Patient[150]; Scanner inputStream = null; int patientCounter = 0; String ramq; String firstName; String lastName; String telephone; String medScheme; String medNumber; String medName; String condition; Medication medication = null; try { // If file is not found, throws IOException BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(new FileInputStream(filename), StandardCharsets.UTF_8)); inputStream = new Scanner(bufferedReader); String record = null; // Loop for getting all the records. while (inputStream.hasNext()) { record = inputStream.nextLine().trim(); if (!record.isEmpty()) { try { // Getting and splitting data from row String[] recordArray = record.split("\\*"); // If array has too little or too much data // skips over rest of current loop if ((recordArray.length < 3) || (recordArray.length > 8)) { throw new IllegalArgumentException("The record contains too much or too little data."); } ramq = recordArray[0].trim(); firstName = recordArray[1].trim(); lastName = recordArray[2].trim(); // Attempting to create a patient using the data given. // Sets telephone, medication, etc if present. patientInfo[patientCounter] = new ClinicPatient(firstName, lastName, ramq); // Checks if telephone number is present, sets it. if (recordArray.length >= 4) { telephone = recordArray[3].trim(); patientInfo[patientCounter].setTelephoneNumber(Optional.of(telephone)); } // Checks if medication is present, sets it. if (recordArray.length >= 7) { medScheme = recordArray[4].trim(); medNumber = recordArray[5].trim(); medName = recordArray[6].trim(); // Checking to make sure all aspects of medication // exist, then set it. if ((!medScheme.equals("")) && (!medNumber.equals("")) && (!medName.equals(""))) { if (medScheme.equalsIgnoreCase("DIN")) { medication = new DINMedication(medNumber, medName); patientInfo[patientCounter].setMedication(Optional.of(medication)); } else if (medScheme.equalsIgnoreCase("NDC")) { medication = new NDCMedication(medNumber, medName); patientInfo[patientCounter].setMedication(Optional.of(medication)); } } } if (recordArray.length == 8) { condition = recordArray[7].trim(); // if condition exists, set it if (!condition.equals("")) { patientInfo[patientCounter].setExistingConditions(Optional.of(condition)); } } // Moves patient array index up. patientCounter++; } // End of Try catch (IllegalArgumentException iae) { System.out.println("The following record caused an error."); System.out.println(record); System.out.println(iae.getMessage() + "\n"); continue; } } // end of if statement is not empty } // end of while // } // end of if statement patientInfo = resizePatient(patientInfo, patientCounter); return patientInfo; } // end of try catch (IOException e) { throw new IOException("File not found.\n" + e.getMessage() + "\n"); } finally { if (inputStream != null) inputStream.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readPatient() {\n\t\tBufferedReader br;\n\t\tString s;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"patients.txt\"));\n\n\t\t\twhile ((s = br.readLine()) != null) {\n\t\t\t\tString[] fields = s.split(\", \");\n\n\t\t\t\tString ssn = fields[0];\n\t\t\t\tString name = fields[1];\n\t\t\t\tSt...
[ "0.7123282", "0.68351", "0.63448423", "0.6172695", "0.6002837", "0.59505373", "0.5902498", "0.5892707", "0.58896875", "0.5698335", "0.5671174", "0.5583751", "0.54986554", "0.54915196", "0.5488358", "0.54291075", "0.54267955", "0.54266745", "0.53770524", "0.5373395", "0.534476...
0.70982224
1
takes a patient array and resizes it full to capacity
private static Patient[] resizePatient(Patient[] big, int counter) { Patient[] newPatient = new Patient[counter]; for (int i = 0; i < counter; i++) { newPatient[i] = big[i]; } return newPatient; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resize(int capacity) {\n // create a new array, and copy the original array items to the new array\n T[] newArray = (T[]) new Object[capacity];\n int position = plusOne(nextFirst);\n for (int i = 0; i < size; i += 1) {\n newArray[i] = array[position];\n ...
[ "0.6706251", "0.6562309", "0.63791806", "0.6354721", "0.63524526", "0.6326973", "0.630032", "0.62815285", "0.6246366", "0.6246063", "0.6229746", "0.6173874", "0.6135185", "0.61335266", "0.61239636", "0.6086026", "0.6081575", "0.6068909", "0.60506254", "0.6033031", "0.602724",...
0.7230717
0
creates a new visit element for each visit with the same ramq as the patient and stores it in an array or visits
public static Visit[] getVisitListFromSequentialFile(String filename, Patient[] patientList) throws IOException, IllegalArgumentException, NullPointerException { Visit[] visitInfo = new Visit[150]; Scanner inputStream = null; int visitCounter = 0; String ramq; int patientLocation; int year = 0; int month = 0; int day = 0; int hour = 0; int min = 0; int priorityCode; String yearStr; String monthStr; String dayStr; String hourStr; String minStr; String priorityCodeStr; String complaint; try { BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(new FileInputStream(filename), StandardCharsets.UTF_8)); inputStream = new Scanner(bufferedReader); String record = null; // Gets the RAMQ only from patient list // Will throw a NullPoiterException if patientList is null. if (patientList == null) { throw new NullPointerException("Patient list is null."); } String[] ramqArray = new String[patientList.length]; for (int i = 0; i < patientList.length; i++) { ramqArray[i] = patientList[i].getRamq().getRamq(); } while (inputStream.hasNext()) { record = inputStream.nextLine().trim(); if (!record.isEmpty()) { try { String[] recordArray = record.split("\\*"); if ((recordArray.length < 6) || (recordArray.length > 13)) { throw new IllegalArgumentException("The record contains too much or too little data."); } ramq = recordArray[0]; // Checks if RAMQ exists in patient file, gets location patientLocation = ListUtilities.binarySearch(ramqArray, ramq); if (patientLocation == -1) { throw new IllegalArgumentException("The record RAMQ is not a patient."); } // Will be valid because patientList is valid visitInfo[visitCounter] = new ClinicVisit(patientList[patientLocation]); // Represents the registration date yearStr = recordArray[1]; monthStr = recordArray[2]; dayStr = recordArray[3]; hourStr = recordArray[4]; minStr = recordArray[5]; if ((!yearStr.equals("")) && (!monthStr.equals("")) && (!dayStr.equals("")) && (!hourStr.equals("")) && (!minStr.equals(""))) { // Attempting to parse ints for localdatetime year = Integer.parseInt(yearStr); month = Integer.parseInt(monthStr); day = Integer.parseInt(dayStr); hour = Integer.parseInt(hourStr); min = Integer.parseInt(minStr); LocalDateTime registrationTime = LocalDateTime.of(year, month, day, hour, min); visitInfo[visitCounter].setRegistrationDateAndTime(Optional.of(registrationTime)); } // Checks if triage date is present, sets it. if (recordArray.length >= 11) { // Represents the triage date yearStr = recordArray[6]; monthStr = recordArray[7]; dayStr = recordArray[8]; hourStr = recordArray[9]; minStr = recordArray[10]; if ((!yearStr.equals("")) && (!monthStr.equals("")) && (!dayStr.equals("")) && (!hourStr.equals("")) && (!minStr.equals(""))) { // Attempting to parse ints for localdatetime year = Integer.parseInt(yearStr); month = Integer.parseInt(monthStr); day = Integer.parseInt(dayStr); hour = Integer.parseInt(hourStr); min = Integer.parseInt(minStr); LocalDateTime triageTime = LocalDateTime.of(year, month, day, hour, min); visitInfo[visitCounter].setTriageDateAndTime(Optional.of(triageTime)); } } // Checks if priority is present, sets it. if (recordArray.length >= 12) { priorityCodeStr = recordArray[11]; if (!priorityCodeStr.equals("")) { priorityCode = Integer.parseInt(priorityCodeStr); visitInfo[visitCounter].setPriority(Priority.getPriorityCode(priorityCode)); } } // Checks if complaint is present, sets it. if (recordArray.length == 13) { complaint = recordArray[12]; if (!complaint.equals("")) { visitInfo[visitCounter].setComplaint(Optional.of(complaint)); } } visitCounter++; } catch (IllegalArgumentException iae) { System.out.println("The following record caused an error."); System.out.println(record); System.out.println(iae.getMessage() + "\n"); continue; } catch (DateTimeException dte) { System.out.println("The following record caused an error."); System.out.println(record); System.out.println(dte.getMessage() + "\n"); continue; } } // end if record is not empty } // end of while loop visitInfo = resizeVisit(visitInfo, visitCounter); return visitInfo; } catch (IOException e) { throw new IOException("File not found.\n" + e.getMessage()); } catch (NullPointerException n) { throw new NullPointerException(n.getMessage()); } finally { if (inputStream != null) inputStream.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "VisitManager() {\r\n\t\tvisits = new TreeMap<String, VisitRecord>();\r\n\t}", "private static Visit[] resizeVisit(Visit[] big, int counter) {\n\t\tVisit[] newVisit = new Visit[counter];\n\n\t\tfor (int i = 0; i < counter; i++) {\n\t\t\tnewVisit[i] = big[i];\n\t\t}\n\n\t\treturn newVisit;\n\t}", "protected void...
[ "0.52099", "0.51281244", "0.49810117", "0.49228647", "0.48677048", "0.4850842", "0.48481303", "0.4809761", "0.48082626", "0.47901267", "0.4727099", "0.468552", "0.46532506", "0.4621677", "0.46067986", "0.46055743", "0.45822918", "0.45717296", "0.45515698", "0.45482367", "0.45...
0.54079944
0
takes a visit array and resizes it full to capacity
private static Visit[] resizeVisit(Visit[] big, int counter) { Visit[] newVisit = new Visit[counter]; for (int i = 0; i < counter; i++) { newVisit[i] = big[i]; } return newVisit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void resize(int capacity) {\n // create a new array, and copy the original array items to the new array\n T[] newArray = (T[]) new Object[capacity];\n int position = plusOne(nextFirst);\n for (int i = 0; i < size; i += 1) {\n newArray[i] = array[position];\n ...
[ "0.6684271", "0.6615018", "0.65597236", "0.6542983", "0.6509753", "0.65011823", "0.64839894", "0.6461016", "0.64006186", "0.6387991", "0.6380533", "0.6377435", "0.6337464", "0.63037086", "0.6293843", "0.6292122", "0.62683475", "0.62545466", "0.62123203", "0.6208761", "0.62026...
0.7124797
0
EFFECTS: constructs reader from source file Code based on JsonReader Demo
public JsonReader(String file) { this.file = file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JsonReader(String source) {\n this.source = source;\n }", "public JsonReader(String source) {\n this.source = source;\n }", "public JsonReader(String source) {\n this.source = source;\n }", "public JsonReader(String source) {\n this.source = source;\n }", "@Vi...
[ "0.7124286", "0.7124286", "0.7124286", "0.7124286", "0.68098724", "0.67583513", "0.66805214", "0.6361433", "0.6283298", "0.6223015", "0.6139382", "0.6090698", "0.60549814", "0.6040186", "0.60198116", "0.5987544", "0.59681517", "0.5962031", "0.5806297", "0.5782276", "0.5729005...
0.65468454
7
EFFECTS: reads sheet music from file and returns it; throws IOException if an error occurs reading data from file Code based on JsonReader Demo
public SheetMusicDrawing read() throws IOException { String jsonData = readFile(file); JSONObject jsonObject = new JSONObject(jsonData); return parseSheetMusic(jsonObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ShapleyReader {\n Player[] read(String fileName) throws IOException;\n}", "private static JsonReader readJSONFromAsset(Context context) throws IOException {\n AssetManager assetManager = context.getAssets();\n JsonReader reader;\n try {\n reader = new JsonReader(ne...
[ "0.608957", "0.60539645", "0.59799993", "0.5967886", "0.5881052", "0.5843832", "0.57908237", "0.5777443", "0.5759544", "0.5752292", "0.5729497", "0.5709647", "0.56793505", "0.56716835", "0.5635481", "0.5613688", "0.5594337", "0.55708385", "0.5514107", "0.55083185", "0.5497836...
0.74194247
0
EFFECTS: parses sheet music from JSON object and returns it Code based on JsonReader Demo
private SheetMusicDrawing parseSheetMusic(JSONObject jsonObject) { String name = jsonObject.getString("title"); SheetMusicDrawing sm = new SheetMusicDrawing(name); addNotes(sm, jsonObject); return sm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SheetMusicDrawing read() throws IOException {\n String jsonData = readFile(file);\n JSONObject jsonObject = new JSONObject(jsonData);\n return parseSheetMusic(jsonObject);\n }", "private List<Music> parseJSON(JSONArray ary)throws JSONException {\r\n\t\tList<Music> musics=new ArrayL...
[ "0.6519509", "0.6209053", "0.59208286", "0.58977616", "0.5870459", "0.5738059", "0.56559277", "0.56465185", "0.56153464", "0.5560657", "0.5527055", "0.55039567", "0.5421579", "0.5391721", "0.53118485", "0.529635", "0.52787673", "0.5255939", "0.52357084", "0.52287245", "0.5201...
0.7120605
0
EFFECTS: reads source file as string and returns it Code based on JsonReader Demo
private String readFile(String file) throws IOException { StringBuilder contentBuilder = new StringBuilder(); try (Stream<String> stream = Files.lines(Paths.get(file), StandardCharsets.UTF_8)) { stream.forEach(s -> contentBuilder.append(s)); } return contentBuilder.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@VisibleForTesting\n interface JsonReader {\n /**\n * Returns the contents of the JSON file that is pointed to by the given {@code resId} as\n * a string.\n *\n * @param context The current Context.\n * @param resId The resource id of the JSON file.\n * @re...
[ "0.66448057", "0.6528226", "0.6528226", "0.6528226", "0.6528226", "0.65205956", "0.6470391", "0.6465521", "0.63685274", "0.63244206", "0.61940205", "0.6166531", "0.6153687", "0.6152968", "0.60801774", "0.6059985", "0.6036712", "0.5990682", "0.5979181", "0.59686404", "0.592442...
0.0
-1
MODIFIES: sm EFFECTS: parses notes from JSON object and adds them to sheet music Code based on JsonReader Demo
private void addNotes(SheetMusicDrawing sm, JSONObject jsonObject) { JSONArray jsonArray = jsonObject.getJSONArray("notes"); for (Object json : jsonArray) { JSONObject nextNote = (JSONObject) json; addNote(sm, nextNote); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addNote(SheetMusicDrawing sm, JSONObject jsonObject) {\n int x1 = jsonObject.getInt(\"x-position\");\n int y1 = jsonObject.getInt(\"y-position\");\n NoteShape note = new NoteShape(x1, y1, NoteShape.NOTE_WIDTH, NoteShape.NOTE_HEIGHT);\n sm.addNote(note);\n }", "private ...
[ "0.6523672", "0.62905735", "0.55920416", "0.53779745", "0.5220082", "0.52006114", "0.5200412", "0.51874244", "0.5165316", "0.5158851", "0.515211", "0.5145209", "0.51380306", "0.510533", "0.5074217", "0.5042687", "0.5026279", "0.5020577", "0.49940556", "0.49795046", "0.4969371...
0.7136556
0
MODIFIES: sm EFFECTS: parses note from JSON object and adds it to sheet music Code based on JsonReader Demo
private void addNote(SheetMusicDrawing sm, JSONObject jsonObject) { int x1 = jsonObject.getInt("x-position"); int y1 = jsonObject.getInt("y-position"); NoteShape note = new NoteShape(x1, y1, NoteShape.NOTE_WIDTH, NoteShape.NOTE_HEIGHT); sm.addNote(note); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addNotes(SheetMusicDrawing sm, JSONObject jsonObject) {\n JSONArray jsonArray = jsonObject.getJSONArray(\"notes\");\n for (Object json : jsonArray) {\n JSONObject nextNote = (JSONObject) json;\n addNote(sm, nextNote);\n }\n }", "private SheetMusicDrawing...
[ "0.6790789", "0.64807236", "0.560032", "0.54048544", "0.53129697", "0.53087735", "0.52932847", "0.5244468", "0.52433723", "0.5224548", "0.5198327", "0.51589876", "0.5136652", "0.5130594", "0.5117722", "0.5036674", "0.5032666", "0.50326234", "0.50270134", "0.5011065", "0.49659...
0.6522786
1
int i; // declaration i = 10; //initialization System.out.println(i); // utilization byte i; // declaration i = 20; //initialization System.out.println(i); // utilization short i; // declaration i = 30; //initialization System.out.println(i); // utilization long i; // declaration i = 78945612; //initialization System.out.println(i); // utilization float i; // declaration i = 10.789456f; //initialization System.out.println(i); // utilization double i; // declaration i = 10.789456123321654; //initialization System.out.println(i); // utilization char i; // declaration i = 'n'; //initialization System.out.println(i); // utilization
public static void main(String []args){ //byte i; // declaration //i = 20; //initialization //System.out.println(i); // utilization //short i; // declaration //i = 30; //initialization //System.out.println(i); // utilization //long i; // declaration //i = 78945612; //initialization //System.out.println(i); // utilization //float i; // declaration //i = 10.789456f; //initialization //System.out.println(i); // utilization //double i; // declaration //i = 10.789456123321654; //initialization //System.out.println(i); // utilization //char i; // declaration //i = 'n'; //initialization //System.out.println(i); // utilization boolean i; // declaration i = true; //initialization System.out.println(i); // utilization }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\nint i=1;\nbyte b=1;\nshort s=1;\nlong l=1L;\ndouble d=1d;\nfloat f=1f;\nSystem.out.println(\"the values are \"+i);\nSystem.out.println(\"the values are \"+b);\n\nSystem.out.println(\"the values are \"+s);\nSystem.out.println(\"the values are \"+l);\nSystem.out.println(\"th...
[ "0.6537936", "0.6463888", "0.63853705", "0.63415766", "0.62457335", "0.5985223", "0.5916003", "0.5906621", "0.58826894", "0.5880806", "0.5873372", "0.585448", "0.5843657", "0.58362824", "0.5803353", "0.57992655", "0.57898283", "0.57767844", "0.5753811", "0.57512766", "0.57355...
0.87941843
0
Adds a new item to the rltdPtyDtls list.
public SwitchOrder3 addRltdPtyDtls(Intermediary8 rltdPtyDtls) { getRltdPtyDtls().add(rltdPtyDtls); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addItem(P_CK t) {\n \n }", "public void setPtyType(String ttype){\n setPtyType(ttype, 80, 24, 640, 480);\n }", "public void addItem(Object item)\r\n {\r\n LLNode newNode;\r\n synchronized (nodeMutex)\r\n {\r\n if (nodePool....
[ "0.52437437", "0.48720816", "0.47104016", "0.46834564", "0.46783733", "0.46762878", "0.46738967", "0.46577322", "0.4646472", "0.46459264", "0.46298409", "0.45981586", "0.45381215", "0.45301518", "0.4527511", "0.45219424", "0.45125535", "0.4492971", "0.4491897", "0.44895142", ...
0.71286184
0
Adds a new item to the redLegDtls list.
public SwitchOrder3 addRedLegDtls(SwitchRedemptionLegOrder3 redLegDtls) { getRedLegDtls().add(redLegDtls); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void add(E item) {\n\t\tDblListno...
[ "0.59131", "0.5883732", "0.58537763", "0.58314043", "0.5751756", "0.56988764", "0.567902", "0.5671678", "0.566964", "0.56270367", "0.5623315", "0.56230426", "0.5621758", "0.5598813", "0.5575714", "0.55727273", "0.55663234", "0.5564831", "0.5531906", "0.5527215", "0.55262536",...
0.7163623
0
Adds a new item to the sbcptLegDtls list.
public SwitchOrder3 addSbcptLegDtls(SwitchSubscriptionLegOrder3 sbcptLegDtls) { getSbcptLegDtls().add(sbcptLegDtls); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCostItem(CostItem item) throws CostManagerException;", "@Override\n public void addItem(P_CK t) {\n \n }", "@Override\n\t@RequestMapping(value=ZuelControllerValue.Manage+\"addItem\")\n\tpublic ZuelResult addItem(TbItem item) {\n\t\treturn service.addItem(item);\n\t}", ...
[ "0.5936983", "0.57734364", "0.5708462", "0.561128", "0.55362356", "0.5496753", "0.5465838", "0.5465102", "0.5454977", "0.5430752", "0.539459", "0.53565", "0.5336406", "0.53145283", "0.52944887", "0.52931666", "0.52914155", "0.52888346", "0.5282938", "0.5260745", "0.52433896",...
0.7122123
0
TODO Autogenerated method stub
@Override public void perish() { }
{ "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\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() {...
[ "0.6671074", "0.6567672", "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.607702...
0.6523024
2
Singleton: Only need one instance of this class.
private DataSource() { Connection tmpConn = null; while(tmpConn == null) { try { tmpConn = DriverManager.getConnection(CONNECTION_STRING); } catch(SQLException e) { print("Couldn't connect to " + DB_NAME + " database: " + e.getMessage()); print("Trying again in three seconds..."); try { Thread.sleep(3000); } catch(InterruptedException ie) {} } } conn = tmpConn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Singleton(){}", "private Singleton()\n\t\t{\n\t\t}", "public static Singleton getInstance( ) {\n return singleton;\n }", "private Singleton() { }", "private Singleton() {\n\t}", "public static Singleton getInstance( ) {\n return singleton;\n }", "static void useSingleton(){\n\t...
[ "0.8128058", "0.7987025", "0.786866", "0.78507847", "0.7846274", "0.77832097", "0.77482736", "0.7715667", "0.7715333", "0.7684076", "0.7621338", "0.7618532", "0.753158", "0.752329", "0.75228167", "0.75208455", "0.7497763", "0.7435631", "0.73624426", "0.73519355", "0.734726", ...
0.0
-1
Compiles an Archive using Shrinkwrap, containing those external dependencies necessary to run the tests. Note: This code will be needed at the start of each Arquillian test, but should not need to be edited, except to pass .class values to .addClasses(...) which are appropriate to the functionality you are trying to test.
@Deployment public static Archive<?> createTestArchive() { File[] libs = Maven.resolver() .loadPomFromFile("pom.xml") .resolve("io.swagger:swagger-jaxrs:1.5.16") .withTransitivity() .asFile(); return ShrinkWrap .create(WebArchive.class, "test.war") .addPackages(true, "org.jboss.quickstarts.wfk") .addAsLibraries(libs) .addAsResource("META-INF/test-persistence.xml", "META-INF/persistence.xml") .addAsWebInfResource("arquillian-ds.xml") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Deployment\n public static Archive<?> createTestArchive() {\n //HttpComponents and org.JSON are required by CustomerService\n File[] libs = Maven.resolver().loadPomFromFile(\"pom.xml\").resolve(\n \"org.apache.httpcomponents:httpclient:4.3.2\",\n \"org.json:json:2014...
[ "0.7171324", "0.66302276", "0.5884771", "0.58448386", "0.5731779", "0.57019454", "0.5701542", "0.5617079", "0.5488751", "0.54434294", "0.53530234", "0.5308677", "0.5290356", "0.52656364", "0.524557", "0.51571625", "0.4966127", "0.49362922", "0.48968264", "0.4891239", "0.48733...
0.6890474
1
GuestBookingTest persists a new guestBooking record
@Test @InSequence(1) public void testRegister(){ Customer customer = createCustomerInstance("Jane Doe", "jane@mailinator.com", "07744754955"); //Customer customer = storeCustomer(customer0); Taxi taxi0 = createTaxiInstance("JK66AKB",6); Taxi taxi = storeTaxi(taxi0); //create a GuestBooking with a future date. GuestBooking guestBooking = createGuestBookingInstance(customer, taxi.getId(), futureDate1); Response response = guestBookingRestService.createBooking(guestBooking); assertEquals("Unexpected response status", 201, response.getStatus()); log.info(" New booking via GuestBookingService.createBooking was persisted and returned status " + response.getStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Booking createBooking(Booking newBooking) throws Exception;", "public Booking saveBooking(Booking booking);", "public Bookings saveBookingDetails(Bookings bookings) ;", "void insertConfirm(bookingDTO booking) throws DataAccessException;", "@Override\n\tpublic void saveBooking(BookingDetails bookingDetails)...
[ "0.712211", "0.68820417", "0.67473394", "0.66206235", "0.63904613", "0.6290495", "0.624025", "0.6200434", "0.61985403", "0.61701375", "0.6164672", "0.6139875", "0.61125886", "0.60910845", "0.6056699", "0.6051131", "0.60278064", "0.60177636", "0.6010638", "0.60077703", "0.5988...
0.64802814
4
GuestBookingTest persists a new guestBooking record with invalid customer
@Test @InSequence(2) public void testInvalidRegister() { //find a existed customer List<Customer> customers = customerService.findAllCustomers(); Customer customer = customers.get(0); //find a existed taxi List<Taxi> taxis = taxiService.findAllTaxis(); Taxi taxi = taxis.get(0); GuestBooking guestBooking = createGuestBookingInstance(customer, taxi.getId(), futureDate1); try { guestBookingRestService.createBooking(guestBooking); fail("Expected a RestServiceException to be thrown"); } catch(RestServiceException e) { // the status should be same with the one in class BookingRestService assertEquals("Unexpected response status", Response.Status.CONFLICT, e.getStatus()); assertTrue("Unexpected error. Should be UniqueEmailException", e.getCause() instanceof UniqueEmailException); assertEquals("Unexpected response body", 1, e.getReasons().size()); log.info("Invalid booking register attempt failed with return code " + e.getStatus()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Booking createBooking(Booking newBooking) throws Exception;", "void insertConfirm(bookingDTO booking) throws DataAccessException;", "@Test(expected = ValidationException.class)\n\tpublic void testFailedBooking_DuplicateBookings() throws ParseException {\n\t\t// Preparing booking data\n\t\tBooking booking = get...
[ "0.6970079", "0.68937516", "0.6616389", "0.6341974", "0.6269526", "0.6230166", "0.6223516", "0.6155857", "0.6098127", "0.60786515", "0.60725605", "0.6066744", "0.6062265", "0.6011249", "0.6007281", "0.5992657", "0.59910625", "0.5968886", "0.5961461", "0.5934979", "0.59263486"...
0.6230368
5
GuestBookingTest create a new GuestBooking Object
private GuestBooking createGuestBookingInstance(Customer customer, Long taxiId, Date bookingDate ){ GuestBooking booking = new GuestBooking(); booking.setCustomer(customer); booking.setTaxiId(taxiId); booking.setBookingDate(bookingDate); return booking; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Booking createBooking(Booking newBooking) throws Exception;", "public HotelBookingTest() {\r\n\t\tsuper();\r\n\t}", "@Test\r\n\tpublic void makeBooking2() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArriv...
[ "0.7351894", "0.69921386", "0.6947741", "0.69151795", "0.6780768", "0.6726874", "0.66675586", "0.6651775", "0.6557973", "0.65282553", "0.6439026", "0.64107966", "0.64011765", "0.6390082", "0.63758594", "0.635951", "0.62985903", "0.61818045", "0.6152992", "0.6148049", "0.61349...
0.73086977
1
GuestBookingTest create Customer instance to be used to test booking
private Customer createCustomerInstance(String name, String email, String phoneNumber) { Customer customer = new Customer(); customer.setName(name); customer.setEmail(email); customer.setPhoneNumber(phoneNumber); return customer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "private GuestBooking createGuestBookingInstance(Customer customer, Long taxiId, Date bookingDate ){\n GuestBooking booking = new GuestBooking();\n booking.setCustomer(custom...
[ "0.72764134", "0.72764134", "0.72764134", "0.72764134", "0.7187733", "0.69499505", "0.68856984", "0.68363726", "0.6824713", "0.677336", "0.6748375", "0.6733694", "0.6732131", "0.6731968", "0.67173195", "0.658916", "0.6557427", "0.65265656", "0.6520287", "0.65011275", "0.64872...
0.5931018
67
GuestBookingTest createCustomerInstance method to create Customer instance with id to be used to test booking
private Customer createCustomerInstanceWithId(String name, String email, String phoneNumber) { Customer customer = new Customer(); customer.setId(1000L); customer.setName(name); customer.setEmail(email); customer.setPhoneNumber(phoneNumber); return customer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "private GuestBooking createGuestBookingInstance(Customer customer, Long taxiId, Date bookingDate ){\n GuestBooking booking = new GuestBooking();\n booking.setCustomer(custom...
[ "0.7072923", "0.7072923", "0.7072923", "0.7072923", "0.70080405", "0.6643956", "0.6559275", "0.6471648", "0.64521694", "0.64510065", "0.64420027", "0.64339435", "0.6404802", "0.63531166", "0.632605", "0.6311814", "0.6307513", "0.6203079", "0.6190976", "0.6158706", "0.6074697"...
0.66582024
5
GuestBookingTest persists a new customer object
private Customer storeCustomer(Customer customer){ customerRestService.createCustomer(customer); return customer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testCustomerToDatabase() throws Exception {\n \twhen(customerService.saveOrUpdate(TEST_CUSTOMER_50)).thenReturn(TEST_CUSTOMER_50);\n \t\n MockEndpoint mock = getMockEndpoint(MOCK_RESULT);\n \n mock.expectedMessageCount(1);\n mock.expectedBodiesReceived(TEST_...
[ "0.7044981", "0.67125523", "0.65723574", "0.65210754", "0.6465076", "0.63879424", "0.63716865", "0.6370158", "0.6368407", "0.63340783", "0.6280629", "0.62564784", "0.62564784", "0.62564784", "0.62564784", "0.62486315", "0.6239306", "0.6227771", "0.6218466", "0.62082374", "0.6...
0.6419501
5
GuestBookingTest createTaxiInstance method to create Taxi instance to be used to test booking
private Taxi createTaxiInstance(String registration, Integer seatsNumber) { Taxi taxi = new Taxi(); taxi.setRegistration(registration); taxi.setSeatsNumber(seatsNumber); return taxi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Taxi createTaxiInstanceWithId(String registration, Integer seatsNumber) {\n Taxi taxi = new Taxi();\n taxi.setId(1000L);\n taxi.setRegistration(registration);\n taxi.setSeatsNumber(seatsNumber);\n return taxi;\n }", "private GuestBooking createGuestBookingInstance(Cu...
[ "0.7246657", "0.63748646", "0.6193709", "0.6188268", "0.6170876", "0.6107181", "0.60420066", "0.58577305", "0.58577305", "0.5813689", "0.58102584", "0.57968104", "0.57887745", "0.57179016", "0.56582636", "0.556714", "0.55659443", "0.5548079", "0.5508568", "0.5478423", "0.5465...
0.7535449
0
BookingTest createTaxiInstance method to create Taxi instance with id to be used to test booking
private Taxi createTaxiInstanceWithId(String registration, Integer seatsNumber) { Taxi taxi = new Taxi(); taxi.setId(1000L); taxi.setRegistration(registration); taxi.setSeatsNumber(seatsNumber); return taxi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Taxi createTaxiInstance(String registration, Integer seatsNumber) {\n Taxi taxi = new Taxi();\n taxi.setRegistration(registration);\n taxi.setSeatsNumber(seatsNumber);\n return taxi;\n }", "private Taxi storeTaxi(Taxi taxi){\n taxiRestService.createTaxi(taxi);\n ...
[ "0.6921334", "0.6129972", "0.603749", "0.6035446", "0.599358", "0.59631824", "0.57965255", "0.5773683", "0.5768006", "0.57569957", "0.571125", "0.57045364", "0.568846", "0.5569526", "0.5556621", "0.5556621", "0.54672647", "0.54558825", "0.54481107", "0.54348814", "0.5399579",...
0.739332
0
BookingTest persists a taxi object
private Taxi storeTaxi(Taxi taxi){ taxiRestService.createTaxi(taxi); return taxi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Booking saveBooking(Booking booking);", "Booking createBooking(Booking newBooking) throws Exception;", "@Test\r\n public void testSave() {\r\n System.out.println(\"save\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n o...
[ "0.61059743", "0.6021931", "0.60018724", "0.59805703", "0.597604", "0.591575", "0.59060043", "0.58794385", "0.584193", "0.5815547", "0.580092", "0.5788059", "0.5760097", "0.5759277", "0.5749695", "0.57490015", "0.57436264", "0.5704551", "0.56904143", "0.56856227", "0.56757337...
0.70171845
0
Perform an operation after the given time
public void next( long time );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void forTime(long time) {\n\t\ttry {\n\t\t\tThread.sleep(time);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void aroundForTime(Task t, long time) {\n\t\ttry {\n\t\t\tThread.sleep(time);\n\t\t\tt.complete();\n\t\t\tThread.sleep(time);\n\t\t} catch...
[ "0.69742286", "0.6749001", "0.6513744", "0.62638664", "0.61643183", "0.6084419", "0.60695964", "0.60623413", "0.60216856", "0.5989519", "0.59648687", "0.5897525", "0.58925277", "0.58355385", "0.58316404", "0.58099717", "0.58042735", "0.57862914", "0.5777451", "0.57618326", "0...
0.56387377
35
Called from port listener upon receiving the oauth request with a "code" parameter
public void setAuthorizationCode(String ac) throws IOException { setAuthorizationCode(ac, redirectURI); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void requestAuth(@NonNull Activity activity, int requestCode);", "public AuthorizationCodeRequest() {\n setGrantType(ClientConfig.AUTHORIZATION_CODE);\n Map<String, Object> tokenConfig = ClientConfig.get().getTokenConfig();\n if(tokenConfig != null) {\n setServe...
[ "0.6691963", "0.65435296", "0.6521824", "0.6438531", "0.63890105", "0.6364502", "0.6257095", "0.6193757", "0.6183856", "0.6131787", "0.6012706", "0.5988184", "0.59667337", "0.59569436", "0.58923435", "0.5881558", "0.5879269", "0.58411676", "0.58316636", "0.5814143", "0.579926...
0.5685999
28
Called from port listener upon receiving the oauth request with a "token" parameter TODO does this ever happen?
public void setAccessToken(String accessToken) throws IOException { this.accessToken = accessToken; fetchUserProfile(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FormUrlEncoded\n @POST(\"oauth/request_token\")\n Flowable<ResponseBody> requestToken(@Field(\"oauth_callback\") String oauthCallback);", "OAuth2Token getToken();", "public void sendTokenToRemote() { }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", ...
[ "0.69458324", "0.68133396", "0.651391", "0.64944685", "0.6415811", "0.64118576", "0.63371134", "0.6296229", "0.62599105", "0.6241974", "0.6208287", "0.61655617", "0.6149236", "0.61103904", "0.60532147", "0.60355693", "0.60208803", "0.60046434", "0.5997031", "0.5996156", "0.59...
0.0
-1
Fetch a new access token from a refresh token.
private void refreshAccessToken() throws IOException { if (clientId == null) fetchOauthProperties(); URL url = new URL(tokenURI); Map<String, String> params = new HashMap<String, String>(); params.put("refresh_token", refreshToken); params.put("client_id", clientId); params.put("client_secret", clientSecret); params.put("grant_type", "refresh_token"); String response = HttpUtils.getInstance().doPost(url, params); JsonParser parser = new JsonParser(); JsonObject obj = parser.parse(response).getAsJsonObject(); JsonPrimitive atprim = obj.getAsJsonPrimitive("access_token"); if (atprim != null) { accessToken = obj.getAsJsonPrimitive("access_token").getAsString(); expirationTime = System.currentTimeMillis() + (obj.getAsJsonPrimitive("expires_in").getAsInt() * 1000); fetchUserProfile(); } else { // Refresh token has failed, reauthorize from scratch reauthorize(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AccessToken refreshAccessToken(String refreshToken) throws OAuthSdkException {\n\n // prepare params\n List<NameValuePair> params = new ArrayList<NameValuePair>();\n params.add(new BasicNameValuePair(CLIENT_ID, String.valueOf(client.getId())));\n params.add(new BasicNameValuePair...
[ "0.6968075", "0.69316524", "0.66792905", "0.6646713", "0.6614256", "0.65878475", "0.64832366", "0.6407563", "0.640723", "0.6334425", "0.63098586", "0.6301181", "0.6253564", "0.61964846", "0.617919", "0.6151095", "0.6119458", "0.60697234", "0.6061933", "0.6010927", "0.5941938"...
0.70728153
0
Check expiration time, with 1 minute cushion
public String getAccessToken() { if (accessToken == null || (System.currentTimeMillis() > (expirationTime - 60 * 1000))) { if (refreshToken != null) { try { this.refreshAccessToken(); } catch (IOException e) { log.error("Error fetching access token", e); } } } return accessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isExpire(long currentTime);", "long getExpiration();", "public boolean hasExpired() {\n return this.getOriginalTime() + TimeUnit.MINUTES.toMillis(2) < System.currentTimeMillis();\n }", "boolean hasExpired();", "boolean hasExpirationDate();", "boolean hasExpiryTimeSecs();", "private bo...
[ "0.73907554", "0.7333818", "0.73071736", "0.72042584", "0.72024965", "0.72001076", "0.7128849", "0.7090658", "0.7037245", "0.7004183", "0.6998769", "0.6995543", "0.69893724", "0.6984272", "0.69368607", "0.6839736", "0.68154645", "0.67681295", "0.6653775", "0.66214377", "0.657...
0.0
-1
Doesn't really belong here....
public static boolean isGoogleCloud(String url) { return url.contains(GS_HOST); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n public void perish() {\n \n }", "public void method_4270() {}", "@Override\n...
[ "0.6400792", "0.6396229", "0.6353583", "0.6340066", "0.6335083", "0.63152206", "0.63109213", "0.6280668", "0.62705547", "0.6258714", "0.62192637", "0.61702967", "0.6154652", "0.6123863", "0.6096724", "0.60402113", "0.6033369", "0.6028478", "0.602499", "0.602499", "0.6024631",...
0.0
-1
Name of the Main Inventory;
public void createMainInventor() { String name = _plugin.getConfigManager().getGeneralSettingsMap().get("Name"); String colorizedName = _plugin.getUtilsManager().colorizeString(name); //Size of the Inventory; int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get("InventorySize")); //Initialize Inventory; mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName); //Retrieve the HashMaps for the plugin; HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap(); HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap(); //Add items to Inventory; for (Integer i : categoryInformationMap.keySet()) { CategoryItem categoryItem = categoryInformationMap.get(i); ItemStack item = categoryItem.getItem(); ItemMeta itemMeta = item.getItemMeta(); itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get("CategoryName").replace("%cat%", categoryItem.getName()))); List<String> lore = new ArrayList<>(); lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription())); item.setItemMeta(itemMeta); mainInventory.addItem(item); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic String getInventoryName(){\n\t return ModBlocks.ModularCrate.getUnlocalizedName() + \".name\";\n\t}", "public String getInventoryName()\n {\n return this.hasCustomName() ? this.getCustomName() : Names.Containers.WATERJET;\n }", "public String getInventoryName()\n {\n ...
[ "0.7887174", "0.7876841", "0.74425286", "0.7362179", "0.70887417", "0.69262195", "0.66678464", "0.6625342", "0.66167456", "0.6577587", "0.6512494", "0.6473525", "0.6469329", "0.6432666", "0.6432531", "0.64289427", "0.64229685", "0.6362134", "0.63573277", "0.6356413", "0.63511...
0.7068578
5
TODO Autogenerated method stub
public static void main(String[] args) { double[] x = new double[SIZE]; double[] y = new double[SIZE]; double[] a = new double[SIZE]; double[] b = new double[SIZE]; double[] c = new double[SIZE]; double[] d = new double[SIZE]; double[] ksi = new double[SIZE]; double[] eta = new double[SIZE]; double hPow2 = Math.pow(h, 2); double alpha0 = -1.95, alpha1 = 2.0; double A1 = 0.0, B1 = -6.02; double beta0 = -1.2, beta1 = 1.0; ksi[1] = -(alpha1/alpha0); eta[1] = -(A1/alpha0); for(int k = 1; k < SIZE; k++){ a[k] = 1.0; x[k] = A + k*h; b[k] = 2 + hPow2*(x[k]+1); c[k] = 1.0; d[k] = hPow2*(Math.pow(x[k],5)+Math.pow(x[k],3)-6*x[k]); if(k!=SIZE-1){ ksi[k+1] = (c[k])/(b[k]-ksi[k]*c[k]); eta[k+1] = (a[k]*eta[k]-d[k])/(b[k]-ksi[k]*c[k]); } } int n = SIZE - 1; y[n] = (B1-beta0*eta[n])/(beta1+beta0*ksi[n]); for(int k = n-1; k > 0; k--){ y[k] = ksi[k+1]*y[k+1] + eta[k+1]; System.out.print("ksi: " + ksi[k] + " eta: " + eta[k] + " y: "+ y[k]); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { MyThread1 t = new MyThread1(); t.start(); //executed by main thread for (int i = 0; i < 10; i++) { System.out.println("main thread"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Instantiates a new Rel_Trans
public ReleasesAndTransfers(String inputValue) { super(inputValue); this.inputValue = inputValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void newTrans(Transaction t) {\r\n\t\ttransList = new ArrayList<Transaction>();\r\n\t\tload();\r\n\t\ttransList.add(t);\r\n\t\tsave();\r\n\t}", "public void createTransaction(Transaction trans);", "public Transaction() {\n }", "TR createTR();", "public MessageTran() {\n\t}", "protected A...
[ "0.60576105", "0.5984981", "0.58913493", "0.5888482", "0.58621234", "0.58082205", "0.5742188", "0.5733282", "0.5728181", "0.57205117", "0.5718915", "0.5646241", "0.56453115", "0.5586388", "0.5562887", "0.5547146", "0.5519394", "0.5505714", "0.54914415", "0.54596084", "0.54584...
0.0
-1
/ mRecyclerView = (RecyclerView) findViewById(R.id.lvHomeScreenItems); mStaggeredLayoutManager = new StaggeredGridLayoutManager(1, StaggeredGridLayoutManager.VERTICAL); mStaggeredLayoutManager.setSpanCount(2); mStaggeredLayoutManager.setGapStrategy(StaggeredGridLayoutManager.GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS); mRecyclerView.setLayoutManager(mStaggeredLayoutManager); servicesListAdapter = new HeadquaterServicesListAdapter(MainActivityHeaduater.this, this); mRecyclerView.setAdapter(servicesListAdapter);
private void initUI() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void prepareRecyclerView() {\n equipmentInventoryListAdapter = new EquipmentInventoryListAdapter_v2(equipmentInventoryAvailableCallback, equipmentInventoryMissingCallback);\n GridLayoutManager layoutManager = new GridLayoutManager(getContext(), 2);\n binding.equipmentInventoryList.setL...
[ "0.72804564", "0.71187395", "0.6906648", "0.67923146", "0.67737675", "0.6647099", "0.6620735", "0.6614298", "0.65885216", "0.65762925", "0.65385973", "0.6534779", "0.6487897", "0.6481832", "0.647838", "0.64712876", "0.6464729", "0.64547706", "0.64280224", "0.6422018", "0.6419...
0.0
-1
Creates new form ScrFontImportDialog
public ScrFontImportDialog(DictCore _core) { super(_core); this.setModal(true); initComponents(); setupListeners(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n btnOk = new PButton();\n btnCancel = new PButton();\n jPanel1 = ne...
[ "0.64042383", "0.6329574", "0.5972513", "0.5971015", "0.587654", "0.576847", "0.57553566", "0.5694297", "0.56896704", "0.5628767", "0.5624444", "0.5619728", "0.55883664", "0.55868894", "0.5565202", "0.554991", "0.552911", "0.5525291", "0.5523363", "0.55050164", "0.55012524", ...
0.72904134
0
Generates a special JFileChooser that accounts for the awfulness of the Windows Fonts folder
public JFileChooser getWinCaseJFileChooser() { return new JFileChooser() { JDialog curDialog = null; boolean alreadyRun = false; @Override protected JDialog createDialog(Component parent) throws HeadlessException { curDialog = super.createDialog(parent); return curDialog; } @Override public void setCurrentDirectory(File dir) { super.setCurrentDirectory(dir); if (dir != null && dir.getAbsolutePath().endsWith(System.getenv("windir") + "\\Fonts") && curDialog != null && !alreadyRun) { alreadyRun = true; var winFonts = new ScrWinFontFolderSelector(core, PolyGlot.getPolyGlot().getRootWindow()); curDialog.setVisible(false); winFonts.pack(); winFonts.setModal(true); winFonts.setVisible(true); winFonts.toFront(); File result = winFonts.getSeletedFont(); this.setSelectedFile(result); if (result == null) { this.cancelSelection(); } else { this.approveSelection(); } curDialog.dispose(); } } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "private static JFileChooser createFileChooser() {\n final JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new java.io.File(\".\"));\n fc.setDialogTitle(\"...
[ "0.64641166", "0.61709017", "0.59431577", "0.58943313", "0.5858381", "0.5760524", "0.5755132", "0.57418686", "0.5700015", "0.56716096", "0.56668687", "0.56319875", "0.55886245", "0.55531484", "0.55524224", "0.55070937", "0.55031955", "0.54967356", "0.54543996", "0.54441005", ...
0.76754993
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); btnOk = new PButton(); btnCancel = new PButton(); jPanel1 = new javax.swing.JPanel(); txtFontLocation = new PTextField(core, true, "Font File"); btnSelectFont = new PButton(); jLabel1 = new PLabel("Font Size"); txtFontSize = new PTextField(core, true, ""); txtDemoText = new PTextField(core, false, ""); rdoConlang = new javax.swing.JRadioButton(); rdoLocal = new javax.swing.JRadioButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Select Font to Import"); btnOk.setText("OK"); btnOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnOkActionPerformed(evt); } }); btnCancel.setText("Cancel"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); txtFontLocation.setEditable(false); btnSelectFont.setText("Select Font"); btnSelectFont.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSelectFontActionPerformed(evt); } }); jLabel1.setText("Font Size"); txtDemoText.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtDemoText.setText("Demo Text"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(txtFontLocation) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSelectFont)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtFontSize, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))) .addComponent(txtDemoText)) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtFontLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnSelectFont)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtFontSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtDemoText, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE) .addContainerGap()) ); buttonGroup1.add(rdoConlang); rdoConlang.setSelected(true); rdoConlang.setText("ConLang Font"); buttonGroup1.add(rdoLocal); rdoLocal.setText("Local Font"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(rdoConlang, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(rdoLocal) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE) .addComponent(btnCancel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnOk) .addContainerGap()) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnOk) .addComponent(btnCancel) .addComponent(rdoConlang) .addComponent(rdoLocal)) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73206544", "0.7291311", "0.7291311", "0.7291311", "0.7286492", "0.7249181", "0.7213362", "0.72085494", "0.71965617", "0.7190475", "0.7184897", "0.7159234", "0.71483016", "0.7094075", "0.7081491", "0.70579433", "0.6987627", "0.69776064", "0.69552463", "0.69549114", "0.69453...
0.0
-1
all input from user that was login modelandview type
@GetMapping("home") public ModelAndView All(){ List<DataEntity> allData = dataService.findAll(); ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("list.html"); modelAndView.addObject("datas",allData); return modelAndView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String ...
[ "0.6511231", "0.6406841", "0.61240655", "0.6108113", "0.60853773", "0.606439", "0.6057547", "0.6053369", "0.6046653", "0.60252374", "0.59947646", "0.5986606", "0.5968319", "0.5942285", "0.5942033", "0.5918829", "0.59184897", "0.5891746", "0.5875478", "0.58704937", "0.5856226"...
0.0
-1
Invokes generateEntries method on the financial document.
@Override public boolean generateGeneralLedgerPendingEntries(GeneralLedgerPendingEntrySource glpeSource) { boolean success = true; // we must clear them first before creating new ones glpeSource.clearAnyGeneralLedgerPendingEntries(); if (LOG.isDebugEnabled()) { LOG.debug("deleting existing gl pending ledger entries for document " + glpeSource.getDocumentHeader().getDocumentNumber()); } delete(glpeSource.getDocumentHeader().getDocumentNumber()); if (LOG.isDebugEnabled()) { LOG.debug("generating gl pending ledger entries for document " + glpeSource.getDocumentHeader().getDocumentNumber()); } GeneralLedgerPendingEntrySequenceHelper sequenceHelper = new GeneralLedgerPendingEntrySequenceHelper(); for (GeneralLedgerPendingEntrySourceDetail glpeSourceDetail : glpeSource.getGeneralLedgerPendingEntrySourceDetails()) { success &= glpeSource.generateGeneralLedgerPendingEntries(glpeSourceDetail, sequenceHelper); sequenceHelper.increment(); } // doc specific pending entries generation success &= glpeSource.generateDocumentGeneralLedgerPendingEntries(sequenceHelper); return success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void parseEntries(final Document doc,\n final ContentCleaner contentCleaner,\n final Resource.Builder resource);", "public void generate(GenCtx ctx)\n\t throws GenesisError\n\t{\n\t\tif((getEntries() == null) || (ge...
[ "0.5312107", "0.5229475", "0.49825695", "0.49561757", "0.49477056", "0.49431968", "0.4936097", "0.4902768", "0.487354", "0.48447353", "0.48224026", "0.47232637", "0.4713097", "0.47075686", "0.47054744", "0.4694891", "0.46725106", "0.46560037", "0.46376172", "0.46318787", "0.4...
0.0
-1
This populates an empty GeneralLedgerPendingEntry explicitEntry object instance with default values.
@Override public void populateExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySource glpeSource, GeneralLedgerPendingEntrySourceDetail glpeSourceDetail, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry explicitEntry) { if (LOG.isDebugEnabled()) { LOG.debug("populateExplicitGeneralLedgerPendingEntry(AccountingDocument, AccountingLine, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - start"); } explicitEntry.setFinancialDocumentTypeCode(glpeSource.getFinancialDocumentTypeCode()); explicitEntry.setVersionNumber(new Long(1)); explicitEntry.setTransactionLedgerEntrySequenceNumber(new Integer(sequenceHelper.getSequenceCounter())); Timestamp transactionTimestamp = new Timestamp(dateTimeService.getCurrentDate().getTime()); explicitEntry.setTransactionDate(new java.sql.Date(transactionTimestamp.getTime())); explicitEntry.setTransactionEntryProcessedTs(transactionTimestamp); explicitEntry.setAccountNumber(glpeSourceDetail.getAccountNumber()); // JHK: changing implementation to work around object refresh issues // if (ObjectUtils.isNull(glpeSourceDetail.getAccount()) && getPersistenceStructureService().hasReference(glpeSourceDetail.getClass(), OLEPropertyConstants.ACCOUNT)) { // glpeSourceDetail.refreshReferenceObject(OLEPropertyConstants.ACCOUNT); // } // // if ((ObjectUtils.isNull(glpeSourceDetail.getObjectCode()) || StringUtils.isBlank(glpeSourceDetail.getObjectCode().getFinancialObjectTypeCode())) && getPersistenceStructureService().hasReference(glpeSourceDetail.getClass(), OLEPropertyConstants.OBJECT_CODE)) { // glpeSourceDetail.refreshReferenceObject(OLEPropertyConstants.OBJECT_CODE); // } Account account = SpringContext.getBean(AccountService.class).getByPrimaryIdWithCaching(glpeSourceDetail.getChartOfAccountsCode(), glpeSourceDetail.getAccountNumber()); ObjectCode objectCode = SpringContext.getBean(ObjectCodeService.class).getByPrimaryIdWithCaching( glpeSource.getPostingYear(), glpeSourceDetail.getChartOfAccountsCode(), glpeSourceDetail.getFinancialObjectCode()); if ( account != null ) { if ( LOG.isDebugEnabled() ) { LOG.debug("GLPE: Testing to see what should be used for SF Object Code: " + glpeSourceDetail ); } String sufficientFundsCode = account.getAccountSufficientFundsCode(); if (StringUtils.isBlank(sufficientFundsCode)) { sufficientFundsCode = OLEConstants.SF_TYPE_NO_CHECKING; if ( LOG.isDebugEnabled() ) { LOG.debug("Code was blank on the account - using 'N'"); } } if (objectCode != null) { if ( LOG.isDebugEnabled() ) { LOG.debug("SF Code / Object: " + sufficientFundsCode + " / " + objectCode); } String sifficientFundsObjectCode = SpringContext.getBean(SufficientFundsService.class).getSufficientFundsObjectCode(objectCode, sufficientFundsCode); explicitEntry.setAcctSufficientFundsFinObjCd(sifficientFundsObjectCode); } else { LOG.debug( "Object code object was null, skipping setting of SF object field." ); } } if ( objectCode != null ) { explicitEntry.setFinancialObjectTypeCode(objectCode.getFinancialObjectTypeCode()); } explicitEntry.setFinancialDocumentApprovedCode(GENERAL_LEDGER_PENDING_ENTRY_CODE.NO); explicitEntry.setTransactionEncumbranceUpdateCode(BLANK_SPACE); explicitEntry.setFinancialBalanceTypeCode(BALANCE_TYPE_ACTUAL); // this is the default that most documents use explicitEntry.setChartOfAccountsCode(glpeSourceDetail.getChartOfAccountsCode()); explicitEntry.setTransactionDebitCreditCode(glpeSource.isDebit(glpeSourceDetail) ? OLEConstants.GL_DEBIT_CODE : OLEConstants.GL_CREDIT_CODE); explicitEntry.setFinancialSystemOriginationCode(SpringContext.getBean(HomeOriginationService.class).getHomeOrigination().getFinSystemHomeOriginationCode()); explicitEntry.setDocumentNumber(glpeSourceDetail.getDocumentNumber()); explicitEntry.setFinancialObjectCode(glpeSourceDetail.getFinancialObjectCode()); explicitEntry.setOrganizationDocumentNumber(glpeSource.getDocumentHeader().getOrganizationDocumentNumber()); explicitEntry.setOrganizationReferenceId(glpeSourceDetail.getOrganizationReferenceId()); explicitEntry.setProjectCode(getEntryValue(glpeSourceDetail.getProjectCode(), GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankProjectCode())); explicitEntry.setReferenceFinancialDocumentNumber(getEntryValue(glpeSourceDetail.getReferenceNumber(), BLANK_SPACE)); explicitEntry.setReferenceFinancialDocumentTypeCode(getEntryValue(glpeSourceDetail.getReferenceTypeCode(), BLANK_SPACE)); explicitEntry.setReferenceFinancialSystemOriginationCode(getEntryValue(glpeSourceDetail.getReferenceOriginCode(), BLANK_SPACE)); explicitEntry.setSubAccountNumber(getEntryValue(glpeSourceDetail.getSubAccountNumber(), GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankSubAccountNumber())); explicitEntry.setFinancialSubObjectCode(getEntryValue(glpeSourceDetail.getFinancialSubObjectCode(), GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialSubObjectCode())); explicitEntry.setTransactionEntryOffsetIndicator(false); explicitEntry.setTransactionLedgerEntryAmount(glpeSource.getGeneralLedgerPendingEntryAmountForDetail(glpeSourceDetail)); explicitEntry.setTransactionLedgerEntryDescription(getEntryValue(glpeSourceDetail.getFinancialDocumentLineDescription(), glpeSource.getDocumentHeader().getDocumentDescription())); explicitEntry.setUniversityFiscalPeriodCode(null); // null here, is assigned during batch or in specific document rule // classes explicitEntry.setUniversityFiscalYear(glpeSource.getPostingYear()); // TODO wait for core budget year data structures to be put in place // explicitEntry.setBudgetYear(accountingLine.getBudgetYear()); // explicitEntry.setBudgetYearFundingSourceCode(budgetYearFundingSourceCode); if (LOG.isDebugEnabled()) { LOG.debug("populateExplicitGeneralLedgerPendingEntry(AccountingDocument, AccountingLine, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - end"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void customizeExpenseExplicitGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail postable, GeneralLedgerPendingEntry explicitEntry) {\n // set the encumbrance update code Set to ENCUMB_UPDT_REFERENCE_DOCUMENT_CD (\"R\")\n explicitEntry.setTransactionEncumbranceUpdateCode(KFSCons...
[ "0.6042733", "0.60248935", "0.53622264", "0.5305953", "0.522499", "0.5140796", "0.50931984", "0.5088142", "0.5025319", "0.49527708", "0.49375138", "0.48763147", "0.48516607", "0.48273376", "0.4790399", "0.47501123", "0.47363567", "0.46982718", "0.46907285", "0.46738082", "0.4...
0.59085846
2
Convenience method to build a GLPE without a generalLedgerPendingEntrySourceDetail
@Override public GeneralLedgerPendingEntry buildGeneralLedgerPendingEntry(GeneralLedgerPostingDocument document, Account account, ObjectCode objectCode, String subAccountNumber, String subObjectCode, String organizationReferenceId, String projectCode, String referenceNumber, String referenceTypeCode, String referenceOriginCode, String description, boolean isDebit, KualiDecimal amount, GeneralLedgerPendingEntrySequenceHelper sequenceHelper) { if (LOG.isDebugEnabled()) { LOG.debug("populateExplicitGeneralLedgerPendingEntry(AccountingDocument, AccountingLine, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - start"); } GeneralLedgerPendingEntry explicitEntry = new GeneralLedgerPendingEntry(); explicitEntry.setFinancialDocumentTypeCode(document.getDocumentHeader().getWorkflowDocument().getDocumentTypeName()); explicitEntry.setVersionNumber(new Long(1)); explicitEntry.setTransactionLedgerEntrySequenceNumber(new Integer(sequenceHelper.getSequenceCounter())); Timestamp transactionTimestamp = new Timestamp(dateTimeService.getCurrentDate().getTime()); explicitEntry.setTransactionDate(new java.sql.Date(transactionTimestamp.getTime())); explicitEntry.setTransactionEntryProcessedTs(transactionTimestamp); explicitEntry.setAccountNumber(account.getAccountNumber()); if (account.getAccountSufficientFundsCode() == null) { account.setAccountSufficientFundsCode(OLEConstants.SF_TYPE_NO_CHECKING); } // FIXME! - inject the sufficient funds service explicitEntry.setAcctSufficientFundsFinObjCd(SpringContext.getBean(SufficientFundsService.class).getSufficientFundsObjectCode(objectCode, account.getAccountSufficientFundsCode())); explicitEntry.setFinancialDocumentApprovedCode(GENERAL_LEDGER_PENDING_ENTRY_CODE.NO); explicitEntry.setTransactionEncumbranceUpdateCode(BLANK_SPACE); explicitEntry.setFinancialBalanceTypeCode(BALANCE_TYPE_ACTUAL); // this is the default that most documents use explicitEntry.setChartOfAccountsCode(account.getChartOfAccountsCode()); explicitEntry.setTransactionDebitCreditCode(isDebit ? OLEConstants.GL_DEBIT_CODE : OLEConstants.GL_CREDIT_CODE); // FIXME! - Home origination service should be injected and the result cached - this value never changes explicitEntry.setFinancialSystemOriginationCode(SpringContext.getBean(HomeOriginationService.class).getHomeOrigination().getFinSystemHomeOriginationCode()); explicitEntry.setDocumentNumber(document.getDocumentNumber()); explicitEntry.setFinancialObjectCode(objectCode.getFinancialObjectCode()); explicitEntry.setFinancialObjectTypeCode(objectCode.getFinancialObjectTypeCode()); explicitEntry.setOrganizationDocumentNumber(document.getDocumentHeader().getOrganizationDocumentNumber()); explicitEntry.setOrganizationReferenceId(organizationReferenceId); explicitEntry.setProjectCode(getEntryValue(projectCode, GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankProjectCode())); explicitEntry.setReferenceFinancialDocumentNumber(getEntryValue(referenceNumber, BLANK_SPACE)); explicitEntry.setReferenceFinancialDocumentTypeCode(getEntryValue(referenceTypeCode, BLANK_SPACE)); explicitEntry.setReferenceFinancialSystemOriginationCode(getEntryValue(referenceOriginCode, BLANK_SPACE)); explicitEntry.setSubAccountNumber(getEntryValue(subAccountNumber, GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankSubAccountNumber())); explicitEntry.setFinancialSubObjectCode(getEntryValue(subObjectCode, GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialSubObjectCode())); explicitEntry.setTransactionEntryOffsetIndicator(false); explicitEntry.setTransactionLedgerEntryAmount(amount); explicitEntry.setTransactionLedgerEntryDescription(getEntryValue(description, document.getDocumentHeader().getDocumentDescription())); explicitEntry.setUniversityFiscalPeriodCode(null); // null here, is assigned during batch or in specific document rule // classes explicitEntry.setUniversityFiscalYear(document.getPostingYear()); if (LOG.isDebugEnabled()) { LOG.debug("populateExplicitGeneralLedgerPendingEntry(AccountingDocument, AccountingLine, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - end"); } return explicitEntry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<GeneralLedgerPendingEntrySourceDetail> getGeneralLedgerPendingEntrySourceDetails() {\n if (TemConstants.TravelAuthorizationStatusCodeKeys.CLOSED.equals(getAppDocStatus()) || TemConstants.TravelAuthorizationStatusCodeKeys.CANCELLED.equals(getAppDocStatus())) {\n return n...
[ "0.60733086", "0.5942489", "0.583965", "0.5181163", "0.50438887", "0.49303126", "0.48556232", "0.4769985", "0.46935886", "0.4651949", "0.459205", "0.45889604", "0.45770246", "0.455606", "0.45423198", "0.44921446", "0.44915378", "0.4465589", "0.44490042", "0.44464582", "0.4439...
0.48047018
7
This populates an GeneralLedgerPendingEntry offsetEntry object instance with values that differ from the values supplied in the explicit entry that it was cloned from. Note that the entries do not contain BOs now.
@Override public boolean populateOffsetGeneralLedgerPendingEntry(Integer universityFiscalYear, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry offsetEntry) { LOG.debug("populateOffsetGeneralLedgerPendingEntry(Integer, GeneralLedgerPendingEntry, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - start"); boolean success = true; // lookup offset object info // FIXME! - OffsetDefinitionService should be injected (and probably cache the result) OffsetDefinition offsetDefinition = SpringContext.getBean(OffsetDefinitionService.class).getByPrimaryId(universityFiscalYear, explicitEntry.getChartOfAccountsCode(), explicitEntry.getFinancialDocumentTypeCode(), explicitEntry.getFinancialBalanceTypeCode()); if (ObjectUtils.isNull(offsetDefinition)) { success = false; GlobalVariables.getMessageMap().putError(OLEConstants.GENERAL_LEDGER_PENDING_ENTRIES_TAB_ERRORS, OLEKeyConstants.ERROR_DOCUMENT_NO_OFFSET_DEFINITION, universityFiscalYear.toString(), explicitEntry.getChartOfAccountsCode(), explicitEntry.getFinancialDocumentTypeCode(), explicitEntry.getFinancialBalanceTypeCode()); } else { // FIXME! - FlexibleOffsetAccountService should be injected OffsetAccount flexibleOffsetAccount = SpringContext.getBean(FlexibleOffsetAccountService.class).getByPrimaryIdIfEnabled(explicitEntry.getChartOfAccountsCode(), explicitEntry.getAccountNumber(), getOffsetFinancialObjectCode(offsetDefinition)); flexOffsetAccountIfNecessary(flexibleOffsetAccount, offsetEntry); } // update offset entry fields that are different from the explicit entry that it was created from offsetEntry.setTransactionLedgerEntrySequenceNumber(new Integer(sequenceHelper.getSequenceCounter())); offsetEntry.setTransactionDebitCreditCode(getOffsetEntryDebitCreditCode(explicitEntry)); String offsetObjectCode = getOffsetFinancialObjectCode(offsetDefinition); offsetEntry.setFinancialObjectCode(offsetObjectCode); if (offsetObjectCode.equals(AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectCode())) { // no BO, so punt offsetEntry.setAcctSufficientFundsFinObjCd(AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectCode()); } else { // Need current ObjectCode and Account BOs to get sufficient funds code. (Entries originally have no BOs.) // todo: private or other methods to get these BOs, instead of using the entry and leaving some BOs filled in? offsetEntry.refreshReferenceObject(OLEPropertyConstants.FINANCIAL_OBJECT); offsetEntry.refreshReferenceObject(OLEPropertyConstants.ACCOUNT); ObjectCode financialObject = offsetEntry.getFinancialObject(); // The ObjectCode reference may be invalid because a flexible offset account changed its chart code. if (ObjectUtils.isNull(financialObject)) { throw new RuntimeException("offset object code " + offsetEntry.getUniversityFiscalYear() + "-" + offsetEntry.getChartOfAccountsCode() + "-" + offsetEntry.getFinancialObjectCode()); } // FIXME! - inject the sufficient funds service Account account = SpringContext.getBean(AccountService.class).getByPrimaryIdWithCaching(offsetEntry.getChartOfAccountsCode(), offsetEntry.getAccountNumber()); offsetEntry.setAcctSufficientFundsFinObjCd(SpringContext.getBean(SufficientFundsService.class).getSufficientFundsObjectCode(financialObject, account.getAccountSufficientFundsCode())); } offsetEntry.setFinancialObjectTypeCode(getOffsetFinancialObjectTypeCode(offsetDefinition)); offsetEntry.setFinancialSubObjectCode(OLEConstants.getDashFinancialSubObjectCode()); offsetEntry.setTransactionEntryOffsetIndicator(true); offsetEntry.setTransactionLedgerEntryDescription(OLEConstants.GL_PE_OFFSET_STRING); offsetEntry.setFinancialSystemOriginationCode(explicitEntry.getFinancialSystemOriginationCode()); LOG.debug("populateOffsetGeneralLedgerPendingEntry(Integer, GeneralLedgerPendingEntry, GeneralLedgerPendingEntrySequenceHelper, GeneralLedgerPendingEntry) - end"); return success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean populateBankOffsetGeneralLedgerPendingEntry(Bank bank, KualiDecimal depositAmount, GeneralLedgerPostingDocument financialDocument, Integer universityFiscalYear, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry bankOffsetEntry, String errorPropertyNam...
[ "0.5933122", "0.5256285", "0.50618947", "0.5043535", "0.502304", "0.50204617", "0.4999538", "0.49190846", "0.48098797", "0.4741578", "0.46587694", "0.459135", "0.45851818", "0.45773736", "0.45468786", "0.45061952", "0.44986555", "0.431724", "0.4284516", "0.4273324", "0.424485...
0.6346437
0
Applies the given flexible offset account to the given offset entry. Does nothing if flexibleOffsetAccount is null or its COA and account number are the same as the offset entry's.
protected void flexOffsetAccountIfNecessary(OffsetAccount flexibleOffsetAccount, GeneralLedgerPendingEntry offsetEntry) { LOG.debug("flexOffsetAccountIfNecessary(OffsetAccount, GeneralLedgerPendingEntry) - start"); if (flexibleOffsetAccount == null) { LOG.debug("flexOffsetAccountIfNecessary(OffsetAccount, GeneralLedgerPendingEntry) - end"); return; // They are not required and may also be disabled. } String flexCoa = flexibleOffsetAccount.getFinancialOffsetChartOfAccountCode(); String flexAccountNumber = flexibleOffsetAccount.getFinancialOffsetAccountNumber(); if (flexCoa.equals(offsetEntry.getChartOfAccountsCode()) && flexAccountNumber.equals(offsetEntry.getAccountNumber())) { LOG.debug("flexOffsetAccountIfNecessary(OffsetAccount, GeneralLedgerPendingEntry) - end"); return; // no change, so leave sub-account as is } if (ObjectUtils.isNull(flexibleOffsetAccount.getFinancialOffsetAccount())) { throw new RuntimeException("flexible offset account " + flexCoa + "-" + flexAccountNumber); } offsetEntry.setChartOfAccountsCode(flexCoa); offsetEntry.setAccountNumber(flexAccountNumber); // COA and account number are part of the sub-account's key, so the original sub-account would be invalid. offsetEntry.setSubAccountNumber(OLEConstants.getDashSubAccountNumber()); LOG.debug("flexOffsetAccountIfNecessary(OffsetAccount, GeneralLedgerPendingEntry) - end"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean populateOffsetGeneralLedgerPendingEntry(Integer universityFiscalYear, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry offsetEntry) {\r\n LOG.debug(\"populateOffsetGeneralLedgerPendingEntry(Integer, Gen...
[ "0.52514833", "0.5220807", "0.5042635", "0.4813239", "0.46002996", "0.44438642", "0.44362548", "0.4415926", "0.43362543", "0.43362543", "0.43362543", "0.43362543", "0.43362543", "0.43229485", "0.43148297", "0.43121964", "0.43038082", "0.42990208", "0.4277122", "0.42697212", "...
0.7470402
0
Helper method that determines the offset entry's financial object type code.
protected String getOffsetFinancialObjectTypeCode(OffsetDefinition offsetDefinition) { LOG.debug("getOffsetFinancialObjectTypeCode(OffsetDefinition) - start"); if (null != offsetDefinition && null != offsetDefinition.getFinancialObject()) { String returnString = getEntryValue(offsetDefinition.getFinancialObject().getFinancialObjectTypeCode(), AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectType()); LOG.debug("getOffsetFinancialObjectTypeCode(OffsetDefinition) - end"); return returnString; } else { LOG.debug("getOffsetFinancialObjectTypeCode(OffsetDefinition) - end"); return AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectType(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getOffsetFinancialObjectCode(OffsetDefinition offsetDefinition) {\r\n LOG.debug(\"getOffsetFinancialObjectCode(OffsetDefinition) - start\");\r\n\r\n if (null != offsetDefinition) {\r\n String returnString = getEntryValue(offsetDefinition.getFinancialObjectCode(), Accountin...
[ "0.6262004", "0.5646674", "0.55611527", "0.5445463", "0.54430634", "0.54167205", "0.5375788", "0.535397", "0.53222555", "0.5286831", "0.5286531", "0.5255815", "0.52484965", "0.5233254", "0.52288884", "0.5221852", "0.52040017", "0.51804817", "0.517944", "0.5160357", "0.5150381...
0.7085112
0
Helper method that determines the debit/credit code for the offset entry. If the explicit was a debit, the offset is a credit. Otherwise, it's opposite.
protected String getOffsetEntryDebitCreditCode(GeneralLedgerPendingEntry explicitEntry) { LOG.debug("getOffsetEntryDebitCreditCode(GeneralLedgerPendingEntry) - start"); String offsetDebitCreditCode = OLEConstants.GL_BUDGET_CODE; if (OLEConstants.GL_DEBIT_CODE.equals(explicitEntry.getTransactionDebitCreditCode())) { offsetDebitCreditCode = OLEConstants.GL_CREDIT_CODE; } else if (OLEConstants.GL_CREDIT_CODE.equals(explicitEntry.getTransactionDebitCreditCode())) { offsetDebitCreditCode = OLEConstants.GL_DEBIT_CODE; } LOG.debug("getOffsetEntryDebitCreditCode(GeneralLedgerPendingEntry) - end"); return offsetDebitCreditCode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean customizeExpenseOffsetGeneralLedgerPendingEntry(GeneralLedgerPendingEntrySourceDetail accountingLine, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntry offsetEntry) {\n boolean customized = false;\n // set the encumbrance update code\n offsetEntry.setTransaction...
[ "0.5379014", "0.51590466", "0.51302856", "0.50505275", "0.50505275", "0.50409347", "0.5003986", "0.49408385", "0.49401155", "0.4872867", "0.48652035", "0.4864684", "0.48560092", "0.4848088", "0.48214665", "0.48023808", "0.47931287", "0.479155", "0.47743574", "0.4725332", "0.4...
0.6731505
0
Helper method that determines the offset entry's financial object code.
protected String getOffsetFinancialObjectCode(OffsetDefinition offsetDefinition) { LOG.debug("getOffsetFinancialObjectCode(OffsetDefinition) - start"); if (null != offsetDefinition) { String returnString = getEntryValue(offsetDefinition.getFinancialObjectCode(), AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectCode()); LOG.debug("getOffsetFinancialObjectCode(OffsetDefinition) - end"); return returnString; } else { LOG.debug("getOffsetFinancialObjectCode(OffsetDefinition) - end"); return AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.getBlankFinancialObjectCode(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getOffsetFinancialObjectTypeCode(OffsetDefinition offsetDefinition) {\r\n LOG.debug(\"getOffsetFinancialObjectTypeCode(OffsetDefinition) - start\");\r\n\r\n if (null != offsetDefinition && null != offsetDefinition.getFinancialObject()) {\r\n String returnString = getEntryV...
[ "0.72249365", "0.524225", "0.52128834", "0.5116492", "0.505125", "0.49803478", "0.49746373", "0.4949754", "0.4933651", "0.4933651", "0.4885066", "0.48701674", "0.4868271", "0.48439386", "0.4801484", "0.47951308", "0.47822252", "0.47637245", "0.47509927", "0.47503474", "0.4750...
0.7390203
0
This populates an empty GeneralLedgerPendingEntry instance with default values for a bank offset. A global error will be posted as a sideeffect if the given bank has not defined the necessary bank offset relations.
@Override public boolean populateBankOffsetGeneralLedgerPendingEntry(Bank bank, KualiDecimal depositAmount, GeneralLedgerPostingDocument financialDocument, Integer universityFiscalYear, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry bankOffsetEntry, String errorPropertyName) { bankOffsetEntry.setFinancialDocumentTypeCode(dataDictionaryService.getDocumentTypeNameByClass(financialDocument.getClass())); bankOffsetEntry.setVersionNumber(1L); bankOffsetEntry.setTransactionLedgerEntrySequenceNumber(sequenceHelper.getSequenceCounter()); Timestamp transactionTimestamp = new Timestamp(dateTimeService.getCurrentDate().getTime()); bankOffsetEntry.setTransactionDate(new java.sql.Date(transactionTimestamp.getTime())); bankOffsetEntry.setTransactionEntryProcessedTs(transactionTimestamp); Account cashOffsetAccount = bank.getCashOffsetAccount(); if (ObjectUtils.isNull(cashOffsetAccount)) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_NO_ACCOUNT, new String[] { bank.getBankCode() }); return false; } if (!cashOffsetAccount.isActive()) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_ACCOUNT_CLOSED, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber() }); return false; } if (cashOffsetAccount.isExpired()) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_ACCOUNT_EXPIRED, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber() }); return false; } bankOffsetEntry.setChartOfAccountsCode(bank.getCashOffsetFinancialChartOfAccountCode()); bankOffsetEntry.setAccountNumber(bank.getCashOffsetAccountNumber()); bankOffsetEntry.setFinancialDocumentApprovedCode(AccountingDocumentRuleBaseConstants.GENERAL_LEDGER_PENDING_ENTRY_CODE.NO); bankOffsetEntry.setTransactionEncumbranceUpdateCode(BLANK_SPACE); bankOffsetEntry.setFinancialBalanceTypeCode(BALANCE_TYPE_ACTUAL); bankOffsetEntry.setTransactionDebitCreditCode(depositAmount.isPositive() ? GL_DEBIT_CODE : GL_CREDIT_CODE); bankOffsetEntry.setFinancialSystemOriginationCode(SpringContext.getBean(HomeOriginationService.class).getHomeOrigination().getFinSystemHomeOriginationCode()); bankOffsetEntry.setDocumentNumber(financialDocument.getDocumentNumber()); ObjectCode cashOffsetObject = bank.getCashOffsetObject(); if (ObjectUtils.isNull(cashOffsetObject)) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_NO_OBJECT_CODE, new String[] { bank.getBankCode() }); return false; } if (!cashOffsetObject.isFinancialObjectActiveCode()) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_INACTIVE_OBJECT_CODE, new String[] { bank.getBankCode(), cashOffsetObject.getFinancialObjectCode() }); return false; } bankOffsetEntry.setFinancialObjectCode(bank.getCashOffsetObjectCode()); bankOffsetEntry.setFinancialObjectTypeCode(bank.getCashOffsetObject().getFinancialObjectTypeCode()); bankOffsetEntry.setOrganizationDocumentNumber(financialDocument.getDocumentHeader().getOrganizationDocumentNumber()); bankOffsetEntry.setOrganizationReferenceId(null); bankOffsetEntry.setProjectCode(OLEConstants.getDashProjectCode()); bankOffsetEntry.setReferenceFinancialDocumentNumber(null); bankOffsetEntry.setReferenceFinancialDocumentTypeCode(null); bankOffsetEntry.setReferenceFinancialSystemOriginationCode(null); if (StringUtils.isBlank(bank.getCashOffsetSubAccountNumber())) { bankOffsetEntry.setSubAccountNumber(OLEConstants.getDashSubAccountNumber()); } else { SubAccount cashOffsetSubAccount = bank.getCashOffsetSubAccount(); if (ObjectUtils.isNull(cashOffsetSubAccount)) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_NONEXISTENT_SUB_ACCOUNT, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber(), bank.getCashOffsetSubAccountNumber() }); return false; } if (!cashOffsetSubAccount.isActive()) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_INACTIVE_SUB_ACCOUNT, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber(), bank.getCashOffsetSubAccountNumber() }); return false; } bankOffsetEntry.setSubAccountNumber(bank.getCashOffsetSubAccountNumber()); } if (StringUtils.isBlank(bank.getCashOffsetSubObjectCode())) { bankOffsetEntry.setFinancialSubObjectCode(OLEConstants.getDashFinancialSubObjectCode()); } else { SubObjectCode cashOffsetSubObject = bank.getCashOffsetSubObject(); if (ObjectUtils.isNull(cashOffsetSubObject)) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_NONEXISTENT_SUB_OBJ, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber(), cashOffsetObject.getFinancialObjectCode(), bank.getCashOffsetSubObjectCode() }); return false; } if (!cashOffsetSubObject.isActive()) { GlobalVariables.getMessageMap().putError(errorPropertyName, OLEKeyConstants.ERROR_DOCUMENT_BANK_OFFSET_INACTIVE_SUB_OBJ, new String[] { bank.getBankCode(), cashOffsetAccount.getChartOfAccountsCode(), cashOffsetAccount.getAccountNumber(), cashOffsetObject.getFinancialObjectCode(), bank.getCashOffsetSubObjectCode() }); return false; } bankOffsetEntry.setFinancialSubObjectCode(bank.getCashOffsetSubObjectCode()); } bankOffsetEntry.setTransactionEntryOffsetIndicator(true); bankOffsetEntry.setTransactionLedgerEntryAmount(depositAmount.abs()); bankOffsetEntry.setUniversityFiscalPeriodCode(null); // null here, is assigned during batch or in specific document rule bankOffsetEntry.setUniversityFiscalYear(universityFiscalYear); bankOffsetEntry.setAcctSufficientFundsFinObjCd(SpringContext.getBean(SufficientFundsService.class).getSufficientFundsObjectCode(cashOffsetObject, cashOffsetAccount.getAccountSufficientFundsCode())); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean populateOffsetGeneralLedgerPendingEntry(Integer universityFiscalYear, GeneralLedgerPendingEntry explicitEntry, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry offsetEntry) {\r\n LOG.debug(\"populateOffsetGeneralLedgerPendingEntry(Integer, Gen...
[ "0.5207308", "0.4839529", "0.4724846", "0.45580214", "0.44502005", "0.44341928", "0.42697856", "0.42570338", "0.42438847", "0.41903865", "0.41634572", "0.4153732", "0.4134986", "0.41212842", "0.41023234", "0.40995446", "0.40955183", "0.4076363", "0.4071987", "0.4067591", "0.4...
0.60415775
0
A helper method that checks the intended target value for null and empty strings. If the intended target value is not null or an empty string, it returns that value, ohterwise, it returns a backup value.
protected final String getEntryValue(String targetValue, String backupValue) { LOG.debug("getEntryValue(String, String) - start"); if (StringUtils.isNotBlank(targetValue)) { LOG.debug("getEntryValue(String, String) - end"); return targetValue; } else { LOG.debug("getEntryValue(String, String) - end"); return backupValue; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }", "private String notNull(String value) {\n return value != null ? value : \"\";\n }", "public static String nullifyNullOrEmptyString(final String targetString) {\n\t\...
[ "0.6868952", "0.6695492", "0.62881345", "0.62702763", "0.62293816", "0.6135573", "0.6122234", "0.59667575", "0.5834451", "0.57918465", "0.5754925", "0.5716994", "0.5619774", "0.56194496", "0.55981433", "0.5548523", "0.55454034", "0.5528293", "0.55038786", "0.55023426", "0.549...
0.6522772
2
Determines if the given GeneralLedgerPendingEntry represents offsets to cash
@Override public boolean isOffsetToCash(GeneralLedgerPendingEntry generalLedgerPendingEntry) { if (generalLedgerPendingEntry.isTransactionEntryOffsetIndicator()) { final Chart entryChart = chartService.getByPrimaryId(generalLedgerPendingEntry.getChartOfAccountsCode()); if (!ObjectUtils.isNull(entryChart)) { return (entryChart.getFinancialCashObjectCode().equals(generalLedgerPendingEntry.getFinancialObjectCode())); } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean isAdvancePendingEntry(GeneralLedgerPendingEntry glpe) {\n return StringUtils.equals(glpe.getFinancialDocumentTypeCode(), TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_CHECK_ACH_DOCUMENT) ||\n StringUtils.equals(glpe.getFinancialDocumentTypeCode(),TemConstants.TravelDocTyp...
[ "0.61480737", "0.6080642", "0.57617664", "0.5716544", "0.5652916", "0.5622824", "0.5580762", "0.5580762", "0.5324912", "0.53126395", "0.5265239", "0.5030349", "0.5023153", "0.4997074", "0.49729288", "0.4894272", "0.48881477", "0.48776343", "0.4852416", "0.48515484", "0.479286...
0.8145369
0
Adds up the amounts of all cash to offset GeneralLedgerPendingEntry records on the given AccountingDocument
@Override public KualiDecimal getOffsetToCashAmount(GeneralLedgerPostingDocument glPostingDocument) { KualiDecimal total = KualiDecimal.ZERO; for (GeneralLedgerPendingEntry glpe : glPostingDocument.getGeneralLedgerPendingEntries()) { if (isOffsetToCash(glpe)) { if (glpe.getTransactionDebitCreditCode().equals(OLEConstants.GL_DEBIT_CODE)) { total = total.subtract(glpe.getTransactionLedgerEntryAmount()); } else if (glpe.getTransactionDebitCreditCode().equals(OLEConstants.GL_CREDIT_CODE)) { total = total.add(glpe.getTransactionLedgerEntryAmount()); } } } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean populateBankOffsetGeneralLedgerPendingEntry(Bank bank, KualiDecimal depositAmount, GeneralLedgerPostingDocument financialDocument, Integer universityFiscalYear, GeneralLedgerPendingEntrySequenceHelper sequenceHelper, GeneralLedgerPendingEntry bankOffsetEntry, String errorPropertyNam...
[ "0.5650064", "0.5501847", "0.5447507", "0.53453094", "0.5293409", "0.52778286", "0.5276502", "0.52498484", "0.5216417", "0.5175547", "0.5163367", "0.5093844", "0.5078773", "0.507046", "0.5053748", "0.50158453", "0.49992305", "0.4930865", "0.4916729", "0.49108183", "0.4905432"...
0.6624612
0
Sets the dateTimeService attribute value.
public void setDateTimeService(DateTimeService dateTimeService) { this.dateTimeService = dateTimeService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setDateTimeService(DateTimeService dateTimeService) {\n this.dateTimeService = dateTimeService;\n }", "public void setDateTimeService(DateTimeService dateTimeService) {\n this.dateTimeService = dateTimeService;\n }", "public void setServiceDate(java.util.Date valu...
[ "0.8017464", "0.80103606", "0.7470607", "0.64824694", "0.64531326", "0.63757056", "0.62238556", "0.6181437", "0.6059833", "0.6005546", "0.5972837", "0.5948452", "0.589163", "0.58551824", "0.5840023", "0.5838993", "0.5827087", "0.5713932", "0.5706457", "0.5685129", "0.5663389"...
0.80777436
1
Sets the dataDictionaryService attribute value.
public void setDataDictionaryService(DataDictionaryService dataDictionaryService) { this.dataDictionaryService = dataDictionaryService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDictionaryService(DictionaryService dictionaryService)\n {\n this.dictionaryService = dictionaryService;\n }", "protected void setDictionaryService(DictionaryService dictionaryService) {\n this.dictionaryService = dictionaryService;\n }", "public void setDictionaryService(Dictio...
[ "0.7569086", "0.7550022", "0.74356717", "0.69974446", "0.6960954", "0.61527115", "0.60701704", "0.5983529", "0.59207994", "0.5668495", "0.56395704", "0.5584873", "0.54972357", "0.54599744", "0.5441806", "0.543805", "0.5406341", "0.5375883", "0.53732854", "0.53491914", "0.5338...
0.8668193
1
Gets the persistenceStructureService attribute.
public PersistenceStructureService getPersistenceStructureService() { return persistenceStructureService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected PersistenceStructureService getPersistenceStructureService() {\r\n return persistenceStructureService;\r\n }", "public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService) {\r\n this.persistenceStructureService = persistenceStructureService;\r\n ...
[ "0.81898516", "0.6484296", "0.6484296", "0.59280753", "0.59179467", "0.57467526", "0.57229155", "0.567982", "0.5675727", "0.56650454", "0.564237", "0.5585304", "0.5531877", "0.54989755", "0.5497005", "0.54041564", "0.5388179", "0.5388179", "0.5388179", "0.5388179", "0.5387400...
0.83483964
0
Sets the persistenceStructureService attribute value.
public void setPersistenceStructureService(PersistenceStructureService persistenceStructureService) { this.persistenceStructureService = persistenceStructureService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PersistenceStructureService getPersistenceStructureService() {\r\n return persistenceStructureService;\r\n }", "protected PersistenceStructureService getPersistenceStructureService() {\r\n return persistenceStructureService;\r\n }", "public void setJpaService(JpaService jpaService) {...
[ "0.6736326", "0.6625347", "0.60928243", "0.56557906", "0.5497474", "0.53895384", "0.53722596", "0.5363984", "0.5294209", "0.52938586", "0.52938586", "0.527444", "0.5228697", "0.5225678", "0.5200982", "0.5184394", "0.51739264", "0.51739264", "0.51739264", "0.5136691", "0.51340...
0.8198085
1
M\u00e9todo para obtener lista de companias
public Collection<CompaniaDTO> findObtenerListaCompanias() throws ERPException{ return this.companiaGestor.obtenerListaCompanias(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Companhia> getCompanhiasDoJogador() {\r\n return companhiasDoJogador;\r\n }", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "public List<Company> getAllCompanies() {\n\t\t \n\t List<Company> listOfCompanies = new ArrayList<Company>();\n\n\t Cursor cursor = mDa...
[ "0.71326727", "0.70127845", "0.6979504", "0.69024646", "0.6856783", "0.67888594", "0.6690912", "0.66842383", "0.66708696", "0.66607714", "0.6643606", "0.6616362", "0.6607562", "0.6560822", "0.6538644", "0.65044254", "0.64595765", "0.6454893", "0.6440989", "0.643433", "0.63826...
0.71377355
0
M\u00e9todo para obtener la compania por codigo enviado como parametro
public CompaniaDTO findObtenerListaCompaniasByCodigo(Integer codigoCompania) throws ERPException{ return this.companiaGestor.obtenerListaCompaniasByCodigo(codigoCompania); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCodigo_pcom();", "public abstract java.lang.String getCod_tecnico();", "String getCodiceFiscale();", "@Override\r\n\tprotected String requestText() {\n\t\tActualizarCompromisoRequest actualizarCompromisoRequest = new ActualizarCompromisoRequest();\r\n\t\tactualizarCompromisoRequest...
[ "0.6488934", "0.6469187", "0.64530015", "0.6319791", "0.61855674", "0.6124716", "0.60118395", "0.5943967", "0.57687896", "0.5756652", "0.5726359", "0.57062095", "0.5687211", "0.5679843", "0.5660562", "0.56460434", "0.56278634", "0.56278634", "0.56005865", "0.5590699", "0.5550...
0.51951176
70
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0, 1].
public static void main(String[] args){ // To hold the nums input [array] int nums [] = {2,7,11,15}; // input two {1, 3, 4, 11, 15, 7, 2}; // To hold target (expected sum of two nums) int target = 9; //To return indices which is array[0,1] // (If we don't print Arrays.toString we will be given garbage) System.out.println(Arrays.toString(twoSums(nums, target))); sumArray(nums); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] twoSum(int[] nums, int target) {\n\n HashMap<Integer, Integer> complementsByIndex = new HashMap<>();\n for (int i = 0; i < nums.length; i++) {\n if (complementsByIndex.containsKey(nums[i])) {\n Integer complementIndex = complementsByIndex.get(nums[i]);\n ...
[ "0.80798066", "0.8040267", "0.80055094", "0.80045295", "0.7962237", "0.79551786", "0.79428387", "0.79240584", "0.7899459", "0.7849059", "0.78481203", "0.7838252", "0.78314507", "0.78271157", "0.778379", "0.7776053", "0.7775229", "0.7758638", "0.771141", "0.7680525", "0.767332...
0.750775
29
TwoSums method static because we are returning a specific type
static int [] twoSums(int [] num, int targets) { // Equation with variables: nums[i] + nums[j] == target (return the indices) // Visualize an array indices {0,1,2,3,4} my i = nums.length // Visualize another array J = i+1 {1,2,3,4}; // nums [2,7,11,15]; // NOTE: Visualize J = i + 1; When i=0, j will start at 1 // The if statement is used to check if the condition matches the target for(int i=0; i < num.length; i++) { for(int j= i+1; j<num.length; j++) { if (num[i] + num[j] == targets){ // return new int array because the return type is Array.toString return new int [] {i,j}; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T sum(T first, T second);", "public static void twoSum(Node x, Node y) {\n int lenX = x.getlength();\n int lenY = y.getlength();\n int lenLong = Math.max(lenX, lenY);\n Node result = new Node();\n int carryOn = 0;\n\n for (int i = 0; i < lenLong; i++) {\n ...
[ "0.72139096", "0.6509262", "0.62968135", "0.62600183", "0.6243692", "0.6213093", "0.6175903", "0.6125646", "0.61039466", "0.6089102", "0.60531473", "0.6031503", "0.60266703", "0.6024829", "0.60227686", "0.60157937", "0.5987858", "0.59776783", "0.59544843", "0.5947024", "0.592...
0.5367894
93
public final String SOAP_ADDRESS = "
public MySOAPCallActivity() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSoapUrl() {\n return this.soapUrl;\n }", "String getSoapProcessorDN();", "public String getCAdxWebServiceXmlCCAddress() {\n\t\treturn null;\n\t}", "public void writeSoapMessage(SOAPMessage message);", "@WebService(targetNamespace = \"http://www.nortel.com/soa/oi/cct/AddressService\", n...
[ "0.61142135", "0.60393494", "0.58830357", "0.5877427", "0.5825248", "0.5818153", "0.577067", "0.57656294", "0.5747186", "0.5743672", "0.5728442", "0.5727225", "0.57227", "0.57031274", "0.5699576", "0.5680068", "0.5675962", "0.5675962", "0.5663586", "0.5660253", "0.5653924", ...
0.55135727
37
New Methods 1. RegisterDevice0
public String RegisterDevice0(String DeviceCode) { SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,RegisterDevice0); PropertyInfo pi=new PropertyInfo(); pi.setName("DeviceCode"); pi.setValue(DeviceCode); pi.setType(String.class); request.addProperty(pi); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS); Object response=null; try { httpTransport.call(SOA_RegisterDevice0, envelope); response = envelope.getResponse(); } catch (Exception exception) { response=exception.toString(); } return response.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onRegistered(Context context, String registrationId) {\n Log.i(TAG, \"Device registered: regId = \" + registrationId);\n UnityPlayer.UnitySendMessage(\"ECPNManager\",\"RegisterAndroidDevice\",registrationId);\n }", "Device createDevice();", "private synchronized v...
[ "0.6704558", "0.64388955", "0.63747185", "0.6347271", "0.6279255", "0.62566364", "0.61715823", "0.61335194", "0.61105925", "0.6026957", "0.6025573", "0.60194707", "0.59924966", "0.5933987", "0.59311736", "0.5929746", "0.58772635", "0.5870208", "0.5844826", "0.5838202", "0.581...
0.64866793
1
TEST Email em1 = new Email("Jan","Kowalski"); emailAccountOptions(em1);
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EmailSender()\r\n {\r\n this(\"javaemailsender\" ,\"sendtestemail\");\r\n }", "public Email(){}", "private EMailUtil() {}", "public Email() {\n\t}", "public static void main(String[] args) {\n\t\tEmail email1 = new Email(\"Monis\",\"Saeed\");\r\n\t\temail1.SetAlternateEmail(\"monissaeed3...
[ "0.69016784", "0.6703801", "0.66908133", "0.6662557", "0.66198754", "0.65847945", "0.6577467", "0.6543049", "0.6537901", "0.6534214", "0.6496041", "0.64417493", "0.6427513", "0.62993795", "0.6274411", "0.62573093", "0.62573093", "0.6253892", "0.6235465", "0.6190251", "0.61738...
0.0
-1
Get the cursor, positioned to the corresponding row in the result set
@Override public void onItemClick(AdapterView<?> listView, View view, int position, long id) { Cursor cursor = (Cursor) listView.getItemAtPosition(position); switch(position){ case 0: Intent caseZero = new Intent(view.getContext(), ChapterOneActivity.class); startActivityForResult(caseZero, 0); break; case 1: Intent caseOne = new Intent(view.getContext(), ChapterTwoActivity.class); startActivityForResult(caseOne, 0); break; case 2: Intent caseTwo = new Intent(view.getContext(), ChapterThreeActivity.class); startActivityForResult(caseTwo, 0); break; case 3: Intent caseThree = new Intent(view.getContext(), ChapterFourActivity.class); startActivityForResult(caseThree, 0); break; case 4: Intent caseFour = new Intent(view.getContext(), ChapterFiveActivity.class); startActivityForResult(caseFour, 0); break; case 5: Intent caseFive = new Intent(view.getContext(), ChapterSixActivity.class); startActivityForResult(caseFive, 0); break; case 6: Intent caseSix = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseSix, 0); break; case 7: Intent caseSeven = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseSeven, 0); break; case 8: Intent caseEight = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseEight, 0); break; case 9: Intent caseNine = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseNine, 0); break; case 10: Intent caseTen = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseTen, 0); break; case 11: Intent caseElev = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseElev, 0); break; case 12: Intent caseTwel = new Intent(view.getContext(), DownloadPDFActivity.class); startActivityForResult(caseTwel, 0); break; } // Get the state's capital from this row in the database. String countryCode = cursor.getString(cursor.getColumnIndexOrThrow("chapter")); Toast.makeText(getApplicationContext(), countryCode, Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract long getCursor();", "public int getCursor() { return curs; }", "@Nullable\n\tprotected abstract T readCursor(ResultSet rs, int currentRow) throws SQLException;", "public int getCurrentRowNumber() throws SQLException {\n/* 174 */ return this.currentPositionInEntireResult + 1;\n/* */ ...
[ "0.7476776", "0.73659617", "0.7129292", "0.6982205", "0.68917495", "0.6825945", "0.6775825", "0.6769757", "0.6629953", "0.6587987", "0.6539544", "0.6498297", "0.6470159", "0.6437232", "0.64214367", "0.63793766", "0.6363279", "0.6356981", "0.63544303", "0.6333752", "0.6304166"...
0.0
-1
Get the Studentized range statistic, q for k groups and df degrees of freedom. The value is looked up in a table for &alpha; = 0.05 values of the Studentized range statistic. The value for k is the number of groups being compared. Only k = 2 to 10 is supported. The table values were transcribed from
private static double getQ( int k, int df ) { final double[][] TAB = { { 1, 17.969, 26.976, 32.819, 37.082, 40.408, 43.119, 45.397, 47.357, 49.071 }, { 2, 6.085, 8.331, 9.798, 10.881, 11.734, 12.435, 13.027, 13.539, 13.988 }, { 3, 4.501, 5.910, 6.825, 7.502, 8.037, 8.478, 8.852, 9.177, 9.462 }, { 4, 3.926, 5.040, 5.757, 6.287, 6.706, 7.053, 7.347, 7.602, 7.826 }, { 5, 3.635, 4.602, 5.218, 5.673, 6.033, 6.330, 6.582, 6.801, 6.995 }, { 6, 3.460, 4.339, 4.896, 5.305, 5.628, 5.895, 6.122, 6.319, 6.493 }, { 7, 3.344, 4.165, 4.681, 5.060, 5.359, 5.606, 5.815, 5.997, 6.158 }, { 8, 3.261, 4.041, 4.529, 4.886, 5.167, 5.399, 5.596, 5.767, 5.918 }, { 9, 3.199, 3.948, 4.415, 4.755, 5.024, 5.244, 5.432, 5.595, 5.738 }, { 10, 3.151, 3.877, 4.327, 4.654, 4.912, 5.124, 5.304, 5.460, 5.598 }, { 11, 3.113, 3.820, 4.256, 4.574, 4.823, 5.028, 5.202, 5.353, 5.486 }, { 12, 3.081, 3.773, 4.199, 4.508, 4.750, 4.950, 5.119, 5.265, 5.395 }, { 13, 3.055, 3.734, 4.151, 4.453, 4.690, 4.884, 5.049, 5.192, 5.318 }, { 14, 3.033, 3.701, 4.111, 4.407, 4.639, 4.829, 4.990, 5.130, 5.253 }, { 15, 3.014, 3.673, 4.076, 4.367, 4.595, 4.782, 4.940, 5.077, 5.198 }, { 16, 2.998, 3.649, 4.046, 4.333, 4.557, 4.741, 4.896, 5.031, 5.150 }, { 17, 2.984, 3.628, 4.020, 4.303, 4.524, 4.705, 4.858, 4.991, 5.108 }, { 18, 2.971, 3.609, 3.997, 4.276, 4.494, 4.673, 4.824, 4.955, 5.071 }, { 19, 2.960, 3.593, 3.977, 4.253, 4.468, 4.645, 4.794, 4.924, 5.037 }, { 20, 2.950, 3.578, 3.958, 4.232, 4.445, 4.620, 4.768, 4.895, 5.008 }, { 21, 2.941, 3.565, 3.942, 4.213, 4.424, 4.597, 4.743, 4.870, 4.981 }, { 22, 2.933, 3.553, 3.927, 4.196, 4.405, 4.577, 4.722, 4.847, 4.957 }, { 23, 2.926, 3.542, 3.914, 4.180, 4.388, 4.558, 4.702, 4.826, 4.935 }, { 24, 2.919, 3.532, 3.901, 4.166, 4.373, 4.541, 4.684, 4.807, 4.915 }, { 25, 2.913, 3.523, 3.890, 4.153, 4.358, 4.526, 4.667, 4.789, 4.897 }, { 26, 2.907, 3.514, 3.880, 4.141, 4.345, 4.511, 4.652, 4.773, 4.880 }, { 27, 2.902, 3.506, 3.870, 4.130, 4.333, 4.498, 4.638, 4.758, 4.864 }, { 28, 2.897, 3.499, 3.861, 4.120, 4.322, 4.486, 4.625, 4.745, 4.850 }, { 29, 2.892, 3.493, 3.853, 4.111, 4.311, 4.475, 4.613, 4.732, 4.837 }, { 30, 2.888, 3.486, 3.845, 4.102, 4.301, 4.464, 4.601, 4.720, 4.824 }, { 31, 2.884, 3.481, 3.838, 4.094, 4.292, 4.454, 4.591, 4.709, 4.812 }, { 32, 2.881, 3.475, 3.832, 4.086, 4.284, 4.445, 4.581, 4.698, 4.802 }, { 33, 2.877, 3.470, 3.825, 4.079, 4.276, 4.436, 4.572, 4.689, 4.791 }, { 34, 2.874, 3.465, 3.820, 4.072, 4.268, 4.428, 4.563, 4.680, 4.782 }, { 35, 2.871, 3.461, 3.814, 4.066, 4.261, 4.421, 4.555, 4.671, 4.773 }, { 36, 2.868, 3.457, 3.809, 4.060, 4.255, 4.414, 4.547, 4.663, 4.764 }, { 37, 2.865, 3.453, 3.804, 4.054, 4.249, 4.407, 4.540, 4.655, 4.756 }, { 38, 2.863, 3.449, 3.799, 4.049, 4.243, 4.400, 4.533, 4.648, 4.749 }, { 39, 2.861, 3.445, 3.795, 4.044, 4.237, 4.394, 4.527, 4.641, 4.741 }, { 40, 2.858, 3.442, 3.791, 4.039, 4.232, 4.388, 4.521, 4.634, 4.735 }, { 48, 2.843, 3.420, 3.764, 4.008, 4.197, 4.351, 4.481, 4.592, 4.690 }, { 60, 2.829, 3.399, 3.737, 3.977, 4.163, 4.314, 4.441, 4.550, 4.646 }, { 80, 2.814, 3.377, 3.711, 3.947, 4.129, 4.277, 4.402, 4.509, 4.603 }, { 120, 2.800, 3.356, 3.685, 3.917, 4.096, 4.241, 4.363, 4.468, 4.560 }, { 240, 2.786, 3.335, 3.659, 3.887, 4.063, 4.205, 4.324, 4.427, 4.517 }, { 999, 2.772, 3.314, 3.633, 3.858, 4.030, 4.170, 4.286, 4.387, 4.474 } }; if ( k < 2 || k > 10 ) { return -1.0; // not supported } int j = k - 1; // index for correct column (e.g., k = 3 is column 2) // find pertinent row in table int i = 0; while ( i < TAB.length && df > TAB[i][0] ) { ++i; } // don't allow i to go past end of table if ( i == TAB.length ) { --i; } return TAB[i][j]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Range<Double> getConfidenceInterval(double dAlpha, String sKey){\n\t\t\n\t\tdouble d1;\n\t\tdouble d2;\n\t\t\n\t\td1 = mapEDF.get(sKey).inverseCumulativeProbability((1.-dAlpha)/2.);\n\t\td2 = mapEDF.get(sKey).inverseCumulativeProbability(1.-(1.-dAlpha)/2.);\n\t\treturn Range.closed(d1, d2);\n\t}", "publi...
[ "0.50001705", "0.48552275", "0.48412013", "0.4630446", "0.46278644", "0.46265376", "0.45645958", "0.45382294", "0.45051724", "0.44745383", "0.44647363", "0.44581613", "0.4453104", "0.44501087", "0.44308174", "0.44226164", "0.43594784", "0.43526828", "0.4350136", "0.43462032", ...
0.6527968
0
This was broken and using only FIELD_PRIMARYASSOCTYPEQNAME The field was also not indexed correctly. We do both for backward compatability ...
protected Query createAssocTypeQNameQuery(String queryText) throws SAXPathException { BooleanQuery booleanQuery = new BooleanQuery(); XPathReader reader = new XPathReader(); LuceneXPathHandler handler = new LuceneXPathHandler(); handler.setNamespacePrefixResolver(namespacePrefixResolver); handler.setDictionaryService(dictionaryService); reader.setXPathHandler(handler); reader.parse("//" + queryText); PathQuery query = handler.getQuery(); query.setPathField(FIELD_PATH); query.setQnameField(FIELD_ASSOCTYPEQNAME); booleanQuery.add(query, Occur.SHOULD); booleanQuery.add(createPrimaryAssocTypeQNameQuery(queryText), Occur.SHOULD); return booleanQuery; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildPKIndex() {\n // index PK\n Collection<DbAttribute> pks = getResolver()\n .getEntity()\n .getDbEntity()\n .getPrimaryKeys();\n this.idIndices = new int[pks.size()];\n\n // this is needed for checking that a valid index is ma...
[ "0.57775337", "0.56527233", "0.55657357", "0.54580146", "0.54580146", "0.54557663", "0.53608906", "0.5348371", "0.5330435", "0.5302613", "0.52940655", "0.5273176", "0.52684975", "0.5262552", "0.5254177", "0.5252211", "0.5249351", "0.5235653", "0.5228618", "0.52132225", "0.519...
0.0
-1
Use the analyzer to get all the tokens, and then build a TermQuery, PhraseQuery, or noth TODO: Untokenised columns with functions require special handling
private Query getFieldQueryImpl(String field, String queryText, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException { if (luceneFunction != LuceneFunction.FIELD) { throw new UnsupportedOperationException("Field queries are not supported on lucene functions (UPPER, LOWER, etc)"); } boolean requiresMLTokenDuplication = false; String testText = queryText; String localeString = null; if (field.startsWith(PROPERTY_FIELD_PREFIX)) { if ((queryText.length() > 0) && (queryText.charAt(0) == '\u0000')) { int position = queryText.indexOf("\u0000", 1); testText = queryText.substring(position + 1); requiresMLTokenDuplication = true; localeString = queryText.substring(1, position); } } TokenStream source = getAnalyzer().tokenStream(field, new StringReader(queryText), analysisMode); ArrayList<org.apache.lucene.analysis.Token> list = new ArrayList<org.apache.lucene.analysis.Token>(); org.apache.lucene.analysis.Token reusableToken = new org.apache.lucene.analysis.Token(); org.apache.lucene.analysis.Token nextToken; int positionCount = 0; boolean severalTokensAtSamePosition = false; while (true) { try { nextToken = source.next(reusableToken); } catch (IOException e) { nextToken = null; } if (nextToken == null) break; list.add((org.apache.lucene.analysis.Token) nextToken.clone()); if (nextToken.getPositionIncrement() != 0) positionCount += nextToken.getPositionIncrement(); else severalTokensAtSamePosition = true; } try { source.close(); } catch (IOException e) { // ignore } // add any alpha numeric wildcards that have been missed // Fixes most stop word and wild card issues for (int index = 0; index < testText.length(); index++) { char current = testText.charAt(index); if ((current == '*') || (current == '?')) { StringBuilder pre = new StringBuilder(10); if (index > 0) { for (int i = index - 1; i >= 0; i--) { char c = testText.charAt(i); if (Character.isLetterOrDigit(c)) { boolean found = false; for (int j = 0; j < list.size(); j++) { org.apache.lucene.analysis.Token test = list.get(j); if ((test.startOffset() <= i) && (i <= test.endOffset())) { found = true; break; } } if (found) { break; } else { pre.insert(0, c); } } } if (pre.length() > 0) { // Add new token followed by * not given by the tokeniser org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index - pre.length(), index); newToken.setTermBuffer(pre.toString()); newToken.setType("ALPHANUM"); if (requiresMLTokenDuplication) { Locale locale = I18NUtil.parseLocale(localeString); MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters .getMlAnalaysisMode(); MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode); Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken); if (it != null) { int count = 0; while (it.hasNext()) { list.add(it.next()); count++; if (count > 1) { severalTokensAtSamePosition = true; } } } } // content else { list.add(newToken); } } } StringBuilder post = new StringBuilder(10); if (index > 0) { for (int i = index + 1; i < testText.length(); i++) { char c = testText.charAt(i); if (Character.isLetterOrDigit(c)) { boolean found = false; for (int j = 0; j < list.size(); j++) { org.apache.lucene.analysis.Token test = list.get(j); if ((test.startOffset() <= i) && (i <= test.endOffset())) { found = true; break; } } if (found) { break; } else { post.append(c); } } } if (post.length() > 0) { // Add new token followed by * not given by the tokeniser org.apache.lucene.analysis.Token newToken = new org.apache.lucene.analysis.Token(index + 1, index + 1 + post.length()); newToken.setTermBuffer(post.toString()); newToken.setType("ALPHANUM"); if (requiresMLTokenDuplication) { Locale locale = I18NUtil.parseLocale(localeString); MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters .getMlAnalaysisMode(); MLTokenDuplicator duplicator = new MLTokenDuplicator(locale, mlAnalysisMode); Iterator<org.apache.lucene.analysis.Token> it = duplicator.buildIterator(newToken); if (it != null) { int count = 0; while (it.hasNext()) { list.add(it.next()); count++; if (count > 1) { severalTokensAtSamePosition = true; } } } } // content else { list.add(newToken); } } } } } Collections.sort(list, new Comparator<org.apache.lucene.analysis.Token>() { public int compare(Token o1, Token o2) { int dif = o1.startOffset() - o2.startOffset(); if (dif != 0) { return dif; } else { return o2.getPositionIncrement() - o1.getPositionIncrement(); } } }); // Combined * and ? based strings - should redo the tokeniser // Assume we only string together tokens for the same position int max = 0; int current = 0; for (org.apache.lucene.analysis.Token c : list) { if (c.getPositionIncrement() == 0) { current++; } else { if (current > max) { max = current; } current = 0; } } if (current > max) { max = current; } ArrayList<org.apache.lucene.analysis.Token> fixed = new ArrayList<org.apache.lucene.analysis.Token>(); for (int repeat = 0; repeat <= max; repeat++) { org.apache.lucene.analysis.Token replace = null; current = 0; for (org.apache.lucene.analysis.Token c : list) { if (c.getPositionIncrement() == 0) { current++; } else { current = 0; } if (current == repeat) { if (replace == null) { StringBuilder prefix = new StringBuilder(); for (int i = c.startOffset() - 1; i >= 0; i--) { char test = testText.charAt(i); if ((test == '*') || (test == '?')) { prefix.insert(0, test); } else { break; } } String pre = prefix.toString(); if (requiresMLTokenDuplication) { String termText = new String(c.termBuffer(), 0, c.termLength()); int position = termText.indexOf("}"); String language = termText.substring(0, position + 1); String token = termText.substring(position + 1); replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset()); replace.setTermBuffer(language + pre + token); replace.setType(c.type()); replace.setPositionIncrement(c.getPositionIncrement()); } else { String termText = new String(c.termBuffer(), 0, c.termLength()); replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset()); replace.setTermBuffer(pre + termText); replace.setType(c.type()); replace.setPositionIncrement(c.getPositionIncrement()); } } else { StringBuilder prefix = new StringBuilder(); StringBuilder postfix = new StringBuilder(); StringBuilder builder = prefix; for (int i = c.startOffset() - 1; i >= replace.endOffset(); i--) { char test = testText.charAt(i); if ((test == '*') || (test == '?')) { builder.insert(0, test); } else { builder = postfix; postfix.setLength(0); } } String pre = prefix.toString(); String post = postfix.toString(); // Does it bridge? if ((pre.length() > 0) && (replace.endOffset() + pre.length()) == c.startOffset()) { String termText = new String(c.termBuffer(), 0, c.termLength()); if (requiresMLTokenDuplication) { int position = termText.indexOf("}"); @SuppressWarnings("unused") String language = termText.substring(0, position + 1); String token = termText.substring(position + 1); int oldPositionIncrement = replace.getPositionIncrement(); String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength()); replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset()); replace.setTermBuffer(replaceTermText + pre + token); replace.setType(replace.type()); replace.setPositionIncrement(oldPositionIncrement); } else { int oldPositionIncrement = replace.getPositionIncrement(); String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength()); replace = new org.apache.lucene.analysis.Token(replace.startOffset(), c.endOffset()); replace.setTermBuffer(replaceTermText + pre + termText); replace.setType(replace.type()); replace.setPositionIncrement(oldPositionIncrement); } } else { String termText = new String(c.termBuffer(), 0, c.termLength()); if (requiresMLTokenDuplication) { int position = termText.indexOf("}"); String language = termText.substring(0, position + 1); String token = termText.substring(position + 1); String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength()); org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length()); last.setTermBuffer(replaceTermText + post); last.setType(replace.type()); last.setPositionIncrement(replace.getPositionIncrement()); fixed.add(last); replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset()); replace.setTermBuffer(language + pre + token); replace.setType(c.type()); replace.setPositionIncrement(c.getPositionIncrement()); } else { String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength()); org.apache.lucene.analysis.Token last = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length()); last.setTermBuffer(replaceTermText + post); last.setType(replace.type()); last.setPositionIncrement(replace.getPositionIncrement()); fixed.add(last); replace = new org.apache.lucene.analysis.Token(c.startOffset() - pre.length(), c.endOffset()); replace.setTermBuffer(pre + termText); replace.setType(c.type()); replace.setPositionIncrement(c.getPositionIncrement()); } } } } } // finish last if (replace != null) { StringBuilder postfix = new StringBuilder(); if ((replace.endOffset() >= 0) && (replace.endOffset() < testText.length())) { for (int i = replace.endOffset(); i < testText.length(); i++) { char test = testText.charAt(i); if ((test == '*') || (test == '?')) { postfix.append(test); } else { break; } } } String post = postfix.toString(); int oldPositionIncrement = replace.getPositionIncrement(); String replaceTermText = new String(replace.termBuffer(), 0, replace.termLength()); replace = new org.apache.lucene.analysis.Token(replace.startOffset(), replace.endOffset() + post.length()); replace.setTermBuffer(replaceTermText + post); replace.setType(replace.type()); replace.setPositionIncrement(oldPositionIncrement); fixed.add(replace); } } // Add in any missing words containsing * and ? // reorder by start position and increment Collections.sort(fixed, new Comparator<org.apache.lucene.analysis.Token>() { public int compare(Token o1, Token o2) { int dif = o1.startOffset() - o2.startOffset(); if (dif != 0) { return dif; } else { return o2.getPositionIncrement() - o1.getPositionIncrement(); } } }); list = fixed; if (list.size() == 0) return null; else if (list.size() == 1) { nextToken = (org.apache.lucene.analysis.Token) list.get(0); String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength()); if (termText.contains("*") || termText.contains("?")) { return newWildcardQuery(new Term(field, termText)); } else { return newTermQuery(new Term(field, termText)); } } else { if (severalTokensAtSamePosition) { if (positionCount == 1) { // no phrase query: BooleanQuery q = newBooleanQuery(true); for (int i = 0; i < list.size(); i++) { Query currentQuery; nextToken = (org.apache.lucene.analysis.Token) list.get(i); String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength()); if (termText.contains("*") || termText.contains("?")) { currentQuery = newWildcardQuery(new Term(field, termText)); } else { currentQuery = newTermQuery(new Term(field, termText)); } q.add(currentQuery, BooleanClause.Occur.SHOULD); } return q; } else { // phrase query: MultiPhraseQuery mpq = newMultiPhraseQuery(); mpq.setSlop(internalSlop); ArrayList<Term> multiTerms = new ArrayList<Term>(); int position = -1; for (int i = 0; i < list.size(); i++) { nextToken = (org.apache.lucene.analysis.Token) list.get(i); String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength()); if (nextToken.getPositionIncrement() > 0 && multiTerms.size() > 0) { if (getEnablePositionIncrements()) { mpq.add((Term[]) multiTerms.toArray(new Term[0]), position); } else { mpq.add((Term[]) multiTerms.toArray(new Term[0])); } multiTerms.clear(); } position += nextToken.getPositionIncrement(); Term term = new Term(field, termText); if ((termText != null) && (termText.contains("*") || termText.contains("?"))) { addWildcardTerms(multiTerms, term); } else { multiTerms.add(term); } } if (getEnablePositionIncrements()) { if (multiTerms.size() > 0) { mpq.add((Term[]) multiTerms.toArray(new Term[0]), position); } else { mpq.add(new Term[] { new Term(field, "\u0000") }, position); } } else { if (multiTerms.size() > 0) { mpq.add((Term[]) multiTerms.toArray(new Term[0])); } else { mpq.add(new Term[] { new Term(field, "\u0000") }); } } return mpq; } } else { MultiPhraseQuery q = new MultiPhraseQuery(); q.setSlop(internalSlop); int position = -1; for (int i = 0; i < list.size(); i++) { nextToken = (org.apache.lucene.analysis.Token) list.get(i); String termText = new String(nextToken.termBuffer(), 0, nextToken.termLength()); Term term = new Term(field, termText); if (getEnablePositionIncrements()) { position += nextToken.getPositionIncrement(); if ((termText != null) && (termText.contains("*") || termText.contains("?"))) { q.add(getMatchingTerms(field, term), position); } else { q.add(new Term[] { term }, position); } } else { if ((termText != null) && (termText.contains("*") || termText.contains("?"))) { q.add(getMatchingTerms(field, term)); } else { q.add(term); } } } return q; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String handleNonPhraseToken(String stringPart) {\r\n // Set of final terms to be used (no empty elements, right syntax of index fields)\r\n ArrayList <String> terms = new ArrayList <String> ();\r\n \r\n /** Case Index field **/\r\n if(stringPart.contains(\"[\") | ...
[ "0.6075572", "0.5864451", "0.57713", "0.57096714", "0.56522137", "0.5548785", "0.53964853", "0.5394167", "0.5389811", "0.53208405", "0.5284577", "0.5264846", "0.5242112", "0.52316946", "0.5221508", "0.5200885", "0.51975024", "0.5184313", "0.5182783", "0.51719797", "0.51714444...
0.5551928
5
TODO: Fix duplicate token generation for mltext, content and text. locale expansion here and in tokeisation > duplicates Get type info etc
private Query attributeQueryBuilder(String field, String queryText, SubQuery subQueryBuilder, AnalysisMode analysisMode, LuceneFunction luceneFunction) throws ParseException { String propertyFieldName = null; String ending = ""; if (field.endsWith(FIELD_MIMETYPE_SUFFIX)) { propertyFieldName = field.substring(1, field.length() - 9); ending = FIELD_MIMETYPE_SUFFIX; } else if (field.endsWith(FIELD_SIZE_SUFFIX)) { propertyFieldName = field.substring(1, field.length() - 5); ending = FIELD_SIZE_SUFFIX; } else if (field.endsWith(FIELD_LOCALE_SUFFIX)) { propertyFieldName = field.substring(1, field.length() - 7); ending = FIELD_LOCALE_SUFFIX; } else { propertyFieldName = field.substring(1); } String expandedFieldName; QName propertyQName; PropertyDefinition propertyDef = matchPropertyDefinition(propertyFieldName); IndexTokenisationMode tokenisationMode = IndexTokenisationMode.TRUE; if (propertyDef != null) { tokenisationMode = propertyDef.getIndexTokenisationMode(); if (tokenisationMode == null) { tokenisationMode = IndexTokenisationMode.TRUE; } expandedFieldName = PROPERTY_FIELD_PREFIX+propertyDef.getName()+ending; propertyQName = propertyDef.getName(); } else { expandedFieldName = expandAttributeFieldName(field); propertyQName = QName.createQName(propertyFieldName); } if (luceneFunction != LuceneFunction.FIELD) { if ((tokenisationMode == IndexTokenisationMode.FALSE) || (tokenisationMode == IndexTokenisationMode.BOTH)) { return functionQueryBuilder(expandedFieldName, propertyQName, propertyDef, tokenisationMode, queryText, luceneFunction); } } // Mime type if (expandedFieldName.endsWith(FIELD_MIMETYPE_SUFFIX)) { if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))) { return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); } } else if (expandedFieldName.endsWith(FIELD_SIZE_SUFFIX)) { if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))) { return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); } } else if (expandedFieldName.endsWith(FIELD_LOCALE_SUFFIX)) { if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))) { return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); } } // Already in expanded form // ML if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.MLTEXT))) { // Build a sub query for each locale and or the results together - the analysis will take care of // cross language matching for each entry BooleanQuery booleanQuery = new BooleanQuery(); MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode(); List<Locale> locales = searchParameters.getLocales(); List<Locale> expandedLocales = new ArrayList<Locale>(); for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales)) { expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false)); } for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales)) { String mlFieldName = expandedFieldName; if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE))) { { // text and ml text need locale IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode(); if ((tm != null) && (tm == IndexTokenisationMode.BOTH)) { if (locale.toString().length() == 0) { mlFieldName = mlFieldName + FIELD_NO_LOCALE_SUFFIX; } else { mlFieldName = mlFieldName + "." + locale + FIELD_SORT_SUFFIX; } } } } boolean lowercaseExpandedTerms = getLowercaseExpandedTerms(); try { switch (tokenisationMode) { case BOTH: switch (analysisMode) { default: case DEFAULT: case TOKENISE: addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName); break; case IDENTIFIER: case FUZZY: case PREFIX: case WILD: case LIKE: setLowercaseExpandedTerms(false); addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, mlFieldName); break; } break; case FALSE: setLowercaseExpandedTerms(false); addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, mlFieldName); break; case TRUE: default: switch (analysisMode) { default: case DEFAULT: case TOKENISE: case IDENTIFIER: addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName); break; case FUZZY: case PREFIX: case WILD: case LIKE: addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, mlFieldName); break; } } } finally { setLowercaseExpandedTerms(lowercaseExpandedTerms); } } return booleanQuery; } // Content else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.CONTENT))) { // Identifier request are ignored for content // Build a sub query for each locale and or the results together - // - add an explicit condition for the locale MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode(); if (mlAnalysisMode.includesAll()) { return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); } List<Locale> locales = searchParameters.getLocales(); List<Locale> expandedLocales = new ArrayList<Locale>(); for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales)) { expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, true)); } if (expandedLocales.size() > 0) { BooleanQuery booleanQuery = new BooleanQuery(); Query contentQuery = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); if (contentQuery != null) { booleanQuery.add(contentQuery, Occur.MUST); BooleanQuery subQuery = new BooleanQuery(); for (Locale locale : (expandedLocales)) { StringBuilder builder = new StringBuilder(); builder.append(expandedFieldName).append(FIELD_LOCALE_SUFFIX); String localeString = locale.toString(); if (localeString.indexOf("*") == -1) { Query localeQuery = getFieldQuery(builder.toString(), localeString); if (localeQuery != null) { subQuery.add(localeQuery, Occur.SHOULD); } else { subQuery.add(createNoMatchQuery(), Occur.SHOULD); } } else { Query localeQuery = getWildcardQuery(builder.toString(), localeString); if (localeQuery != null) { subQuery.add(localeQuery, Occur.SHOULD); } else { subQuery.add(createNoMatchQuery(), Occur.SHOULD); } } } booleanQuery.add(subQuery, Occur.MUST); } return booleanQuery; } else { Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); if (query != null) { return query; } else { return createNoMatchQuery(); } } } else if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.TEXT))) { if (propertyQName.equals(ContentModel.PROP_USER_USERNAME) || propertyQName.equals(ContentModel.PROP_USERNAME) || propertyQName.equals(ContentModel.PROP_AUTHORITY_NAME)) { return subQueryBuilder.getQuery(expandedFieldName, queryText, analysisMode, luceneFunction); } BooleanQuery booleanQuery = new BooleanQuery(); MLAnalysisMode mlAnalysisMode = searchParameters.getMlAnalaysisMode() == null ? defaultSearchMLAnalysisMode : searchParameters.getMlAnalaysisMode(); List<Locale> locales = searchParameters.getLocales(); List<Locale> expandedLocales = new ArrayList<Locale>(); for (Locale locale : (((locales == null) || (locales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : locales)) { expandedLocales.addAll(MLAnalysisMode.getLocales(mlAnalysisMode, locale, false)); } for (Locale locale : (((expandedLocales == null) || (expandedLocales.size() == 0)) ? Collections.singletonList(I18NUtil.getLocale()) : expandedLocales)) { String textFieldName = expandedFieldName; if ((tokenisationMode == IndexTokenisationMode.BOTH) && ((analysisMode == AnalysisMode.IDENTIFIER) || (analysisMode == AnalysisMode.LIKE))) { { // text and ml text need locale IndexTokenisationMode tm = propertyDef.getIndexTokenisationMode(); if ((tm != null) && (tm == IndexTokenisationMode.BOTH)) { textFieldName = textFieldName + "." + locale + FIELD_SORT_SUFFIX; } } } boolean lowercaseExpandedTerms = getLowercaseExpandedTerms(); try { switch (tokenisationMode) { case BOTH: switch (analysisMode) { default: case DEFAULT: case TOKENISE: addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, textFieldName); break; case IDENTIFIER: case FUZZY: case PREFIX: case WILD: case LIKE: setLowercaseExpandedTerms(false); addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, textFieldName); break; } break; case FALSE: setLowercaseExpandedTerms(false); addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, textFieldName); break; case TRUE: default: switch (analysisMode) { case DEFAULT: case TOKENISE: case IDENTIFIER: addLocaleSpecificTokenisedMLOrTextAttribute(queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, locale, expandedFieldName); break; case FUZZY: case PREFIX: case WILD: case LIKE: addLocaleSpecificUntokenisedMLOrTextAttribute(field, queryText, subQueryBuilder, analysisMode, luceneFunction, booleanQuery, mlAnalysisMode, locale, textFieldName); break; } break; } } finally { setLowercaseExpandedTerms(lowercaseExpandedTerms); } } return booleanQuery; } else { // Date does not support like if ((propertyDef != null) && (propertyDef.getDataType().getName().equals(DataTypeDefinition.DATETIME))) { if (analysisMode == AnalysisMode.LIKE) { throw new UnsupportedOperationException("Wild cards are not supported for the datetime type"); } } // Sort and id is only special for MLText, text, and content // Dates are not special in this case Query query = subQueryBuilder.getQuery(expandedFieldName, queryText, AnalysisMode.DEFAULT, luceneFunction); if (query != null) { return query; } else { return createNoMatchQuery(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTokens(String text) {\n int i;\n StringTokenizer sTokenizer = new StringTokenizer(text, \" \\n\", true);\n String tok;\n TokenNode node;\n String grWord = \"\\\\p{InGreek}*\";\n String enWord = \"[a-zA-Z]*\";\n String number = \"[0-9]*\";\n String prevChar = \"\";\n //...
[ "0.60981244", "0.5844344", "0.58378416", "0.5783006", "0.5761558", "0.560711", "0.55976385", "0.55507326", "0.5534363", "0.55108047", "0.55108047", "0.55108047", "0.55108047", "0.55108047", "0.5506015", "0.5496589", "0.5496589", "0.5496589", "0.5496589", "0.5496589", "0.54965...
0.0
-1
Creates new form Education
public Education() { initComponents(); setTitle("CV MAKER 1.0"); education.setBackground(new Color(0,91,124)); left.setBackground(new Color(45,12,86)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Education() {}", "public Education() {\n\t\tsuper();\n\t}", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the require...
[ "0.6764541", "0.64965785", "0.6148899", "0.6082208", "0.6043733", "0.5988943", "0.5966547", "0.59650815", "0.59149677", "0.589247", "0.5783955", "0.5757481", "0.5672343", "0.56409425", "0.5638716", "0.5635388", "0.55838156", "0.55506927", "0.552419", "0.5521848", "0.55096745"...
0.57851833
10
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { education = new javax.swing.JPanel(); left = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); f_year = new javax.swing.JTextField(); t_year = new javax.swing.JTextField(); degree = new javax.swing.JTextField(); cgpa = new javax.swing.JTextField(); addEducation = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); next1 = new javax.swing.JButton(); back = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); javax.swing.GroupLayout leftLayout = new javax.swing.GroupLayout(left); left.setLayout(leftLayout); leftLayout.setHorizontalGroup( leftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 28, Short.MAX_VALUE) ); leftLayout.setVerticalGroup( leftLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE) ); jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel1.setText("Enter Your Educational Qualifications:"); jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel2.setText("From Year:"); jLabel3.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel3.setText("To Year:"); jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel4.setText("Degree:"); jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel5.setText("Percentage/CGPA:"); t_year.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { t_yearActionPerformed(evt); } }); cgpa.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cgpaActionPerformed(evt); } }); addEducation.setBackground(new java.awt.Color(28, 77, 227)); addEducation.setText("ADD"); addEducation.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addEducationActionPerformed(evt); } }); jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 14)); // NOI18N jLabel6.setText("Institution:"); jTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTextField1ActionPerformed(evt); } }); next1.setBackground(new java.awt.Color(28, 77, 227)); next1.setText("NEXT"); next1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { next1ActionPerformed(evt); } }); back.setBackground(new java.awt.Color(28, 77, 227)); back.setText("BACK"); back.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { backActionPerformed(evt); } }); jLabel7.setFont(new java.awt.Font("NeverSayDie", 0, 36)); // NOI18N jLabel7.setForeground(new java.awt.Color(0, 191, 153)); jLabel7.setText("EDUCATION"); jSeparator1.setForeground(new java.awt.Color(28, 82, 190)); javax.swing.GroupLayout educationLayout = new javax.swing.GroupLayout(education); education.setLayout(educationLayout); educationLayout.setHorizontalGroup( educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(educationLayout.createSequentialGroup() .addComponent(left, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(educationLayout.createSequentialGroup() .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addComponent(jLabel5) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(educationLayout.createSequentialGroup() .addGap(37, 37, 37) .addComponent(back))) .addGap(57, 57, 57) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(educationLayout.createSequentialGroup() .addComponent(addEducation) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(next1)) .addComponent(t_year, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) .addComponent(degree, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) .addComponent(cgpa, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) .addComponent(f_year, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 186, Short.MAX_VALUE) .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING))) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 104, Short.MAX_VALUE)) ); educationLayout.setVerticalGroup( educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(left, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(educationLayout.createSequentialGroup() .addGap(45, 45, 45) .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(degree, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(f_year, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(t_year, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(cgpa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(76, 76, 76) .addGroup(educationLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(next1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(addEducation) .addComponent(back, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(139, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(education, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(education, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); education.getAccessibleContext().setAccessibleName("CV MAKER 1.0"); education.getAccessibleContext().setAccessibleParent(education); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
scheduler solution Timer/TimerTask SchedulerExecutorService crontab cron4j quartz Timer: Question when the timertask process more than 1 seconds what happen? crontab interval correct quartz interval correct ControlM
public static void main(String[] args) { Timer timer = new Timer(); final TimerTask task = new TimerTask() { @Override public void run() { System.out.println("=====" + System.currentTimeMillis()); try { TimeUnit.SECONDS.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } } }; timer.schedule(task, 1000, 1000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run(){\n Timer time = new Timer(); // Instantiate Timer Object\n\n ScheduledClass st = new ScheduledClass(this.job,this.shm,time,this.stopp); // Instantiate SheduledTask class\n time.schedule(st, 0, this.periodicwait); // Create Repetitively task for every 1 secs\n }", "@Test\...
[ "0.6760587", "0.6715563", "0.6625087", "0.66135263", "0.6481376", "0.6467544", "0.6458159", "0.6450817", "0.64469904", "0.642021", "0.63803124", "0.6339423", "0.6337996", "0.63222986", "0.6313632", "0.6308909", "0.6293803", "0.6268815", "0.6264696", "0.62418914", "0.62081665"...
0.0
-1
creates settings for database
public DBHelper(Context context) { super(context, Database_Name, null, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDB() {\n try {\n Statement stat = conn.createStatement();\n stat.execute(\"CREATE TABLE settings (name TEXT, state);\");\n stat.execute(\"CREATE TABLE expressions (id INTEGER PRIMARY KEY ASC AUTOINCREMENT, expression TEXT);\");\n stat.execute(\"...
[ "0.7335284", "0.69775647", "0.68844676", "0.6877171", "0.6779656", "0.6631482", "0.6511035", "0.63936794", "0.632486", "0.624325", "0.6213427", "0.61379004", "0.6117744", "0.61163", "0.6111608", "0.6103592", "0.60581213", "0.6024745", "0.5959098", "0.5939079", "0.5899212", ...
0.0
-1
creates table for database
@Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE " + Table_Name + "(ID INTEGER PRIMARY KEY AUTOINCREMENT, forename TEXT, surname TEXT, type TEXT, bedroom TEXT, furniture TEXT, date TEXT, time TEXT, rent INTEGER, notes TEXT, picture BLOB)"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create(Connection db) throws SQLException {\n if (tableName == null) {\n throw new SQLException(\"Table Name not specified\");\n }\n\n Statement st = db.createStatement();\n\n if (dbType == DatabaseUtils.POSTGRESQL) {\n if (hasSequence()) {\n st.executeUpdate(\"CREATE SEQUE...
[ "0.781428", "0.7789684", "0.7597914", "0.75636256", "0.75529623", "0.753895", "0.746614", "0.74606746", "0.7433214", "0.74118555", "0.7379695", "0.7372284", "0.733156", "0.7329742", "0.7308949", "0.72764075", "0.7266995", "0.7256236", "0.7238291", "0.7236481", "0.72315437", ...
0.0
-1