input
stringlengths
10
828
output
stringlengths
5
107
public void test wrong type linker def linker def linker def create try linker def set classname net sf antcontrib cpptasks cctask catch class cast exception ex return fail should have thrown exception
tests if setting the classname to the name of a class that doesnt
public void test extends linker args linker def base linker new linker def linker argument linker arg new linker argument linker arg set value base base linker add configured linker arg linker arg linker def extended linker linker def create extended processor def base linker string pre args get pre arguments extended linker assert equals 1 pre args length assert equals base pre args 0
tests that linkerargs that appear in the base linker are effective when
public void test extends file set throws ioexception super test extends file set file create temp file cpptaskstest o
tests that filesets that appear in the base linker are effective when
public void test extends lib set linker def base linker new linker def library set libset new library set linker def extended linker linker def create extended processor def base linker libset set project base linker get project cutil string array builder libs new cutil string array builder advapi32 libset set libs libs base linker add libset libset command line linker configuration config command line linker configuration get configuration extended linker string libnames config get library names assert equals 1 libnames length assert equals advapi32 libnames 0
tests that libsets that appear in the base linker are effective when
public void test extends sys lib set linker def base linker new linker def system library set libset new system library set linker def extended linker linker def create extended processor def base linker libset set project base linker get project cutil string array builder libs new cutil string array builder advapi32 libset set libs libs base linker add syslibset libset command line linker configuration config command line linker configuration get configuration extended linker string libnames config get library names assert equals 1 libnames length assert equals advapi32 libnames 0
tests that syslibsets that appear in the base linker are effective when
public void test extends base linker def base linker new linker def base linker set base new flex long 10000 linker def extended linker linker def create extended processor def base linker set linker name extended linker msvc string pre args get pre arguments extended linker assert equals base 0x2710 pre args 2
tests that the base attribute in the base linker is effective when
public void test extends stack linker def base linker new linker def base linker set stack new flex integer 10000 linker def extended linker linker def create extended processor def base linker set linker name extended linker msvc string pre args get pre arguments extended linker assert equals stack 0x2710 pre args 2
tests that the stack attribute in the base linker is effective when
public void test contains value gpp assert true new linker enum contains value g
test checks that enumeration contains value g
public void test extends entry linker def base linker new linker def base linker set entry foo linker def extended linker linker def create extended processor def base linker string pre args get pre arguments extended linker assert equals e pre args 0 assert equals foo pre args 1
tests that the entry attribute in the base linker is effective when
protected processor def create return new compiler def
creates a new processor
public void test extends fixed linker def base linker new linker def base linker set fixed true linker def extended linker linker def create extended processor def base linker set linker name extended linker msvc string pre args get pre arguments extended linker assert equals fixed pre args 2
tests that the fixed attribute in the base linker is effective when
public void test extends incremental linker def base linker new linker def base linker set incremental true linker def extended linker linker def create extended processor def base linker set linker name extended linker msvc string pre args get pre arguments extended linker assert equals incremental yes pre args 1
tests that the incremental attribute in the base linker is effective when
public void visit final file base dir final string file name file names add file name base dirs add base dir
implementation of file visitor
public void test get active include paths project project new org apache tools ant project compiler def def new compiler def def set project project conditional path path def create include path path set location new file path set if debug evaluate without debug set string include paths def get active include paths assert equals 0 include paths length set the debug property project set property debug include paths def get active include paths assert equals 1 include paths length
this method tests compiler def
public string get file name final int index return string file names get index
get value of file name parameter for a specified index
public file get base dir final int index return file base dirs get index
get value of base dir parameter for the specified index
public int size return file names size
get count of calls to file visitor
public void test extends map linker def base linker new linker def base linker set map true linker def extended linker linker def create extended processor def base linker set linker name extended linker msvc string pre args get pre arguments extended linker assert equals map pre args 2
tests that the map attribute in the base linker is effective when
public void test get gcc compiler def compiler def compiler def create compiler def set classname net sf antcontrib cpptasks gcc gcc ccompiler compiler comp compiler compiler def get processor assert not null comp assert same gcc ccompiler get instance comp
tests that setting classname to the gcc compiler is effective
public void test extends rebuild test extends rebuild new linker def
tests that the rebuild attribute in the base linker is effective when
public void test get msvc compiler def compiler def compiler def create compiler def set classname net sf antcontrib cpptasks devstudio dev studio ccompiler compiler comp compiler compiler def get processor assert not null comp assert same dev studio ccompiler get instance comp
tests that setting classname to the msvc compiler is effective
public void test load openshore throws ioexception try copy resource to tmp dir files openshore history xml history xml cctask task new cctask string tmp dir system get property java io tmpdir target history table history new target history table task new file tmp dir finally delete tmp file history xml
tests loading a stock history file
public void test extends name linker def base linker new linker def set linker name base linker msvc linker def extended linker linker def create extended processor def base linker extended linker set base new flex long 10000 string pre args get pre arguments extended linker assert equals base 0x2710 pre args 2
tests that the name attribute in the base linker is effective when
public void test unknown class compiler def compiler def compiler def create try compiler def set classname net sf antcontrib cpptasks bogus bogus compiler catch build exception ex return fail exception not thrown
tests that setting classname to an bogus class name results in a
public void test load xerces throws ioexception try copy resource to tmp dir files xerces c history xml history xml cctask task new cctask string tmp dir system get property java io tmpdir target history table history new target history table task new file tmp dir finally delete tmp file history xml
tests loading a stock history file
public void test extends classname linker def base linker new linker def base linker set classname net sf antcontrib cpptasks devstudio dev studio linker linker def extended linker linker def create extended processor def base linker extended linker set base new flex long 10000 string pre args get pre arguments extended linker assert equals base 0x2710 pre args 2
tests that the classname attribute in the base linker is effective when
protected abstract processor create return meta object compiler get instance
creates compiler for inherited tests
public void test wrong type compiler def compiler def compiler def create try compiler def set classname net sf antcontrib cpptasks devstudio dev studio linker catch build exception ex return fail exception not thrown
test that setting classname to a class that doesnt support compiler
public void test has qobject1 throws ioexception char array reader reader new char array reader q object to char array boolean has qobject meta object parser has qobject reader assert true has qobject
test that the presence of q object causes has qobject to return true
public void test has qobject2 throws ioexception char array reader reader new char array reader q obj ect to char array boolean has qobject meta object parser has qobject reader assert false has qobject
test that the lack of q object causes has qobject to return false
public void test extends file set throws ioexception super test extends file set file create temp file cpptaskstest cpp
tests if a fileset enclosed in the base compiler definition is effective
public void test get fail on error cctask task new cctask boolean fail on error task get failonerror assert equals true fail on error
tests that the default value of failonerror is true
public void test extends rebuild test extends rebuild new compiler def
tests if the rebuild attribute of the base compiler definition is
public void test set fail on error cctask task new cctask task set failonerror false boolean fail on error task get failonerror assert equals false fail on error task set failonerror true fail on error task get failonerror assert equals true fail on error
tests that setting failonerror is effective
public void test antlib xml present throws ioexception input stream stream test cctask class get class loader get resource as stream net sf antcontrib cpptasks antlib xml if stream null stream close assert not null antlib xml missing stream
test checks for the presence of antlib
public void test extends compiler args compiler def base linker new compiler def compiler argument linker arg new compiler argument linker arg set value base base linker add configured compiler arg linker arg compiler def extended linker compiler def create extended processor def base linker string pre args get pre arguments extended linker assert equals 2 pre args length assert equals base pre args 0
tests that compilerargs contained in the base compiler definition are
public void test include throws ioexception char array reader reader new char array reader include foo inc nowhatever to char array fortran parser parser new fortran parser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo inc includes 0
checks parsing of include foo
public void test in cl ud e throws ioexception char array reader reader new char array reader in cl ud e foo inc to char array fortran parser parser new fortran parser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo inc includes 0
checks parsing of in cl ud e foo
public void test multiple in cl ud e throws ioexception char array reader reader new char array reader in cl ud e foo inc ninclude bar inc to char array fortran parser parser new fortran parser parser parse reader string includes parser get includes assert equals includes length 2 assert equals foo inc includes 0 assert equals bar inc includes 1
checks parsing of in cl ud e foo
public void test extends define set compiler def base compiler new compiler def define set def set new define set define argument define new define argument define set name foo define set value bar def set add define define base compiler add configured defineset def set compiler def extended compiler compiler def create extended processor def base compiler string pre args get pre arguments extended compiler assert equals 2 pre args length assert equals dfoo bar pre args 1
tests that definesets contained in the base compiler definition are
public void test immediate import bracket throws ioexception char array reader reader new char array reader import foo h nowhatever to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo h includes 0
checks parsing of include foo
public void test extends include path compiler def base compiler new compiler def compiler def extended compiler compiler def create extended processor def base compiler include path path base compiler create include path path set path tmp string pre args get pre arguments extended compiler assert equals 2 pre args length assert equals i pre args 1 substring 0 2
tests that includepaths contained in the base compiler definition are
public void test immediate import quote throws ioexception char array reader reader new char array reader import foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo h includes 0
checks parsing of import foo
public void test immediate include bracket throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo h includes 0
checks parsing of include foo
public void test extends sys include path compiler def base compiler new compiler def compiler def extended compiler compiler def create extended processor def base compiler system include path path base compiler create sys include path path set path tmp string pre args get pre arguments extended compiler assert equals 2 pre args length assert equals i pre args 1 substring 0 2
tests that sysincludepaths contained in the base compiler definition are
public void test immediate include quote throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 1 assert equals foo h includes 0
checks parsing of include foo
public void test incomplete immediate import bracket throws ioexception char array reader reader new char array reader import foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of import foo
public void test extends exceptions compiler def base compiler new compiler def base compiler set exceptions true compiler def extended compiler compiler def create extended processor def base compiler set compiler name extended compiler msvc string pre args get pre arguments extended compiler assert equals gx pre args 2
tests that the extend attribute of the base compiler definition is
public void test incomplete immediate import quote throws ioexception char array reader reader new char array reader import foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of import foo
public void test incomplete immediate include bracket throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of include foo
public void test extends multithreaded compiler def base compiler new compiler def base compiler set multithreaded false compiler def extended compiler compiler def create extended processor def base compiler set compiler name extended compiler msvc cctask cctask new cctask link type link type new link type link type set static runtime true command line compiler configuration config command line compiler configuration extended compiler create configuration cctask link type null null null string pre args config get pre arguments assert equals ml pre args 3
tests that the multithread attribute of the base compiler definition is
public void test incomplete immediate include quote throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of include foo
public void test no quote or bracket throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of include foo
public void test extends name compiler def base compiler new compiler def set compiler name base compiler msvc compiler def extended compiler compiler def create extended processor def base compiler extended compiler set exceptions true string pre args get pre arguments extended compiler assert equals gx pre args 2
tests that the name attribute in the base compiler is effective
public void test not first whitespace throws ioexception char array reader reader new char array reader include foo h to char array cparser parser new cparser parser parse reader string includes parser get includes assert equals includes length 0
checks parsing of include foo
public void test extends classname compiler def base compiler new compiler def base compiler set classname net sf antcontrib cpptasks devstudio dev studio ccompiler compiler def extended compiler compiler def create extended processor def base compiler extended compiler set exceptions true string pre args get pre arguments extended compiler assert equals gx pre args 2
tests that the classname attribute in the base compiler is effective
public boolean equals object o boolean result false if o instanceof runner entry runner entry other runner entry o result in file equals other get in file return result
in file is the key of a runner entry
private void update view2 model map integer new order view2model if new order length the model get row count new order new integer the model get row count model2view new int the model get row count for int i 0 i new order length i new order i new integer i arrays sort new order the comparator view2model new order for int i 0 i new order length i model2view new order i int value i update dirty false fire table changed new table model event the model 0 the model get row count 1
actualises the lookup tables and fires a table changed event
public void update properties properties new properties list properties to delete for iterator i new properties entry set iterator i has next map entry me map entry i next properties put me get key me get value if properties to delete null properties to delete size 0 for iterator i properties to delete iterator i has next properties remove i next store properties
updates user preferences with the given properties
public comparator get comparator map sort columns comparator comparators new comparator sort columns size boolean ascending order new boolean sort columns size for iterator i sort columns values iterator i has next sorting entry se sorting entry i next column order is 1 based due to display of the order position in the view comparators se sorting position 1 get comparator se get model index ascending order se sorting position 1 se get sorting direction sorting entry asc return new runner entries comparator comparators ascending order this
get a new compound comparator for columns and directions given in the map
public void set destdir file dest dir this dest dir dest dir
sets the destination directory
public void set platform string s throws exception int i 1 while i platform strings length if platform strings i equals ignore case s trim which platform i return throw new exception unknown platform s
p set which platform is being run optional p
public void set executable string s throws exception executable s
p set the executable to test p
public void add env environment variable var env add variable var
p mimic exec tasks add env p
public void set dir file s dir s
p set the working directory prior to call excecution p
public void set vmlauncher boolean la vm launcher la
sets a flag indicating if we want to launch new process with vm
public void set result property string result prop result property result prop
sets the name of a property in which the return code of the
public void set os string o os o
list of operating systems on which the command may be executed
public void set append boolean append do append append
sets whether output should be appended to or overwrite an existing file
public void set outputproperty string prop output prop prop
sets the property name whose value should be set to the output of
public void set timeout long value timeout value
timeout in milliseconds after which the process will be killed
public void set timeout integer value if value null timeout null else set timeout new long value int value
timeout in milliseconds after which the process will be killed
public void set fail if execution fails boolean flag fail if exec fails flag
sets a flag to stop the build if program cannot be started
public void mouse dragged int x int y int mouse x int mouse y if selected box null gui get gui status debug gui get debug gui status selected box move to mouse x mouse y int selected box z
this method also takes care of the the bounding area
private void handle calibration data byte data this x0 data 0 0x ff this y0 data 1 0x ff this z0 data 2 0x ff this x1 data 3 0x ff this y1 data 4 0x ff this z1 data 5 0x ff log write autocalibration successful
handles calibration data
private void handle raw data answer byte offset byte data string out string o this byte2hex offset string d this byte2hex data out read o 0 o 1 for int i 0 i d length i out d i log write out
handles a raw data answer it just prints it out
private void calibrate wii motion plus for int i 0 i this calibrationsequence size i this psi0 this calibrationsequence element at i 0 this theta0 this calibrationsequence element at i 1 this phi0 this calibrationsequence element at i 2 this psi0 this calibrationsequence size this theta0 this calibrationsequence size this phi0 this calibrationsequence size this wmpcalibrated true log write wii motion plus calibrated manually
build an average of the presaved rotation sequences to have a reference
private void handle acceleration data byte data convert to int int xraw data 0 0x ff int yraw data 1 0x ff int zraw data 2 0x ff calculate acceleration with calibration data double x double xraw x0 double x1 x0 double y double yraw y0 double y1 y0 double z double zraw z0 double z1 z0 this wiimote fire acceleration event new double x y z
handles the retrieved acceleration data and fires
private void handle button data byte data byte first byte data 0 0x ff byte second byte data 1 0x ff int newbuttons first 8 second int delta this buttonstate newbuttons xor int shift 0x0001 while shift 0x1000 if shift 0x0020 shift 0x0040 reserved bytes if delta shift shift change detected if newbuttons shift shift press detected this wiimote fire button pressed event shift else release detected this wiimote fire button released event shift shift 1 this buttonstate newbuttons
decodes the two bytes with the button press and release bits
protected void stop thread this running false
stops this thread
protected boolean is running return this running
true if thread is running
private void print bytes byte b string out string s this byte2hex b for int i 0 i s length i out s i log write out
prints a byte stream as hex string
protected string migrate identifier string name return name
migrates the name of an identifier
protected string migrate identifier string name return name to lower case replace all ae replace all ue replace all oe replace all ss return name replace all
migrates the name of an identifier
private method get migrate view to mysql info create migrate access table method method method new method null method set name migrate view to mysql method set module name migration access method set caption access default method set desc default method to migrate an access view to my sql method set source struct name db view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration mysql method set caption my sql default method set desc default method to migrate an my sql schema to my sql method set source struct name db mysql schema method set target package name db mysql method set rating 1 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method
private method get migrate table to mysql info create migrate oracle table method method method new method null method set name migrate table to mysql method set module name migration mysql method set caption my sql default method set desc default method to migrate an my sql table to my sql method set source struct name db mysql table method set target package name db mysql method set rating 1 add migrate table to mysql info parameters method return method
generates information about the oracle table to my sql migration method
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration mysql method set caption my sql default method set desc default method to migrate a my sql column to my sql method set source struct name db mysql column method set target package name db mysql method set rating 1 add migrate column to mysql info parameters method return method
generates information about the column to my sql migration method
private method get migrate view to mysql info create migrate oracle table method method method new method null method set name migrate view to mysql method set module name migration mysql method set caption my sql default method set desc default method to migrate a my sql view to my sql method set source struct name db mysql view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate routine to mysql info create migrate oracle table method method method new method null method set name migrate routine to mysql method set module name migration mysql method set caption my sql default method set desc default method to migrate an my sql routine to my sql method set source struct name db mysql routine method set target package name db mysql method set rating 1 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration mssql method set caption ms sql default method set desc default method to migrate an ms sql schema to my sql method set source struct name db mssql schema method set target package name db mysql method set rating 1 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method
private method get migrate table to mysql info create method description method method new method null method set name migrate table to mysql method set module name migration mssql method set caption ms sql default method set desc default method to migrate a ms sql table to my sql method set source struct name db mssql table method set target package name db mysql method set rating 1 add migrate table to mysql info parameters method return method
generates information about the table to my sql migration method
private method get migrate column to mysql info create method description method method new method null method set name migrate column to mysql method set module name migration mssql method set caption ms sql default method set desc default method to migrate a ms sql column to my sql method set source struct name db mssql column method set target package name db mysql method set rating 1 add migrate column to mysql info parameters method return method
generates information about the column to my sql migration method
private method get migrate view to mysql info create migrate oracle table method method method new method null method set name migrate view to mysql method set module name migration mssql method set caption ms sql default method set desc default method to migrate an ms sql view to my sql method set source struct name db mssql view method set target package name db mysql method set rating 1 add migrate view to mysql info parameters method return method
generates information about the view to my sql migration method
private method get migrate routine to mysql info create migrate oracle table method method method new method null method set name migrate routine to mysql method set module name migration mssql method set caption ms sql default method set desc default method to migrate an ms sql routine to my sql method set source struct name db mssql routine method set target package name db mysql method set rating 1 add migrate routine to mysql info parameters method return method
generates information about the view to my sql migration method
public void test call module function hello world string xml grt call module function java test module class hello world grt hash map result grt hash map grt get objects from grt xml xml assert assert null result get object error assert assert equals hello world result get object value
tests the call module function function by calling hello world
protected string migrate identifier string name return name to lower case
migrates the name of an identifier
public void test call module function upper case string test str this is a test of the upper case function string test param grt prepare grt xml grt get object as xml grt prepare grt xml header test str string xml grt call module function java test module class upper case ljava lang string test param grt hash map result grt hash map grt get objects from grt xml xml assert assert null result get object error assert assert equals result get object value test str to upper case
tests the call module function function by calling upper case with a
public void test concat strings string s1 hello string s2 world grt list param list new grt list param list add object s1 param list add object s2 string param xml grt prepare grt xml grt get object as xml grt prepare grt xml header param list string xml grt call module function java test module class concat strings ljava lang string ljava lang string param xml grt hash map result grt hash map grt get objects from grt xml xml assert assert null result get object error assert assert equals result get object value s1 s2
tests the call module function function by calling concat strings
private method get migrate schema to mysql info create method description method method new method null method set name migrate schema to mysql method set module name migration maxdb method set caption max db default method set desc default method to migrate an max db schema to my sql method set source struct name db maxdb schema method set target package name db mysql method set rating 1 add migrate schema to mysql info parameters method return method
generates information about the schema to my sql migration method