query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
listlengths
19
20
metadata
dict
Success Details Runtime: 0 ms, faster than 100.00% of Java online submissions for Minimum Depth of Binary Tree. Memory Usage: 39.1 MB, less than 98.44% of Java online submissions for Minimum Depth of Binary Tree.
public int minDepth(TreeNode_1 root) { if (root==null) return 0; else { Queue<TreeNode_1> q = new LinkedList<>(); q.offer(root); q.offer(null); int count=0; while (!q.isEmpty()) { TreeNode_1 temp = q.poll(); ...
[ "public static void main(String[] args) {\n\t\t\n\t\tBinaryTree binaryTree=new BinaryTree();\n\t\tbinaryTree.root=new Node(10);\n\t\t//System.out.println(binaryTree.root.key);\n\t\tbinaryTree.root.left=new Node(5);\n\t\tbinaryTree.root.right=new Node(8);\n\t\tbinaryTree.root.right.right=new Node(4);\n\t\tbinaryTree...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public String getColumnName(int c) { return columnNames[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" ] ] } }
Clearing the Data out of the Engine.Model Loader which will destroy all of the model data that has been loaded.
public static void clean() { MODEL_LOADER.clearPointers(); //Destroying the Engine.Window last because it will take the OpenGL functionality / context with it. Display.destroy(); }
[ "private void deleteAllData() {\n model.clearAttributes();\n model.clearSearchables();\n refreshInterface();\n }", "public void clearData() {\n\t\toverrideFile();\n\t\toverrideData();\n\t\tsetupList();\n\t\tsaveData();\n\t}", "public static void clearData()\n {\n StatePersisten...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
required string attributeName = 2; required string attributeName = 2;
boolean hasAttributeName();
[ "Validation required();", "public void testAttributeMultiplicity() throws ParseException {\n Object attr;\n\n Object attrType = project.getDefaultAttributeType();\n\n attr = Model.getCoreFactory().buildAttribute2(attrType);\n Model.getCoreHelper().setNamespace(attr, model);\n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Display status bar info notification
public void displayInfoNotification(int contentText) { NotificationCompat.Builder notificationBuilder = constructInfoNotification("Camera Slider", contentText); TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); stackBuilder.addParentStack(CameraSliderMainActivity.class); stackBui...
[ "private void showNotification() {\n showStatusBarIcon();\n }", "private void showStatusBar() {\n final String separator = \" | \";\n final int statusBarToggles = 2; //how many characters are we showing for the toggles below\n final int activePair = MESSAGE_PAIR;\n co...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the fee value for this Response.
public java.lang.String getFee() { return fee; }
[ "public long getFee() {\n return fee_;\n }", "public java.lang.Long getFee() {\n return genClient.cacheGet(CacheKey.fee);\n }", "public CoreComponentTypes.apis.ebay.AmountType getFee() {\r\n return fee;\r\n }", "@Override\n\tpublic long getFee() {\n return fee_;\n }", "publ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method assumes that the response from some host contains only one line of message
private static String doRequest(String urlString, String method) { try { HttpURLConnection conn = (HttpURLConnection) (new URL(urlString)).openConnection(); conn.setDoInput(true); conn.setRequestMethod(method); BufferedReader rd = new BufferedR...
[ "public void printResponse(){\n String serverResponse = \"\";\n do{\n serverResponse = kkSocket.readTheLine();\n System.out.println(\"<-- \" + serverResponse);\n }while(Utils.notlastline(serverResponse));\n }", "@Override\n protected boolean processResponse() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indicates if a "Edit..." button should be shown.
public boolean isShowEditButton() { return showEditButton; }
[ "public boolean isInEditingMode() {\r\n\r\n\tboolean bEdit = false;\r\n\tif (this.getSpecifier() == CustGwtItem.EDITABLE) {\r\n\t bEdit = true;\r\n\t}\r\n\treturn bEdit;\r\n }", "public boolean isEditMode() {\n return getMode() == TargetMode.EDIT;\n }", "public boolean istEditierbar() {\r\n return ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates a position bounds object without checking position validity since the document may be empty yet.
public static PositionBounds createUnresolved(int begin, int end, GuardedSectionsImpl guards) throws BadLocationException { StyledDocument doc = guards.getDocument(); return new PositionBounds(new UnresolvedPosition(begin), new UnresolvedPosition(end), guards); }
[ "@Override\n\tpublic boolean isPositionValid() {\n\t\treturn true;\n\t}", "public Position(){\r\n\t\tx = 0;\r\n\t\ty = 0;\r\n\t\tmaxX = 0;\r\n\t\tmaxY = 0;\r\n\t\tminX = 0;\r\n\t\tminY = 0;\r\n\t}", "public Box getBounds ()\n {\n return Box.EMPTY;\n }", "public CollisionRectangle(Rect...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs an airport with of the given name
public Airport(String name) { flights = new HashMap<String, Flight>(); this.name = name; visited = false; }
[ "public Airport(String name, Address address) {\n this.name = name;\n this.address = address;\n }", "private static void createAirports() {\n for (String s : Reference.airportList) {\n Airport temp = new Airport(s);\n int rand = UI.getRandomInt(0, 1);\n if ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default empty Licencia constructor
public Licencia() { super(); }
[ "public Libros(){\n super();\n this.isbn = null;\n this.autor = null;\n }", "public Juegos() {\r\n }", "public Libro(String nombre, String escritor, int noPaginas)\n {\n titulo=nombre;\n autor=escritor;\n paginas=noPaginas;\n }", "public Libro(String isbn,...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Keeps track of players executing duplicate moves. Should be called before the move is actually executed.
private void keepTrackOfDuplicateMoves(GameCommand command) { if (moves.size() >= 4) { String lastMove = moves.get(moves.size() - 4).getTargetSquareDesc(); if (command.getTargetSquareDesc().equals(lastMove)) { if (activePlayer.isWhitePlayer()) { whiteD...
[ "private void checkRepeated() {\n if (_boardStates.contains(encodedBoard())) {\n _repeated = true;\n }\n if (repeatedPosition()) {\n _winner = _turn;\n }\n }", "private void findPossibleMoves() {\r\n\r\n\t\t// Finds the possible moves for both players.\r\n\t\tw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes the system service. Subclasses must define a single argument constructor that accepts the context and passes it to super.
public IrisService(Context context) { super(context); }
[ "public InitSystem() {\r\n\t\tsuper();\r\n\r\n\t}", "public ContextServiceImpl() {\n\n }", "protected abstract void initService();", "public final void initialize() {\n\t\tcreate(beanManager.createCreationalContext(this));\n\t}", "public SystemUserServiceImpl() {\r\n\t}", "public MyService() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check whether a cell is out of the coordinates of the Spreadsheet and return Null if so
public Cell checkEmpty(int column, int row) { try { Cell cell = SpreadSheet.spreadsheet[row][column]; return cell; } catch (ArrayIndexOutOfBoundsException ex) { return null; } }
[ "boolean isCellValid(int x, int y) {\n if (x < 0 || y < 0 || x >= SIZE || y >= SIZE)\n return false;\n return map[y][x] == DOT_EMPTY;\n \n }", "boolean hasCellY();", "private boolean wrongCoordinatesCheck(int row1, int column1, int row2, int column2) {\n return (row1 ==...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called once the command ends or is interrupted.
@Override public void end(boolean interrupted) {}
[ "protected void end() {\r\n \tcmd.cancel();\r\n }", "@Override\n public void end(boolean interrupted)\n {\n Globals.poserunFlag = true;\n }", "@Override\n public void end(final boolean interrupted) {\n if (interrupted) {\n Shuffleboard.addEventMarker(\n \"FieldOrientedUni...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override public void appleWatchInfo() { }
[ "@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" ] ] } }
Retrieves the randomizer to use, either one defined by user for a specific field or a default one provided by registries.
private Randomizer<?> getRandomizer(Class<?> resultClass, Field field) { Randomizer<?> customRandomizer = randomizers.get(new RandomizerDefinition(resultClass, field.getType(), field.getName())); if (customRandomizer != null) { return customRandomizer; } return getDefaultRand...
[ "public Random getRandomizer() {\n return randomizer;\n }", "private static int randomGender(){\n Random rand = new Random()\n return rand.nextInt(GENDERFLUID);\n }", "@Override\n public RandomizerType getType() {\n return RandomizerType.UNIFORM_RANDOMIZER;\n }", "public static N...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a user based on the configuration set on the factory
public User createUser() { BaseUser user = new BaseUser(); user.setName(name); user.setPassword(password); user.setHomeDirectory(homeDir); user.setEnabled(isEnabled); user.setAuthorities(authorities); user.setMaxIdleTime(maxIdleTimeSec); return user; }
[ "public void createUser() {\n if (userService.getByEmail(\"test\") == null) {\n userService.create(\"test\", \"test\", \"Testing\", \"User\", Boolean.FALSE);\n }\n }", "public void create(User user) {\n }", "public abstract User createUser(String name, String pass);", "void create...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To test working scenario for endSeason Use isOffSeason to ensure the league has ended
@Test public void testEndSeasonWorking() throws LeagueException { soccerLeague.startNewSeason(); soccerLeague.endSeason(); assertTrue(soccerLeague.isOffSeason()); }
[ "@Test\n public void parse_invalidSeason_failure() {\n }", "@Test\r\n\tpublic void testSeason(){\r\n\t\tString yo = \"\";\r\n\t\tyo = forecast.Season(\"january\");\r\n\t\tAssert.assertEquals(yo, \"Winter\");\r\n\t\tyo = forecast.Season(\"february\");\r\n\t\tAssert.assertEquals(yo,\"Winter\");\r\n\t\tyo = fo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ CHECKSTART: java.lang.Class other.InaccessibleClass.$noinline$getReferrersClass() builder (after) / CHECK: LoadClass class_name:other.InaccessibleClass needs_access_check:false
public static Class<?> $noinline$getReferrersClass() { return InaccessibleClass.class; }
[ "public void test1458() {\n this.runNegativeTest(new String[] { \"CompilerBug.java\", \"public class CompilerBug {\\n\" + \"\tpublic <T> T newInstance( Class<T> c ) throws InstantiationException, IllegalAccessException {\\n\" + \"\t return c.newInstance();\\n\" + \"\t\t }\\n\" + \"\t\t protected voi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deleting company by id
@DeleteMapping("/{id}") public ResponseEntity<ResponseApi> deleteById(@PathVariable Integer id){ ResponseApi responseApi = companyService.deleteById(id); return ResponseEntity.status(responseApi.isSuccess() ? HttpStatus.ACCEPTED : HttpStatus.BAD_REQUEST).body(responseApi); }
[ "public int deleteByCompany(Long id);", "void removeCompany(long id);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Company : {}\", id);\n companyRepository.deleteById(id);\n companySearchRepository.deleteById(id);\n }", "void deleteByCompanyUserId(UUI...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
At this point the serverInitializerFactory is configured with it's &lt;name&gt; only as meaningless String. Only before the Route is instantiated by a first message the serverInitializerFactory has to be registered. DCS Routes for ALL Protocols are directed to one output endpoint where the traccar.model objects can be ...
@Override public void configure() throws Exception { from(from) // using the same id again, will quietly stop and replace the earlier route!! .routeId(routeId + "-route") // teltonikaRoute or teltonikaTraccarRoute ? // .routeGroup("hello-group") // TraccarServers // ...
[ "HubRouteTable.DefinitionStages.Blank define(String name);", "@Override\r\n\tpublic synchronized Restlet createInboundRoot() {\r\n\t\t// Create a router Restlet that routes each call to a new instance of\r\n\t\t// HelloWorldResource.\r\n\t\tRouter router = new Router(getContext());\r\n\r\n\t\t// Defines only one ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If it is checkec then show password else hide password
@Override public void onCheckedChanged(CompoundButton button, boolean isChecked) { if (isChecked) { cbTogglePw.setText(R.string.hide_pwd);// change // checkbox ...
[ "public void showLoginPass() {\r\n\t\tshowLoginPass(\"\", \"\");\r\n\t}", "public boolean isShowPassword()\r\n/* 11: */ {\r\n/* 12:39 */ return this.showPassword;\r\n/* 13: */ }", "@OnClick(R.id.btn_show_hide_password)\n void onShowHidePassword(){\n mBtnShowHidePassword.setSelected(!mBtnSh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
boolean oneShotd2 = false; boolean oneShotd3 = false; boolean oneShotd4 = false;
@Override public void runOpMode() throws InterruptedException { telemetry.addData("Status", "Initialized"); telemetry.update(); /* eg: Initialize the hardware variables. Note that the strings used here as parameters * to 'get' must correspond to the names assigned during the robot ...
[ "boolean oneShotOnly();", "public abstract boolean isOneShot();", "public void setBooleans() {\n drawPenalty = false;\n playOnce = false;\n preventDraw = false;\n finishDraw = false;\n checkAction = false;\n }", "@Test\n public void sample2Test19(){\n sample2.re...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method calculates the Euclidean distance between two points
public double getDistance(String[] x1, String[] x2) { double distance = 0; for (int i = 0; i < x1.length; i++) { distance += Math.pow((Double.parseDouble(x1[i]) - Double.parseDouble(x2[i])), 2); } return Math.sqrt(distance); }
[ "private static double euclidean_distance(double[] p1, double[] p2){\n return Math.pow(Math.pow(p1[0]-p2[0], 2) + Math.pow(p1[1]-p2[1], 2), 0.5);\n }", "public static double euclideanDistance2D(Point a, Point b) {\r\n\t\treturn Math.sqrt(Math.pow(a.getX() - b.getX(), 2) + Math.pow(a.getY() - b.getY(), 2...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
public void setAge(String age) { this.age = age; }
[ "@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" ] ] } }
Get the transition filename.
String getFilename() { return mFilename; }
[ "public String getFileName() {\n // LogUtils.d(TAG, \"getFileName, name = \" + mName);\n\n return mName;\n }", "@Override\n public String getFilename() {\n return getTarget().getFilename();\n }", "public String getFileName() { return VersionControlPath.getLastComponent(this.myPath); }", ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
External DNS configuration repeated .yandex.cloud.compute.v1.DnsRecordSpec dns_record_specs = 3;
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.DnsRecordSpec.Builder addDnsRecordSpecsBuilder( int index) { return getDnsRecordSpecsFieldBuilder().addBuilder( index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.DnsRecordSpec.getDefaultInstance()); }
[ "yandex.cloud.api.k8s.v1.NodeOuterClass.DnsRecordSpec getDnsRecordSpecs(int index);", "Dns(int port, HashMap<String, HashMap<String, String>> records) {\n\t\tPORT = port;\n\t\tthis.records = records;\n\t}", "private void readCloudDNS(){\n\n try {\n FileEx io = new FileEx();\n String...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes criteria object to check name of element.
public static final ElementCriteria name(String name) { return new ElementCriteria(name, null, null); }
[ "public Criterium(String name) {\n super(name);\n }", "java.lang.String getConditionName();", "private void checkName(Object element, String text, String name)\n throws ParseException {\n\n if (Model.getFacade().isAAttribute(element)) {\n AttributeNotationUml anu = new Attribu...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the data value equivalent of the parsed, passed point relative to "rect" Using the position of the axis and the maximum and minimum values, convert the pixel position into a data value The value taken must be a point on the actual plotting graph ... not on the rectangle occupied by the axis
protected double getDouble(int i) throws Exception { // increment = (rect.height - 1 ) / (axisMax - axisMin) // value = axisMax - (i / increment) double d = (axisMax - ((double) i / (rect.height - 1) * (axisMax - axisMin))); if (d > axisMax || d < axisMin) throw new Exception("computed mouse ...
[ "public Range findValueRange() {\n/* 350 */ if (this.data.isEmpty()) {\n/* 351 */ return null;\n/* */ }\n/* 353 */ return new Range(this.minY, this.maxY);\n/* */ }", "public double xPosToValue(int xpos){\n double val = (xmax-xmin)/xaxisWidth;\n int dif = xpos-yaxisWidth;\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Pada NoteHelper proses load data dilakukan dengan eksekusi query(). Obyek Cursor yang dihasilkan ditampung ke dalam obyek ArrayList
@Override protected ArrayList<Note> doInBackground(Void... voids) { return noteHelper.query(); }
[ "private void getAllNotesData(){\n sqliteHelper=new SqliteHelper(this);\n Cursor cursor= sqliteHelper.retriveAllNotesCursor(); // Sqlite method change\n CursorAdapter cursorAdapter=new NotesListAdapter(this,cursor);\n listView.setAdapter(cursorAdapter);\n }", "@SuppressLint(\"Rec...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return an array of all AccessRole instances. Static method.
public abstract AccessRole[] getAll(ServletContext context) throws AccessRoleException;
[ "List<IRole> obtainAllRoles();", "public synchronized List<Role> getAllRoles() {\n return roleCache_.getValues();\n }", "Iterable<Role> listRoles();", "public static List<Role> showAllRoles() {\r\n List<Role> roleList = new ArrayList();\r\n Session session = HibernateUtil.getSessionFactory()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ curr = curr.next
private void stepCursor() { predpred = pred; pred = curr; curr = curr.next; if (listOrder == ListOrder.BubbleUp) { // swap curr and curr.next if the latter has a larger key DataNode next = curr.next; if (curr.key < next.key)...
[ "@Override\n\tpublic void next() {\n\t\tif (curr.next() != tail) {\n\t\t\tcurr = curr.next();\n\t\t}\n\t}", "void moveNext() {\n\t\tif(curr == null) {\n\t\t\tcurr = null;\n\t\t\tindex = -1;\n\t\t}\n\t\telse if(curr == tail && curr != null) {\n\t\t\tcurr = null;\n\t\t\tindex = -1;\n\t\t}\n\t\telse if(curr != tail ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Devuelve la Position que corresponde a la casilla seleccionada en la etapa de CHOICE
public Position getActiveSquare() { if (activeSquare == null) { throw new IllegalStateException("No active square at this Stage"); } return activeSquare; }
[ "private void selectItem(int position) {\n }", "private void selectItem(int position) {\n\n }", "public int select(int position){\n if (getItemViewType(position)==T_DIA){\n for (int i=0;i<cuadros.length;i++)\n cuadros[i].setSelected(false);\n cuadros[position-7]...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public final Map<String, byte[]> mo48173a(int i, AbstractC7642o oVar, boolean z) { return m46208a(i, (AbstractC7642o) null); }
[ "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" ] ] } }
Returns The number of elements in this set.
@Override public int size() { return size; }
[ "public int length() {\r\n\t\tint l = 0;\r\n\t\tfor (int i=0; i<set.size(); i++) {\r\n\t\t\tl = l + 1;\r\n\t\t}\r\n\t\treturn l;\r\n\t}", "public int size()\n {\n synchronized (elements) {\n return elements.size();\n }\n }", "public int size()\r\n {\r\n return set.size()...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: figure out a test for this
@Test public void testCreateOrthographicDouble() { }
[ "protected void method_5557() {}", "@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\n public int utilite() {\n return 0;\n }", "...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Register operation done (fail or success), handling it:
@Override public void onResponse(BacktoryResponse<BacktoryUser> response) { // Checking result of operation if (response.isSuccessful()) { // Successful Log.d(TAG, "Register Success: new username is " + response.body().getUsername()); ...
[ "@Override\r\n\t\tpublic void operationsFinished() {\n\t\t\t\r\n\t\t}", "private void operationFinished(Operation<?> operation) {\n \t\tsynchronized (operations) {\n \t\t\tremoveOperation(operation);\n \t\t\texecuteNext();\n \t\t}\n \t}", "@Override\n\t\tpublic void operationComplete(FutureDHT future) throws Ex...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUBLIC: Call a constructor for the given class with the results of this query.
public ConstructorReportItem beginAddingConstructorArguments(Class constructorClass){ ConstructorReportItem citem = new ConstructorReportItem(constructorClass.getName()); citem.setResultType(constructorClass); //add directly to avoid addToConstructorItem behavior getItems().add(citem...
[ "public BatchFinderCriteriaResult(Class<T> elementClass)\n {\n this(new DataMap(), elementClass);\n }", "public Results(){}", "public Results() {}", "public SaadaInstanceResultSet() {\n\t\t\n\t}", "public Query() { }", "public AResultSet(EResultType type, T results)\n {\n if(type == null)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checking status before add mew comment to time sheet.
public void verifyStatusesBeforeAddingComment(List<TimeEntryBo> timeEntryBoList) { for (TimeEntryBo timeEntryBo : timeEntryBoList) { if (!timeEntryBo.getStatus().equalsIgnoreCase(REJECTED.name()) && !timeEntryBo.getComment().isEmpty()) { String message = ": Only entries with '" + REJ...
[ "public void addTimePoint() {\n if (m_flagOwned)\n m_teamTime += 1;\n\n if (((m_round.getRaceTarget() - m_teamTime) == 3 * 60) && m_threeMinuteWarning) //3 mins * 60 secs\n {\n m_logger.sendArenaMessage(getTeamName() + \" needs 3 mins of flag time to win\");\n m...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unit tests the BinaryHeap data type.
public static void main(String[] args) { Stdio.open( args[0] ); MinPQ pq = new MinHeap(); while( Stdio.hasNext() ) { String method = Stdio.readString(); if( method.equalsIgnoreCase("insert") ) { int value = Stdio.readInt(); ...
[ "public BinaryHeap() {\n\t\tsize = 0;\n\t data = (T[]) new Comparable[11];\n\t this.comp = new Comparator<T>() {\n public int compare(T a, T b) {\n if (a == null && b == null) {\n return 0;\n }\n else if (a == null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks should last value be specially drawn on chart or not.
public boolean isShowValueOnChart() { return showValueOnChart; }
[ "boolean hasYValue();", "boolean hasCurrHighSet();", "public boolean isChartRequired();", "boolean hasUnscaledValue();", "public boolean hasChart() {\n return assetCase_ == 2;\n }", "boolean hasGrowthValue();", "@Test\n public void test31() throws Throwable {\n CombinedRangeCategoryPlot ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value related to the column: UPDATE_TIME
public void setUpdateTime (java.sql.Timestamp updateTime) { this.updateTime = updateTime; }
[ "void updateTime(String columnName, Time value) throws SQLException;", "@Override\n\tpublic void updateTime(String columnLabel, Time x) throws SQLException {\n\t\t\n\t}", "public void setLastUpdated(long time);", "public Builder setUpdatetime(\n java.lang.String value) {\n if (value == null) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); BaiVietBO tb = new BaiVietBO(); request.setAttribute("baimoi", tb.getCountBaiViet("moi")+""); request.setAttribute("dichxong", tb.getCountBaiViet("xong")+...
[ "@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" ] ] } }
set a Services object
public void clearDB();
[ "public void setServices(Services services)\n {\n this.services = services;\n }", "public void setServices(AccountService accServ, StudentService studServ, HomeworkService hwService, GradeService grService){\n this.accServ = accServ;\n this.studService = studServ;\n this.hwServic...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Replace the contents of a view (invoked by the layout manager)
@Override public void onBindViewHolder(ViewHolder holder, int position) { Match currentMatch = listMatch.get(position); holder.dateMatch.setText(currentMatch.getDate()); holder.timeMatch.setText(currentMatch.getTime()); holder.nameTeam1.setText(currentMatch.getOpponent1()); h...
[ "public void updateView(){\n\t\tview.updateView();\n\t}", "@Override\n public void updateView() {\n view.update();\n }", "protected abstract void setView(IJssView anotherView);", "public void updateView(JPanel newView) {\r\n\t\tremoveAll();\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagCon...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); }
[ "@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" ] ] } }
Upload a file to Firebase storage and get URI.
public void uploadFile(@NonNull Uri fileUri, @NonNull String fileExtension, @Nullable UploadUriListener listener) throws SecurityException { final StorageReference reference = storageReference .child(IMAGES_DIRECTORY + fileNameGenerator.getFileName(fileUri, fileExtension)); fina...
[ "private void uploadFilesign(Uri data) {\n\n final StorageReference ref = mStorageReference.child(\"Uploads\").child(\"JRF\").child(user.getWebmailID()).child(\"Sign\");\n ref.putFile(data)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a Basket object, add items to it and available discount
public Basket(String[] items, Configuration config) { this(items); this.availableDiscounts = config.getDiscounts(); if(config.getItems() != null) { config.getItems().forEach(item -> { String itemName = item.get("name"); if(itemMap.containsKey(itemName...
[ "public Basket()\r\n {\r\n basket = new java.util.HashMap();\r\n total = 0;\r\n }", "public BasketItem() {\n }", "public Basket(Customer customer) {\n this.customer = customer;\n this.itemsCounted = new HashMap<>();\n this.discountA = 0.1;\n this.amountToApplyT...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sync with Cloud Server Account.
@Override public void syncUser() throws ApplicationException, Exception { // 1. Get all the user objects from CS server as hash List<User> csUserService = userService.findAllFromCSServerByDomain(); HashMap<String, User> csUserMap = (HashMap<String, User>) User.convert(csUserService); ...
[ "public static void syncAccounts()\n\t{\n\t\tif ( LaunchActivity.myLittleDB == null )\n\t\t\tLaunchActivity.myLittleDB = new MyLittleDB( context );\n\t\t\n\t\tif ( LaunchActivity.myLittleDB == null )\n\t\t\treturn;\n\t\t\n\t\tsend( \"UPAC\", \"\" ); // Force Update Accounts\n\t}", "private static final void syncW...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the maximum value out of 2 doubles.
private double max(double n1, double n2) { if (n1 > n2) { return n1; } return n2; }
[ "public Double getMaxDouble();", "public static double max(double paramDouble1, double paramDouble2) {\n/* 1314 */ if (paramDouble1 != paramDouble1)\n/* 1315 */ return paramDouble1; \n/* 1316 */ if (paramDouble1 == 0.0D && paramDouble2 == 0.0D && \n/* */ \n/* 1318 */ Double.doubleTo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the elements with name from the given element. The method checks, if the element is emtpy, if it is, the default value is returned, the textcontent is returned otherwise.
public static String getStringFromElement(Element element, String name, String defaultValue) { String res = XMLUtils.getStringFromElement(element, name); if (Utils.isEmpty(res)) res = defaultValue; return res; }
[ "public String getValue(String elementName);", "private Object getNamedElement(String name) {\r\n return (name != null && !isEmpty()) ? getNamedElementMap().get(name) : null;\r\n }", "private String getElementTextContent(Element element, String elementName) {\n NodeList nList = element.getEleme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a Builder by copying an existing Builder
private Builder(graphene.model.idl.G_SingletonRange.Builder other) { super(other); if (isValidValue(fields()[0], other.value)) { this.value = data().deepCopy(fields()[0].schema(), other.value); fieldSetFlags()[0] = true; } if (isValidValue(fields()[1], other.type)) { this...
[ "public static Builder newBuilder(Builder other) {\n return new Builder(other);\n }", "public static Builder newBuilder(Builder other) {\n if (other == null) {\n return new Builder();\n } else {\n return new Builder(other);\n }\n }", "public DataSetBuilder copyBuilder() {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: a
public void mo1831a() { if (this.f7676a) { if (this.f7680e.f7675b.f7581b.mProgressDialog == null) { this.f7680e.f7675b.f7581b.mProgressDialog = new ja(this.f7680e.f7675b.f7581b.getContext()); } this.f7680e.f7675b.f7581b.mProgressDialog.m10843a(this.f7677b); ...
[ "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" ] ] } }
Skip over an entity at the given position, returning the position after it. If the given position does not look like a valid entity, this returns the same/given position. This does not check again actual entity values, just that it matches one of these within 10 characters: &99999; or &xFFFF; or &name;
public static final int skipIfEntityAt(final String str, final int pos) { if (str.charAt(pos) != '&') return pos; int pos2 = str.length(); if (pos+3 >= pos2) return pos; int i = pos+1; char c = str.charAt(i); char pos1c = '\0'; if (c == '#') { pos1c = c; i++; c = str.charAt(i); if (...
[ "private int getCharAfterS(boolean entityOK) throws ParseException,\n\t\t\tEncodingException, EOFException {\n\t\tint n = 0;\n\t\tint temp; //offset saver\n\t\tif (!entityOK) {\n\t\t\twhile (true) {\n\t\t\t\tn = getChar();\n\t\t\t\tif (!XMLChar.isSpaceChar(n))\n\t\t\t\t\treturn n;\n\t\t\t}\n\t\t} else\n\t\t\twhile ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A placeholder password validation check
private boolean isPasswordValid(String password) { return password != null && password.trim().length() > 5; }
[ "void validatePassword(String password);", "PasswordValidationCode isPasswordValid(Password pswd) throws ObjectNotFoundException ;", "@Test\r\n \tpublic void verifyPasswordWithNullPassword() {\r\n \t\tassertEquals(false, PasswordUtils.verifyPassword(null, \"TEST\"));\r\n \t}", "private static boolean checkPa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ access modifiers changed from: packageprivate
@WorkerThread public void zzfD(String str) { zznA(); zzmq(); zzac.zzdv(str); try { SQLiteDatabase writableDatabase = getWritableDatabase(); String[] strArr = {str}; int delete = writableDatabase.delete("audience_filter_values", "app_id=?", strArr) ...
[ "protected void method_5557() {}", "@Override\n }", "@Override\n public void extornar() {\n \n }", "public void mo28221a() {\n }", "protected void mo4791d() {\n }", "protected void method_2117() {\n }", "@Override\r\n public void publicando() {\n }", "private ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add airport to the database
void addAirport(AirportData airportData);
[ "private static void add_airport(String airlineID, String flightID, String airportID, String airportType) {\r\n \tConnection connection = DatabaseUtil.getConnection();\r\n \t\r\n \ttry {\r\n \t\t\r\n \t\tPreparedStatement ps = connection.prepareStatement(\r\n\t\t\t\t\"INSERT INTO ? (airline_id, fligh...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ JADX WARNING: Illegal instructions before constructor call / Code decompiled incorrectly, please refer to instructions dump.
public PageLoadingListMultiTypeAdapter(android.content.Context r20, java.util.List<com.ss.android.ugc.aweme.base.mvvm.e> r21, java.util.Map<java.lang.Class, java.lang.Class> r22) { /* r19 = this; r0 = r19 r1 = r21 r2 = r22 r3 = 1 java.lang....
[ "private B000066() {\r\n\r\n\t}", "AnonymousClass3() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: sun.nio.ch.Net.3.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.nio.ch...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Balance amount L => Loan amount (principal) C => monthlyInterest p => Number of payments we have made n => NUmber of payments. For 10 year it will be 1120 payments B = L[(1+C)^n(1+C)^p]/[(1+C)^n1]
public void monthlyPayment() { float monthlyInterestRate = getMonthlyInterestRate(); int numberOfPayments = getNumberOfPayments(); for(int i = 1; i <= numberOfPayments; i++) { double balance = principal * ((Math.pow((1 + monthlyInterestRate), numberOfPayments)) - (Math.pow((1 + mon...
[ "private BigDecimal compute(BigDecimal creditAmount, BigDecimal interest, int loanDuration)\r\n\t{\n\t\t\r\n\t\tBigDecimal rate = interest.divide(new BigDecimal(100));\r\n\t\tBigDecimal toPow = rate.add(BigDecimal.ONE);\r\n\t\tBigDecimal pow = toPow.pow(loanDuration);\r\n\t\t\r\n\t\tBigDecimal numerator = creditAmo...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Center grid to certain column and row
private void centerGrid(int column, int row) { this.x = -(int) (((Square2DDrawable.WIDTH * scaleFactor * (column) * 2) - this.dWidth) / 2 + (Square2DDrawable.WIDTH * scaleFactor / 2)); this.y = -(int) (((Square2DDrawable.WIDTH * scaleFactor * (row) * 2) - this.dHeigth) / 2 + (Square2DDrawable.WIDTH * scaleFactor / ...
[ "private void centerCell(Table table, int x, int y) {\r\n\t\tRectangle visible = table.getVisibleRect();\r\n\t\tRectangle cell = table.getCellRect(x, y, true);\r\n\t\tif((cell != null) && (visible != null)){\r\n\t\t\tcell.grow((visible.width - cell.width) / 2, (visible.height - cell.height) / 2);\r\n\t\t\ttable.scr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an empty OEMM with a given depth.
public OEMM(int l) { depth = l; if (depth > MAXLEVEL) { logger.severe("Max. level too high"); depth = MAXLEVEL; } else if (depth < 1) { logger.severe("Max. level too low"); depth = 1; } }
[ "private GameNode createSubtree(int depth) {\n if (depth == 0)\n return null;\n\n GameNode tempNode = new GameNode();\n tempNode.children = new LinkedHashMap<>();\n tempNode.frequencies = new LinkedHashMap<>();\n\n for (GameModerator.GameThrow tempThrow : GameModerator.GameThrow.values()) {\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
super.paint(g); //To change body of generated methods, choose Tools | Templates.
@Override public void paint(Graphics g) { g.drawImage(buffer, 0, 0, null); }
[ "public void paint(Graphics g)\r\n{\n super.paint(g);\r\n}", "@Override\n public void paint(Graphics g){\n }", "@Override\n public void paint (Graphics g) {\n super.paint(g);\n }", "@Override\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\t\t\n\t}", "@Override\n\tpublic void paint(Gra...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a reference to the data item with the data name specified.
public Data getData(String dataName) { for (int data = 0; data < listOfData.size(); data++) { if (listOfData.get(data).name.equals(dataName)) { return listOfData.get(data); } } return null; }
[ "public String getData(String name)\r\n\t{\r\n\t\treturn data.get(name);\r\n\t}", "public <T> T data(final String name) {\n return context.data(name);\n }", "IDataItem getDataItemWithAttribute(String name, String value);", "public String getDataName() { return this.DataName; }", "public static...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns suffix for days.
public static String getDayOfMonthSuffix(final int day) { if (day >= 11 && day <= 13) { return "th"; } switch (day % 10) { case 1: return "st"; case 2: return "nd"; case 3: return "rd"; default: return "th"; } }
[ "protected abstract String suffix();", "private static String getDayOfMonthSuffix(int n) {\n if (n >= 11 && n <= 13) {\n return \"th\";\n }\n switch (n % 10) {\n case 1: return \"st\";\n case 2: return \"nd\";\n case 3: return \"rd\";\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Este metodo faz o parsing de RSS gerando objetos ItemRSS
public static List<ItemRSS> parse(String rssFeed) throws XmlPullParserException, IOException { XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser xpp = factory.newPullParser(); xpp.setInput(new StringReader(rssFeed)); xpp.nextTag(); return readRss(xp...
[ "public List<TrimmedRSSObject> parseFeed(InputStream inputStream, String currentURL) throws XmlPullParserException,\n IOException {\n String title = null;\n String link = null;\n String description = null;\n String pubDate = null;\n String imageUrl = null;\n bool...
{ "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" ] ] } }
Gets the field value.
public Object getFieldValue() { if (fieldComponent instanceof JTextField) { String fieldString = ((JTextField) fieldComponent).getText(); if (classString.equals("Integer")) { try { return Integer.valueOf(fieldString); } catch (NumberFormatException e) { return fieldSt...
[ "public Object value() {\n\t\treturn valueField;\n\t}", "public Object getField() {\n return value;\n }", "public java.lang.Object getFieldValue() {\n return fieldValue;\n }", "public String getFieldValue() {\r\n\t\treturn fieldValue;\r\n\t}", "public Object getValue() {\n\t\tif (isForma...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Import options from another Opts instance.
public Opts fromOpts(Opts opts) { if(opts == null) throw new NullPointerException("null opts"); url = opts.url; ssl = opts.ssl; authId = opts.authId; authPass = opts.authPass; authMaster = opts.authMaster; timeout = opts.timeout; return this; }
[ "public abstract void configOptions(Options options);", "interface WithAllOptions {\n /**\n * The new versionId to import. If not specified, the versionId will be read from the imported object.\n *\n * @return next definition stage\n */\n Versi...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return all users in the database
public List<User> findAllUsers();
[ "public List<User> retrieveAllUsers();", "@Override\n public List<User> showAllUsers() {\n DataSource dataSource = new DataSource();\n List<User> users = new ArrayList<>();\n\n try (Connection con = dataSource.getConnection();\n PreparedStatement preparedSt = con.prepareStateme...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of variables declaration//GENEND:variables ActionListener implementation
@Override public void actionPerformed(ActionEvent e) { if (projectsComboBox == e.getSource()) { project = (Project) projectsComboBox.getSelectedItem(); updateRoots(); updatePackages(); updateClasses(); } else if ( rootComboBox == e.getSource() ) { ...
[ "@Override\r\n \tpublic void actionPerformed(ActionEvent e) {\n \r\n \t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\n\t}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t}", "@Override\r\n\t...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
f0 > Block() | AssignmentStatement() | ArrayAssignmentStatement() | IfStatement() | WhileStatement() | PrintStatement()
public Info visit(Statement n, Info argu) { FieldInfo statement = (FieldInfo)n.f0.accept(this, null); return statement; }
[ "private void block() {\n \tif(is(TK.VAR))\n \t{\n \t\tdeclarations();\n\t\tstatement_list();\n \t}else\n \t \tstatement_list();\n }", "static final public void statement() throws ParseException {\n if (jj_2_36(3)) {\n assignStat();\n } else if (jj_2_37(3)) {\n ifStat();\n } e...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Setter for Created By
public void setCreatedBy(String createdBy) { this.createdBy = createdBy; }
[ "@Override\n\tpublic void setCreatedBy(long createdBy) {\n\t\t_hording.setCreatedBy(createdBy);\n\t}", "public void setCreatedBy(String createdBy) {\r\n\tthis.createdBy = createdBy;\r\n }", "@Column(name = \"created_by\", insertable = true, updatable = false, nullable = false, unique = false)\n public Strin...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns whether the logged user can accept the given invoice in behalf of the given member
boolean canAccept(Invoice invoice);
[ "private boolean checkIsMember(){\n ArrayList<String> members = new ArrayList<>();\n members.addAll(challenge.getMembers().keySet());\n\n return members.contains(currentUser.getId());\n }", "protected boolean isFiscalOfficerAuthorizedTo(final String permission, String documentTypeName) {\n...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Draws a 2D rectangle using Graphics 2D
@Override public void draw(Graphics2D g2) { g2.fill(new Rectangle2D.Double(getX(), getY(), getArg3(), getArg4())); }
[ "public void newDrawRect2(Graphics g, int tlx, int tly, int brx, int bry) {\n \n }", "public void draw(Graphics2D g2){\n g2.fillRect(x,y,3,6);\n }", "public void drawRect(int x, int y, int width, int height, int colour);", "@Override\r\n\tpublic void draw(Graphics2D g, int X, int Y, int width...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
reads SMTP server setting from web.xml file
public void init() { ServletContext context = getServletContext(); host = context.getInitParameter("host"); port = context.getInitParameter("port"); user = context.getInitParameter("user"); pass = context.getInitParameter("pass"); }
[ "public static String getEmailServerFromProperties(){\r\n\t\t return System.getProperty(\"email.server\");\r\n\t\t }", "public String getSMTP_SERVER() {\r\n\t\treturn SMTP_SERVER;\r\n\t}", "public String getSmtpServerAddress() {\n return properties.getProperty(\"smtpServer\");\n }", "private Pr...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional uint32 authenticator_type = 4 [(.description) = "Authenticator type"];
boolean hasAuthenticatorType();
[ "protected int getAuthenticationType(){\n return AUTHENTICATION_TYPE;\n }", "int getAuthProto();", "@Override\n public String getAuthType() {\n return AUTH_TYPE;\n }", "@jakarta.annotation.Nullable\n @JsonProperty(JSON_PROPERTY_TYPE)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the default path given to new players
public void setDefaultPath(PlayerPath path) { this.defaultPath = path; }
[ "public static void setDefaultPath(String path) {\n\t\tdefaultPath = path;\n\t}", "public static final void initDefaultPath() {\n defaultFiles = switchboard.getConfig(\"defaultFiles\",\"index.html\").split(\",\");\r\n if (defaultFiles.length == 0) defaultFiles = new String[] {\"index.html\"};\r\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test on "firstCellInSection" method of this class. Tests if the method returns correctly the first cell in the section.
@Test void checkFirstCellInSectionIfCorrect() throws WrongCellIndexException, NegativeVPAmountException { ArrayList<Cell> listOfCell = new ArrayList<>(0); Cell cell1 = new ClassicCell(); VictoryPoint vp1 = new VictoryPoint(9); VictoryPoint vp2 = new VictoryPoint(23); PopeFavo...
[ "public int getFirstCellRow()\n\t\t{\n\t\t\treturn firstCellRow;\n\t\t}", "@Test\n\tpublic void testFirstRow() {\n\t\t\n\t\tJQueryLocator row = table.getChild(jq(\"tr:eq(0)\"));\n\t\t\n\t\tcheckTheRow(\"Chevrolet\", \"Corvette\", row);\n\t}", "public boolean isFirst() {\n return idx == 0;\n }", "pub...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Created by zhanglb on 2017/6/24.
@FeignClient(value = "serviceCenter-provider", fallback = CenterDataHystix.class) public interface CenterDataService { /** * 合并数据,新增或者修改 * @param data * @return */ @RequestMapping(value = "/testController/add", method = RequestMethod.POST) Result add(@RequestBody String data); /** ...
[ "@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 \tpublic void init() {\n \n \t}", "@...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates documents for given renderers.
void createDocuments(String[] filenames, String[] outputbases, List<RenderedFormat> formats) throws TesseractException;
[ "private static Directory createIndex(IKAnalyzer analyzer, List<String> productNames) throws IOException {\n\t\tDirectory index = new RAMDirectory();\r\n\t\tIndexWriterConfig config = new IndexWriterConfig(analyzer);\r\n\t\tIndexWriter writer = new IndexWriter(index, config);\r\n\r\n\t\tfor (String name : productNa...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Verifica se o bonus passa eh valido.
public void verificaBonusValido(int bonus) { if (bonus <= 0) { throw new IllegalArgumentException("Erro no cadastro de cenario: Bonus invalido"); } }
[ "public boolean esValido() {\r\n if (!entradaFaltante.equals(\"\"))\r\n return false;\r\n \r\n if (camino.obtenerUltimo().getPrimero().getEsFinal())\r\n return true;\r\n else\r\n return false;\r\n }", "public boolean validar() { \n if(th...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
URL template for constructing a tracking URL. .google.protobuf.StringValue tracking_url_template = 4;
public Builder setTrackingUrlTemplate(com.google.protobuf.StringValue value) { if (trackingUrlTemplateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } trackingUrlTemplate_ = value; onChanged(); } else { trackingUrlTemplateBuilder_...
[ "public URLTemplate(String template) {\n this.template = template;\n }", "@Override\n protected String getTemplateUrl() {\n String result = (String) getParameter(TEMPLATE);\n JSR341Evaluator elEvaluator = new JSR341Evaluator(getModel(), getAllParameters());\n return (String) ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XShortClosure__Group__1" $ANTLR start "rule__XShortClosure__Group__1__Impl" ../org.yazgel.snow.notation.text.module.ui/srcgen/org/yazgel/snow/notation/text/ui/contentassist/antlr/internal/InternalModule.g:10133:1: rule__XShortClosure__Group__1__Impl : ( ( rule__XShortClosure__ExpressionAssignment_1 ) ...
public final void rule__XShortClosure__Group__1__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.yazgel.snow.notation.text.module.ui/src-gen/org/yazgel/snow/notation/text/ui/contentassist/antlr/internal/InternalModule.g:10137:1: ( ( ...
[ "public final void rule__XShortClosure__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:13760:1: ( ( ( rule__XShortClosure__ExpressionAssignment_1 ) ) )\n // InternalOcelet.g:13761:1: ( ( rule__XSho...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
If the two param is not legal, they will be set to default value.
public FindTarget(long middleFileSize, long freeMemLowBound) { if (middleFileSize <= 0 || middleFileSize >= ALL_MEM) { this.MIDDLE_FILE_SIZE = DEFAULT_MIDDLE_FILE_SIZE; } else { this.MIDDLE_FILE_SIZE = middleFileSize; } if (freeMemLowBound <= 0 || freeMemLowBound ...
[ "public static <T> T defaultValue(T a, T b){\n if(a != null){\n return a;\n }\n return b;\n }", "protected abstract void setDefaultValue();", "private void setDefaultValues() {\n this.parmID = new ParmID();\n this.timeConstraints = new TimeConstraints();\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Implement this method and use the helper to adapt the view to the given item.
@Override protected void convert(@NonNull BaseViewHolder helper, InformationTypeOneSecondBean.ElementTypeListBean item) { try { int adapterPosition = helper.getAdapterPosition(); TextView tView = helper.getView(R.id.item_text); tView.setText(StringUtil.setText(item.getNam...
[ "@Override\n protected void convert(BaseViewHolder helper, TextLiveListModel.StreamsEntity item) {\n if (helper instanceof ImageTextViewHolder) {\n ((ImageTextViewHolder) helper).setModel(item);\n }\n }", "@Override\n protected void convert(BaseViewHolder helper, ProjectList.Data...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Char for the TokenType.
private char[] getChar(Entity entity) { int intHeight = entity.getHeight(); char height = Character.forDigit(intHeight, 10); char[] chars = new char[2]; if (entity.isBase()) { chars[0] = 'B'; } else if (entity.getHeight() == 0) { chars[0] = 'S'; } ...
[ "public char toChar();", "public char getToken();", "public abstract char getChar ();", "public char asChar() throws IllegalArgumentException {\n if (mValue == null) return 0;\r\n if (mValue instanceof Character) return ((Character)mValue).charValue();\r\n mValue = mValue.toString();\r\n return ((...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
set the original destination of a message
public static void helicsMessageSetOriginalDestination(SWIGTYPE_p_void message, String dest) { helicsJNI.helicsMessageSetOriginalDestination(SWIGTYPE_p_void.getCPtr(message), dest); }
[ "public void setOriginal(MessageChannel original) {\n\t\tthis.original = original;\n\t}", "public void setTomessage(java.lang.String param){\n \n this.localTomessage=param;\n \n\n ...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the average kW of the apartmentConsumptionFact
public Double getAvgKW() { return avgKW; }
[ "public int getAvgConsumption() {\n return 0; // FIXME 2b: complete this method\n }", "public final Double KW_DivMeas(ArrayList <ArrayList <Double>> abcd) {\n\t Double SumKW2=new Double(0);\n\t for (int i=0; i<(int) abcd.size();i++)\n\t {\n\t\t SumKW2+=KW2_DivMeas(abcd.get(i));\n\t }\n\t return ((Double...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__XShortClosure__Group_0_0_1_1__1__Impl" $ANTLR start "rule__XParenthesizedExpression__Group__0" ../org.yazgel.snow.notation.text.module.ui/srcgen/org/yazgel/snow/notation/text/ui/contentassist/antlr/internal/InternalModule.g:10402:1: rule__XParenthesizedExpression__Group__0 : rule__XParenthesizedExpres...
public final void rule__XParenthesizedExpression__Group__0() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.yazgel.snow.notation.text.module.ui/src-gen/org/yazgel/snow/notation/text/ui/contentassist/antlr/internal/InternalModule.g:10406:1:...
[ "public final void rule__XParenthesizedExpression__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOcelet.g:13992:1: ( rule__XParenthesizedExpression__Group__0__Impl rule__XParenthesizedExpression__Group__1 )\n //...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: b
private void m21992b(String str, List<BaseContent> list, C7059a aVar) { m21994b(Collections.singletonList(str), list, (C7059a) null); }
[ "public abstract T zzs(B b2);", "public void b(ByteOrder bo) {\n/* 72 */ if (this.i != bo) {\n/* 73 */ this.i = bo;\n/* 74 */ this.h = a(bo);\n/* */ } \n/* */ }", "public void doSth(B b){\n\n }", "public abstract void mo14156a(B b, int i, int i2);", "@Override\n\tpublic v...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Attach or detach the walls from the rootNode
@Override public void setEnabled(boolean enable) { if (this.rootNode != null) { if (enable) { // Since we're enabling the room, we are going to attach all the children this.rootNode.attachChild(nodeRoom); for (RigidBodyControl rbc : wallPhy) { ...
[ "private void updateGroundAndWallsNode() {\n if (null == mAllWall) {\n mAllWall = new HashMap<Integer, Wall>();\n } else {\n mAllWall.clear();\n }\n\n for (SEObject child : getChildObjects()) {\n if (child instanceof Ground) {\n mGround = (...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build call for deleteCollectionNamespacedReplicaSet
public com.squareup.okhttp.Call deleteCollectionNamespacedReplicaSetCall(String namespace, String pretty, String _continue, String fieldSelector, String labelSelector, Integer limit, String resourceVersion, Integer timeoutSeconds, Boolean watch, final ProgressResponseBody.ProgressListener progressListener, final Progre...
[ "@HTTP(\n method = \"DELETE\",\n path = \"/apis/machineconfiguration.openshift.io/v1/controllerconfigs\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionControllerConfig(\n @QueryMap DeleteCollectionControllerConfig queryParameters);", "@HTTP(\n method = \"DELE...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the end date of this proposal.
@Override public Date getEndDate() { return _proposal.getEndDate(); }
[ "public Date getEndDate() {\n return getDate(END_TIME);\n }", "public Date getEnd() {\n return new Date(end.getTime());\n }", "public Date getEndDate() {\n\t\t// Automatically generated method. Please do not modify this code.\n\t\treturn this.endDate;\n\t}", "@Override\n\tpublic Date getEn...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
For testing: isFinished, getProgress, getQuality
public MatchingItem(String pitchAlignment) { this.pitchAlignment = pitchAlignment; }
[ "public void progressMade();", "String getProgress();", "public double getProgress() { return _prog; }", "@Test\r\n public void testProgress1() {\r\n instance.progress();\r\n instance.finish();\r\n }", "protected void progress(){\n }", "@Override\n\tpublic float getProgress() throw...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub
@Override protected EntityImplDao getEntityImplDao() { 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" ] ] } }
Partitions of the hostname of the url by "."
public static String[] getHostSegments(URL url) { String host = url.getHost(); if(IP_PATTERN.matcher(host).matches()) return new String[] {host}; return host.split("\\."); }
[ "public String dnsName() {\n return url.getHost();\n }", "static public java.lang.String localHostNameForURI () { throw new RuntimeException(); }", "protected String removeProtocolAndPrefix(String url)\n {\n return url.substring(url.indexOf(\".\") + 1).toLowerCase();\n }", "String lookupLocal...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an appropriate function for the specified attribute.
private static Function<Path, Boolean> getFunction(String attr) { if ("shortcuts".equalsIgnoreCase(attr)) { return FUNC_SHORTCUTS; } return null; }
[ "void attribute(String attribute);", "Object getValue(String attribute) throws UnifyException;", "@Override\n @FiresEvent(value = ElementEvent.READ_VALUE, message = \"attribute [${1}]\")\n public String attribute(String attribute) {\n return elementDriver.getAttributeOfElement(element, attribute);\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the view with the json arguments
public void updateView(String id){ currentId = id; }
[ "public void updateView(Object dataMap) {\n\t}", "public void contextUpdate( JsonContext context );", "private void updateGUI(JSONObject user_data) {\n }", "public void updateView(){\n\t\tview.updateView();\n\t}", "public View(JsonObject json) throws IllegalArgumentException {\r\n\t\tthis.json = json;\r\...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This is FXML event handler. Handles the action of click on 'Get Report' button.
@FXML void getReportAction(ActionEvent event) { if (formIsNotEmpty()) Navigator.instance().alertPopUp("TeacherReportForm1"); else Navigator.instance().navigate("TeacherReportForm1"); }
[ "@FXML\n\tpublic void durationsIssueReportBtnWasPressed(ActionEvent event) {\n\t\tinitGetReportDurationsData();\n\t\tdurationsIssueReportLabel.setText(\"Report Issued!\");\n\t}", "@FXML\n\tpublic void extensionsIssueReportBtnWasPressed(ActionEvent event) {\n\t\tinitGetReportExtensionsData();\n\t\textensionsIssueR...
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }