input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void test set to date throws exception date value new date instance set to date value assert equals value instance get to date | test for the setter of the property to date |
public void test get mandatory throws exception boolean value null instance set mandatory value assert equals value instance get mandatory | test for the getter of the property mandatory |
public void test set mandatory throws exception boolean value null instance set mandatory value assert equals value instance get mandatory | test for the setter of the property mandatory |
public void test get time throws exception date value new date instance set time value assert equals value instance get time | test for the getter of the property time |
public void test set time throws exception date value new date instance set time value assert equals value instance get time | test for the setter of the property time |
private void assert lookup entity lookup entity expected lookup entity actual assert auditable entity expected actual assert equals these two lookup entity entities are not equal name mismatched expected get name actual get name | p asserts the two lookup entity entities are equal |
private void assert management company management company expected management company actual assert auditable entity expected actual assert equals these two management company entities are not equal name mismatched expected get name actual get name assert management person expected get account executive actual get account executive assert phone number expected get phone actual get phone assert equals these two management company entities are not equal notes mismatched expected get notes actual get notes assert property expected get property actual get property | p asserts the two management company entities are equal |
private void assert management person management person expected management person actual assert person expected actual | p asserts the two management person entities are equal |
private void assert phone number phone number expected phone number actual assert auditable entity expected actual assert equals these two phone number entities are not equal number mismatched expected get number actual get number assert equals these two phone number entities are not equal extension mismatched expected get extension actual get extension | p asserts the two phone number entities are equal |
private void assert property property expected property actual assert auditable entity expected actual assert equals these two property entities are not equal type mismatched expected get type actual get type assert equals these two property entities are not equal proprietary lease expiry date mismatched expected get proprietary lease expiry date get time 1000 actual get proprietary lease expiry date get time 1000 assert equals these two property entities are not equal self managed mismatched expected is self managed actual is self managed | p asserts the two property entities are equal |
private void assert reporting party type reporting party type expected reporting party type actual assert lookup entity expected actual | p asserts the two reporting party type entities are equal |
private void assert self property management self property management expected self property management actual assert auditable entity expected actual assert management person expected get president actual get president assert management person expected get secretary actual get secretary assert management person expected get treasurer actual get treasurer assert management person expected get other actual get other assert property expected get property actual get property | p asserts the two self property management entities are equal |
private void assert seller seller expected seller actual assert person expected actual assert equals these two seller entities are not equal alternate name mismatched expected get alternate name actual get alternate name assert equals these two seller entities are not equal ssn mismatched expected get ssn actual get ssn | p asserts the two seller entities are equal |
private void assert state state expected state actual assert lookup entity expected actual | p asserts the two state entities are equal |
private void assert survey survey expected survey actual assert auditable entity expected actual assert equals these two survey entities are not equal survey type mismatched expected get survey type actual get survey type assert equals these two survey entities are not equal available initial date mismatched expected get available initial date get time 1000 actual get available initial date get time 1000 assert equals these two survey entities are not equal last revision date mismatched expected get last revision date get time 1000 actual get last revision date get time 1000 | p asserts the two survey entities are equal |
private void assert title company title company expected title company actual assert person expected actual assert equals these two title company entities are not equal company name mismatched expected get company name actual get company name assert equals these two title company entities are not equal branch mismatched expected get branch actual get branch assert equals these two title company entities are not equal attention of mismatched expected get attention of actual get attention of | p asserts the two title company entities are equal |
private void assert transfer agent transfer agent expected transfer agent actual assert person expected actual assert equals these two transfer agent entities are not equal company name mismatched expected get company name actual get company name | p asserts the two transfer agent entities are equal |
public string get property string name return props get string name | returns the specified property or code null code if not found |
public boolean get boolean property string name string str get property name if str null return false str str to lower case return y equals str yes equals str t equals str true equals str | returns a boolean property or code false code if not found |
public string get item content as string if add get item null return null else if add get item get content transfer encoding to string equals x native xml return get xml content else return get base64 content | this is a simple though not strictly accurate in the xml case mechanism |
public boolean has key string key if key null return false key make safe key file f new file dir path key return f exists | returns code true code if a permanent storage file already exists |
private ice syndicator full port type get ice syndicator string listener url throws malformed urlexception service exception ice syndicator full port type ice syndicator null twice syndicator full syn locator new twice syndicator full locator if listener url null ice syndicator syn locator get ice syndicator full port type else url service url new url listener url ice syndicator syn locator get ice syndicator full port type service url return ice syndicator | returns the axis handle to the syndicator on which |
public void remove string key if key null return key make safe key file f new file dir path key if f exists f delete | removes the permanent storage associated with the specified key |
public void set log dir string dir log dir dir if log dir null log dir length 0 log dir default log dir file f new file log dir if f exists create directory if it doesn t already exist f mkdirs | sets and creates if necessary the directory that will contain the |
public set key set hash set keys new hash set file f new file dir path if f exists return keys string files f list for int i 0 i files length i keys add files i return keys | returns a set containing all of the keys |
public buffered reader get buffered reader string key if key null return null key make safe key file f new file dir path key if f exists return null try return new buffered reader new file reader f catch file not found exception fnfe logger instance log logger error null persistence get buffered reader fnfe return null | returns a collection containing lists of strings |
public void log int level string log prefix object obj log level log prefix null obj | writes a log message |
public print writer get print writer string key if key null return null key make safe key try return new print writer new file writer dir path file separator key catch ioexception ioe logger instance log logger error null persistence get print writer ioe return null | stores the lists contained within the var values var collection as |
protected string make safe string key string buffer buf new string buffer int len key length for int i 0 i len i char c key char at i if character is letter or digit c c c c buf append c else buf append return buf to string | key values are mutated when used as file names |
public string get error phrase if error phrase null error phrase codes instance phrase for error code return error phrase | returns the error phrase |
public string get current state return current state null ice any current state | returns the current state or ice any if it is code null code |
private string get subscription url subscription type sub string protocol delivery policy type dp sub get offer get delivery policy for int i 0 i dp get delivery rule length i delivery rule type rule dp get delivery rule i if rule get mode equals delivery rule type mode pull for int j 0 j rule get transport length j transport type transport rule get transport j if transport get protocol to string equals protocol url access type ua transport get delivery endpoint if ua null return ua get url to string return null | returns the pull delivery endpoint for the subscription |
public void set locale locale locale if locale equals this locale this locale locale logger instance log logger debug ice codes set locale locale set to locale to string codes resource bundle get bundle resource file prefix locale | given a locale start using the code short phrases for that lanuage |
public string phrase for int code if code 900 return null string str null try str codes get string string value of code catch missing resource exception mre logger instance log logger warning ice codes phrase for no phrase for code code return str | returns the string corresponding to the specified error code number |
public string get role string if role role syndicator return role syndicator string else return role subscriber string | returns the role as a string either code role syndicator string code |
public boolean requires acceptance if mode push equals mode return true for iterator iter transports iter has next if get equals transport iter next get protocol return true return false | returns code true code if this rule requires a subscribe response |
public string get urlfor protocol string p return protocol equals p delivery endpoint null | if this transport has a url for the specified protocol return it |
public subscription type find subscription string sub id for iterator iter subscriptions iterator iter has next subscription type sub subscription type iter next if sub id equals sub get subscription id to string return sub return null | returns the subscription with the specified identifier or |
public boolean has subscription string sub id return find subscription sub id null | returns code true code if we have the specified subscription |
public string get push url return find urlfor mode and protocol mode push soap | returns the first push url found in any transport or code null code |
public string get pull url return find urlfor mode and protocol mode pull soap | returns the first pull url found in any transport or code null code |
public string get get url if mode push equals mode return null return find urlfor mode and protocol mode pull get | returns the first get url found in any transport or code null code |
public string find urlfor mode and protocol string m string p if mode equals m return null for iterator iter transports iterator iter has next transport xport transport iter next string url xport get urlfor protocol p if url null return url return null | returns the first url delivery endpoint for the specified mode |
public void set mode string mode throws illegal argument exception if mode push equals mode mode pull equals mode logger instance log logger error null delivery rule set mode bad mode throw new illegal argument exception bad mode set attribute mode mode | sets mode attribute |
public void set item type string item type throws illegal argument exception if features is item type item type string msg illegal item type item type logger instance log logger error null generic metadata set item type msg throw new illegal argument exception msg set attribute item type item type | sets item type attribute |
public void set expiration priority string priority if expiration priority first equals priority expiration priority time equals priority expiration priority quantity equals priority expiration priority last equals priority string msg illegal expiration priority priority logger instance log logger error null delivery policy set expiration priority msg throw new illegal argument exception msg set attribute expiration priority priority | sets expiration policy attribute |
public object get attribute string key return get tag get attribute key | this convenience method returns the xml tags var key var attribute |
public void set attribute string key object value get tag set attribute key value | this convenience method sets the xml tags var key var attribute |
public message add child message child message node add child child message get node return child message | this convenience method adds the node of var message var as a child |
public node add child node node return node add child node | this convenience method adds var node var as a child of our node |
public node add child element el return node add child el | this convenience method adds code el code as a child of our node |
public void set push url string url for iterator iter delivery rules iterator iter has next delivery rule rule delivery rule iter next if rule is push rule has transport with protocol soap rule set transport with protocol endpoint soap url return logger instance log logger warning null offer set push url offer contains no soap push rule | sets the delivery endpoint url of the first push soap transport |
private void get remaining offers if offers null request and parse catalog if has subscriptions remaining offers offers else remaining offers new array list iterator it offers iterator while it has next boolean is remaining true offer type offer offer type it next iterator it2 subscriptions while it2 has next subscription type sub subscription type it2 next if sub get subscription id to string index of offer get offer id to string 0 is remaining false if is remaining remaining offers add offer | returns offers that have not already been subscribed to |
public boolean requires acceptance for iterator iter delivery rules iter has next if delivery rule iter next requires acceptance return true return false | returns code true code if this offer requires a subscribe response |
protected void add code node code node add child new tag env code node value node code node add child new tag env value value node add child new jimm twice xml dom text env sender node subcode node code node add child new tag env subcode value node subcode node add child new tag env value value node add child new jimm twice xml dom text rpc bad arguments | add the soap fault code |
protected void add reason ice fault fault node reason node add child new tag env reason string text fault get error message custom message if text null text fault get error phrase standard message hash map attrs new hash map locale l codes instance get locale attrs put xml lang l get language l get country node text node reason node add child new tag env text text node add child new jimm twice xml dom text text | add the soap fault reason |
protected void add detail ice fault fault node detail node add child new tag env detail hash map attrs new hash map attrs put code fault get error code if fault get location null attrs put location fault get location detail node add child new tag ice fault attrs | add the soap fault detail which contains the ice fault |
public void write to output stream out throws ioexception document write to out | writes the payload to a writer stream |
public string to string return document to string | returns the xml representation of the payload |
public string get text data if temp file writer null try temp file writer flush temp file writer close copy text from temp file into string writer file reader in new file reader temp file string writer out new string writer int len char buf new char bufsiz while len in read buf 0 out write buf 0 len out close in close return out to string catch ioexception ioe logger instance log logger error logger prefix xmltext data get text data ioe return else if text buffer null return text buffer to string else return null | returns the text we are holding or code null code if |
public iterator offers if offers null request and parse catalog get remaining offers return remaining offers iterator | returns an iterator over the offer id strings |
public void set attribute string key object value if attrs null attrs new hash map attrs put key value | sets the specified attribute to a new value |
public object get attribute string key if attrs null return null return attrs get key | returns the specified attribute value |
public void write attributes output stream out throws ioexception if attrs null return for iterator iter attrs key set iterator iter has next string key string iter next object val attrs get key if val null out write out write key get bytes out write get bytes utils write encoded to out val to string out write | returns a string containing the attribute key value pairs as xml |
public void write to output stream out throws ioexception write to out open and close tag | writes this element as an xml string |
public void add to prolog element element prolog add element if element instanceof doctype if doctype null throw new illegal argument exception doctype already defined doctype doctype element | add element to prolog |
public boolean has offers if offers null request and parse catalog get remaining offers return remaining offers null remaining offers size 0 | returns code true code if there are any offers |
public node set root element element if element null throw new illegal argument exception root node may not be null set root node new node element null return root node | creates a new node using the specified element makes that node the root |
public void write to output stream out throws ioexception for iterator iter prolog iterator iter has next element iter next write to out out write n root node write to out | writes this document as xml to the specified code output stream code |
public node add child element element if element null throw new illegal argument exception node s element must not be null return add child new node element this | given an xml element creates a node with this element adds it |
public node add child node node if node null throw new illegal argument exception node s child node must not be null children add node node set parent this return node | adds var node code as a child of this node and return it |
public node find starts with string prefix if prefix null prefix length 0 return null element e get element if e instanceof named element string name named element e get name if name null name starts with prefix return this for iterator iter children iter has next node n node iter next n n find starts with prefix if n null return n return null | performs a depth first search to find the first node whose elements |
public void write to output stream out throws ioexception if children size 0 out write indentation element write to out element open and close tag else out write indentation element write to out element open tag out write n get bytes for iterator iter children iterator iter has next node child node iter next child indent level indent level 1 debug out write child to string child write to out out write indentation element write to out element close tag if indent level 0 out write n get bytes | writes this document as xml to the specified code output stream code |
public boolean is new return subscriptions size 0 listener url null | returns code true code if this is a new subscriber |
public offer type find offer string id for iterator iter offers iter has next offer type o offer type iter next if o get offer id to string equals id return o return null | returns the offer with the given id |
public void set endpoint address java lang string port name java lang string address throws javax xml rpc service exception if ice subscriber port type equals port name set ice subscriber port type endpoint address address else unknown port name throw new javax xml rpc service exception cannot set endpoint address for unknown port port name | set the endpoint address for the specified port name |
public iterator subscribers return new persistence pstore dir key set iterator | returns an iterator over the list of subscriber keys uuids |
public void set value org apache axis types token value this value value | sets the value value for this package sequence state type |
protected boolean has subscriber string subscriber id return new persistence pstore dir has key subscriber id | returns code true code if the subscriber id is known to this |
public void set url org apache axis types uri url this url url | sets the url value for this url access type |
protected string get subscriber url string subscriber id temporarily load a subscriber in order to fetch its listener url syn subscriber curr subscriber subscriber load subscriber subscriber id string retval subscriber get listener url subscriber curr subscriber return retval | returns the url given to us by the specified subscriber or |
public void set username org apache axis types token username this username username | sets the username value for this url access type |
public void set password org apache axis types token password this password password | sets the password value for this url access type |
public void set delivery rule org icestandard ice v20 subscribe delivery rule type delivery rule this delivery rule delivery rule | sets the delivery rule value for this delivery policy type |
public void set authentication scheme org icestandard ice v20 simpledatatypes url access type authentication scheme authentication scheme this authentication scheme authentication scheme | sets the authentication scheme value for this url access type |
public void remove subscriber string subscriber id new persistence pstore dir remove subscriber id remove local copy too if subscriber null subscriber get uuid equals subscriber id subscriber null logger instance log logger info logger prefix tw icesyndicator remove subscriber subscriber subscriber id removed | removes a subscriber from persistent store |
public void set startdate java util calendar startdate this startdate startdate | sets the startdate value for this delivery policy type |
public void set text org icestandard ice v20 simpledatatypes text type text this text text | sets the text value for this description type |
public void set stopdate java util calendar stopdate this stopdate stopdate | sets the stopdate value for this delivery policy type |
public void set expiration priority org icestandard ice v20 subscribe delivery policy type expiration priority expiration priority this expiration priority expiration priority | sets the expiration priority value for this delivery policy type |
private ice subscriber port type get ice subscriber string listener url throws malformed urlexception service exception ice subscriber port type ice subscriber null twice subscriber sub new twice subscriber locator if listener url null technically this is cheating because we re not supposed to know the subscriber s url but this is still useful for testing purposes ice subscriber sub get ice subscriber port type else url service url new url listener url ice subscriber sub get ice subscriber port type service url return ice subscriber | returns the axis handle to the subscriber on which |
public void set subscription org icestandard ice v20 subscribe subscription type subscription this subscription subscription | sets the subscription value for this status type |
public void set offer org icestandard ice v20 subscribe offer type offer this offer offer | sets the offer value for this subscribe |
public void set parameters org icestandard ice v20 simpledatatypes parameters parameters this parameters parameters | sets the parameters value for this subscribe |
private string get subscription url subscription type sub string protocol delivery policy type dp sub get offer get delivery policy for int i 0 i dp get delivery rule length i delivery rule type rule dp get delivery rule i if rule get mode equals delivery rule type mode push for int j 0 j rule get transport length j transport type transport rule get transport j if transport get protocol to string equals protocol url access type ua transport get delivery endpoint if ua null return ua get url to string return null | returns the push delivery endpoint for the subscription |
public void set subscription name org apache axis types token subscription name this subscription name subscription name | sets the subscription name value for this subscribe |
public void set reason org icestandard ice v20 simpledatatypes text type reason this reason reason | sets the reason value for this cancel |
public void set offer id org apache axis types token offer id this offer id offer id | sets the offer id value for this subscribe |
public void set content metadata org icestandard ice v20 subscribe content metadata type content metadata this content metadata content metadata | sets the content metadata value for this offer type |
public void set delivery endpoint org icestandard ice v20 simpledatatypes url access type delivery endpoint this delivery endpoint delivery endpoint | sets the delivery endpoint value for this transport type |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.