input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void set prev punctuation collection punct set this prev punct set punct set | sets the set of punctuation tags which preceed this parse |
public double get tag sequence prob system err println parse get tag sequence prob type this if parts size 1 parse parts get 0 type equals abstract bottom up parser tok node system err println this prob return math log prob else if parts size 0 system err println parse get tag sequence prob wrong base case return 0 0 else double sum 0 0 for iterator pi parts iterator pi has next sum parse pi next get tag sequence prob return sum | returns the probability associed with the pos tag sequence assigned to this parse |
public boolean is pos tag return parts size 1 parse parts get 0 get type equals abstract bottom up parser tok node | indicates wether this parse node is a pos tag |
public boolean is flat boolean flat true for int ci 0 ci parts size ci flat parse parts get ci is pos tag return flat | returns true if this constituent contains no sub constituents |
public parse get common parent parse node if this node return parent set parents new hash set parse cparent this while cparent null parents add cparent cparent cparent get parent while node null if parents contains node return node node node get parent return null | returns the deepest shared parent of this node and the specified node |
public boolean get return statement return this return statement | rueckgabe des wahrheitwertes |
protected void init configuration string dir conf appli configuration get instance finds the serializarion directory network preferences factory fac try launcher conf lconf launcher conf get instance fac network preferences factory new factory lconf get user home null null arinc661 pref fac user root catch backing store exception e e print stack trace super init configuration pref if plugins dir null register plugins | creates the configuration |
protected void define format arg if this mode equals ignore case mode enum run this java delegate create arg set line argument format this format | defines argument format f |
protected void define html type arg if this mode equals ignore case mode enum run this format equals ignore case format html string html type html type enum html if this html reportlet html type html type enum reportlet this java delegate create arg set line argument html type html type | defines argument html type t |
protected string define output arg argument output file resource file string relative dir new file file get name get parent string output dir path relative dir if this output dir null output dir path this output dir get absolute path relative dir output set line argument output dir output dir path return output dir path | defines argument output o |
protected void define page arg if this page 0 this mode equals ignore case mode enum render this java delegate create arg set line argument page this page | defines page p argument |
protected void define parameter file arg if this mode equals ignore case mode enum render this parameter file null this java delegate create arg set line argument parameter file this parameter file get absolute path | defines file f argument |
protected void define parameters if this mode equals ignore case mode enum render for iterator iterator this parameters iterator iterator has next parameter parameter parameter iterator next argument param arg this java delegate create arg param arg set line argument parameter parameter get name parameter get value | defines arguments parameter p |
public void set format string format get project log this format format log level debug get level this format format | sets output format of the report |
private void next if current index 1 text length current index current char text char at current index if current char n current line number else current char endmarker system out println next current char | proceed the current index and update current char |
protected boolean has choose to go in hand return hand has highest trump card this dealer trump card | each decision strategy should override this method |
public card play card play scenario play scenario if play scenario first to act return play first to act play scenario if play scenario last to act return play last to act play scenario if play scenario has suit led return play follow suit play scenario if play scenario has only trump return play highest trump play scenario return get lowest off suit play scenario | basic play that accounts for player having a card of the suit |
private void initialize this set size 354 233 this set resizable false this set modal true this set title this resource map get string title this set content pane get jcontent pane | this method initializes this |
private void initialize this set jmenu bar get jjmenu bar this set content pane get jcontent pane this set title heroes forge this set minimum size new dimension 1024 680 this set default close operation jframe exit on close this set bounds new rectangle 0 0 1024 680 | this method initializes this |
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get jmenu j jmenu bar add get jmenu team j jmenu bar add get jmenu help return j jmenu bar | this method initializes j jmenu bar |
private jmenu get jmenu if j menu null j menu new jmenu j menu set text file j menu add get jmenu item exit return j menu | this method initializes j menu |
private jmenu get jmenu team if j menu team null j menu team new jmenu j menu team set text team j menu team add get jmenu item connect return j menu team | this method initializes j menu team |
public void collect connection information iconnection info connection info this get client context get preferences get server connection iconnection dialog view view this get connection dialog connection info set server url view get server url connection info set auto connect view is auto connect connection info set user name view get user name string password view get password if password equals placeholder salted hash digest new salted hash connection info get user name trim string salted hash digest generate hash password trim connection info set password salted hash | collects and validates the entered connection information |
private jmenu get jmenu help if j menu help null j menu help new jmenu j menu help set text help return j menu help | this method initializes j menu help |
public void close dialog this get connection dialog close view | close the connection dialog |
private jmenu item get jmenu item connect if j menu item connect null j menu item connect new jmenu item j menu item connect set text connect to heroes forge server j menu item connect set action this get connect action return j menu item connect | this method initializes j menu item connect |
private jtext field get jtext field server url if j text field server url null j text field server url new jtext field return j text field server url | this method initializes j text field server url |
private jmenu item get jmenu item exit if j menu item exit null j menu item exit new jmenu item j menu item exit set text exit j menu item exit set action this get exit action return j menu item exit | this method initializes j menu item exit |
private jcheck box get jcheck box auto connect if j check box auto connect null j check box auto connect new jcheck box j check box auto connect set text this resource map get string j check box auto connect text return j check box auto connect | this method initializes j check box auto connect |
public string generate hash string data if data null throw new illegal argument exception the data string is a null reference string hash try message digest digest message digest get instance algorithm digest update this salt data data hash converter bytes to hex digest digest catch no such algorithm exception e hash return hash | generates a salted hash code for the provided data |
private jbutton get jbutton connect if j button connect null j button connect new jbutton j button connect set text this resource map get string j button connect text j button connect add action listener new java awt event action listener public void action performed java awt event action event e icommand command connection dialog this get command connect if command null command execute return j button connect | this method initializes j button connect |
private jbutton get jbutton cancel if j button cancel null j button cancel new jbutton j button cancel set text this resource map get string j button cancel text j button cancel add action listener new java awt event action listener public void action performed java awt event action event e icommand command connection dialog this get command cancel if command null command execute return j button cancel | this method initializes j button cancel |
private jpanel get jpanel empty space if j panel empty space null j panel empty space new jpanel j panel empty space set layout new grid bag layout return j panel empty space | this method initializes j panel empty space |
public void set update extractor delete update dir update extractor delete update dir update extractor delete update dir this update extractor delete update dir update extractor delete update dir | sets the update extractor delete update dir |
public void add to classpath string classpath for string tokenizer st new string tokenizer classpath file path separator st has more tokens file path new file st next token add classpath path | adds the path to the classpath |
public void add classpath file path if path exists class files to process add path | adds code path code to the classpath |
private void create class loader if class files to process is empty class loader class loader get system class loader add to classpath system get property java class path else list url urls new array list url for file f class files to process try if verbose log n reading jar f urls add f to url catch malformed urlexception e handle e class loader new urlclass loader url urls to array new url urls size class loader get system class loader | creates the class loader from the list of files to search and |
private void set options log set verbose verbose if output null set output new output public void output method m jloogle this output m | sets various options |
private void print license license print | prints the license |
private void print build date system err println last built builds build date string system err println version builds version string | prints the build date |
private void print code url system err println the project code is system err println system err println http code google com p jloogle system err println | prints the code url |
private void exit int code system exit code | exits with code code code code |
private void error string msg system err println msg | prints an error |
private void handle throwable t t print stack trace | handles an exception |
public int compare to final entry o if o pos pos return 0 else if o pos pos return 1 else return 1 | compares the positions of an entry |
public void set start long start long old value get start this start start fire property change propertyname start old value this start log debug propertyname start this start | sets a new start and notifies observers if the start changed |
public void add annotation gui annotation annotation to add gui annotations add annotation to add set annotations gui annotations | adds the given gui annotation to the list of managed albums and notifies |
private void init models annotation selection new selection in list gui annotation gui document get annotations rand annotations new random annotations action transduce new annotation create action | initializes the selection in list and action |
private void init components annotation table new jtable annotation table set model utils create annotation table model document presentation model get annotation selection annotation table set selection model new single list selection adapter document presentation model get annotation selection get selection index holder new button new jbutton document presentation model get rand annotations new button set text push me transduce button new jbutton document presentation model get transduce action transduce button set text transduce | creates and intializes the ui components |
public jcomponent build panel init components init event handling form layout layout new form layout fill 250dlu grow p fill 80dlu 6dlu p panel builder builder new panel builder layout builder set default dialog border cell constraints cc new cell constraints builder add title annotation manager cc xy 1 1 builder add new jscroll pane annotation table cc xy 1 2 builder add button bar factory build left aligned bar new button transduce button cc xy 1 4 return builder get panel | builds and returns the panel for the gui annotation manager view |
public void add index node node path add node | add one node at the end of the path |
public void add called string call this called add call | mark the method call which has been invoked |
public boolean is called string call return called contains call | check if the method has been called before |
private void find method from node index node node iterator targets new targets cg edges out of node get unit while targets has next soot method s method soot method targets next string s name s method to string index method imethod index container get method s name if imethod null s name equals clinit s name equals init continue node set method imethod | after building the indexs the call point is not associated with the |
private void set string buffer string string this sb append string | set the previous trace from an existing path |
private void set called vector string called2 for int i 0 i called2 size i called add called2 get i | set the called trace from an existing path |
private void set path vector index node path2 for int i 0 i path2 size i path add path2 get i | copy the path trace from an existing path |
public void next this cursor | move the cursor on |
public int get cursor return this cursor | get the cursor value |
public void set cursor int i this cursor i | set the cursor value |
public index node get node int i return path get i | get the specific node |
public void insert path index path ipath int j for int i 0 i ipath size i this path insert element at ipath get node i i j | inset the a subpath in a specific position |
public string get current trace return sb to string n | get the current trace of visited node |
public void record node int i if path get i get should record sb append path get i get value n | just record the node at specific position |
private void play sound string p path url url new url path url url class loader get system resource p path audio clip clip applet new audio clip url clip play | play sound spielt eine |
public void add should term string term add should term term clause default field | add a should term in the default field |
public void add should term string term string field clauses add new clause new term term field false false this conf | add a prohibited term in the specified field |
public void test copy from local to local throws exception my file files create files local test root dir srcdat new copy files do main new configuration new string file test root dir srcdat file test root dir destdat assert true source and destination directories do not match check files local test root dir destdat files deldir local test root dir destdat deldir local test root dir srcdat | copy files from local file system to local file system |
public void test copy from dfs to dfs throws exception string namenode null mini dfscluster cluster null try configuration conf new configuration cluster new mini dfscluster 65314 conf 2 false namenode conf get fs default name local if local equals namenode my file files create files namenode srcdat new copy files do main conf new string hdfs namenode srcdat hdfs namenode destdat assert true source and destination directories do not match check files namenode destdat files deldir namenode destdat deldir namenode srcdat finally if cluster null cluster shutdown | copy files from dfs file system to dfs file system |
public void test copy from local to dfs throws exception string namenode null mini dfscluster cluster null try configuration conf new configuration cluster new mini dfscluster 65316 conf false namenode conf get fs default name local if local equals namenode my file files create files local test root dir srcdat new copy files do main conf new string file test root dir srcdat hdfs namenode destdat assert true source and destination directories do not match check files namenode destdat files deldir namenode destdat deldir local test root dir srcdat finally if cluster null cluster shutdown | copy files from local file system to dfs file system |
public void test copy from dfs to local throws exception string namenode null mini dfscluster cluster null try configuration conf new configuration cluster new mini dfscluster 65318 conf false namenode conf get fs default name local if local equals namenode my file files create files namenode srcdat new copy files do main conf new string hdfs namenode srcdat file test root dir destdat assert true source and destination directories do not match check files local test root dir destdat files deldir local test root dir destdat deldir namenode srcdat finally if cluster null cluster shutdown | copy files from dfs file system to local file system |
public void run try node new name node conf catch throwable e node null system err println name node crashed e print stack trace | create the name node and run it |
public void shutdown if node null node stop node join | shutdown the name node and wait for it to finish |
public void run try string dirs conf get strings dfs data dir for int idx 0 idx dirs length idx file data dir new file dirs idx synchronized data node runner class if data dir mkdirs if data dir is directory throw new runtime exception mkdirs failed to create directory data dir to string node new data node conf conf get dfs datanode rack network topology default rack dirs node run catch throwable e node null system err println data node crashed e print stack trace | create and run the data node |
public void test choose target5 throws exception datanode descriptor targets targets replicator choose target 0 node null block size assert equals targets length 0 targets replicator choose target 1 node null block size assert equals targets length 1 targets replicator choose target 2 node null block size assert equals targets length 2 assert false cluster is on same rack targets 0 targets 1 targets replicator choose target 3 node null block size assert equals targets length 3 assert true cluster is on same rack targets 0 targets 1 assert false cluster is on same rack targets 0 targets 2 | in this testcase client is is a node outside of file system |
public void shutdown if node null node shutdown | shut down the server and wait for it to finish |
public void test small block throws ioexception configuration conf new configuration mini dfscluster cluster new mini dfscluster 65312 conf 1 false file system file sys cluster get file system try path file1 new path smallblocktest dat write file file sys file1 check file file sys file1 cleanup file file sys file1 finally file sys close cluster shutdown | tests small block size in in dfs |
public void shutdown for int idx 0 idx n datanodes idx data nodes idx shutdown name node shutdown | shut down the servers |
public void test seek bug dfs throws ioexception configuration conf new configuration mini dfscluster cluster new mini dfscluster 65312 conf false file system file sys cluster get file system try path file1 new path seektest dat write file file sys file1 seek read file file sys file1 small read seek file sys file1 cleanup file file sys file1 finally file sys close cluster shutdown | test if the seek bug exists in fsdata input stream in dfs |
public void test pread dfs throws ioexception configuration conf new configuration mini dfscluster cluster new mini dfscluster 65312 conf 3 false file system file sys cluster get file system try path file1 new path preadtest dat write file file sys file1 p read file file sys file1 cleanup file file sys file1 finally file sys close cluster shutdown | tests positional read in dfs |
public void run try job conf jc create job conf jc set mapred local dir build test mapred local job tracker start tracker jc catch throwable e system err println job tracker crashed e print stack trace | create the job tracker and run it |
public void shutdown try job tracker stop tracker catch throwable e system err println unable to shut down job tracker e print stack trace | shutdown the job tracker and wait for it to finish |
public string get local dir return local dir 0 | get the local dir for this task tracker |
public void shutdown if tt null try tt shutdown catch throwable e system err println unable to shut down task tracker e print stack trace | shut down the server and wait for it to finish |
public void wait until idle for iterator itr task tracker list iterator itr has next task tracker runner runner task tracker runner itr next while runner is dead runner is initialized runner tt is idle if runner is initialized system out println waiting for task tracker to start else system out println waiting for task tracker runner tt get name to be idle try thread sleep 1000 catch interrupted exception ie | wait until the system is idle |
public void check output specs file system fs job conf job throws ioexception allow existing data for app level restartability | check whether the output specification for a job is appropriate |
public void go throws ioexception init pre process args parse argv post process args set job conf submit and monitor job | this is the method that actually |
public void configure job conf job job conf job try file sys file system get job catch ioexception e throw new runtime exception can t get default file system e num bytes to write job get long test randomwrite bytes per map 1 1024 1024 1024 min key size job get int test randomwrite min key 10 key size range job get int test randomwrite max key 1000 min key size min value size job get int test randomwrite min value 0 value size range job get int test randomwrite max value 20000 min value size | save the values out of the configuaration that we need to write |
public void configure job conf job this input file job get map input file | get the input file name |
public void add next value object val string val count str val to string int pos val count str last index of t string val str val count str substring 0 pos string count str val count str substring pos 1 long count long this items get val str long inc long parse long count str if count null count new long inc else count new long count long value inc items put val str count | add the given val to the aggregator |
public void reset items new tree map | reset the aggregator |
public void add next value object val uniq items put val 1 | add a value to the aggregator |
public void reset uniq items new tree map | reset the aggregator |
public void configure job conf job this long counters new tree map this double counters new tree map | initializes a new instance from a |
public number get metric string name return number metric map get name | returns the metric object which can be a float integer short or byte |
public void close socket may be null if the connection could not be established to the server in question and the culler asked us to close the connection if socket null return try socket close close socket catch ioexception e if log is debug enabled log debug get name closing | close the connection |
public string get path return location path separator str name | return this nodes path |
public boolean contains datanode descriptor node if node null return false node r node get node node get path return r node node | check if the tree contains data node i node i |
protected void remove metrics record impl record string record name record get record name tag map tag table record get tag table record map record map get record map record name synchronized record map record map remove tag table | called by metrics record impl |
public int get distance datanode descriptor node1 datanode descriptor node2 check argument node1 check argument node2 if node1 node2 node1 equals node2 return 0 string path1 node1 get network location split string path2 node2 get network location split int i for i 0 i math min path1 length path2 length i if path1 i path2 i path1 i null path1 i equals path2 i break return 2 path1 length i path2 length i | return the distance between two data nodes |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.