input
stringlengths
10
828
output
stringlengths
5
107
public void map int start int end char strand double weight throws illegal argument exception this record null if this greatest index start this greatest index start if this greatest index end this greatest index end if strand increment count start end this positive strand weight system err println this positive strand to string else if strand increment count start end this negative strand weight else throw new illegal argument exception undefined strand strand
map adds the mapped position mp to the histogram record
private boolean upstream gene scored region record s1 scored region record s2 if s1 get strand s2 get strand s1 get start s2 get start return true if s1 get strand s2 get strand s1 get start s2 get start return true return false
assumes s1 and s2 are coding sequences
private void increment count int start int end hash map hm double weight this reads added double tmp 0 int temp 0 if end start temp end end start start temp for int i start i end i this bp added if hm contains key i true tmp double hm get i else tmp 0 0 double next if this mapmax integer min value if tmp this mapmax next this mapmax else next tmp weight else next tmp weight system err println i tmp next hm put i next return
add a weight to all values in the histogram over a range
public double score region int start int end char strand double total 0 0 for int i start i end i if strand strand total total double this positive strand get i if strand strand total total double this negative strand get i return total
calculates a weight to all values in the histogram over a range
public double get weight double score 0 mat 1 mis 0 if query sequence null parse mat this query sequence length this mismatches match score mis this mismatches this mismatch score score mat mis return score
get weight aproximates an alignment score by returning matches read length
private double match score 1 0 public void set match score double m this match score m
following scores are for generating an alignment based score
public xmlgregorian calendar get status date return status date
gets the value of the status date property
public void set status date xmlgregorian calendar value this status date value
sets the value of the status date property
public scored region record max gap scored region record s this features get last if s is type this type gap token return s else return null for int i this features size 1 i 0 i scored region record s this features get i if s is type type gap token true return s return null
assuming genome is from left to right
public scored region record min gap scored region record s this features get first if s is type this type gap token return s else return null for int i 0 i this features size i scored region record s this features get i if s is type type gap token true return s return null
assuming genome is from left to right
public void set source object source throws illegal argument exception this source records source if source
to set the source of this filter
public void reset source throws illegal argument exception this source reset source
to reset the source of this filter
public record get original record return this original record
return the original record
public record get transformed record return this transformed record
return the transformed record
public void track original records boolean track original records this track original records track original records
to indicate to the records filter that original records should be tracked
public void track transformed records boolean track transformed records this track transformed records track transformed records
to indicate to the records filter that transformed records should be tracked
public record get record throws invalid record exception this transformed record null if this output queue is empty if eof this original record source get record if this original record null if track original records this original records add this original record this transformed record this transform record this original record if track transformed records this transformed records add this transformed record end if this original record not null end if not eof else this transformed record record output queue remove first if track transformed records this transformed records add this transformed record return this transformed record
to get the original record maintain the original records and transfomred
public boolean eof return this source eof this output queue is empty
to indicate whether all records have been processed and returned by this filter
public double get average neg over region return average neg over region
begin geters and setters for the scoring regions
private void map stack histogram record hr if this previous positions null return for int i 0 i this previous positions size i mapped position mp mapped position this previous positions get i system err println mapping mp get start mp get end mp get strand hr map mp get start mp get end mp get strand this weight mp
maps a stack of mapped positions e
public record get record throws invalid record exception this transformed record null if eof this original record source get record if this original record null if track original records this original records add this original record this transformed record this transform record this original record if track transformed records this transformed records add this transformed record return this transformed record
this method gets a record from the source passes it to transform record
public boolean eof return source eof
to indicate whether all records have been processed and returned by this filter
public void set request num int request num this request num request num
sets the number of records that is retreived from the source before calling
public record get record throws invalid record exception if filters is empty here we have a source an no filter so just return the source return this source get record records filter filter records filter filters get last original record filter get record if original record null return null transformed record this transform record original record return transformed record
to get a record from the pipeline
protected record transform record record r throws invalid record exception return r
provide a hook for additional transformation logic
public boolean eof records filter filter records filter filters get last if filter null return true else return filter eof
pipeline is done when the last filter in the pipeline is at eof
public void add filter records filter filter logger log level info adding filter filter get class get name try logger log level info setting filter source if filters is empty filter set source this source else filter set source filters get last catch illegal argument exception ire logger log level severe invalid record exception in add filter of composite filter ire to string filters add filter
add a filter to the list of filters
public void test existe cedula system out println existe cedula string cedula cedula referencia rnlservice handler instance new rnlservice handler boolean exp result true boolean result instance existe cedula cedula assert equals exp result result
test of existe cedula method of class rnlservice handler
public void test existe serial motor system out println existe serial motor string serial serial referencia rnlservice handler instance new rnlservice handler boolean exp result true boolean result instance existe serial motor serial assert equals exp result result
test of existe serial motor method of class rnlservice handler
public void test tiene procesos judiciales system out println tiene procesos judiciales string identificacion identificacion referencia rnlservice handler instance new rnlservice handler boolean exp result false boolean result instance tiene procesos judiciales identificacion assert equals exp result result
test of tiene procesos judiciales method of class rnlservice handler
protected base request bean get request bean1 return base request bean get bean request bean1
p return a reference to the scoped data bean
protected base application bean get application bean1 return base application bean get bean application bean1
p return a reference to the scoped data bean
protected base request bean get base request beanget base request bean return base request bean get bean base request bean
p return a reference to the scoped data bean
protected base application bean get base application beanget base application bean return base application bean get bean base application bean
p return a reference to the scoped data bean
protected base session bean get base session beanget base session bean return base session bean get bean base session bean
p return a reference to the scoped data bean
protected base application bean get base application bean return base application bean get bean base application bean
p return a reference to the scoped data bean
protected base session bean get base session bean return base session bean get bean base session bean
p return a reference to the scoped data bean
protected base request bean get base request bean return base request bean get bean base request bean
p return a reference to the scoped data bean
protected registro nacional conductores session get session bean1 return registro nacional conductores session get bean base session bean
p return a reference to the scoped data bean
public prepared statement prepare statement string sql str throws sqlexception prepared statement pstmt null null if conn null return pstmt pstmt conn prepare statement sql str return pstmt
prepare statement sql
public int read byte buf int off int len throws ioexception if buf length len off 1 throw new ioexception the input buffer is too small len bytes requested starting at offset off while the buffer is only buf length bytes long this could of course be optimized int i for i 0 i len i int x read if x 1 i 0 an immediate 1 returns 1 return 1 else if x 1 a later 1 returns the chars read so far break buf off i byte x return i
reads decoded data into an array of bytes and returns the actual number
public void write byte buf int off int len throws ioexception this could of course be optimized for int i 0 i len i write buf off i
writes the given byte array to the output stream in an encoded form
public void close throws ioexception handle leftover bytes if char count 3 1 one leftover int lookup carry over 4 63 out write chars lookup out write out write else if char count 3 2 two leftovers int lookup carry over 2 63 out write chars lookup out write super close
closes the stream this must be called to ensure proper padding is
public void set index pages int index pages this index pages index pages
this method should be invoked before set total and set cur page
public void set total int total this total total this total pages this total 1 this page size 1
this method had better be invoked before set cur page
public void test shuffle cards pack pack new cards pack pack shuffle card card1 pack get next card pack new cards pack pack shuffle card card2 pack get next card cards pack test logger info card1 to string vs card2 to string assert assert true same card card1 to string equals card2 to string
test method for
public string to string final string tab string ret value ret value page video search bean super to string tab error this error tab title this title tab name category this name category tab date add from this date add from tab date add to this date add to tab date create from this date create from tab date create to this date create to tab list category video this list category video tab list videos this list videos tab return ret value
constructs a code string code with all attributes in name value
public string to string final string tab string ret value ret value page user search bean super to string tab error this error tab nick this nick tab name this name tab surname this surname tab sex this sex tab age from this age from tab age to this age to tab return ret value
constructs a code string code with all attributes in name value
public string ident return t num
returns recommended identifier
private void perform final string class name parm com ca apps debugdev javap test test1 main class this env set show verbose true this env set show disassembled true this env set show line and local true system out println testing class name parm final input stream input thread current thread get context class loader get resource as stream class name parm system out println input input if input null throw new illegal state exception invalid class resource classname class name parm display results input
process the arguments and perform the desired action
public void print constant value field data field out print constant value int cpx field get constant value index byte tag 0 try tag cls get tag cpx catch index out of bounds exception e out print error return switch tag case runtime constants constant method case runtime constants constant interfacemethod case runtime constants constant field cpx2 x cpx2 cls get cpool entry cpx if x cpx1 cls getthis cpx don t print class part for local references cpx x cpx2 out print cls tag string tag cls string value cpx
print constant value attribute information
public boolean is static if access runtime constants acc static 0 return true return false
return true if method is static
public vector get code attributes return code attrs
return code attributes
public input stream resolvefilename string name string classname name replace class while true input stream instream ext dirflag resolve exdir filename classname resolveclasspath classname if instream null return instream int lastindex classname last index of if lastindex 1 return null classname classname substring 0 lastindex classname substring lastindex 1
resolves file name for classfile to disassemble
public string get short class name int cpx string classname java name get class name cpx pkg prefix len classname last index of 1 if pkg prefix len 0 pkg prefix classname substring 0 pkg prefix len if classname starts with pkg prefix return classname substring pkg prefix len return classname
returns unqualified class name
public string report output string buffer for int i 0 i report data length i report data i new simple report bean return null
build the report output
public string get module name return org berlin octanewars ui octanewars junit
must refer to a valid module that sources this class
protected double change difference bonus double a max fitness int a change difference if a change difference 0 return a max fitness else we arbitrarily work with half of the maximum fitness as basis for non optimal solutions concerning change difference if a change difference a change difference a max fitness 2 return 0 0d else return a max fitness 2 a change difference a change difference
bonus calculation of fitness value
public void destroy log info entering jython plug in destroy put hibernate cleanup code here log info exiting jython plug in destroy
this method will be called at the time of application shutdown
public static void main final string args throws exception system out println running read class cg new read class print writer pw new print writer system out true class c class for name org botnode asm read class read a class and then write the data to system out class reader cr new class reader org botnode asm read class class writer cw new class writer cr 0 class visitor tcv new trace class visitor cw pw class adapter cv new class adapter tcv cr accept cv 0 cw to byte array
read a class from the classpath and then print with the following structure
public object eval object x return eval x this global environment
eval in the global environment
public object lookup string symbol object o this map data vars get symbol if o null return o else return scheme util error unbound variable symbol
find the value of a symbol in this environment or a parent
public object define object var object val this map data vars put var val if val instanceof procedure procedure val get name equals procedure default name procedure val set name var to string return var
add a new variable value pair to this environment
public object read try object token next token if token return read tail else if token system out println warn extra ignored return read else return token end of the if else catch ioexception e system out println warn on input exception e return eof end try catch
read and return a scheme expression or eof
private void build generic token final int o ch throws ioexception int ch o ch do build alpha numeric atom symbol characters tokens into the buffer buff append char ch ch input reader read while character is whitespace char ch ch 1 ch tok left paren ch tok right paren ch tok single quot ch tok semicolon ch tok double quot ch tok comma ch tok back quot end of do while push a language token onto the character stack char stack push new character char ch
collect the set of characters from the input stream until whitespace or
public linked list insert head final node node node set next head head node return this
add a new node and replace the root node with the new one
public double num compute final char operation double result 0 0 if operation operation result 0 0 else if operation operation result 1 0 else throw new runtime exception invalid operation try for node node this get head node null node node get next double d new double string node get data double x d double value switch operation case result x break case result x break case result x break case result x break default throw new runtime exception invalid operation try return result
perform an arithmetic operation on the list
public string to string return scheme util stringify this
return a string representation of the pair
public void calculate fitness for all final list genome genes for genome lg genes lg calculate fitness
method calculate fitness for all
public void check for undefined fitness final genome g if double is na n g current fitness g current fitness 0 01f
method check for undefined fitness
public void set crossover point int crossover point this crossover point crossover point
set the cross over point
public string param string return param string
returns a parameter string identifying this action event
public grid bag constraints shift right constraints gridx constraints gridx 1 return constraints
move the position right
public jcomponent get component return this text area
method get component
public grid bag constraints shift down constraints gridy constraints gridy 1 return constraints
move the position down
public string get text synchronized this text area return this text area get text
returns the text contained in this code text component code
public void set text string text synchronized this text area this text area set text text
sets the text of this code text component code
public void set columns and rows final int cols final int rows this text area set columns cols this text area set rows rows
method set columns and rows
public void set text final string text this button set text text
sets the objects text
public void set line wrap final boolean line wrap this text area set line wrap line wrap
method set line wrap
public string get text return this button get text
returns the objectss text
public void set caret position final int pos this text area set caret position pos
method set caret position
public void on event
directly invoke the event handler
public void set editable final boolean b this text area set editable b
method set editable
public void add text area iteeter text area text
method add text area
public string to string return string format teeter panel s this layout
method to string
private boolean is valid email string email return email validator get instance is valid email
check for a valid email entry
public string get view name from servlet path string servlet path string view name servlet path int beg 0 end view name length if end 0 view name char at 0 beg 1 else we are now assuming incoming servlet path is actually a full url beg servlet path last index of beg 1 int dot view name last index of if dot 0 end dot view name view name substring beg end return view name
this function is quite similar to the jobster internal path to view controller
public long get visit audit count array list list array list get hibernate template find select count from org spirit bean impl bot list user visit log if list null return 1 if list get 0 instanceof java lang integer return integer list get 0 long value else return 1
get the total users visited
protected object invoke ruby controller method object ruby controller string method name object args throws bsfexception if ruby controller null return null return get engine call ruby controller method name args
invoke ruby controller method
protected object invoke ruby controller method http servlet request request string method name object args throws bsfexception return invoke ruby controller method get ruby controller request method name args
invoke the ruby controller method
protected object form backing object http servlet request request throws exception object model null object map or controller get ruby controller request log info class identifier form backing object request if map or controller null if map class is assignable from map or controller get class model map or controller log info class identifier using map or controller else log info class identifier invoking ruby controller method model invoke ruby controller method map or controller get model new object request if model null return new tree map return model
form backing object
public void queue referer url string referer str get referer queue add referer str system out println info setting referering url referer str sz get referer queue size
normally used for 302 redirects set the previous or referer url
public string process template vars final string var int start index var index of start token int end index var index of end token if end index start index start index 0 string template vals var substring start index end index string res parse template vars template vals replace the template variable with a value if res null return var substring 0 start index res var substring end index 1 return null
when certain template parameters are found within sequence scripts
public long get visit audit count array list list array list get hibernate template find select count from org spirit bean impl bot list user visit audit if list null return 1 if list get 0 instanceof java lang integer return integer list get 0 long value else return 1
get the total users visited
public nesting kind get nesting kind return null
this implementation returns
public modifier get access level return null
this implementation returns
private void enter binop string name type left type right type res int opcode predef class members enter new operator symbol names from string name new method type list of left right res list type nil method class opcode predef class
enter a binary operation into symbol table
private void enter binop string name type left type right type res int opcode1 int opcode2 enter binop name left right res opcode1 byte codes pre shift opcode2
enter a binary operation as above but with two opcodes which get
private operator symbol enter unop string name type arg type res int opcode operator symbol sym new operator symbol names from string name new method type list of arg res list type nil method class opcode predef class predef class members enter sym return sym
enter a unary operation into symbol table