input
stringlengths
10
828
output
stringlengths
5
107
public void fetch string id throws exception kkloud file stream kfs tittnuder create proxy id fetch kfs get
fetches a given file from an id
public void fetch string folder string id throws exception string path for int i 0 i id length i path id i kkloud instance stream proxy tittnuder create proxy id 0 fetch folder proxy get path
fetches a given file from a kkloud
public void get all files string id kkloud instance proxy titt create proxy kkloud manager monitor id string folder id for string s proxy get list of files try fetch folder id s catch exception e e print stack trace
download all files from a given kkloud
public void ejb post create user data u d throws javax ejb create exception todo auto generated method stub
post create method
public void ejb post create user data u data throws javax ejb create exception todo auto generated method stub
post create method
public void reset errs set err false set user name err set pass err set user name err
resets all errors met during filling this form
public void reset errs set err false set user name err set login err set pass err set user name err
resets all errors and warnings
public user data get user by login string user login throws remote exception lookup configuration bean configuration configuration bean create configuration bean return configuration bean get user by login user login
returns users personal data user data object of user with login user login
public settings data get user settings by login string user login throws remote exception lookup configuration bean configuration configuration bean create configuration bean return configuration bean get user settings by login user login
returns users settings settings data object of user with login user login
public user data get change profile user data user data throws remote exception lookup configuration bean configuration configuration bean create configuration bean return configuration bean change profile user data
changes users personal data
private void lookup address book bean try context context new initial context object ref context lookup ejb address book address home address book home portable remote object narrow ref address book home class catch exception e system out println lookup of address bean failed
the method gains access to session bean address book bean by looking it
public settings data get change settings settings data settings data throws remote exception lookup configuration bean configuration configuration bean create configuration bean return configuration bean change settings settings data
changes user mail accounts settings data
public abstract collection get folder names string username string password throws remote exception lookup mail bean mail bean create mail bean todo parametry sa dawane na chama system out println called get folder names username password return bean get folder names pop3user pop3passwd
method gets names of folders existing in certain users account
public void ejb create try no implementation is necessary for this mdb an mdb does not carry state for an individual client however you can retrieve state for use across many calls for multiple clients state such as an entity bean reference or a database connection if so retrieve these within the ejb create and remove them in the ejb remove method catch exception e
default create method
private user data package data user entity u e try return new user data u e get login u e get password u e get name u e get family name u e get address u e get postal code u e get city u e get phone u e get mobile u e get birth date u e get gg number u e get interests u e get job catch exception e return null
casts data in user entity on user data object
public void ejb post create throws javax ejb create exception todo auto generated method stub
post create method
private void initialize label new label label set bounds new rectangle 53 66 196 62 label set text report already exists overwrite this set layout null this set size 300 200 this set title problem this set resizable false this set modal true this set location new point 400 300 this add get save button1 null this add get save button null this add label null
this method initializes this
private button get save button if save button null save button new button save button set label no save button set bounds new rectangle 209 150 41 23 save button add action listener new java awt event action listener public void action performed java awt event action event e set visible false return save button
this method initializes save button
private button get save button1 if save button1 null save button1 new button save button1 set bounds new rectangle 52 149 41 23 save button1 set label yes save button1 add action listener new java awt event action listener public void action performed java awt event action event e overwrite true set visible false return save button1
this method initializes save button1
private void initialize this set size 300 200 this set title reports this set resizable false this set modal true this set location new point 400 300 this set content pane get jcontent pane
this method initializes this
private jpanel get jcontent pane if j content pane null label new label label set bounds new rectangle 53 13 185 28 label set text choose report j content pane new jpanel j content pane set layout null j content pane set preferred size new dimension 123 34 j content pane add label null j content pane add get report choice null j content pane add get cancel button null j content pane add get ok button1 null return j content pane
this method initializes j content pane
private void initialize file new label file set bounds new rectangle 16 87 73 20 file set alignment label right file set text file this set layout null this set size 300 199 this set title save as this set location new point 400 300 this set resizable false this set modal true this add get file name null this add get save button null this add get cancel button null this add file null
this method initializes this
private choice get report choice if report choice null report choice new choice report choice set bounds new rectangle 38 78 181 21 return report choice
this method initializes report choice
private text field get file name if file name null file name new text field file name set bounds new rectangle 108 87 174 22 return file name
this method initializes file name
private button get cancel button if cancel button null cancel button new button cancel button set bounds new rectangle 41 119 79 31 cancel button set label cancel cancel button add action listener new java awt event action listener public void action performed java awt event action event e set visible false return cancel button
this method initializes cancel button
private button get ok button1 if ok button1 null ok button1 new button ok button1 set bounds new rectangle 170 118 79 30 ok button1 set label ok ok button1 add action listener new java awt event action listener public void action performed java awt event action event e system out println ok selected get report choice get selected item system out println selected w dialog selected set visible false return ok button1
this method initializes ok button1
private button get cancel button if cancel button null cancel button new button cancel button set bounds new rectangle 187 142 94 29 cancel button set label cancel cancel button add action listener new java awt event action listener public void action performed java awt event action event e set visible false return cancel button
this method initializes cancel button
private user data package data user entity u e try return new user data u e get login u e get password u e get name u e get family name u e get address u e get pcode u e get city u e get phone u e get mobile u e get birth date u e get gg number u e get interests u e get job catch exception e return null
casts data in user entity on user data object
private settings data package settings data user entity u e try boolean mh new boolean 9 mh 0 u e get mh0 mh 1 u e get mh1 mh 2 u e get mh2 mh 3 u e get mh3 mh 4 u e get mh4 mh 5 u e get mh5 mh 6 u e get mh6 mh 7 u e get mh7 mh 8 u e get mh8 return new settings data u e get mails per site mh u e get from field u e get login catch exception e return null
casts data in user entity on settings data object
public long get max counter return max counter
return the max number of clock ticks
public void set max counter long max counter this max counter max counter
set the max counter for the clock
public void start init after init call clock started fire clock started event
start the clock
private void init create the timer and schedule the clock timer new timer schedule ata fixed period of times timer task task new timer task public void run if paused if event counter max counter if the counter has exceeded decrement and call stop event counter stop else fire event before increment counter fire clock changed event event counter timer schedule at fixed rate task 0 period return the clock to zero otherwise continue counting if paused event counter 0 event stoped false
inits the timer on start or on resume
public void pause finish current schedule timer cancel put in pause state paused true fire clock paused event
interrupts the clock counting
public void resume a new timer is required because the period can be changed while is pause state init make thread available paused false after init call clock resumed fire clock resumed event
resume the clock execution
public void stop finish all thread if timer null timer cancel timer null paused false event stoped true fire clock stoped event
stop the clock
public void set clock clock clock if this clock null this clock remove clock listener this this clock clock this clock add clock listener this j spinner clock set value new long clock get period
sets a clock to adjust visually
public void start document throws exception doesn t matter
p fired when a document starts
public void end document throws exception doesn t matter
p fired when a document ends
public void start element string name list mzsquash saxattribute attributes throws exception string buffer b new string buffer b append name for mzsquash saxattribute a attributes b append a get name a get value b append system out println b to string
p fired when an elements opening tag is read
public void binary char characters throws exception current binary size characters length
p fired when some character read from binary tags
public void add to buffer string str this buffer append str
p add to buffered content
public void set new encoded length long len this len len
p set the new encoded length of the base 64 encoded spectrum
public string get buffer if this len 1 string regex encoded length d string replace with encoded length len system out println debug regex to replace regex with replace with return this buffer to string replace first regex replace with return this buffer to string
p return the entire spectra starting with the binary data array
private long to long string rawvalue string value rawvalue if rawvalue to upper case ends with l value rawvalue substring 0 rawvalue length 1 if value starts with 0x hexdecimal return long parse long value substring 2 16 else if value starts with 0 value length 1 octal return long parse long value substring 1 8 decimal return long parse long remove parenthesis value
convert to long from decimal octal and hexdecimal format
private boolean not long actual long expected string a byte util to binary string actual string e byte util to binary string expected reverse the bits of the expected value char r new char e length for int i 0 i r length i r i e char at i 0 1 0 string er string value of r return a equals er
the value specified after is negated before tested
private long to integer number byte order order byte b int len b length switch len case 1 return b 0 case 2 return byte util to unsigned byte util to short order b case 4 return byte util to unsigned byte util to int order b case 8 return byte util to long order b default throw new illegal argument exception invalid length len
return the byte array as unsigned integer number
private double to decimal number byte order order byte b int len b length switch len case 4 return byte util to float order b case 8 return byte util to double order b default throw new illegal argument exception invalid length len
return the byte array as decimal number
private date to date byte order order byte b int len b length switch len case 4 return new date byte util to int order b 1000 l case 8 return new date byte util to long order b 1000 l default throw new illegal argument exception invalid length len
return the byte array as date
private double to double string value return double parse double remove parenthesis value
convert to double from decimal octal and hexdecimal format
private void initialize this set size 565 368 this set content pane get jcontent pane this set jmenu bar get jjmenu bar this set title query tool
this method initializes this
private jpanel build results panel this results panel new jpanel this results panel set layout new border layout return this results panel
creates a jpanel
private jpanel build tree panel jtree tree new javax swing jtree new inode model this database info tool tip manager shared instance register component tree tree set cell renderer new database info renderer jscroll pane pane new jscroll pane tree jpanel panel new jpanel panel set layout new border layout panel add this build tree tool bar border layout north panel add pane border layout center return panel
build the tree witch contais all the database information
private jtool bar build tree tool bar jtool bar tool bar new jtool bar tool bar set floatable false tool bar put client property jtool bar is rollover boolean true abstract button button tool bar add box create glue tool bar add create tool bar button images refresh gif return tool bar
build the trees toolbar
private jtool bar build tree tool bar jtool bar tool bar new jtool bar tool bar set floatable false tool bar put client property jtool bar is rollover boolean true abstract button button guiutils create tool bar button images bar mode png button add action listener this button set action command code this code button button tool bar add box create glue tool bar add button tool bar add guiutils create tool bar button images refresh gif return tool bar
build the trees toolbar
public jpanel get animation panel this animation create animation jpanel panel new jpanel null panel set bounds 0 0 400 80 panel set background color white panel set preferred size new dimension 500 80 panel add label1 panel add label2 return panel
builds this panel with two overlayed labels in the center
private animation create animation animation marcelo basic text animation default fade label1 2500 marcelo paes color dark gray animation fil basic text animation default fade label1 3000 felipe rocha color dark gray animation sara basic text animation default fade label2 3000 sara db color blue animation sequence animations sequential new animation animations pause 1000 marcelo animations pause 1000 fil animations pause 1000 sara animations repeat 0 marcelo return sequence
creates and answers a composed animation for the intro
private void build ui this set size new dimension 800 600 this set title query tool jsplit pane pane vertical new jsplit pane pane vertical set orientation jsplit pane vertical split pane vertical set top component this build query text panel pane vertical set divider location 100 pane vertical set bottom component this build results panel this add pane vertical border layout center
build the entire ui
public int get id if hash contains key id integer i integer hash get id return i int value else return 1
returns the id of the newly reported
public string get version if hash contains key version return string hash get version else return
returns a code string code representing the bugzilla software version
public int get comment id if hash contains key id integer i integer hash get id return i int value else return 1
returns the id of the newly appended comment
public void add query param search limiter limit object query params put limit get name query
add an additional search limit to the
public priority get priority string p string internal state get priority try int level integer value of p substring 1 2 switch level case 1 return priority p1 case 2 return priority p2 case 3 return priority p3 case 4 return priority p4 case 5 return priority p5 default return priority p3 catch exception e return priority p3
returns how highly this bug is ranked
public void connect to string host throws connection exception connect to host null null
use this method to designate a host to connect to
public int get id return integer internal state get id
returns the internal bugzilla id number for this bug
public void connect to final string host final string http user final string http passwd throws connection exception string new host host if new host ends with xmlrpc cgi if new host ends with new host xmlrpc cgi else new host xmlrpc cgi url host url try host url new url new host catch malformed urlexception e logger error url parameter for host is improperly formed cannot connect e throw new connection exception host url is malformed url supplied was new host e connect to host url http user http passwd
use this method to designate a host to connect to
private void get cookies urlconnection conn if cookies size 0 map string list string headers conn get header fields if headers contains key set cookie avoid npe list string vals headers get set cookie for string str vals cookies add str
retrieves cookie values from the http header of bugzilla responses
public void add query param extended search limiter limit object query get parameter map put limit get name query
add an additional search limit to the
private void remove unnecessary statements model model model remove all model create resource http thewebsemantic com javaclass null null model remove all null model create property http thewebsemantic com javaclass null model remove all null rdf type model create resource http www w3 org 2000 01 rdf schema class
remove some extra stuff jenabean puts in the model that we dont want
public void draw itree element elem int x int y hash map integer boolean tmp if tmp hash map integer boolean conflicts get new integer x null conflicts put new integer x tmp new hash map integer boolean tmp put new integer y new boolean true else if tmp get new integer y null tmp put new integer y new boolean true else print conflict at elem x y
remember blocked x y values output conflicting elements
public void print conflict at itree element elem int x int y if first false first true system out println conflicts system out println system out print conflict at x x y y if elem instanceof irevision irevision rev irevision elem system out println rev get revision else ibranch b ibranch elem system out println b get name
all output is handled here
public void revision selected irevision revision int state mask irevision prev revision irevision selection get last selected element reset selected change selection if state mask swt shift swt ctrl add range prev revision revision else if state mask swt ctrl add revision revision else if state mask swt shift set range prev revision revision else selection set selected element revision set selected
changes the selection based on the revision and modifier keys
protected void create image descriptor string id url url file locator find plugin get bundle new path icon path id null image descriptor desc image descriptor create from url url image descriptors put id desc
creates an image and places it in the image registry
public void branch selected list irevision revisions int state mask reset selected clear selection if ctrl modifier wasn t pressed if state mask swt ctrl selection clear for iterator irevision iter revisions iterator iter has next irevision selected irevision iter next add revision selected set selected
changes the selection based on the revisions and modifier keys
private void set range irevision prev revision irevision revision irevision source check if revisions on path prev revision revision if source null selection clear irevision target if prev revision source target revision else target prev revision select range source target
clears any current selection and sets the given selection
private void add range irevision prev revision irevision revision irevision source check if revisions on path prev revision revision if source null irevision target if prev revision source target revision else target prev revision select range source target
adds the given range to the selection
private void select range irevision source irevision target itree element current source do if current instanceof irevision selection add selected element irevision current current current get parent while current target selection add selected element target target set selected true
sets all revisions in the range inculind source and target to
private void add revision irevision revision if selection contains revision selection remove selected element revision else selection add selected element revision
adds the given revision to the selection
private void initialize images version tree plugin plugin version tree plugin get default version image plugin get image descriptor version tree plugin img branch create image
initializes the version image
private irevision check if revisions on path irevision r1 irevision r2 irevision newest irevision target if r1 compare to r2 0 newest r1 target r2 else if r1 compare to r2 0 newest r2 target r1 else return null itree element current newest do if current equals target return newest current current get parent while current null return null
checks if there is a path from the newer revision to the older
public void clear selection reset selected selection clear
clears the current selection without setting the state of the
public istructured selection get structured selection array list ilog entry logs new array list ilog entry iterator irevision iter selection iterator int idx 0 while iter has next irevision element irevision iter next ilog entry log element get log entry if log is deletion logs add log idx return new structured selection logs to array
returns the current selection
public void set branch data ibranch branch data this branch data branch data set tool tip text branch data get name redraw
sets the given branch data
public ibranch get branch data return branch data
returns the branch data
private void set selected iterator irevision iter selection iterator while iter has next irevision element irevision iter next element set selected true
sets the state of all selected revisions to selected
private void initialize defaults get preference store
sets the default values of the preferences
private void reset selected iterator irevision iter selection iterator while iter has next irevision element irevision iter next element set selected false
sets the state of all selected revisions to unselected
public iselection get selection return get structured selection
returns the current selection
private void initialize images cvsuiplugin plugin cvsuiplugin get plugin version image plugin get image descriptor icvsuiconstants img project version create image string xposition version image get bounds width 2 inset
initializes the version image
public void load defaults selected layout version tree plugin get default get preference store get int version tree plugin p default algorithm draw empty branches version tree plugin get default get preference store get boolean version tree plugin p default empty branches draw nabranches version tree plugin get default get preference store get boolean version tree plugin p default na branches direction version tree plugin get default get preference store get int version tree plugin p default direction
loads the default configuration from the preference store
public ilayout get layout algorithm return layout algorithms selected layout
returns the current layout algorithm
public boolean is layout selected int layout return selected layout layout
returns true if the given layout is selected
public void set layout algorithm int layout selected layout layout
sets the layout algorithm
public string get revision return revision data get revision
returns the revision number as a string
public boolean draw empty branches return draw empty branches
returns true if empty branches should be drawn
private string get revision string string revision number revision data get revision if revision data get state irevision state current 0 revision number revision number non nls 1 if revision data get log entry is deletion revision number revision data get log entry get state return revision number
returns the revision as a string
public void set draw empty branches boolean b draw empty branches b
toggles visiblity of empty branches
public boolean draw nabranches return draw nabranches
returns true if empty branches should be drawn
public irevision get revision data return revision data
returns the revision data
public void set draw nabranches boolean b draw nabranches b
toggles visiblity of empty branches