query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Executes the search, and checks that the default entity is not returned.
private void defaultCategoryTypeShouldNotBeFound(String filter) throws Exception { restCategoryTypeMockMvc.perform(get("/api/category-types?sort=id,desc&" + filter)) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpec...
[ "public abstract SearchResult execute();", "private SearchResult performSearch(String queryOrNull) throws IOException {\n\n WrappedWebRequest req=session.newGetRequest(session.getHttpResolver().get(\"/substances\"))\n \t.addQueryParameter(\"wait\", \"true\");\n \t\n if(queryOrNull !=nu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Syntax__Group_4__0__Impl" $ANTLR start "rule__Syntax__Group_4__1" ../dk.sdu.mmmi.sgl.ui/srcgen/dk/sdu/mmmi/sgl/ui/contentassist/antlr/internal/InternalSpreadsheetGrammarLanguage.g:1425:1: rule__Syntax__Group_4__1 : rule__Syntax__Group_4__1__Impl ;
public final void rule__Syntax__Group_4__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../dk.sdu.mmmi.sgl.ui/src-gen/dk/sdu/mmmi/sgl/ui/contentassist/antlr/internal/InternalSpreadsheetGrammarLanguage.g:1429:1: ( rule__Syntax__Group_4__1__Impl ) ...
[ "public final void rule__Rule__Group_4__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDSL.g:2923:1: ( rule__Rule__Group_4__1__Impl )\n // InternalDSL.g:2924:2: rule__Rule__Group_4__1__Impl\n {\n p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public long getItemId(int position) { return position; }
[ "@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" ] ] } }
InputProcessor inputProcessorOne = MainScreenInputHandler.getInstance();
@Override public void show() { InputProcessor inputProcessorTwo = m_stage; InputMultiplexer inputMultiplexer = new InputMultiplexer(); // inputMultiplexer.addProcessor(inputProcessorOne); inputMultiplexer.addProcessor(inputProcessorTwo); inputProcessor = new MainScreenInputAdapter(this); inputMultiplexer...
[ "public InputProcessor getInputProcessor() {\n return null;\n }", "public static Processor getInstance(){\n return instance;\n }", "public UserInterface() {\n ge = new GameEngine();\n sc = new Scanner(System.in);\n }", "private void initInputDevice()\n\t{\n \t// first: ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Public utility methods to interogate the state of the form controls
public MapLayer addWMSLayer(String name, String displayName, String uri, float opacity, String metadata , String legendUri, int subType, String cqlfilter, String envParams, Query q) { MapLayer mapLayer = null; if (safeToPerformMapAction()) { if (portalSessionUtilities.getUserDefi...
[ "private void getControls() {\n\n\t}", "private boolean toControls() {\n return controlState == 2;// || val;\n }", "private void setComponentValues() {\n usejEditIndenter.setSelected( getBoolean( \"usejEditIndenter\" ) );\n prePadFunctions.setSelected( getBoolean( \"prePadFunctions\" ) )...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string seller_id = 2;
public Builder setSellerId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; sellerId_ = value; onChanged(); return this; }
[ "public void setIdSeller(Integer idSeller) {\n this.idSeller = idSeller;\n }", "public Seller getSellerByID(String sellerId);", "@java.lang.Override\n public int getSellerId() {\n return sellerId_;\n }", "public void setSellid(Long sellid) {\n this.sellid = sellid;\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that creates a RequestCtx from components.
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot) { this(documentRoot, attributesSet, false, false, null, null); }
[ "protected RequestContext createRequestContext(final HttpServletRequest req) {\n return new RequestContext() {\n public String getCharacterEncoding() {\n return req.getCharacterEncoding();\n }\n\n public String getContentType() {\n return req.get...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for the access pattern. This constructor is invoked by the framework. Must be public.
public WindowSensorPattern(Resource device) { super(device); }
[ "protected AccessUser()\n {\n }", "public AccessPolicyBase()\r\n {\r\n }", "private Security() {\n\t\t// Private constructor to prevent instantiation\n\t}", "public AccesHttp() {\n super();\n }", "private PrivateConstructor() { \n \t\n }", "private PatientSetAccess() {}", "p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set Merchant Number Label
public void setMerchantNumber(String merchantNumber) { Element merchantNumberLabelElement = htmlBody.getElementById(HtmlIDs.MERCHANT_LABEL.getId()); merchantNumberLabelElement.text(context.getString(R.string.merchant)); //Set Merchant Number Value Element merchantNumberElement = htm...
[ "public void updateCustomerNumber(ActionEvent actionEvent) {\n Customer newCustomer = (Customer) cbCustomers.getSelectionModel().getSelectedItem();\n lblCustNumValue.setText(String.valueOf(newCustomer.getCustomer_ID()));\n }", "void setSelectedCustomerLabel(){\n selectedCustomerLabel.setTe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
table_edit() method that allows for editing of database data Uses Marker and marker value to ditate where the ENTIRE query should be modified. Make sure passenger has correct values otherwise huge problems can arise.
public void table_edit(String table, Connection con, Passenger sqlValues, String[] columns, String markerValue, String marker){ System.out.println("in edit"); try { StringBuilder sqlQuery = new StringBuilder(); for (String column : columns) { ...
[ "private void editDataInDatabase() {\n String where = \"_id=?\";\n ArrayList<String> colName = new ArrayList<>();\n colName.add(\"FName\");\n colName.add(\"LName\");\n ArrayList<String> columnValue = new ArrayList<>();\n columnValue.add(\"KD\");\n columnValue.add(\"P...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that set the connexion with the serveur
public TCPClient() { try { setSocket(); } catch (Exception e) { e.printStackTrace(); } }
[ "public Conexion() {\r\n this.setup();\r\n }", "Connexion() {\n try {\n mSocket = IO.socket(\"http://10.0.2.2:10101\");\n } catch (URISyntaxException ex) {\n ex.printStackTrace();\n }\n écouterRéseau();\n }", "public void connexion() {\n\t}", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Run the DBForeignKeyConstraint(String,boolean,DBTable,String[],DBTable,String[]) constructor test.
@Test public void testDBForeignKeyConstraint_10() throws Exception { String name = ""; boolean nameDeterministic = false; DBTable owner = new LazyTable(new JDBCDBImporter(""), new DBSchema(""), "", ""); String[] fkColumnNames = new String[] {""}; DBTable refereeTable = new DefaultDBTable("0123456789", new ...
[ "@Test(timeout = 4000)\n public void test66() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"org.antlr.runtime.tree\");\n String[] stringArray0 = new String[0];\n DBForeignKeyConstraint dBForeignKeyConstraint0 = new DBForeignKeyConstraint((String) null, false, defaultDB...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
COMPLETED need to ensure the peer is not already in the database
public void persistAsync(Peer peer, IContinue<Long> callback) { final String selection = PeerContract.COLUMN_NAME + "=?"; final String[] selectionArgs = new String[]{String.valueOf(peer.name)}; executeSimpleQuery(PeerContract.CONTENT_URI, null, selection, selectionArgs, creator, new SimpleQueryB...
[ "protected boolean syncAgainOnNewRecords() {\n return false;\n }", "public MemberPeer(){\r\n \r\n this.isAvailable = false;\r\n }", "public boolean onPeerConnected(Peer peer) {\n\t\treturn false;\r\n\t}", "PeerReference notifyFailure(PeerReference broken_finger);", "public boolean has...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ read from raw
public static InputStream readFile(int resourceId) { return RESOURCES.openRawResource(resourceId); }
[ "R read(StreamInput in) throws IOException;", "INGREDIENT read(FriendlyByteBuf buffer);", "protected abstract InputStream openRawStream()\n throws IOException;", "protected abstract void readData(DataInputStream in) throws IOException;", "public abstract int read(int offset);", "public abstract int...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays the details of an error when saving all data. precondition: ex != null
public static void showDataSaveError(Exception ex) { String header = "Job, user, and settings data could not be saved to disk!"; String content = "Data could not be saved to " + ModelConstants.JOB_DATA_FILE + ", " + ModelConstants.USER_DATA_FILE + ", and " + ModelConstant...
[ "public void displayError() {\n\t\tSystem.err.println(\"Errore inserimento campi del cinema\");\n\t}", "public String displayErrors(){\r\n \r\n String e = \"\";\r\n if(error.size() > 0) {\r\n for(String err : error) {\r\n e = e.concat(err);\r\n }\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the first episode in the ordered set where groupId = &63; and seasonId = &63;.
public hu.webtown.liferay.portlet.model.Episode fetchByG_S_First( long groupId, long seasonId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException;
[ "SportEvent getFirstEvent();", "SportEventOrBuilder getFirstEventOrBuilder();", "@Override\n public Optional<Season> findById(Long id) {\n return seasonRepository.findById(id);\n }", "public SeriesSeason getSeriesSeason(String title);", "public Episode getMostRecent() {\n Episode curr = null...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the menu lines before and after the current menu line in the ordered set where numOfDish = &63;.
public static irestads.model.MenuLine[] findByNumOfDish_PrevAndNext( long menuLineId, int numOfDish, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, irestads.NoSuchMenuLineException { return getPersistence() .findByNumOfDi...
[ "public List getLines() {\n \t\treturn fAfterLines;\n \t}", "public int getStatusDish() {\n\t\treturn _orderLine.getStatusDish();\n\t}", "public static InstructionHandle obtainIntstructionAtOrBefore(final int lineNumber, final List<Pair<InstructionHandle, Integer>> linesTable)\n {\n Pair<InstructionHandl...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method corresponds to the database table t_cpy_landinfo
Criteria add(Criteria add);
[ "public List<LandInfo> getLandInfoData(LandSearchCriteria criteria) {\n\t\tList<Object> preparedStmtList = new ArrayList<>();\n\t\tString query = queryBuilder.getLandInfoSearchQuery(criteria, preparedStmtList);\n\t\tList<LandInfo> landInfoData = jdbcTemplate.query(query, preparedStmtList.toArray(), rowMapper);\n\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: Removed duplicated region for block: B:25:0x0094
@WorkerThread public zzasy zzP(String str, String str2) { Cursor cursor; Cursor cursor2 = null; zzac.zzdv(str); zzac.zzdv(str2); zzmq(); zznA(); try { Cursor query = getWritableDatabase().query("events", new String[]{"lifetime_count", "current_bund...
[ "public void onBlockRemoval()\r\n/* 178: */ {\r\n/* 179:149 */ this.buffer.onRemove(this);\r\n/* 180:151 */ for (int i = 0; i < 27; i++)\r\n/* 181: */ {\r\n/* 182:152 */ ur ist = this.contents[i];\r\n/* 183:153 */ if ((ist != null) && (ist.a > 0)) {\r\n/* 184:154 */ CoreLib.d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
according to the network coordinates, compute the average distance from one certain node to nodes within the same cluster
double intraClusterDist(Matrix_4_HSH coordsMatrix, int[] nodes2Cluster, int nodeNo) { int clusterNo = nodes2Cluster[nodeNo]; int nodesNum = coordsMatrix.mat_row; int DIMS_NUM = coordsMatrix.mat_column; Matrix_4_HSH x = new Matrix_4_HSH(1, DIMS_NUM); for (int j = 0; j < DIMS_NUM; j++) x.mat[0][j] = ...
[ "public void computeDistance() {\n\t\t\n\t\t// Step 1: Iterates through each of the coordinates in the coordinates array\n\t\tint index = 0;\n\t\t\n\t\tfor (Coordinate coor : coordinates) {\n\n\t\t\t\n\t\t\tdouble coorX = coor.getLatitude(); // Px of coordinate\n\t\t\tdouble coorY = coor.getLongitude(); // Py of co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fields declarations Default constructor
public AddressedBuffer() { this(null, null, true); }
[ "public SimpleClassWithFields() {\n }", "public Personnage() {\n //OJO en vez de poner afuera las variables inicializadas con un valors par defaut las hubiera podido poner aqui, EGAL\n }", "private Child()\n {\n // Give a default name (to be filled out later)\n firstName = \"FirstN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
remove the delimeter from end of line
public void writeLine(){ csv_line = csv_line.substring(0, csv_line.length()-(DELIM.length()-1)); // add line to print writer out.println(csv_line); // clear csv string csv_line="\""; }
[ "public void eraseToEndOfLine();", "public Delimiter extractNewDelimiterFromLine(String line) {\n/* 137 */ return null;\n/* */ }", "private static CharSequence removeTrailingLines(CharSequence text) {\n while (text.charAt(text.length() - 1) == '\\n') {\n text = text.subSequence(0, te...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Returns the number of nights the traveler has spent in a train station when visiting a city without enough money for lodging. TODO
public int getTotalNightsInTrainStation() { return 0; }
[ "public long getNumberOfNights() {\n\t\tlong numberOfNights = ChronoUnit.DAYS.between(arrivalDate, departureDate);\n\t\treturn numberOfNights;\n\t}", "public int getNumberOfSeats() {\n int amount = 0;\n if(isPassengerTrain()){\n PassengerWagon wagon = (PassengerWagon) firstWagon;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the InvocationLabel property value.
private java.awt.Label getInvocationLabel() { if (ivjInvocationLabel == null) { try { ivjInvocationLabel = new java.awt.Label(); ivjInvocationLabel.setName("InvocationLabel"); ivjInvocationLabel.setLocation(new java.awt.Point(20, 145)); ivjInvocationLabel.setText("Invocation delay on client"); ...
[ "public String getLabel() {\r\n return this.label;\r\n }", "public String mGetLabel(){\n return vLabel;\n }", "public String getLabel()\n {\n return this.label;\n }", "private String getLabel() {\n return label;\n }", "public java.lang.String getLabel () {\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: Code restructure failed: missing block: B:11:0x004f, code lost: if (r2.isClosed() == false) goto L_0x0051; / JADX WARNING: Code restructure failed: missing block: B:12:0x0051, code lost: r2.close(); / JADX WARNING: Code restructure failed: missing block: B:18:?, code lost: e.c.f.c.d(); / JADX WARNING: C...
public final java.util.Map<java.lang.Integer, java.lang.String> b() { /* r10 = this; java.lang.String r0 = "'" java.util.HashMap r1 = new java.util.HashMap r1.<init>() android.database.sqlite.SQLiteDatabase r2 = r10.f6918d // Catch:{ all -> 0x0059 ...
[ "private void m6040a(java.io.BufferedReader r1) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.p...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\r\n\t\treturn \"Short description\";\r\n\t}", "public String getServletInfo()\r\n {\r\n\treturn \"Short description\";\r\n }", "@Override\n public String getServletInfo() {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void executeTransaction(TransactionInternal txn) throws BabuDBException { }
[ "@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" ] ] } }
Insere um novo Produto no Banco de Dados
public void inserir(Produto produto) throws SQLException { PreparedStatement ps = conn.prepareStatement( "INSERT INTO produto (descricao, valor, quantidade, nome_fornecedor, ultima_compra) " + "VALUES (?, ?, ?, ?, ?)"); ps.setString(1, produto.getDescricao()); ps....
[ "public void inserirProduto(Produto produto) {\n\t\t\n\t}", "@Override\n\tpublic void inserirProduto(Produto produto) {\n\t\t\n\t}", "public void inserir(Produto p) {\r\n No novoNo = new No(p);\r\n if (this.vazia()) {\r\n this.primeiro = novoNo;\r\n } else {\r\n this.u...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the next Resource from the list.
public Resource next() { return values()[ordinal() + 1]; }
[ "public NodeResources getNext() {\t\t\n return next;\t\t\n }", "public Object getNext() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.next; // Get the reference to the next item\n\t\t}\n\t\treturn current == null ? null : current.item;\n\t}", "public ListItem getNext() {\n return next...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return the name of player win a game
private String getPlayerNameWinGame() { if (player1.getGameScore() == 4) { winGame(player1); return "_________________" + player1.getName() + " won the game" + "_________________ "; } if (player2.getGameScore() == 4) { winGame(player2); return "_________________" + player2.getName() + " won the game" ...
[ "@Override\r\n\tprotected String calculateScoreName() {\n\t\treturn \"Win for \" + this.advanPlayer.getName();\r\n\t}", "public String winner() {\n\t\tif (isGameOver()) {\n\t\t\treturn frontKill.name;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String winner() {\n if (gameOver()) {\n re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns what should be added to the status bar by the addon.
public String getStatusString(int dim, int bX, int bY, int bZ);
[ "public JLabel getStatusBar() { \r\n return statusbar;\r\n }", "public String getStatusBar() {\n return statusBar;\n }", "private Component buildStatusBar ()\r\n {\r\n JPanel statusBar = new JPanel(new BorderLayout());\r\n statusBar.setBackground(Color.LIGHT_GRAY...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
See HDDS3116 to explain the need for this lock
public OzoneContainer getContainer() { constructionLock.readLock().lock(); try { return this.container; } finally { constructionLock.readLock().unlock(); } }
[ "void obtainLock(){\n writeLock();\n }", "private void lock(){\n\t\tlock.writeLock().lock();\n\t\tlock.readLock().lock();\n\t}", "public void lock() { \n sync.acquireShared(1);\n }", "@DISPID(13) //= 0xd. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n boolean locke...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the enabled value.
public boolean enabled() { return this.enabled; }
[ "public Integer getEnabled () {\n\t\t\n\t\t// Return the value\n\t\treturn this.enabled;\n\t}", "@Accessor(qualifier = \"enabled\", type = Accessor.Type.GETTER)\n\tpublic Boolean getEnabled()\n\t{\n\t\tif (this._enabled!=null)\n\t\t{\n\t\t\treturn _enabled;\n\t\t}\n\t\treturn _enabled = getPersistenceContext().ge...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Catches the input from the event (console input) and sends the command to be acted on.
@FXML public void sendInput(ActionEvent event) { if (this.consoleInput != null && !this.consoleInput.getText().isEmpty()) { this.printCommand(this.consoleInput.getText()); try { this.parseCommand(consoleInput.getText()); commandHistory....
[ "public void getCommand(String input) {\n \tcommandcontroller.processCommand(input);\n }", "public void inputEntered(String data) {\n\t\tCommand command = commands.get(data);\n\t\tif (command == null) {\n\t\t\tSystem.out.println(\"Sorry, we don't recognize that command\");\n\t\t} else {\n\t\t\tcommand.execu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks that not matching passwords are rejected.
@Test public void rejectsNotMatchingPasswords() { userForm.setRepeatedPassword("drowssap"); prepareErrorsAndExecute(); verify(userManagement).getUsersByEmail(userForm.getEmailAddress()); verify(userManagement).getUser(userForm.getUsername()); assertContainsFieldErrorWithCo...
[ "@Test\n\tpublic void testInvalidPasswords() {\n\t\tArrayList<String> results;\n\t\tresults = PasswordCheckerUtility.getInvalidPasswords(passwords);\n\t\tassertEquals(results.size(), 12);\n\t\tassertEquals(results.get(0), \"553DD377 -> The password must contain at least one lower case alphabetic character\");\n\t\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates a clause which contains all possible combinations of n neighbours from within the list of neighbors
public static String getClausalKnowledge(ArrayList<String> neigh, int n){ ArrayList<String> clauses= new ArrayList<String>(); String result = ""; boolean used[] = new boolean[neigh.size()]; for(int i = 0 ; i < n ; i ++){ used[i]=false; } nCk(neigh.size(), n, 0, neigh,used, clauses, 0 ); if(clauses.s...
[ "abstract public List<Node> getNeighbors(int i, int j);", "public static void getNeighbors(Node n)\n {\n for (int i = n.getRow() - 1; i <= n.getRow() + 1; i++) {\n for (int j = n.getCol() - 1; j <= n.getCol() + 1; j++) {\n\n if (isValidNeighbor(i, j, n)) { // neighbor valid\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string latest_version = 3;
public com.google.protobuf.ByteString getLatestVersionBytes() { java.lang.Object ref = latestVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); late...
[ "public String getLatestVersion();", "public abstract int getLatestVersion();", "public void setModLatestVersion(BuildVersion version);", "String getPrevVersion();", "String configuredVersion();", "public static String getVersion() { return version != null ? version : \"0.0.0\"; }", "public String curre...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public static boolean m36950a(C7033a aVar, Object obj, Object obj2) { return C7025j.m36889b((C7024i) obj, (C7024i) obj2); }
[ "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" ] ] } }
TODO Autogenerated method stub
@Override public List<RoomBean> getAllRooms() { log.info("Inside Getting all Rooms..."); log.debug("Inside getting all Rooms..."); List<RoomEntity> entities = roomRepository.findAll(); List<RoomBean> beans = RoomRequestTransformer.getRoomBeamList(entities); log.info("Returning all Rooms to controlle...
[ "@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" ] ] } }
Double speed while biking
@Override protected int getTimeBetweenTiles() { return super.getTimeBetweenTiles()/(Game.getPlayer().isBiking() ? 2 : 1); }
[ "public void boost() {\n\t\tif(speed >= 13 && speed < 14 && boost > 0)\n\t\t{\n\t\t\tspeed = 80;\n\t\t\tboost--;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void handle(long now) {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tclock.draw(gc);\n\t\t\t\t\tclock.updateCooldown(gc, player1.getSkill().getMaxCooldown(), \n\t\t\t\t\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void onStart(ITestContext context) { }
[ "@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" ] ] } }
Created by Hoshiko on 8/16/15.
public interface YelpSearchService { public static final String BASE_URL = "https://api.yelp.com"; @GET("/v2/search/?category_filter=foodtrucks&sort=1&limit=20") void searchFoodCarts (@Query("location") String loc, Callback<YelpResponse> responseResult); }
[ "@Override\n public void extornar() {\n \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\n }", "protected void method_5557() {}", "@Override\n public int utilite() {\n return 0;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form FSala
public FSm() { initComponents(); }
[ "public String doNewForm(){\n\t\tsetUser(new User());\n\t\t//Por defecto, no se ha pulsado cambiar foto\n\t\tsetCambiarFoto(false);\n\t\t//cargo la lista de roles\n\t\tthis.lstRoles=userService.findAllRoles();\n\t\t//cargo la lisra de familias\n\t\tthis.lstFamilias=familiaService.getFamiliasAllForCombo();\n\t\t//Co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
constructor Creates a camera positioned at (0, 0, 1) looking at (0, 0, 0). Field of view is specified by fov in degrees.
Camera(int pixelWidth, int pixelHeight, float fov, float near, float far) { this.mPixelWidth = pixelWidth; this.mPixelHeight = pixelHeight; this.mAspectRatio = this.mPixelWidth / this.mPixelHeight; this.mPixelAligned = false; this.mUpperLeftOrigin = fals...
[ "Camera(Vector3f up, Vector3f center, Vector3f position, float fov, float aspectRatio, float zNear, float zFar) {\n this.up = up;\n this.center = center;\n this.position = position;\n this.fov = fov;\n this.aspectRatio = aspectRatio;\n this.zNear = zNear;\n this.zFar...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
move left and reset image
public void moveLeft() { location.x = location.x - 1; bugImage = new Image("textures//bugLeft.png",25,25,true,true); setImageView(); }
[ "public void moveLeft() {\n\t\tif ( !paused && xPosition-dx > xMax[0] ){\n\t\t\txPosition-=dx;\n\t\t\tshape = new Rectangle2D.Double(xPosition,yPosition,getAncho(),getAlto());\n\t\t\tthis.dicreaseStrenght();\n\t\t}\n\t}", "public void moveLeft() {\r\n\t\tposition = position.getLeft();\r\n\t}", "public void move...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sends an HTML email with inline images.
public static void send(String host, String port, final String userName, final String password, String toAddress, String ccAddress, String fromAddress, String subject, String htmlBody, Map<String, String> mapInlineImages) throws Exception { // sets SMTP server properties Properties properties = new...
[ "public static void main(String[] args) {\n \t//String[] mailTo = {\"Nandeeswara.Padala@prolifics.com\",\"nandi.testing@gmail.com\"};\n \tString[] mailTo=args;\n // SMTP info\n /* String host = \"smtp.gmail.com\";\n String port = \"587\";\n String mailFrom = \"YOUR_EMAIL\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
insert the item at the end
public Item removeFirst() { if (isEmpty()) throw new java.util.NoSuchElementException(); Item item = first.item; if (first.next != null) first.next.previous = null; if (last == first) last = null; first = first.next; size--; return item; }
[ "void insertNext(Item item);", "public void insertAtBack(Object insertItem);", "public void addLast(Item item) {\n\t\t insert( item, nextIdx );\n\t\t if ( nextIdx < (data.length - 1) )\n\t\t\t ++nextIdx;\n\t\t else\n\t\t\t nextIdx = 0;\n\t }", "public void addLast(Item item)\r\n { l.addAtRear(it...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/Building Index for Version 1, Version 2
public Map<String, Terms> bulidIndex_Ver1(String folderPath){ Lemmatizer lemmatizer = new Lemmatizer(); File folder = new File(folderPath); for(File file: folder.listFiles()){ if(file.isFile()){ Map<String, Integer> termFreqMap = lemmatizer.buildLemmaDictionary(file); buildIndexVer1(file.getName(),ter...
[ "private Indexer() {}", "public interface OIndex extends Comparable<OIndex> {\n String MERGE_KEYS = \"mergeKeys\";\n\n OIndex create(OIndexMetadata metadata, boolean rebuild, OProgressListener progressListener);\n\n String getDatabaseName();\n\n /**\n * Types of the keys that index can accept, if index cont...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .dossier.Resources resources = 2; The resources to include.
public Builder setResources( com.github.jsdossier.proto.Resources.Builder builderForValue) { if (resourcesBuilder_ == null) { resources_ = builderForValue.build(); onChanged(); } else { resourcesBuilder_.setMessage(builderForValue.build()); } return this; }
[ "public void setResources(List<Resource> resources) {\n\t\tthis.resources = resources;\n\t\t\n\t}", "public void addManyResources(Resource... resources){\n for(Resource resource : resources){\n this.addResource(resource);\n }\n }", "public void setResources(Resources re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Task eseguito in background, crea una collezione o un libro.
@Override public Void doInBackground() { try { logger.info("Starting upload..."); if (Utility.countXmlTreeLeaves() > 0) { //Crea oggetto ImObject per interfacciarsi a Phaidra ImObject obj = new ImObject(phaidra, lock, user...
[ "private void createTask() {\n\t\tSystem.out.println(\"===========this is create task !!!=============\");\n\t\tlogger.info(\"===========this is create task !!!=============\");\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\tcomenzarConometro();\r\n\t}", "private void creationNewHome(String mail) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor that takes in a configContext and useseperate listner
public OrderWine1StPhaseServiceStub ( org.apache.axis2.context.ConfigurationContext configurationContext, java.lang.String targetEndpoint, boolean useSeparateListener ) throws org.apache.axis2.AxisFault { // To populate AxisService populateAxisService(); populateFaults(); _serviceClient = new org.ap...
[ "@Autowired\n public SecurityConfig(InterceptProperties config) {\n this.config = config;\n }", "private ForeignContextConfig() {\n }", "public EventContextListener() {\r\n\r\n }", "public static void init(Context context, ClientConfiguration config) {\n ClickTrackingManager.getInsta...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
repeated .com.heme.logic.module.FriendCombine friendInfo = 3;
public java.util.List<? extends com.heme.logic.module.Data.FriendCombineOrBuilder> getFriendInfoOrBuilderList() { return friendInfo_; }
[ "public void addFriend( Person friend)\n {\n // put your code here\n this.friends = this.friends + friend + \" \";\n }", "comm.CommModel.MemberOrBuilder getUserShareOrBuilder();", "public com.znl.proto.M17.FriendInfo.Builder addFriendInfosBuilder() {\n return getFriendInfosFieldBuil...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by carry on 17320.
public interface SingleObject { void showMessage(String s); }
[ "@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}", "public void mo28221a() {\n }", "@Override\n\t\tpublic void kayit1() {\n\t\t\t\n\t\t}", "protect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Busca un curso por su id
Curso getById(long id);
[ "public Curso getCurso(int idCurso) {\n EntityManager em = this.getEntityManager();\n Curso c = em.find(Curso.class, idCurso);\n return c;\n }", "public Curso leerCurso(int idCurso){\n Curso curso = new Curso();\n CtrlTipoCurso ctrlTipoCurso = new CtrlTipoCurso();\n Ct...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
checkValidity is checking the user name and password of the employee and also update him as connected in the DB if all info is correct.
public boolean checkValidity() { if (username.equals(employeeMap.get(getUsername()).getUserName()) && password.equals(employeeMap.get(getUsername()).getPassword())) { if (checkedIfAlreadyLoggedIn(employeeMap.get(getUsername()).getLogin()) == false) { setConnectedEmployee(employeeMap.get(getUsername())); ...
[ "public boolean verifyInput() throws RemoteException,SQLException{ \n String email = d_email.getText();\n String password = d_holder_pass.getText();\n boolean valid = true;\n if(hasEmpty(email, password)){\n JOptionPane.showMessageDialog(null,\"You Must Fill All Fields\",\"Empty Input\",...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes the file to make it harder to sniff stream. Can be called (at least under linux) after both endpoints have opened the file.
public void deleteFile() { file.delete(); }
[ "@Override\n public void deleteOldFile() {\n File file = new File(fileFolder + \"/\" + fileName + \".mp3\");\n file.deleteOnExit();\n }", "private synchronized void deleteTempFile() {\n if (fileInClosed && file != null && file.delete()) {\n file = null;\n }\n }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Field tilda.data.TILDA.MaintenanceLog.deleted > TILDA.MaintenanceLog."deleted" /...
public final void setDeleted(int year, int month, int date, int hourOfDay, int minute, int second, int millis, ZoneId z) throws Exception { setDeleted(DateTimeUtil.newTZ(year, month, date, hourOfDay, minute, second, millis, z)); }
[ "public void setDatedeleted(Timestamp value) {\n\t\tset(5, value);\n\t}", "public Date getDeleted() {\n return deleted;\n }", "public OffsetDateTime deletedTime() {\n if (this.deletedTime == null) {\n return null;\n }\n return this.deletedTime.dateTime();\n }", "publi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add an actionlistener to every button
public void setActionListeners(ActionListener al) { // add Action listeners to every button in every panel mm.getHowtoButton().addActionListener(al); mm.getQuitButton().addActionListener(al); mm.getStartButton().addActionListener(al); }
[ "private void addActionListenerToButtons(ActionListener listener) {\n\t\tthis.InstructionButton.setActionCommand(\"instruction\");\n\t\tthis.ExitButton.setActionCommand(\"exit\");\n\t\tthis.ExtremeButton.setActionCommand(\"extreme\");\n\t\tthis.HardButton.setActionCommand(\"hard\");\n\t\tthis.MediumButton.setAction...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
getter for the line number of the statement
int get_line_num() { return line_num; }
[ "public final int lineNumber()\r\n {\r\n return lineno;\r\n }", "public int getLineNumber()\r\n {\r\n return lineNumber;\r\n }", "public int lineNumber() {\n return lineNo;\n }", "public int getLineNumber()\n {\n\n return lineNumber;\n }", "public int getLineNumber() {...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the after16h wind speed.
public void setAfter16hWindSpeed(double after16hWindSpeed) { this.after16hWindSpeed = after16hWindSpeed; }
[ "public void setTalonSpeed(double val){\n // this command is used to manually move the\n // motor so set the variable that stops the PID\n // from overriding \n manualOverride = true;\n velocity = val;\n motor1.set(ControlMode.PercentOutput, velocity);\n LogInfo(true); \n }", "private void ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new instance.
public SummarizeYaessLogSink(RecordWriter writer, Predicate<? super YaessLogRecord> filter) { this.writer = writer; this.filter = filter; }
[ "public Create() {\n\t\t\tsuper();\n\t\t}", "T createNewInstance();", "public void create() { }", "@SuppressWarnings(\"unchecked\")\n\tpublic static JSONObject createInstance() {\n\t\tJSONObject json = new JSONObject();\n\t\ttry {\n\t\t\tjson = makeRequest(URL + \"/instance\", \"POST\");\n\t\t} catch (Excepti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void initEpics(Boolean doEpics) { System.out.println("monitor.initEpics():Initializing EPICS Channel Access"); if (app.xMsgHost=="localhost") {cndHv.online=false ; cndScalers.online=false;} if ( doEpics) {cndHv.startEPICS(); cndScalers.startEPICS();} if (!doEpics) {c...
[ "@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" ] ] } }
Given: A RecipeListActivity with at least one element (downloaded from a server) When: Click on any element of the recipes list
@Test public void clickOnRecipeListItem_opensRecipeDetailsActivity() throws Exception { onView(withId(R.id.rv_recipes)) .perform(actionOnItemAtPosition(0, click())); // Then: The proper intent is started with the required extras intended( allOf(hasComponent(R...
[ "@Test\n public void clickButton_Initiates_RecipeListActivity() {\n for (int i = 0;i<4; i++) {\n Log.d(\"position\", Integer.toString(i));\n\n // Scroll to position in RecyclerView list and click on it.\n onView(ViewMatchers.withId(R.id.recipe_cards_rv)).perform(RecyclerVi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If this collection has already been initialized, returns the collection. Otherwise returns the results of getOrdenTrabajos(new Criteria(),Connection) This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input
public List getOrdenTrabajos(Connection con) throws TorqueException { return getOrdenTrabajos(new Criteria(10), con); }
[ "public List<Ordenproduccion> sacaOrdenes() {\n List<Ordenproduccion> ordenes = new ArrayList<Ordenproduccion>();\n Session session = NewHibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n Query query = null;\n try {\n tx = session.beginTransacti...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
f0 ::= ( Expression() )? f1 ::= ";"
@Override public F visit(ExpressionStatement n, F flowFactIN) { F flowFactOUT; flowFactOUT = initProcess(n, flowFactIN); return flowFactOUT; }
[ "public void visit(Expression n) {\n\tn.f0.accept(this);\n }", "public void expression0(){\n \tenterRule(NonTerminal.EXPRESSION0);\n \texpression1();\n \t//checking if expression1 is followed by OP0, [] means o or 1\n \tif(have(NonTerminal.OP0)){\n \t\t//expect OP0 in order to forward to next To...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
string title = 1;
public java.lang.String getTitle() { java.lang.Object ref = title_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStri...
[ "public synchronized void setTitle(String s) { title = s; }", "private void setTitle(String string) \n\t{\n\t\t\n\t}", "public void setTitle(String title)\r\n {\r\n this.title=title;\r\n }", "public void setTitle(String value){\n this.title = value;\n }", "public static String getT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor which sets the default scanner.
@Deprecated public SintacticoHTML(java_cup.runtime.Scanner s) {super(s);}
[ "public Scanner() {\n }", "void setScanner(Scanner in) {\n scanner = in;\n }", "public StyleScanner()\n {\n this(\"\");\n }", "public ECGReader(java_cup.runtime.Scanner s) {super(s);}", "public LuaBaseScanner() {\n super();\n }", "public Parser(Scanner scanner) {\n \t\tthis.s...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
if the tree is empty, the value is inserted at the root
public void insert(String value) { if(root == null) { root = insert(value, root); } else { //if the tree isn't empty, the value is inserted in its proper place insert(value, root); } }
[ "public void insert(int value) {\n if (root == null) {\n root = new TreeNode(value);\n }\n else {\n root.insert(value);\n }\n}", "T insert(TreeNode<T> root, T value)\r\n {\r\n T finalTree = null;\r\n assert root!=null; \r\n int difference = (int)value - (int)root.getData();\r\n i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function getFunction(CallSignature sign) throws CompilerException;
ParamBinding getFunction(CallSignature sign, CandidateList candidates) throws CompilerException;
[ "JavaFunctionDef getFunction();", "public abstract AbstractFunctionCompiler function();", "Function getFunction(String s)\n {\n return (Function) functions.get(s);\n }", "@Converted(kind = Converted.Kind.MANUAL_COMPILATION,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/CallSite.h\", line = 101,\n FQN...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string name = 3;
public String getName() { Object ref = name_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; ...
[ "public String setName(final String name);", "@org.chromium.sdk.internal.protocolparser.JsonOptionalField\n String name();", "public void setName(java.lang.String name){this.name = name;}", "public void setName(String n) {this.name = n; }", "public void setName(String string) {\n name = string;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the number of descendants of node.
public int size() { if (isEmpty()) { return 0; } return left().size() + right().size() + 1; }
[ "long getDescendantCount();", "public long getNumberOfDescendants()\n {\n return _tree.getNumberOfDescendants();\n }", "public Integer nodeCount();", "public int getNodeCount()\n\t{\n\t\tcounter = 0;\n\t\tcountTreeNodes(this.root);\n\t\treturn counter;\n\t}", "public int numberOfChildren() {\n\t\tif(ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the maximum number of attendees for this event. If the event doesn't specify a maximum, returns 1.
public int returnMaxAttendees() { // returns the maximum number of attendees, if the event doesn't have a maximum, returns -1 Map<String, Object> eventDetailsMap = getEventDetails(); int maxAttendees; if (eventDetailsMap.get("Max Attendees") == null) { maxAttendees = -1; ...
[ "private int getMaxMemberCount() {\n int max = 0;\n for (StudentTeam team : this.studentTeamsList) {\n if (team.memberCount() > max) {\n max = team.memberCount();\n }\n }\n return max;\n }", "public int getMaxUsers();", "public int getMaxAllyTe...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
java.lang.Integer object internals: OFFSET SIZE TYPE DESCRIPTION VALUE 0 12 (object header) N/A 12 4 int Integer.value N/A Instance size: 16 bytes Space losses: 0 bytes internal + 0 bytes external = 0 bytes total
public static void printInteger() { System.out.println(ClassLayout.parseClass(Integer.class).toPrintable()); }
[ "public int getSerialisedSize();", "public int getObjMemorySize() {\n \t\treturn ObjMem.getSize();\n \t}", "public int getObjectSize() {\n return objectSize;\n }", "@Override\n public long heapSize() {\n // Deep object overhead for this KV consists of two parts. The first part is the KV object\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Declaration of all motors, servos, etc
public void init() { left = hardwareMap.get(DcMotor.class, "ShoulderMotor"); right = hardwareMap.get(DcMotor.class, "WinchMotor"); wrist = hardwareMap.get(Servo.class, "WristServo"); finger = hardwareMap.get(Servo.class, "FingerServo"); hornRight = hardwareMap.get(Servo.class, "H...
[ "@Override\n public void init() {\n\n\n // Drive Train Motors\n\n FrontRight = hardwareMap.dcMotor.get(\"fr\");\n FrontLeft = hardwareMap.dcMotor.get(\"fl\");\n BackRight = hardwareMap.dcMotor.get(\"br\");\n BackLeft = hardwareMap.dcMotor.get(\"bl\");\n FrontRight.setDir...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this method returns the code given the row & column
public static int row(int start, int rowNum, int wantedColumn) { int column = 1; // the column we are on int n = start; // the code number we are on for(int i = rowNum + 1; i < rowNum + 5000; i++) { if(column == wantedColumn) break; n += i; col...
[ "private int Pos2Index (int row, int col) {\n return row * dimension + col;\n }", "private int getX(int col)\n {\n return col * 117 + Calculator.PADDING * 2;\n }", "public abstract int getColumn(final int x, final int y) throws Exception;", "private int index(int row, int col) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation to get full information about user.
@Override public User getFullUserInformationByLogin(String login) throws ServiceException { try { User user = userDAO.getFullUserInformationByLogin(login); user.setActiveRates(rateDAO.getActiveRatesForUser(user.getUserId())); user.setFinishedRates(rateDAO.getFinishedRates...
[ "UserInfo getUser();", "public UserInfoBasic getUserInfo() {\n return userInfo;\n }", "@ApiOperation(value = \"Retrieves current user information\")\n @GetMapping(\"/user\")\n public UserInfo whoAmI() {\n LOGGER.info(\"Receiving information about current user\");\n return authentic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the bukkit persisting world unique id of the claim.
public void setWorldUUID(UUID worldUUID) { this.worldUUID = worldUUID; }
[ "private void setWorldid(long value) {\n bitField0_ |= 0x00000004;\n worldid_ = value;\n }", "private void setWorldid(long value) {\n bitField0_ |= 0x00000002;\n worldid_ = value;\n }", "private void setWorldid(\n int index, long value) {\n ensureWorldidIsMutable();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public boolean onLongClick(View v) { int a = 5; return true; }
[ "@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" ] ] } }
optional fixed64 steamid = 1 [(.description) = "steamid to use"];
@java.lang.Override public boolean hasSteamid() { return ((bitField0_ & 0x00000001) != 0); }
[ "long getOwnerSteamid();", "long getSteamIdTarget();", "public Builder setSteamId(long value) {\n bitField0_ |= 0x00000008;\n steamId_ = value;\n onChanged();\n return this;\n }", "public Builder setSteamId(long value) {\n bitField0_ |= 0x00000004;\n st...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the id of the category which this search belongs to.
public BigInteger getCategoryId();
[ "public int getCategory_id() {\r\n\t\treturn Category_id;\r\n\t}", "public int getCategoryId() {\n return categoryId_;\n }", "private Long getCategoryId(String category, HttpSession session) {\n List<Category> categories = (List<Category>) session.getAttribute(\"categories\");\n Long c...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.
@JsOverlay @Nonnull public final CssProps shapeImageThreshold( String shapeImageThreshold ) { setShapeImageThreshold( shapeImageThreshold ); return this; }
[ "public void setAlpha(float alpha) {\n setRootAlpha((int) (alpha * 255));\n }", "public int getAlpha(int pixel) {\n\treturn 255;\n}", "public Color alpha(float a) {\n\t\treturn set(getRed(), getGreen(), getBlue(), (int) (a * 255));\n\t}", "private int getAlpha(double value)\n {\n d...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Minimal rank of employee who can handle this call
Call(Caller caller) { this.caller = caller; rank = Rank.RESPONDENT; }
[ "float getMinRank();", "public Integer getMinRank() {\n\t\treturn 1;\n\t}", "public float getMinRank() {\n return minRank_;\n }", "float getMaxRank();", "public abstract int rank();", "private int getUserRank() {\n return rankStrategy.getUserRank(scoreList, UserManager.getInstance().getUser...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string card_number = 5;
public java.lang.String getCardNumber() { java.lang.Object ref = cardNumber_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s =...
[ "public void setCardNumber(java.lang.String param){\r\n \r\n this.localCardNumber=param;\r\n \r\n\r\n }", "public Builder setCardno(\n java.lang.String value) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional bytes key = 6;
public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; }
[ "akka.protobuf.ByteString getKeyBytes();", "void setKey(byte[] key);", "@Override\n public int keySize() {\n return 12;\n }", "public int keyLength() { return key_length; }", "abstract byte getKeySignalBit(SecretKey key);", "public abstract byte[] get(String keySpace, byte[] key);", "public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public WeekDay1 nextDay() { return MON; }
[ "@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" ] ] } }
ImageInStatement ::= OP_LARROW Source
void imageinstatement() throws SyntaxException { match(Kind.OP_LARROW); source(); }
[ "Statement_In ImageInStatement(Token ft) throws SyntaxException {\n match(OP_LARROW);\r\n Source s = Source();\r\n return new Statement_In(ft, ft, s);\r\n\r\n }", "@Source(\"arrow_inout.png\")\n\tImageResource arrowInout();", "@Test\n\tpublic void imageDeclaration() throws SyntaxExceptio...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: private / access modifiers changed from: public / renamed from: a
private final void m75762a(StarTheme starTheme) { SkuToolBarA skuToolBarA = (SkuToolBarA) mo78371a(R.id.sku_bar); C32569u.m150513a((Object) skuToolBarA, C6969H.m41409d("G7A88C025BD31B9")); ((AddShelfTextView) skuToolBarA.mo78564a(R.id.follow_btn)).setNormalTextColor(Integer.valueOf(Color.parseCo...
[ "protected void a() {}", "protected void method_5557() {}", "private void a() {\n }", "public void mo5201a() {\n }", "interface C4511c {\n /* renamed from: a */\n void mo29775a();\n }", "public void mo28221a() {\n }", "@Override\r\n public void public...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toast.makeText(cordova.getActivity(), "user cancelled the transaction", Toast.LENGTH_SHORT).show();
@Override public void onTransactionCancelled() { JSONObject resultObj = new JSONObject(); try { resultObj.put("message", "You Cancelled the transaction"); resultObj.put("status", "cancelled"); clearCookies(cordova.getActivity()); ...
[ "@Override\n public void onClick(View view) {\n Toast.makeText(getActivity().getApplicationContext(), \"Transaction completed on courier's side!\", Toast.LENGTH_LONG).show();\n b.dismiss();\n }", "@Override\n public void onCancel() {\n Toast.ma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks that an amount of energy is available; if so, it is consumed.
protected boolean useEnergyIfAble(float energy){ if(getBatteryLevel() >= energy){ setBatteryLevel(getBatteryLevel() - energy); // at some point should consolidate stops so that this is the only one necessary if(getBatteryLevel() <= 0){ Log.v("BasicRobot", "Robot stopped due to not having ...
[ "protected boolean enoughEnergy(Point currTruckPosition, Parcel parcel, Optional<ChargingStation> chargingStation){\r\n\t\tdouble energyNeeded = calculateEnergyConsumptionTask(currTruckPosition, parcel) + calculateEnergyConsumptionToChargingStation(parcel.getDeliveryLocation(), chargingStation);\r\n\t\t//System.out...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create new detail pane either pass ID as an arg to new detail fragment or create a new detail ativity and use an intent to pass the id
private void newDetail (long id) { if (mTwoPane) { Bundle arguments = new Bundle(); arguments.putLong(Person.ARG_ITEM_ID, id); PersonDetailFragment fragment = new PersonDetailFragment(); fragment.setArguments(arguments); getSupportFragmentManager().beginTransaction() ...
[ "@Override\n public void onClick(View v) {\n if (mTwoPane) {\n Bundle arguments = new Bundle();\n arguments.putInt(ItemDetailFragment.POSITION, (int) (long) holder.mItem.getId());\n ItemDetailFragment fragment = n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method is used to stopRingTone.
private void stopRingTone() { if (player != null && (player.isPlaying())) { try { player.stop(); player.reset(); player.release(); player = null; } catch (IllegalStateException e) { e.printStackTrace(); } } }
[ "public void stopTone() {\n synchronized (mToneGeneratorLock) {\n if (mToneGenerator != null) mToneGenerator.stopTone();\n }\n }", "private native void stopRinging(long paramLong);", "void stopAudioStream();", "public void stop() {\n\t\tsuper.stop();\n\t\tstopAudio();\n\t}", "@Ov...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The ProviderDescription object represents a description of a provider agent. Each provider should have only one corresponding ProviderDescription. A ProviderDescription is somewhat analogous to the UDDI concept of a BusinessEntity. In a cougaar society, it is required that every agent has a unique name; thus ProviderDe...
public interface ProviderDescription { /** * Returns the provider (agent) name. */ public String getProviderName(); public String getOrganizationType(); public Collection getBusinessCategories(); /** * Returns the ServiceProfiles for this provider; * will be empty if this provider does not desc...
[ "public void setProviderName(String providerName) {\n this.providerName = providerName;\n }", "public abstract String providerName();", "public String getProvider(){\n\t\t\treturn this.provider;\n\t\t}", "public ProviderImplementation(String name, Provider provider, ImplementationTechnology technology) {\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Talon configuration for the Drive Motor
public void initDriveMotor(){ driveMotor.configFactoryDefault(); driveMotor.configSelectedFeedbackSensor(FeedbackDevice.QuadEncoder, 0, TIMEOUT); driveMotor.selectProfileSlot(0, 0); //slot #, PID # //Invert the drive motors on one side because the calibration routine will...
[ "public Drive(DriveConfigDefault config, MyJoystick joy) {\n this.config = config;\n this.joy = joy;\n \n leftTalons = new CANTalon[config.numMotorsSide];\n rightTalons = new CANTalon[config.numMotorsSide];\n\n for(int i = 0; i < config.numMotorsSide; i++) {\n le...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
helper method to search a response for occurrences of a literal match string and return a list of start/end offsets
private List<int[]> getMatches(byte[] response, byte[] match) { List<int[]> matches = new ArrayList<>(); int start = 0; while (start < response.length) { start = extHelpers.indexOf(response, match, true, start, response.length); if (start == -1) break; matches.add(new int[] { star...
[ "public List<int[]> getOffsets(byte[] response, byte[] match)\n {\n List<int[]> matches = new ArrayList<>();\n for (int i = 0; i < response.length; i += match.length)\n {\n i = this.helpers.indexOf(response, match, true, i, response.length);\n if (i == -1)\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Toggle visible state of this component
public UIObject toggleVisible() { return setVisible(!isVisible()); }
[ "public void toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }", "public void toggleVisibility() {\n boolean isVisible = mModel.get(FeedOptionsProperties.VISIBILITY_KEY);\n // If not currently visible, we're toggling to visible.\n if (!i...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
method to get grade
static char getGrade(double avg){ //letter grading char g; //multi-way if or extended if if (avg>=90) g = 'A'; else if (avg>=80) g ='B'; else if (avg>=70) g ='C'; else if (avg>...
[ "public int getGrade ()\n {\n return grade ;\n }", "public String getGrade()\r\n\t{\r\n\t\treturn this.grade;\r\n\t}", "LetterGrade getLetterGrade();", "public float getGrade() {\n\t\tSystem.out.print(\"grade = \" + totalGrade);\n\t\treturn totalGrade;\n\t}", "public static String getGrade(int ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
to check if something is already spoken at a particular battery level constructor initiate the talking mouth parameters start monitoring the power level
public BatteryStatusUpdate() { initializeVariables(); startPowerLevelMonitor(); }
[ "private void startExperiment()\n {\n\t\tIntentFilter ifilter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);\n\t\tIntent battery = getApplicationContext().registerReceiver(null, ifilter);\n\t\tstartLevel = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);\n\t\tint scale = battery.getIntExtra(BatteryManage...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
int x = 10;
public static void main(String[] args) { Num num = new Num(10); System.out.println("Before: " + num.x); changeNumber(num); System.out.println("After: " + num.x); }
[ "public static void main(String[] args) {\r\n\t\r\n\tInteger I = new Integer(10);\r\n\tint x =I;\r\n\t\r\n}", "public static void main(String[] args) {\n\tSystem.out.println(x);\r\n\tint x=90;\r\n\tSystem.out.println(x);\r\n}", "public final int x() { return x; }", "public int x() {\r\n\t\treturn x;\r\n\t}", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 control_object_id = 1;
public boolean hasControlObjectId() { return ((bitField0_ & 0x00000001) == 0x00000001); }
[ "int getControllableID(ISeedStorageControllable controllable);", "public void setOBJECTID(long value) {\n this.objectid = value;\n }", "@Override\r\n\tpublic int getId() {\n\t\treturn 1028;\r\n\t}", "public ITCapitalControl setId(Long value);", "public byte getId() {\n/* 82 */ return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment
@Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_steps_list, container, false); }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.movie_statistic_layout, parent, false);\n }", "@Override\n\tprotected View initView(LayoutInflater inflate...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }