input
stringlengths
10
828
output
stringlengths
5
107
protected object execute java script string java script object arguments if driver instanceof javascript executor return javascript executor driver execute script java script arguments else throw new unsupported operation exception can t execute java script via driver get class get name
executes the given java script in the context of this web page
public void enable layout bug detector detector if detector null throw new illegal argument exception method parameter new detector must not be null disable detector get class detectors add detector
adds the given detector to the set of detectors which will be executed
public file get screenshot return screenshot file
returns a screenshot of this layout bug might return code null code
public compare screenshots ignore collection rectangular region regions to ignore for rectangular region ignored region regions to ignore int x2 math min width 1 ignored region x2 int y2 math min height 1 ignored region y2 for int x ignored region x1 x x2 x for int y ignored region y1 y y2 y different pixels x y false found differences false outer loop for int x 0 x width x for int y 0 y height y if different pixels x y found differences true break outer loop return this
updates and returns this
public void freeze dispose last factory frozen factory this
all calls to
public playlist long playlist id super playlist id
constructor for primary key
public tag java lang long tag id super tag id
constructor for primary key
public user java lang long user id super user id
constructor for primary key
public genre java lang integer genre id super genre id
constructor for primary key
public song long song id super song id
constructor for primary key
public base role java lang long role id this set role id role id initialize
constructor for primary key
public void set role id java lang long role id this role id role id this hash code integer min value
set the unique identifier of this class
public void set role description java lang string role description this role description role description
set the value related to the column roledescription
public void set users java util set amplitude persistence hibernate user users this users users
set the value related to the column users
public base genre java lang integer genre id this set genre id genre id initialize
constructor for primary key
public void set genre name java lang string genre name this genre name genre name
set the value related to the column genrename
public void set songs java util list amplitude persistence hibernate song songs this songs songs
set the value related to the column songs
public base user java lang long user id this set user id user id initialize
constructor for primary key
public void set user id java lang long user id this user id user id this hash code integer min value
set the unique identifier of this class
public void set roles java util set amplitude persistence hibernate role roles this roles roles
set the value related to the column roles
public base artist long artist id this set artist id artist id initialize
constructor for primary key
public void set tags java util set amplitude persistence hibernate tag tags this tags tags
set the value related to the column tags
public void set artist id long artist id this artist id artist id this hash code integer min value
set the unique identifier of this class
public void set artist name java lang string artist name this artist name artist name
set the value related to the column artistname
public void set albums java util list amplitude persistence hibernate album albums this albums albums
set the value related to the column albums
public base playlist long playlist id this set playlist id playlist id initialize
constructor for primary key
public long get playlist id return playlist id
return the unique identifier of this class
public void set playlist id long playlist id this playlist id playlist id this hash code integer min value
set the unique identifier of this class
public void set playlist name java lang string playlist name this playlist name playlist name
set the value related to the column playlistname
public void set songs java util list amplitude model isong songs this songs songs
set the value related to the column songs
public base song long song id this set song id song id initialize
constructor for primary key
public void set song id long song id this song id song id this hash code integer min value
set the unique identifier of this class
public void set song name java lang string song name this song name song name
set the value related to the column songname
public void set length java lang string length this length length
set the value related to the column length
public void set file create date java util date file create date this file create date file create date
set the value related to the column filecreatedate
public void set album amplitude persistence hibernate album album this album album
set the value related to the column albumid
public void set playlists java util list amplitude persistence hibernate playlist playlists this playlists playlists
set the value related to the column playlists
public void set tags java util list amplitude persistence hibernate tag tags this tags tags
set the value related to the column tags
public void close session for real session session if null session session close
close the session
public base album long album id this set album id album id initialize
constructor for primary key
public void set album id long album id this album id album id this hash code integer min value
set the unique identifier of this class
public void set album name java lang string album name this album name album name
set the value related to the column albumname
public void set track count int track count this track count track count
set the value related to the column trackcount
public void set artist amplitude persistence hibernate artist artist this artist artist
set the value related to the column artistid
public base tag java lang long tag id this set tag id tag id initialize
constructor for primary key
public void set tag id java lang long tag id this tag id tag id this hash code integer min value
set the unique identifier of this class
public void set tag description java lang string tag description this tag description tag description
set the value related to the column tagdescription
public role java lang long role id super role id
constructor for primary key
public artist long artist id super artist id
constructor for primary key
public album long album id super album id
constructor for primary key
public artist java lang long artist id super artist id
constructor for primary key
private void update servers servers cb remove all items servers cb add item null for server server servers get servers servers cb add item server
update the servers combobox
private string check form string value label tb get text if value null value length 0 return fill the required fields value url tb get text if value null value length 0 return fill the required fields value port tb get text if value null value length 0 return fill the required fields return null
check the required fields
private void init console console stream new text area output stream console executor new os command executor
initalize the console pipe textarea
private void update location select location select remove all items location select add item null int index 1 for location location engine get locations location select add item location if set the selected location set that the selected item if selected location null selected location equals location location select set selected index index index
fill the combobox with the location aliases
public string detach from repository string folder string builder result new string builder if folder null return the folder can not be null try file f new file folder if f is directory return the selected file is not a directory result append execute os command commands parse command commands command detach new string folder true return result to string catch exception e e print stack trace return error
this method works in local file system
public boolean is unique default server server server if server null return false for server s this servers if s is default server equals s return false return true
this method check that there is only one default server instance
public void merge users from passwd file set string u if u null return iterator string iter u iterator while iter has next svn user user new svn user iter next if is user exist user get name this users add user
if there are any user who contained in the passwd file
override protected void startup show new svnadmin view this
at startup create and show the main frame of the application
public void set grocery dao grocery dao grocery dao logger trace setting grocery manager s grocery dao this grocery dao grocery dao
sets this objects code grocery dao code which is used to access
public void set external database external database ext db logger trace setting grocery manager s external database this ext db ext db
sets this objects code external database code which is used to access
public void store grocery grocery g logger trace grocery manager impl store grocery g if null g throw new illegal argument exception null not allowed for grocery argument ensure that quantity is always 0 if g get quantity 0 g set quantity 0 this grocery dao save grocery g
passes the code grocery code to this objects code grocery dao code
public void set row mapper parameterized row mapper grocery row mapper logger trace setting grocery dao s row mapper this row mapper row mapper
sets the code jdbc grocery dao code s code parameterized row mapper code
public grocery get grocery by id string id logger debug jdbc grocery dao get grocery by id id final set grocery matches get groceries grocery select by id id logger trace matches size matches in local db if matches size 1 final grocery grocery matches iterator next logger debug grocery found in local db grocery return grocery else if matches size 0 logger debug no grocery found in local db for id id return null else throw new duplicate database entry exception illegal database state more than one match for unique id id public grocery get grocery by id string
retrieves a code grocery code by ean from the local repository
protected string get property by key string key if key null return null string val props get property key if val null system err println key key resulted in empty string return new string return val
fetches a property
public string get password string prompt string ret try ret new password reader get password prompt catch ioexception e return null return ret
ask for a password
public string get string input string prompt string ret null try system out print prompt buffered reader reader new buffered reader new input stream reader system in ret reader read line catch ioexception e somthing went wrong report system out println failed to read input from standard input reason e get message return ret
ask for some input this differ from the password
private component create window contents throws guiexception this panel will hold all of the actual user interface components jpanel panel new jpanel new border layout panel set border new empty border 4 4 4 4 add the left navigation tree panel add create policy items tree border layout west editing area panel add create policy edit area border layout center return the interface setup return panel
set up all of the visible components of the user interface
private void config installation location set path to the algebra s components string sep system get property file separator installation location this get class get protection domain get code source get location get path two steps up is the parent directory for the algebra installation location installation location substring 0 installation location last index of sep
the method is a helper method to the constructor and sets the
public string get installation location return installation location
getter for the installation location member
protected string get plugin file name string plugin name throws controller exception plugin info info plugin info hash get plugin name if info null throw new controller exception no configuration for plugin plugin name return info file name
looks up the file name for a plugin
public void action performed action event e string cmd e get action command if exitcmd equals cmd this dispose clean up and close the current window system exit 0
method to implemnt to be an action listener
protected string get plugin class name string plugin name throws controller exception plugin info info plugin info hash get plugin name if info null throw new controller exception no configuration for plugin plugin name return info class name
looks up the class name for a plugin
public void add object policy object object type type object set add object object type hash put object type
add a object spcification to the policy
public string to string return super to string comment
custom string transformation method
public void add role role role role set add role
add a known role to this policy
public void add permission set type type permission set perm set type perm set hash put type perm set
this method adds a permission set to the policy for a specific
public policy object get object return object
getter method for the associated object
public mls level get level return level
accessor for the mls level
public string to string return super to string level
custom string transformation method
public boolean add permission p xxx add conflict resolution portion needs implementation of central algebra controller first if permissionlist contains p permissionlist add p return true return false
adds a permission to this permission set using the algebras conflict
public boolean add all collection extends permission c boolean changed false for permission p c changed changed this add p return changed
adds all permissions in the collection to this permissions set
public void clear permissionlist clear
empties the set
public boolean contains object o throws class cast exception permission p permission o for permission q permissionlist if p equals q return true return false
checks for membership of a permission in the set
public boolean contains all collection c throws class cast exception if this size c size return false collection permission pc collection permission c for permission p pc if contains p return false return true
checks if the supplied collection contains the exact same permissions
public boolean equals collection extends permission other if size other size return false same size and have all the specified elements equal return contains all other
check if another permission set is equals to this set
public int hash code int hash 5381 for permission p permissionlist string s p get name char a s to char array int i 0 for i a length i hash hash 5 hash a i hash 33 c return hash
return a hashcode for this set using all strings in the permissionset
public boolean is empty return permissionlist is empty
checks if this set is empty
public boolean remove object o return permissionlist remove o
removes the specified element from this set if it is present
public int compare to object other throws class cast exception if other instanceof named atom throw new class cast exception cannot convert a other get class to class named atom named atom n named atom other they are the exact same type of class if this get class other get class return this name compare to n name else the other object also inherits named atom but is not of the same class return something that is somewhat appropriate return 1
compares an instance of a named atom or sibling to aother object
public boolean remove all collection c throws class cast exception collection permission pc collection permission c return permissionlist remove all pc
removes the specified elements from this set if it is present
public int hash code int hash 5381 char a name to char array int i 0 for i a length i hash hash 5 hash a i hash 33 c return hash
return a hashcode for this atom using the name itself
public boolean retain all collection c throws class cast exception boolean changed false collection permission pc collection permission c for permission p pc if contains p remove p changed true return changed
removes any members of this set not present in the provided collection
public string to string return name type
custom string transformation method
public string to string string builder sb new string builder sb append sb append low sb append sb append high sb append sb append curr sb append sb append catset return sb to string
custom string transformation method
public boolean add policy p super add p latest p return true
add a new policy to the bag keeping a reference to the lastly
public int size return permissionlist size
provided the number of members currently in this set
public class find class string name throws class not found exception byte bytecode jar contents get name if bytecode null throw new class not found exception the class name was not found in the archive jar file name free some memory in the hashtable the class will later be handled as a part of the runtime system i e well known it is cached and can be found by the the load class method in the standard class loader jar contents remove name return define class name bytecode 0 bytecode length
finds and loads a class
protected creator packet get creator return creator
getter for the creator field
protected collection get file descs return file descs values
getter for the file descs field