buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public String renderRelativeUrl(final Url url) { Args.notNull(url, "url"); if (url.isAbsolute()) { return url.toString(); } else { List<String> baseUrlSegments = getBaseUrl().getSegments(); List<String> urlSegments = new ArrayList<String>(url.getSegments()); List<String> newSegments = new Ar...
public String renderRelativeUrl(final Url url) { Args.notNull(url, "url"); if (url.isAbsolute()) { return url.toString(); } else { List<String> baseUrlSegments = getBaseUrl().getSegments(); List<String> urlSegments = new ArrayList<String>(url.getSegments()); List<String> newSegments = new Ar...
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 its p...
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 it...
public void testXlint() throws InvalidInputException { AjdtCommand command = new AjdtCommand(); AjBuildConfig config = parser.genBuildConfig(new String[] {"-Xlint"}, messageWriter); assertTrue("", config.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)); config = parser.genBuildConfig(new String[] {"-Xlint:w...
public void testXlint() throws InvalidInputException { AjdtCommand command = new AjdtCommand(); AjBuildConfig config = parser.genBuildConfig(new String[] {"-Xlint"}, messageWriter); assertTrue("", config.getLintMode().equals(AjBuildConfig.AJLINT_DEFAULT)); config = parser.genBuildConfig(new String[] {"-Xlint:w...
public Rectangle getBounds() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); short[] bounds = new short[4]; OS.GetRegionBounds(handle, bounds); int width = bounds[3] - bounds[1]; int height = bounds[2] - bounds[0]; return new Rectangle(bounds[1], bounds[0], width, height); } NSBezierPath getPath() { ...
public Rectangle getBounds() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); short[] bounds = new short[4]; OS.GetRegionBounds(handle, bounds); int width = bounds[3] - bounds[1]; int height = bounds[2] - bounds[0]; return new Rectangle(bounds[1], bounds[0], width, height); } NSBezierPath getPath() { ...
public void setRegion (Region region) { checkWidget (); if ((style & SWT.NO_TRIM) == 0) return; if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); this.region = region; if (regionPath != null) regionPath.release(); regionPath = getPath(region); if (region != null) { window.setBackgr...
public void setRegion (Region region) { checkWidget (); if ((style & SWT.NO_TRIM) == 0) return; if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); this.region = region; if (regionPath != null) regionPath.release(); regionPath = getPath(region); if (region != null) { window.setBackgr...
public static Object ElementDefaultValidImmediate(XSTypeDecl type, Object value, ValidationContext context, ValidatedInfo vinfo) { XSSimpleType dv = null; // e-props-correct // For a string to be a valid default with respect to a type definition the appropriate case among the following mus...
public static Object ElementDefaultValidImmediate(XSTypeDecl type, Object value, ValidationContext context, ValidatedInfo vinfo) { XSSimpleType dv = null; // e-props-correct // For a string to be a valid default with respect to a type definition the appropriate case among the following mus...
public IRemoteFileSystemRequest sendDirectoryRequest(IFileID directoryID, IRemoteFileSystemListener listener) throws RemoteFileSystemException { Assert.isNotNull(directoryID); Assert.isNotNull(listener); URL url; try { url = directoryID.getURL(); } catch (final MalformedURLException e) { throw new Remo...
public IRemoteFileSystemRequest sendDirectoryRequest(IFileID directoryID, IRemoteFileSystemListener listener) throws RemoteFileSystemException { Assert.isNotNull(directoryID); Assert.isNotNull(listener); URL url; try { url = directoryID.getURL(); } catch (final MalformedURLException e) { throw new Remo...
public void setParameters(Collection parameters) throws InvalidVariableException { log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) values[i]).ex...
public synchronized void setParameters(Collection parameters) throws InvalidVariableException { log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) ...
import org.apache.wicket.ng.request.component.PageParameters; /* * 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 und...
import org.apache.wicket.ng.request.component.PageParameters; /* * 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 und...
public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { Object ob = toDataStoreValue(sm.fetchObjectField (field.getIndex()), store); if (field.getColumnIO().isUpdatable(0, ob == null)) { Row row = field.getRow(sm, store, rm, Ro...
public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm) throws SQLException { Object ob = toDataStoreValue(sm.fetchObjectField (field.getIndex()), store); if (field.getColumnIO().isUpdatable(0, ob == null)) { Row row = field.getRow(sm, store, rm, Ro...
public void onClick() { } }; linkWithLabel.setBody(Model.of("A link that provides its body with Link.setBodyLabel(someModel)")); add(linkWithLabel); }
public void onClick() { } }; linkWithLabel.setBody(Model.of("A link that provides its body with Link.setBody(someModel)")); add(linkWithLabel); }
public String open () { boolean useChooserDialog = OS.GTK_VERSION >= OS.VERSION (2, 4, 10); if (useChooserDialog) { return openChooserDialog (); } else { return openClassicDialog (); } } String openChooserDialog () { byte [] titleBytes = Converter.wcsToMbcs (null, title, true); int /*long*/ shellHandle = par...
public String open () { boolean useChooserDialog = OS.GTK_VERSION >= OS.VERSION (2, 4, 10); if (useChooserDialog) { return openChooserDialog (); } else { return openClassicDialog (); } } String openChooserDialog () { byte [] titleBytes = Converter.wcsToMbcs (null, title, true); int /*long*/ shellHandle = par...
protected boolean scanCDATASection(boolean complete) throws IOException, XNIException { // call handler if (fDocumentHandler != null) { fDocumentHandler.startCDATA(null); } while (true) { fStringBuffer.clear(); if (fEntityScanner...
protected boolean scanCDATASection(boolean complete) throws IOException, XNIException { // call handler if (fDocumentHandler != null) { fDocumentHandler.startCDATA(null); } while (true) { fStringBuffer.clear(); if (!fEntityScanne...
public int /*long*/ internal_new_GC(GCData data) { int /*long*/ drawable = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), 1, 1, 1); int /*long*/ gdkGC = OS.gdk_gc_new (drawable); if (gdkGC == 0) SWT.error (SWT.ERROR_NO_HANDLES); if (data != null) { if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int mask = SWT...
public int /*long*/ internal_new_GC(GCData data) { int /*long*/ drawable = OS.gdk_pixmap_new(OS.GDK_ROOT_PARENT(), 1, 1, 1); int /*long*/ gdkGC = OS.gdk_gc_new (drawable); if (gdkGC == 0) SWT.error (SWT.ERROR_NO_HANDLES); if (data != null) { if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int mask = SWT...
public int /*long*/ internal_new_GC(GCData data) { if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES); if (data != null) { if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT; if ((data.style & mask) != 0) { data.layout = (data.style & SWT.RIGHT_TO_LEFT) != ...
public int /*long*/ internal_new_GC(GCData data) { if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES); if (data != null) { if (isGCCreated) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int mask = SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT; if ((data.style & mask) != 0) { data.layout = (data.style & SWT.RIGHT_TO_LEFT) != ...
public int /*long*/ internal_new_GC (GCData data) { if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED); int /*long*/ root = OS.GDK_ROOT_PARENT (); int /*long*/ gdkGC = OS.gdk_gc_new (root); if (gdkGC == 0) SWT.error (SWT.ERROR_NO_HANDLES); OS.gdk_gc_set_subwindow (gdkGC, OS.GDK_INCLUDE_INFERIORS); if (data !=...
public int /*long*/ internal_new_GC (GCData data) { if (isDisposed()) SWT.error(SWT.ERROR_DEVICE_DISPOSED); int /*long*/ root = OS.GDK_ROOT_PARENT (); int /*long*/ gdkGC = OS.gdk_gc_new (root); if (gdkGC == 0) SWT.error (SWT.ERROR_NO_HANDLES); OS.gdk_gc_set_subwindow (gdkGC, OS.GDK_INCLUDE_INFERIORS); if (data !=...
public boolean isDisposed() { return handle == null; } void init(Device device, String name, int height, int style, byte[] stem) { if (height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.device = device; if (stem != null) { handle = stem; } else { byte[] description = Converter.wcsToMbcs(null, name, true)...
public boolean isDisposed() { return handle == null; } void init(Device device, String name, int height, int style, byte[] stem) { if (height < 0) SWT.error(SWT.ERROR_INVALID_ARGUMENT); this.device = device; if (stem != null) { handle = stem; } else { byte[] description = Converter.wcsToMbcs(null, name, true)...
public int /*long*/ internal_new_GC (GCData data) { checkWidget(); int /*long*/ hwnd = handle; if (data != null && data.hwnd != 0) hwnd = data.hwnd; if (data != null) data.hwnd = hwnd; int /*long*/ hDC = 0; if (data == null || data.ps == null) { hDC = OS.GetDC (hwnd); } else { hDC = OS.BeginPaint (hwnd, data...
public int /*long*/ internal_new_GC (GCData data) { checkWidget(); int /*long*/ hwnd = handle; if (data != null && data.hwnd != 0) hwnd = data.hwnd; if (data != null) data.hwnd = hwnd; int /*long*/ hDC = 0; if (data == null || data.ps == null) { hDC = OS.GetDC (hwnd); } else { hDC = OS.BeginPaint (hwnd, data...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Creates the "Style" group. */ void createStyleGroup () { orientationButtons = false; super.createStyleGroup (); /* Create the extra widgets */ readOnlyButton = new Button (styleGr...
public void controlResized(ControlEvent e) { setExampleWidgetSize (); } }); return tabFolderPage; } /** * Creates the "Style" group. */ void createStyleGroup () { orientationButtons = false; super.createStyleGroup (); /* Create the extra widgets */ readOnlyButton = new Button (styleGr...
private String name; @OneToOne(cascade = CascadeType.ALL, optional = false) @JoinColumn(name = "entityc_id", referencedColumnName = "entityc_id",
private String name; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "entityc_id", referencedColumnName = "entityc_id",
private String name; @OneToOne(cascade = CascadeType.ALL, optional = false) @JoinColumn(name = "entityd_id", referencedColumnName = "entityd_id",
private String name; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "entityd_id", referencedColumnName = "entityd_id",
public String renderUrl(final Url url) { Args.notNull(url, "url"); if (url.isAbsolute()) { return url.toString(); } else { List<String> baseUrlSegments = getBaseUrl().getSegments(); List<String> urlSegments = new ArrayList<String>(url.getSegments()); List<String> newSegments = new ArrayList<...
public String renderUrl(final Url url) { Args.notNull(url, "url"); if (url.isAbsolute()) { return url.toString(); } else { List<String> baseUrlSegments = getBaseUrl().getSegments(); List<String> urlSegments = new ArrayList<String>(url.getSegments()); List<String> newSegments = new ArrayList<...
public void test222(){ //FIXME AV - infinite loop on JRockit in m5 advice - don't know why //runTest("unreachable code generated by around advice on the execution of void methods"); }
public void test222(){ //FIXME AV - infinite loop on JRockit in m5 advice - don't know why runTest("unreachable code generated by around advice on the execution of void methods"); }
public final void invoke(final IRequestableComponent component, final IBehavior behavior) { if (!component.canCallListenerInterface()) { // just return so that we have a silent fail and just re-render the // page log.info("component not enabled or visible; ignoring call. Component: " + component); ret...
public final void invoke(final IRequestableComponent component, final IBehavior behavior) { if (!component.canCallListenerInterface()) { // just return so that we have a silent fail and just re-render the // page log.warn("component not enabled or visible; ignoring call. Component: " + component); ret...
public final String getValue() { return invalidInput == NO_INVALID_INPUT ? getModelValue() : invalidInput; }
public final String getValue() { return NO_INVALID_INPUT.equals(invalidInput) ? getModelValue() : invalidInput; }
protected void onSortChanged() { OrderByBorder.this.onSortChanged(); } }; newBorderBodyContainer(link); add(new OrderByLink.CssModifier(link, cssProvider)); }
protected void onSortChanged() { OrderByBorder.this.onSortChanged(); } }; setBorderBodyContainer(link); add(new OrderByLink.CssModifier(link, cssProvider)); }
public int handle; int style, state; Display display; EventTable eventTable; Object data; /* Global state flags */ static final int DISPOSED = 1<<0; static final int CANVAS = 1<<1; static final int KEYED_DATA = 1<<2; static final int FOCUS_FORCED = 1<<3; static final int BACKGROUND = 1<<4; static final in...
public int handle; int style, state; Display display; EventTable eventTable; Object data; /* Global state flags */ static final int DISPOSED = 1<<0; static final int CANVAS = 1<<1; static final int KEYED_DATA = 1<<2; static final int FOCUS_FORCED = 1<<3; static final int BACKGROUND = 1<<4; static final in...
public String getClassName() { return CLASSNAMES[index]; } }
public String getClassName() { return CLASSNAMES[getIndex()]; } }
public Button (Composite parent, int style) { super (parent, checkStyle (style)); } int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { NSString nsAttributeName = new NSString(arg0); if (accessible != null) { id returnObject = accessible.internal_accessibilityAttrib...
public Button (Composite parent, int style) { super (parent, checkStyle (style)); } int /*long*/ accessibilityAttributeValue (int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { NSString nsAttributeName = new NSString(arg0); if (id == view.id && accessible != null) { id returnObject = accessible.internal_ac...
public ToolItem (ToolBar parent, int style, int index) { super (parent, checkStyle (style)); this.parent = parent; parent.createItem (this, index); } int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { NSString nsAttributeName = new NSString(arg0); if (nsAttributeName...
public ToolItem (ToolBar parent, int style, int index) { super (parent, checkStyle (style)); this.parent = parent; parent.createItem (this, index); } int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) { NSString nsAttributeName = new NSString(arg0); if (nsAttributeName...
private Value getPathOrConstant(JPQLNode node) { // first check to see if the path is an enum or static field, and // if so, load it String className = assemble(node, ".", 1); Class c = resolver.classForName(className, null); if (c != null) { String fieldName = la...
private Value getPathOrConstant(JPQLNode node) { // first check to see if the path is an enum or static field, and // if so, load it String className = assemble(node, ".", 1); Class c = resolver.classForName(className, null); if (c != null) { String fieldName = la...
public void component(final Radio<T> radio, final IVisit<Radio<T>> visit) { if (radio.getValue().equals(value)) { visit.stop(radio); } } }); if (choice == null) { throw new WicketRuntimeException( "submitted http post value [" + value + "] for Rad...
public void component(final Radio<T> radio, final IVisit<Radio<T>> visit) { if (radio.getValue().equals(value)) { visit.stop(radio); } } }); if (choice == null) { throw new WicketRuntimeException( "submitted http post value [" + value + "] for Rad...
public void detachAll(OpCallbacks call, boolean flush) { beginOperation(true); try { // If a flush is desired (based on input parm), then check if the // "dirty" flag is set before calling flush(). if ((flush) && ((_flags & FLAG_FLUSH_REQUIRED) != 0)) ...
public void detachAll(OpCallbacks call, boolean flush) { beginOperation(true); try { // If a flush is desired (based on input parm), then check if the // "dirty" flag is set before calling flush(). if (flush && (_flags & FLAG_FLUSH_REQUIRED) != 0) ...
public boolean canRunInBackground() { return false; }
public boolean canRunInBackground() { return true; }
protected ValueMap decodeParameters(String urlFragment, Map urlParameters) { PageParameters params = new PageParameters(); // Add all url parameters params.putAll(urlParameters); String urlPath = urlFragment; if (urlPath.startsWith("/")) { urlPath = urlPath.substring(1); } if (urlPath.length() > 0...
protected ValueMap decodeParameters(String urlFragment, Map urlParameters) { PageParameters params = new PageParameters(); // Add all url parameters params.putAll(urlParameters); String urlPath = urlFragment; if (urlPath.startsWith("/")) { urlPath = urlPath.substring(1); } if (urlPath.length() > 0...
public void setUp() { super.setUp(Person.class, Address.class, CLEAR_TABLES); }
public void setUp() { super.setUp(DROP_TABLES, Person.class, Address.class); }
public interface IRequestEncoder extends IRequestTargetMounter /* * $Id$ $Revision: * 1.1 $ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the Licens...
public interface IRequestEncoder extends IRequestTargetMounter /* * $Id$ $Revision: * 1.1 $ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the Licens...
protected void createEnhancedXMLReport() throws BuildException { // we need a classpath element if (classPath == null) { throw new BuildException("Need a 'classpath' element."); } // and a valid one... String[] paths = classPath.list();...
protected void createEnhancedXMLReport() throws BuildException { // we need a classpath element if (classPath == null) { throw new BuildException("Need a 'classpath' element."); } // and a valid one... String[] paths = classPath.list();...
public void testGetSystemId(){ File file = null; if ( File.separatorChar == '\\' ){ file = new File("d:\\jdk"); } else { file = new File("/user/local/bin"); } String systemid = JAXPUtils.getSystemId(file); assertTrue("SystemIDs should start by ...
public void testGetSystemId(){ File file = null; if ( File.separatorChar == '\\' ){ file = new File("d:\\jdk"); } else { file = new File("/user/local/bin"); } String systemid = JAXPUtils.getSystemId(file); assertTrue("SystemIDs should start by ...
public FileListPanel(String title, String filetype) { this(title); this.filetype = filetype; init(); }
public FileListPanel(String title, String filetype) { this.title = title; this.filetype = filetype; init(); }
protected List processConnectorNodes(List connectorNodes) { List res = new ArrayList(); for(Iterator i=connectorNodes.iterator(); i.hasNext(); ) { Node n = (Node) i.next(); String ports = getAttributeValue(n,PORT_ATTR); int port = Connector.DEFAULT_PORT; if (ports != null) { try { Integer port...
protected List processConnectorNodes(List connectorNodes) { List res = new ArrayList(); for(Iterator i=connectorNodes.iterator(); i.hasNext(); ) { Node n = (Node) i.next(); String ports = getAttributeValue(n,PORT_ATTR); int port = Connector.DEFAULT_PORT; if (ports != null) { try { Integer port...
public void setWicketNamespace(final String name) { this.wicketTagName = name; if (!ComponentWicketTag.WICKET_NAMESPACE.equals(wicketTagName)) { log.info("You are using a non-standard wicket tag name: " + wicketTagName); } }
public void setWicketNamespace(final String name) { this.wicketTagName = name; if (!ComponentWicketTag.DEFAULT_WICKET_NAMESPACE.equals(wicketTagName)) { log.info("You are using a non-standard wicket tag name: " + wicketTagName); } }
public boolean isVisible () { checkWidget(); return OS.IsControlVisible (topHandle ()); }
public boolean isVisible () { checkWidget(); return getVisible () && parent.isVisible (); }
private Object getReplacementOrNull(final Component component) { return (replaceModel != null) ? replaceModel.getObject(component) : null; }
private Object getReplacementOrNull(final Component component) { return (replaceModel != null) ? replaceModel.getObject() : null; }
private String substitutePropertyExpressions(final Component component, final String string, final IModel model) { if ((string != null) && (model != null)) { return PropertyVariableInterpolator.interpolate(string, model.getObject(component)); } return string; }
private String substitutePropertyExpressions(final Component component, final String string, final IModel model) { if ((string != null) && (model != null)) { return PropertyVariableInterpolator.interpolate(string, model.getObject()); } return string; }
public List getChoices() { List choices = (this.choices != null) ? (List)this.choices.getObject(this) : null; if (choices == null) { throw new NullPointerException( "List of choices is null - Was the supplied 'Choices' model empty?"); } return choices; }
public List getChoices() { List choices = (this.choices != null) ? (List)this.choices.getObject() : null; if (choices == null) { throw new NullPointerException( "List of choices is null - Was the supplied 'Choices' model empty?"); } return choices; }
public void testComponentClone() { PropertyModel pm = new PropertyModel(new TextField("test", new Model("test")), "modelObject"); PropertyModel pm2 = (PropertyModel)Objects.cloneModel(pm); assertTrue(pm.getObject(null) == pm2.getObject(null)); }
public void testComponentClone() { PropertyModel pm = new PropertyModel(new TextField("test", new Model("test")), "modelObject"); PropertyModel pm2 = (PropertyModel)Objects.cloneModel(pm); assertTrue(pm.getObject() == pm2.getObject()); }
private static final String VERSION = "2.3.2"; static final String COPYRIGHT = "Copyright (c) 1998-2007 The Apache Software Foundation";
private static final String VERSION = "2.3.2"; static final String COPYRIGHT = "Copyright (c) 1998-2008 The Apache Software Foundation";
private void doSleep( final long millis ) { try { Thread.currentThread().sleep( millis ); } catch( InterruptedException ie ) { } }
private void doSleep( final long millis ) { try { Thread.sleep( millis ); } catch( InterruptedException ie ) { } }
public int getBytes() { return bytes; }
public int getBytes() { return bytes == 0 ? responseData.length : bytes; }
public void testRenderHomePage_2() throws Exception { executeTest(SimpleTestPage.class, "SimpleTestPageExpectedResult.html"); application.setupRequestAndResponse(); application.getAjaxSettings().setAjaxDebugModeEnabled(false); WebRequestCycle cycle = application.createRequestCycle(); Page page = applicati...
public void testRenderHomePage_2() throws Exception { executeTest(SimpleTestPage.class, "SimpleTestPageExpectedResult.html"); application.setupRequestAndResponse(); application.getDebugSettings().setAjaxDebugModeEnabled(false); WebRequestCycle cycle = application.createRequestCycle(); Page page = applicat...
public Object component(final Component component) { component.resetHeadRendered(); // Find out if this component can be rendered final boolean renderAllowed = component.isActionAuthorized(RENDER); // Authorize rendering component.setRenderAllowed(renderAllowed); return IVisitor.CONTINUE...
public Object component(final Component component) { component.resetHeadRendered(); // Find out if this component can be rendered final boolean renderAllowed = component.isActionAuthorized(RENDER); // Authorize rendering component.setRenderAllowed(renderAllowed); return IVisitor.CONTINUE...
protected void renderItem(final ListItem item) { item.render(new MarkupStream(getMarkupFragment())); }
protected void renderItem(final ListItem item) { item.render(); }
protected void renderItem(final LoopItem item) { item.render(new MarkupStream(getMarkupFragment())); } }
protected void renderItem(final LoopItem item) { item.render(); } }
protected IRequestCycleProcessor getRequestCycleProcessor() { if (requestCycleProcessor == null) { requestCycleProcessor = new CompoundRequestCycleProcessor(new WebRequestEncoder(), new WebEventProcessorStrategy()); } return requestCycleProcessor; } }
public IRequestCycleProcessor getRequestCycleProcessor() { if (requestCycleProcessor == null) { requestCycleProcessor = new CompoundRequestCycleProcessor(new WebRequestEncoder(), new WebEventProcessorStrategy()); } return requestCycleProcessor; } }
protected XMLErrorReporter fErrorReporter = null; XSDAbstractTraverser (XSDHandler handler, XMLErrorReporter errorReporter, XSAttributeChecker attrChecker) { fSchemaHandler = handler; fErrorReporter = errorReporter; fAttrC...
protected XMLErrorReporter fErrorReporter = null; XSDAbstractTraverser (XSDHandler handler, XMLErrorReporter errorReporter, XSAttributeChecker attrChecker) { fSchemaHandler = handler; fErrorReporter = errorReporter; fAttrC...
* public = anyURI * system = anyURI * {any attributes with non-schema namespace . . .}> * Content: (annotation?) * </notation> * * @version $Id$ */ class XSDNotationTraverser extends XSDAbstractTraverser{ XSDNotationTraverser (XSDHandler handler, XMLErrorReporter errorRe...
* public = anyURI * system = anyURI * {any attributes with non-schema namespace . . .}> * Content: (annotation?) * </notation> * * @version $Id$ */ class XSDNotationTraverser extends XSDAbstractTraverser{ XSDNotationTraverser (XSDHandler handler, XMLErrorReporter errorRe...
public final MarkupElement nextTag() throws ParseException { // Get the next tag from the next MarkupFilter in the chain. // If null, no more tags are available final MarkupElement tag = getParent().nextTag(); if (tag == null) { return tag; } return nextTag((ComponentTag)tag); }
public final MarkupElement nextTag() throws ParseException { // Get the next tag from the next MarkupFilter in the chain. // If null, no more tags are available final MarkupElement tag = getNextFilter().nextTag(); if (tag == null) { return tag; } return nextTag((ComponentTag)tag); }
public MarkupElement nextTag() throws ParseException { // Get the next tag. If null, no more tags are available final ComponentTag tag = (ComponentTag)getParent().nextTag(); if (tag == null) { // No more tags from the markup. // If there's still a non-simple tag left, it's an error while (stack.size(...
public MarkupElement nextTag() throws ParseException { // Get the next tag. If null, no more tags are available final ComponentTag tag = (ComponentTag)getNextFilter().nextTag(); if (tag == null) { // No more tags from the markup. // If there's still a non-simple tag left, it's an error while (stack.s...
protected final MarkupElement nextTag(ComponentTag tag) throws ParseException { // If it is not a remove tag, than we are finished if (!(tag instanceof WicketTag) || !((WicketTag)tag).isRemoveTag()) { return tag; } // remove tag must not be open-close tags if (tag.isOpenClose()) { throw new Wicke...
protected final MarkupElement nextTag(ComponentTag tag) throws ParseException { // If it is not a remove tag, than we are finished if (!(tag instanceof WicketTag) || !((WicketTag)tag).isRemoveTag()) { return tag; } // remove tag must not be open-close tags if (tag.isOpenClose()) { throw new Wicke...
public MarkupElement nextTag() throws ParseException { // Get the next tag from the markup. // If null, no more tags are available XmlTag xmlTag = (XmlTag)getParent().nextTag(); if (xmlTag == null) { return xmlTag; } final String namespace = markup.getWicketNamespace(); // If the form <tag wicket...
public MarkupElement nextTag() throws ParseException { // Get the next tag from the markup. // If null, no more tags are available XmlTag xmlTag = (XmlTag)getNextFilter().nextTag(); if (xmlTag == null) { return xmlTag; } final String namespace = markup.getWicketNamespace(); // If the form <tag wi...
public void testProblemFinder() { final MarkupParser parser = new MarkupParser("<img src=\"\"/>"); parser.appendMarkupFilter(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION), RelativePathPrefixHandler.class); try { parser.parse(); assertTrue("Should have thrown an exception", false); }...
public void testProblemFinder() { final MarkupParser parser = new MarkupParser("<img src=\"\"/>"); parser.add(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION), RelativePathPrefixHandler.class); try { parser.parse(); assertTrue("Should have thrown an exception", false); } catch (Excep...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
public void loadExistingFile() throws IOException { // inLoading = true; boolean parsedOK = false; if (new File(getFilename()).exists()) { clearVisualizer(); BufferedReader dataReader = null; BufferedInputStream bufferedInputStream = null; try { bufferedInputStream = new Buff...
public void loadExistingFile() throws IOException { // inLoading = true; boolean parsedOK = false; if (new File(getFilename()).exists()) { clearVisualizer(); BufferedReader dataReader = null; BufferedInputStream bufferedInputStream = null; try { bufferedInputStream = new Buff...
public void testPr117882_2() { // AjdeInteractionTestbed.VERBOSE=true; // AjdeInteractionTestbed.configureBuildStructureModel(true); initialiseProject("PR117882_2"); build("PR117882_2"); checkWasFullBuild(); alter("PR117882_2","inc1"); build("PR117882_2"); checkWasntFullBuild(); checkCompileWeaveCount(...
public void testPr117882_2() { // AjdeInteractionTestbed.VERBOSE=true; // AjdeInteractionTestbed.configureBuildStructureModel(true); initialiseProject("PR117882_2"); build("PR117882_2"); checkWasFullBuild(); alter("PR117882_2","inc1"); build("PR117882_2"); checkWasntFullBuild(); // checkCompileWeaveCo...
public boolean isTransparentResolver() { return true; } }; header.setRenderBodyOnly(true); try { container.autoAdd(header, markupStream); } catch (IllegalArgumentException ex) { throw new WicketRuntimeException("If the root exception says something like " ...
public boolean isTransparentResolver() { return true; } }; header.setRenderBodyOnly(true); try { container.autoAdd(header, markupStream); } catch (IllegalArgumentException ex) { throw new WicketRuntimeException("If the root exception says something like " ...
public XMLContentModel getElementContentModel(int elementDeclIndex) throws CMException { if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) return null; int chunk = elementDeclIndex >> CHUNK_SHIFT; int index = elementDeclIndex & CHUNK_MASK; XMLContentMo...
public XMLContentModel getElementContentModel(int elementDeclIndex) throws CMException { if (elementDeclIndex < 0 || elementDeclIndex >= fElementDeclCount) return null; int chunk = elementDeclIndex >> CHUNK_SHIFT; int index = elementDeclIndex & CHUNK_MASK; XMLContentMo...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; /* * Feature in GTK, GtkCheckButton and GtkRadioButton allocate * only the minimum size necessary for its child. This causes the ch...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; /* * Feature in GTK, GtkCheckButton and GtkRadioButton allocate * only the minimum size necessary for its child. This causes the ch...
public void execute() throws BuildException { if (file == null) { throw new BuildException("import requires file attribute"); } ProjectHelper helper= (ProjectHelper)project.getReference("ant.projectHelper"); Vector importStack=helper.getImportStack();...
public void execute() throws BuildException { if (file == null) { throw new BuildException("import requires file attribute"); } ProjectHelper helper= (ProjectHelper)project.getReference("ant.projectHelper"); Vector importStack=helper.getImportStack();...
public static String getVersion() { return "$Revision$"; // $NON-NLS-1$ } Mapper classMapper;
public static String getVersion() { return "$Revision$"; // $NON-NLS-1$ } private final Mapper classMapper;
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
public OpenJPAEntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map m) { PersistenceProductDerivation pd = new PersistenceProductDerivation(); try { Object poolValue = Configurations.removeProperty(EMF_POOL, m); ConfigurationProvider cp = pd.lo...
public void textSelectionChanged () { checkWidget(); // not an MSAA event } /* QueryInterface([in] iid, [out] ppvObject) * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject * must be incremented before returning. Caller is responsible for releasing ppvObject. */ in...
public void textSelectionChanged () { checkWidget(); // not an MSAA event } /* QueryInterface([in] iid, [out] ppvObject) * Ownership of ppvObject transfers from callee to caller so reference count on ppvObject * must be incremented before returning. Caller is responsible for releasing ppvObject. */ in...
protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) { HttpURLConnection conn = null; String urlStr = url.toString(); log.debug("Start : sample " + urlStr); HTTPSampleResult res = new HTTPSampleResult(); res.setMonitor(isMonitor()); res.setSampl...
protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) { HttpURLConnection conn = null; String urlStr = url.toString(); log.debug("Start : sample " + urlStr); HTTPSampleResult res = new HTTPSampleResult(); res.setMonitor(isMonitor()); res.setSampl...
public void internal_dispose_Accessible() { if (actionNames != null) actionNames.release(); actionNames = null; if (attributeNames != null) attributeNames.release(); attributeNames = null; if (parameterizedAttributeNames != null) parameterizedAttributeNames.release(); parameterizedAttributeNames = null; ...
public void internal_dispose_Accessible() { if (actionNames != null) actionNames.release(); actionNames = null; if (attributeNames != null) attributeNames.release(); attributeNames = null; if (parameterizedAttributeNames != null) parameterizedAttributeNames.release(); parameterizedAttributeNames = null; ...
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { if (region == null && background != null && background[3] == 1) { return true; } } } return super.isO...
public boolean isLayoutDeferred () { checkWidget (); return findDeferredControl () != null; } boolean isOpaque (int /*long*/ id, int /*long*/ sel) { if ((state & CANVAS) != 0) { if (id == view.id) { if (region == null && background != null && background[3] == 1) { return true; } } } return super.isO...
public ToolBar (Composite parent, int style) { super (parent, checkStyle (style)); /* * Ensure that either of HORIZONTAL or VERTICAL is set. * NOTE: HORIZONTAL and VERTICAL have the same values * as H_SCROLL and V_SCROLL so it is necessary to first * clear these bits to avoid scroll bars and then reset * the b...
public ToolBar (Composite parent, int style) { super (parent, checkStyle (style)); /* * Ensure that either of HORIZONTAL or VERTICAL is set. * NOTE: HORIZONTAL and VERTICAL have the same values * as H_SCROLL and V_SCROLL so it is necessary to first * clear these bits to avoid scroll bars and then reset * the b...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + 10; if (image != null) { int margin = 0; if (OS...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = OS.SendMessage (hwnd, OS.LVM_GETSTRINGWIDTH, 0, buffer) + Table.HEADER_MARGIN; if (image != null) { int mar...
public void itemClosed (CTabFolderEvent event) { log (eventName, event); } }); } } /** * Sets the foreground color, background color, and font * of the "Example" widgets to their default settings. * Also sets foreground and background color of the Node 1 * TreeItems to default settings. *...
public void close (CTabFolderEvent event) { log (eventName, event); } }); } } /** * Sets the foreground color, background color, and font * of the "Example" widgets to their default settings. * Also sets foreground and background color of the Node 1 * TreeItems to default settings. */ vo...
public void widgetSelected (SelectionEvent event) { Button radio = (Button) event.widget; if (radio.getSelection()) bmpType[0] = ((Integer)radio.getData()).intValue(); }; };
public void widgetSelected (SelectionEvent event) { Button radio = (Button) event.widget; if (radio.getSelection()) bmpType[0] = ((Integer)radio.getData()).intValue(); } };
public void testLoggingMode() { AjcTask task = getTask("default.lst"); task.setFailonerror(false); File logFile = new File("testLogFile1.txt"); String s = logFile.getAbsolutePath(); logFile.delete(); long initialLength = logFile.length(); task.setLog(logFile); runTest(task,null,null); long newLength ...
public void testLoggingMode() { AjcTask task = getTask("default.lst"); task.setFailonerror(false); File logFile = new File("testLogFile1.txt"); String s = logFile.getAbsolutePath(); logFile.delete(); long initialLength = logFile.length(); task.setLog(logFile); runTest(task,null,MessageHolderChecker.INF...
public void sampleOccurred(SampleEvent e) { synchronized (sampleStore) { // Locate the statistical sample colector String key = StatisticalSampleResult.getKey(e, keyOnThreadName); StatisticalSampleResult statResult = sampleTable.get(key); if (statResult == nul...
public void sampleOccurred(SampleEvent e) { synchronized (sampleStore) { // Locate the statistical sample colector String key = StatisticalSampleResult.getKey(e, keyOnThreadName); StatisticalSampleResult statResult = sampleTable.get(key); if (statResult == nul...
protected final void respond(final AjaxRequestTarget target) { onTimer(target); target.addJavascript(getJsTimeoutCall(updateInterval)); }
protected final void respond(final AjaxRequestTarget target) { onTimer(target); target.appendJavascript(getJsTimeoutCall(updateInterval)); }
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup group = findParent(CheckGroup....
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup<?> group = findParent(CheckGro...
public ColorDialog (Shell parent) { this (parent, SWT.NONE); }
public ColorDialog (Shell parent) { this (parent, SWT.APPLICATION_MODAL); }
public DirectoryDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); }
public DirectoryDialog (Shell parent) { this (parent, SWT.APPLICATION_MODAL); }
public FileDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); }
public FileDialog (Shell parent) { this (parent, SWT.APPLICATION_MODAL); }
public FontDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); }
public FontDialog (Shell parent) { this (parent, SWT.APPLICATION_MODAL); }
public ColorDialog (Shell parent) { this (parent, SWT.PRIMARY_MODAL); }
public ColorDialog (Shell parent) { this (parent, SWT.APPLICATION_MODAL); }
public UnresolvedType getOutermostType() { if (isArray() || isPrimitiveType()) return this; String sig = getSignature(); int dollar = sig.indexOf('$'); if (dollar != -1) { return UnresolvedType.forSignature(sig.substring(0, dollar) + ';'); } else { return this; } }
public UnresolvedType getOutermostType() { if (isArray() || isPrimitiveType()) return this; String sig = getErasureSignature(); int dollar = sig.indexOf('$'); if (dollar != -1) { return UnresolvedType.forSignature(sig.substring(0, dollar) + ';'); } else { return this; } }
private SampleResult sample(int redirects) { log.debug("Start : sample, redirects ="+redirects); long time = System.currentTimeMillis(); SampleResult res = new SampleResult(); URL u = null; try { u = getUrl(); res.setSampleLabel(getName());...
private SampleResult sample(int redirects) { log.debug("Start : sample, redirects ="+redirects); long time = System.currentTimeMillis(); SampleResult res = new SampleResult(); URL u = null; try { u = getUrl(); res.setSampleLabel(getName());...
public static byte[] intToByteArray(int value, int len) { if (len == 2 || len == 4) { if (len == 2 && (value < Short.MIN_VALUE || value > Short.MAX_VALUE)) { throw new IllegalArgumentException("Value outside range for signed short int."); } else { byte...
public static byte[] intToByteArray(int value, int len) { if (len == 2 || len == 4) { if (len == 2 && (value < Short.MIN_VALUE || value > Short.MAX_VALUE)) { throw new IllegalArgumentException("Value outside range for signed short int."); } else { byte...
public Rectangle computeTrim (int x, int y, int width, int height) { int topHandle = topHandle (); int clientHandle = clientHandle(); if (clientHandle != topHandle) { double currentWidth = OS.FrameworkElement_Width (topHandle); double currentHeight = OS.FrameworkElement_Height (topHandle); OS.FrameworkElement_...
public Rectangle computeTrim (int x, int y, int width, int height) { int topHandle = topHandle (); int clientHandle = clientHandle(); if (clientHandle != topHandle) { double currentWidth = OS.FrameworkElement_Width (topHandle); double currentHeight = OS.FrameworkElement_Height (topHandle); OS.FrameworkElement_...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); if ((style & SWT.ON_TOP) != 0) return new Rectangle (x, y, width, height); OS.UIElement_UpdateLayout(shellHandle); int clientX = (int) OS.Window_Left (shellHandle); int clientY = (int) OS.Window_Top (shellHandle); int w = (int) O...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); if ((style & SWT.ON_TOP) != 0) return new Rectangle (x, y, width, height); updateLayout (shellHandle); int clientX = (int) OS.Window_Left (shellHandle); int clientY = (int) OS.Window_Top (shellHandle); int w = (int) OS.FrameworkE...
public int getWidth () { checkWidget (); return (int) OS.GridViewColumn_ActualWidth (handle); } int findPart (int part) { if (!OS.FrameworkElement_IsLoaded (headerHandle)) OS.UIElement_UpdateLayout (headerHandle); int contentPresenterType = OS.ContentPresenter_typeid (); int contentPresenter = findStackPanel (hea...
public int getWidth () { checkWidget (); return (int) OS.GridViewColumn_ActualWidth (handle); } int findPart (int part) { if (!OS.FrameworkElement_IsLoaded (headerHandle)) updateLayout (headerHandle); int contentPresenterType = OS.ContentPresenter_typeid (); int contentPresenter = findStackPanel (headerHandle, co...
public TableItem (Table parent, int style, int index) { this (parent, style, index, 0); } TableItem (Table parent, int style, int index, int handle) { super (parent, style); this.parent = parent; this.handle = handle; if (handle == 0) { parent.createItem (this, index); } else { createWidget (); } } protect...
public TableItem (Table parent, int style, int index) { this (parent, style, index, 0); } TableItem (Table parent, int style, int index, int handle) { super (parent, style); this.parent = parent; this.handle = handle; if (handle == 0) { parent.createItem (this, index); } else { createWidget (); } } protect...
public Rectangle getBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); if (!OS.UIElement_IsVisible (handle)) return new Rectangle (0, 0, 0, 0); int point = OS.gcnew_Point (0, 0); ...
public Rectangle getBounds (int index) { checkWidget (); if (!parent.checkData (this)) error (SWT.ERROR_WIDGET_DISPOSED); if (!(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); if (!OS.UIElement_IsVisible (handle)) return new Rectangle (0, 0, 0, 0); int point = OS.gcnew_Point (0, 0); ...
private Driver getDriver() throws BuildException { if (driver == null) { throw new BuildException("Driver attribute must be set!", getLocation()); } Driver driverInstance = null; try { Class dc; if (classpath != null) { // check fi...
private Driver getDriver() throws BuildException { if (driver == null) { throw new BuildException("Driver attribute must be set!", getLocation()); } Driver driverInstance = null; try { Class dc; if (classpath != null) { // check fi...
public void execute() throws BuildException { if (baseDir == null) { throw new BuildException("base attribute must be set!", getLocation()); } if (!baseDir.exists()) { throw new BuildException("base does not exist!", getLocation()); } if (verify) { ...
public void execute() throws BuildException { if (baseDir == null) { throw new BuildException("base attribute must be set!", getLocation()); } if (!baseDir.exists()) { throw new BuildException("base does not exist!", getLocation()); } if (verify) { ...
private void resolveProcessor(String proc) throws Exception { if (proc.equals("trax")) { final Class clazz = loadClass(TRAX_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else if (proc.equals("xslp")) { log("DEPRECATED - xslp processor is deprecate...
private void resolveProcessor(String proc) throws Exception { if (proc.equals("trax")) { final Class clazz = loadClass(TRAX_LIAISON_CLASS); liaison = (XSLTLiaison) clazz.newInstance(); } else if (proc.equals("xslp")) { log("DEPRECATED - xslp processor is deprecate...
private void addGenICGeneratedFiles(File genericJarFile, Hashtable ejbFiles) { Java genicTask = null; // GenIC task String genicClass = null; // GenIC class (3 GenIC classes for various versions of JOnAS are supported) if ( nogenic ) { return; } genicTask = (Java) getTask().g...
private void addGenICGeneratedFiles(File genericJarFile, Hashtable ejbFiles) { Java genicTask = null; // GenIC task String genicClass = null; // GenIC class (3 GenIC classes for various versions of JOnAS are supported) if ( nogenic ) { return; } genicTask = (Java) getTask().g...