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
Create a new Rectangle with the specified length and width. Cannot be negative or exceed max int value
public Rectangle(int length, int width) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Rectangle(int length, int width)\n {\n this.length = length;\n this.width = width;\n\n }", "Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }", "public Rectangle(double width, double length) {\n\t\tthis.width = width;\n\t\tthis.length = length;\n\t}", "public Recta...
[ "0.8042752", "0.7782588", "0.7478395", "0.73861116", "0.7311035", "0.7308159", "0.7216392", "0.71689105", "0.7096978", "0.7025644", "0.69678634", "0.6947489", "0.6896244", "0.685502", "0.68427724", "0.6801628", "0.6764412", "0.66877586", "0.6669231", "0.66047543", "0.6535147"...
0.81955814
0
The length of this Rectangle.
public int length() { return length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double length()\n {\n return this.getR();\n }", "public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}", "public double getLength() {\r\n\t\treturn length;\r\n\t}", "public double getLength() {\n\t\treturn length;\n\t}", "public double get_length() {\n\t\treturn _leng...
[ "0.78912044", "0.783988", "0.77809507", "0.77574867", "0.77375394", "0.7704805", "0.7610046", "0.7586281", "0.75535053", "0.75149524", "0.75099576", "0.7470886", "0.7446349", "0.7365825", "0.7347227", "0.7317833", "0.7317833", "0.7317833", "0.7317833", "0.7317833", "0.7317833...
0.6884875
89
The width of this Rectangle.
public int width() { return width; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWidth() {\n return ((int) this.rectangle.getWidth());\n }", "public final int getWidth() {\r\n return width;\r\n }", "public int getWidth() {\n return this._width;\n }", "public int getWidth()\n\t{\n\t\treturn this._width;\n\t}", "public int getWidth() {\...
[ "0.8742477", "0.83549273", "0.83524334", "0.8327747", "0.83178884", "0.8304112", "0.82717454", "0.8269367", "0.8261633", "0.8255315", "0.8255315", "0.8255315", "0.82516897", "0.82516897", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.82484746", "0.8...
0.0
-1
The area of this Rectangle.
public int area() { area = width()*height(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double area() {\n\t\treturn width * height;\n\t}", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public double getArea() {\n\t\treturn height * length;\n\t}", "public Rectangle getArea() {\n return area;\n }", "public double area() {\n return (width * height)...
[ "0.8429908", "0.8407416", "0.8325246", "0.8304792", "0.8269528", "0.8240969", "0.8240559", "0.8210367", "0.81979877", "0.8192064", "0.8192064", "0.8173266", "0.8167483", "0.8105898", "0.80762064", "0.80729634", "0.8052404", "0.8040829", "0.80293477", "0.8029115", "0.8021094",...
0.8017618
22
The perimeter of this Rectangle.
public int perimeter() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double Perimeter() {\r\n \treturn((getLength() * 2) + (getWidth() * 2));\r\n }", "@Override\r\n\tpublic double perimeter() {\n\t\t\r\n\t\tdouble result;\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tresult = (width + height) * 2;\r\n\t\t\r\n\t\tretu...
[ "0.87249374", "0.8545247", "0.85304666", "0.8517368", "0.85048705", "0.85048705", "0.84930605", "0.8459574", "0.84461224", "0.8439824", "0.8426415", "0.8417244", "0.8390179", "0.8389253", "0.83593476", "0.83553946", "0.8347556", "0.834081", "0.83328706", "0.8324865", "0.82963...
0.8012168
38
A role that provides access to the roles which perform file system operations.
public interface IFileSysOperationsFactory { public IPathCopier getCopier(boolean requiresDeletionBeforeCreation); public IImmutableCopier getImmutableCopier(); public IPathRemover getRemover(); public IPathMover getMover(); /** * Tries to find the <code>ssh</code> executable. * * @return <code>null</code> if not found. */ public File tryFindSshExecutable(); /** * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned. */ public String tryGetIncomingRsyncExecutable(); /** * Returns the rsync executable on the incoming host, if any has been set. Otherwise <code>null</code> is returned. */ public String tryGetOutgoingRsyncExecutable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataInputStream openFile(String roleFile) throws IOException {\n return Util.open(\"/role/\" + roleFile);\n //#endif\n }", "public interface IGetFilePermission extends FileOperation\n{\n /**\n * A Map of keys (user@domain) and a string of the permission\n * type (i.e. read, wri...
[ "0.5779621", "0.5714304", "0.5657885", "0.5555128", "0.5432628", "0.5413887", "0.5355799", "0.52904373", "0.5251887", "0.5229592", "0.52131325", "0.51815194", "0.51619077", "0.51247644", "0.50764656", "0.5063212", "0.5022163", "0.500868", "0.4961124", "0.49575093", "0.4946987...
0.48206338
38
Tries to find the ssh executable.
public File tryFindSshExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void sshCommandCanBeExecuted() throws Exception {\n allowGlobalCapabilities(REGISTERED_USERS, GlobalCapability.ACCESS_DATABASE);\n\n for (String root : COMMANDS.keySet()) {\n for (String command : COMMANDS.get(root)) {\n // We can't assert that adminSshSession.hasError() is false,...
[ "0.55961174", "0.5439177", "0.53135914", "0.5253107", "0.5099289", "0.5081653", "0.5019091", "0.49773544", "0.49543253", "0.494645", "0.48824817", "0.48720512", "0.48112106", "0.4793986", "0.473281", "0.4672329", "0.46438658", "0.46001002", "0.45391396", "0.4535417", "0.45180...
0.8396596
0
Returns the rsync executable on the incoming host, if any has been set. Otherwise null is returned.
public String tryGetIncomingRsyncExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String tryGetOutgoingRsyncExecutable();", "public final String tryGetRsyncModule()\n {\n return rsyncModuleOrNull;\n }", "String getExecutable();", "public String getExecutable();", "String getExecBroker();", "public String getExecBroker() {\n Object ref = execBroker_;\n if ...
[ "0.7838855", "0.64598846", "0.56010723", "0.55707455", "0.5489765", "0.53634334", "0.53355724", "0.5251786", "0.5196852", "0.50669676", "0.50632894", "0.5044131", "0.49532145", "0.49275935", "0.48895597", "0.48474938", "0.48430324", "0.48186433", "0.47930488", "0.4762747", "0...
0.79841536
0
Returns the rsync executable on the incoming host, if any has been set. Otherwise null is returned.
public String tryGetOutgoingRsyncExecutable();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String tryGetIncomingRsyncExecutable();", "public final String tryGetRsyncModule()\n {\n return rsyncModuleOrNull;\n }", "String getExecutable();", "public String getExecutable();", "String getExecBroker();", "public String getExecBroker() {\n Object ref = execBroker_;\n if ...
[ "0.79841536", "0.64598846", "0.56010723", "0.55707455", "0.5489765", "0.53634334", "0.53355724", "0.5251786", "0.5196852", "0.50669676", "0.50632894", "0.5044131", "0.49532145", "0.49275935", "0.48895597", "0.48474938", "0.48430324", "0.48186433", "0.47930488", "0.4762747", "...
0.7838855
1
Constructor Privado, con el fin de asegurar que solo el puede llamarse unicamente una vez a el mismo
private Parser() { objetos = new ListaEnlazada(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Alojamiento() {\r\n\t}", "public AntrianPasien() {\r\n\r\n }", "private Rekenhulp()\n\t{\n\t}", "protected Asignatura()\r\n\t{}", "Constructor() {\r\n\t\t \r\n\t }", "private ControleurAcceuil(){ }", "public Pasien() {\r\n }", "public Constructor(){\n\t\t\n\t}", "public MPaciente() {\r...
[ "0.70319754", "0.70281625", "0.6880403", "0.68550086", "0.6848135", "0.68444824", "0.6811499", "0.6781153", "0.6762136", "0.6753783", "0.6730687", "0.67165875", "0.668849", "0.6650892", "0.6626655", "0.6596395", "0.6596395", "0.6583298", "0.65664667", "0.65604085", "0.6558699...
0.6170303
79
Metodo que se encarga de crear una cadena a partir de un archivo de texto plano con formato JSON
public String getData(String fileName) { StringBuffer sb = new StringBuffer(); try { BufferedReader br = new BufferedReader(new FileReader(fileName)); String line = br.readLine(); while (line != null) { sb.append(line).append("\n"); line = br.readLine(); } br.close(); } catch (IOException e) { System.out.println("NO SE"); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n ...
[ "0.71632165", "0.70820314", "0.6315054", "0.591579", "0.5773861", "0.5758687", "0.57137704", "0.5647346", "0.5643948", "0.56401736", "0.55930656", "0.5570685", "0.5554286", "0.5514121", "0.55052054", "0.5480982", "0.5472342", "0.5456862", "0.54374003", "0.5428674", "0.5406865...
0.0
-1
Add a new one throw an exception if no room.
public Node<T> add(T element) { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Failed! throw new IllegalStateException("Capacity exhausted."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toStri...
[ "0.7209965", "0.70597506", "0.7003581", "0.6810963", "0.67345774", "0.6654943", "0.65755916", "0.6498263", "0.6492583", "0.6467208", "0.6459258", "0.64236563", "0.636836", "0.6282054", "0.612167", "0.60272735", "0.60259473", "0.6019955", "0.5981055", "0.59791964", "0.596449",...
0.0
-1
Add a new one return null if no room.
public Node<T> offer(T element) { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Failed! return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addRoom(){\r\n String enteredRoomNumber = mRoomNumber.getText().toString();\r\n if (!enteredRoomNumber.equals(\"\")){\r\n RoomPojo roomPojo = new RoomPojo(enteredRoomNumber,\r\n mAllergy.getText().toString(),\r\n mPlateType.getText().toStri...
[ "0.741464", "0.70212364", "0.67620915", "0.6644688", "0.65592664", "0.65178746", "0.65147555", "0.6426298", "0.63908195", "0.63723165", "0.63667417", "0.63029426", "0.6268732", "0.6249634", "0.6249634", "0.6233701", "0.6203063", "0.6201036", "0.6190259", "0.6138488", "0.61088...
0.0
-1
Add a new one block if no room.
public Node<T> put(T element) throws InterruptedException { do { // Get a free node. Node<T> freeNode = getFree(); if (freeNode != null) { // Attach the element. return freeNode.attach(element); } else { // Block. waitForFree(); } // Forever. } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}", "public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }", ...
[ "0.6733754", "0.62764734", "0.6210819", "0.6207372", "0.6144666", "0.60849804", "0.60669845", "0.5952387", "0.59366447", "0.5906893", "0.590041", "0.5892574", "0.5781481", "0.5739341", "0.57243", "0.5716569", "0.57094204", "0.57032883", "0.568948", "0.56727344", "0.56155574",...
0.0
-1
Find the next free element and mark it not free.
private Node<T> getFree() { Node<T> freeNode = head.get(); int skipped = 0; // Stop when we hit the end of the list // ... or we successfully transit a node from free to not-free. while (skipped < capacity && !freeNode.free.compareAndSet(true, false)) { skipped += 1; freeNode = freeNode.next; } if (skipped < capacity) { // Put the head as next. // Doesn't matter if it fails. That would just mean someone else was doing the same. head.set(freeNode.next); } else { // We hit the end! No more free nodes. freeNode = null; } return freeNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int setFirstFree(final T element) {\r\n\t\tfinal int idx = firstFree;\r\n\t\tserializer.setRandomAccess(idx, element);\r\n\t\tfirstFree = getNextPointer(idx);\r\n\t\t// the pointer will be 0 if it was not unlinked before\r\n\t\tif (firstFree == 0) {\r\n\t\t\tfirstFree = idx + 1;\r\n\t\t}\r\n\t\treturn idx;...
[ "0.74297386", "0.6173443", "0.60361254", "0.59119546", "0.5855988", "0.58488774", "0.57658035", "0.57591575", "0.57420075", "0.57200617", "0.56878614", "0.5686699", "0.5678686", "0.56519514", "0.565104", "0.5643112", "0.5638657", "0.5631941", "0.5616007", "0.5612787", "0.5589...
0.67381036
1
Wait for a time when it is likely that a free slot is available.
private void waitForFree() throws InterruptedException { // Still full? while (isFull()) { // Park me 'till something is removed. block.await(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int waitUntilReady()\r\n {\r\n int rc = 0;\r\n // If a stock Item is in the Table, We do not want to start\r\n // The Lookup, if the name of the stock has not been identified.\r\n // here we will wait just a couple a second at a time.\r\n // until, the user has entered the name ...
[ "0.65803844", "0.6570488", "0.6561936", "0.6486102", "0.6433918", "0.64271766", "0.63888913", "0.6385732", "0.630306", "0.62673", "0.6207215", "0.6202387", "0.61658835", "0.60112345", "0.5988035", "0.5921008", "0.58744156", "0.5859416", "0.58573747", "0.58491147", "0.58211094...
0.675553
0
A slot has been freed up. If anyone is waiting, let the next one know.
private void signalFree() { block.release(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean freeSlot(LocationDto location ,SlotDto slot);", "public boolean endsInSlot();", "@Override\n public boolean removeSlot(int slot) {\n return availableSlots.add(slot);\n }", "public void signalFree() {\n lock.lock();\n try {\n Log.d(TAG, \"Signaling NsdMan...
[ "0.6849268", "0.66754335", "0.6654685", "0.62864584", "0.62607694", "0.62244195", "0.613942", "0.61084116", "0.6082654", "0.5903193", "0.59022546", "0.58871037", "0.576104", "0.57403773", "0.5727851", "0.57095695", "0.57046574", "0.5679706", "0.56535876", "0.56386185", "0.563...
0.64386487
3
Counts how many there are currently in the container.
public int size() { int found = 0; Node<T> it = head.get(); // Do a raw count. for (int i = 0; i < capacity; i++) { if (!it.free.get()) { found += 1; } it = it.next; } return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int count() {\n\t\treturn sizeC;\n\t}", "public long getCount() {\n return counter.get();\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();...
[ "0.70475405", "0.6912311", "0.6883217", "0.6867093", "0.6858649", "0.6828819", "0.68271637", "0.68271637", "0.6789059", "0.67785984", "0.67785984", "0.67785984", "0.6775431", "0.6775431", "0.674276", "0.6734339", "0.67343", "0.67154247", "0.6711965", "0.668018", "0.6674106", ...
0.0
-1
clear ... NOT thread safe. There is little I can guarantee from this method. It is strongly recommended that this method is only used when it is known that no other thread will be accessing the container.
public void clear() { Node<T> it = head.get(); for (int i = 0; i < capacity; i++) { // Trash the element it.element = null; // Mark it free. it.free.set(true); it = it.next; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public synchronized void clear() {\n }", "public void clear() {collection.clear();}", "public synchronized void clear()\n {\n clear(false);\n }", "public void clear() {\n\t\tcollection.clear();\n\t}", "public void clear() {\n this.collection.cle...
[ "0.7536369", "0.75221354", "0.75068945", "0.744622", "0.7394994", "0.7377753", "0.7364338", "0.72405285", "0.71871215", "0.714919", "0.7145177", "0.7140885", "0.7130695", "0.7127093", "0.7102534", "0.7099879", "0.7099879", "0.70930785", "0.7074915", "0.7060845", "0.7052673", ...
0.0
-1
Construct a node of the list
private Node() { // Start empty. element = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ExpressionList newInstance(Token token, ExpressionList o, Terminal n0, Expression node) {\n List<Expression> expressions = o.expressions;\n expressions.add(node);\n return new ExpressionList(token, expressions);\n }", "public List(E value) {\n\t\thead = new ListNode(value, null);\n\t}", ...
[ "0.6406753", "0.6364981", "0.634467", "0.6313181", "0.6287638", "0.62274534", "0.61981034", "0.6148196", "0.61291105", "0.61280924", "0.6115849", "0.6113143", "0.61125386", "0.6106577", "0.6094849", "0.6080739", "0.60717666", "0.60643405", "0.6063781", "0.60616755", "0.603988...
0.0
-1
Attach the element to a free node.
public Node<T> attach(T element) { // Sanity check. if (this.element == null) { this.element = element; } else { throw new IllegalArgumentException("There is already an element attached."); } // Useful for chaining. return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node<T> offer(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n return null;\n }\n }", "public ...
[ "0.6780226", "0.655624", "0.6154848", "0.5897974", "0.5716575", "0.56900775", "0.5660084", "0.54446924", "0.5383846", "0.5369439", "0.5362026", "0.5337238", "0.52961886", "0.5276872", "0.52585053", "0.5221719", "0.5191331", "0.5191331", "0.5185226", "0.51554996", "0.515086", ...
0.6182987
2
Detach the element from a node.
public Node<T> detach(T element) { // Sanity check. if (this.element == element) { this.element = null; } else { throw new IllegalArgumentException("Removal of wrong element."); } // Useful for chaining. return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeElement(ThingNode element)\n\t{\n\t\tsuper.removeElement(element);\n\t\telements.remove(element);\n\t}", "public void remove() {\n removeNode(this);\n }", "Object unlink(Node x) {\n final Object element = x.item;\n final Node next = x.next;\n final Node ...
[ "0.6420624", "0.6198374", "0.61822385", "0.61652225", "0.61178195", "0.6104994", "0.6069856", "0.59956867", "0.593823", "0.59349215", "0.59206927", "0.5903855", "0.58782643", "0.5869162", "0.5844884", "0.5818172", "0.5770507", "0.5762503", "0.57616675", "0.56943756", "0.56801...
0.76830876
0
Just to be helpful.
public T get() { return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "protected boolean func_70814_o() { return true; }", "private void kk12() {\n\n\t}", "@Override\n public void perish() {\n \n }", "public void method_4270() {}", ...
[ "0.59219366", "0.5906329", "0.5897501", "0.5858286", "0.5851028", "0.5824009", "0.5822382", "0.57918954", "0.57695574", "0.57682246", "0.57234895", "0.56975955", "0.5685209", "0.5670932", "0.56389034", "0.5634528", "0.5581676", "0.5576047", "0.5547436", "0.55179304", "0.54919...
0.0
-1
Provides an iterator across all items in the container.
@Override public Iterator<T> iterator() { return new UsedNodesIterator<>(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Iterator<T> iterator() {\n return items.iterator();\n }", "public Iterator<ResultItem> iterateItems() {\r\n\t\treturn items.iterator();\r\n\t}", "public Iterator iterator() {\n maintain();\n return new MyIterator(collection.iterator());\n }", "@Override\r\n Iter...
[ "0.7796309", "0.77122325", "0.74620634", "0.7396877", "0.738944", "0.73717827", "0.73717827", "0.73717827", "0.73717827", "0.7367896", "0.7350041", "0.7341107", "0.7338693", "0.732202", "0.732202", "0.732202", "0.7319551", "0.7319551", "0.7318031", "0.7285622", "0.72548175", ...
0.0
-1
Returns true of there is another element available.
@Override public boolean hasNext() { // Made into a `while` loop to fix issue reported by @Nim // In a while loop because we may find an entry with 'null' in it and we don't want that. while (next == null && stop > 0) { // Scan to the next non-free node. while (stop > 0 && it.free.get() == true) { it = it.next; // Step down 1. stop -= 1; } if (stop > 0) { next = it.element; } } return next != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasElement();", "boolean hasNextElement();", "public boolean hasNextElement();", "public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\tre...
[ "0.75588936", "0.68979377", "0.67736506", "0.6724375", "0.65971375", "0.6544933", "0.6477768", "0.647485", "0.6421712", "0.64113784", "0.63859737", "0.63266474", "0.6316146", "0.6303776", "0.62958694", "0.6281123", "0.62772554", "0.6230841", "0.622766", "0.6201884", "0.619226...
0.5853338
75
Returns the next available element.
@Override public T next() { T n = null; if (hasNext()) { // Give it to them. n = next; next = null; // Step forward. it = it.next; stop -= 1; } else { // Not there!! throw new NoSuchElementException(); } return n; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getNextElement() throws NoSuchElementException;", "public T getNextElement();", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public Element<T> getNextElement() \n\t{\n\t\treturn nextElement;\n\t}", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t...
[ "0.8098682", "0.806883", "0.800934", "0.7747918", "0.7676514", "0.74987864", "0.7448601", "0.74361926", "0.7378953", "0.73697495", "0.7325105", "0.7323459", "0.73197424", "0.7241353", "0.71852076", "0.711397", "0.7108857", "0.70808023", "0.70701176", "0.7063141", "0.7061209",...
0.6797311
38
Spin on add/remove until stopped.
@Override public void run() { while (testing) { // Add it. Node<T> n = c.offer(me); if (n != null) { log.log("Added " + me + ": " + c.toString()); pause(); // Remove it. c.remove(n, me); log.log("Removed " + me + ": " + c.toString()); pause(); } else { // Just go around again. pause(); } } nTesters.decrementAndGet(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lockAdd(){\n\t\tthis.canAdd = false;\n\t}", "@Override\n public void run() {\n for (ListIterator<BtDeviceObject> btDeviceListIterator = mBtDeviceObjectList.listIterator(); btDeviceListIterator.hasNext();) {\n BtDeviceObject btDeviceObject = btDeviceListIterator.next()...
[ "0.636628", "0.59555614", "0.5947028", "0.5925578", "0.58499926", "0.5816858", "0.5705437", "0.56695324", "0.5651532", "0.56476194", "0.5644496", "0.5644378", "0.56393945", "0.56285197", "0.5603365", "0.55825317", "0.557459", "0.55360675", "0.54888344", "0.5465049", "0.544345...
0.56327605
13
Wait for 10 seconds.
static void completeTests(Container c, int seconds) throws InterruptedException { log.log(true, "Waiting " + seconds + " seconds with " + nTesters.intValue() + " testers."); long stop = System.currentTimeMillis() + (seconds * 1000); while (System.currentTimeMillis() < stop) { Thread.sleep(100); } // Stop the testers. testing = false; // Wait some more. while (nTesters.intValue() > 0) { Thread.sleep(100); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sleep() {\n\t\ttry {\n\t\t\tThread.sleep(10 * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t}", "private void Sleep() {\n\t\ttry {\n\t\t\tThread.sleep(10 * 1000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t...
[ "0.73755765", "0.73543316", "0.72114784", "0.72114784", "0.71622276", "0.7081205", "0.69571984", "0.6683283", "0.6646772", "0.6641483", "0.6596483", "0.6590655", "0.65706265", "0.6564777", "0.654449", "0.6539217", "0.6529452", "0.6518438", "0.648199", "0.64594597", "0.6446292...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_search, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644...
0.0
-1
The further rightside structure of a collection Pre : Takes the frequency and the ASCII number of a character. Post : Set the structure into given frequency and ASCII number.
public HuffmanNode(int freq, int ascii){ this.freq = freq; this.ascii = ascii; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void set(int symbol, int freq);", "private static void cryptanalysis() {\n\t for (char cipherChar : cipherText.toCharArray()) {\n\t if (Character.isLetter(cipherChar)) { // only letters are encrypted, punctuation marks and whitespace are not\n\t // following line converts letters to numbers b...
[ "0.6017167", "0.5303267", "0.5287781", "0.5213037", "0.5203491", "0.5187802", "0.5175809", "0.5174759", "0.5173082", "0.51273537", "0.50404686", "0.5011242", "0.49977958", "0.49956992", "0.4975441", "0.4971149", "0.49504945", "0.49449605", "0.49348897", "0.4929588", "0.492261...
0.5140679
9
Pre : Takes the frequency of character only. Post : set the structure to a given frequency, and no further structures made.
public HuffmanNode(int freq){ this(freq, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }", "public void setFrequency(int f){\n this.frequency = f;\n }", "public void set(int symbol, int freq);", "public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }", "public v...
[ "0.6358429", "0.62898475", "0.62636083", "0.61407727", "0.6001514", "0.5913438", "0.59051925", "0.5886796", "0.5843172", "0.5765918", "0.5744375", "0.57344127", "0.5732372", "0.5724906", "0.5711527", "0.5694378", "0.56344986", "0.5613016", "0.56120217", "0.56076336", "0.55901...
0.0
-1
Pre : Takes the frequency of character, and further structures from the collection. Post : Each structures are assigned, as well as the current structure's frequency.
public HuffmanNode(int freq, HuffmanNode left, HuffmanNode right){ this.freq = freq; this.left = left; this.right = right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void buildFreqMap() {\n\t\toriginalFreq = new HashMap<String, WordOccurence>();\n\n\t\tfor (ListIterator<Caption> itr = original.captionIterator(0); itr\n\t\t\t\t.hasNext();) {\n\t\t\tfinal Caption currentCap = itr.next();\n\t\t\tfinal String[] words = currentCap.getCaption().split(\"\\\\s+\");\n\t\t\tfor ...
[ "0.58370566", "0.5634235", "0.5624092", "0.56218415", "0.56109446", "0.56010085", "0.55967414", "0.55844814", "0.5571531", "0.55479705", "0.55228394", "0.54576695", "0.5450636", "0.5432784", "0.54266495", "0.5386584", "0.53857654", "0.5362343", "0.5361938", "0.5353834", "0.53...
0.0
-1
Pre : Takes another structure of a collection to compare to.Great compareTo comment! Post : Compares the two structures' frequency. If other onehas higher frequency then return negative value, if other is lower, returnpositive value. If they have same frequency then return 0.
public int compareTo(HuffmanNode other){ if(other.freq > freq){ return -1; } else if (other.freq < freq){ return 1; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic int compareTo(ItemFrequency o) {\n\t\t\treturn this.frequency-o.frequency;\n\t\t}", "@Override\r\n\tpublic int compareTo(TagFreq otherTagFreq) {\r\n\t\t\r\n\t\t// Return the comparison result \r\n\t\treturn this.getFreq() - otherTagFreq.getFreq();\r\n\t}", "@Override\n\tpublic int compare...
[ "0.72160345", "0.68916225", "0.66983694", "0.6668289", "0.6652069", "0.6608263", "0.65665156", "0.650111", "0.6487423", "0.64122707", "0.6381227", "0.6364516", "0.6347181", "0.6322448", "0.6294009", "0.62777394", "0.62775856", "0.62650573", "0.6260209", "0.6225887", "0.615728...
0.664627
5
Write your code here
public static void printAllPossibleCodes(String input) { String[] str=helper(input); for (int i=0;i<str.length;i++){ System.out.println(str[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public void ganar() {\n // TODO implement here\n }", "@Override\r...
[ "0.6385412", "0.6283162", "0.60945076", "0.59701276", "0.5917703", "0.5879072", "0.5874719", "0.58703095", "0.58692765", "0.58551085", "0.5827088", "0.5824697", "0.5823", "0.57719165", "0.57705134", "0.57700306", "0.5768738", "0.5747882", "0.5739157", "0.5738211", "0.57291245...
0.0
-1
This function adds an edge to the graph. An edge: (from, to).
void addEdge(int from, int to) { adjList.get(from).add(to); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addEdge(Node from, Node to);", "private void addEdge(int from, int to, Edge e) {\n _edges.get(from).set(to, e);\n _edgeMap.put(e, new int [] {from, to});\n }", "void add(Edge edge);", "public void addEdge(int start, int end);", "public void addEdge(String from, String to) {\n ...
[ "0.8776889", "0.83002746", "0.7981467", "0.7950227", "0.7933432", "0.79071224", "0.7876585", "0.7846684", "0.77978736", "0.7752935", "0.77142614", "0.7701142", "0.76850456", "0.76790893", "0.7635966", "0.7606735", "0.75526696", "0.75353545", "0.7473504", "0.74667823", "0.7462...
0.8141995
2
This function returns the number of nodes in graph.
int getNrNodes() { return adjList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "int getNodesCount();", "int getNodesCount();", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int nodesCount() {\n return nodes.size();\n }", "public int getNumOfNodes() {\n\t\treturn...
[ "0.859516", "0.84912914", "0.84912914", "0.82411224", "0.8234718", "0.814731", "0.81450796", "0.81151175", "0.8084935", "0.8021432", "0.8021432", "0.7938551", "0.7931725", "0.7910007", "0.78838253", "0.78668684", "0.7848994", "0.7838492", "0.7838492", "0.7832366", "0.78241575...
0.73592025
57
This function returns a list of all neighbours of a given node.
List<Integer> getNeighboursOf(int node) { return adjList.get(node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LinkedList<String> getAllNeighbours(String node) {\n LinkedList<Edgeq> edgesList = getAllEdges(node);\n LinkedList<String> neighboursList = new LinkedList<>();\n for (Edgeq edge : edgesList) {\n neighboursList.add(edge.n2);\n }\n return neighboursList;\n }", ...
[ "0.8130492", "0.80858225", "0.8058941", "0.7931269", "0.79303515", "0.7754638", "0.75783545", "0.7437836", "0.736844", "0.7314592", "0.72613716", "0.72168726", "0.7208717", "0.72017586", "0.7157075", "0.7143105", "0.7139326", "0.70948464", "0.70545745", "0.7044179", "0.703439...
0.8191014
0
This function gets the total number of nodes in the graph.
int getTotalNumOfNodes() { return adjList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int totalNumberOfNodes();", "int getNodesCount();", "int getNodesCount();", "@Override\n public int nodeCount() {\n return graphNodes.size();\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int totalNumNodes () { throw new RuntimeException(); }", "public in...
[ "0.8621343", "0.8619394", "0.8619394", "0.83712965", "0.8360856", "0.8206107", "0.8192839", "0.8175986", "0.81638026", "0.8088351", "0.8075757", "0.8071038", "0.8071038", "0.8039449", "0.8026108", "0.8021773", "0.7970607", "0.79667646", "0.79487306", "0.79485065", "0.79348314...
0.7979388
16
Repository for keeping created short links and the original ones
public interface ShortUrlRepository extends CrudRepository<UrlEntity, String> { List<UrlEntity> findByDateExpiredBefore(Timestamp timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void storeLinks();", "public interface ShortLinkFormattingService {\n\n /**\n * Formats the given ShortLink into its final URL representation\n * @param shortLink <p>the ShortLink to convert</p>\n * @return <p>the URL representing the given ShortLink</p>\n */\n URL format(ShortLink shortLin...
[ "0.6583132", "0.62190443", "0.5920737", "0.57477015", "0.5671487", "0.56691295", "0.55747914", "0.55247134", "0.5500945", "0.543127", "0.5414929", "0.5393955", "0.53521556", "0.53513587", "0.53133506", "0.52768016", "0.5268305", "0.52527684", "0.5244425", "0.5228946", "0.5215...
0.47802746
84
Returns a list of patients where first name OR last name LIKE name.
public List<Patient> getByName(String name) { return getByCriterion(Restrictions.or(Restrictions.like("firstname", name), Restrictions.like("lastname", name))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);", "@Query(\"MATCH (p:Person) \" + \"WHERE LOWER(p.firstName) CONTAINS LOWER({0}) \"\n + \"AND LOWER(p.lastName) CONTAINS LOWER({1}) \" + \"RETURN p\")\n Iterable<Person> locateByFirstLast(String firstName, ...
[ "0.6985896", "0.65394044", "0.6369445", "0.6351784", "0.6301061", "0.6206788", "0.58820057", "0.58750975", "0.5825637", "0.57777894", "0.5760304", "0.5732273", "0.56377006", "0.56225216", "0.56152916", "0.56140757", "0.55743694", "0.55576295", "0.55444646", "0.554259", "0.553...
0.74001247
0
Creates new form EventPanel
public EventPanel(String panel, JFrame jFrame, Calendar calendar, Event event) { redLineBorder = BorderFactory.createLineBorder(Color.red); editing = false; startTime = Calendar.getInstance(); this.event = event; cb = new CustomerBuilder(); this.jFrame = jFrame; this.cal = calendar; phoneSearch = true; listener = Listeners.getList(); sletordlist = new ArrayList<>(); sletordlist.addAll(Arrays.asList("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "")); try { errorControl = ErrorControl.getInstance(); cc = CustomerControl.getInstance(); mc = MassageControl.getInstance(); categoryControl = CategoryControl.getInstance(); meatControl = MeatControl.getInstance(); accompanimentControl = AccompanimentControl.getInstance(); grillControl = GrillControl.getInstance(); saladControl = SaladControl.getInstance(); bbqControl = BBQControl.getInstance(); } catch (ClassNotFoundException | SQLException ex) { try { errorControl.createErrorPopup("Fejl i forbindelse til databasen.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } dateFormatTools = new DateFormatTools(); initComponents(); jTBBQTotalPrice.setText(""); jScrollPane2.setOpaque(false); jScrollPane2.getViewport().setOpaque(false); jScrollPane3.setOpaque(false); jScrollPane3.getViewport().setOpaque(false); listener.addListener(this); cl = (CardLayout) getLayout(); cl.addLayoutComponent(choosePanel, "vælg"); cl.addLayoutComponent(massagePanel, "massage"); cl.addLayoutComponent(bbqPanel, "bbq"); showPage(panel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CreateNewEventJPanel() {\n }", "public AddEvent() {\n initComponents();\n }", "private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\...
[ "0.7450417", "0.6786071", "0.67527515", "0.660252", "0.65143335", "0.6483413", "0.6423897", "0.63840175", "0.63810337", "0.637668", "0.63637066", "0.6266235", "0.6229356", "0.61870754", "0.6175729", "0.6151217", "0.6122216", "0.6118457", "0.6108808", "0.60932463", "0.60854775...
0.6356067
11
bruges til at navigere i vores CardLayout
public void showPage(String panel) { int height = 0; int widht = 0; switch (panel) { case ("vælg"): setJFrame(242, 150, "vælg", dateFormatTools.getDayLetters(cal)); break; case ("massage"): massage = new MassageBuilder(); customer = null; try { masTypeList = mc.getMTypeList(); } catch (SQLException ex) { try { errorControl.createErrorPopup("Fejl i hentning af massagetyper.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } setJFrame(300, 370, "massage", dateFormatTools.getDayLetters(cal)); fillComboStartTime(); break; case ("rediger massage"): editing = true; startTime = mc.getEvent().getDate(); try { masTypeList = mc.getMTypeList(); } catch (SQLException ex) { try { errorControl.createErrorPopup("Fejl i hentning af massagetyper.", ex.getLocalizedMessage()); } catch (SQLException ex1) { System.out.println(ex1.getLocalizedMessage()); } } event = mc.getEvent(); setJFrame(300, 370, "massage", dateFormatTools.getDayLetters(cal)); fillComboStartTime(); fillMassage(); break; case ("bbq"): customer = null; setJFrame(950, 716, "bbq", dateFormatTools.getDayLetters(cal)); bbqControl.clearBBQBuilder(); showCategories(); break; case ("bbq edit"): { editing = true; try { bbqControl.geteventStof(event); } catch (SQLException ex) { Logger.getLogger(EventPanel.class.getName()).log(Level.SEVERE, null, ex); } } customer = event.getCustomer(); setJFrame(950, 716, "bbq", dateFormatTools.getDayLetters(cal)); fillbarbecue(); showCategories(); addToBasket(); break; } jFrame.revalidate(); jFrame.repaint(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sezmanagerListener(){\n\n CardLayout CL=(CardLayout) sez_managerview.getIntermedio1().getLayout();\n\n /*Avanti*/\n JButton sez_managerviewAvanti = sez_managerview.getAvantiButton();\n sez_managerviewAvanti.addActionListener(new ActionListener() {\n @Override...
[ "0.67762464", "0.64630187", "0.6389501", "0.6319951", "0.6142674", "0.6108569", "0.60544693", "0.59888524", "0.59753996", "0.59750146", "0.5970341", "0.59637433", "0.5940449", "0.593464", "0.5910273", "0.5879943", "0.5879404", "0.5857654", "0.5844354", "0.5810121", "0.5801266...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); jLabel8 = new javax.swing.JLabel(); choosePanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jBMassage = new javax.swing.JButton(); jBGrill = new javax.swing.JButton(); jLabel11 = new javax.swing.JLabel(); massagePanel = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jCHalf = new javax.swing.JCheckBox(); jCWhole = new javax.swing.JCheckBox(); jTName = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTPhone = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTComment = new javax.swing.JTextArea(); jLabel7 = new javax.swing.JLabel(); jCStartTime = new javax.swing.JComboBox(); jBCreateMassage = new javax.swing.JButton(); jLabel9 = new javax.swing.JLabel(); bbqPanel = new javax.swing.JPanel(); jBCreateBBQ = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jTBBQPhone = new javax.swing.JTextField(); jTBBQCusAddress = new javax.swing.JTextField(); jTBBQName = new javax.swing.JTextField(); jTBBQCusEmail = new javax.swing.JTextField(); jPanel2 = new javax.swing.JPanel(); jTBBQKm = new javax.swing.JTextField(); jTBBQDishes = new javax.swing.JTextField(); jTBBQEventAddress = new javax.swing.JTextField(); jTStartTime = new javax.swing.JTextField(); jPCategory = new javax.swing.JPanel(); jPChosen = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); jPScrollChosen = new javax.swing.JPanel(); jPBasket = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); jPScrollBasket = new javax.swing.JPanel(); jScrollPane4 = new javax.swing.JScrollPane(); jTBBQComments = new javax.swing.JTextArea(); jPanel3 = new javax.swing.JPanel(); jTBBQTotalPrice = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel8.setText("jLabel8"); setLayout(new java.awt.CardLayout()); choosePanel.setLayout(null); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Opret aftale"); choosePanel.add(jLabel1); jLabel1.setBounds(43, 22, 146, 14); jBMassage.setText("Massage"); jBMassage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBMassageActionPerformed(evt); } }); choosePanel.add(jBMassage); jBMassage.setBounds(43, 42, 146, 23); jBGrill.setText("Grill"); jBGrill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBGrillActionPerformed(evt); } }); choosePanel.add(jBGrill); jBGrill.setBounds(43, 71, 146, 23); jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/event_bkgr.png"))); // NOI18N choosePanel.add(jLabel11); jLabel11.setBounds(0, 0, 242, 140); add(choosePanel, "card2"); massagePanel.setLayout(null); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Opret massage"); massagePanel.add(jLabel2); jLabel2.setBounds(10, 0, 266, 14); jCHalf.setText("Halvkrops"); jCHalf.setOpaque(false); jCHalf.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCHalfActionPerformed(evt); } }); massagePanel.add(jCHalf); jCHalf.setBounds(10, 82, 140, 23); jCWhole.setText("Helkrops"); jCWhole.setOpaque(false); jCWhole.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCWholeActionPerformed(evt); } }); massagePanel.add(jCWhole); jCWhole.setBounds(153, 82, 130, 23); jTName.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTNameFocusLost(evt); } }); massagePanel.add(jTName); jTName.setBounds(150, 60, 117, 20); jLabel3.setText("Kunde:"); massagePanel.add(jLabel3); jLabel3.setBounds(10, 20, 120, 14); jLabel4.setText("Navn:"); massagePanel.add(jLabel4); jLabel4.setBounds(150, 40, 120, 14); jLabel5.setText("Telefon nummer:"); massagePanel.add(jLabel5); jLabel5.setBounds(10, 40, 120, 14); jTPhone.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTPhoneFocusLost(evt); } }); massagePanel.add(jTPhone); jTPhone.setBounds(10, 60, 111, 20); jLabel6.setText("Bemærkninger:"); massagePanel.add(jLabel6); jLabel6.setBounds(10, 110, 260, 14); jTComment.setColumns(20); jTComment.setRows(5); jTComment.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTCommentFocusLost(evt); } }); jScrollPane1.setViewportView(jTComment); massagePanel.add(jScrollPane1); jScrollPane1.setBounds(10, 130, 266, 96); jLabel7.setText("Fra:"); massagePanel.add(jLabel7); jLabel7.setBounds(10, 240, 80, 14); jCStartTime.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); massagePanel.add(jCStartTime); jCStartTime.setBounds(73, 240, 130, 20); jBCreateMassage.setText("Opret"); jBCreateMassage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBCreateMassageActionPerformed(evt); } }); massagePanel.add(jBCreateMassage); jBCreateMassage.setBounds(70, 270, 130, 23); jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/massage_bkgr.png"))); // NOI18N massagePanel.add(jLabel9); jLabel9.setBounds(0, 0, 290, 340); add(massagePanel, "card3"); bbqPanel.setLayout(null); jBCreateBBQ.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jBCreateBBQ.setText("Opret"); jBCreateBBQ.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jBCreateBBQActionPerformed(evt); } }); bbqPanel.add(jBCreateBBQ); jBCreateBBQ.setBounds(630, 640, 290, 31); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kunde", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPanel1.setOpaque(false); jPanel1.setLayout(null); jTBBQPhone.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQPhone.setText("Telefonnummer"); jTBBQPhone.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQPhoneFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQPhoneFocusLost(evt); } }); jPanel1.add(jTBBQPhone); jTBBQPhone.setBounds(10, 60, 290, 20); jTBBQCusAddress.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQCusAddress.setText("Adresse"); jTBBQCusAddress.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQCusAddressFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCusAddressFocusLost(evt); } }); jPanel1.add(jTBBQCusAddress); jTBBQCusAddress.setBounds(10, 90, 290, 20); jTBBQName.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQName.setText("Navn"); jTBBQName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQNameActionPerformed(evt); } }); jTBBQName.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQNameFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQNameFocusLost(evt); } }); jPanel1.add(jTBBQName); jTBBQName.setBounds(10, 30, 290, 20); jTBBQCusEmail.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQCusEmail.setText("Email"); jTBBQCusEmail.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQCusEmailFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCusEmailFocusLost(evt); } }); jPanel1.add(jTBBQCusEmail); jTBBQCusEmail.setBounds(10, 120, 290, 20); bbqPanel.add(jPanel1); jPanel1.setBounds(0, 0, 310, 150); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Arrangement", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jPanel2.setOpaque(false); jPanel2.setLayout(null); jTBBQKm.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQKm.setText("Km"); jTBBQKm.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQKmActionPerformed(evt); } }); jTBBQKm.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQKmFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQKmFocusLost(evt); } }); jPanel2.add(jTBBQKm); jTBBQKm.setBounds(10, 90, 290, 20); jTBBQDishes.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQDishes.setText("Kuverter"); jTBBQDishes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jTBBQDishesActionPerformed(evt); } }); jTBBQDishes.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQDishesFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQDishesFocusLost(evt); } }); jPanel2.add(jTBBQDishes); jTBBQDishes.setBounds(10, 60, 290, 20); jTBBQEventAddress.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQEventAddress.setText("Adresse"); jTBBQEventAddress.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQEventAddressFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQEventAddressFocusLost(evt); } }); jPanel2.add(jTBBQEventAddress); jTBBQEventAddress.setBounds(10, 30, 290, 20); jTStartTime.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTStartTime.setText("Tid"); jTStartTime.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTStartTimeFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTStartTimeFocusLost(evt); } }); jPanel2.add(jTStartTime); jTStartTime.setBounds(10, 120, 290, 20); bbqPanel.add(jPanel2); jPanel2.setBounds(310, 0, 310, 150); jPCategory.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Valgmuligheder", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPCategory.setOpaque(false); jPCategory.setLayout(null); bbqPanel.add(jPCategory); jPCategory.setBounds(0, 150, 310, 530); jPChosen.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Valgte", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jPChosen.setOpaque(false); jPChosen.setLayout(null); jScrollPane2.setBorder(null); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); jScrollPane2.setOpaque(false); jPScrollChosen.setOpaque(false); jPScrollChosen.setLayout(null); jScrollPane2.setViewportView(jPScrollChosen); jPChosen.add(jScrollPane2); jScrollPane2.setBounds(10, 20, 290, 500); bbqPanel.add(jPChosen); jPChosen.setBounds(310, 150, 310, 530); jPBasket.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kurv", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(149, 166, 182))); // NOI18N jPBasket.setOpaque(false); jPBasket.setLayout(null); jScrollPane3.setBorder(null); jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); jScrollPane3.setOpaque(false); jPScrollBasket.setOpaque(false); jPScrollBasket.setLayout(null); jScrollPane3.setViewportView(jPScrollBasket); jPBasket.add(jScrollPane3); jScrollPane3.setBounds(10, 20, 290, 430); bbqPanel.add(jPBasket); jPBasket.setBounds(620, 0, 310, 460); jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Kommentarer", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(51, 70, 87))); // NOI18N jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane4.setOpaque(false); jTBBQComments.setColumns(20); jTBBQComments.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQComments.setRows(5); jTBBQComments.setBorder(null); jTBBQComments.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { jTBBQCommentsFocusLost(evt); } }); jScrollPane4.setViewportView(jTBBQComments); bbqPanel.add(jScrollPane4); jScrollPane4.setBounds(620, 460, 310, 110); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Total Pris", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 18), new java.awt.Color(18, 27, 36))); // NOI18N jPanel3.setOpaque(false); jPanel3.setLayout(null); jTBBQTotalPrice.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N jTBBQTotalPrice.setText("jTextField1"); jTBBQTotalPrice.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { jTBBQTotalPriceFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { jTBBQTotalPriceFocusLost(evt); } }); jPanel3.add(jTBBQTotalPrice); jTBBQTotalPrice.setBounds(10, 20, 290, 30); bbqPanel.add(jPanel3); jPanel3.setBounds(620, 570, 310, 60); jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/pictures/bbq_bkgr.png"))); // NOI18N jLabel10.setText("jLabel10"); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, bbqPanel, org.jdesktop.beansbinding.ELProperty.create("${background}"), jLabel10, org.jdesktop.beansbinding.BeanProperty.create("background")); bindingGroup.addBinding(binding); bbqPanel.add(jLabel10); jLabel10.setBounds(0, 0, 940, 680); add(bbqPanel, "card4"); bindingGroup.bind(); }
{ "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.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.69...
0.0
-1
End of variables declaration//GENEND:variables
@Override public void actionPerformed(ActionEvent e) { switch (e.getActionCommand()) { case "Mas Customer Chosen": if (editing) { event.setCustomer(cc.getCustomer()); } else { customer = cc.getCustomer(); jTPhone.setText(customer.getPhone()); jTName.setText(customer.getName()); } break; case "BBQ Customer Chosen": if (editing) { } else { customer = cc.getCustomer(); jTBBQName.setText(customer.getName()); jTBBQPhone.setText(customer.getPhone()); jTBBQCusAddress.setText(customer.getAddress()); jTBBQCusEmail.setText(customer.getEmail()); } break; case "Category Meat": showCategoryItem("Meat"); break; case "Category Accompaniment": showCategoryItem("Accompaniment"); break; case "Category Salad": showCategoryItem("Salad"); break; case "Category Grill": showCategoryItem("Grill"); break; case "added to basket": addToBasket(); jTBBQTotalPrice.setText(bbqControl.getBuilder().getTotalPrice() + ""); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n pu...
[ "0.6359434", "0.6280371", "0.61868024", "0.6094568", "0.60925734", "0.6071678", "0.6052686", "0.60522056", "0.6003249", "0.59887564", "0.59705925", "0.59680873", "0.5967989", "0.5965816", "0.5962006", "0.5942372", "0.5909877", "0.5896588", "0.5891321", "0.5882983", "0.5881482...
0.0
-1
create FF profile and Chrome op[tions objects
public static WebDriver initialise(String browser) { FirefoxProfile firefoxProfile = new FirefoxProfile(); ChromeOptions chromeOptions = new ChromeOptions(); if (browser.equalsIgnoreCase("chrome")) { System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + "\\executables\\chromedriver.exe"); chromeOptions.addArguments("--disable-infobars"); chromeOptions.addArguments("--window-size=1920,1080"); chromeOptions.addArguments("--ignore-certificate-errors"); chromeOptions.addArguments("--disable-default-apps"); chromeOptions.addArguments("--disable-popup-blocking"); chromeOptions.addArguments("--incognito"); driver = new ChromeDriver(chromeOptions); } else if (browser.equalsIgnoreCase("firefox")) { System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + "\\executables\\geckodriver.exe"); firefoxProfile.setPreference("permissions.default.stylesheet", 2); firefoxProfile.setPreference("permissions.default.image", 2); firefoxProfile.setPreference("dom.ipc.plugins.enabled.libflashplayer.so", false); firefoxProfile.setPreference("geo.enabled", false); driver = new FirefoxDriver(firefoxProfile); } /* set amount of total time for search for element */ driver.manage().timeouts().implicitlyWait(TIMEOUT, TimeUnit.SECONDS); /* set amount of time to page load to complete before trow error */ driver.manage().timeouts().pageLoadTimeout(PAGE_TIMEOUT, TimeUnit.SECONDS); /* * set amount of time to wait for a script to finish execution before throwing * error */ driver.manage().timeouts().setScriptTimeout(SCRIPT_TIMEOUT, TimeUnit.SECONDS); driver.manage().window().maximize(); return driver; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver...
[ "0.551255", "0.53611946", "0.53093034", "0.5291327", "0.51320046", "0.50564414", "0.50548255", "0.50454247", "0.50056446", "0.4982926", "0.49657503", "0.4943287", "0.4882339", "0.48539153", "0.48525602", "0.4837359", "0.47919038", "0.47894815", "0.4768063", "0.4709145", "0.47...
0.46660522
23
/ WebElement returns element based on different locator
public static WebElement returnElement(String locatorType, String locatorPath) { WebDriverWait wait = new WebDriverWait(driver, TIMEOUT); switch (locatorType.toLowerCase()) { case "id": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.id(locatorPath)))); // driver.findElement(By.id(locatorPath)); case "xpath": return driver.findElement(By.xpath(locatorPath)); case "name": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.name(locatorPath)))); // driver.findElement(By.name(locatorPath)); case "classname": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.className(locatorPath)))); // driver.findElement(By.className(locatorPath)); case "cssselector": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector(locatorPath)))); // driver.findElement(By.cssSelector(locatorPath)); case "linktext": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.linkText(locatorPath)))); // driver.findElement(By.linkText(locatorPath)); case "tagname": return wait.until(ExpectedConditions.visibilityOf(driver.findElement(By.tagName(locatorPath)))); // driver.findElement(By.tagName(locatorPath)); default: throw new RuntimeException("Unknown locator " + locatorType + " : " + locatorPath); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public WebElement getElement(String locator){\n\t\tWebElement webElement = null;\n\t\twaitForElementVisibility(locator);\n\t\ttry{\n\t\t\tif(locator.startsWith(\"//\")) {\t\n\t\t\t\twebElement = driver.findElement(By.xpath(locator));\t\t\t\t\n\t\t\t}else if( locator.startsWith(\"css=\")) {\n\t\t\t\tlocator=locator...
[ "0.7492095", "0.70938635", "0.7062717", "0.7042798", "0.6965454", "0.69141805", "0.68481636", "0.68000126", "0.67499036", "0.67171603", "0.6699032", "0.6673118", "0.6662596", "0.66337585", "0.6603423", "0.6555641", "0.64377034", "0.6403251", "0.6349805", "0.63410825", "0.6315...
0.6537315
16
/ findElement using 'returnElement' and verify is Displayed
public static WebElement findElement(String locatorType, String locatorPath) { element = returnElement(locatorType, locatorPath); element.isDisplayed(); return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean find(String sElement){\n\t\tboolean bReturn = false;\n\t\ttry{\n\t\t\tbReturn = findElement(sElement).isDisplayed();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception occured in finding the WebElement: \"+e.getMessage());\n\t\t}\n\t\t\n\t\treturn bReturn;\n\t}", "private boolean elementDis...
[ "0.68481094", "0.6807739", "0.67868286", "0.67065394", "0.6548599", "0.6512935", "0.65061057", "0.6439857", "0.64022297", "0.6392444", "0.6343488", "0.6327336", "0.6317484", "0.6298903", "0.6265613", "0.6262495", "0.62545776", "0.6219663", "0.62189823", "0.6165913", "0.615188...
0.0
-1
/ Method for finding Fields and Highlight them before enter a value
public static WebElement findFieldAndSentKeys(WebElement element, String value) { element.isDisplayed(); HighLightElement(element); element.sendKeys(value); Reporter.log(" Enter value : " + value); return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchAndSelect() {\n currIndex = 0;\n Highlighter h = jta.getHighlighter();\n h.removeAllHighlights();\n String text = jtfFind.getText();\n \n String jText = jta.getText();\n if (text.equals(\"\")) {\n jtfFind.setBackground(Color.WHITE);\n ...
[ "0.59010625", "0.57599", "0.5633858", "0.5551414", "0.5470681", "0.54304504", "0.542936", "0.54200757", "0.5347626", "0.5331333", "0.5247111", "0.5238523", "0.52343845", "0.5208479", "0.5166409", "0.5136758", "0.5134517", "0.50818664", "0.506982", "0.5037013", "0.5019025", ...
0.45533946
84
/Simulate KeyTab prese/release event using Robot class
public static void keyPressAndReleaseTab() { Robot robot = null; try { robot = new Robot(); } catch (AWTException e) { // TODO Auto-generated catch block e.printStackTrace(); } robot.keyPress(KeyEvent.VK_TAB); // here we simulate PRESS a TAB robot.keyRelease(KeyEvent.VK_TAB); // here we simulate RELEASE a TAB }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void keyTab(){\n\n try {\n driver.switchTo().activeElement().sendKeys(Keys.TAB);\n\t\t\tLOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass \");\n\n }catch(Exception e)\n {\n\t\t\tLOGGER.error(\"Step : \"+Thread.currentThread().getStack...
[ "0.7281928", "0.7076205", "0.68337595", "0.6670787", "0.6523778", "0.651222", "0.64484954", "0.6345433", "0.6261707", "0.62422854", "0.6223131", "0.6221481", "0.6207557", "0.61841786", "0.61775863", "0.6176849", "0.6172016", "0.6164785", "0.614375", "0.6135592", "0.61332846",...
0.8502423
0
/ Highlights the fileds in yellow color apply for the filed that is under typing
public static void HighLightElement(WebElement element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].setAttribute('style','background: yellow; border: 2px solid red;')", element); try { Thread.sleep(10); } catch (Exception e) { System.out.println(e.getMessage()); } js.executeScript("arguments[0].setAttribute('style','border: solid 2px white')", element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSearchNameTextFieldBackgroundColor(String color) {\n/*Generated! Do not modify!*/ replyDTO.getVariablesToSet().add(\"overviewSmall_searchNameTextField_propertyBackgroundColor\");\n/*Generated! Do not modify!*/ replyDTO.getVariableValues().put(\"overviewSmall_searchNameTextField_prope...
[ "0.62756264", "0.6017962", "0.59557503", "0.5949795", "0.58116615", "0.5782239", "0.5670654", "0.5512713", "0.5508575", "0.54423827", "0.5407272", "0.5403355", "0.5365366", "0.5357588", "0.5310866", "0.5290668", "0.5278329", "0.52752316", "0.52672666", "0.5241766", "0.5218209...
0.0
-1
/ method for scroll down
public static void scrollDown(WebElement Element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].scrollIntoView();", Element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scrollDown() {\n try {\n Robot robot = new Robot();\n robot.keyPress(KeyEvent.VK_PAGE_DOWN);\n robot.keyRelease(KeyEvent.VK_PAGE_DOWN);\n } catch(Exception e) {\n // do nothing\n }\n\n }", "public synchronized void scrollDown()\r\n\t...
[ "0.79169255", "0.78559375", "0.76537544", "0.7585526", "0.73402303", "0.71742", "0.7019972", "0.69910234", "0.69802696", "0.6898991", "0.68945706", "0.68032765", "0.6801112", "0.6761069", "0.67484045", "0.6727997", "0.67197114", "0.6700339", "0.6676445", "0.6673527", "0.66667...
0.0
-1
/ method for click on WebElement using JavascriptExecutor
public static void JSclickOnWebElement(WebElement element) { js = (JavascriptExecutor) driver; js.executeScript("arguments[0].click();", element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void fw_javascriptClick() {\n WrapsDriver wd = (WrapsDriver) element;\n ((JavascriptExecutor) wd.getWrappedDriver()).executeScript(\"arguments[0].click();\", element);\n }", "public void clickJS(WebElement element) {\n\t\tgetExecutor().executeScript(\"arguments[0].click();\...
[ "0.81257105", "0.7600447", "0.7520132", "0.7498927", "0.74909794", "0.7413594", "0.7304591", "0.72155976", "0.71179986", "0.6712867", "0.6683877", "0.6634604", "0.6612461", "0.6584776", "0.6560243", "0.6554451", "0.6428508", "0.64137024", "0.6370915", "0.63153034", "0.6302668...
0.7106858
9
/ Work on Dropdowns
public static void select(WebElement select1, String value) { Select select = new Select(select1); select.selectByVisibleText(value); Reporter.log("Selecting from dropdown value as : " + value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dropdown(HttpServletRequest request, HttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> Entering... \");\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \n \t\tNewDropdownUtil.populateD...
[ "0.6938634", "0.6819145", "0.64171827", "0.6399045", "0.6388262", "0.6338847", "0.63312733", "0.6327344", "0.63100046", "0.6308896", "0.6284004", "0.6274356", "0.6272924", "0.6263097", "0.62487125", "0.6244566", "0.62318087", "0.62161463", "0.6212172", "0.6193816", "0.6193268...
0.0
-1
/ Page title assert
public static void pageTitleVerify(String expected) { String actual = driver.getTitle(); Assert.assertEquals(actual, expected); Reporter.log("Page title is Verified"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \n\tpublic void homePageTitleTest() {\n\t\tHomePage homePage = new HomePage(driver);\n\t\thomePage.OpenPage();\n\t\t\n\t\t//Fetch title \n\t\tString title = homePage.getTitle();\n\t\t\n\t\t//Assert title content \n\t\tAssert.assertTrue(title.equals(\"Lorem Ipsum - All the facts - Lipsum generator\"));\n\t}",...
[ "0.85012156", "0.8310284", "0.81920433", "0.8122344", "0.8104787", "0.8056806", "0.7957889", "0.79486275", "0.78725594", "0.7799794", "0.7766285", "0.77540046", "0.765251", "0.7609786", "0.76053447", "0.757149", "0.7569918", "0.7458053", "0.7427964", "0.7405227", "0.7383089",...
0.79199517
8
/method performing Page zoom out
public static void zoomOutPage(int percent) { JavascriptExecutor js = (JavascriptExecutor) base.driver; js.executeScript("document.body.style.zoom='" + percent + "%'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void zoomOut() { zoomOut(1); }", "public void zoomOut() {\n \t\tzoom(-1);\n \t}", "public void zoomOut() {\n if (scale > 0.05) {\n double scaleFactor = (scale - 0.03) / scale;\n currentXOffset = scaleFactor * (currentXOffset - viewPortWidth / 2) + viewPortWidth / 2;\n ...
[ "0.8550541", "0.83910125", "0.8209417", "0.79753524", "0.7722066", "0.7665774", "0.75678277", "0.73767895", "0.7210883", "0.7167359", "0.7118093", "0.6931929", "0.6870649", "0.6865086", "0.66352826", "0.6628437", "0.65013516", "0.6465141", "0.63760746", "0.6355219", "0.629347...
0.7032662
11
/ method for getting a Text from an WebElement
public static String getElementText(WebElement element) { return element.getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String getWebElementText(WebElement element) {\n return element.getText();\n }", "public String getElementText(WebElement element) {\n log.traceEntry();\n String placeholder = \"\";\n try {\n if (webWaitsutil.isElementPresent(element)) {\n highli...
[ "0.8059507", "0.772823", "0.7707582", "0.7666648", "0.76468164", "0.7591153", "0.758452", "0.758452", "0.755356", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.74865603", "0.7330122", "0.72816986", "0.72721183", "0.727211...
0.78551674
1
/FileWriter method can write down in a .txt particular data getted from an WebElement
public static String FileWriter(WebElement ele,String filePath) throws IOException { File f1 = new File(filePath); java.io.FileWriter fw = new java.io.FileWriter(f1); String text = ele.getText(); Reporter.log(text); // System.out.println(text); fw.write(text); fw.close(); return text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void writeDataToTxtFile() {\n\n }", "public void saveToFile(String datafile) throws java.io.FileNotFoundException, java.io.UnsupportedEncodingException {\n try {\n FileWriter writer = new FileWriter(\"test.html\");\n writer.write(datafile);\n write...
[ "0.6255171", "0.6243989", "0.6219248", "0.6162265", "0.5988351", "0.59576267", "0.5902219", "0.5901193", "0.5838243", "0.5832974", "0.58220613", "0.5812234", "0.58063936", "0.5789654", "0.57819575", "0.577856", "0.57675457", "0.57471406", "0.57377523", "0.57334894", "0.571678...
0.693814
0
/ check all checkBoxSelection method capturing them by common tagName
public void TermsAndConditionsclickAllCheckBoxes(String tagname, String attribute, String text) { List<WebElement> list = driver.findElements(By.tagName(tagname)); int size = list.size(); for (int i = 0; i < size; i++) { list.get(i).getText(); } for (WebElement webElement : list) { if (webElement.getAttribute(attribute).equals(text)) { base.jSClick(webElement); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private VBox checkBox(){\n //creation\n VBox checkbox = new VBox();\n CheckBox deliver = new CheckBox();\n CheckBox pick_up = new CheckBox();\n CheckBox reservation = new CheckBox();\n deliver.setText(\"Deliver\");\n pick_up.setText(\"Pick Up\");\n reservatio...
[ "0.6129989", "0.60514057", "0.599936", "0.5966948", "0.59621394", "0.59621394", "0.59621394", "0.5954136", "0.5947226", "0.5932173", "0.59053016", "0.5901209", "0.5846942", "0.58276117", "0.58197975", "0.57402265", "0.5733998", "0.5733998", "0.57252586", "0.5704746", "0.57047...
0.5240104
71
/ File Reader Method read data from .txt
public static String getStoredString(String filePath, int chars) throws IOException { File f1 = new File(filePath); FileReader fr = new FileReader(f1); char[] chras = new char[chars]; fr.read(chras); String s = new String(chras); System.out.println("The stored String is : " + s); fr.close(); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public String[] openFile() throws IOException\n\t{\n\t\t//Creates a FileReader and BufferedReader to read from the file that you pass it\n\t\tFileReader fr = new FileReader(path);\n\t\tBufferedReader textReader = new BufferedReader(fr);\n\t\t\n\t\t...
[ "0.73909074", "0.72132057", "0.6965449", "0.69421417", "0.6921939", "0.6915926", "0.68436044", "0.6799726", "0.67565864", "0.675355", "0.67433864", "0.6731762", "0.6723621", "0.67212903", "0.6687326", "0.6681808", "0.6677365", "0.6667487", "0.66002643", "0.6599797", "0.659358...
0.0
-1
Factory method which returns concrete data adapter by unique name, using configuration file
public static IDatabaseAdapter get(String name) { HashMap<String,Object> config = ConfigManager.getInstance().getDatabaseAdapter(name); if (config==null || !config.containsKey("type")) return null; IDatabaseAdapter result = null; switch (config.get("type").toString()) { case "mysql": result = new MysqlDatabaseAdapter(); break; case "sqlite": result = new SqliteDatabaseAdapter(); break; case "orientdb": result = new OrientDBDatabaseAdapter(); break; case "mongodb": result = new MongoDatabaseAdapter(); } if (result != null) result.configure(config); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CommonAdapter findAdapterByName(final String name) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Find adapter : \" + name);\n }\n return ADAPTERS.get(name);\n }", "DataFactory getDataFactory();", "public Class<? extends DataAdapter> getAdapterClass();", "Builde...
[ "0.632529", "0.5794697", "0.57155794", "0.56946945", "0.5594392", "0.55807734", "0.5576359", "0.54958856", "0.5489255", "0.5484186", "0.5466684", "0.54644644", "0.5439229", "0.54195297", "0.5376617", "0.5329677", "0.5279799", "0.5260038", "0.52532446", "0.5237464", "0.5207017...
0.7103109
0
Method used to apply configuration to data adapter
public void configure(HashMap<String,Object> config) { this.name = config.getOrDefault("name","").toString(); this.collections = (HashMap<String,Object>)config.getOrDefault("collections",new HashMap<>()); try { this.syslogConfig = (HashMap<String,Object>)config.getOrDefault("syslog", LoggerApplication.getInstance().getSyslogConfig()); } catch (Exception e) {e.printStackTrace();} this.syslog = new Syslog(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void Configure( DataMap<String, Serializable> configuration);", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyc...
[ "0.67606646", "0.6409498", "0.63346654", "0.6014171", "0.5987238", "0.59855", "0.59681416", "0.58530307", "0.579445", "0.5784371", "0.57681185", "0.5763057", "0.5742769", "0.57293713", "0.5724988", "0.5717831", "0.5717031", "0.57029206", "0.56918544", "0.5646217", "0.56401044...
0.0
-1
Public method used by consumers to select data from data source
public ArrayList<HashMap<String,Object>> select(String sql,String collectionName) { return processQueryResult(executeSelectQuery(sql),collectionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract ConnectorResultSet select(DataRequest source) throws ConnectorOperationException;", "@Override\r\n public DataSource selectDataSource(String tenantIdentifier) {\n\r\n tenantIdentifier = initializeTenantIfLost(tenantIdentifier);\r\n\r\n if (!this.dataSourcesMtApp.containsKey(tenan...
[ "0.7173947", "0.6257282", "0.6237019", "0.6200492", "0.61549884", "0.6100225", "0.60978967", "0.6079801", "0.6062762", "0.60143673", "0.6000497", "0.59349513", "0.5903909", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.58415675", "0.5841459", "0.583...
0.0
-1
Method used to insert set of records to specified collection in database
public Integer insert(String collectionName,ArrayList<HashMap<String,Object>> data) { return processUpdateQuery(collectionName,data,true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void insertBatch(List<InspectionAgency> recordLst);", "int insert(Collect record);", "private <T, Q extends Query> void executeInsertBatch(Collection<T> objectsToInsert, Function<? super T, ? extends Q> mapFunction) {\n\t\tList<Q> insertStatements = objectsToInsert.stream().map(mapFunction).collect(Collectors....
[ "0.70314646", "0.69555086", "0.69315207", "0.6861278", "0.68306994", "0.6828041", "0.6810686", "0.6807302", "0.6730345", "0.6492826", "0.64810145", "0.64693034", "0.6421374", "0.6394349", "0.63339543", "0.6324639", "0.6302735", "0.6288701", "0.628846", "0.6286052", "0.6284178...
0.5962583
94
Method used to update specified set of records in specified collection of database
public Integer update(String collectionName,ArrayList<HashMap<String,Object>> data) { return processUpdateQuery(collectionName,data,false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKeySelective(Collect record);", "int updateAllComponents(RecordSet inputRecords);", "int updateByPrimaryKeySelective(FileSet record);", "int updateByPrimaryKey(Collect record);", "public <T> Collection<T> updateAll(Collection<T> entities);", "int updateByPrimaryKey(FileSet record);", ...
[ "0.7398918", "0.7219724", "0.7159674", "0.71364516", "0.71322477", "0.70135146", "0.68435323", "0.67258734", "0.66755956", "0.6657106", "0.66559714", "0.662251", "0.6618923", "0.6618451", "0.6610117", "0.6559359", "0.6550652", "0.65446806", "0.65307844", "0.6521165", "0.65207...
0.0
-1
Databases specific method to send SELECT query to server and return RAW result
Object executeSelectQuery(String sql) { return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCod...
[ "0.6533181", "0.6533181", "0.65329677", "0.65309405", "0.65309405", "0.64986485", "0.6415533", "0.6392858", "0.63229525", "0.6240446", "0.61245847", "0.60955846", "0.60577863", "0.60039467", "0.5998865", "0.5962854", "0.59421426", "0.59376687", "0.59227556", "0.59002346", "0....
0.6646389
0
Method used to transform RAW result of SELECT query returned by server to array of rows
ArrayList<HashMap<String,Object>> processQueryResult(Object result,String collectionName) { ArrayList<Map<String,Object>> rawRows = parseQueryResult(result); if (rawRows == null || rawRows.size()==0) return null; ArrayList<HashMap<String,Object>> resultRows = new ArrayList<>(); for (Map<String,Object> rawRow: rawRows) { HashMap<String,Object> resultRow = processQueryResultRow(rawRow,collectionName); if (resultRow.size()>0) resultRows.add(resultRow); } return resultRows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int ...
[ "0.61707807", "0.61429375", "0.6115746", "0.6060453", "0.6028651", "0.6008751", "0.59879094", "0.5878787", "0.58459187", "0.5813331", "0.5760441", "0.5751669", "0.57378507", "0.5727813", "0.57225794", "0.5708294", "0.5694526", "0.5688657", "0.5681253", "0.56765544", "0.566847...
0.5197415
69
Method used to transform RAW query result to array of rows (without transofrming field values)
ArrayList<Map<String,Object>> parseQueryResult(Object result) { return null;}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"NewApi\")\n private ObjectNode getRowsResultFromQuery(Cursor cur) {\n ObjectNode rowsResult = objectMapper.createObjectNode();\n\n ArrayNode rowsArrayResult = rowsResult.putArray(\"rows\");\n\n if (cur.moveToFirst()) {\n // query result has rows\n int ...
[ "0.63449526", "0.62988025", "0.6069758", "0.6058757", "0.60295206", "0.60173696", "0.6015432", "0.5883461", "0.58822423", "0.5867945", "0.58180237", "0.57205987", "0.5677566", "0.5673005", "0.5671554", "0.5648682", "0.56279194", "0.5625614", "0.5613075", "0.55904645", "0.5555...
0.5604263
19
Method used to transform RAW row returned from database server to HashMap
HashMap<String,Object> processQueryResultRow(Map<String,Object> rawRow, String collectionName) { HashMap<String,Object> resultRow = new HashMap<>(); for (String key: rawRow.keySet()) { Object value = rawRow.get(key); if (collectionName != null) value = formatFieldValue(collectionName,key,value); if (value != null) resultRow.put(key,value); } return resultRow; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset)\n/* */ {\n/* 1406 */ return getHashMapfromResultSetRow(resultset, new ArrayList());\n/* */ }", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "public static void convertRsToMap(ResultSet rs...
[ "0.697868", "0.68452287", "0.6385909", "0.6204232", "0.61927366", "0.59679747", "0.5916653", "0.5902011", "0.5843166", "0.58011824", "0.57747126", "0.57740295", "0.5773735", "0.57670814", "0.5756792", "0.5704995", "0.5686591", "0.56848574", "0.5669112", "0.561747", "0.5574252...
0.70505047
0
Base method, used to insert or update data in database
abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void updateDatabase();", "@Override\n\tpublic void insertUserAndShopData() {\n\t\t\n\t}", "@Override\n public void DataIsInserted() {\n }", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "private void updat...
[ "0.6657283", "0.6555757", "0.6522189", "0.6440331", "0.6432963", "0.63403344", "0.63161916", "0.6279026", "0.6216459", "0.6203567", "0.62014556", "0.61891264", "0.61839664", "0.6156668", "0.6136865", "0.61368084", "0.6087367", "0.60771096", "0.6075639", "0.6054844", "0.605405...
0.5756131
94
Utility Method checks if provided collection field has correct configuration
boolean isValidFieldConfig(String collectionName,String fieldName) { if (getFieldConfigValue(collectionName,fieldName,"name")==null) return false; if (getFieldConfigValue(collectionName,fieldName,"type")==null) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasCollectionName();", "protected Boolean isJavaCollection(final Object dataObject, final String fieldName)\n {\n try\n {\n Field fld = dataObject.getClass().getDeclaredField(fieldName);\n if (fld != null)\n {\n return Collection.class.isAs...
[ "0.64362854", "0.63278204", "0.60712427", "0.5923533", "0.5907897", "0.5894762", "0.5798755", "0.57757956", "0.5771319", "0.5709895", "0.56713533", "0.5650117", "0.5645303", "0.5622607", "0.5570087", "0.55301476", "0.55261624", "0.55089176", "0.54902", "0.5486837", "0.5476544...
0.7015575
0
Utility method which returns value of specified config parameter of specified field
Object getFieldConfigValue(String collectionName,String fieldName,String variable) { HashMap<String,Object> field = getFieldConfig(collectionName,fieldName); if (field == null) return null; return field.containsKey(variable) ? field.get(variable) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConfigurationValue(String name);", "ParameterConfiguration getParameterConfiguration(String name);", "abstract public String getValue(String fieldname);", "protected String getConfigurationParamValue(String parameter) {\n return configuration.getParameter(parameter);\n }", "java....
[ "0.62043947", "0.61641914", "0.6113447", "0.60360295", "0.5893968", "0.58883786", "0.58475536", "0.5785546", "0.57774603", "0.5754173", "0.57517976", "0.567835", "0.5656306", "0.5645214", "0.5577453", "0.5562489", "0.5560732", "0.5529046", "0.5510998", "0.5500271", "0.5487328...
0.7052262
0
Returns configuration object with all configuration parameters for specified field from config file
HashMap<String,Object> getFieldConfig(String collectionName,String fieldName) { HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName); if (fields == null || !(fields instanceof HashMap<?,?>)|| !fields.containsKey(fieldName)) return null; return (HashMap<String,Object>)fields.get(fieldName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ParameterConfiguration getParameterConfiguration(String name);", "public String getConfigurationField() {\n return configField;\n }", "public FileConfiguration loadConfiguration(File file);", "private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathToo...
[ "0.6285341", "0.62183523", "0.61810076", "0.6166206", "0.60645235", "0.6046059", "0.6046059", "0.6046059", "0.6046059", "0.6018319", "0.6000509", "0.59938294", "0.5907342", "0.5875746", "0.58059883", "0.579685", "0.57943827", "0.5773684", "0.5771637", "0.5748405", "0.5747957"...
0.5096338
100
Method returns path of Collection configuration, related to fields of collection
HashMap<String,Object> getCollectionFieldsConfig(String collectionName) { HashMap<String,Object> collection = getCollectionConfig(collectionName); if (collection == null || !collection.containsKey("fields") || !(collection.get("fields") instanceof HashMap<?,?>)) return null; return (HashMap<String,Object>)collection.get("fields"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLogCollectionPath();", "String getCollection();", "java.lang.String getCollection();", "public java.lang.String getCollection() {\n return collection_;\n }", "Set<String> getCollectionFields(String collectionName) {\n HashMap<String,Object> fields = getCollectionFieldsConfig(col...
[ "0.6349473", "0.63092613", "0.6258524", "0.61345965", "0.60372245", "0.6023729", "0.591983", "0.59140253", "0.5913551", "0.5902763", "0.56759524", "0.5648603", "0.56396616", "0.5629482", "0.55905294", "0.5580353", "0.5577809", "0.55503", "0.5469832", "0.5463266", "0.5422139",...
0.60095906
6
Method returns list of field names in collection
Set<String> getCollectionFields(String collectionName) { HashMap<String,Object> fields = getCollectionFieldsConfig(collectionName); Set<String> result = fields.keySet(); // result.remove(getIdFieldName(collectionName)); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getFieldNames()\n {\n return this.fieldMap.keyArray(String.class);\n }", "public String[] getFieldNames();", "public Set<String> getFieldNames ()\n\t{\n\t\treturn m_Fields.keySet();\n\t}", "List<Field> getFields();", "public Set<String> getFieldNames() {\n Set<String> na...
[ "0.8045571", "0.7896012", "0.78136486", "0.7663972", "0.7532381", "0.7492775", "0.7369449", "0.7345632", "0.733289", "0.72494537", "0.72340214", "0.7086578", "0.7053476", "0.70257276", "0.6952192", "0.69404733", "0.685739", "0.6853742", "0.68361735", "0.6819713", "0.6803975",...
0.7187188
11
Returns configuration object for specified collection, which includes configuration for whole collection and for each field inside it
HashMap<String,Object> getCollectionConfig(String collectionName) { if (!this.collections.containsKey(collectionName)) return null; return (HashMap<String,Object>)collections.get(collectionName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "HashMap<String,Object> getCollectionFieldsConfig(String collectionName) {\n HashMap<String,Object> collection = getCollectionConfig(collectionName);\n if (collection == null || !collection.containsKey(\"fields\") ||\n !(collection.get(\"fields\") instanceof HashMap<?,?>)) return null;\...
[ "0.6840581", "0.62443113", "0.5916043", "0.56918573", "0.54398066", "0.53413546", "0.52297413", "0.5163558", "0.51477593", "0.51349235", "0.50925636", "0.50696355", "0.50635207", "0.5044737", "0.5031126", "0.5015993", "0.49601352", "0.48946175", "0.4894385", "0.4878065", "0.4...
0.63473254
1
Returns name of field, which specified collection uses as ID field (as specified in configuration file)
String getIdFieldName(String collectionName) { HashMap<String,Object> collection = getCollectionConfig(collectionName); if (collection == null || !collection.containsKey("idField")) return null; String indexField = collection.get("idField").toString(); if (!collection.containsKey("fields")) return null; HashMap<String,Object> fields = (HashMap<String,Object>)collection.get("fields"); if (!fields.containsKey(indexField)) return null; return indexField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getId() {\r\n\t\treturn option.getId() + \".\" + field.getName();\r\n\t}", "@AutoEscape\n\tpublic String getFieldId();", "@JsonValue\n\tpublic final String fieldId() {\n\t \treturn this.name().replace(\"_\", \".\");\n\t}", "@Override\r\n\tpublic String getIdFieldName() {\n\t\treturn null;\r\n\t}", "...
[ "0.70415413", "0.6985785", "0.68618923", "0.67769736", "0.6678286", "0.66716903", "0.6498007", "0.6393075", "0.6340716", "0.63231045", "0.61810213", "0.6150439", "0.60992587", "0.604358", "0.60239196", "0.59780675", "0.5951111", "0.5906589", "0.5897352", "0.5897352", "0.58973...
0.8346081
0
Formats value for specified field for UPDATE or INSERT query, depending on type of this field, defined in configuration file
Object formatFieldValue(String collectionName,String fieldName,Object value) { if (!isValidFieldConfig(collectionName,fieldName)) return null; if (value == null) return null; String type = getFieldConfigValue(collectionName,fieldName,"type").toString(); try { switch (type) { case "decimal": return Double.valueOf(value.toString()); case "integer": return Double.valueOf(value.toString()).intValue(); case "string": return value.toString(); } } catch (Exception e) { syslog.log(ISyslog.LogLevel.WARNING, "Could not format field value '"+value+"' of field '"+fieldName+"'"+ "in collection '"+collectionName+"'", this.getClass().getName(),"formatFieldValue"); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getValueFormatted();", "@Override\n\t\t protected String formatPropertyValue(Object rowId,\n\t\t Object colId, Property property) {\n\t\t if (property.getType() == Date.class && property.getValue() != null) {\n\t\t SimpleDateFormat df = new SimpleDateFormat(\"dd-MM-yyyy\");...
[ "0.60425717", "0.6009626", "0.59584796", "0.5845358", "0.577254", "0.56785786", "0.56125474", "0.55996585", "0.5588621", "0.54886264", "0.5437965", "0.5421555", "0.53825593", "0.5376186", "0.5367059", "0.52983075", "0.52895206", "0.52513385", "0.52373874", "0.5226786", "0.522...
0.61133635
0
Returns unique name of adapter
public String getName() { return "Database_adapter-"+this.name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String adapterId() {\n return this.adapterId;\n }", "public String networkAdapterName() {\n return this.networkAdapterName;\n }", "public static String getDeviceName(){\n BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();\r\n if (bluetoothAdapter ...
[ "0.70668066", "0.67893183", "0.67445993", "0.6498644", "0.6453069", "0.6313172", "0.6178478", "0.60431105", "0.6035273", "0.59999275", "0.59154844", "0.5912238", "0.5910917", "0.5875842", "0.5869303", "0.5865641", "0.58351", "0.5799074", "0.57934064", "0.57934064", "0.5793406...
0.7595347
0
Returns path which System logger uses to write messages, related to this adapter
public String getSyslogPath() { return LoggerApplication.getInstance().getLogPath()+"/db/"+this.getName()+"/"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getApplicationDirectory() {\n return Comm.getAppHost().getAppLogDirPath();\n }", "public String getLogCollectionPath();", "public static String getLogFilesPath() {\r\n return new File(TRACELOG).getAbsolutePath();\r\n }", "Path getLogFilePath();", "private St...
[ "0.6548512", "0.65028036", "0.6477337", "0.63009095", "0.6248265", "0.6167091", "0.6153711", "0.6133123", "0.61052823", "0.5875629", "0.5856919", "0.58427244", "0.5816785", "0.57964", "0.573773", "0.56886613", "0.5683397", "0.56565416", "0.56146675", "0.5607605", "0.5593923",...
0.72239476
0
Method used to manually assing System logger object to this adapter
public void setSyslog(ISyslog syslog) { this.syslog = syslog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private native void initialiseLoggerReference(Logger logger);", "private native void initialiseLoggerReference(Logger logger);", "public SystemLog () {\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void initLogger() {\n\t\t\n\t}", "public static void initLogger(Logger l_) {\n l = l_;\n }", "pri...
[ "0.6543853", "0.6543853", "0.6303322", "0.62332094", "0.61941695", "0.60347235", "0.60243356", "0.6013855", "0.59858876", "0.5904955", "0.5870437", "0.5850323", "0.583321", "0.58270746", "0.58089334", "0.57879144", "0.57869", "0.57858384", "0.57846683", "0.5768295", "0.576111...
0.0
-1
TODO Autogenerated method stub
@Override public void windowLostFocus(final WindowEvent windowevent) { }
{ "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
Creates taxes and shipping rates for US and EU customers
public interface IOrderFactory{ /** * Creates a collection of taxes for US and EU customers * * @return the sales tax */ public ISalesTax getTaxObject(); /** * Creates the shipping cost for US and EU customers * * @return shipping cost */ public IShippingRate getRateObject(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicInco...
[ "0.6381021", "0.60605067", "0.5982427", "0.59302884", "0.5889059", "0.5785746", "0.57847154", "0.57784563", "0.5745025", "0.5733781", "0.5670314", "0.56680596", "0.564718", "0.56236047", "0.5612866", "0.5598089", "0.5557857", "0.55575484", "0.5532443", "0.55061734", "0.550503...
0.50410116
68
Creates a collection of taxes for US and EU customers
public ISalesTax getTaxObject();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Tax[] getTaxes() {\n Tax[] taxes = new Tax[DeclarationFiller.getDeclaration().size()];\n int count = 0;\n if (taxes != null ) {\n for (Map.Entry<String, Integer> incomePoint : DeclarationFiller.getDeclaration().entrySet()) {\n String taxName = \"Tax of \...
[ "0.61922824", "0.6126563", "0.5744419", "0.5741213", "0.5737817", "0.5689521", "0.56596875", "0.5652845", "0.5619456", "0.5571173", "0.55452734", "0.5528012", "0.5491031", "0.54793066", "0.5463414", "0.5462034", "0.54266155", "0.5409322", "0.5389064", "0.5383513", "0.5379069"...
0.51987267
33
Creates the shipping cost for US and EU customers
public IShippingRate getRateObject();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ShipmentCostEstimate createShipmentCostEstimate();", "public void setshippingcost() {\r\n\t\tshippingcost = getweight() * 3;\r\n\t}", "double calculateDeliveryCost(Cart cart);", "public double calculateShipping() {\n shipAmount = (SHIPPINGCOST);\n\n return shipAmount;\n }", "public double ...
[ "0.6784431", "0.6644519", "0.65329033", "0.61737305", "0.6164038", "0.611718", "0.60908544", "0.60333854", "0.59730583", "0.59190744", "0.58977395", "0.5840618", "0.5761093", "0.57484233", "0.5669704", "0.56367695", "0.56294507", "0.5627683", "0.5627396", "0.56121665", "0.560...
0.0
-1
Draws on lines to show a door or show a wall
private void drawWalls(Graphics g) { for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ if(grid[i][j].getNorth()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding+doorX, i*heightBlock+padding, j*widthBlock+padding+doorWidth, i*heightBlock+padding); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding+widthBlock, i*heightBlock+padding); } if(grid[i][j].getEast()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding+doorX, (j+1)*widthBlock+padding, i*heightBlock+padding+doorWidth); }else { g.setColor(Color.BLACK); g.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding); } if(grid[i][j].getSouth()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding+doorX, (i+1)*heightBlock+padding, j*widthBlock+padding+doorWidth, (i+1)*heightBlock+padding); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, (i+1)*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding); } if(grid[i][j].getWest()!=null) { g.setColor(Color.decode("#CC3300"));//Brown g.drawLine(j*widthBlock+padding, i*heightBlock+padding+doorX, j*widthBlock+padding, i*heightBlock+padding+doorWidth); }else { g.setColor(Color.BLACK); g.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding, (i+1)*heightBlock+padding); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void drawOn(DrawSurface d) {\n d.setColor(getColor());\n for (int i = 0; i < thick / 2; i++) {\n d.drawLine((int) p1.getX() + i, (int) p1.getY() + i,\n (int) p2.getX() + i, (int) p2.getY() + i);\n d.drawLine((int) p1.getX() - i, (int) p1....
[ "0.6810639", "0.6754445", "0.66724634", "0.66517174", "0.6571702", "0.65346634", "0.64818966", "0.6413934", "0.6392304", "0.6389408", "0.6371788", "0.6343297", "0.6332603", "0.6317734", "0.6307784", "0.6270617", "0.6268392", "0.6233398", "0.6232217", "0.62169063", "0.6206677"...
0.62464136
17
draws the players on the map
private void drawPlayers(Graphics g){ g.setColor(Color.BLACK); for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ for(GameMatter itm: grid[i][j].getItems()){ if(itm instanceof Bandit){ if(itm.equals(player)) g.setColor(Color.MAGENTA); g.fillRect(j*widthBlock+padding, i*heightBlock+padding, bandit, bandit); break; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void draw() {\n // Clear the canvas\n// canvas.setFill(Color.BLACK);\n// canvas.fillRect(0, 0, canvasWidth, canvasHeight);\n canvas.clearRect(0, 0, canvasWidth, canvasHeight);\n\n // Draw a grid\n if (drawGrid) {\n canvas.setStroke(Color.LIGH...
[ "0.78781533", "0.77044207", "0.68870103", "0.68864965", "0.67888045", "0.6769833", "0.67662877", "0.6709445", "0.6700317", "0.666774", "0.66251", "0.65768623", "0.65723884", "0.6567312", "0.6546484", "0.65450144", "0.64983606", "0.6497253", "0.6434914", "0.6414678", "0.638932...
0.6789573
4
Draws a textual map in the console to show the layout of the rooms
public void drawTextualMap(){ for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ if(grid[i][j] instanceof Room){ if(((Room)grid[i][j]).getItems().size()>0) System.out.print(" I "); else System.out.print(" R "); }else{ System.out.print(" = "); } } System.out.println(); } System.out.println("rows = "+grid.length+" cols = "+grid[0].length); System.out.println("I = Room has Item, R = Room has no Item, '=' = Is a Hallway"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length...
[ "0.7809612", "0.7169309", "0.71593994", "0.7153362", "0.70436317", "0.6836345", "0.6835923", "0.67051035", "0.67002577", "0.66054064", "0.65865725", "0.65654296", "0.65089214", "0.648082", "0.647691", "0.64131546", "0.6405101", "0.63885397", "0.6383444", "0.6349047", "0.63234...
0.7947027
0
/Had to use validate functions this way because if we put them directly in if condition they get validated in one by one and if one validate doesn't pass second one is not checked
public void login(ActionEvent e) { boolean passwordCheck = jf_password.validate(); boolean emailCheck = jf_email.validate(); if (passwordCheck && emailCheck) { new LoginRequest(jf_email.getText(), jf_password.getText()) { @Override protected void success(JSONObject response) { Platform.runLater(fxMain::switchToDashboard); } @Override protected void fail(String error) { Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK); alert.showAndWait(); } }; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate() {\n\n etCardNumber.validate();\n\n etCardExpiryDate.validate();\n\n etCardCvv.validate();\n\n etCardHolderName.validate();\n\n etPhoneNumber.validate();\n\n etCustomerName.validate();\n }", "private boolean validateInputs(){\n if(jrTakeTest....
[ "0.6850894", "0.67595834", "0.6730557", "0.6675574", "0.66226524", "0.65737927", "0.65683496", "0.6507772", "0.6436", "0.6417745", "0.64097553", "0.6389561", "0.6336553", "0.6317164", "0.6313198", "0.6301962", "0.6298249", "0.62804896", "0.6270512", "0.6257546", "0.6254563", ...
0.0
-1
To change body of implemented methods use File | Settings | File Templates.
@Override public void handle(KeyEvent keyEvent) { if(keyEvent.getCode() == KeyCode.ENTER){ ChatPane2 chatPanel=mainMenuGUI.getChatPane(); Message mess=new Message(mainMenuGUI.getFacade().getClientAccount(), null,chatPanel.getChatMessage()); mess.setStatus(MessageStatus.broadcast); chatPanel.addChatMessage(mainMenuGUI.getFacade().getUsername(),chatPanel.getChatMessage()); com.write(mess); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\...
[ "0.7433265", "0.73881614", "0.737956", "0.73416275", "0.73358285", "0.7327191", "0.73041445", "0.73041445", "0.728817", "0.72624195", "0.72232515", "0.72232515", "0.71848667", "0.7173255", "0.7117004", "0.71078736", "0.70787567", "0.7042354", "0.700999", "0.69963306", "0.6987...
0.0
-1
return DataBindingUtil.inflate(inflater, R.layout.fragment_wallet, container, false).getRoot();
@Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_asset_history, container, false); ButterKnife.bind(this, view); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n accountInfoBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_account_info, container, false);\n return accountInfoBinding.getRoot();\n }", ...
[ "0.67088574", "0.6649209", "0.65375334", "0.64892936", "0.648045", "0.64689153", "0.6395284", "0.63702065", "0.6333364", "0.63268083", "0.63214314", "0.63111657", "0.63037294", "0.6270131", "0.6266732", "0.6188344", "0.616828", "0.6163571", "0.6121994", "0.6118452", "0.610014...
0.0
-1
A helper method that changes letters to numbers
private char enumerate(char input, int t) { boolean charfound = false; char output = 0; char[] n1 = {'1','2','3','4','5','6'}; //first set of numbers char[] n2 = {'3','4','5','6','1','2'}; //second set, if previous value was number char[] c = {'A','E','I','O','U','Y'}; for (int i=0;i<c.length;i++) { // go through c and see if match is made, and then change to value in n1 and n2 if (charfound==false) { if (t==1 && input==c[i]) { charfound = true; output = n1[i]; } if (t==2 &&input==c[i]) { charfound = true; output = n2[i]; } } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void convertAlphaToNumeric(StringBuffer buf)\n {\n byte byteLetter = 0;\n\n for (int letter = 0; letter < buf.length(); letter++)\n {\n\n // get the index value of 1 to 26 of the letter and then take the modulo of 10\n byteLetter = (byte) (buf.charAt(let...
[ "0.7197731", "0.705439", "0.64388764", "0.64312375", "0.6343665", "0.63364995", "0.6320339", "0.62846726", "0.6259618", "0.62552947", "0.6245194", "0.6228943", "0.6223217", "0.62167746", "0.61787033", "0.61425084", "0.6141035", "0.6107778", "0.6062665", "0.60607356", "0.60533...
0.0
-1
A helper method that changes numbers to letters
private char denumerate(char input, int t) { boolean charfound = false; char output = 0; char[] n1 = {'1','2','3','4','5','6'};//first set of numbers char[] n2 = {'3','4','5','6','1','2'};//second set, if previous value was number char[] c = {'A','E','I','O','U','Y'}; for (int i=0;i<c.length;i++) { // go through n1 or n2 and see if match is made, and then change to value in c if (charfound==false) { if (t==1 && input==n1[i]) { charfound = true; output = c[i]; } if (t==2 &&input==n2[i]) { charfound = true; output = c[i]; } } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "char caseconverter(int k,int k1)\n{\nif(k>=65 && k<=90)\n{\nk1=k1+32;\n}\nelse\nif(k>=97 && k<=122)\n{\nk1=k1-32;\n}\nreturn((char)k1);\n}", "public char intToLetter(int val){\n\t\t\t// val is assumed to be an integer < MAXUINT so its unsigned value is the same\n\t\t\t// as the signed representation so we don't ...
[ "0.7217341", "0.7020619", "0.6691838", "0.66614133", "0.6645744", "0.66420245", "0.66068304", "0.64737016", "0.64688015", "0.64538914", "0.64128906", "0.63809305", "0.63472664", "0.63319474", "0.6319784", "0.63075995", "0.6256813", "0.6253343", "0.624578", "0.6240863", "0.621...
0.0
-1
A method that encodes a block of text
public String encode(String input) { String encoded = ""; char[] message = input.toCharArray(); for (int j = 0; j < message.length; j++) { //takes input into a array of chars encodingQueue.enqueue(message[j]); } char lastvalue =0; boolean islastvaluenum= false; for(int i=0; i<message.length;i++) { char character = encodingQueue.dequeue(); if(character != ' ') { //if not a space String alphabet = "abcdefghijklmnopqrstuvwxyz"; if(islastvaluenum ==false) { //if last value was not a num, then proceed normally with first set of numbers char encodedvalue=enumerate(character,1); if(encodedvalue !=0) { islastvaluenum = true; lastvalue = encodedvalue; encoded = encoded +encodedvalue; } else { islastvaluenum = false; int shiftvalue = 5+(2*i); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) { // look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; lastvalue = character; encoded = encoded+ character; } } else { char encodedvalue=enumerate(character,2);//if last value was a num, then proceed with second set of numbers if(encodedvalue !=0) { islastvaluenum = true; lastvalue = encodedvalue; encoded = encoded +encodedvalue; } else { islastvaluenum = false; int shiftvalue = (5+(2*i))+((lastvalue-'0')*(-2)); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; lastvalue = character; encoded = encoded+ character; } } } else{ encoded = encoded + ' '; } } return encoded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void encoding(String plainText)\n\t{\n\t\ttextLength = plainText.length();\n\t\thalfTextLength = textLength / TWO;\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\n\t\t\tif(textLength % TWO != ZERO)\n\t\t\t{\n\t\t\t\tencodingOneHalf = plainText.substring(ZERO, (halfTextLength + O...
[ "0.6409813", "0.62855005", "0.58853596", "0.5883844", "0.5860879", "0.5831962", "0.57939154", "0.57013625", "0.5697283", "0.56917363", "0.5687257", "0.56640923", "0.56007993", "0.5560545", "0.554539", "0.55300987", "0.55138767", "0.54520434", "0.543805", "0.54029846", "0.5390...
0.0
-1
A method that decodes a block of text
public String decode(String input) { String decoded = ""; char[] message = input.toCharArray(); for (int j = 0; j < message.length; j++) { //takes input into a array of chars decodingQueue.enqueue(message[j]); } char lastvalue =0; boolean islastvaluenum= false; for (int i = 0; i < input.length(); i++) { char character = decodingQueue.dequeue(); if(character != ' ') { //if not a space String alphabet = "abcdefghijklmnopqrstuvwxyz"; if (islastvaluenum==false) { //if last value was not a num, then proceed normally with first set of numbers char decodedvalue = denumerate(character, 1); if (decodedvalue != 0) { islastvaluenum = true; decoded = decoded + decodedvalue; } else { islastvaluenum = false; int shiftvalue = -(5+(2*i)); boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue)% chararray.length]; charfound = true; } } } character = output; decoded = decoded + character; } } else { char decodedvalue = denumerate(character, 2); //if last value was a num, then proceed with second set of numbers if (decodedvalue != 0) { islastvaluenum = true; decoded = decoded+ decodedvalue; } else { islastvaluenum = false; int shiftvalue1 = -5; boolean charfound = false; char[] chararray = (alphabet.toUpperCase()).toCharArray(); char output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue1)% chararray.length]; charfound = true; } } } character = output; int shiftvalue2 = (2 * (lastvalue - '0'))-(i * 2); charfound = false; chararray = (alphabet.toUpperCase()).toCharArray(); output = 'n'; for (int j=0;j<chararray.length;j++) {// look through the alphabet and see if character matches, then shift accordingly to shiftby if (charfound==false) { if (character == chararray[j]) { output = chararray[(j+chararray.length+shiftvalue2)% chararray.length]; charfound = true; } } } character = output; decoded = decoded + character; } } lastvalue = character; } else{ decoded = decoded + ' '; } } return decoded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TextDecoder getTextDecoder();", "String decodeString();", "void setTextDecoder(TextDecoder decoder);", "private void decoding(String cipherText)\n\t{\n\t\ttextLength = cipherText.length();\n\n\t\tdo\n\t\t{\n\t\t\tStringBuffer sb = new StringBuffer(textLength);\n\t\t\tchar currentLetter[] = cipherText.toCha...
[ "0.6892116", "0.6099572", "0.60322183", "0.6026943", "0.60039824", "0.5913591", "0.5752586", "0.5705776", "0.567713", "0.56477565", "0.5644535", "0.56278354", "0.55812", "0.5576539", "0.55724025", "0.5566675", "0.5526283", "0.5513124", "0.5495356", "0.5475974", "0.5470672", ...
0.0
-1
/ The users will need to find out when the campsite is available. So the system should expose an API to provide information of the availability of the campsite. for a given date range with the default being 1 month.
@CrossOrigin(origins = "http://campsiteclient.herokuapp.com", maxAge = 3600) @GetMapping public JSONArray checkAvaibility(@RequestParam(value = "from") Optional<String> from, @RequestParam(value = "to") Optional<String> to) throws java.text.ParseException { String startDateStringFormat = from .orElse(dateUtils.formatDate(dateUtils.addDays(1, new Date()))); String endDateStringFormat = to .orElse(dateUtils.formatDate(dateUtils.addDays(31, new Date()))); Date startDate = bookingServiceImpl.formatDate(startDateStringFormat); Date endDate = dateUtils.formatDate(endDateStringFormat); List<BookingDate> bookedDates = bookingDateRepository.getBooking(startDate, endDate); List<String> list = new ArrayList<String>(); for (BookingDate bookingDate : bookedDates) { Date date = bookingDate.getBookingDate(); String dateToString = dateUtils.formatDate(date); list.add(dateToString); } JSONArray result = bookingServiceImpl .getAvailableDates(new HashSet<BookingDate>(bookedDates), startDate, endDate); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAvailability(String date) {\n\t\tavailableAt = date;\n\t}", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public List<String> getEligibleForAutoApproval(Date todayAtMidnight);", "public DateAvailableVO checkDateAvailable(String date) {\n\t...
[ "0.61080706", "0.5880207", "0.58483016", "0.58474344", "0.5827578", "0.57382685", "0.57302874", "0.5686239", "0.55982167", "0.5590142", "0.55883425", "0.55576664", "0.5553434", "0.5543628", "0.55402356", "0.5530535", "0.5513532", "0.55035037", "0.54575104", "0.5432328", "0.54...
0.56913704
7
PRIVATE METHOD TO GET ALL RESERVED DATES FOR THIS CLASS ACCESS ONLY
private JSONArray findAll() throws ParseException, java.text.ParseException { return (JSONArray) new JSONParser() .parse(new Gson().toJson(bookingDateRepository.findCampsiteVacancy())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "Date getDataIns();", "public static List<Long> getData_entryDates() {\r\n\t\treturn data_entryDates;\r\n\t}", "public Date getFechaExclusion()\r\n/* 160: */ {\r\n/* 161:178 */ return this.fechaExclusion;\r\n/*...
[ "0.67575514", "0.64265305", "0.63615745", "0.6222628", "0.60174596", "0.6014689", "0.5969568", "0.59333324", "0.5828819", "0.5808895", "0.57547957", "0.57544553", "0.5747441", "0.5739001", "0.5738507", "0.5723305", "0.5700499", "0.56748444", "0.56690097", "0.56604135", "0.564...
0.0
-1
END OF THE METHOD
public void seeReservation(RoomList roomList){ System.out.println("What is the name of the guest you wish to check a reservation for ?"); keyboard.nextLine(); String name = keyboard.nextLine(); Room room = null; for(Room r: roomList.getList()){ if(!r.isEmpty(r)) { room = r.findRoomByName(r, name); room.getGuestNames(room); } } }
{ "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\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t...
[ "0.6597582", "0.6506207", "0.64168066", "0.6341521", "0.63264173", "0.6264355", "0.6264355", "0.6224028", "0.61969095", "0.6137274", "0.61338806", "0.61065507", "0.6092583", "0.6077934", "0.607073", "0.60662365", "0.6053713", "0.6043748", "0.60300463", "0.60196507", "0.598678...
0.0
-1
Fetch all the weeks
@RequestMapping(value = "/week/all", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getAllWeek() { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getAllWeeks(); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (Pre...
[ "0.7889447", "0.68866795", "0.6707855", "0.66206247", "0.64925545", "0.6422638", "0.631613", "0.62936336", "0.6241932", "0.6212908", "0.61953735", "0.6136361", "0.6130621", "0.61272204", "0.60846615", "0.60487056", "0.60427207", "0.6029344", "0.6012885", "0.59992963", "0.5987...
0.73140496
1
Fetch all the weeks from a training batch
@RequestMapping(value = "/week/batchid/{batchId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable("batchId") int batchId) { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getWeekByBatchId(batchId); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "@RequestMapping(value = \"/week/all\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getAllWeek() {\n\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {...
[ "0.6875342", "0.6305759", "0.61536187", "0.5929149", "0.5917931", "0.58590025", "0.58479905", "0.58421665", "0.5808559", "0.578849", "0.57662016", "0.56868994", "0.56408197", "0.5634671", "0.5627586", "0.56097215", "0.55564165", "0.5551122", "0.55267066", "0.5521872", "0.5492...
0.63786584
1
Fetch a specific week from all batches
@RequestMapping(value = "/week/weeknumber/{weeknumber}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<List<Week>> getWeekByWeekNumber(@PathVariable("weeknumber") int weeknumber) { ResponseEntity<List<Week>> returnEntity; try { List<Week> result = businessDelegate.getWeekByWeekNumber(weeknumber); if (result == null) { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.NOT_FOUND); } else { returnEntity = new ResponseEntity<List<Week>>(result, HttpStatus.OK); } } catch (RuntimeException e) { returnEntity = new ResponseEntity<List<Week>>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/week/batchid/{batchId}\", \n\t\t\tmethod = RequestMethod.GET, \n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<Week>> getWeekByBatchId(@PathVariable(\"batchId\") int batchId) {\n\t\tResponseEntity<List<Week>> returnEntity;\n\n\t\ttry {\n\t\t\tList<Week> ...
[ "0.6570202", "0.62574756", "0.6193082", "0.6186924", "0.6140729", "0.6011578", "0.5975218", "0.59691775", "0.5888566", "0.5878465", "0.576653", "0.5708141", "0.5690527", "0.5652854", "0.56462413", "0.5619135", "0.5613593", "0.5599714", "0.5580794", "0.55500174", "0.5543486", ...
0.562066
15