rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (filesToMerge.size() == 0)
if (filesToMerge.isEmpty())
public Main(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); String baseDir = "."; Vector filesToMerge = new Vector(); // Go through all the parameters for (int i = 0; i < args.length; i++) { if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].e...
String newDataFileName = (String)iter.next(); File newDataFile = new File(newDataFileName);
File newDataFile = (File)iter.next();
public Main(String[] args) { File dataFile = CoverageDataFileHandler.getDefaultDataFile(); String baseDir = "."; Vector filesToMerge = new Vector(); // Go through all the parameters for (int i = 0; i < args.length; i++) { if (args[i].equals("--datafile")) dataFile = new File(args[++i]); else if (args[i].e...
else {
else
private String handleError( Variable variable, Context context, Exception problem ) { String strError; ArrayList arlErrors = null; PropertyException propEx = null; if (problem instanceof PropertyException) propEx = (PropertyException)problem; else { ...
propEx.setContextLocation(context.getCurrentLocation()); }
propEx.setContextLocation(context.getCurrentLocation());
private String handleError( Variable variable, Context context, Exception problem ) { String strError; ArrayList arlErrors = null; PropertyException propEx = null; if (problem instanceof PropertyException) propEx = (PropertyException)problem; else { ...
if (headingItem != null) headingItem.setEnabled(enabled);
if (headingItem != null && !headingItem.isDisposed()) headingItem.setEnabled(enabled);
public void setEnabled(boolean enabled) { if (this.enabled != enabled) { this.enabled = enabled; if (headingItem != null) headingItem.setEnabled(enabled); } }
if (headingItem != null && headingItem.isEnabled() != enabled) {
if (headingItem != null && !headingItem.isDisposed() && headingItem.isEnabled() != enabled) {
public void update() { super.update(); if (headingItem != null && headingItem.isEnabled() != enabled) { headingItem.setEnabled(enabled); } }
if (headingItem != null && headingItem.isEnabled() != enabled) {
if (headingItem != null && !headingItem.isDisposed() && headingItem.isEnabled() != enabled) {
public void updateAll(boolean arg0) { super.updateAll(arg0); if (headingItem != null && headingItem.isEnabled() != enabled) { headingItem.setEnabled(enabled); } }
inputStreamClosed = true;
private final void FillBuff() throws java.io.IOException { // Buffer fill logic: // If there is at least 2K left in this buffer, just read some more // Otherwise, if we're processing a token and it either // (a) starts in the other buffer (meaning it's filled both part of // the other buffer and ...
inputStreamClosed = false;
public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize) { inputStream = dstream; line = startline; column = startcolumn - 1; if (bufA == null || bufA.size != buffersize) bufA = new Buffer(buffersize); if (bufB == null || bufB.size != buffersi...
int addlChars = amount - 1 - curBuf.curPos;
int addlChars = amount - (inputStreamClosed? 0 : 1) - curBuf.curPos;
public final void backup(int amount) { backupChars += amount; if (curBuf.curPos - amount < 0) { int addlChars = amount - 1 - curBuf.curPos; curBuf.curPos = 0; swapBuf(); curBuf.curPos = curBuf.dataLen - addlChars - 1; } else { curBuf.curPos -= amount; } }
SettingsManager.saveSettings();
public void commit() { getData(); }
_broker = broker;
this(broker,"wm");
protected WMTemplate(Broker broker) { _broker = broker; }
return (Filter) myFilters.get(name);
return (Filter) _filters.get(name);
public Filter getFilter(String name) { return (Filter) myFilters.get(name); }
return myParameters.get(key);
return _parameters.get(key);
public Object getParam(String key) throws IOException, TemplateException { // perform double checked lock in case template has not yet // been parsed. try { return myParameters.get(key); } catch (NullPointerException e) { synchronized(this) { parse(); ...
return myParameters;
return _parameters;
public HashMap getParameters() { return myParameters; }
Parser parser; try { parser = (Parser) _broker.getValue("parser","wm"); } catch (Exception e) { Engine.log.exception(e); throw new TemplateException("Could not load \"wm\" parser:" + e); }
Parser parser = getParser();
public final void parse() throws IOException, TemplateException { // thread policy: // // unsynchronized code elsewhere will access myContent. We must // ensure that any data copied into myContent is ready for public // use--which means dealing with two subtle issues. First, the Block ...
myParameters = newParameters; myFilters = newFilters; myContent = newContent;
_parameters = newParameters; _filters = newFilters; _content = newContent;
public final void parse() throws IOException, TemplateException { // thread policy: // // unsynchronized code elsewhere will access myContent. We must // ensure that any data copied into myContent is ready for public // use--which means dealing with two subtle issues. First, the Block ...
Block content = myContent;
Block content = _content;
public final void write(Writer out, Context data) throws IOException { // thread policy: Access to myContent is unsynchronized here at // the cost of having a slightly stale copy. This is OK, because // you might have requested it slightly earlier anyway. You will // always get a consi...
if (myContent == null) {
if (_content == null) {
public final void write(Writer out, Context data) throws IOException { // thread policy: Access to myContent is unsynchronized here at // the cost of having a slightly stale copy. This is OK, because // you might have requested it slightly earlier anyway. You will // always get a consi...
content = myContent;
content = _content;
public final void write(Writer out, Context data) throws IOException { // thread policy: Access to myContent is unsynchronized here at // the cost of having a slightly stale copy. This is OK, because // you might have requested it slightly earlier anyway. You will // always get a consi...
return (_globals != null) ? _globals.get(name) : null;
if (_globals != null) return _globals.get(name); if (_beanGet != null){ try { return _beanGet.invoke(_bean, new Object[]{ name }); } catch (Exception e){} } return null;
final public Object get(Object name) { return (_globals != null) ? _globals.get(name) : null; }
getGlobalVariables().put(name,value);
if (_beanPut != null){ try { _beanPut.invoke(_bean, new Object[]{ name, value }); } catch (Exception e){} } else { getGlobalVariables().put(name,value); }
final public void put(Object name, Object value) { if (_globals == null) { getGlobalVariables().put(name,value); } else { _globals.put(name,value); } }
try { _beanGet = bean.getClass().getMethod("get", new Class[]{ java.lang.Object.class }); _beanPut = bean.getClass().getMethod("put", new Class[]{ java.lang.Object.class, java.lang.Object.class }); } catch (Exception e){}
final public void setBean(Object bean) { _bean = bean; }
System.err.println ("render: >");
protected String renderGT() { return "&gt;"; }
System.err.println ("render: <");
protected String renderLT() { return "&lt;"; }
.append (text)
.append (replace (replace (text, "<", "&lt;"), ">", "&gt;"))
protected String renderQuotedBlock(String text) { StringBuffer sb = new StringBuffer (text.length()); sb.append ("<pre>") .append (text) .append ("</pre>"); return sb.toString (); }
return "<!-- " + data.getType() + " is an unknown WikiData type";
return "<!-- " + data.getType() + " is an unknown WikiData type -->";
protected String renderUnknown(WikiData data) { return "<!-- " + data.getType() + " is an unknown WikiData type"; }
if (room != groupChatRoom) { return; }
public void userHasLeft(ChatRoom room, String userid) { int index = getIndex(userid); if (index != -1) { model.removeElementAt(index); } }
public boolean isOwnerOrAdmin(Occupant occupant) {
public boolean isOwnerOrAdmin(GroupChatRoom groupChatRoom, String nickname) { Occupant occupant = getOccupant(groupChatRoom, nickname);
public boolean isOwnerOrAdmin(Occupant occupant) { if (occupant != null) { String affiliation = occupant.getAffiliation(); if ("owner".equals(affiliation) || "admin".equals(affiliation)) { return true; } } return false; }
public boolean isModerator(Occupant occupant) {
public boolean isModerator(GroupChatRoom groupChatRoom, String nickname) { Occupant occupant = getOccupant(groupChatRoom, nickname);
public boolean isModerator(Occupant occupant) { if (occupant != null) { String role = occupant.getRole(); if ("moderator".equals(role)) { return true; } } return false; }
return "1.1.9.6";
return "1.1.9.7";
public static String getVersion() { return "1.1.9.6"; }
String filePath=getArticleResourcePath(); String articleFolderPath = getArticlePath();
String filePath=getResourcePath(); String articleFolderPath=getArticlePath(); if(articleFolderPath!=null) { filePath=articleFolderPath+"/"+getArticleName(); }else { filePath=getArticleResourcePath(); articleFolderPath = getArticlePath(); }
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() !...
rootResource.putMethod(filePath,article);
if(!rootResource.putMethod(filePath,article)) { rootResource.putMethod(session.getURI(filePath),article); }
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() !...
rootResource.putMethod(session.getURI(filePath),article);
if(!rootResource.putMethod(session.getURI(filePath),article)) { rootResource.putMethod(filePath,article); }
public void store() throws IDOStoreException{ boolean storeOk = true; clearErrorKeys(); if (getHeadline().trim().equals("")) { addErrorKey(KEY_ERROR_HEADLINE_EMPTY); storeOk = false; } if (getBody().trim().equals("")) { addErrorKey(KEY_ERROR_BODY_EMPTY); storeOk = false; } // if (getRequestedStatus() !...
public final static Macro createMacro(Object wrapMe)
public final static Macro createMacro(Object wrapMe, String encoding)
public final static Macro createMacro(Object wrapMe) throws BuildException { if (wrapMe == null) { throw new BuildException("Bug in WM: attempt to write null"); } if (wrapMe instanceof Macro) { return (Macro) wrapMe; } else { return new MacroAdapter(wrapMe); }...
public StringMacroAdapter(String wrapMe)
public StringMacroAdapter(String wrapMe, String encoding)
public StringMacroAdapter(String wrapMe) { try { _self = wrapMe.getBytes("UTF8"); } catch (Exception e) { e.printStackTrace(); } }
_self = wrapMe.getBytes("UTF8");
_self = wrapMe.getBytes(encoding);
public StringMacroAdapter(String wrapMe) { try { _self = wrapMe.getBytes("UTF8"); } catch (Exception e) { e.printStackTrace(); } }
_helper = new BrokerTemplateProviderHelper();
public void init(Broker b, Settings config) throws InitException { super.init(b, config); _helper.init(b, config); _helper.setReload(_cacheSupportsReload); _log = b.getLog("resource", "Object loading and caching"); }
String headline = WFUtil.getStringValue(ARTICLE_ITEM_BEAN_ID, "headline");
ArticleItemBean articleBean = (ArticleItemBean) WFUtil.getBeanInstance(ARTICLE_ITEM_BEAN_ID); String resourcePath = articleBean.getResourcePath();
private void selectComponent() { WFComponentSelector componentSelector = (WFComponentSelector) findComponent(COMPONENT_SELECTOR_ID); String headline = WFUtil.getStringValue(ARTICLE_ITEM_BEAN_ID, "headline"); if (componentSelector != null) { if (headline == null || headline.length() == 0) { componentSelector.se...
if (headline == null || headline.length() == 0) {
if (resourcePath == null || resourcePath.length() == 0) {
private void selectComponent() { WFComponentSelector componentSelector = (WFComponentSelector) findComponent(COMPONENT_SELECTOR_ID); String headline = WFUtil.getStringValue(ARTICLE_ITEM_BEAN_ID, "headline"); if (componentSelector != null) { if (headline == null || headline.length() == 0) { componentSelector.se...
assertStringTemplateEquals("$Text.HTMLEncode('&amp;')", "&");
assertStringTemplateEquals("$Text.HTMLEncode('&')", "&amp;");
public void testContextToolMethodCall() { assertStringTemplateEquals("$Text.HTMLEncode('&amp;')", "&"); }
t = new FileTemplate(_broker,tFile,encoding);
t = new FileTemplate(_broker,tFile,"UTF8");
final public Template get(String fileName, String encoding) { for (int i=0; i < _templateDirectory.length; i++) { Template t; String dir = _templateDirectory[i]; File tFile = new File(dir,fileName); if (tFile.canRead()) { try { t = new FileTemplate(_brok...
while (l instanceof Macro)
while (l instanceof Macro && l != UNDEF)
public void write(FastWriter out, Context context) throws PropertyException, IOException { Object l, limit, from; int loopLimit=-1, loopStart=1, loopIndex=0; l = list; while (l instanceof Macro) l = ((Macro) l).evaluate(context); if (limitExpr != null) { limit = limitExpr; while (li...
public NotVariableBuildException(String directive, Exception e) { super("#" + directive + ": Argument must be a variable", e);
public NotVariableBuildException(String directive) { super("#" + directive + ": Argument must be a variable");
public NotVariableBuildException(String directive, Exception e) { super("#" + directive + ": Argument must be a variable", e); }
return "ok";
return true;
private void addContactItem(final ContactGroup contactGroup, final ContactItem item) { ContactItem newContact = new ContactItem(item.getNickname(), item.getFullJID()); newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(it...
removeContactItem(oldGroup, item);
if ((Boolean)get()) { removeContactItem(oldGroup, item); }
private void addContactItem(final ContactGroup contactGroup, final ContactItem item) { ContactItem newContact = new ContactItem(item.getNickname(), item.getFullJID()); newContact.setPresence(item.getPresence()); newContact.setIcon(item.getIcon()); newContact.getNicknameLabel().setFont(it...
return "ok";
return true;
public Object construct() { Roster roster = SparkManager.getConnection().getRoster(); RosterEntry entry = roster.getEntry(item.getFullJID()); RosterGroup groupFound = null; for(RosterGroup group : roster.getGroups()){ if (group.g...
removeContactItem(oldGroup, item);
if ((Boolean)get()) { removeContactItem(oldGroup, item); }
public void finished() { // Now try and remove the group from the old one. removeContactItem(oldGroup, item); }
Message message = (Message)room.getTranscripts().get(size - 1);
if (size > 0) { Message message = (Message)room.getTranscripts().get(size - 1);
private void checkNotificationPreferences(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.getWindowTakesFocus()) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); int tabLocation = indexOfComponent(room); ...
toaster.showToaster(room.getTabIcon(), message.getBody());
toaster.showToaster(room.getTabIcon(), message.getBody()); }
private void checkNotificationPreferences(final ChatRoom room) { LocalPreferences pref = SettingsManager.getLocalPreferences(); if (pref.getWindowTakesFocus()) { chatFrame.setState(Frame.NORMAL); chatFrame.setVisible(true); int tabLocation = indexOfComponent(room); ...
Header.print(System.out); System.out.println("instrumenting " + filenames.length + " " + (filenames.length == 1 ? "class" : "classes") + (toDir != null ? " to " + toDir : ""));
private void addFilenames(String[] filenames) { if (filenames.length == 0) { return; } for (int i = 0; i < filenames.length; i++) { getProject().log("Adding " + filenames[i] + " to list", Project.MSG_VERBOSE); addArg(filenames[i]); } Header.print(System.out); System.out.println("instrumenting " + fil...
filenames.addAll(Arrays.asList(getFilenames(fileSet)));
String[] fileNames = getFilenames(fileSet); numberOfClasses += fileNames.length; addFilenames(getFilenames(fileSet));
private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.to...
addFilenames((String[])filenames.toArray(new String[filenames.size()]));
Header.print(System.out); System.out.println("instrumenting " + numberOfClasses + " " + (numberOfClasses == 1 ? "class" : "classes") + (toDir != null ? " to " + toDir : ""));
private void handleFilesets() { Set filenames = new HashSet(); Iterator iter = fileSets.iterator(); while (iter.hasNext()) { FileSet fileSet = (FileSet)iter.next(); addArg("--basedir"); addArg(baseDir(fileSet)); filenames.addAll(Arrays.asList(getFilenames(fileSet))); } addFilenames((String[])filenames.to...
addTools(tools);
registerTools(tools);
public WebContext(final Broker broker) { super(broker); try { String tools = (String) broker.getValue("config","TemplateTools"); addTools(tools); } catch (InvalidTypeException it) { _log.exception(it); _log.error("config type not registered with broker!"); } cat...
updateNotesFromOpenNoteTabs();
dd.getTabFolder().saveNoteTabs();
public void fileSave(Event e) { updateNotesFromOpenNoteTabs(); dd.getDocument().saveNotes(); }
updateNotesFromOpenNoteTabs();
dd.getTabFolder().saveNoteTabs();
public void fileSaveAs(Event e) { FileDialog fileDialog = new FileDialog(dd.getShell(), SWT.SAVE); String filePath = fileDialog.open(); if (filePath != null) { File file = new File(filePath); updateNotesFromOpenNoteTabs(); dd.getDocument().saveNotes(file); dd.getShell().setText(file.getName() + " - Koala No...
public Note loadNotes(File file) { this.file = file; return loadNotes();
public Note loadNotes() { org.jdom.Document jdomDocument = null; try { jdomDocument = new SAXBuilder().build(file); } catch (IOException ioex) { throw new KoalaException("Koala Notes could not read file '" + file.getName() + "'.", ioex); } catch (JDOMException jdomex) { throw new KoalaException("Koala Notes could not b...
public Note loadNotes(File file) { this.file = file; return loadNotes(); }
urls[iterator.previousIndex()] = repository.getResource(location);
URL url = repository.getResource(location); if (url == null) { throw new FatalBeanException("Unable to resolve classpath location " + location); } urls[iterator.previousIndex()] = url;
public void preprocess(SpringApplicationContext applicationContext, XmlBeanDefinitionReader reader, Document document) { // determine the classLoader ClassLoader classLoader; NodeList classpathElements = document.getDocumentElement().getElementsByTagName("classpath"); if (classpathElemen...
dlg = new JDialog(SparkManager.getMainWindow(), "Downloads", false);
dlg = new JDialog(SparkManager.getMainWindow(), Res.getString("title.downloads"), false);
private Downloads() { ChatFrame frame = SparkManager.getChatManager().getChatContainer().getChatFrame(); dlg = new JDialog(SparkManager.getMainWindow(), "Downloads", false); dlg.setContentPane(mainPanel); dlg.pack(); dlg.setSize(400, 400); dlg.setResizable(true); dlg...
Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret;
ret = getLocal(names);
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getPropert...
return PropertyOperator.getProperty(this,_bean,names);
ret = PropertyOperator.getProperty(this,_bean,names);
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getPropert...
if (ret == null){ ret = getTool(names); } return ret;
public final Object getProperty(final Object[] names) throws PropertyException, ContextException { if (_bean == null) { Object ret = getLocal(names); if (ret == null) { ret = getTool(names); } return ret; } else { return PropertyOperator.getPropert...
throw new InvalidContextException("The object used as the list of values in a foreach statement must have some way of returning a list type, or be a list type itself. See the documentation for PropertyOperator.getIterator() for more details. No such property was found on the supplied object: " + list);
throw new InvalidContextException("The object used as the list of values in a foreach statement must have some way of returning a list type, or be a list type itself. See the documentation for PropertyOperator.getIterator() for more details. No such property was found on the supplied object: " + list + ": " + e);
public void write(Writer out, Context context) throws InvalidContextException, IOException { // now clobber values outside the loop: // Map listMap = new HashMap(); // listMap.include(context); Object list = _list; if (_macro) { while (list instanceof Macro) { list...
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
private static void addInvitationListener() { // Add Invite Listener MultiUserChat.addInvitationListener(SparkManager.getConnection(), new InvitationListener() { public void invitationReceived(final XMPPConnection conn, final String room, final String inviter, final String reason, final Str...
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
public void invitationReceived(final XMPPConnection conn, final String room, final String inviter, final String reason, final String password, final Message message) { SwingUtilities.invokeLater(new Runnable() { public void run() { Collection listener...
SparkManager.getAlertManager().flashWindow(SparkManager.getMainWindow());
SparkManager.getAlertManager().flashWindowStopOnFocus(SparkManager.getMainWindow());
public void run() { Collection listeners = new ArrayList(SparkManager.getChatManager().getInvitationListeners()); Iterator iter = listeners.iterator(); while (iter.hasNext()) { RoomInvitationListener list...
this.bookmarks = bookmarks;
public void setBookmarks(Collection bookmarks) { Iterator iter = bookmarks.iterator(); while (iter.hasNext()) { Bookmark bookmark = (Bookmark)iter.next(); String serviceName = bookmark.getServiceName(); String roomJID = bookmark.getRoomJID(); String roomName...
assertNotNull(obj);
public void testFoo() { SomeOtherClass obj = new SomeOtherClass(); obj.incrementCounter(); obj.incrementCounter(); obj.incrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.decrementCounter(); obj.getCounter(); }
e = Expression();
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
list.addElement(e);
e = Expression(); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[30] = jj_gen; ; } list.addElement(e);
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
jj_la1[30] = jj_gen;
jj_la1[31] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
jj_la1[31] = jj_gen;
jj_la1[32] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
jj_la1[32] = jj_gen;
jj_la1[33] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
jj_la1[33] = jj_gen;
jj_la1[34] = jj_gen;
final public ListBuilder ArgList() throws ParseException { ListBuilder list = new ListBuilder(); Object e; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case DOLLAR: case QUOTE: case NULL: case TRUE: case FALSE: case LPAREN: case LBRACKET: case OP_MINUS: case OP_NOT: case NUMBER: e =...
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[34] = jj_gen; ; }
final public ListBuilder BracketList() throws ParseException { ListBuilder list; jj_consume_token(LBRACKET); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WS: jj_consume_token(WS); break; default: jj_la1[34] = jj_gen; ; } list = ArgList(); jj_consume_token(RBRACKET); {if (t...
public void ReInit(java.io.Reader dstream)
public void ReInit(java.io.Reader dstream, int startline, int startcolumn, int buffersize)
public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); }
ReInit(dstream, 1, 1, 4096);
inputStream = dstream; line = startline; column = startcolumn - 1; if (bufA == null || bufA.size != buffersize) bufA = new Buffer(buffersize); if (bufB == null || bufB.size != buffersize) bufB = new Buffer(buffersize); curBuf = bufA; otherBuf = bufB; curBuf.curPos = otherBuf.dataLen = -1; curBuf.dataLen = otherBuf.dat...
public void ReInit(java.io.Reader dstream) { ReInit(dstream, 1, 1, 4096); }
FastWriter fw = new FastWriter(os, "UTF8");
FastWriter fw = new FastWriter(os, context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(_content.length * 16 + 256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch ...
return os.toString("UTF8");
return os.toString(context.getEncoding());
public Object evaluate(Context context) throws ContextException { try { ByteArrayOutputStream os = new ByteArrayOutputStream(_content.length * 16 + 256); FastWriter fw = new FastWriter(os, "UTF8"); write(fw,context); fw.flush(); return os.toString("UTF8"); } catch ...
try { directive = (Directive) desc.dirClass.newInstance(); } catch (Exception e) { };
public DirectiveBuilder(DirectiveDescriptor desc) { this.desc = desc; if (desc.args != null && desc.args.length > 0) buildArgs = new ArgsHolder(desc.args); if (desc.subdirectives != null && desc.subdirectives.length > 0) subdirectives = new Object[desc.subdirectives.length]; try { ...
FileFinder finder) throws IOException
FileFinder finder, ComplexityCalculator complexity) throws IOException
public XMLReport(ProjectData projectData, File destinationDir, FileFinder finder) throws IOException { this.finder = finder; pw = new PrintWriter(new FileWriter(new File(destinationDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); println("<!DOCTYPE coverage SYSTEM \"http://cobertura.sourc...
this.complexity = complexity;
public XMLReport(ProjectData projectData, File destinationDir, FileFinder finder) throws IOException { this.finder = finder; pw = new PrintWriter(new FileWriter(new File(destinationDir, "coverage.xml"))); try { println("<?xml version=\"1.0\"?>"); println("<!DOCTYPE coverage SYSTEM \"http://cobertura.sourc...
double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false);
private void dumpClass(ClassData classData) { logger.debug("Dumping class " + classData.getName()); double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false); println("<class name=\"" + classData.getName() + "\" filename=\"" + classData.getSourceFileName() + "\" line-rate=\"" + class...
+ ccn + "\"" + ">");
+ complexity.getCCNForClass(classData) + "\"" + ">");
private void dumpClass(ClassData classData) { logger.debug("Dumping class " + classData.getName()); double ccn = Util.getCCN(finder.findFile(classData .getSourceFileName()), false); println("<class name=\"" + classData.getName() + "\" filename=\"" + classData.getSourceFileName() + "\" line-rate=\"" + class...
double ccn = packageData.getCCN(finder);
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = packageData.getCCN(finder); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchC...
+ "\" complexity=\"" + ccn + "\"" + ">");
+ "\" complexity=\"" + complexity.getCCNForPackage(packageData) + "\"" + ">");
private void dumpPackage(PackageData packageData) { logger.debug("Dumping package " + packageData.getName()); double ccn = packageData.getCCN(finder); println("<package name=\"" + packageData.getName() + "\" line-rate=\"" + packageData.getLineCoverageRate() + "\" branch-rate=\"" + packageData.getBranchC...
private void dumpSource(File sourceDirectory)
private void dumpSource(String sourceDirectory)
private void dumpSource(File sourceDirectory) { println("<source>" + sourceDirectory.getAbsolutePath() + "</source>"); }
println("<source>" + sourceDirectory.getAbsolutePath() + "</source>");
println("<source>" + sourceDirectory + "</source>");
private void dumpSource(File sourceDirectory) { println("<source>" + sourceDirectory.getAbsolutePath() + "</source>"); }
for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File dir = (File) it.next();
for (Iterator it = finder.getSourceDirectoryList().iterator(); it.hasNext(); ) { String dir = (String) it.next();
private void dumpSources() { println("<sources>"); increaseIndentation(); for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File dir = (File) it.next(); dumpSource(dir); } decreaseIndentation(); println("</sources>"); }
template = props.getProperty (page.getTitle());
if (props.getProperty (page.getTitle()) != null) template = props.getProperty (page.getTitle());
public String getTemplateName(WikiSystem wiki, WikiPage page) { Properties props = wiki.getProperties(); String template = props.getProperty ("ViewPageAction.Template"); if (page != null) { template = props.getProperty (page.getTitle()); } return template; }
generateClassLists();
generateSourceFileLists();
public HTMLReport(ProjectData projectData, File outputDir, File sourceDir) throws Exception { this.destinationDir = outputDir; this.sourceDir = sourceDir; this.projectData = projectData; CopyFiles.copy(outputDir); generatePackageList(); generateClassLists(); generateOverviews(); generateSourceFiles(); }
Collection classes;
Collection sourceFiles;
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
classes = new TreeSet(); if (projectData.getNumberOfClasses() > 0) { iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); if (classData.getPackageName() == null) { classes.add(classData); } } }
sourceFiles = projectData.getSourceFiles();
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
classes = packageData.getClasses();
sourceFiles = packageData.getSourceFiles();
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
if (classes.size() > 0)
if (sourceFiles.size() > 0)
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
iter = classes.iterator();
iter = sourceFiles.iterator();
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
ClassData classData = (ClassData)iter.next(); out.println(generateTableRowForClass(classData));
SourceFileData sourceFileData = (SourceFileData)iter .next(); out .println(generateTableRowForSourceFile(sourceFileData));
private void generateOverview(PackageData packageData) throws IOException { Iterator iter; String filename; if (packageData == null) { filename = "frame-summary.html"; } else { filename = "frame-summary-" + packageData.getName() + ".html"; } File file = new File(destinationDir, filename); PrintStream out...
.println("<td nowrap=\"nowrap\"><a href=\"frame-summary.html\" onClick='parent.classList.location.href=\"frame-classes.html\"' target=\"summary\">All</a></td>");
.println("<td nowrap=\"nowrap\"><a href=\"frame-summary.html\" onClick='parent.sourceFileList.location.href=\"frame-sourcefiles.html\"' target=\"summary\">All</a></td>");
private void generatePackageList() throws IOException { File file = new File(destinationDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .print...
String url2 = "frame-classes-" + packageData.getName()
String url2 = "frame-sourcefiles-" + packageData.getName()
private void generatePackageList() throws IOException { File file = new File(destinationDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .print...
out.println("<td nowrap=\"nowrap\"><a href=\"" + url1 + "\" onClick='parent.classList.location.href=\"" + url2 + "\"' target=\"summary\">" + generatePackageName(packageData) + "</a></td>");
out .println("<td nowrap=\"nowrap\"><a href=\"" + url1 + "\" onClick='parent.sourceFileList.location.href=\"" + url2 + "\"' target=\"summary\">" + generatePackageName(packageData) + "</a></td>");
private void generatePackageList() throws IOException { File file = new File(destinationDir, "frame-packages.html"); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.println("<title>Coverage Report</title>"); out .print...