input
stringlengths
10
828
output
stringlengths
5
107
public void add layout component string name component comp nothing to do
adds the specified component with the specified constraint
public void remove layout component component comp nothing to do
removes the specified component from the layout
public dimension preferred layout size container parent system out println preferred layout size return compute layout size parent hpad vpad
calculates the preferred size dimensions for the specified panel
public dimension minimum layout size container parent system out println minimum layout size return compute layout size parent 0 0
find the minimum dimension for the
public string get fnc name return fnc name
code get fnc name code get the name of the unresolvable function
public void program string expression throws parse exception string reader reader new string reader expression calculator parser parser new calculator parser reader execution tree parser expr
code program code program the code calculator code with the
public double evaluate throws evaluation exception number result number execution tree evaluate this return result double value
code evaluate code evaluate the programmed expression
public void clear memory variables clear
code clear memory code clear defined variables
public void define map variables variables put all variables
code define code use the supplied code map code of variable
protected object apply operator object l value object r value double a number l value double value double b number r value double value return new double math pow a b
describe code apply operator code method here
public void define string name object value variables put name value
code define code define the variable identified by
protected object apply operator object l value object r value double a number l value double value double b number r value double value return new double a b
code apply operator code divide the left and right hand values
public class set library class lib class oldlib mathlib mathlib lib return oldlib
code set library code set the library used in resolving
protected object apply operator object value double a number value double value return new double a
code apply operator code negate the value of this node
public object evaluate runtime environment env throws evaluation exception the resulting evaluated list will have the same number of items as this multi node so we can create it with the correct size for efficiency when we start adding items list l new array list this size iterate over all the nodes in this list and evaluate them add the resulting evaluated node to the return list iterator iterator this iterator while iterator has next node n node iterator next l add n evaluate env return l
code evaluate code evaluate all of the code node code s
public object evaluate runtime environment env return datatum
code evaluate code evaluate the value of this code node code
public object evaluate runtime environment env throws evaluation exception try return env resolve variable var name catch undefined variable exception uve throw new evaluation exception uve get message
code evaluate code resolve the variable with the
public convexity compare slopes point2 d p0 point2 d p1 point2 d p2 if p0 null p0 get x p1 get x p2 null p1 get x p2 get x throw new illegal argument exception points out of order else if p1 equals p0 p1 equals p2 return convexity flat else if p0 null p2 null return convexity convex double slope1 slope sense line get slope p0 p1 double slope2 slope sense line get slope p1 p2 return slope1 slope2 convexity concave slope1 slope2 convexity convex convexity flat
compares slope of p0 p1 to slope of p1 p2 and returns
public void debug boolean state m debug info state
change the debug state
public boolean close if m valid system out println disk close error attempt to close invalid disk return false m valid false try m in out device close catch exception e system out println disk close error could not close disk return false system out println disk close success closed disk return true
close the disk
public scrap element text super 0 0 build popup menu set foreground color black build font set visible true set opaque false set minimum size new dimension 120 72 set preferred size new dimension 120 72 g set rendering hint rendering hints key antialiasing rendering hints value antialias on set text test repaint
creates a new instance of scrap element text
public void set text string text this text text display text text split n build font bounds font get string bounds text g get font render context set size new dimension int bounds get width int bounds get height
setter for property text
public boolean is font bold return this font bold
getter for property bold
public void set font bold boolean font bold this font bold font bold build font
setter for property bold
public boolean is font italics return this font italics
getter for property itallics
public void set font italics boolean font italics this font italics font italics build font
setter for property itallics
public void set font size int font size this font size font size scale int 72 font size float 500 0 64 0 build font
setter for property font size
public void set font name string font name this font name font name build font
setter for property font name
public scrap element text preview super
creates a new instance of scrap element text preview
public void add news news story story story set id count id map put count story list news story list news get story get time if list null list new array list news story news put story get time list list add story count
add a piece of news to the ticker history
public void add data long time double point data put time point if point max data max data point if point min data min data point
add a piece of data to the ticker history
public ticker get sub ticker long start long end news corpus sub corpus corpus get sub corpus start end data history sub data new data history data history length for int i 0 i data history length i sub data i data history i get sub history start end return new ticker symbol search term sub corpus sub data
get a subsection of the ticker
public news story get news int id if id map null id map new hash map integer news story int i 0 for list news story stories news values for news story story stories id map put i story story set id i i return id map get id
get a news story by its id
public news corpus get sub corpus long start long end tree map long list news story sub map tree map long list news story news sub map start true end true news corpus sub corpus new news corpus collection list news story story lists sub map values for list news story story list story lists for news story story story list sub corpus add news story clone return sub corpus
get a subset of this news corpus
public double get data long time entry long double result get range time double range long x1 result 0 get key double y1 result 0 get value long x2 result 1 get key double y2 result 1 get value range x2 x1 if range 0 return y1 double position time x1 double proportion position range range y2 y1 return proportion range y1
determine the potentially interpolated data point of a given time
public double get data date date return get data date get time
determine the potentially interpolated data point of a given date
public double normalize data double data double diff data min data double range max data min data return diff range
normalize the data to be between the min and max
public news story clone return new news story time publication title summary content
return an identical news story
public void close client get connection manager shutdown
close the http connection manager to clear up resources
public data history get sub history long start long end tree map long double sub map tree map long double data sub map start true end true data history sub data new data history sub data add data sub map return sub data
get a subset of the data points
public void add interval interval type interval interval list add interval in sync false
add an interval object to the interval trees list
public void add interval long begin long end type data interval list add new interval type begin end data in sync false
add an interval object to the interval trees list
public void build if in sync head new interval node type interval list in sync true size interval list size
build the interval tree to reflect the list of intervals
private void create file sash form file sash form new sash form this swt none file sash form set orientation swt horizontal create file scrolled composite create main sash form int weithts 30 70 file sash form set weights weithts
this method initializes file sash form
private void initialize this set layout new fill layout xml text new editable styled text this swt full selection xml text add text listener new itext listener public void text changed text event textevent set changed
this method initializes this
private void create main sash form main sash form new sash form file sash form swt none main sash form set orientation swt vertical create edition composite create console composite int weithts 70 30 main sash form set weights weithts
this method initializes main sash form
private void create file group file group new group this swt none file group set layout new fill layout file group set text messages get string file explorer info create file scrolled composite
this method initializes file group
private void create file scrolled composite file explorer composite new file explorer composite file sash form swt none controller
this method initializes file scrolled composite
private void create edition composite edition composite new edition composite main sash form swt none
this method initializes edition composite
private void initialize this set layout new fill layout this set size new org eclipse swt graphics point 392 184 create schemas composite create menu
this method initializes this
private void create console composite console composite new console composite main sash form swt none
this method initializes task scrolled composite
private void create schemas composite schemas composite new composite this swt none create main sash form schemas composite set layout new grid layout
this method initializes schemas composite
private void initialize this set layout new grid layout this set size new point 800 300 create input group create option group
this method initializes this
private void create schema sash form schema sash form new sash form main sash form swt none create target schema group create source schema group
this method initializes schema sash form
private void create console group console group new group this swt none console group set layout new fill layout console group set text messages get string console composite console create console tab folder
this method initializes console group
private void create source schema composite source schema composite new scrolled composite source schema group swt none source schema composite set expand horizontal true source schema composite set expand vertical true create source tree source schema composite set content source tree source schema composite set layout new fill layout
this method initializes source schema composite
private void create target schema composite target schema composite new scrolled composite target schema group swt none target schema composite set layout new fill layout target schema composite set expand horizontal true create target tree target schema composite set expand vertical true target schema composite set content target tree
this method initializes target schema composite
private void create duplicates composite grid layout grid layout3 new grid layout grid layout3 num columns 2 grid layout3 vertical spacing 0 grid layout3 margin height 0 grid data grid data5 new grid data grid data5 grab excess horizontal space false grid data5 grab excess vertical space false grid data5 horizontal alignment org eclipse swt layout grid data center
this method initializes duplicates composite
private void create edition tab folder edition tab folder new ctab folder edition group swt border
this method initializes main tab folder
private void create value dependencies composite grid layout grid layout2 new grid layout grid layout2 num columns 2 grid layout2 vertical spacing 0 grid layout2 horizontal spacing 0 grid layout2 margin width 0 grid layout2 margin height 0 grid data grid data4 new grid data grid data4 grab excess horizontal space false grid data4 grab excess vertical space false grid data4 horizontal alignment org eclipse swt layout grid data center
this method initializes value dependencies composite
private void create main composite main composite new main composite shell swt none controller
this method initializes main tab folder
private void create edition group edition group new group this swt none edition group set text messages get string main frame files opened edition group set layout new fill layout create edition tab folder
this method initializes edition group
private void create main sash form grid data grid data2 new grid data grid data2 grab excess horizontal space true grid data2 horizontal alignment org eclipse swt layout grid data fill grid data2 vertical alignment org eclipse swt layout grid data fill grid data2 grab excess vertical space true main sash form new sash form schemas composite swt none main sash form set orientation org eclipse swt swt vertical create schema sash form main sash form set layout data grid data2 create correspondence group int weights 40 40 main sash form set weights weights
this method initializes main sash form
private void create source schema group source schema group new group schema sash form swt none source schema group set layout new fill layout source schema group set text messages get string schema composite source schema non nls 1 create source schema composite
this method initializes source schema group
private void create target schema group target schema group new group schema sash form swt none target schema group set text messages get string schema composite target schema non nls 1 target schema group set layout new fill layout create target schema composite
this method initializes target schema group
private void create correspondence group grid layout grid layout new grid layout grid layout vertical spacing 2 grid layout margin height 0 grid layout margin width 0 correspondence group new group main sash form swt none correspondence group set text messages get string schema composite mappings non nls 1 create correspondence table correspondence group set layout grid layout create buttons composite
this method initializes correspondence group
private void initialize this set layout new fill layout xsd text new editable styled text this swt h scroll
this method initializes this
public void write int int v throws ioexception out write v 0 0xff out write v 8 0xff out write v 16 0xff out write v 24 0xff inc count 4
writes an code int code to the underlying output stream as four
public void write uint long v throws ioexception out write int v 0 0xff out write int v 8 0xff out write int v 16 0xff out write int v 24 0xff inc count 4
writes an unsigned 32 bit integer value
public void write short int v throws ioexception out write int v 0 0xff out write int v 8 0xff inc count 2
writes a signed 16 bit integer value
public void clear count written 0
sets the value of the counter code written code to 0
public void set frame rate int new value if new value 0 throw new illegal argument exception frame duration must be greater 0 if state states started throw new illegal state exception frame duration must be set before the first frame is written this frame rate new value
sets the rate of video frames in time scale units
public void set video dimension int width int height if width 1 height 1 throw new illegal argument exception width and height must be greater zero this img width width this img height height
sets the dimension of the video track
private void ensure started throws ioexception if state states started creation time new date write prolog state states started
sets the state of the quick time outpu stream to started
public void write frame file file throws ioexception file input stream in null try in new file input stream file write frame in finally if in null in close
writes a frame from a file to the video track
public void finish throws ioexception ensure open if state states finished if img width 1 img height 1 throw new illegal state exception image width and height must be specified movi chunk finish write epilog state states finished img width img height 1
finishes writing the contents of the avi output stream without closing
public char to char switch this case private return case protected return case package return case public return return
returns char representaion of this access type
public void update observable o object arg if o equals retriever fire property change progress null arg
called when underlying units retriever notifies about progress of its job
public access type get access type return access type
returns access modifier of represented method
public void update observable o object arg if o instanceof file inspector int count integer arg set changed notify observers new progress data progress found read count count units clear changed
called by underlying file inspector when it reads a file
public void set access type access type access type this access type access type
sets access modifier of represented method
public void update observable o object arg fire property change progress null arg
called when underlying units retriever notifies about progress of its job
public boolean is static return static method
returns true if this represent a static method
public void set static boolean static method this static method static method
sets whether this represents a static method
public boolean is abstract return abstract method
returns true if this represent an abstract method
public void set abstract boolean abstract method this abstract method abstract method
sets whether this represents an abstract method
public boolean is static return static field
returns true if this represents a static field
public void set return type name string return type name this return type name return type name
sets name of return type of represented method
public void set static boolean static field this static field static field
sets whether this represents a static field
public boolean is final return final field
returns true if this represents a final field
public void set is final boolean is final this final field is final
sets whether this represents a final field
public void set arguments list string arguments this arguments arguments
sets list of represented methods arguments
public void add method method info method methods add method
adds a new method to represented class interface enum
public void add supertype string supertype name super types add supertype name
adds a new supertype to supertypes of represented class interface enum
public file inspector get inspector string file extension file inspector inspector inspectors get file extension return inspector null inspector null inspector
get a file inspector for given file
private void ignore method data input in throws ioexception in read int attribute reader ignore attributes in
reads method infos data ignoring it
private void update cache string file path string qualified name cache put if absent file path qualified name
utility method which updates files names cache if this is necessary
private boolean read trash data input in int tag throws ioexception switch tag case constant fieldref case constant methodref case constant interface methodref case constant integer case constant float case constant name and type in read int break case constant class case constant string in read short break case constant long case constant double in read long return true case constant utf8 in read utf break default break return false
helper function which reads uninteresting data from constant pool
public boolean is class return is class
returns true if this represents a class
public string read unit name data input in throws ioexception constant pool reader reader new constant pool reader if in read int 0x cafebabe return null major and minor version in read int constant pool count int data in read unsigned short read constant pool object pool new constant pool reader read in data access flags in read unsigned short this class index into constant pool data in read unsigned short pool data contains an index into pool at which is qualified name of the class in internal form having instead of return string pool integer pool data replace
returns qualified name of a class interface enum defined in a