id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
a887f45f-0528-483d-9813-b96b391dabcf | public OptionNameAnalyzer(Version matchVersion) {
this.matchVersion = matchVersion;
} |
a984d357-495d-4663-b613-24d30047e48e | @Override
protected TokenStreamComponents createComponents(String fieldName,
Reader reader) {
Tokenizer source = new OptionNameTokenizer(matchVersion, reader);
TokenStream stream = source;
stream = new WordDelimiterFilter(stream,
WordDelimiterFilter.CATENATE_WORDS
| WordDelimiterFilter.GENERATE_WOR... |
9cb0049a-615b-468c-a04b-54e8e2cf4395 | public static void main(String[] args) throws IOException {
// text to tokenize
final String text = "mapred.reduce.parallel.copies";
Version matchVersion = Version.LUCENE_47; // Substitute desired Lucene version for XY
OptionNameAnalyzer analyzer = new OptionNameAnalyzer(matchVersion);
TokenStream stream = a... |
935c4cb2-a76e-4b5a-ae77-c89b55e0dc91 | protected static double boost_equation(double popularity) {
return Math.sqrt(popularity/* * 1000 */+ 0.1);
} |
e3cc3126-34f4-469a-a6f2-4d3f2ab680d0 | private IndexFiles(String popularity_file) {
this.m_oConfigPopularities = new HashMap<String, Double>();
if (popularity_file != null) {
m_oConfigPopularities.put("RewriteRule", 1.0);
try {
FileReader read = new FileReader(new File(popularity_file));
BufferedReader reader = new BufferedReader(read);
... |
92d12d68-ee9b-485d-b105-615137a1e076 | public void indexDir(String indexRepo, String docRepo,
boolean createOrAppend) {
File docDir = new File(docRepo);
if (!docDir.exists() || !docDir.canRead()) {
log.log(Level.SEVERE,
"Document directory ''{0}'' does not exist or is not readable, please check the path",
docDir.getAbsolutePath());
Sy... |
94545d41-bd6c-42c8-aa26-67cdcedcaeda | private void indexDocs(IndexWriter writer, File file) throws IOException {
// do not try to index files that cannot be read
if (file.canRead()) {
if (file.isDirectory()) {
String[] files = file.list();
// an IO error could occur
if (files != null) {
for (int i = 0; i < files.length; i++) {
... |
b63e4b2e-9d17-4fd6-9253-16b5d5c3b0fb | protected static void index_main(String index_path,
String dst_dir,
String popularity_file,
String mode) {
//TODO
boolean create = true;
new IndexFiles(popularity_file).indexDir(index_path, dst_dir, create);
} |
39991155-3acc-4a51-8481-09d6a81c6ea9 | protected static HashMap<String, String> parse_args(String[] args) {
HashMap<String, String> res = new HashMap<String, String>();
CommandLineParser parser = new PosixParser();
Options opts = new Options();
opts.addOption(OptionBuilder.withArgName("index-path").hasArg().withDescription("indexing file's path").cr... |
e6f20a1c-0d4f-4165-97a3-f05f39db3403 | public static void main(String[] args) {
/*
* String[] sargs = {"-d",
* "/Users/athrunarthur/xuepeng/icon/raw/httpd/", "-i",
* "/Users/athrunarthur/xuepeng/icon/index/httpd/", "-p",
* "/Users/athrunarthur/NetBeansProjects/iconfigure/data/n_mysql_popularity.txt"
* };
*/
log.setUseParentHandlers(fal... |
714dda45-2674-4626-9695-544ef3fa6c2d | public CAnalyzer(Version version) {
matchVersion = version;
Map<String, Analyzer> analyzerPerField = new HashMap<String, Analyzer>();
//for option name
analyzerPerField.put("op_name", new OptionNameAnalyzer(matchVersion));
//for annotated option description
analyzerPerField.put("op_desc", new EnglishA... |
9c4db870-3f45-4678-9a6e-ae2f9729e9bf | public Analyzer getAnalyzer() {
return analyzer;
} |
ab7932ee-1ad9-41d7-bff0-5e15ef902334 | public ArticleParser(Collection<String> pSet) {
iwc = new IndexWriterConfig(Version.LUCENE_47, new StandardAnalyzer(Version.LUCENE_47));
iwc.setOpenMode(IndexWriterConfig.OpenMode.CREATE);
parameterSet.addAll(pSet);
} |
f530c78b-98ac-4902-a40d-517489c50191 | public void parse(String articlePath, String outputDir) {
if(outputDir == null) {
System.err.println("[ERROR] outputDir cannot be null");
} else {
File opDir = new File(outputDir);
if(opDir.exists() == false) {
opDir.mkdir();
}
}
outputDir += "/";
Map<String, String> paraMap = new HashMap<S... |
70d85ec2-276e-49b0-a32d-b351bc6d7fd2 | private Set<String> search(IndexSearcher searcher, String queryString, Map<String, String> paragraphMap)
throws ParseException, IOException {
Set<String> res = new HashSet<String>();
QueryParser qparser = new QueryParser(Version.LUCENE_47, "content", new StandardAnalyzer(Version.LUCENE_47));
Query... |
33953283-9d4d-40ce-9a6a-6d52e2658463 | private static Document createDocument(String index, String content) {
Document doc = new Document();
// Add the title as an unindexed field...
doc.add(new StringField("index", index, Field.Store.YES));
// ...and the content as an indexed field. Note that indexed
// Text fields... |
da07fda5-af8f-447f-89a5-7fd953b8fb95 | public static void main(String[] args) {
//get the httpd parameter from the dataset
Set<String> pSet = new HashSet<String>();
File pDir = new File("/home/tixu/Cox/dataset/httpd/parameters/");
String[] pArr = pDir.list();
for(int i=0; i<pArr.length; i++) {
pSet.add(pArr[i]);
}
ArticleParser aparse = ... |
8c66f426-d2f2-4d28-82bd-62b83dfe99ea | public Navigator(String indexRepo, String filterFile, boolean ipv, boolean strict) {
indexReposity = indexRepo;
optimization = ipv;
try {
IndexReader reader = DirectoryReader.open(FSDirectory.open(new File(indexReposity)));
searcher = new IndexSearcher(reader);
// analyzer = new StandardAnalyzer(Versio... |
d9a934ce-e48c-4749-84ae-92606a47982e | public List<String> navigate(String queryString) {
try {
queryString = queryString.trim();
// System.out.println("QUERY STRING: " + queryString);
Query query = parser.parse(queryString);
return navigate(query);
} catch (ParseException e) {
e.printStackTrace();
} catch (IOException e) {
e.... |
ab4912d1-3a17-4ea0-bf98-e1f401a2c6b5 | private List<String> navigate(Query query) throws IOException {
FunctionQuery boostQuery = new FunctionQuery(new DoubleFieldSource("boost"));
Query q;
if (optimization) {
q = new NameOptScoreQuery(query, boostQuery);
} else {
q = new CustomScoreQuery(query, boostQuery);
}
TopDocs results = searcher.s... |
1aea98d8-25e2-46d8-b45d-ae5b75347089 | protected void getMustSetOpts(String filterFile) {
if (filterFile != null) {
mustSetOpts = new HashSet<String>();
try{
BufferedReader bufferedReader = new BufferedReader(new FileReader(filterFile));
String line = null;
while( (line = bufferedReader.readLine()) != null) {
line = line.trim();... |
8b5627d1-5bb3-4b0d-8a32-dcdf4bdd82c9 | protected void filterMustSetOpts(List<String> opts) {
if (mustSetOpts != null) {
Iterator<String> iter = opts.iterator();
while (iter.hasNext()) {
String s = iter.next();
if (mustSetOpts.contains(s)) {
iter.remove();
}
}
}
} |
5216bbcf-4f39-4288-a226-37997e80ff46 | protected static CommandLine parse_args(String[] args) {
CommandLineParser parser = new PosixParser();
Options opts = new Options();
opts.addOption(new Option("a", false, "enable all cox optimization"));
opts.addOption(new Option("s", false, "use strict mode: all the keywords must be matched"));
opts.add... |
1a73b6f4-5c3e-4b5a-8058-94c6db9b57ed | protected static void search_main(String[] args) throws Exception {
CommandLine cmd = parse_args(args);
Navigator searcher = new Navigator(cmd.getOptionValue("i"), cmd.getOptionValue("x"), cmd.hasOption("a"), cmd.hasOption("s"));
//This list contains all the query strings
List<String> queryStrList = new L... |
4bdea06e-6941-474a-8bf8-453103a7a174 | public static void main(String[] args) throws Exception {
log.setUseParentHandlers(false);
try {
FileHandler fh = new FileHandler("search.log");
log.addHandler(fh);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
} catch (Exception e) {
System.out.println("Unexpected ... |
91e6d74a-8a17-4eac-9f6d-a1d93cda78b3 | protected static double boost_equation(double popularity) {
return Math.sqrt(popularity/* * 1000 */+ 0.1);
} |
c684d421-0dfd-46ef-9801-9cc1384e181e | private IndexManualPages(String popularity_file) {
this.m_oConfigPopularities = new HashMap<String, Double>();
if (popularity_file != null) {
try {
FileReader read = new FileReader(new File(popularity_file));
BufferedReader reader = new BufferedReader(read);
String content = reader.readLine();
wh... |
27f811a6-c9c4-4f6c-98ec-fa2daaef1fba | public void indexDir(String indexRepo, String docRepo, boolean createOrAppend) {
File docDir = new File(docRepo);
if (!docDir.exists() || !docDir.canRead()) {
log.log(Level.SEVERE, "Document directory ''{0}'' does not exist or is not readable, please check the path", docDir.getAbsolutePath());
System.exit(1);... |
8255211b-da05-4634-a5c0-22640c1cde09 | private void indexDocs(IndexWriter writer, File file) throws IOException {
// do not try to index files that cannot be read
if (file.canRead()) {
if (file.isDirectory()) {
String[] files = file.list();
if (files != null) {
for (int i = 0; i < files.length; i++) {
indexDocs(writer, new File(fil... |
f7b61d7b-90a8-4ede-8a8c-c521412e52b7 | protected static void index_main(String index_path, String dst_dir, String popularity_file) {
boolean create = true;
new IndexManualPages(popularity_file).indexDir(index_path, dst_dir, create);
} |
a28cacc3-92c3-47b5-9813-8f8892905ce8 | protected static CommandLine parse_args(String[] args) {
CommandLineParser parser = new PosixParser();
Options opts = new Options();
opts.addOption(new Option("i", true, "the path of the indexes"));
opts.addOption(new Option("d", true, "destination file dir"));
opts.addOption(new Option("p", true, "the ... |
121c82a3-21b4-4df7-a251-d2255ccd070d | public static void main(String[] args) {
log.setUseParentHandlers(false);
try {
FileHandler fh = new FileHandler("index.log");
log.addHandler(fh);
SimpleFormatter formatter = new SimpleFormatter();
fh.setFormatter(formatter);
} catch (Exception e) {
System.out.println("Unexpected exception : " + e.... |
daf59b01-8538-45e8-aad7-5126bb2a3b75 | public Edge(E label, Vertex<V, E> destination) {
this.label=label;
this.destination=destination;
} |
43685c10-8ce2-4fa9-9f6a-2887adc5d91e | public Edge(E label) {
this(label,null);
} |
a6426de3-92f0-4f37-94bd-77350e723cb2 | public E getLabel() {
return label;
} |
44c86897-5d11-4a52-b2a6-d27efd1466ea | public void setLabel(E label) {
this.label = label;
} |
2419ab2f-995e-4aa3-8206-e67344fe479a | public Vertex<V,E> getDestination() {
return destination;
} |
b0371703-89db-42a0-ae7c-625add985c94 | public void setDestination(Vertex<V,E> destination) {
this.destination = destination;
} |
0267b330-d8fa-475f-b703-309007e6d8c6 | @Override
public int compareTo(Edge<V, E> e2) {
if(e2 == null)
return -1;
int labelComparision = getLabel().compareTo(e2.getLabel());
if(labelComparision!=0)
return labelComparision;
Vertex<V,E> destination1 = getDestination();
Vertex<V,E> destination2 = e2.getDestination();
if(destination1 == null &... |
54b9c3c3-3fc0-461a-9d04-102a1e1e00cf | @Override
public String toString() {
return "(" + getLabel().toString() +
(getDestination() == null ? "" :
"->" + getDestination().getId()) + ")";
} |
94f15be0-9217-4758-8d5c-39c036cd3194 | public Vertex(int id, V content, Set<Edge<V,E>> edges){
this.id=id;
this.content=content;
this.edges=edges;
} |
e851bdf3-63cd-4721-86b2-91c286941f6e | public Vertex(int id, V content){
this(id, content, new HashSet<Edge<V,E>>());
} |
f7bea54e-6ed0-45ab-98d3-53eb05a259fb | public Vertex(V content){
this(idCounter++, content);
} |
92f242a3-6629-4d97-bac7-025fe7fb2fc3 | public Vertex() {
this(-1, null);
} |
0c382004-de65-4577-b1c7-008b7ac1b8f3 | public int getId() {
return id;
} |
2491a6d6-0ad8-491e-9ce5-886818f02553 | public void setId(int id) {
this.id = id;
} |
8ece6a94-4005-498b-9185-7394d2bd6500 | public V getContent() {
return content;
} |
6fbde218-336a-4c59-ba2d-fae12c90cad6 | public void setContent(V content) {
this.content = content;
} |
18019d65-5722-4bc0-b863-fefc8e9fd936 | public Set<Edge<V, E>> getEdges() {
return edges;
} |
345b76d8-8ed9-4a75-968f-5b2e7dd06e7f | public void setEdges(Set<Edge<V, E>> edges) {
this.edges = edges;
} |
90ec2d1b-6e46-42f5-ac06-32e0863a4b27 | public boolean addEdge(E label, Vertex<V,E> desitnation){
return edges.add(new Edge<V,E>(label, desitnation));
} |
4137f566-2a93-4013-b9ec-bda0fe7a7c69 | public int getEdgeCount(){
return edges.size();
} |
92914ff3-f20b-4c71-ba8c-254dc3d1588f | @Override
public int compareTo(Vertex<V, E> v2) {
int contentComparison = getContent().compareTo(v2.getContent());
if(contentComparison != 0){
return contentComparison;
}
if(getEdgeCount() < v2.getEdgeCount()){
return -1;
}else if(getEdgeCount() > v2.getEdgeCount()){
return 1;
}else{
return... |
9c4ea993-348a-44bc-8033-6bc9e012d351 | @Override
public String toString() {
return getId() + ":" + getContent().toString() + ":" + getEdgeCount();
} |
868c9058-2c25-4f73-bf63-4a1162e6f80a | private static <V extends Comparable<V>, E extends Comparable<E>> boolean isIsomorphic(Vertex<V,E> v1, Vertex<V,E> v2, Set<Integer> g1Visited, Set<Integer> g2Visited){
if(v1 == null && v2 == null){
return true;
}else if((v1==null && v2!= null) || (v1!=null && v2==null)){
return false;
}
boolean v1Visit... |
5a89ecea-c725-49a1-a31e-ee639884ea4a | public static <V extends Comparable<V>, E extends Comparable<E>> boolean isIsomorphic(Vertex<V,E> root1, Vertex<V,E> root2){
return isIsomorphic(root1, root2, new HashSet<Integer>(), new HashSet<Integer>());
} |
690dcee2-07e5-46f2-98d1-c63a9d86914e | private static <V extends Comparable<V>, E extends Comparable<E>> StringBuffer graphToString(Vertex<V,E> root, Set<Integer> visited){
StringBuffer sb = new StringBuffer();
if(root == null || visited.contains(root.getId())){
return sb;
}
visited.add(root.getId());
sb.append(root.toString()).append("[");
f... |
1a5e3fd6-bb3a-4042-9e37-3d62e07319fd | public static <V extends Comparable<V>, E extends Comparable<E>> String graphToString(Vertex<V,E> root){
return graphToString(root, new HashSet<Integer>()).toString();
} |
7b29bb70-75d7-4fde-a8e0-284a89f8c38f | @Test
public void testIsIsomorphicOnIdentity() {
Vertex<String, String> graph = new Vertex<String, String>("root");
assertTrue(Isomorphism.isIsomorphic(graph, graph)); // automorphism test
} |
d431607f-8657-4d40-9556-c98c697f471c | @Test
public void testIsIsomorphicOnNullGraphs() {
Vertex<String, String> nullGraph1 = null;
Vertex<String, String> nullGraph2 = null;
Vertex<String, String> nonNullGraph = new Vertex<String, String>("root");
assertTrue(Isomorphism.isIsomorphic(nullGraph1, nullGraph2));
assertFalse(Isomorphism.isIsomorphi... |
69e2ed22-f6bb-4087-a844-1f99b26f94ab | @Test
public void testIsIsomorphicOnSingleVertexGraphs() {
Vertex<String, String> graph1 = new Vertex<String, String>("root");
Vertex<String, String> graph2 = new Vertex<String, String>("root");
Vertex<String, String> nullGraph = null;
Vertex<String, String> differentContentGraph = new Vertex<String, String>("... |
631d67fe-dfd9-4813-ac5c-9d575a1f3b69 | @Test
public void testIsIsomorphicOnSingleVertexCyclicGraph() {
Vertex<String, String> graph1 = new Vertex<String, String>("root");
graph1.addEdge("e1", graph1);
Vertex<String, String> graph2 = new Vertex<String, String>("root");
graph2.addEdge("e1", graph2);
Vertex<String, String> nullGraph = null;
Vertex... |
fa563638-12a2-4e3a-a599-2eb3fa4c5d9e | @Test
public void testIsIsomorphicOnSkwedTree() {
int skewLength = 10;
Vertex<String, String> graph1 = new Vertex<String, String>("root");
Vertex<String, String> current = graph1;
Vertex<String, String> temp = null;
for (int i=1;i<skewLength; i++) {
temp = new Vertex<String, String>("vertex"+i);
curren... |
66e5ffc9-fa1d-4caa-b037-e9619eac25df | @Test
public void testIsIsomorphicOnTriangleGraphs() {
Vertex<String, String> g1A = new Vertex<String, String>("A");
Vertex<String, String> g1B = new Vertex<String, String>("B");
Vertex<String, String> g1C = new Vertex<String, String>("C");
g1A.addEdge("AB", g1B);
g1B.addEdge("BC", g1C);
g1C.addEdge("CA", ... |
50af796a-3d4e-4307-af62-decceec0a9cb | @Test
public void testIsIsomorphicOnMirredTrees() {
Vertex<String, String> g1Root = new Vertex<String, String>("Root");
Vertex<String, String> g1Left = new Vertex<String, String>("Left");
Vertex<String, String> g1Right = new Vertex<String, String>("Right");
Vertex<String, String> g1LeftLeft = new Vertex<String... |
9dfc9f27-07fd-44d8-add7-2ac7bcfd5c93 | @Test
public void testIsIsomorphicOnStarGraphs() {
int starSize=10;
Vertex<String, String> g1Root = new Vertex<String, String>(0, "root");
for(int i=1;i<=starSize;i++){
g1Root.addEdge("e"+i, new Vertex<String, String>(i, "v"+i));
}
// adding in the reverse order
Vertex<String, String> g2Root = new Ve... |
5be7c336-42cc-4484-8686-356e8e878303 | @Test
public void testIsIsomorphicOnMultiCycledGraphs() {
Vertex<String, String> g1Root = new Vertex<String, String>("root");
Vertex<String, String> g1A = new Vertex<String, String>("A");
Vertex<String, String> g1B = new Vertex<String, String>("B");
Vertex<String, String> g1C = new Vertex<String, String>("C");... |
bfece62f-2531-4834-89bc-c184d95b47fc | @Test
public void testIsIsomorphicOnRepeatingLabelsAndContents() {
Vertex<String, String> g1v1 = new Vertex<String, String>("v1");
Vertex<String, String> g1v2 = new Vertex<String, String>("v1");
g1v1.addEdge("e1", g1v2);
g1v2.addEdge("e1", null);
Vertex<String, String> g2v1 = new Vertex<String, String>("v... |
25cbfd8d-15a5-4d8c-b391-c4c5e7465d62 | public static void main(String[] args) throws Exception{
// Force configuration loading for the brain of the bot
@SuppressWarnings("unused")
IOResourceProvider io = ResourceProvider.IO;
String webappDirLocation = "src/main/webapp/";
// The port that we should run on can be set into an... |
a2c00fab-a0e1-48fc-9014-ac88a7d49ab6 | @GET
public TranscriptItem get(@QueryParam("w") String who, @QueryParam("s") String sentence) {
Chat chat;
if ((chat = chats.get(who)) == null) {
chat = new Chat(bender,who);
chats.put(who, chat);
}
return new TranscriptItem(who, sentence, chat.multisentenceRespond... |
ffe6080d-68f8-414c-a062-19dca3edafa9 | public Time() {
this(TimeZone.getDefault());
} |
2dac9ef3-537a-4d8f-8f1c-84b635b07b00 | public Time(TimeZone timezone) {
final Calendar now = Calendar.getInstance(timezone);
this.timezone = now.getTimeZone().getDisplayName();
this.year = now.get(Calendar.YEAR);
this.month = now.get(Calendar.MONTH) + 1;
this.day = now.get(Calendar.DATE);
this.hour = now.get(... |
0f26c10a-2db6-4669-9c27-4cb5db101e7d | public String getTimezone() {
return timezone;
} |
a5159d29-c474-4d65-9bec-a25a9598a633 | public int getYear() {
return year;
} |
91caad0c-3b6d-4a78-8323-67c89d9e3d7a | public int getMonth() {
return month;
} |
cdb9c99d-5271-435e-95a6-d9f3131b18f8 | public int getDay() {
return day;
} |
d146c06e-6f2e-40ad-a733-d8fa67e1edb9 | public int getHour() {
return hour;
} |
4abc1626-66c6-45b5-a553-ebe500285e37 | public int getMinute() {
return minute;
} |
da798a60-ebeb-4abe-9622-8971954ec887 | public int getSecond() {
return second;
} |
ec6f4fa1-61f9-4048-b15c-4c604c5c989b | public LRUCache(int cacheSize) {
this.cacheSize = cacheSize;
int hashTableCapacity = (int) Math
.ceil(cacheSize / hashTableLoadFactor) + 1;
map = new LinkedHashMap<K, V>(hashTableCapacity, hashTableLoadFactor,
true) {
// (an anonymous inner class)
private static final long serialVersionUID = 1;
... |
7ba9f6b6-1562-41c8-b3fb-a99874ead520 | @Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest) {
return size() > LRUCache.this.cacheSize;
} |
f018e0ca-6b4a-4093-86e2-709a66e31cc6 | public synchronized V get(K key) {
return map.get(key);
} |
31fe860b-a622-48db-9b72-7ea311d71bca | public synchronized void put(K key, V value) {
map.put(key, value);
} |
11aa1420-5a5f-4f8f-9e2d-48ae8798f7a6 | public synchronized void clear() {
map.clear();
} |
45bca169-aff3-45d2-ac2e-74e231d0a55f | public synchronized int usedEntries() {
return map.size();
} |
8372424e-0bd5-4b61-b47e-2fbe6cf317df | public synchronized Collection<Map.Entry<K, V>> getAll() {
return new ArrayList<Map.Entry<K, V>>(map.entrySet());
} |
3ea347fa-d62b-4d31-be62-b19d97db7949 | public TranscriptItem(String human, String question, String answer) {
this.human = human;
this.question = question;
this.answer = answer;
ts = new Time();
} |
36c246e2-8e58-486e-85f9-adc24e44a833 | public String getHuman() {
return human;
} |
59b00352-3ef5-43d6-aec1-7ed1d23e7e86 | public String getQuestion() {
return question;
} |
0af06d32-ca84-4d2f-8703-8ef7e18c4b3c | public String getAnswer() {
return answer;
} |
fff2c933-1cb9-4ec1-a88a-943928347b4b | public Time getTs() {
return ts;
} |
ce6a8616-b0f3-443e-a33e-aff1ad2cf949 | @Override
public String toString() {
return "[human=" + human + ", question=" + question
+ ", answer=" + answer + ", ts=" + ts + "]";
} |
658a94da-489f-4a9a-80ef-1f2650545421 | @Test
public void replayFireTestStarted() {
RunNotifierReplayer replayer = new RunNotifierReplayer();
String title = "A dummy test";
Description description = Description.createTestDescription(this.getClass(), title);
replayer.fireTestStarted(description);
RunNotifier notifier = mock(RunNotifier.class);
... |
7891d975-271b-4f66-8009-1269d3b6ffb6 | @Test
public void replayFireTestFinished() {
RunNotifierReplayer replayer = new RunNotifierReplayer();
String title = "A dummy test";
Description description = Description.createTestDescription(this.getClass(), title);
replayer.fireTestFinished(description);
RunNotifier notifier = mock(RunNotifier.class);... |
96f75de1-2720-4fc0-83d0-eca4e83a3a2e | @Test
public void replayFireTestFailure() {
RunNotifierReplayer replayer = new RunNotifierReplayer();
String title = "A dummy test";
Description description = Description.createTestDescription(this.getClass(), title);
Failure failure = new Failure(description, new Exception("A test failed"));
replayer.fir... |
d094d663-ad26-47a2-aa99-4292eaf0c759 | @Test
public void constructorSetsUpTestFolderFromAnnotationInJavaClass() {
Class testClass = MochaTestSuite.class;
MochaTestRunner runner = new MochaTestRunner(testClass);
File expected = new File("test-mocha");
assertEquals(expected.getAbsolutePath(), runner.testFolders[0].getAbsolutePath());
} |
9e38f3b7-31c0-4f3c-99da-d4a8c994da85 | @Test
public void buildSuiteDescription() {
MochaResultsDescriptionBuilder builder = new MochaResultsDescriptionBuilder();
String suiteName = "mochatest.js";
RunNotifierReplayer notifier = new RunNotifierReplayer();
Description suiteDescription = builder.buildDescription(suiteName, mochaResults, notifier);
a... |
a2653952-b1ca-48b9-b6a0-d03742dc7778 | @Test
public void notifyPassedAndFailedTests() {
MochaResultsDescriptionBuilder builder = new MochaResultsDescriptionBuilder();
String suiteName = "mochatest.js";
RunNotifier notifier = mock(RunNotifier.class);
Description suiteDescription = builder.buildDescription(suiteName, mochaResults, notifier);
verify... |
035f8fb0-71cb-45d3-97aa-0759990e5c10 | public void execute(RunNotifier notifier); |
807617b9-9f2d-4d1f-8f32-7eb750401289 | @Override
public void execute(RunNotifier notifier) {
notifier.fireTestStarted(description);
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.