query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Basic constructor without id
public Computer(String name, Company company) { this.name = name; this.company = company; }
[ "public abstract T constructor();", "ConstructorDemo (int id, String n, char g)\n\t// Constructor with parameters and does not return any value\n\t{\n\t\tsid = id; // passing the value of the constructor into the class variable\n\t\tname = n;\n\t\tgrade = g;\n\t\t\n\t}", "public ni() {}", "public Constructor_...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
boolean mo993a(int i, long j);
[ "public interface C3511a {\n /* renamed from: a */\n void mo29057a(int i);\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public interface ans {\n /* renamed from: a */\n void mo1174a();\n}", "public interface C24712af {\n /* renamed from...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.laex.cg2d.model.CGShape shape = 5;
public int getShapeCount() { if (shapeBuilder_ == null) { return shape_.size(); } else { return shapeBuilder_.getCount(); } }
[ "abstract public void shape();", "public void setShape(Shape shape) {\n\t\t\n\t}", "public final Shape getShape(){return mShape;}", "com.nent.mam.proto.vidispineproto.Shape getShape();", "public Shape getShape(){\n\t\treturn shape;\t\t\n\t}", "public abstract Shape getGraphicShape();", "public String ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Voegt een ingelogde user toe aan de lijst met users in de lobby
public boolean addUser(User user) throws RemoteException;
[ "public void getLoginUser() {\n for( User u : Users.getInstance().getUserList() ) {\n if( u.getEnter().equals( \"true\" ) ) {\n loginUser = u;\n }\n }\n }", "@Override\n\tpublic boolean login(ApplUser user) {\n\t\tIterable<ApplUser> allUsers = userRepository.findAll();\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if a friendly piece is located south of coordinates row/column.
private boolean isFriendlySouth(int row, int column) { if(isOutOfBounds(row+2,column)) { return false; } if( board[row+2][column] == pieceColor || board[row+2][column] == Character.toLowerCase(pieceColor) ) { return true; } else ...
[ "public boolean isInTheSouthEast() {\n/* 18760 */ return (getTileX() > Zones.worldTileSizeX - Zones.worldTileSizeX / 3 && \n/* 18761 */ getTileY() > Zones.worldTileSizeY - Zones.worldTileSizeY / 3);\n/* */ }", "public boolean isInTheSouthWest() {\n/* 18770 */ return (getTileX() < Zones.world...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public Employee login2(int eid, String epassword) { return this.empb.login2(eid, epassword); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
//giving single letter in search box////
@Test public void singleLetter_in_searchbox() throws InterruptedException { driver.manage().timeouts().implicitlyWait(2000,TimeUnit.MILLISECONDS); WebElement tags_link = this.css_locator("link-to[lt-prop-route='index.tags']"); tags_link.click(); Thread.sleep(2000); WebElement search_box = this.css_locator("#...
[ "private int onLetterClicked(char letter){\n\t\tint code;\n\t\tif(searchedChars.contains(letter)){\n\t\t\tcode = 2;\n\t\t\tfeedbackLabel.shortText(letter+\" searched before\");\n\t\t} else {\n\t\t\tcode = hangmanWord.revealLetter(letter);\n\t\t\tsearchedChars.add(letter);\n\t\t}\n\t\treturn code;\n\t}", "abstract...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sums up all the elements in the specified row and returns the result
public int sumRow( int row ) { int total = 0; for (int col = 0; col < cols; col++) { total += data[row*cols + col]; } return total; }
[ "public double rsum(final int row);", "private static int GetSum( double[][] a_matrix, int a_row )\n {\n int sum = 0;\n\n for ( int i = 0; i < 7; i++ )\n {\n sum += a_matrix[ a_row ][ i ];\n }\n\n return sum;\n }", "public static int sumRow( int r , int[][] a ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
verifies whether a word is lower or equal than max
public static final boolean validateMaxCharacters(String word, Integer max) { return (word.length() <= max); }
[ "static String biggerIsGreater(String w) {\n int n = w.length();\n int start = n - 1;\n char[] word = w.toCharArray();\n while (start > 0) {\n if (word[start - 1] < word[start]) {\n break;\n }\n start--;\n }\n if (start == 0) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve at most 'length' bytes that correspond to the given file name. Either of the 'initialize' methods must be called before this method.
public byte[] getDocumentBytes(String file, int length) throws IOException;
[ "@Override\n public long fileLength(String name) throws IOException {\n File file = new File(getDirectory(), name);\n return getByteBuffer(file).length;\n }", "public long getLength() throws IOException;", "protected long length() {\n return file.length();\n }", "private int readNameLe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: w
void mo80529w();
[ "@Override\n\tpublic void wiper() {\n\t\t\n\t}", "void mo44758wW();", "int w();", "@Override\r\n\tpublic void zwroc() {\n\t\t\r\n\t}", "void wander();", "public void setW(int w){\n this.w = w;\n }", "withClause getW();", "atw mo11004b();", "public b d() {\n/* 203 */ return this.w;\n/* ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor of RequestAttributeConstant.
private RequestAttributeConstant() { }
[ "public RequestParams() {\n\t}", "public Request()\r\n {\r\n }", "@Contract(pure = true)\n public Request(@NotNull Request request) {\n this(request.url, request.requestMethod, request.requestBodyContentType, request.requestBody);\n }", "public RequestController() {\n }", "public Produ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is our delete starter method, this method will call the deleteRecursive method, we use this as a starter method and pass in the root of our binary tree and our value to insert
public void delete(int value) { //update the binary tree as a whole this.root = this.deleteRecursive(value, this.root); //the value to delete into the binary tree size--;//decrease the size }
[ "private TreeNode delete(TreeNode subTreeRoot, int value) {\n\t\tif (subTreeRoot == null){\n\t\t\treturn subTreeRoot;\n\t\t}\n\n\t\tif (value < subTreeRoot.getData()) {\n\t\t\tsubTreeRoot.setleftChild(delete(subTreeRoot.getleftChild(), value));\n\t\t} else \n\n\t\tif (value > subTreeRoot.getData()) {\n\t\t\tsubTre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
construct subnodes and count lines
@Override public void visit(JumpStmt js) throws Exception { int lc = 1; if (js.exp != null) { js.exp.accept(this); lc += js.exp.ast_rep.length; } js.ast_rep = new String[lc]; // initialize format js.ast_rep[0] = leading; for (int i = 1; i < lc; i++) js.ast_rep[i] = separator; // add comp...
[ "void incrementDescendantCount();", "public int getNodeCount(Object composite);", "protected abstract int expandedNodes();", "public Integer nodeCount();", "public int getNodeCount () ;", "long getDescendantCount();", "public IntAssertion toChildNodesCount() {\n checkActualIsNotNull();\n r...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ma hoa chuoi unicode thanh chuoi html
public static String encode(String strUNI) { return CharacterReference.encode(strUNI); }
[ "@Override\n\t\tpublic String toString() {\n\t\t\treturn\"Đã được thuê\";\n\t\t}", "@Test\n public void stringTest() {\n System.out.println(\"\\u5904\\u7406\\u6210\\u529f\\uff01\");\n }", "public static void writeUnicodeChar(Writer out, char c)\n throws IOException {\n if (!Charac...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Round the given value using the given step. If the value is on a step, the previous step is returned. roundDown(13000L, 2000) = 12000L roundDown(12000L, 2000) = 10000L roundDown(12001L, 2000) = 12000L roundDown(13999L, 2000) = 12000L
public static long roundDownExclude(long value, int step) { long mod = value % step; return mod == 0 ? value - step : value - mod; }
[ "public static double round(double value) {\n\t\tint places = 2;\n\t\tlong factor = (long) Math.pow(10, places);\n\t\tvalue = value * factor;\n\t\tlong tmp = Math.round(value);\n\t\treturn (double) tmp / factor;\n\t}", "public static double round(double value) {\n\n int places = 2;\n\n long factor =...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method displays the usage of CsvToSql class
public static void main (String[] args) { String csv_file = "your_directory/trip_data_all.csv"; String csv_sql = "your_directory/trip_data.sql"; if (CsvToSql.exist(csv_file)) { System.out.println("csv_file exists"); CsvToSql.convert(csv_file, csv_sql); } }
[ "@java.lang.Override\n\tpublic java.lang.String toString()\n\t{\n\t\treturn \"ImportCSV\";\n\t}", "@Override\n public String getDescription()\n {\n return \"*.csv\";\n }", "public static void main(String[] args) {\n \n\t\tScanner scn = new Scanner(System...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for the field x.
public void setX(final int x) { this.x = x; this.element.setBounds(this.x, this.y, this.width, this.height); this.parent.updateSize(); }
[ "public void setX(int x) {\n m_x = x;\n }", "public void setX(Number x) {\n\t\tthis.x = x;\n\t}", "public void setX(Number x) {\n this.x = x;\n }", "public void setX(int x)\n\t{\n\t\tm_x = x;\n\t}", "public void setX (int x) {\n\t\tthis.x = x;\n\t}", "public void setX(int x) {\n \t\tthis.x...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Khoi tao cac gia tri
private void clearOperator() { op1 = 0; op2 = 0; state = 1; op = 0; doneCaculate = false; doting = false; tvCaculating.setText("0"); tvResult.setText(convertString((op1))); }
[ "@Override\r\n public String toString() {\r\n return \"Triangulo{\" + \"cateto1=\" + cateto1 + \", cateto2=\" + cateto2 + \", hipotenusa=\" + hipotenusa + \", angulo1=\" + angulo1 + \", angulo2=\" + angulo2 + '}';\r\n }", "public TamGiac(){\r\n\t\t// de trong chua lam gi\r\n\t}", "public static voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form MyPage
public MyPage() { super("MyPage"); initComponents(); con=javaconnect.ConnecrDb(); Account(); Table1(); Table2(); }
[ "public Page createPage();", "void newPage();", "private void createPage() {\n\t\t\tconstants = GWT.create(Texts.class);\n\t\t\t//Set up labels\n\t\t\tmaleRadioButton.setText(constants.male());\n\t\t\tfemaleRadioButton.setText(constants.female());\n\t\t\t//Form contents\n\t\t\tclear();\n\t\t\tsetWidget(0, 0, ne...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This returns the label text for the adapted class.
@Override public String getText(Object object) { PRIORITY labelValue = ((Tuio2DObj)object).getPriority(); String label = labelValue == null ? null : labelValue.toString(); return label == null || label.length() == 0 ? getString("_UI_Tuio2DObj_type") : getString("_UI_Tuio2DObj_type") + " " + label; }
[ "String getTextLabel();", "public String getText(){\n return mLabel;\n }", "@Override\n public String getLabel();", "@Override\n\tpublic String getTextLabel() {\n\t\treturn textLabel;\n\t}", "public String getLabel(){\n if(label==null){\n return \"\";\n }\n return label;\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Funciones requeridas por Yacc
void yyerror(String msg) { Token lastToken = (Token) yylval; gestor.error("Sintáctico", "Token = " + lastToken.getToken() + ", lexema = \"" + lastToken.getLexeme() + "\". " + msg, lastToken.getStart()); }
[ "@Override\n\tpublic void yaz1() {\n\t\t\n\t}", "void mo3958xv();", "public abstract void alimentarse();", "public void func02() {\n\t\t\n\t}", "@Override\n\tpublic void func02() {\n\t\t\n\t}", "protected abstract void mo3493a();", "@Override\r\n\t\t\t\tvoid eval() {\r\n\r\n\t\t\t\t\t// YOUR CODE IN THI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by karums1 on 3/21/2017.
public interface IAppModel { String getPackageName(); String getAppName(); Drawable getAppIcon(); boolean isSelected(); String getProfileId(); String getUniqueId(); BlockLevel getBlockLevel(); boolean getIsLauncherApp(); void setSelected(boolean selected); void setUniqueId(Strin...
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Funkcia nastavi sudoku zoznam parnych policok
public void setOdds(List<List<Integer>> odds) { this.odds = odds; }
[ "public static void main(String[] args) {\n String[][] sudoku;\n sudoku = new String[][]{{\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"},\n {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"},\n {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"},\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called once after isFinished returns true
protected void end() { SmartDashboard.putString(BUTTON_PRESSING_TEST, "button not pressed"); }
[ "@Override\n\t\t\tprotected boolean isFinished() {\n\t\t\t\treturn true;\n\t\t\t}", "@Override\n protected boolean isFinished() {\n\n return false;\n\n }", "@Override\r\n protected boolean isFinished() {\n return false;\r\n }", "protected final boolean isFinished(){ return true; }", "prote...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test restore to original no redacted files url.
public void testRestoreToOriginalNoRedactedFilesURL(UrlInputDto urlInput) { String RedactedRetrieveEvidenceContent = CaseOtherUrl.deleteRestoreRedactedToOriginal(urlInput); WebResource webResource = client.resource(RedactedRetrieveEvidenceContent); Builder b = webResource.type(MediaType.MULTIPAR...
[ "boolean restore(File src, String target, boolean fileIsOriginName);", "@Test(expected=RedisPipelineException.class)\n\t@IfProfileValue(name = \"redisVersion\", value = \"2.6\")\n\tpublic void testRestoreBadData() {\n\t\tconnection.restore(\"testing\".getBytes(), 0, \"foo\".getBytes());\n\t\tgetResults();\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A representation of the model object 'Tell Data'.
public interface TellData extends shardata { }
[ "@Override\n\tpublic String toString() {\n\t\treturn \"Id = \" + id + \" Marka \" + marka + \" Model \" + model;\n\t}", "public String getData() {\n return getName() +\", id: \"+ getId();\n }", "@Override\r\n public String toString() {\r\n return \"\" + data;\r\n }", "@Override\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onClick(View v) { if (v == btnSure) { if (onSexCListener != null) { onSexCListener.onClick(strSex); } } else if (v == btnCancel) { } else if (v == lyChangeSexChild) { return; } else { dismiss(); } dismiss(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void run() { while (true) {//让线程一被启动的时候一直运行下面的代码 print.add1();//调用中间类中的add1方法 } }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tankvolumen / Verbrauch 100 30l / 6l/100km 100 = 500km
void druckeInfo() { System.out.printf("Der " + this.farbe + "e " + this.marke + " " + this.modell + " kommt " + "%.0f" + "km weit.\n", this.gebeMaxReichweite()); System.out.println("Die Seriennummer lautet " + this.serienNummer); }
[ "double fuelneeded(double miles) { \n return miles / kmperliter; \n }", "public double getEngineBraking(){\n if( rpm > MAX_RPM )\n return (1000-rpm)/(MAX_RPM-1000) * 150 + (MAX_RPM-rpm) * 0.75;\n else\n return (1000-rpm)/(MAX_RPM-1000) * 150;\n }", "public double Ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by QSB to get web suggestions for a query.
public abstract SourceResult queryInternal(String query);
[ "List<String> getSuggestions(String query);", "public interface HTTPSuggestionsFetcher {\n @GET(\"/sugg\")\n List<String> getHTTPSuggestions(@Query(\"nResults\") int numResults, @Query(\"command\") String keyword);\n}", "public static List<String> getSuggestions(String query) throws IOException {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Flush the output stream, if appropriate..
@Override public void flush() { }
[ "public static void flush()\n {\n writeBufferOut();\n }", "public void flushStreams() {\r\n\t\texecErrorStream.flush();\r\n\t\texecOutStream.flush();\r\n\t}", "public void flush() throws IOException {\n if (out == null) {\n throw new IOException(\"Trying to use aborted output stream\");\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Start a new discovery.
public void launchDiscovery(String targetPeerId) { PeerGroupAdvertisement pgAdv = group.getPeerGroupAdvertisement(); String searchStr = ""; // Discover other PicShare users by looking for their JxtaCast // back-channel pipe advertisements. Narrow the search by ...
[ "public static void start() {\r\n\t\t// Add a listener for device registration events\r\n\t\tUPNP_SERVICE.getRegistry().addListener(new DefaultRegistryListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void remoteDeviceAdded(Registry registry, RemoteDevice device) {\r\n\t\t\t\tSystem.out.println(\"device added \" + de...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: Removed duplicated region for block: B:11:0x0075 A[RETURN] / JADX WARNING: Removed duplicated region for block: B:14:0x007e / JADX WARNING: Removed duplicated region for block: B:18:0x00cc
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl /* Code decompiled incorrectly, please refer to instructions dump. */ public final java.lang.Object invokeSuspend(java.lang.Object r18) { /* r17 = this; r0 = r17 java.lang.Object r1 = kotlin.coroutines.i...
[ "private void exitSequence_main_region_Z__region0_B() {\n\t\texitSequence_main_region_Z__region0_B__region0();\n\t}", "public void removeIslandBlocks(Location loc)\r\n/* 972: */ {\r\n/* 973:1001 */ if (loc != null)\r\n/* 974: */ {\r\n/* 975:1002 */ System.out.print(\"Removing blocks fr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
preparing for game start
private void prepareGameStart() { InputStream stream = getClass().getClassLoader().getResourceAsStream("resources/words.txt"); Scanner output = new Scanner(stream); int random = (int)(Math.random() * ((872 - 0) + 1)) + 0; String line = null; for (int i = 0; i <= random; i++) { ...
[ "public void prepare()\n {\n PlayDifficultMode pdm = new PlayDifficultMode();\n addObject(pdm, 400, 330);\n \n addObject(new Coin(), 500, 330);\n \n PlayEasyMode pem = new PlayEasyMode();\n addObject(pem, 400, 250);\n \n addObject(new PowerUp(), 500,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a diff between two dates
private static long getDateDiff(Date date1, Date date2, TimeUnit timeUnit) { long diffInMillies = date2.getTime() - date1.getTime(); return timeUnit.convert(diffInMillies,TimeUnit.MILLISECONDS); }
[ "public long getDifference(Dates date) \r\n { return Math.abs(toLong()-date.toLong()); }", "public int difference(Date other)\r\n { \r\n int numOfDaysForDate1 = calculateDate(_day, _month, _year); // number of days that have passed since the count - for current date \r\n int numOfDaysForDate2 ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Uhoh, an error occurred!
@Override public void onFailure(@NonNull Exception exception) { }
[ "@Override\n\tpublic void error(Exception e)\n\t{\n\t\t\n\t}", "private static void error( Exception e ) {\n\t\te.printStackTrace();\n\t\tSystem.exit(-1);\n\t}", "@Override\n\tpublic void erro() {\n\n\t}", "private static void displayProgramError(Exception e)\n\t{\n\t\tSystem.err.print(\"Program error, please...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process the query response. No IP filtering is done from here on.
public synchronized void processQueryResponse( QueryResponseMsg msg ) { // TODO this can be optimized by checking for the msgID of the query.. for (int i = 0; i < searchList.size(); i++) { Search search = (Search)searchList.get( i ); if ( search instanceof Brows...
[ "@Override\n\tpublic void visit(TableQueryResponsePacket arg0) {\n\n\t}", "public void processResponse(Query requestQuery, RequestRepository requestRepository, OrganizationRepository organizationRepository) {\n this.setUp(requestQuery, requestRepository, organizationRepository);\n super.updateRateLi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.object_detection.protos.GridAnchorGenerator grid_anchor_generator = 1;
object_detection.protos.GridAnchorGeneratorOuterClass.GridAnchorGenerator getGridAnchorGenerator();
[ "org.box2d.proto.Box2D.PbVec2OrBuilder getLocalAnchorBOrBuilder();", "@Override\n public void init()\n {\n telemetry.addData(\"Beacon_stuff\", beacon.getAnalysis().getButtonString());\n visionBot = new VisionRobot(hardwareMap, this);\n ///VisionOpMode initialization\n //enable ca...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
When done button pressed: extracts data from input areas and places it in database as a routine
public void done(View view) { EditText nameEditText = findViewById(R.id.name), startTimeEditText = findViewById(R.id.start_time); ToggleButton[] dayButtons = {findViewById(R.id.sunday), findViewById(R.id.monday), findViewById(R.id.tuesday), findViewById(R.id.wednesday), f...
[ "public void getData() {\n if (input.getGPGLocation() != null)\n wGPGLocation.setText(input.getGPGLocation());\n if (input.getStreamField() != null)\n wStreamFieldName.setText(input.getStreamField());\n if (input.getResultFieldName() != null)\n wResult.setText(input.getResultFieldName());\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transfer an amount from one accout to another account.
@DrawSequenceDiagram public void transfer(final String amount, final Account to) { this.debit(amount); to.deposit(amount); }
[ "public void transferIn(double amount, Account other){\r\n userAccount.add(amount);\r\n other.deduct(amount);\r\n }", "public void transfer(Account account, int amount) {\n this.balance -= amount;\n account.balance += amount;\n }", "public void transferMoneyToOtherAccounts(Account a1...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
metodo guardar productos en el inventario de Ultrasonido
private void ingresar_inventario_Ultrasonido(){ for (int i = 0; i <tabla_almacen.getRowCount(); i++) { String producto= tabla_almacen.getModel().getValueAt(i, 1).toString(); String precio= tabla_almacen.getModel().getValueAt(i, 2).toString(); String descripcion= tabla_almacen.getModel().getV...
[ "public void guardaListaProductos(List<Producto> productos, List<Date> fechas) {\n Session session = NewHibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n Motivo motivo = sacamotivobyid(7);//Nuevo motivo a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to test mirrorTemple A7 Q1
public static void testMirrorTemple() { Picture temple = new Picture("temple.jpg"); temple.explore(); temple.mirrorTemple(); temple.explore(); }
[ "@Test\n //Testing the redesignated TORA value of the first right runway (27R).\n public void testTORARight() {\n logger.debug(\"Testing right TORA...\");\n logger.debug(\"Expected: 2986.0\");\n logger.debug(\"Actual: \"+rr.getWorkingTORA());\n Assert.assert...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
quando parar de precionar a tecla
public void keyRelease(KeyEvent tecla){ int codigo = tecla.getKeyCode(); ConstrutorJogo constructor = new ConstrutorJogo(); constructor.audioAndando(valor2=0); if(codigo == KeyEvent.VK_UP){ dy=0; posicao=1; } if(codigo == KeyEvent.VK_DOWN){ dy=...
[ "public void parar() {\n\t\t\n\t}", "public void calculaValorPagarPorPessoa(){\n\t\tSystem.out.println(\"Valor à pagar por (\" + mesa.getQuantidadePessoas() +\") pessoas: R$ \" + mesa.getPrecoDaMesa()/mesa.getQuantidadePessoas());\n\t}", "public static void main(String[] args) {\n System.out.println(\"\\nP...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check if anything has been printed since last reset
public boolean isDirty() { return dirty; }
[ "boolean hasPRINT();", "@Override\n public boolean isDone() {\n int idx = -1;\n for (Plank m : planks) {\n idx++;\n System.out.println(m.nailed);\n if (m.nailed==false) {\n return false;\n }\n }\n return true;\n }", "pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test error handling for invalid subsequent inputs
@Test public void checkInvalidCommandTypeForSubsequentInputTest() { String[] cmdList3 = { "cd", "ls", "move", "delete", "pwd", "ls", "cat", "echo" }; for (int i = 0; i < cmdList3.length; i++) { assertFalse(pt.checkValidCommandTypeForPipe(cmdList3[i], false)); } }
[ "@Test\n public void testIfInvalidInputThrowsException() {\n }", "private void validateInput() {\n }", "public static void errorInput()\n {\n\t System.out.println(\"Input most be a number 1 to 54!\");\n }", "private int errorCheckingInt(String display) {\n\n\t\tint tempChoice;\n\t\tScanner inpu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the mission in a particular row.
public Mission getMission(int row) { return model.getMission(row); }
[ "public Relatorio get(int row){\n\t\t\n\t\treturn valores.get(row);\n\t}", "public AtomValue get(Token row, String column) throws IOException{\n return ssTableReader.get(row, column);\n }", "public Part getPart(int row) {\n\t\treturn parts.get(row);\n\t}", "public ExperimentResult getExperimentResult(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ protected ArrayList arrDatoGeneral; protected Connexion connexion; protected DatosCliente datosCliente; protected ConnexionType connexionType; protected ParameterDbType parameterDbType; protected EntityManagerFactory entityManagerFactory; protected DatosDeep datosDeep; protected Boolean isConDeep=false;
public EstadoDetallePedidoLogic()throws SQLException,Exception { super(); try { this.estadodetallepedidoDataAccess = new EstadoDetallePedidoDataAccess(); this.estadodetallepedidos= new ArrayList<EstadoDetallePedido>(); this.estadodetallepedido= new EstadoDetallePedido(); this....
[ "public AnticipoClienteLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.anticipoclienteDataAccess = new AnticipoClienteDataAccess();\r\n\t\t\t\r\n\t\t\tthis.anticipoclientes= new ArrayList<AnticipoCliente>();\r\n\t\t\tthis.anticipocliente= new AnticipoCliente()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method2: find nonzero put in new order, then all zero filled the array
public void moveZeroes(int[] nums) { int i = 0; for (int n : nums) { if (n != 0) nums[i++] = n; } while (i < nums.length) nums[i++] = 0; }
[ "public abstract void fillWithZeros();", "public static void duplicateZeros(int[] arr) {\n int n = arr.length;\n for(int i = 0; i < n; i++) {\n if(arr[i] == 0) {\n int j = i + 1;\n int end = n - 2;\n while(end >= j) {\n arr[e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Getter for the size of the list
@Override public int size() { return size; }
[ "public int size ( )\n {\n return this.list.size ( ) ;\n }", "public int getSize() {\n return list.size();\n }", "public int size() {\n \t//return length of the list\n \treturn list.length;\n }", "public int getSize() {\r\n\treturn list.size();\r\n }", "public int getSize(){\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve una lista del objeto JugadorApuesta que relaciona el jugador con las apuestas que ha realizado
public ArrayList<JugadorApuesta> getApuestas(int njornada) { ArrayList<JugadorApuesta> lista = new ArrayList(); String query = "select id_jugador from jugador"; ResultSet rs = consultaBD(query); try { while (rs.next()) { String id_jugador = rs.getString(1); ...
[ "@Override\r\n\tpublic List<PuntuacionJugador> listar() {\n\t\treturn daoPuntuacionJugador.listar(PuntuacionJugador.class);\r\n\t}", "ArrayList evolucionJugador(){\n \n ArrayList resultado = new ArrayList();\n \n resultado.add(this.nombre);\n String nombClub = (this.club).getNombre(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Executes the create request.
WorkbookTemplate create(Context context);
[ "@Override\r\n\tprotected void doCreate(HttpServletRequest request, HttpServletResponse response) {\n\r\n\t}", "public boolean create() throws Exception\r\n {\r\n if (!validateBody()) {\r\n return false;\r\n }\r\n \r\n String urlPath = getUrl();\r\n RetRpc response...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method is used to add a default entity point to the edited entity but only if there are no entity points defined yet.
protected void addDefaultEntityPoint(Entity entity) { if (entity.getPointList().isEmpty()) { entity.createMiddleEntityPoint(); } }
[ "@Override public PointDTO addPoint(PointDTO pointDto) {\n Point pointSaved = null;\n Point point = pointMapper.mapDtoToEntity(pointDto);\n\n Point existingPoint = pointRepository.findByMeasurementDayAndLocation(point.getMeasurementDay(), point.getLocation());\n\n if(existingPoint != nul...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by giylmi on 28.02.2015.
public interface FormDao { Boolean saveForm(Map<String, String> form, String tableName); Form getFormById(String formId); List<Map<String, Object>> allValues(ViewObject vo); ViewObject getVOById(String voId); Map<String, Form> allForms(); boolean checkUnique(String formName, String[] value...
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
static method to create the object Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable If this object is not an element, it is a complex type and the reader is at the event just after the outer start element Postcondition: If t...
public static Filter parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { Filter object = new Filter(); int event; java.lang.String nillableValue = null; java.lang.String prefix = ""; java.lang.String...
[ "public static RetstartE parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n RetstartE object =\n new RetstartE();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is function get TenCanBo by HoSoTTHCCong History: DATE AUTHOR DESCRIPTION 3March2013 Nam Dinh Create new
public static String getTenCanBo(HoSoTTHCCong instance) { try { return CongChucLocalServiceUtil.fetchCongChuc(instance.getCanBoXuLyHienThoiId()).getHoVaTen(); } catch (Exception e) { } return ""; }
[ "public HistorySO() {}", "BankNote createBankNote();", "PersonHistory createPersonHistory();", "@DISPID(149) //= 0x95. The runtime will prefer the VTID if present\r\n @VTID(20)\r\n int creator();", "public createCustomer() {\n initComponents();\n lblCustomerID.setText(Controller.Rep.createMa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the script on all nodes with the specific predicate.
@Override public Map<? extends NodeMetadata, ExecResponse> runScriptOnNodesMatching(Predicate<NodeMetadata> filter, Statement runScript, RunScriptOptions options) throws RunScriptOnNodesException { return computeService.runScriptOnNodesMatching(filter, runScript, options); }
[ "void rebootNodesMatching(Predicate<NodeMetadata> filter);", "abstract public void runCommandOnAllNodes(String command) throws Exception;", "void suspendNodesMatching(Predicate<NodeMetadata> filter);", "@Override\n public void execute(final E input) {\n for (int i = 0; i < iPredicates.length; i++) {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update argument to preserve selected value on rotation
@Override public void onTimeChanged(TimePicker view, int hour, int minute) { Calendar calendar = Calendar.getInstance(); calendar.setTime(mDate); calendar.set(Calendar.HOUR, hour); calendar.set(Calendar.MINUTE, minute); mDate = ...
[ "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Number> arg0,\n\t\t\t\t\tNumber arg1, Number arg2) {\n\t\t\tdouble vv = slider1.getValue(); \n\t\t\t\tif(vv > 50) {\n\t\t\t\t\tensembel.setRotate(-(slider1.getValue() - 50) *180/ 100); \n\t\t\t\t}else{\n\t\t\t\t\tensembel.setRotate((- slider1.getValue(...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by lifeilong on 2015/11/19.
@MyBatisRepository public interface SensitiveWordsDao extends BaseDao<SensitiveWords>{ }
[ "@Override\n public void extornar() {\n \n }", "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "private static void EX5() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the per diem start timestamp from the string representation.
public void setPerDiemEndDateTime(String perDiemEndDateTime) { try { this.dvPerdiemEndDttmStamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(perDiemEndDateTime); } catch (ParseException e) { this.dvPerdiemEndDttmStamp = null; } }
[ "@Override\n public void setTimestamp_start(long l) {\n this.timestamp_start = l;\n }", "public void setStart_time(String start_time) {\n this.start_time = start_time;\n }", "public co.storkie.AudioFrame.Builder setStartTs(double value) {\n validate(fields()[0], value);\n this.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
credit card number = 16 digits & last digit = 0
@Test void T1() { assertEquals("Valid Card", Assignment2.Validate(3225145643589795L)); }
[ "private static boolean isVisaCreditCardNumberValid(String cc) {\n boolean valid = true;\n int total = 0;\n // Converting number to a character array\n char[] chararray = cc.toCharArray();\n // if not exactly 16 numbers, number is not valid\n if (cc.length() != 16)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
( static methods )
public static CCFChild getClick(CCFPanel p, Point click) { return getClick(p.getChildren(), new Point(0,0), click); }
[ "private static void staticMethod() {\n }", "protected void method_5557() {}", "static boolean staticMethod() {\n\t\treturn false;\n\t}", "static void statischMaken() {\n\n\t}", "default boolean staticMethod() {\n\t\treturn false;\n\t}", "@Override\r\n public void publicando() {\n }", "public a...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml"); CustomerDaoImpl cs = (CustomerDaoImpl) ac.getBean("customerDao");
@Test public void run1(){ customerDao.save(); customerDao.update(); }
[ "@Test\n public void injection8(){\n ClassPathXmlApplicationContext cpx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n Customer customer = cpx.getBean(\"customer\", Customer.class);\n System.out.println(customer);\n }", "private void getUserDao() {\n\t\tApplicationC...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 1144: / 1145:
private void headerMenu1ActionPerformed(ActionEvent evt) /* 1146: */ { /* 1147: 978 */ this.printHeaders = this.headerMenu1.isSelected(); /* 1148: */ }
[ "private static String part_number(int valve_id, int manifold_id) {\n StringBuilder sb = new StringBuilder(64);\n sb.append(valve_id);\n sb.append(manifold_id);\n sb.append(\"NX-DCV-SM-BLU-1-1-VO-L1-SO-OO\");\n return sb.toString();\n }", "private int m31494n() {\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read and keep nominal feature values of a thread set from file
private ArrayList<String> read(String fileName) throws IOException{ HashSet<String> domainSet = new HashSet<String>(); File file = new File(fileName); if(file.exists()){ BufferedReader reader = new BufferedReader(new FileReader(file)); String line = null; while((line=reader.readLine())!=null){ Sca...
[ "public void loadData(String file, boolean featureNormalize, double trainingSetRatio) throws java.io.IOException {\n getInfoOnData(file);\n FileReader reader = new FileReader(file);\n BufferedReader bufferedReader = new BufferedReader(reader);\n String line;\n String[] columns;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public int hashCode() { return 0; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use fixed PM to try and get at least some points hitting the boundary
public void testGrid() { final GeometryFactory geomFactory = GeometryFactory.fixed(0, 1.0); // GeometryFactoryI geomFactory = new GeometryFactoryI(); final PerturbedGridPolygonBuilder gridBuilder = new PerturbedGridPolygonBuilder( geomFactory); gridBuilder.setNumLines(20); gridBuilder.setLine...
[ "private void fixBoundryPoints() {\r\n\t\tdouble min_x = Math.min(minPoint.x, maxPoint.x), max_x = Math.max(minPoint.x, maxPoint.x),\r\n\t\t\t\tmin_y = Math.min(minPoint.y, maxPoint.y), max_y = Math.max(minPoint.y, maxPoint.y),\r\n\t\t\t\tmin_z = Math.min(minPoint.z, maxPoint.z), max_z = Math.max(minPoint.z, maxPoi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
maybe replace with a constructor
public IdentityCard getIdentityCard(){ return identityCard; }
[ "private SingleObjectPt2() {}", "private Abierto(){}", "private O()\r\n {\r\n super();\r\n }", "public Castle(){}", "public abstract T constructor();", "private Casier(){}", "public OPlaceholder() {}", "public Siamese() {}", "public abstract void reconstruct();", "public I...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
All view must implement this interface
public interface View extends IsWidget { }
[ "public interface View{\n\n /**\n * Called when file save fail.\n */\n void showSaveDataFailMessage();\n\n /**\n * Called when file save successful.\n * @param fullName full path file name.\n */\n void showSaveDataSuccessMessage(String fullName);\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this rightClear checks only for blocks, used for rotation.
private boolean rightRotateClear() { for(Block b : getBlocks()) { if(getGrid()[b.getX() + 1][b.getY()] != 0 || getGrid()[b.getX() + 2][b.getY()] != 0) return false; } return true; }
[ "public void removeUneededBlocks(){\n\t\tfor(int i = 0; i<blocks.size();i++){\n\t\t\tif(blocks.get(i).getAxisLoc()<0){\n\t\t\t\tblocks.get(i).setColorTransparent();\n\t\t\t\tblocks.remove(i);}\n\t\t}\n\t}", "protected final void clearAllBlockMarks() {\n if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(!maintain...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case number: 51 /Coverage entropy=0.7963116401738131
@Test(timeout = 4000) public void test051() throws Throwable { JavaGDSImpl javaGDSImpl0 = new JavaGDSImpl(); assertNotNull(javaGDSImpl0); isc_db_handle_impl isc_db_handle_impl0 = (isc_db_handle_impl)javaGDSImpl0.createIscDbHandle(); assertNotNull(isc_db_handle_impl0); assertEqua...
[ "@Test(timeout = 4000)\n public void test147() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n String string0 = ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Do nothing, this instance doesn't own the client.
@Override public void teardown() { }
[ "private ClientFlag() {\n // No-op.\n }", "private void initClient()\n {\n \tinitClient(null);\n }", "private void clearClient() {\n this.bitField0_ &= -17;\n this.client_ = 0;\n }", "public Client () {}", "@Override\n protected void cleanUpClient() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the thread id for the lock.
public void setThreadId(long id) throws LockException;
[ "public void setThreadId(Integer threadID) {\n this.threadID = threadID;\n }", "public synchronized void changeId(){\n\n if(Thread.currentThread().getName().equals(\"one\")){\n Thread.yield();\n }\n int id = this.id;\n id++;\n this.id = id;\n\n synchronized...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method2: DFS(Iteration: Preorder)(Template)Use a class Pair to save the curr node and path.
public List<String> binaryTreePathsI(TreeNode root) { List<String> result = new ArrayList<>(); if (root == null) { return result; } Stack<Pair> stack = new Stack<>(); stack.push(new Pair(root, "")); while (!stack.isEmpty()) { Pair curr = stack.pop(); if(curr.node.left == null && curr.node.right == ...
[ "public void DFS() {\n\t\t//endNodeSet contains all end node names\n\t\tArrayList<String> endNodeSet = new ArrayList<String>();\n\t\tfor (int i = 0; i < endNum; i++) {\n\t\t\tendNodeSet.add(node[1+i].name);\n\t\t}\n\t\t//using stack to keep track of the nodes\n\t\tStack<Node> stack = new Stack<Node>();\n\t\tstack.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void deleteAppointment(int appointmentId) { hospitalRepository.deleteById(appointmentId); logger.info("Appointment deleted appointment_id" + appointmentId); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a map of garbage collectors and their stats. The first object in the array is the total count since JVM start and the second is the total time (ms) since JVM start. If a garbage collectors does not support the collector MXBean, then it will not be represented in the map.
public static Map<String, Long[]> getGCStatst() { final List<GarbageCollectorMXBean> gcBeans = ManagementFactory.getGarbageCollectorMXBeans(); final Map<String, Long[]> map = new HashMap<String, Long[]>(gcBeans.size()); for (final GarbageCollectorMXBean bean : gcBeans) { if (!bean.isValid() ||...
[ "public interface GarbageInfoMBean\n{\n\tString\t\tgetCollectorName();\n\tString\t\tgetPrimaryPoolName();\n\n\tlong\t\tgetTotalCount();\n\tlong\t\tgetTotalDurationMS();\n\tlong\t\tgetTotalElapsedMS();\n\tString\t\tgetTotalElapsed();\n\tdouble\t\tgetTotalAverageMS();\n\tdouble\t\tgetTotalPeriodSec();\n\tdouble\t\tge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
BIC=LLparam/2ln(n) param: Each component has 2 parameters, mixing prob and position, thus "2"; "1" comes from the fact that total mix prob sum to 1. for multicondition, of beta variables is (mixture.numConditions1)numComponents n: is the number of data point, i.e. the base positions.
double BIC(double n){ return LL - (numNZComponent*2-1 + (manager.getNumConditions()-1)*numNZComponent )/2*Math.log(n); }
[ "public double getCouplingCoeff();", "long catalanno( int n, int m)\r\n {\n long c = binomialCoeff(2*n, n);\r\n \r\n // return 2nCn/(n+1)\r\n return c/(n+1);\r\n }", "public double b(int state,float x[]) {\r\n\t\tint gaussian = FilesLoader.GAUSSIAN;\r\n\t\tint d = 0;\r\n\t\t\r\n\t\tif(Alignmen...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Cash out boolean. Method to get banknotes out of ATM.
boolean cashOut(long sum);
[ "boolean getComplexNotes();", "void banknotesEmpty(BanknoteDispenser dispenser);", "BankNote createBankNote();", "public boolean isNotesEnabled();", "boolean isIsDebit();", "public String getTransactionNotes()\n {\n return transactionNotes;\n }", "public boolean isIsNotes() {\r\n ret...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the current query.
public void setQuery(String query) { this.query = Optional.ofNullable(query); }
[ "public void setQuery(Query query) {\n oldPage = -1;\n byRow = false;\n\n this.query = query;\n executeQuery(query);\n }", "public void setQuery(Query<T> query) {\n this.query = query;\n }", "public final void setQuery(java.lang.String query)\n\t{\n\t\tsetQuery(getContext(), q...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String encodeURL(String arg0) { return null; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the table name from a path, or null if the path is the root path.
@Nullable public static String getTableName(Path rootPath, Path path) { path = qualified(rootPath, path); if (rootPath.equals(path)) { // Path is root, no table return null; } Path tablePath; Path parent = path.getParent(); if (Objects.equals(...
[ "public String getTableName(int col) throws SQLException {\n/* 926 */ String tableName = getDatabase().column_table_name(this.stmt.pointer, checkCol(col));\n/* 927 */ if (tableName == null)\n/* */ {\n/* */ \n/* 930 */ return \"\";\n/* */ }\n/* 932 */ return tableNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
print a list of action(1 or 2 actions) to a string in JSON format for Serverclient communication;
public String ActionsToStringB(List<Action> actions) { String workerId = "\"" + actions.get(0).getWorkerId() + "\""; String moveDirection = actions.get(0).getDirection().printDirectionB(); if (actions.size() == 2) { String buildDirection = actions.get(1).getDirection().printDirec...
[ "public String getActions() {\n\t\tif (actions == null) {\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tboolean comma = false;\n\n\t\t\tif ((action_mask & ACTION_PROVIDE) == ACTION_PROVIDE) {\n\t\t\t\tsb.append(PROVIDE);\n\t\t\t\tcomma = true;\n\t\t\t}\n\n\t\t\tif ((action_mask & ACTION_REQUIRE) == ACTION_REQ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onRefresh() { RefreshCommentData(); }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { return false; }
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Careful The edge to toImpl was speculative. We are now going to convert it into an ordinary edge. However, it is possible that the point occurred in the meantime. In that case, we no longer have to correct the list, since it's no longer relevant. However, we may have to propagate exceptions to the target point.
void confirmEdgeAndAdjust(PointImpl toImpl, int flags) { synchronized(this) { if(!didOccur()) { toImpl.addWaitCount(this); ChunkList.removeSpeculativeFlagAndAdd(outEdges, toImpl, 0); return; } } // If we get here, then we occurred either before the speculative // edge was added, or wh...
[ "protected abstract VertexType getTarget(EdgeType edge);", "public Edge actualEdge()\n {\n return (Edge) super.actual();\n }", "E findEdge(F from, T to);", "protected abstract void attachEdgeTargetAnchor(E edge, P oldTargetPin, P targetPin);", "void addEdge(Edge e) {\n Edge dummy = v[e.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MCPD (v2.1) (PUID) 0. Any persistent, unique identifier assigned to the accession so it can be unambiguously referenced at the global level and the information associated with it harvested through automated means. Report one PUID for each accession. The Secretariat of the International Treaty on Plant Genetic Resources...
@ApiModelProperty(example = "http://pui.per/accession/A0403652", value = "MCPD (v2.1) (PUID) 0. Any persistent, unique identifier assigned to the accession so it can be unambiguously referenced at the global level and the information associated with it harvested through automated means. Report one PUID for each accessi...
[ "private String newUID() {\r\n\r\n\t secRand.nextBytes(secRandBuf16);\r\n secRandBuf16[6] &= 0x0f;\r\n secRandBuf16[6] |= 0x40; /* version 4 */\r\n secRandBuf16[8] &= 0x3f;\r\n secRandBuf16[8] |= 0x80; /* IETF variant */\r\n secRandBuf16[10] |= 0x80; /* multicast bit */\r\n\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .hadoop.yarn.LogAggregationStatusProto log_aggregation_status = 21;
public boolean hasLogAggregationStatus() { return ((bitField0_ & 0x00080000) == 0x00080000); }
[ "public void setAggregationLevel(java.lang.String aggregationLevel);", "public void logSummary() {\n- LOG.loggingStatistics();\n- LOG.startTime(startTime);\n- LOG.sessionsOpened(sessionOpenCount.get());\n- LOG.sessionsClosed(sessionCloseCount.get());\n- LOG.transactions(transact...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method sets the filename by taking the File as a parameter. Once the filename is set, the FileReader Resource Bundle is set equal to the Name passed to it.
public void setPropertiesFile(File nameOfFile){ this.setPropertiesFilename(nameOfFile.getName()); }
[ "public void setFileName(String file);", "public void setFilename(String file);", "public final void setFile(String filename) {\n super.setInternalFilename(filename);\n }", "public void setFILENAME (String filename) {\n FILENAME = filename;\n }", "void setFileName(String name);", "void...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers a new car for rent
@RequestMapping(value = "/leaseCar", method = RequestMethod.POST) public String saveLease(@RequestParam int rentalId,@RequestParam String owner,@RequestParam int price,@RequestParam String startDate, @RequestParam String endDate,HttpSession session, Model model) { if (leaseService.date...
[ "@Override\n\tpublic void addCar() {\n\t\tboolean chk = checkLot();\n\t\tif(chk == false) {\n\t\t\tSystem.out.println(\"Check your lot\");\n\t\t\twarn(\"Check the lot\");\n\t\t}else {\n\t\treadLot();\n\t\tcarLot.getCarLot().add(CS.createCar());\n\t\tcreateLot();\n\t\ttrace(\"Car has been added!\");\n\t\t}\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__DecisionReviewDef__Group__15" $ANTLR start "rule__DecisionReviewDef__Group__15__Impl" ../org.eclipse.osee.ats.dsl.ui/srcgen/org/eclipse/osee/ats/dsl/ui/contentassist/antlr/internal/InternalAtsDsl.g:9535:1: rule__DecisionReviewDef__Group__15__Impl : ( '}' ) ;
public final void rule__DecisionReviewDef__Group__15__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.eclipse.osee.ats.dsl.ui/src-gen/org/eclipse/osee/ats/dsl/ui/contentassist/antlr/internal/InternalAtsDsl.g:9539:1: ( ( '}' ) ) ...
[ "public final void rule__Comment__Group_7__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalRequirementsDsl.g:3922:1: ( ( '}' ) )\n // InternalRequirementsDsl.g:3923:1: ( '}' )\n {\n // Interna...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ 07Mar2006, TSa: Empty elements do not need special handling, since this call only 'closes' them as a side effect: real effect is for the open nonempty start element (nonempty just meaning it was written using full writeStartElement() as opposed to writeEmptyElement()). boolean wasEmpty = isEmpty;
public XmlWriter endElement() throws XmlException { if (isOpen()) { closeStartElement(); } try { String prefix = (String) prefixStack.pop(); String local = (String) localNameStack.pop(); uriStack.pop(); //if(!wasEmpty) { openEndTag(); writeName(prefix, "", ...
[ "protected abstract void closeStartElement(boolean emptyElem)\n throws XMLStreamException;", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn numElementos == 0;\r\n\t}", "public boolean empty() {\n return elementData.isEmpty();\n }", "@SuppressWarnings({\"UnusedDeclaration\"})\n\tpublic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public static void main(String[] args) { String s="madame"; String v=""; //Don't give spaces int i=s.length(); for (int j=i-1;j>=0;j--) { v=v+s.charAt(j); } System.out.println(v); if(v.equals(s)) { System.out.println("it is palindrome"); } /*else {...
[ "@Override\n }", "@Override\n\t\t\t\tpublic void pintate() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void extornar() {\n \n }", "@Override\r\n\tpublic void hablar() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void wydaj() {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "entryRuleComputedTerm" $ANTLR start "ruleComputedTerm" InternalResoluteParser.g:1494:1: ruleComputedTerm : ( ( rule__ComputedTerm__Group__0 ) ) ;
public final void ruleComputedTerm() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalResoluteParser.g:1498:5: ( ( ( rule__ComputedTerm__Group__0 ) ) ) // InternalResoluteParser.g:1499:1: ( ( rule__ComputedTerm__Group__0 ) ) ...
[ "public final void ruleComputedTerm() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalResoluteParser.g:1521:2: ( ( ( rule__ComputedTerm__Group__0 ) ) )\n // InternalResoluteParser.g:1522:2: ( ( rule__ComputedTerm__Group__0 )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor to initialize DoneCommand.
public DoneCommand() {}
[ "public DoneCommand(String userData) {\n this.userData = userData;\n this.toExit = false;\n }", "public DoneCommand(String taskIndex) {\n this.taskIndex = taskIndex;\n }", "public DoneCommand(boolean isExit, String description) {\n super(isExit, description);\n }", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { //init form input initFormDataRCTIDeposit(); //refresh data form input setSelectedDataToInputForm(); }
[ "public Controller(){\t\n\t}", "public GameEriController() {\r\n\t\tinit();\r\n\t\t\r\n\t}", "public MainController(){\n \n }", "public Controller ()\n\t{\n\t\tview = new View();\n\t\tmodelo = new Modelo(10000);\n\t}", "public MainController() {\n try {\n log.debug(\"Starting Mai...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if this is the first job in the queue the status is "printing", else "queued"
public static Job addJob(Job job) { if(jobsQueue.isEmpty()) { job.setStatus("printing"); } jobsQueue.add(job); return job; }
[ "public boolean isQueued() {\n\treturn queued;\n }", "public boolean isQueued(){\n\t\treturn queued;\n\t}", "@Override\n public void completePrintProcess(PrintJob job) {\n System.out.printf(\"Completed:\\n\\tJob: %d\\tPrinter: %d\\n\", job.getId(), m_id);\n\n // If there are more jobs in the...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the name of this image to new string given.
void setName(String newName) throws IllegalArgumentException;
[ "public void setName(String newName)\n\t{\n\t\timageName = newName;\n\t}", "public void setName(String imageName) {\r\n\t\tname = imageName;\r\n\t}", "public Builder setImageName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a list of Video objects with the specified title.
@RequestMapping(value = VIDEO_PATH + SEARCH_PATH + "/findByName", method = RequestMethod.GET) public @ResponseBody List<Video> findVideoByName(@RequestParam("title") String title) { List<Video> videos = videoRepository.findByName(title); if (videos == null) { videos = Lists.newArrayList...
[ "public List<Movie> searchByTitle(String title) {\n\t\n\t\treturn movieService.searchByTitle(title);\n\t\t\n\t}", "public List<FilmwebDescription> find(String title) {\r\n\t\tLOG.info(\"find(title)\");\r\n\t\tLOG.info(String.format(\"find - Title: %s\", title));\r\n\t\t\r\n\t\tList<FilmwebDescription> description...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a RIGHT JOIN clause
public HQLQueryBuilder rightJoin(String table, String alias, String with) { return join("RIGHT JOIN " + (table) + "" + (StringUtils.isNotEmpty(alias) ? " " + alias + "" : "") + (StringUtils.isNotEmpty(with) ? " WITH " + with : "")); }
[ "@Test\n public void testRightJoinWithSomeFiltersFromLeftRightSide() {\n util.verifyRelPlan(\n \"SELECT * FROM MyTable1 RIGHT JOIN MyTable2 ON a1 = a2 AND b1 = b2 AND c1 = c2 WHERE a2 = 2 AND b2 > 10 AND c1 IS NOT NULL\");\n }", "Join right(String tableName, String alias);", "@Test\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new ThreadContext instance
public ThreadContext(Settings settings) { this.defaultHeader = buildDefaultHeaders(settings); this.threadLocal = ThreadLocal.withInitial(() -> DEFAULT_CONTEXT); this.maxWarningHeaderCount = SETTING_HTTP_MAX_WARNING_HEADER_COUNT.get(settings); this.maxWarningHeaderSize = SETTING_HTTP_MAX_...
[ "static Context create() {\n LOG.trace(\"creating new tokamak context for this thread\");\n return new Context(Trace.create(), new ArrayDeque<>());\n }", "public static ThreadContext getThreadContext() {\n return getContext();\n }", "Context(int thread_count, int thread_index, int thread_turns)...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }