input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public boolean has type xclrelation type type return type equals this type | returns if this relation if of the specified relation type |
public void add weights float weight array list extends collection k answers if weight 0f return total weight weight int size answers size suppress warnings unchecked k keys k new object size add weights weight answers size 1 keys | adds a solution weight to all pots possible |
private void add weights float weight array list extends collection k all answers int index k result if index 1 multi key k key new multi key k result weight sum weight sum map get key if weight sum null weight sum new weight sum key make persistent require persistent copy map put key weight sum weight sum value weight return for k answer all answers get index result index answer add weights weight all answers index 1 result | recursively creates all combinations of answers into the specified array |
public float get total weight return total weight | returns the total weight of all solutions added yet to this |
public void refresh relations xclmodel xcl model session session eval relations session xcl model get relations pos relations neg relations eval relations session xcl model get necessary relations req pos relations req neg relations eval relations session xcl model get contradicting relations contr relations null eval relations session xcl model get sufficient relations suff relations null | recalculates the inference trace relations for this model and the given |
public void test persistence throws exception file file new file target kbs if file is directory file mkdir persistence manager pm persistence manager get instance file file2 new file target kbs test jar pm save k file2 knowledge base k2 pm load file2 collection xclmodel col k2 get all knowledge slices for xclmodel knowledge kind for xclmodel model col assert equals 0 3 model get min support assert equals 0 7 model get suggested threshold assert equals 0 8 model get established threshold | were testing for the correct readin of an knowledgebase with an xclmodel |
public double get established threshold return established threshold | returns the established threshold of a model if it is not the default |
public double get suggested threshold return suggested threshold | returns the suggested threshold of a model if it is not the default |
private boolean check old node name node dcelem return dcelem get node name equals dcelement in former versions of persistence the dcelments were named descriptor dcelem get node name equals ignore case descriptor | used to check the old markup prior to 2009 of the persistence |
private boolean remove knowledge slice string id knowledge base kb iterator knowledge slice iter kb get all knowledge slices iterator while iter has next knowledge slice slice iter next if slice instanceof rule set rule set rs rule set slice for rule r rs get rules if r get id equals ignore case id rs remove rule r if rs is empty return kb remove rs else return true return false | removes the knowledge slice with the specified id from the knowledgebase |
private void generate property file writer writer knowledge base knowledge throws ioexception for question question knowledge get manager get questions print writer question for solution solution knowledge get manager get solutions append writer solution get name title solution get name | inspects all terminology objects of the given |
public void add child xmltag child children add child | adds a new child to this tag |
public void load file folder throws ioexception parse exception this load folder new dummy progress listener | loads the session records from a folder |
public void save file folder throws ioexception this save folder new dummy progress listener | saves the session repository to a folder |
protected boolean is simple filter filter f an or filter is simple when both subfilters are simple if f instanceof or filter or filter or or filter f return is simple filter or get f1 is simple filter or get f2 return f instanceof creation date filter | returns true if evaluating the filter is cheaper than evaluating common |
public void save sessions file file collection session record session records throws ioexception save sessions file session records new dummy progress listener | writes a set of session records as xml into the specified file |
public void clear session records clear | clears all of the specified entries form the session repository |
public void save sessions file file collection session record session records progress listener listener throws ioexception output stream stream new file output stream file try save sessions stream session records listener finally stream close find the latest change date to adapt the file to date latest change new date 0 for session record co session records if co get last change date after latest change latest change co get last change date file set last modified latest change get time | writes a set of session records as xml into the specified file |
private string int to binary int number int max length convert decimal number to binary number string builder binary new string builder integer to binary string number add preceding zeros while binary length max length binary insert 0 0 return binary to string | converts a decimal number to a binary number e |
private void parse session record collection session record loaded sessions try loaded sessions session persistence manager get instance load sessions file new dummy progress listener if loaded sessions size 1 throw new ioexception the file file get canonical path contains more than one sessionrecord else if loaded sessions size 0 throw new ioexception the file file get canonical path contains no sessionrecord else real record loaded sessions iterator next catch ioexception e throw new illegal state exception cannot parse record xml file e | parses the file to gain access to all informations |
public void set forbidden answer combinations map question collection choice combinations for question q combinations key set if allowed answer combinations contains key q throw new illegal argument exception there are already allowed answer combinations defined for question q get name this forbidden answer combinations combinations | sets the forbidden answer combinations |
public void save sessions output stream stream collection session record session records throws ioexception save sessions stream session records new dummy progress listener | writes a set of session records as xml into the specified stream |
public void set allowed answer combinations map question collection choice combinations for question q combinations key set if forbidden answer combinations contains key q throw new illegal argument exception there are already forbidden answer combinations defined for question q get name this allowed answer combinations combinations | sets the allowed answer combinations |
private boolean allowed combination question mc question linked hash set choice current combination if forbidden answer combinations contains key question for choice combination forbidden answer combinations get question if equal combinations current combination combination return false else if allowed answer combinations contains key question for choice combination allowed answer combinations get question if equal combinations current combination combination return true return false return true | checks if the current combination is allowed |
private boolean equal combinations linked hash set choice combination choice constraint if combination size constraint length if combination contains all arrays as list constraint return true return false | checks if two combinations are equal |
public boolean add rated test case rated test case return rated test cases add rated test case | adds rated test case to this sequential test case |
public void update rating rating this rating rating | sets rating of this rated solution to rating |
public void inverse sort solutions for rated test case rated test case rated test cases rated test case inverse sort solutions | inverses the rating comparator of all rated solutions in all |
public sequential test case flat clone sequential test case new stc new sequential test case new stc set name this get name for rated test case rtc rated test cases new stc add rtc flat clone return new stc | here the name is copied and new instances of the contained test cases |
private int determine number of combinations collection extends value possible values question current question int available combinations possible values size the combination constraints apply only to question mcs if current question instanceof question mc if max answer combinations for question get current question null int max combinations question max answer combinations for question get current question int value if max combinations question available combinations return max combinations question else if max answer combinations 0 max answer combinations available combinations return max answer combinations return available combinations | determines how many combinations of the available value combinations are |
public boolean test to object obj if this obj return true if obj null return false if obj instanceof sequential test case return false sequential test case other sequential test case obj if rated test cases null if other rated test cases null return false else if rated test cases contains all other rated test cases return false return true | tests if this sequential test case contains the same rated test case as |
public int determine distance collection rated test case cases int result 0 for rated test case rtc cases if rtc get expected solutions size result result rtc get expected solutions size return result 30 200 result 30 200 | determines the distance between two vertices on basis of the maximum |
public color convert string h try return new color hex to r h hex to g h hex to b h catch exception e return color black | converts a color formatted in html style to a java awt color |
public rated test case get source return source | returns the source of the edge |
public rated test case get destination return destination | returns the destination of the edge |
public finding get finding return finding | returns the finding which actually is the edge |
public stroke transform edge finding f rated test case rtc graph get dest f string strength config loader get instance get property edge width new case if rtc is correct strength config loader get instance get property edge width incorrect case else if rtc was tested before strength config loader get instance get property edge width old case return new basic stroke float parse float strength 2 basic stroke cap round basic stroke join miter | transforms a finding to color depending on the state of the next |
public paint transform edge finding f rated test case rtc graph get dest f string color config loader get instance get property edge color new case if rtc is correct color config loader get instance get property edge color incorrect case else if rtc was tested before config loader get instance get property render old cases like new cases equals false color config loader get instance get property edge color old case return color converter get instance convert color | transforms a finding to color depending on the state of the next |
public string transform edge finding ef string builder result new string builder result append html center for finding f graph get dest ef get findings result append f get value get value to string result append br result delete result length 4 result length result append center html return result to string | transforms a finding to nice formatted string which is necessary for |
public paint transform rated test case rtc string color config loader get instance get property edge color new case if rtc is correct color config loader get instance get property edge color incorrect case else if rtc was tested before config loader get instance get property render old cases like new cases equals false color config loader get instance get property edge color old case return color converter get instance convert color return color black | returns a color depending on the information given in a rated test case |
public boolean add finding finding boolean result findings add finding if result derived solutions are up to date false return result | appends a finding to this rated test cases list of findings |
private void init list sequential test case cases this graph case tree factory get instance generate graph cases setup visualization viewer | initializes the graph |
public boolean add findings list finding findings boolean result true for finding finding findings result add finding result return result | appends a whole list of findings to this rated test cases list of |
public void set kb knowledge base kb this kb kb | sets the knowledge base of this test suite |
public boolean add expected rated solution solutions boolean result true for rated solution solution solutions result result expected solutions add solution if result derived solutions are up to date false return result | appends some rated solution instances to this rated test cases list of |
public void show in jframe test case testsuite show in jframe testsuite get repository | shows the specified testsuite visualized in a simple jframe |
public void show in jframe list sequential test case cases init cases jframe frame new jframe frame set default close operation jframe exit on close container content frame get content pane final graph zoom scroll pane panel new graph zoom scroll pane vv content add panel frame pack frame set visible true | shows the specified list sequential test case visualized in a simple |
private string transform solutions header map string string cfg string builder result new string builder result append tr result append th bgcolor result append cfg get node color result append result append solution result append th result append th bgcolor result append cfg get node color result append result append exp result append th result append th bgcolor result append cfg get node color result append result append der result append th result append create correction column cfg result append tr return result to string | generates the header for the solutions in the table node |
public boolean add derived rated solution solutions boolean result true for rated solution solution solutions result result derived solutions add solution if result derived solutions are up to date false return result | appends some rated solution instances to this rated test case s list of |
public boolean get use interview calculator return use interview calculator | returns true if this test suite uses the inteview calculator |
public void set use interview calculator boolean b this use interview calculator b | set this value to true if you want to use the inteview calculator |
public void set repository list sequential test case repository this repository repository | sets the repository |
public boolean interview agends is relevant return interview agenda relevant | returns true if this uses the inteview calculator |
public void load repository string cases url try set repository persistence load cases new file cases url to uri to url kb catch malformed urlexception e system err println malformed url cases url e print stack trace | loads a sequential test case repository into this test suite |
public void set interview agends is relevant boolean b this interview agenda relevant b | set this value to true if you want to use the inteview calculator |
public boolean is consistent for sequential test case stc1 repository for sequential test case stc2 repository for int i 0 i stc1 get cases size i stc2 get cases size i rated test case rtc1 stc1 get cases get i rated test case rtc2 stc2 get cases get i when the findings are equal if rtc1 get findings equals rtc2 get findings but not the solutions if rtc1 get expected solutions equals rtc2 get expected solutions the test suite is not consistent return false else break return true | checks for consistency of this test suite a test suite is consistent if |
public void save repository string cases url boolean b write derived solutions try persistence write cases new url cases url this b write derived solutions catch malformed urlexception e system err println malformed url cases url e print stack trace | saves the test suite |
private void paint graph graphics2 d g2 vv set size vv get graph layout get size container c new container c add vv c add notify c validate c paint components g2 | actually writes the graph as a graph2 d object to the pdf file |
public void save repository onlyexpected solutions string cases url save repository cases url false | saves test suite without derived solutions |
public string get last tested return last tested | returns the date on which this rated test case was last tested |
public void save repository with derived solutions string cases url save repository cases url true | saves test suite with derived solutions |
public void set testing date string date last tested date | sets testing date to a specified date |
public void derive all solutions if derived for sequential test case stc repository stc derive solutions kb derived true | derives the solutions for all sequential test cases in this repositoty |
private string transform symbolic states rating score de d3web core knowledge terminology rating state get state score return state get name | transforms the state of a rated solution to nice a formatted string in |
private double similarity rated test case rtc double sum 0 for finding f rtc get findings question expected f get question question asked get next question compare expected question with asked question if expected equals asked sum 1 set answer of current question in xps case set case value f get question f get value return sum | calculates an overall similarity of expected an actually asked questions |
public double total precision double prec 0 if is consistent return prec derive all solutions for sequential test case stc repository prec functions precision stc derived solutions calculator get instance false prec repository size return prec | calculates the total precision of this consistent test suite |
private void set case value question q value v fact fact fact factory create user entered fact q v session get blackboard add value fact fact | sets question and answer values in the underlying xps case |
private question get next question return question session get interview next form get interview object | returns the question which will be asked by the dialog next |
public double total non sequential precision double prec 0 if is consistent return prec derive all solutions for sequential test case stc repository prec functions precision stc derived solutions calculator get instance true prec repository size return prec | calculates the total precision of this consistent test suite |
private string transform scores rating score if score instanceof score rating return formater format score get rating return score get rating to string | transforms the state of a rated solution to a nice formatted string in |
public double precision sequential test case stc return precision stc derived solutions calculator get instance false | default precision calculation |
public double precision sequential test case stc precision recall calculator state boolean nonsequential if stc get cases size 0 return 0 else double numerator 0 double denominator 0 if nonsequential numerator 1 state precision stc get cases get stc get cases size 1 denominator 1 else for int i 0 i stc get cases size i numerator wp state precision stc get cases get i denominator wp return numerator denominator | returns the precision for a specified state e |
public double total precision interview double prec 0 if is consistent return prec derive all solutions for sequential test case stc repository prec functions precision stc new interview calculator kb false prec repository size return prec | calculates the total interview precision of this test suite |
public double recall sequential test case stc return recall stc derived solutions calculator get instance false | default recall calculation |
public double recall sequential test case stc precision recall calculator state boolean nonsequential if stc get cases size 0 return 1 else double numerator 0 double denominator 0 if nonsequential numerator 1 state recall stc get cases get stc get cases size 1 denominator 1 else for int i 0 i stc get cases size i numerator wr state recall stc get cases get i denominator wr return numerator denominator | returns the recall for a specified state e |
private string get color rated solution rs map string string cfg if rs null return cfg get node color rating score rs get rating de d3web core knowledge terminology rating state get state score if state equals new de d3web core knowledge terminology rating state established return cfg get color established else return cfg get color suggested | returns the backgroundcolor which is appropriate for the currently |
public double f measure double beta sequential test case stc precision recall calculator state double numerator 0 for rated test case rtc stc get cases numerator state f measure beta rtc double denominator stc get cases size return numerator denominator | returns the f measure of a sequential test case depending on the committed |
public double total recall double rec 0 if is consistent return rec derive all solutions for sequential test case stc repository rec functions recall stc derived solutions calculator get instance false rec repository size return rec | calculates the total recall of this consistent test suite |
public rated test case flat clone rated test case new rtc new rated test case new rtc name name new rtc findings findings new rtc expected solutions expected solutions new rtc derived solutions derived solutions return new rtc | a new instance is created and the lists solutions and findings are copied |
public double total non sequential recall double rec 0 if is consistent return rec derive all solutions for sequential test case stc repository rec functions recall stc derived solutions calculator get instance true rec repository size return rec | calculates the total recall of this consistent test suite |
private string create correction column map string string cfg if cfg get colspan equals 4 return td width 50 bgcolor ffffff td return | checks if it is necessary to render a column for user correction |
public double total recall interview double rec 0 if is consistent return rec derive all solutions for sequential test case stc repository rec functions recall stc new interview calculator kb false rec repository size return rec | calculates the total interview recall of this test suite |
public double get rating return new double rating | returns the double value of this rating |
public void set rating object o if o instanceof double rating double o double value | sets rating to the double value of committed object |
public void set cases1 list sequential test case cases1 this cases1 cases1 perform comparison | sets the first sequential test case |
public boolean is problem solving relevant heuristic rating hr new heuristic rating rating return hr has state state unclear hr has state state excluded | checks if the score exceeds either 20 or 20 points |
public void set cases2 list sequential test case cases2 this cases2 cases2 perform comparison | sets the second sequential test case |
private void perform comparison if cases1 null cases2 null return perform fuzzy comparison | compares the sequential test cases |
public boolean have same rated test cases return cases1 contains all cases2 | checks if the sequential test cases contain the same rated test cases |
private string transform solutions header string color int colspan string builder result new string builder result append tr result append td bgcolor result append color result append result append solution result append td result append td bgcolor result append color result append result append exp result append td result append td bgcolor result append color result append result append der result append td result append create correction column colspan result append tr n return result to string | generates the header for the solutions in the table node |
private double similarity rated test case rtc double sum 0 if this rated test case is not correctly derived return 0 if rtc get derived solutions are up to date return sum list solution inter intersect rtc get expected solutions rtc get derived solutions rating similarity comparator new individual similarity for solution d inter sum comparator rsim r d rtc get expected solutions r d rtc get derived solutions return sum | calculates an overall similarity of expected an derived solutions |
private rating r solution s list rated solution rated solutions for rated solution rs rated solutions if rs get solution equals s return rs get rating return new score rating 0 | returns the rating of a |
public boolean was tested before return was tested before | returns true if this rated test case was tested before |
private string create correction column int colspan if colspan 4 return td bgcolor ffffff width 50 td return | checks if it is necessary to render a column for user correction |
public double precision diff stc diff precision recall calculator strategy if stc diff get case get cases size 0 return 0 else if stc diff has differences return 1 else double numerator 0 double denominator 0 list rated test case cases stc diff get case get cases for int i 0 i cases size i rated test case rtc cases get i if stc diff has diff rtc numerator wp strategy precision stc diff get diff rtc else numerator wp denominator wp return numerator denominator | computes the precision for a specified strategy e |
private int wr return 1 | assume a constant weight |
public void set was tested before boolean was tested before this was tested before was tested before | sets if this rated test case was tested before |
public double precision rtcdiff rtc diff if rtc diff has differences return prec rtc diff else return 1 | returns the precision of a rated test case |
public double recall rtcdiff rtc diff if rtc diff has differences return rec rtc diff else return 1 | returns the recall of a rated test case |
public double recall diff stc diff precision recall calculator strategy if stc diff get case get cases size 0 return 1 else if stc diff has differences return 1 else double numerator 0 double denominator 0 list rated test case cases stc diff get case get cases for int i 0 i cases size i rated test case rtc cases get i if stc diff has diff rtc numerator wr strategy recall stc diff get diff rtc else numerator wr denominator wr return numerator denominator | computes the recall of the test case analysis using the specified |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.