buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void run() { running = true; long totalTime = 0; long time; totalLag = 0; count = 0; while(running) { time = System.currentTimeMillis(); try { currentThread().sleep(incr); } catch(Exception e) { } time = System.currentTimeMillis() - time; totalLag += time - incr; ...
public void run() { running = true; long totalTime = 0; long time; totalLag = 0; count = 0; while(running) { time = System.currentTimeMillis(); try { Thread.sleep(incr); } catch(Exception e) { } time = System.currentTimeMillis() - time; totalLag += time - incr; count++;...
public URL getUrl() throws MalformedURLException { String pathAndQuery = null; if (this.getMethod().equals(HTTPSampler.GET) && getQueryString().length() > 0) { if (this.getPath().indexOf("?") > -1) { pathAndQuery = this.getPath() + "&" + getQueryString(); } else { pathAndQuery = this.g...
public URL getUrl() throws MalformedURLException { String pathAndQuery = null; if (this.getMethod().equals(HTTPSampler.GET) && getQueryString().length() > 0) { if (this.getPath().indexOf("?") > -1) { pathAndQuery = this.getPath() + "&" + getQueryString(); } else { pathAndQuery = this.g...
public boolean isSelected(Resource resource) { if (resource.isFilesystemOnly()) { // We have a 'resourced' file, so reconvert it and use // the 'old' implementation. FileResource fileResource = (FileResource) resource; File file = fileResource.getFile(); ...
public boolean isSelected(Resource resource) { if (resource.isFilesystemOnly()) { // We have a 'resourced' file, so reconvert it and use // the 'old' implementation. FileResource fileResource = (FileResource) resource; File file = fileResource.getFile(); ...
public void testspawn() { project.executeTarget("init"); if (project.getProperty("test.can.run") == null) { return; } myBuild = new MonitoredBuild(new File(System.getProperty("root"), BUILD_FILE), "spawn"); logFile = FILE_UTILS.createTempFile("spawn","log", projec...
public void testspawn() { project.executeTarget("init"); if (project.getProperty("test.can.run") == null) { return; } myBuild = new MonitoredBuild(new File(System.getProperty("root"), BUILD_FILE), "spawn"); logFile = FILE_UTILS.createTempFileName("spawn","log", pr...
public void testSpawn() { File logFile = FILE_UTILS.createTempFile("spawn","log", project.getBaseDir()); // this is guaranteed by FileUtils#createTempFile assertTrue("log file not existing", !logFile.exists()); project.setProperty("logFile", logFile.getAbsolutePath()); projec...
public void testSpawn() { File logFile = FILE_UTILS.createTempFileName("spawn","log", project.getBaseDir(), false); // this is guaranteed by FileUtils#createTempFile assertTrue("log file not existing", !logFile.exists()); project.setProperty("logFile", logFile.getAbsolutePath()); ...
public void testCreatePropertiesCacheViaCustomSelector() { File cachefile = FILE_UTILS.createTempFile("tmp-cache-", ".properties", null); try { // initialize test environment (called "bed") makeBed(); // Configure the selector ExtendSelector s = new ...
public void testCreatePropertiesCacheViaCustomSelector() { File cachefile = FILE_UTILS.createTempFileName("tmp-cache-", ".properties", null, false); try { // initialize test environment (called "bed") makeBed(); // Configure the selector ExtendSelect...
public final void renderComponent(final MarkupStream markupStream) { this.markupIndex = markupStream.getCurrentIndex(); // Get mutable copy of next tag final ComponentTag openTag = markupStream.getTag(); final ComponentTag tag = openTag.mutable(); // Call any tag handler onComponentTag(tag); // If we...
public final void renderComponent(final MarkupStream markupStream) { this.markupIndex = markupStream.getCurrentIndex(); // Get mutable copy of next tag final ComponentTag openTag = markupStream.getTag(); final ComponentTag tag = openTag.mutable(); // Call any tag handler onComponentTag(tag); // If we...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new GridLayout()); final ScrolledComposite sc = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); sc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setLayout(new GridLayout()); final ScrolledComposite sc = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); sc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)...
protected void onComponentTag(ComponentTag tag) { String href = tag.getString("href"); if (href.charAt(0) != '/') { WebRequestCycle hcycle = (WebRequestCycle)getRequestCycle(); String requestUrl = ((WebRequest)hcycle.getRequest()).getHttpServletRequest().getReques...
protected void onComponentTag(ComponentTag tag) { String href = tag.getString("href"); if (href.charAt(0) != '/') { WebRequestCycle hcycle = (WebRequestCycle)getRequestCycle(); String requestUrl = ((WebRequest)hcycle.getRequest()).getHttpServletRequest().getReques...
private static final boolean isPotentialXml(String postData) { try { SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser saxParser = spf.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); ErrorDetectionHandler detectionHandler = ...
private static final boolean isPotentialXml(String postData) { try { SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser saxParser = spf.newSAXParser(); XMLReader xmlReader = saxParser.getXMLReader(); ErrorDetectionHandler detectionHandler = ...
public void testDifferentWindowsDrive() { if (!Os.isFamily("windows")) { System.out.println("Test with drive letters only run on windows"); } else { try { new java.io.File("D:/").getCanonicalPath(); } catch (java.io.IOException e) { ...
public void testDifferentWindowsDrive() { if (!Os.isFamily("windows")) { System.out.println("Test with drive letters only run on windows"); } else { try { new java.io.File("D:/foo.txt").getCanonicalPath(); } catch (java.io.IOException e) { ...
protected static void validateToken(String tokenType, String content) throws InvalidDatatypeValueException { int len; if (content == null || (len = content.length()) == 0) { throw new InvalidDatatypeValueException( "The length of the content must be greater tha...
protected static void validateToken(String tokenType, String content) throws InvalidDatatypeValueException { int len; if (content == null || (len = content.length()) == 0) { throw new InvalidDatatypeValueException( "The length of the content must be greater tha...
public void init() throws BuildException { this.cpDelegate = ClasspathUtils.getDelegate(this); super.init(); } /** * Add a definition using the attributes of Definer * * @param al the ClassLoader to use * @param name the name of the definition * @param classname the...
public void init() throws BuildException { this.cpDelegate = ClasspathUtils.getDelegate(this); super.init(); } /** * Add a definition using the attributes of Definer * * @param al the ClassLoader to use * @param name the name of the definition * @param classname the...
public void testInComponentConstructor() { Component myComponent = new MyLabel(new EmptyPage(), "myLabel"); }
public void testInComponentConstructor() { new MyLabel(new EmptyPage(), "myLabel"); }
public SimplePage() { new Label(this, "myLabel", "Test Label"); WebMarkupContainer container = new WebMarkupContainer(this, "test"); container.setRenderBodyOnly(true); new Label(container, "myLabel2", "Test Label2"); Panel panel = new SimplePanel(this, "myPanel"); panel.setRenderBodyOnly(true); Bord...
public SimplePage() { new Label(this, "myLabel", "Test Label"); WebMarkupContainer container = new WebMarkupContainer(this, "test"); container.setRenderBodyOnly(true); new Label(container, "myLabel2", "Test Label2"); Panel panel = new SimplePanel(this, "myPanel"); panel.setRenderBodyOnly(true); new ...
public void test3() throws Exception { executeTest(BoxBorderTestPage_3.class, "BoxBorderTestPage_ExpectedResult_3.html"); Border border = (Border)application.getLastRenderedPage().get("border"); Form form = (Form)application.getLastRenderedPage().get("border:myForm"); TextField input = (TextField)applicatio...
public void test3() throws Exception { executeTest(BoxBorderTestPage_3.class, "BoxBorderTestPage_ExpectedResult_3.html"); application.getLastRenderedPage().get("border"); Form form = (Form)application.getLastRenderedPage().get("border:myForm"); TextField input = (TextField)application.getLastRenderedPage()....
public BoxBorderTestPage_6() { Border border1 = new BoxBorder(this, "border1"); Border border2 = new BoxBorder(border1, "border2"); }
public BoxBorderTestPage_6() { Border border1 = new BoxBorder(this, "border1"); new BoxBorder(border1, "border2"); }
public MyApplicationBorder(MarkupContainer parent, final String id) { super(parent, id); Border border = new BoxBorder(this, "boxBorder"); }
public MyApplicationBorder(MarkupContainer parent, final String id) { super(parent, id); new BoxBorder(this, "boxBorder"); }
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorPage page = (PagedTableNavigatorPage)application...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorPage page = (PagedTableNavigatorPage)application...
protected void populateItem(ListItem listItem) { String txt = (String)listItem.getModelObject(); new Label(listItem, "txt", txt); } }; PagingNavigation navigation = new PagingNavigation(this, "navigation", table); }
protected void populateItem(ListItem listItem) { String txt = (String)listItem.getModelObject(); new Label(listItem, "txt", txt); } }; new PagingNavigation(this, "navigation", table); }
public InlineTestPanel(MarkupContainer parent, String id, Page page) { super(parent, id); Fragment child = new Fragment(this, "child", "child-frag", page); }
public InlineTestPanel(MarkupContainer parent, String id, Page page) { super(parent, id); new Fragment(this, "child", "child-frag", page); }
public TreePageWithBorder() { // create a list with sublists List<Object> l1 = new ArrayList<Object>(); l1.add("test 1.1"); l1.add("test 1.2"); List<Object> l2 = new ArrayList<Object>(); l2.add("test 2.1"); l2.add("test 2.2"); l2.add("test 2.3"); List<Object> l3 = new ArrayList<Object>(); l3.add("...
public TreePageWithBorder() { // create a list with sublists List<Object> l1 = new ArrayList<Object>(); l1.add("test 1.1"); l1.add("test 1.2"); List<Object> l2 = new ArrayList<Object>(); l2.add("test 2.1"); l2.add("test 2.2"); l2.add("test 2.3"); List<Object> l3 = new ArrayList<Object>(); l3.add("...
public CharSequence transform(Component component, String output) { // Convert all text to uppercase return output.toUpperCase(); } }; Border border = new SimpleBorder(borderContainer, "myBorder"); MarkupContainer xsltContainer = new XsltOutputTransformerContainer(this, "test4"); Border bord...
public CharSequence transform(Component component, String output) { // Convert all text to uppercase return output.toUpperCase(); } }; new SimpleBorder(borderContainer, "myBorder"); MarkupContainer xsltContainer = new XsltOutputTransformerContainer(this, "test4"); Border border2 = new Simple...
public CharSequence transform(Component component, String output) { // Convert all text to uppercase return output.toUpperCase(); } }; Border border = new SimpleBorder(borderContainer, "myBorder"); Border border2 = new SimpleBorder(this, "myBorder2"); border2.setRenderBodyOnly(false); borde...
public CharSequence transform(Component component, String output) { // Convert all text to uppercase return output.toUpperCase(); } }; new SimpleBorder(borderContainer, "myBorder"); Border border2 = new SimpleBorder(this, "myBorder2"); border2.setRenderBodyOnly(false); border2.add(new Attri...
public void dragSetData(DragSourceEvent event) { MyType2 myType = new MyType2(); myType.fileName = "C:\\abc.txt"; myType.fileLength = 1000; myType.lastModified = 12312313; myType.version = "version 2"; event.data = myType; } });
public void dragSetData(DragSourceEvent event) { MyType2 myType = new MyType2(); myType.fileName = "abc.txt"; myType.fileLength = 1000; myType.lastModified = 12312313; myType.version = "version 2"; event.data = myType; } });
public int index; static final long serialVersionUID = 0L; // TODO: run serialver -show
public int index; static final long serialVersionUID = 7231059449172889781L;
public int[] selected; static final long serialVersionUID = 0L; // TODO: run serialver -show
public int[] selected; static final long serialVersionUID = 1624586163666270447L;
public Number value; static final long serialVersionUID = 0L; // TODO: run serialver -show
public Number value; static final long serialVersionUID = -465979079760740668L;
public String getUrl() { checkWidget(); return url; } int handleCallback(int nextHandler, int theEvent) { int eventKind = OS.GetEventKind(theEvent); switch (eventKind) { case OS.kEventRawKeyDown: { /* * Bug in Safari. The WebView blocks the propagation of certain Carbon events * such as kEventRawKeyDown...
public String getUrl() { checkWidget(); return url; } int handleCallback(int nextHandler, int theEvent) { int eventKind = OS.GetEventKind(theEvent); switch (eventKind) { case OS.kEventRawKeyDown: { /* * Bug in Safari. The WebView blocks the propagation of certain Carbon events * such as kEventRawKeyDown...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
package org.apache.wicket.request; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Vers...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
import org.apache.wicket.request.IRequestHandler; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apach...
public void setSelection (int index) { checkWidget (); int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0); if (!(0 <= index && index < count)) return; setSelection (index, false); } void setSelection (int index, boolean notify) { int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETC...
public void setSelection (int index) { checkWidget (); int count = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0); if (!(0 <= index && index < count)) return; setSelection (index, false); } void setSelection (int index, boolean notify) { int oldIndex = (int)/*64*/OS.SendMessage (handle, OS.TCM_GETC...
/*public*/ void setTabItemList (ToolItem [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { ToolItem item = tabList [i]; if (item == null) error (SWT.ERROR_INVALID_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) err...
/*public*/ void setTabItemList (ToolItem [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { ToolItem item = tabList [i]; if (item == null) error (SWT.ERROR_INVALID_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) err...
public void test_setTextLjava_lang_String() { try { treeItem.setText(null); fail("No exception thrown for string == null"); } catch (IllegalArgumentException e) { } }
public void test_setTextLjava_lang_String() { try { treeItem.setText((String)null); fail("No exception thrown for string == null"); } catch (IllegalArgumentException e) { } }
public Object component(Component component) { component.invalidateMarkupStreamPosition(); return IVisitor.CONTINUE_TRAVERSAL; } }); } this.markupStream = markupStream; }
public Object component(Component component) { component.setRequiresFullRender(true); return IVisitor.CONTINUE_TRAVERSAL; } }); } this.markupStream = markupStream; }
public void run() { traverse(SWT.TRAVERSE_TAB_PREVIOUS); } }); return XPCOM.NS_OK; } /* nsIContextMenuListener */ int /*long*/ OnShowContextMenu(int /*long*/ aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) { nsIDOMEvent domEvent = new nsIDOMEvent(aEvent); int /*long*/[] result = new int /*lon...
public void run() { traverse(SWT.TRAVERSE_TAB_PREVIOUS); } }); return XPCOM.NS_OK; } /* nsIContextMenuListener */ int /*long*/ OnShowContextMenu(int /*long*/ aContextFlags, int /*long*/ aEvent, int /*long*/ aNode) { nsIDOMEvent domEvent = new nsIDOMEvent(aEvent); int /*long*/[] result = new int /*lon...
public void test4() { expectLog("test4", "Warning: src == dest"); }
public void test4() { expectLog("test4", "DEPRECATED - The copydir task is deprecated. Use copy instead.Warning: src == dest"); }
public void test4() { expectLog("test4", "Warning: src == dest"); }
public void test4() { expectLog("test4", "DEPRECATED - The copyfile task is deprecated. Use copy instead.Warning: src == dest"); }
public ContainerInfo(final MarkupContainer container) { this(container.getClass(), container.getLocale(), container.getStyle(), container.getVariation(), container.getMarkupType()); }
public ContainerInfo(final MarkupContainer container) { this(container.getClass(), container.getLocale(), container.getStyle(), container.getVariation(), container.getMarkupType().getExtension()); }
public String getCacheKey(final MarkupContainer container, final Class<?> clazz) { final String classname = clazz.getName(); final Locale locale = container.getLocale(); final String style = container.getStyle() + "_" + container.getVariation(); final String markupType = container.getMarkupType(); final Ap...
public String getCacheKey(final MarkupContainer container, final Class<?> clazz) { final String classname = clazz.getName(); final Locale locale = container.getLocale(); final String style = container.getStyle() + "_" + container.getVariation(); final String markupType = container.getMarkupType().getExtension...
public IResourceStream getMarkupResourceStream(final MarkupContainer container, Class<?> containerClass) { // Get locator to search for the resource final IResourceStreamLocator locator = Application.get() .getResourceSettings() .getResourceStreamLocator(); String style = container.getStyle(); String...
public IResourceStream getMarkupResourceStream(final MarkupContainer container, Class<?> containerClass) { // Get locator to search for the resource final IResourceStreamLocator locator = Application.get() .getResourceSettings() .getResourceStreamLocator(); String style = container.getStyle(); String...
protected void doFileOperations() { if (fileCopyMap.size() > 0) { // files to move log("Moving " + fileCopyMap.size() + " files to " + destDir.getAbsolutePath() ); Enumeration e = fileCopyMap.keys(); while (e.hasMoreElements()) { String...
protected void doFileOperations() { if (fileCopyMap.size() > 0) { // files to move log("Moving " + fileCopyMap.size() + " files to " + destDir.getAbsolutePath() ); Enumeration e = fileCopyMap.keys(); while (e.hasMoreElements()) { String...
public void setInputSource(XMLInputSource inputSource) throws IOException { fEntityManager.setEntityHandler(this); fEntityManager.startEntity("$fragment$", inputSource, false); fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId()); } // setInputSource(XMLInputSourc...
public void setInputSource(XMLInputSource inputSource) throws IOException { fEntityManager.setEntityHandler(this); fEntityManager.startEntity("$fragment$", inputSource, false, true); fDocumentSystemId = fEntityManager.expandSystemId(inputSource.getSystemId()); } // setInputSource(XMLInpu...
private static String currentPage; static { commands.add(ActionNames.HELP); helpDoc = new HtmlPane(); scroller = new JScrollPane(helpDoc); helpDoc.setEditable(false); try { helpDoc.setPage(HELP_PAGE); currentPage = HELP_PAGE; } catch (IOEx...
private static String currentPage; static { commands.add(ActionNames.HELP); helpDoc = new HtmlPane(); scroller = new JScrollPane(helpDoc); helpDoc.setEditable(false); try { helpDoc.setPage(HELP_PAGE); currentPage = HELP_PAGE; } catch (Exce...
public GenericResultObjectProvider(Class pcClass, JDBCStore store, JDBCFetchConfiguration fetch, Result res) { this(store.getConfiguration().getMappingRepository().getMapping (pcClass, store.getContext().getClassLoader(), true), store, fetch, res); }
public GenericResultObjectProvider(Class pcClass, JDBCStore store, JDBCFetchConfiguration fetch, Result res) { this(store.getConfiguration().getMappingRepositoryInstance().getMapping (pcClass, store.getContext().getClassLoader(), true), store, fetch, res); }
private void synchronizeMappings(ClassLoader loader) { JDBCConfiguration conf = (JDBCConfiguration) getConfiguration(); String action = conf.getSynchronizeMappings(); if (action == null || action.length() == 0) return; Collection classes = conf.getMetaDataRepository(). ...
private void synchronizeMappings(ClassLoader loader) { JDBCConfiguration conf = (JDBCConfiguration) getConfiguration(); String action = conf.getSynchronizeMappings(); if (action == null || action.length() == 0) return; Collection classes = conf.getMetaDataRepositoryInsta...
public void initialize(Select sel, JDBCStore store, Object[] params, Map contains) { // note that we tell the path to go ahead and join to its related // object (if any) in order to access its class indicator _path.initialize(sel, store, false); _path.joinRelation(); ...
public void initialize(Select sel, JDBCStore store, Object[] params, Map contains) { // note that we tell the path to go ahead and join to its related // object (if any) in order to access its class indicator _path.initialize(sel, store, false); _path.joinRelation(); ...
public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(true); conf.instantiateAll(); // avoid threading issues PCClassFileTransformer transformer = new PCClassFileTransformer (new M...
public ClassLoader getClassLoader(Class context, ClassLoader env) { return tmpLoader; } }); conf.setReadOnly(true); conf.instantiateAll(); // avoid threading issues PCClassFileTransformer transformer = new PCClassFileTransformer (conf....
protected void executeOn(String[] files) throws IOException { flags.directory = (dirName == null) ? null : Files.getFile(dirName, getClassLoader()); OpenJPAConfiguration conf = (OpenJPAConfiguration) getConfiguration(); MetaDataRepository repos = new MetaDataRepository(co...
protected void executeOn(String[] files) throws IOException { flags.directory = (dirName == null) ? null : Files.getFile(dirName, getClassLoader()); OpenJPAConfiguration conf = (OpenJPAConfiguration) getConfiguration(); MetaDataRepository repos = conf.newMetaDataRepositor...
public void rollback() { try { super.rollback(); } finally { _inserts = null; _updates = null; _deletes = null; } } /** * Evict all members of the given classes. */ private void evictTypes(Collection classes) { if...
public void rollback() { try { super.rollback(); } finally { _inserts = null; _updates = null; _deletes = null; } } /** * Evict all members of the given classes. */ private void evictTypes(Collection classes) { if...
public void setContext(QueryContext qctx) { _query.setContext(qctx); _sctx = qctx.getStoreContext(); _repos = _sctx.getConfiguration().getMetaDataRepository(); }
public void setContext(QueryContext qctx) { _query.setContext(qctx); _sctx = qctx.getStoreContext(); _repos = _sctx.getConfiguration().getMetaDataRepositoryInstance(); }
private static QueryKey createKey(QueryContext q, boolean packed, Class candidateClass, boolean subclasses, long startIdx, long endIdx) { if (candidateClass == null) return null; // can only cache datastore queries if (q.getCandidateCollection() != null) retu...
private static QueryKey createKey(QueryContext q, boolean packed, Class candidateClass, boolean subclasses, long startIdx, long endIdx) { if (candidateClass == null) return null; // can only cache datastore queries if (q.getCandidateCollection() != null) retu...
public Object getResultObject() throws Exception { Class type = getPCType(); MetaDataRepository repos = ctx.getConfiguration(). getMetaDataRepository(); ClassMetaData meta = repos.getMetaData (type, ctx.getClassLoader(), true); Object oid = getObjectI...
public Object getResultObject() throws Exception { Class type = getPCType(); MetaDataRepository repos = ctx.getConfiguration(). getMetaDataRepositoryInstance(); ClassMetaData meta = repos.getMetaData (type, ctx.getClassLoader(), true); Object oid = ge...
private static Class getFactoryClass(ConfigurationProvider conf, ClassLoader loader) { if (loader == null) loader = Thread.currentThread().getContextClassLoader(); Object cls = BrokerFactoryValue.getBrokerFactoryClassName(conf); if (cls instanceof Class) retu...
private static Class getFactoryClass(ConfigurationProvider conf, ClassLoader loader) { if (loader == null) loader = Thread.currentThread().getContextClassLoader(); Object cls = BrokerFactoryValue.get(conf); if (cls instanceof Class) return (Class) cls; ...
public DetachManager(BrokerImpl broker, boolean full, OpCallbacks call) { _broker = broker; _proxy = broker.getConfiguration().getProxyManagerInstance(); _opts = broker.getConfiguration().getDetachStateInstance(); _copy = !full; _flushed = full; _call = call; ...
public DetachManager(BrokerImpl broker, boolean full, OpCallbacks call) { _broker = broker; _proxy = broker.getConfiguration().getProxyManagerInstance(); _opts = broker.getConfiguration().getDetachStateInstance(); _copy = !full; _flushed = full; _call = call; ...
protected Object getDetachedObjectId(AttachManager manager, Object toAttach) { if (toAttach == null) return null; PersistenceCapable pc = (PersistenceCapable) toAttach; Broker broker = manager.getBroker(); ClassMetaData meta = broker.getConfiguration(). ...
protected Object getDetachedObjectId(AttachManager manager, Object toAttach) { if (toAttach == null) return null; PersistenceCapable pc = (PersistenceCapable) toAttach; Broker broker = manager.getBroker(); ClassMetaData meta = broker.getConfiguration(). ...
public DetachedValueStateManager(Object pc, StoreContext ctx) { this((PersistenceCapable) pc, ctx.getConfiguration(). getMetaDataRepository().getMetaData(pc.getClass(), ctx.getClassLoader(), true), ctx); }
public DetachedValueStateManager(Object pc, StoreContext ctx) { this((PersistenceCapable) pc, ctx.getConfiguration(). getMetaDataRepositoryInstance().getMetaData(pc.getClass(), ctx.getClassLoader(), true), ctx); }
public Iterator iterator() { _broker.assertNontransactionalRead(); CloseableIterator citr = null; try { // create an iterator chain; add pnew objects if transactional CloseableIteratorChain chain = new CloseableIteratorChain(); boolean trans = !_ignore && ...
public Iterator iterator() { _broker.assertNontransactionalRead(); CloseableIterator citr = null; try { // create an iterator chain; add pnew objects if transactional CloseableIteratorChain chain = new CloseableIteratorChain(); boolean trans = !_ignore && ...
protected Object getDetachedObjectId(AttachManager manager, Object toAttach) { Broker broker = manager.getBroker(); ClassMetaData meta = broker.getConfiguration(). getMetaDataRepository().getMetaData(toAttach.getClass(), broker.getClassLoader(), true); return ...
protected Object getDetachedObjectId(AttachManager manager, Object toAttach) { Broker broker = manager.getBroker(); ClassMetaData meta = broker.getConfiguration(). getMetaDataRepositoryInstance().getMetaData(toAttach.getClass(), broker.getClassLoader(), true); ...
protected ClassMetaData getMetaData(Class c, boolean required, ClassLoader loader) { return resolver.getConfiguration().getMetaDataRepository(). getMetaData(c, loader, required); }
protected ClassMetaData getMetaData(Class c, boolean required, ClassLoader loader) { return resolver.getConfiguration().getMetaDataRepositoryInstance(). getMetaData(c, loader, required); }
private ClassMetaData getClassMetaData(String alias, boolean assertValid) { ClassLoader loader = getClassLoader(); MetaDataRepository repos = resolver.getConfiguration(). getMetaDataRepository(); // first check for the alias ClassMetaData cmd = repos.getMetaData(alias, l...
private ClassMetaData getClassMetaData(String alias, boolean assertValid) { ClassLoader loader = getClassLoader(); MetaDataRepository repos = resolver.getConfiguration(). getMetaDataRepositoryInstance(); // first check for the alias ClassMetaData cmd = repos.getMetaData(...
public StoreCache(EntityManagerFactoryImpl emf, DataCache cache) { _repos = emf.getConfiguration().getMetaDataRepository(); _cache = new DelegatingDataCache(cache, PersistenceExceptions.TRANSLATOR); }
public StoreCache(EntityManagerFactoryImpl emf, DataCache cache) { _repos = emf.getConfiguration().getMetaDataRepositoryInstance(); _cache = new DelegatingDataCache(cache, PersistenceExceptions.TRANSLATOR); }
protected void onAttach() { super.onBeforeRender(); // if we don't optimize, rebuild the paths on every request
protected void onAttach() { super.onAttach(); // if we don't optimize, rebuild the paths on every request
public void parseArguments(String queryString) { String[] parts = JOrphanUtils.split(queryString, "--" + getBoundary()); for (int i = 0; i < parts.length; i++) { if (parts[i].indexOf("filename=") > -1) { int index = parts[i].indexOf("name=\"") + 6; String name = parts[i].substring(index, parts[i].indexO...
public void parseArguments(String queryString) { String[] parts = JOrphanUtils.split(queryString, "--" + getBoundary()); for (int i = 0; i < parts.length; i++) { if (parts[i].indexOf("filename=") > -1) { int index = parts[i].indexOf("name=\"") + 6; String name = parts[i].substring(index, parts[i].indexO...
private WebApplication bindApplication() { // find wicket application and bind it to thread WebApplication application = (WebApplication)Application.get(filterName); if (application == null) { throw new IllegalStateException("Could not find wicket application mapped to filter: " + filterName + ". ...
private WebApplication bindApplication() { // find wicket application and bind it to thread WebApplication application = (WebApplication)Application.get(filterName); if (application == null) { throw new IllegalStateException("Could not find wicket application mapped to filter: " + filterName + ". ...
public FilterConfig getFilterConfig() { return filterConfig; } }; application.setWicketFilter(filter); hsession = new MockHttpSession(servletContext); oldThreadContext = ThreadContext.detach(); this.application = application; // FIXME some tests are leaking applications by not calling destr...
public FilterConfig getFilterConfig() { return filterConfig; } }; application.setWicketFilter(filter); hsession = new MockHttpSession(servletContext); oldThreadContext = ThreadContext.detach(); this.application = application; // FIXME some tests are leaking applications by not calling destr...
public void testLocalizer() { MockApplication dummy = new MockApplication(); dummy.setName("test-app"); dummy.setServletContext(new MockServletContext(dummy, "")); dummy.set(); dummy.initApplication(); Localizer localizer = dummy.getResourceSettings().getLocalizer(); Assert.assertNotNull("Localizer shou...
public void testLocalizer() { MockApplication dummy = new MockApplication(); dummy.setName("test-app"); dummy.setServletContext(new MockServletContext(dummy, "")); ThreadContext.setApplication(dummy); dummy.initApplication(); Localizer localizer = dummy.getResourceSettings().getLocalizer(); Assert.asser...
public IModel getNestedModel() { // TODO remove: return station; return null; } }; StringResourceModel model = new StringResourceModel("simple.text", page, wsDetachModel); application.setupRequestAndResponse(); RequestCycle cycle = new WebRequestCycle(application.getWicketSession(), applica...
public IModel getNestedModel() { // TODO remove: return station; return null; } }; StringResourceModel model = new StringResourceModel("simple.text", page, wsDetachModel); application.setupRequestAndResponse(); RequestCycle cycle = new WebRequestCycle(application.getWicketSession(), applica...
public static TestSuite suite() { TestSuite suite = new TestSuite(AllTests.class.getName()); suite.addTest(AjbrowserModuleTests.suite()); suite.addTest(AjdeModuleTests.suite()); suite.addTest(AjdocModuleTests.suite()); suite.addTest(AsmModuleTests.suite()); suite.addT...
public static TestSuite suite() { TestSuite suite = new TestSuite(AllTests.class.getName()); suite.addTest(AjbrowserModuleTests.suite()); suite.addTest(AjdeModuleTests.suite()); suite.addTest(AjdocModuleTests.suite()); suite.addTest(AsmModuleTests.suite()); suite.addT...
public StringList getLexicalPattern() { if (fPatternType == SPECIAL_PATTERN_NONE && fValidationDV != DV_INTEGER && fPatternStr == null) return StringListImpl.EMPTY_LIST; if (fLexicalPattern == null){ int size = fPatternStr == null ? 0 : fPatternStr.size(); String[] strs; if (fPatternType == SPECIAL_PAT...
public StringList getLexicalPattern() { if (fPatternType == SPECIAL_PATTERN_NONE && fValidationDV != DV_INTEGER && fPatternStr == null) return StringListImpl.EMPTY_LIST; if (fLexicalPattern == null){ int size = fPatternStr == null ? 0 : fPatternStr.size(); String[] strs; if (fPatternType == SPECIAL_PAT...
public final void handleSubmit(final RequestCycle cycle) { // Sign the user in if (properties.getString("username").equals("jonathan") && properties.getString("password").equals("password")) { cycle.getSession().setProperty("wicket.exam...
public final void handleSubmit(final RequestCycle cycle) { // Sign the user in if (properties.getString("username").equals("jonathan") && properties.getString("password").equals("password")) { cycle.getSession().setProperty("wicket.exam...
public static void main(String[] args) { TestRunner.run(SQLBigDecimalIdEntity.class); }
public static void main(String[] args) { TestRunner.run(TestSQLBigDecimalId.class); }
public static void main(String[] args) { TestRunner.run(SQLBigIntegerIdEntity.class); }
public static void main(String[] args) { TestRunner.run(TestSQLBigIntegerId.class); }
public static void main(String[] args) { TestRunner.run(SQLDateIdEntity.class); }
public static void main(String[] args) { TestRunner.run(TestSQLBigIntegerId.class); }
public void addSubResult(SampleResult subResult) { String tn = getThreadName(); if (tn.length()==0) { tn=Thread.currentThread().getName();//TODO do this more efficiently this.setThreadName(tn); } subResult.setThreadName(tn); // TODO is this really necessary? ...
public void addSubResult(SampleResult subResult) { String tn = getThreadName(); if (tn.length()==0) { tn=Thread.currentThread().getName();//TODO do this more efficiently this.setThreadName(tn); } subResult.setThreadName(tn); // TODO is this really necessary? ...
public Object run(IProgressMonitor monitor) throws Throwable { return getRemoteServiceReferences(idFilter, clazz, filter); } }; FutureStatus future = new FutureStatus(progressMonitor); Job job = new GetRemoteServiceReferencesJob(future.setter(fc), NLS.bind(Messages.RegistrySharedObject_GET_REMOTE_REF_JO...
public Object run(IProgressMonitor monitor) throws Throwable { return getRemoteServiceReferences(idFilter, clazz, filter); } }; SingleOperationFuture future = new SingleOperationFuture(progressMonitor); Job job = new GetRemoteServiceReferencesJob(future.setter(fc), NLS.bind(Messages.RegistrySharedObject...
public String getStaticLabel() { return JMeterUtils.getResString("tcp_sample_title"); }
public String getStaticLabel() { return JMeterUtils.getResString("tcp_config_title")+" (ALPHA CODE)"; }
public void copy () { checkWidget (); if ((style & SWT.SINGLE) != 0) { } else { ((NSTextView)view).copy(); } }
public void copy () { checkWidget (); if ((style & SWT.SINGLE) != 0) { } else { ((NSText)view).copy(view); } }
private static final String[] FILES = new String[] { "AssertionTestPlan.jmx", "AuthManagerTestPlan.jmx", "HeaderManagerTestPlan.jmx", "InterleaveTestPlan2.jmx", "InterleaveTestPlan.jmx", "LoopTestPlan.jmx", "Modification Manager.jmx", "OnceOnlyTestPla...
private static final String[] FILES = new String[] { "AssertionTestPlan.jmx", "AuthManagerTestPlan.jmx", "HeaderManagerTestPlan.jmx", "InterleaveTestPlan2.jmx", "InterleaveTestPlan.jmx", "LoopTestPlan.jmx", "Modification Manager.jmx", "OnceOnlyTestPla...
public byte[] toByteArray() throws SerializationException; }
public byte[] serialize() throws SerializationException; }
public Member getBackingMember() { return _backingMember.getMember(); }
public Member getBackingMember() { return (_backingMember == null) ? null : _backingMember.getMember(); }
public void pack () { checkWidget (); int width = 0; /* compute header width */ if (displayText != null) { NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (4); NSTableHeaderCell headerCell = nsColumn.headerCell (); dict.setObject (headerCell.font (), OS.NSFontAttributeName); NSString...
public void pack () { checkWidget (); int width = 0; /* compute header width */ if (displayText != null) { NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity (4); NSTableHeaderCell headerCell = nsColumn.headerCell (); dict.setObject (headerCell.font (), OS.NSFontAttributeName); NSString...
protected void onComponentTag(final ComponentTag tag) { // must be attached to <option .../> tag checkComponentTag(tag, "option"); Select select = findParent(Select.class); if (select == null) { throw new WicketRuntimeException( "SelectOption component [" + getPath() + "] cannot find ...
protected void onComponentTag(final ComponentTag tag) { // must be attached to <option .../> tag checkComponentTag(tag, "option"); AbstractSelect select = findParent(AbstractSelect.class); if (select == null) { throw new WicketRuntimeException( "SelectOption component [" + getPath() +...
public static void main(String args[]){ int port = 8081; if (args.length > 0){ port = Integer.parseInt(args[0]); } LoggingManager.setPriority("INFO"); // default level LoggingManager.setLoggingLevels(System.getProperties() ); // allow override by system properties...
public static void main(String args[]){ int port = HttpMirrorControl.DEFAULT_PORT; if (args.length > 0){ port = Integer.parseInt(args[0]); } LoggingManager.setPriority("INFO"); // default level LoggingManager.setLoggingLevels(System.getProperties() ); // allow ove...
import org.apache.avalon.framework.context.Context; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.a...
import org.apache.avalon.framework.context.Context; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.a...
import org.apache.avalon.framework.camelot.Info; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apac...
import org.apache.avalon.framework.camelot.Info; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apac...
import org.apache.avalon.framework.camelot.Registry; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org....
import org.apache.avalon.framework.camelot.Registry; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org....
public void run() throws AntException { getLogger().warn( m_message ); } }
public void execute() throws AntException { getLogger().warn( m_message ); } }
public void run() throws AntException { } }
public void execute() throws AntException { } }
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
import org.apache.avalon.framework.component.Component; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
public static final void main(String[] args) throws Exception { ISharedObjectContainerConfig config = new SOContainerConfig(IDFactory.getDefault().createGUID()); TCPClientSOContainer container = new TCPClientSOContainer(config); // now join group ID serverID = IDFactory.getDefault().createStringID(TCPServerSOC...
public static final void main(String[] args) throws Exception { ISharedObjectContainerConfig config = new SOContainerConfig(IDFactory.getDefault().createGUID()); TCPClientSOContainer container = new TCPClientSOContainer(config); // now join group ID serverID = IDFactory.getDefault().createStringID("ecftcp://lo...
protected void addInterfaceParameters(final Request request, final RequestParameters parameters) { // Format of interface target parameter is // <page-map-name>:<path>:<version>:<interface>:<behaviourId> final String requestString = request.getParameter(INTERFACE_PARAMETER_NAME); if (requestString != null) ...
protected void addInterfaceParameters(final Request request, final RequestParameters parameters) { // Format of interface target parameter is // <page-map-name>:<path>:<version>:<interface>:<behaviourId> final String requestString = request.getParameter(INTERFACE_PARAMETER_NAME); if (requestString != null) ...
public static String enterKeyAlias, enterKeyPassword, enterKeystorePassword, open, password, selectKeyFile, useKeyDescription, verifyAll, verifyKeyAlias, verifyKeyPassword, verifyKeystore, verifyKeystorePassword, wrongKeyAlgorithm; /** PageCreateCertificate externalized strings. */
public static String enterKeyAlias, enterKeyPassword, enterKeystorePassword, open, password, selectKeyFile, useKeyDescription, verifyAll, verifyKeyAlias, verifyKeyPassword, verifyKeystore, verifyKeystorePassword, wrongKeyAlgorithm, keyStoreNotFound; /** PageCreateCertificate externalized...
private void saveDataToModel() { signature.setKeystore(keystore); signature.setKeystorePassword(tKeystorePassword.getText().toCharArray()); signature.setKeyPassword(tKeyPassword.getText().toCharArray()); signature.setKeyAlias(tKeyName.getText()); if (cKeyAlgorithm.getText().e...
private void saveDataToModel() { signature.setKeystore(keyStore); signature.setKeystorePassword(tKeystorePassword.getText().toCharArray()); signature.setKeyPassword(tKeyPassword.getText().toCharArray()); signature.setKeyAlias(tKeyName.getText()); if (cKeyAlgorithm.getText().e...