anchor
stringlengths
10
14.3k
positive
stringlengths
10
14.9k
public interface IViewConfiguration { /** Get the filter defining how to handle conditional directives */ IViewFilter getViewFilter(); /** Get the fixed macros (macro name or name=value). * This array should not change after creation since this * configuration is stored in a view. */ Collection<ID...
This interface defines the configuration for a view.
public void setAmcContract (java.lang.String amcContract) { this.amcContract = amcContract; }
Set the value related to the column: amc_contract
private static String getXadlDirection(Direction direction) { String strDirection = null; switch (direction) { case IN: strDirection = "in"; break; case OUT_MULTI: case OUT_SINGLE: strDirection = "out"; break; default: strDirection = "none"; } return strDirection; }
Gets string expression of the given signature for xadl.
@Override public void onResponse(String response) { if (new CheckConnectivity().isConnected(context)) { try { prog.dismiss(); Log.e("Response : prince ", response); ...
Display the first 500 characters of the response string.
public boolean isDeprecated() { return isDeprecated; }
Has this action method been deprecated
public void setCallback(final CallbackSync callback) { this.callback = callback; }
========= Operations ========= set callback called when buffers where synched to disk
Text createText();
Returns a new object of class 'Text'.
@Test(timeout = 4000) public void test57() throws Throwable { FBProcedureCall fBProcedureCall0 = new FBProcedureCall(); // Undeclared exception! try { fBProcedureCall0.addOutputParam((FBProcedureParam) null); fail("Expecting exception: NullPointerException"); } catch(...
Test case number: 57 /Coverage entropy=0.6931471805599453
public Builder setMoodMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } moodMessage_ = value; onChanged(); return this; }
string moodMessage = 5;
public void setDay(Date day) { this.day = day; }
This method was generated by Apache iBATIS ibator. This method sets the value of the database column V_RP_DY_ROUTE.DAY
public static void main(String[] args) { final Scanner scanner = new Scanner(System.in); boolean exit = false; String select; loadFromFile(); do { System.out.println("Premier League Manager"); System.out.println("================================="); ...
input data validation resourse link implement the menu
public void waitForVerifyHhsPage() { verifyHHSPageElement.waitForState().enabled(30); }
Verify the HHS Footer Link in LoginPage.
private static float getDefaultDuration(ResourceLocation effectId) { return new ResourceLocation("night_vision").equals(effectId) ? 15.9f : 1.9f; }
Duration in seconds. The .9 should prevent flickering.
@Test public void applyOnceGoal() { assertSuccess(" ;H; ;S; x ∈ ℤ ;; y ∈ ℤ |- x↦y ∈ id", rm("", empty)); }
Ensures that the Rmi tactic succeeds once on a goal
public JsonMember copy() { return new JsonMember(name, value.copy()); }
Create an independent copy of this JSON member.
public Builder clearItemId() { itemId_ = 0L; onChanged(); return this; }
item_id int64 item_id = 9;
boolean isSetIdVerificationResponseData();
True if has "idVerificationResponseData" element
public void onSearchStarted();
Called when the action bar initially shows the search entry field.
private static void displayStatistics(){ Scanner scanner = new Scanner(System.in); System.out.print("Please enter Club Name: "); String clubName = scanner.nextLine(); leagueManager.displayStatistics(clubName); }
display a specific club's statistics
private Swiftbuy() { super("swiftbuy"); }
No further instances allowed
String getModuleDisplayName();
Gets the display name that identifies the family of ingest modules the factory creates. Autopsy uses this string to identify the module in user interface components and log messages. The module name must be unique. so a brief but distinctive name is recommended.
public void translate(BitInputStream input, PrintStream output) { HuffmanNode node = this.front; while (input.hasNextBit()) { while (node.left != null && node.right != null) { if (input.nextBit() == 0) { node = node.left; } else { ...
A method that takes in a BitInputStream and a PrintStream. Reads bits from the BitInputStream and translates them using the HuffmanTree and prints those characters to the PrintStream.
public List<List<Integer>> pathSum(TreeNode root, int sum) { if(root==null) return res; dfs(root, sum, new ArrayList<Integer>()); return res; }
113 use dfs recursive
public void openIe(){ }
System.setProperty("webdriver.ie.driver","F:\\IdeaProjectsWork\\selenium2\\drivers\\chromedriver.exe"); WebDriver wb = new InternetExplorerDriver();
public void printTopRatingMovies() { Collections.sort(this.dataList, new SortByRating()); int top = Math.min(5, getDataLength()); for (int i=0; i<top; ++i) { System.out.println(this.dataList.get(i).toString()); } Collections.sort(this.dataList); }
method to print the movies with the 5 highest ratings
private static void cargarLista(String linea, TraductorDesdeLista grafo) throws IllegalArgumentException { int vertice = Integer.parseInt(linea.substring(0,1)); // Guarda el vertice linea = linea.substring(3); // Guarda los vertices sucesores String[] lista = linea.split(" "); // Almacena...
Carga la linea de un archivo Lista de Adyacencias dada en el Grafo dado.
public void setRating(int rating);
set a rating for the item
@Override public void onClick(View v) { Intent intent = new Intent(GuideActivity.this,MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION); startActivity(intent); MyApplication.getApp().getSysSpUtil().setIsFirstTime(false); finish(); }
TODO Autogenerated method stub
private void defaultConfig(Set<String> defaultFontFamilyNames) { defaultFontFamily = DEFAULT_SELECTED_FONT_NAME; // the empty font name addItem(""); // all the system font names to combo box for (String defaultFontFamilyName : defaultFontFamilyNames) { this.listFont...
Config the FontFamilySelector using the default values. All the system available font names are added to the combo box.
public static void main(String[] args) throws IOException { int h = 0; int v = 0; InputStreamReader file = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(file); //This string will be the iterable container String directions = br.readLine(); //this code will check upp...
This code will create two variables to store the horizontal and vertical positions specified origin is (0,0) h= horizontal v=vertical
public interface SearchPresenter { void onDestroy(); void loadNextPage(); void searchGithubRepos(String searchPhrase); }
Created by sandyr on 11/23/2017.
public static String formatearRut(String rut){ int cont = 0; String format; rut= rut.replace(".", ""); rut = rut.replace("-", ""); format= "-" + rut.substring(rut.length()-1); for(int i = rut.length()-2; i>=0;i--){ format=rut.substring(i,i+1)+format; ...
method that allows to format the ru of the form with period and hyphen even if it is entered in different ways
private void demoInnerClass2() { }
Inner x = new Inner();
private boolean contains(int[] piket,int vlera){ for(int i=0; i<piket.length; i++){ if(piket[i]==vlera) return true; //eshte metode booleane spese kthen true ose false ne menyre qe te plotesohet if me lart } return false; }
krahason elementet e vektorit me nje vlere te caktuar
Player getCurrentPlayer();
Returns the current Player.
public MyWorld() { // Create a new world with 800x600 cells with a cell size of 1x1 pixels. super(800, 600, 1); //could have as many RideLines as capasity dictates rides = new RideLines[MAX_RIDES]; currentRide=0; //initially, we have 0 prisoners //Crea...
the collection of ride lines Constructor for objects of class MyWorld.
void onSuccess(int responseCode, int requestCode, Response<JsonElement> response);
Success callback. Request is considered as successful when response code is between 200 and 299
@PostMapping("/Verify") public ResponseEntity<String> verify(@RequestBody VerifyRequest request){ logger.debug("verify request"); String username = conferenceService.findConference(request.getId()).getOwner(); Conference conference = conferenceService.findConference(request.getId()); ...
verify the conference When debug, delete the param "request"
public java.math.BigDecimal getExciseDuty () { return exciseDuty; }
Return the value associated with the column: excise_duty
@Override public void specialAbility() { }
TODO: Double value of Defence Order
private String edit(String input_from_user, char[] input_array) { System.out.println("Enter the number of positions you want to change the string"+input_from_user); int user_input = in.nextInt(); String result = null; for(int i=0; i <user_input; i++){ System.out.println("Enter the"+i+"th to edit in the "+inp...
TODO Autogenerated method stub
private List<Student> getStudentList(StudentSearchResponse srchResponse) { List<Student> studentList = new ArrayList<Student>(); if (srchResponse != null && srchResponse.size() > 0) { for (StudentSearchResult srchRes : srchResponse) { Student std = new Student(srchRes.getInquiryId(), srchRes.getSt...
Returns a list of students objects from the search results
public entities.Torrent.FileInfo.Builder addFilesBuilder( int index) { return getFilesFieldBuilder().addBuilder( index, entities.Torrent.FileInfo.getDefaultInstance()); }
repeated .FileInfo files = 4;
protected DocumentTestObject homeMembership(TestObject anchor, long flags) { return new DocumentTestObject( getMappedTestObject("homeMembership"), anchor, flags); }
HomeMembershipBoilerCoverHomeEmergencyAA: with specific test context and state. .title : Home Membership | Boiler Cover | Home Emergency | AA .class : Html.HtmlDocument .url : RegularExpression(homemembership)
public Builder addAllTransactions( java.lang.Iterable<? extends com.google.protobuf.ByteString> values) { copyOnWrite(); instance.addAllTransactions(values); return this; }
Signed transactions that satisfy PaymentDetails.outputs repeated bytes transactions = 2;
public static String initLbInstanceId() { try { String url = "http://169.254.169.254/latest/meta-data/instance-id"; HttpClient client = HttpClient.newHttpClient(); HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(url)) .b...
Used to instruct the autoscaler to not try to synchronize this instance as an EC2 web server instance
public Iterator<Item> iterator() { return new RandomArrayIterator(); }
Returns iterator in random order
public String getParamName() { return this.paramName; }
Return the name of the parameter that contains a locale specification in a locale change request.
public static String toString(final Object[] segments) { final StringBuilder builder = new StringBuilder(); for (final Object segment: segments) { if (segment instanceof Integer) { builder.append('[').append(segment).append(']'); } else if (segment == ANY_INDEX) { builder.append(segment); } ...
Encodes the specified path segments as a path string
private String makeEventRecurrence(LocalDateTime lastDay) { return "RRULE:FREQ=WEEKLY;UNTIL=" + formatTimeToICS(lastDay) + "Z" + "\n"; }
/ ICS FORMATTING METHODS Write RRULE property of event given an UNTIL date The frequency of the recurrence is hardcoded to WEEKLY
@Override public double calPx() { return this.n.getPx(); }
pour avoir position de l'appui Px sur segment
public String getName() { return name; }
Gets the value of the name property
private static void createNotesCollectionIfNotExists(UserRegistry registry) throws RegistryException { if (!registry.resourceExists(NoteConstants.NOTE_LOCATION)) { Collection collection = registry.newCollection(); registry.put(NoteConstants.NOTE_LOCATION, collection); } }
Create the note directory if it does not exist
protected void parseURL(URL paramURL, String paramString, int paramInt1, int paramInt2) { /* 126 */ String str1 = paramURL.getProtocol(); /* 127 */ String str2 = paramURL.getAuthority(); /* 128 */ String str3 = paramURL.getUserInfo(); /* 129 */ String str4 = paramURL.getHost(); /* 130 */ int i = par...
/ / / / / / / / / / / / / / / / / / / / / / / / / / / /
public Plan getPlan(String planName);
Gets a Plan form DB with planName
public Builder addCertificate(liubaninc.m0.pki.CertificateOuterClass.Certificate value) { if (certificateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureCertificateIsMutable(); certificate_.add(value); onChanged(); ...
repeated .liubaninc.m0.pki.Certificate Certificate = 1;
public StringFilter getCurrentJobTitle() { return currentJobTitle; }
Gets the current job title.
public org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceResponse unSubscribeService(org.csapi.schema.parlayx.subscribe.manage.v1_0.local.UnSubscribeServiceRequest parameters) { throw new UnsupportedOperationException("Not implemented yet."); }
TODO implement this method
@Override public void mouseMoved(MouseEvent e) { View view = getChart().getView(); // if (getChart().getView().is3D()) { mousePosition.event = null; mousePosition.projection = null; } else { mousePosition.event = e; mousePosition.projection = screenToModel(e); } view.s...
When mouse moves on the canvas In 3D, drop mouse position as it should not be displayed In 2D, store mouse position to overlay coordinates
protected void exportScriptToFile() { try { final MigrationConfiguration cfg = getMigrationWizard() .getMigrationConfig(); prepare4SaveScript(); ExportScriptDialog.exportScript(cfg, isSaveSchema()); } catch (Exception e) { // MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveS...
Export script to a external XML file
public JournalEntryLine(String alias) { this(DSL.name(alias), JOURNAL_ENTRY_LINE); }
Create an aliased JOURNAL_ENTRY_LINE table reference
String getIdNode2();
Returns the value of the 'Id Node2' attribute. If the meaning of the 'Id Node2' attribute isn't clear, there really should be more of a description here...
@Override public boolean dispatchTouchEvent(MotionEvent event) { Log.i(TAG, "MyLinearLayout() dispatchTouchEvent event = " + event.getAction()); return super.dispatchTouchEvent(event); }
TODO Autogenerated method stub
@Bean public StandardServletMultipartResolver multipartResolver() { return new StandardServletMultipartResolver(); }
TODO switch to commons multipart
@Test public void bitfieldOperations() throws Exception { assumeThat(getEnv().serverVersion[0], is(greaterThanOrEqualTo(3))); awaitIndefinitely(commandClient.del(key("bf"))); List<Long> results = awaitIndefinitely(commandClient.bitfield(key("bf"), asList(new Incrby(I05, 100L, 1L), new Get(...
Disable these tests for Redis 2 and below
public void act() { if(Greenfoot.mouseClicked(this)){ storeMenu.getLastPressed(this,item,cost); changeImage(); } }
Act do whatever the StoreItem wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
@java.lang.Override public java.util.List<com.google.protobuf.ByteString> getCertificateList() { return certificate_; }
DERencoded X.509 certificate chain repeated bytes certificate = 1;
@Override public void createShoeFromFile(String fileName) { File file = new File(fileName); Scanner myReader = null; try { myReader = new Scanner(file); } catch (FileNotFoundException e) { e.printStackTrace(); } while (myReader.hasNextLine())...
Creates the shoe from file
boolean hasUnReceived();
required .cn.mxz.protocols.user.PropsPro unReceived = 1112331;
String attack();
gives a character object ability (behavior) to attack with a weapon and deal damage to opponent's health
@Override public Fragment getItem(int position) { switch (position) { case 0: FragmentAboutUs aboutFragment = new FragmentAboutUs(); return aboutFragment; case 1: FragmentContactUs contactUsFragment = new FragmentContactUs(); ...
this is for fragment tabs
public void getCosts() { }
beginusercode TODO Autogenerated method stub endusercode
public PaxosExecution(PaxosInstance a_instance, String a_initiator, Vector a_roundLeaders) { this.m_initiator = a_initiator; this.m_paxosInstance = a_instance; m_roundLeaders = a_roundLeaders; createRound(); }
Creates a new PaxosExecution within the given PaxosInstance for the given initiator. A PaxosRound with round number 0 is also created and its timeout is started
@Before public void setUp() { player1 = new Player("Test", 5, "@"); player2 = new Player("Opponent", 2, "#"); ArrayList<Player> players = new ArrayList<>(); players.add(player1); players.add(player2); model = new Model(players, 2); player1.setWorkers(GodName.H...
sets the game with 2 players and their workers, creates instance of model then set the current player
private Tuple<PatternCoordinates, Mat> pair(){ mCamera.takePicture(null, null, jpegCallBack); Tuple<PatternCoordinates, Mat> patternAndImagePair = null; switch(GlobalResources.getInstance().getImageSettings().getBackgroundMode()){ case ImageSettings.BACKGROUND_MODE_RGB: ...
Take a picture with the camera, this also handles the Mat objects
public StructuredQName getVariableQName();
Get the name of the variable
public CallableStatement execute(String query) throws RtpException { /* Create a Callable statement. */ CallableStatement stmt = Connector.createCallableStatement(conn, query); /* Execute the statement */ if (stmt != null) { try { boolean check = stmt.execut...
Executes a SELECT statement. By default this method will print the output to the console as a CSV. The output manager can be set explicitly by using the setOutputManager method. If the query is successful a CallableStatement is returned. Otherwise null is returned.
public double notional ( final int iDate1, final int iDate2) throws java.lang.Exception { org.drip.analytics.cashflow.CompositePeriod cp = containingPeriod (iDate1); if (null == cp || !cp.contains (iDate2)) throw new java.lang.Exception ("Stream::notional => Invalid Inputs"); org.drip.quant.common.Arr...
Retrieve the Notional aggregated over the Date Pairs
public E getElement(int position){ // Position is larger than the current size. if(checkPosition(position)){ return null; } return getDoubleNodeAt(position).element; }
Returns the Element at the position in the DoubleNodeList.
public synchronized final void setQueued(boolean qd) { setFlag(RequestQueued, qd); }
Set/clear the request queued flag
public static String toStringFormat_2(Date date) { return dateToString(date, DATE_FORMAT_2); }
toString for format 2
public String getViptype() { return viptype; }
This method was generated by MyBatis Generator. This method returns the value of the database column t_mp_num.vipType
private HowMe(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
Use HowMe.newBuilder() to construct.
private void markOnline(boolean b) { usersRef.child(userMe.getId()).child("online").setValue(b); }
Mark online boolean as b in firebase
@Override public void onClick(View v) { RegisterActivity.this.finish(); }
TODO Autogenerated method stub
public void ClickLogout(View view ){ logout(); intent = new Intent(context,LoginActivity.class); //remove all previous stack activities intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); finish(); }
Close app Redirect back to login page
private static int parseTotalAttempts(String score) throws NumberFormatException { String[] splitString = score.split("/"); if (splitString.length != 2) { throw new NumberFormatException("Score is not formatted correctly."); } return Integer.parseInt(splitString[1]); }
Returns number of total attempts as integer from score string.
public boolean isSetLegID() { return EncodingUtils.testBit(__isset_bitfield, __LEGID_ISSET_ID); }
Returns true if field legID is set (has been assigned a value) and false otherwise
public static void updateTpsLatHistory(final int envId, int componentId, float tpsVaule, float latencyValue, String platform){ final java.sql.Date todayDate = new java.sql.Date(Calendar.getInstance().getTimeInMillis()); String queryStr = null; if(platform.equals("K8s")){ queryStr = HQLConstants.UPDATE_K8S_T...
Update the tps_latency_history/k8s_tps_latency_history table with tps & Latency values.
public String getFileExtension(File objFile) { String sFileName = null; String sExtension = null; try { if (!objFile.exists()) { throw new Exception("File does not exists"); } sFileName = objFile.getName(); int i = sFileName.las...
end READINI method to get file extension of a file
protected TspSolutionInstance(int amountOfCities) { List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < amountOfCities;i++) { list.add(i); } java.util.Collections.shuffle(list); this.path = list; }
Constructor creating a random path for the TspSOlutionInstance
public boolean isCommandValid(Character character, String command) { if(command.length() > 4 && isKill(command)) { HandleKill(character, command); return true; } if(isPossess(command)) { HandlePossess(character); retu...
Is this a possible path?
public void set(int i, long v) { data[i] = newValue(v); }
Sets value at index i. 1. Convert target value to marked value. 2. Store into internal array.
public boolean contains(T item) { synchronized(this) { return _treeSet.contains(item); } }
Check if there's an instance of the given item already in the set
public void updateCouponwithBoughtCoupon(String ID, boolean isgetCoupon) { helper.updatePoolLocationTable(PooltableName, ID, convertToString(isgetCoupon)); }
update coupon after users users use the coupon
String getTag();
Returns the value of the 'Tag' attribute. If the meaning of the 'Tag' attribute isn't clear, there really should be more of a description here...
public QuantDataHashTable() { quantData = new Hashtable<String, Double>(); }
constructor it initialize the hash table
@Override public void handle(final HttpServerRequest req) { String startTime = "1355620946302"; //--separate-comp Iterator<EventInfo> iter = dataService.events() .find("{timestamp:{$gt:"+startTime+"}}") .sort("{timestamp:1}") .as(EventInfo.class).iterator(); EventCounte...
2 VM by 2 hosts separate component
@Override public Object string(Object node) { return ((Node<E>) node).element.toString(); }
how to print the node
@Override public void onStopOrder(StopOrder StopOrder) throws Exception { }
TODO Autogenerated method stub