rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
private void generateSourceFile(ClassData classData) throws IOException
private void generateSourceFile(SourceFileData sourceFileData) throws IOException
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
String filename = classData.getName() + ".html";
String filename = sourceFileData.getNormalizedName() + ".html";
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
String classPackageName = classData.getPackageName();
String classPackageName = sourceFileData.getPackageName();
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
out.print(classData.getPackageName() + ".");
out.print(sourceFileData.getPackageName() + ".");
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
out.print(classData.getName());
out.print(sourceFileData.getBaseName());
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
out.println(generateTableRowForClass(classData));
out.println(generateTableRowForSourceFile(sourceFileData));
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
File sourceFile = new File(sourceDir, classData .getSourceFileName());
File sourceFile = new File(sourceDir, sourceFileData .getName());
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
if (classData.isValidSourceLineNumber(lineNumber))
if (sourceFileData.isValidSourceLineNumber(lineNumber))
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
long numberOfHits = classData.getHitCount(lineNumber);
long numberOfHits = sourceFileData .getHitCount(lineNumber);
private void generateSourceFile(ClassData classData) throws IOException { String filename = classData.getName() + ".html"; File file = new File(destinationDir, filename); PrintStream out = null; try { out = new PrintStream(new FileOutputStream(file)); out.println("<html>"); out.println("<head>"); out.prin...
Iterator iter = projectData.getClasses().iterator();
Iterator iter = projectData.getSourceFiles().iterator();
private void generateSourceFiles() { Iterator iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); try { generateSourceFile(classData); } catch (Exception e) { logger.info("Could not generate HTML file for class " + classData.getNa...
ClassData classData = (ClassData)iter.next();
SourceFileData sourceFileData = (SourceFileData)iter.next();
private void generateSourceFiles() { Iterator iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); try { generateSourceFile(classData); } catch (Exception e) { logger.info("Could not generate HTML file for class " + classData.getNa...
generateSourceFile(classData);
generateSourceFile(sourceFileData);
private void generateSourceFiles() { Iterator iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); try { generateSourceFile(classData); } catch (Exception e) { logger.info("Could not generate HTML file for class " + classData.getNa...
logger.info("Could not generate HTML file for class " + classData.getName());
logger.info("Could not generate HTML file for source file " + sourceFileData.getName());
private void generateSourceFiles() { Iterator iter = projectData.getClasses().iterator(); while (iter.hasNext()) { ClassData classData = (ClassData)iter.next(); try { generateSourceFile(classData); } catch (Exception e) { logger.info("Could not generate HTML file for class " + classData.getNa...
String url2 = "frame-classes-" + packageData.getName() + ".html";
String url2 = "frame-sourcefiles-" + packageData.getName() + ".html";
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-classes-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double ccn = Util.g...
+ "\" onClick='parent.classList.location.href=\"" + url2
+ "\" onClick='parent.sourceFileList.location.href=\"" + url2
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-classes-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double ccn = Util.g...
Collection result = new ArrayList(children.size() * 15); for (Iterator it = children.values().iterator(); it.hasNext(); ) { PackageData packageData = (PackageData) it.next(); result.addAll(packageData.getChildren()); } return result;
return this.classes.values();
public Collection getClasses() { Collection result = new ArrayList(children.size() * 15); // just an approximation, no science here for (Iterator it = children.values().iterator(); it.hasNext(); ) { PackageData packageData = (PackageData) it.next(); result.addAll(packageData.getChildren()); ...
private void addInstrumentation(File file)
private void addInstrumentation(File baseDir, String filename)
private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } else if (isArchive(file)) { addInstrumentationToA...
if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } else if (isArchive(file)) { addInstrumentationToArchive(file); }
logger.debug("filename: " + filename); File file; if (baseDir == null) file = new File(filename); else file = new File(baseDir, filename); addInstrumentation(file);
private void addInstrumentation(File file) { if (isClass(file)) { addInstrumentationToSingleClass(file); } else if (file.isDirectory()) { File[] contents = file.listFiles(); for (int i = 0; i < contents.length; i++) addInstrumentation(contents[i]); } else if (isArchive(file)) { addInstrumentationToA...
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception
private void addInstrumentationToArchive(File archive)
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
ZipEntry entry; while ((entry = archive.getNextEntry()) != null)
logger.debug("Instrumenting archive " + archive.getAbsolutePath()); File outputFile = null; ZipInputStream input = null; ZipOutputStream output = null; try { try { input = new ZipInputStream(new FileInputStream(archive)); } catch (FileNotFoundException e) { logger.warn("Cannot open archive file: " + archive.getAbsolu...
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); byte[] entryBytes = IOUtil .createByteArrayFromInputStream(archive); if (isClass(entry)) { ClassReader cr = new ClassReader(entryBytes); ClassWriter cw = new ClassWriter(true); ClassInstrumenter cv = new ClassInstrumenter(proje...
IOUtil.moveFile(outputFile, archive);
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
catch (Exception e)
catch (IOException e)
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
logger.warn("Problems with archive entry: " + entry); throw e;
logger.warn("Cannot instrument archive: " + archive.getAbsolutePath(), e); return;
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
output.flush();
private void addInstrumentationToArchive(ZipInputStream archive, ZipOutputStream output) throws Exception { ZipEntry entry; while ((entry = archive.getNextEntry()) != null) { try { ZipEntry outputEntry = new ZipEntry(entry.getName()); output.putNextEntry(outputEntry); // Read current entry byte[] ...
cv = new ClassInstrumenter(projectData, cw, ignoreRegex);
cv = new ClassInstrumenter(this.projectData, cw, this.ignoreRegexs);
private void addInstrumentationToSingleClass(File file) { logger.debug("Instrumenting class " + file.getAbsolutePath()); InputStream inputStream = null; ClassWriter cw; ClassInstrumenter cv; try { inputStream = new FileInputStream(file); ClassReader cr = new ClassReader(inputStream); cw = new ClassWriter(t...
Main main = new Main();
public static void main(String[] args) { long startTime = System.currentTimeMillis(); Main main = new Main(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[...
main.parseArguments(args);
new Main(args);
public static void main(String[] args) { long startTime = System.currentTimeMillis(); Main main = new Main(); boolean hasCommandsFile = false; String commandsFileName = null; for (int i = 0; i < args.length; i++) { if (args[i].equals("--commandsfile")) { hasCommandsFile = true; commandsFileName = args[...
setSortable(true);
public RoomList() { super(new String[]{" ", "Name", "Address", "Occupants"}); getColumnModel().setColumnMargin(0); getColumnModel().getColumn(0).setMaxWidth(30); getColumnModel().getColumn(3).setMaxWidth(80); setSelectionBackground(Table.SELECTION_COLOR); ...
password = passwordDialog.getPassword("Password Required", "This group chat room requires a password to enter.", SparkRes.getImageIcon(SparkRes.LOCK_16x16), SparkManager.getMainWindow());
password = passwordDialog.getPassword("Password Required", "This group chat room requires a password to enter.", SparkRes.getImageIcon(SparkRes.LOCK_16x16), SparkManager.getFocusedComponent());
public static void autoJoinConferenceRoom(final String roomName, String roomJID, String password) { ChatManager chatManager = SparkManager.getChatManager(); final MultiUserChat groupChat = new MultiUserChat(SparkManager.getConnection(), roomJID); LocalPreferences pref = SettingsManager.getLocal...
boolean selected = treeNode.isSelected(); treeNode.dispose(); if (holder instanceof DisplayedNote) { this.treeNode = tree.addTreeNode(((DisplayedNote) holder).treeNode, this); } else { this.treeNode = tree.addRootNode(this); } treeNode.setSelected(selected);
moveTreeNode(newHolder, tree); treeNode.setSelected(true);
public void move(DisplayedNoteHolder newHolder, NoteTree tree, int index) { // Move DisplayedNote holder.removeDisplayedNote(this); holder = newHolder; holder.addDisplayedNote(this, index); // Move Note note.move(newHolder.getNoteHolder(), index); // Move Tree Node boolean selected = treeNode.isSelected(...
return "TODO";
return ClassHelper.getPackageName(className).replace('.', '/') + '/' + instrumentation.getSourceFileName();
private String getFileName(String className, CoverageData instrumentation) { // TODO: Find a better way to get this return "TODO"; //return ClassHelper.getPackageName(className).replace('.', '/') + '/' + instrumentation.getSourceFileName(); }
public NoteTreeNode(NoteTreeNode parent, DisplayedNote data) {
protected NoteTreeNode(NoteTreeNode parent, DisplayedNote data) {
public NoteTreeNode(NoteTreeNode parent, DisplayedNote data) { treeItem = new TreeItem(parent.treeItem, SWT.NONE, data.getNote().getIndex()); init(data); }
if (isSelected() == selected) { return; }
public void setSelected(boolean selected) { List<TreeItem> selectionTemp = Arrays.asList(treeItem.getParent().getSelection()); List<TreeItem> selection = new LinkedList<TreeItem>(selectionTemp); if (selected) { selection.add(treeItem); } else { selection.remove(treeItem); } TreeItem[] newSelection = selectio...
return _allCategories;
if(_allCategories==null){ return new LinkedHashMap(); } else{ return _allCategories; }
public Map getCategories() { if (_allCategories == null) { Collection cats = CategoryUtil.getCategories(); if(cats!=null && !cats.isEmpty()){ _allCategories = new LinkedHashMap(); _allCategories.put(ArticleUtil.getBundle().getLocalizedText("All categories"), "-1"); Iterator cat = cats.iterator(); ...
if(!getSearchCategory().equals("-1")){
if(!("-1").equals(getSearchCategory())){
public SearchRequest getSearchRequest(String scope, Locale locale) throws SearchException { SearchRequest s = new SearchRequest(); s.addSelection(IWSlideConstants.PROPERTY_CREATION_DATE); s.addSelection(IWSlideConstants.PROPERTY_CATEGORY); s.addScope(new SearchScope(scope)); SearchExpression whereExpression = nul...
if (e.getSource() instanceof SparkTab) { SparkTab tab = (SparkTab)e.getSource(); setSelectedTab(tab); }
public void mouseClicked(MouseEvent e) { }
if(e.isPopupTrigger()){ return; } if (e.getSource() instanceof SparkTab) { SparkTab tab = (SparkTab)e.getSource(); setSelectedTab(tab); }
public void mousePressed(MouseEvent e) { if(e.isPopupTrigger()){ return; } if (e.getSource() instanceof SparkTab) { SparkTab tab = (SparkTab)e.getSource(); setSelectedTab(tab); } }
textLabel.setFont(defaultFont);
public void setSelected(boolean selected) { super.setSelected(selected); this.selected = selected; if (boldWhenActive && selected) { textLabel.setFont(textLabel.getFont().deriveFont(Font.BOLD)); } else { textLabel.setFont(defaultFont); } invalid...
put(varName,toolType);
put(varName,tool);
WC(final Broker broker) { _broker = broker; try { String tools = (String) _broker.getValue("config","TemplateTools"); Enumeration tenum = new StringTokenizer(tools); while (tenum.hasMoreElements()) { String toolName = (String) tenum.nextElement(); try { ...
" is a " + name.getClass());
" is a " + c + ": " + v);
final public ContextTool getTool(String name) throws InvalidContextException { try { return (ContextTool) getMacro(name); } catch (ClassCastException ce) { throw new InvalidContextException("Not a tool, " + name + " is a " + name.getClass()); } }
WebContext wc = (WebContext) clone(null);
WebContext wc = (WebContext) clone();
final public WebContext clone( final HttpServletRequest req, final HttpServletResponse resp) { try { // want: new local vars, both existing tools tables, no bean, // plus store req and resp somewhere, plus existing broker WebContext wc = (WebContext) clone(null); ...
this.myName, name, desc, ignoreRegex);
this.myName, name, desc, ignoreRegexs);
public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { MethodVisitor mv = cv.visitMethod(access, name, desc, signature, exceptions); if (!instrument) return mv; return mv == null ? null : new MethodInstrumenter(classData...
final String owner, final String myName, final String myDescriptor, final Pattern ignoreRegexp)
final String owner, final String myName, final String myDescriptor, final Collection ignoreRegexs)
public MethodInstrumenter(ClassData classData, final MethodVisitor mv, final String owner, final String myName, final String myDescriptor, final Pattern ignoreRegexp) { super(mv); this.classData = classData; this.ownerClass = owner; this.myName = myName; this.myDescriptor = myDescriptor; this.ignoreRegex = i...
this.ignoreRegex = ignoreRegexp;
this.ignoreRegexs = ignoreRegexs;
public MethodInstrumenter(ClassData classData, final MethodVisitor mv, final String owner, final String myName, final String myDescriptor, final Pattern ignoreRegexp) { super(mv); this.classData = classData; this.ownerClass = owner; this.myName = myName; this.myDescriptor = myDescriptor; this.ignoreRegex = i...
int availableRows = testHeadlines.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows;
int availableRows = 0; ArticleItemBean[] articleItemBean; try { articleItemBean = (ArticleItemBean[])loadAllArticlesInFolder(new File("/Test/article/")).toArray(new ArticleItemBean[0]); availableRows = articleItemBean.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow...
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } int availableRows = testHeadlines.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = start.intValue() + nrOfRows; if (maxRow > availableR...
int maxRow = start.intValue() + nrOfRows; if (maxRow > availableRows) { maxRow = availableRows;
catch (XmlException e) { e.printStackTrace();
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } int availableRows = testHeadlines.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = start.intValue() + nrOfRows; if (maxRow > availableR...
for (int i = start.intValue(); i < maxRow; i++) { ArticleListBean a = new ArticleListBean(String.valueOf(i), testHeadlines[i], testPublished[i], testAuthors[i], testStatus[i]); if (i == 5) { a.setTestStyle("color:red"); } _dataModel.set(a, i);
catch (IOException e) { e.printStackTrace();
public void updateDataModel(Integer start, Integer rows) { if (_dataModel == null) { _dataModel = new WFDataModel(); } int availableRows = testHeadlines.length; int nrOfRows = rows.intValue(); if (nrOfRows == 0) { nrOfRows = availableRows; } int maxRow = start.intValue() + nrOfRows; if (maxRow > availableR...
searchArticlesNode.setVisibleInMenus(false);
public void addArticleViews(IWBundle bundle){ ContentViewManager cViewManager = ContentViewManager.getInstance(bundle.getApplication()); ViewNode contentNode = cViewManager.getContentNode(); DefaultViewNode articleNode = new DefaultViewNode("article",contentNode); articleNode.setJspUri(bundle.getJSPURI("createar...
classes.addAll(sourceFileData.getChildren());
classes.addAll(sourceFileData.getClasses());
public SortedSet getClasses() { SortedSet classes = new TreeSet(); Iterator iter = this.children.values().iterator(); while (iter.hasNext()) { SourceFileData sourceFileData = (SourceFileData)iter.next(); classes.addAll(sourceFileData.getChildren()); } return classes; }
_colorName = null;
final public WikiPage parse(WikiPageBuilder builder) throws ParseException { Token t; label_1: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case QUOTED_BLOCK: case BOLD: case UNDERLINE: case ITALIC: case LT: case GT: c...
Element body = (Element)webResponse.getDOM().getDocumentElement().getElementsByTagName("body").item(0); NodeList elems = body.getElementsByTagName("textarea"); response = elems.item(0).getChildNodes().item(0).getNodeValue();
NodeList list = webResponse.getDOM().getDocumentElement().getElementsByTagName("div"); int length = list.getLength(); for (int i = 0; i < length; i++) { Element element = (Element)list.item(i); if ("result_box".equals(element.getAttribute("id"))) { Node translation = element.getFirstChild(); if (translation != null) { ...
private static String useGoogleTranslator(String text, TranslationType type) { String response = null; String urlString = "http://translate.google.com/translate_t?text=" + text + "&langpair=" + type.getID(); // disable scripting to avoid requiring js.jar HttpUnitOptions.setScriptingEnabl...
return path.replace('/', '\\');
return path.replace('\\', '/');
private String getCorrectedPath(String path) { return path.replace('/', '\\'); }
if (!isRegistered) {
boolean reg = TransportManager.isRegistered(SparkManager.getConnection(), transport); if (!reg) {
private void addTransport(final Transport transport) { final StatusBar statusBar = SparkManager.getWorkspace().getStatusBar(); final JPanel commandPanel = statusBar.getCommandPanel(); final boolean isRegistered = TransportManager.isRegistered(SparkManager.getConnection(), transport); fin...
try { populateTransports(SparkManager.getConnection()); } catch (Exception e) { return; } for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence ...
SwingWorker thread = new SwingWorker() { public Object construct() { try { populateTransports(SparkManager.getConnection()); for (final Transport transport : TransportManager.getTransports()) { addTransport(transport);
public void initialize() { try { populateTransports(SparkManager.getConnection()); } catch (Exception e) { return; } for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } SparkManager.getConne...
}, new PacketTypeFilter(Presence.class));
public void initialize() { try { populateTransports(SparkManager.getConnection()); } catch (Exception e) { return; } for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } SparkManager.getConne...
public void finished() { Boolean b = (Boolean)get(); if (!b) { return; } SparkManager.getConnection().addPacketListener(new PacketListener() { public void processPacket(Packet packet) { Presence presence = (Presence)packet; Transport transport = TransportManager.getTransport(packet.getFrom()); if (transport != null) { ...
public void initialize() { try { populateTransports(SparkManager.getConnection()); } catch (Exception e) { return; } for (final Transport transport : TransportManager.getTransports()) { addTransport(transport); } SparkManager.getConne...
if (presence == null || presence.getType() == Presence.Type.UNAVAILABLE) { registered = false; }
public static boolean isRegistered(XMPPConnection con, Transport transport) { Presence presence = con.getRoster().getPresence(transport.getServiceName()); boolean registered = presence != null && presence.getMode() != null; return registered; }
dialog.setLocationRelativeTo(SparkManager.getMainWindow());
public static void registerWithService(final XMPPConnection con, final String serviceName) { final JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); final TransportRegistrationPanel regPanel = new TransportRegistrationPanel(serviceName); mainPanel.add(regPanel, Bo...
getFileSet(dir);
FileSet fileSet = getFileSet(dir); fileSet.createInclude().setName("**/*.class");
private void createFilesetForDirectory(File dir) { getFileSet(dir); }
throw new BuildException("'includeClasses' is required when 'fromClasspath' is used");
throw new BuildException("'includeClasses' is required when 'instrumentationClasspath' is used");
private void processInstrumentationClasspath() { if (includeClassesRegexs.size() == 0) { throw new BuildException("'includeClasses' is required when 'fromClasspath' is used"); } String[] sources = instrumentationClasspath.list(); for (int i = 0; i < sources.length; i++) { File fileOrDir = new File(sources[i])...
hook = (Runnable) shutdownHooks.removeFirst();
hook = (Runnable) shutdownHooks.removeLast();
private void notifyShutdownHooks() { while (!shutdownHooks.isEmpty()) { Runnable hook; synchronized (shutdownHooks) { hook = (Runnable) shutdownHooks.removeFirst(); } try { hook.run(); } catch (Throwable e) { ...
if (directive == null)
Directive d; try { d = (Directive) desc.dirClass.newInstance(); } catch (Exception e) {
public Object build(BuildContext bc) throws BuildException { if (directive == null) throw new BuildException("Error instantiating Directive object for #" + desc.name); return directive.build(this, bc); }
return directive.build(this, bc);
}; return d.build(this, bc);
public Object build(BuildContext bc) throws BuildException { if (directive == null) throw new BuildException("Error instantiating Directive object for #" + desc.name); return directive.build(this, bc); }
System.err.println ("render: >");
protected String renderGT() { System.err.println ("render: >"); return "&gt;"; }
System.err.println ("render: <");
protected String renderLT() { System.err.println ("render: <"); return "&lt;"; }
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition);
public void visitBeanDefinition(BeanDefinition beanDefinition, Object data) throws BeansException { super.visitBeanDefinition(beanDefinition, data);
public void visitBeanDefinition(BeanDefinition beanDefinition) throws BeansException { super.visitBeanDefinition(beanDefinition); if (!(beanDefinition instanceof RootBeanDefinition)) { return; } RootBeanDefinition rootBeanDefinit...
void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException;
void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry, Object data) throws BeansException;
void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry) throws BeansException;
synchronized(_clock) { if ((TIME - dateTime) > 1000) { date = new Date(TIME); } return date; }
synchronized(_lock) { if (_clock != null) { if ((TIME - dateTime) > 1000) { date = new Date(TIME); } } else { date = new Date(); } return date; }
public static Date getDate() { synchronized(_clock) { if ((TIME - dateTime) > 1000) { date = new Date(TIME); } return date; } }
public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder)
public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder, ComplexityCalculator complexity)
public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder) throws Exception { this.destinationDir = outputDir; this.finder = finder; this.projectData = projectData; CopyFiles.copy(outputDir); generatePackageList(); generateSourceFileLists(); generateOverviews(); generateSourceFiles(); }
this.complexity = complexity;
public HTMLReport(ProjectData projectData, File outputDir, FileFinder finder) throws Exception { this.destinationDir = outputDir; this.finder = finder; this.projectData = projectData; CopyFiles.copy(outputDir); generatePackageList(); generateSourceFileLists(); generateOverviews(); generateSourceFiles(); }
File sourceFile = finder.findFile(sourceFileData.getName());
File sourceFile = finder.getFileForSource(sourceFileData.getName());
private void generateSourceFile(SourceFileData sourceFileData) throws IOException { if (!sourceFileData.containsInstrumentationInfo()) { LOGGER.info("Data file does not contain instrumentation " + "information for the file " + sourceFileData.getName() + ". Ensure this class was instrumented, and this " ...
double ccn = packageData.getCCN(finder);
double ccn = complexity.getCCNForPackage(packageData);
private String generateTableRowForPackage(PackageData packageData) { StringBuffer ret = new StringBuffer(); String url1 = "frame-summary-" + packageData.getName() + ".html"; String url2 = "frame-sourcefiles-" + packageData.getName() + ".html"; double lineCoverage = -1; double branchCoverage = -1; double cc...
File file = finder.findFile(sourceFileData.getName()); if (file == null) { System.out.println("FILE IS NULL: " + sourceFileData.getName()); } double ccn = Util.getCCN(file, false);
double ccn = complexity.getCCNForSourceFile(sourceFileData);
private String generateTableRowForSourceFile(SourceFileData sourceFileData) { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; File file = finder.findFile(sourceFileData.getName()); if (file == null) { System.out.println("FILE IS NULL: " + sourceFileData.getName()); ...
double ccnSum = 0; int count = 0; for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File basedir = (File) it.next(); ccnSum += Util.getCCN(basedir.getAbsoluteFile(), true); count++; } double ccn = ccnSum / (double) count;
private String generateTableRowForTotal() { StringBuffer ret = new StringBuffer(); double lineCoverage = -1; double branchCoverage = -1; double ccnSum = 0; int count = 0; for (Iterator it = finder.getBaseDirectories().iterator(); it.hasNext(); ) { File basedir = (File) it.next(); ccnSum += Util.getCCN(base...
private void moveToOfflineGroup(String bareJID) {
private void moveToOfflineGroup(final String bareJID) {
private void moveToOfflineGroup(String bareJID) { final Iterator groupIterator = new ArrayList(groupList).iterator(); while (groupIterator.hasNext()) { final ContactGroup group = (ContactGroup)groupIterator.next(); final ContactItem item = group.getContactItemByJID(bareJID); ...
Roster roster = SparkManager.getConnection().getRoster(); Presence userPresence = roster.getPresence(bareJID); if (userPresence != null) { return; }
private void moveToOfflineGroup(String bareJID) { final Iterator groupIterator = new ArrayList(groupList).iterator(); while (groupIterator.hasNext()) { final ContactGroup group = (ContactGroup)groupIterator.next(); final ContactItem item = group.getContactItemByJID(bareJID); ...
Roster roster = SparkManager.getConnection().getRoster(); Presence userPresence = roster.getPresence(bareJID); if (userPresence != null) { return; }
public void run() { item.setPresence(null); // Check for ContactItemHandler. group.removeContactItem(item); checkGroup(group); if (offlineGroup.getContactItemByJID(item.getFullJID()) ==...
public void searchContacts(String contact, JFrame parent) {
public void searchContacts(String contact, final JFrame parent) { if (parents.get(parent) == null) { parents.put(parent, parent.getGlassPane()); } final Component glassPane = (Component)parents.get(parent); parent.setGlassPane(glassPane);
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
if (window != null) { window.dispose(); }
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
window = new JWindow(parent);
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
window.setLayout(new BorderLayout());
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
layoutPanel.add(contactField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 200, 0));
layoutPanel.add(contactField, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 50, 0));
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
window.add(layoutPanel); window.pack(); window.setLocationRelativeTo(parent); window.setVisible(true); window.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent keyEvent) { if (keyEvent.getKeyChar() == KeyEvent.VK_ESCAPE) { window.dispose(); } } });
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
window.dispose();
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
window.dispose();
parent.setGlassPane(glassPane); parent.getGlassPane().setVisible(false); contactField.dispose();
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
parent.setGlassPane(mainPanel); parent.getGlassPane().setVisible(true); contactField.focus(); mainPanel.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent mouseEvent) { parent.setGlassPane(glassPane); parent.getGlassPane().setVisible(false); contactField.dispose(); } }); parent.addWindowListene...
public void searchContacts(String contact, JFrame parent) { final Map contactMap = new HashMap(); final Set contacts = new HashSet(); final ContactList contactList = SparkManager.getWorkspace().getContactList(); Iterator groups = contactList.getContactGroups().iterator(); while (g...
setResourcePath(DEFAULT_RESOURCE_PATH);
setBaseFolderPath(DEFAULT_RESOURCE_PATH);
public ArticleListViewer() { super(); setBeanIdentifier(ARTICLE_LIST_BEAN); setResourcePath(DEFAULT_RESOURCE_PATH); }
String name = constructorArgNames[i];
Property name = new Property(constructorArgNames[i]);
private Object[] extractConstructorArgs(Map propertyValues, Class[] constructorArgTypes) { Object[] parameters = new Object[constructorArgNames.length]; for (int i = 0; i < constructorArgNames.length; i++) { String name = constructorArgNames[i]; Class type = constructorArgTypes[i...
if (name == null) throw new NullPointerException("name is null"); Object value = properties.get(name);
Object value = properties.get(new Property(name));
public Object getProperty(String name) { if (name == null) throw new NullPointerException("name is null"); Object value = properties.get(name); return value; }
return ACTION_ARRAY;
return super.getToolbarActions();
public String[] getToolbarActions(){ return ACTION_ARRAY; }
if ((ignoreRegex != null) && (pm.matches(owner, ignoreRegex))) classData.removeLine(currentLine);
Iterator iter = ignoreRegexs.iterator(); while (iter.hasNext()) { Pattern ignoreRegex = (Pattern)iter.next(); if ((ignoreRegexs != null) && (pm.matches(owner, ignoreRegex))) { classData.removeLine(currentLine); return; } }
public void visitMethodInsn(int opcode, String owner, String name, String desc) { super.visitMethodInsn(opcode, owner, name, desc); if ((ignoreRegex != null) && (pm.matches(owner, ignoreRegex))) classData.removeLine(currentLine); }
public void addNoteTab(DisplayedNote displayedNote) { new NoteTab(tabFolder, l, displayedNote);
public NoteTab addNoteTab(DisplayedNote displayedNote) { return new NoteTab(tabFolder, l, displayedNote);
public void addNoteTab(DisplayedNote displayedNote) { new NoteTab(tabFolder, l, displayedNote); }
text = new Text(parent, SWT.NONE);
tabItem.addDisposeListener(this); text = new Text(parent, SWT.MULTI | SWT.WRAP);
public NoteTab(final CTabFolder parent, Listener l, DisplayedNote displayedNote) { this.displayedNote = displayedNote; tabItem = new CTabItem(parent, SWT.NONE); tabItem.setText(displayedNote.getName()); tabItem.setData(this); text = new Text(parent, SWT.NONE); text.setText(displayedNote.getNote().getText()); ta...
l.mapEvent(tabItem, SWT.Dispose, MainController.CLOSE_TAB);
public NoteTab(final CTabFolder parent, Listener l, DisplayedNote displayedNote) { this.displayedNote = displayedNote; tabItem = new CTabItem(parent, SWT.NONE); tabItem.setText(displayedNote.getName()); tabItem.setData(this); text = new Text(parent, SWT.NONE); text.setText(displayedNote.getNote().getText()); ta...
WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT);
WFTabbedPane tb = (WFTabbedPane) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedMenuItemId(TASK_ID_EDIT);
public void processAction(ActionEvent event) { UIComponent link = event.getComponent(); String id = WFUtil.getParameter(link, "id"); WFTabBar tb = (WFTabBar) link.getParent().getParent().getParent().findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findCompo...
WFTabBar tb = (WFTabBar) findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT);
WFTabbedPane tb = (WFTabbedPane) findComponent(MAIN_TASKBAR_ID); tb.setSelectedMenuItemId(TASK_ID_EDIT);
public void setEditMode() { WFTabBar tb = (WFTabBar) findComponent(MAIN_TASKBAR_ID); tb.setSelectedButtonId(TASK_ID_EDIT); ArticleBlock ab = (ArticleBlock) tb.findComponent(ArticleBlock.ARTICLE_BLOCK_ID); ab.setEditMode(); }
return start + (int) (end *java.lang.Math.random()/(Integer.MAX_VALUE+1.0));
return start + (int)((end - start + 1) * java.lang.Math.random());
public static final int random(int start, int end) { return start + (int) (end *java.lang.Math.random()/(Integer.MAX_VALUE+1.0)); }
CGI_Impersonator cgi = new CGI_Impersonator(wc.getRequest());
CGI_Impersonator cgi = new CGI_Impersonator(wc);
public Object init(Context context) throws PropertyException { try { WebContext wc = (WebContext) context; CGI_Impersonator cgi = new CGI_Impersonator(wc.getRequest()); return cgi; } catch (ClassCastException ce) { throw new PropertyException( "CGITool ...
CGI_Impersonator(final HttpServletRequest r) { requst_ = r;
CGI_Impersonator(WebContext wc) { requst_ = wc.getRequest(); sc_ = ((ServletBroker)wc.getBroker()).getServletContext();
CGI_Impersonator(final HttpServletRequest r) { requst_ = r; }
if (System.getProperty("xbean.dir") != null) { File f = new File(System.getProperty("xbean.dir") + uri); try { return new FileInputStream(f); } catch (FileNotFoundException e) { } }
protected InputStream loadResource(String uri) { // lets try the thread context class loader first InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(uri); if (in == null) { in = getClass().getClassLoader().getResourceAsStream(uri); if (in ...