buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void fatalError(TransformerException e) { logError(e, "Fatal Error"); throw new BuildException("Fatal error during transformation", e); }
public void fatalError(TransformerException e) { logError(e, "Fatal Error"); throw new BuildException("Fatal error during transformation using " + stylesheet, e); }
protected void ant1compat(BuildHelper helper) { helper.mkdir("${bin.dir}/ant1src_copy"); helper.mkdir("${bin.dir}/ant1compat"); helper.copyFilesetRef("ant1src_tocopy", "${bin.dir}/ant1src_copy"); helper.javac("${bin.dir}/ant1src_copy:${java.dir}/antlibs/ant1compat", "${bin.dir}/ant1c...
protected void ant1compat(BuildHelper helper) { helper.mkdir("${bin.dir}/ant1src_copy"); helper.mkdir("${bin.dir}/ant1compat"); helper.copyFilesetRef("ant1src_tocopy", "${bin.dir}/ant1src_copy"); helper.javac("${bin.dir}/ant1src_copy:${java.dir}/antlibs/ant1compat", "${bin.dir}/ant1c...
public void respond(RequestCycle requestCycle) { Application.get().getRenderPageRequestHandlerDelegate(this).respond(requestCycle); }
public void respond(RequestCycle requestCycle) { Application.get().getPageRendererProvider().get(this).respond(requestCycle); }
private void resourceUrlGeneratedByResourceReference() { final ResourceReference ref = new PackageResourceReference( ParentResourceEscapePathTestPage.class, "../../../ParentResourceTest.js"); assertEquals(expectedResourceUrl(), tester.getRequestCycle().urlFor(ref)); }
private void resourceUrlGeneratedByResourceReference() { final ResourceReference ref = new PackageResourceReference( ParentResourceEscapePathTestPage.class, "../../../ParentResourceTest.js"); assertEquals(expectedResourceUrl(), tester.getLastRequestCycle().urlFor(ref)); }
private boolean verifyThreadsStopped() { boolean stoppedAll = true; Iterator iter = new HashSet(allThreads.keySet()).iterator(); while (iter.hasNext()) { Thread t = (Thread) allThreads.get(iter.next()); if (t != null && t.isAlive()) { try { ...
private boolean verifyThreadsStopped() { boolean stoppedAll = true; Iterator iter = new HashSet(allThreads.keySet()).iterator(); while (iter.hasNext()) { Thread t = (Thread) allThreads.get(iter.next()); if (t != null && t.isAlive()) { try { ...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim(x, y, width, height); NSRect rect = new NSRect (); rect.x = trim.x; rect.y = trim.y; rect.width = trim.width; rect.height = trim.height; if (window != null) { if (!fixResize()) { rect = wi...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim(x, y, width, height); NSRect rect = new NSRect (); rect.x = trim.x; rect.y = trim.y; rect.width = trim.width; rect.height = trim.height; if (window != null) { if (!fixResize()) { rect = wi...
public String toString() { StringBuffer sb = new StringBuffer("LongID["); sb.append(value).append("]"); //$NON-NLS-1$ return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer("LongID["); //$NON-NLS-1$ sb.append(value).append("]"); //$NON-NLS-1$ return sb.toString(); }
private Map<Class<?>, Object> getSpecificParameters (String fileEncoding, Collection<MetaModel> mms) { fileEncoding = OldHelper.normalizedFileEncoding (fileEncoding); final ExecutionContextImpl ctx = new ExecutionContextImpl (); ctx.setFileEncoding (fileEncoding); for (MetaModel mm:...
private Map<Class<?>, Object> getSpecificParameters (String fileEncoding, Collection<MetaModel> mms) { fileEncoding = OldHelper.normalizedFileEncoding (fileEncoding); final ExecutionContextImpl ctx = new ExecutionContextImpl (); ctx.getResourceManager().setFileEncoding (fileEncoding); ...
throw new WicketRuntimeException("Unable to load class with name: " /* * $Id$ $Revision: * 1.5 $ $Date$ * * ==================================================================== Licensed * under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. Yo...
throw new WicketRuntimeException("Unable to load class with name: " /* * $Id$ $Revision: * 1.5 $ $Date$ * * ==================================================================== Licensed * under the Apache License, Version 2.0 (the "License"); you may not use this * file except in compliance with the License. Yo...
public void setObject(Object object) { FeedbackMessages messages = get(); if (object instanceof List) { messages.setMessages((List)object); } else if (object instanceof FeedbackMessage[]) { if (object...
public void setObject(Object object) { FeedbackMessages messages = get(); if (object instanceof List) { messages.setMessages((List)object); } else if (object instanceof FeedbackMessage[]) { if (object...
PageParameters clearNamed(); /* * 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, Version 2....
PageParameters clearNamed(); /* * 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, Version 2....
public void close() { lock(); try { assertOpen(); assertNoActiveTransaction(); // remove from factory pool synchronized (_pool) { if (_pool.get(_poolKey) == this) _pool.remove(_poolKey); } /...
public void close() { lock(); try { assertOpen(); assertNoActiveTransaction(); // remove from factory pool synchronized (_pool) { if (_pool.get(_poolKey) == this) _pool.remove(_poolKey); } /...
public int getWidth () { checkWidget (); return width; } int getX () { int index = getIndex (); if (index == 0) return 0; TreeColumn previousColumn = parent.getColumns ()[index - 1]; return previousColumn.getX () + previousColumn.width; }
public int getWidth () { checkWidget (); return width; } int getX () { int index = getIndex (); if (index == 0) return -parent.horizontalOffset; TreeColumn previousColumn = parent.getColumns ()[index - 1]; return previousColumn.getX () + previousColumn.width; }
public String getString(final String key, final Component component, final IModel model, final Locale locale, final String style, final String defaultValue) throws MissingResourceException { String string = null; // Search each loader in turn and return the string if it ...
public String getString(final String key, final Component component, final IModel model, final Locale locale, final String style, final String defaultValue) throws MissingResourceException { String string = null; // Search each loader in turn and return the string if it ...
public final String get(final Component component, final String key, Locale locale, final String style) { if (locale == null) locale = Locale.getDefault(); try { final ResourceBundle bundle = ResourceBundle.getBundle(bundleName, locale); return bundle.getString(key); } catch (MissingResourceExce...
public final String loadStringResource(final Component component, final String key, Locale locale, final String style) { if (locale == null) locale = Locale.getDefault(); try { final ResourceBundle bundle = ResourceBundle.getBundle(bundleName, locale); return bundle.getString(key); } catch (Miss...
private ApplicationSettings settings = new ApplicationSettings(this); }; IStringResourceLoader loader = new ApplicationStringResourceLoader(app); Assert.assertNull("Unknown resource should return null", loader.get(component, "test.string", Locale.getDefault(), null)); }
private ApplicationSettings settings = new ApplicationSettings(this); }; IStringResourceLoader loader = new ApplicationStringResourceLoader(app); Assert.assertNull("Unknown resource should return null", loader.loadStringResource(component, "test.string", Locale.getDefault(), null)); }
protected final void validate() { validator.validate(this); } }
public final void validate() { validator.validate(this); } }
public AjaxFallbackDefaultDataTable(MarkupContainer parent, final String id, final List<IColumn> columns, SortableDataProvider dataProvider, int rowsPerPage) { this(parent, id, (IColumn[])columns.toArray(new IColumn[columns.size()]), dataProvider, rowsPerPage); }
public AjaxFallbackDefaultDataTable(MarkupContainer parent, final String id, final List<IColumn> columns, SortableDataProvider dataProvider, int rowsPerPage) { this(parent, id, columns.toArray(new IColumn[columns.size()]), dataProvider, rowsPerPage); }
private Field[] findFields(Class clazz, IFieldValueFactory factory) { List<Field> matched = new ArrayList<Field>(); while (clazz != null && !isBoundaryClass(clazz)) { Field[] fields = clazz.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { final Field field = fields[i]; if (facto...
private Field[] findFields(Class clazz, IFieldValueFactory factory) { List<Field> matched = new ArrayList<Field>(); while (clazz != null && !isBoundaryClass(clazz)) { Field[] fields = clazz.getDeclaredFields(); for (int i = 0; i < fields.length; i++) { final Field field = fields[i]; if (facto...
private void fixAnnotationsForResolvedMember(ResolvedMember rm,ResolvedMember declaredSig) { try { TypeX memberHostType = declaredSig.getDeclaringType(); ResolvedTypeX[] annotations = (ResolvedTypeX[])mapToAnnotations.get(rm); String methodName = declaredSig.getName(); // FIXME asc shouldnt really rely on s...
private void fixAnnotationsForResolvedMember(ResolvedMember rm,ResolvedMember declaredSig) { try { TypeX memberHostType = declaredSig.getDeclaringType(); ResolvedTypeX[] annotations = (ResolvedTypeX[])mapToAnnotations.get(rm); String methodName = declaredSig.getName(); // FIXME asc shouldnt really rely on s...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterVariables vars = getVariables(); long min = Long.parseLong(minimum.execute().trim()); long max = Long.parseLong(maximum.execute().trim()); long rand = min + (long) Math.random()...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterVariables vars = getVariables(); long min = Long.parseLong(minimum.execute().trim()); long max = Long.parseLong(maximum.execute().trim()); long rand = min + (long) (Math.random(...
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) { ...
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) { ...
protected void saveCache() { if (getModified() > 1) { cache.save(); setModified(0); } }
protected void saveCache() { if (getModified() > 0) { cache.save(); setModified(0); } }
public boolean isEnabled(Component component) { return true; }
public boolean isEnabled(Component component) { return component.isEnabled(); }
public void loadExistingFile() { boolean parsedOK = false, errorDetected = false; String filename = getFilename(); File file = new File(filename); if (file.exists()) { clearVisualizer(); BufferedReader dataReader = null; BufferedInputStream bufferedInputStream = null; ...
public void loadExistingFile() { boolean parsedOK = false, errorDetected = false; String filename = getFilename(); File file = new File(filename); if (file.exists()) { clearVisualizer(); BufferedReader dataReader = null; BufferedInputStream bufferedInputStream = null; ...
public void widgetSelected (SelectionEvent event) { setWidgetPageIncrement (); } }); } /** * Create a group of widgets to control the digits * attribute of the example widget. */ void createDigitsGroup() { /* Create the group */ Group digitsGroup = new Group (controlGroup, SWT.NONE); digi...
public void widgetSelected (SelectionEvent event) { setWidgetPageIncrement (); } }); } /** * Create a group of widgets to control the digits * attribute of the example widget. */ void createDigitsGroup() { /* Create the group */ Group digitsGroup = new Group (controlGroup, SWT.NONE); digi...
public int /*long*/ Show(int /*long*/ aLauncher, int /*long*/ aContext, int /*long*/ aForced) { /* * The interface for nsIHelperAppLauncher changed as of mozilla 1.8. Query the received * nsIHelperAppLauncher for the new interface, and if it is not found then fall back to * the old interface. */ nsISupports...
public int /*long*/ Show(int /*long*/ aLauncher, int /*long*/ aContext, int /*long*/ aReason) { /* * The interface for nsIHelperAppLauncher changed as of mozilla 1.8. Query the received * nsIHelperAppLauncher for the new interface, and if it is not found then fall back to * the old interface. */ nsISupports...
public void modifyTestElement(TestElement sampler) { TestElement el = urlConfigGui.createTestElement(); sampler.clear(); sampler.addTestElement(el); if (getImages.isSelected()) { ((HTTPSamplerBase)sampler).setImageParser(true); } else {...
public void modifyTestElement(TestElement sampler) { TestElement el = urlConfigGui.createTestElement(); sampler.clear(); sampler.addTestElement(el); if (getImages.isSelected()) { ((HTTPSamplerBase)sampler).setImageParser(true); } else {...
public void setFile(File file) { log("DEPRECATED - The file attribute has been renamed destfile.", Project.MSG_ERR); log("This attribute will be unsupported before Ant1.5 is released.", Project.MSG_ERR); log("Be aware that the effect of using the file attribute depen...
public void setFile(File file) { log("DEPRECATED - The file attribute has been renamed destfile.", Project.MSG_ERR); log("This attribute will be unsupported before Ant1.5 is released.", Project.MSG_ERR); log("Be aware that the effect of using the file attribute depen...
public void onException(JMSException ex) { if (log.isWarnEnabled()) log.warn(s_loc.get("jms-listener-error", _topicName), ex); if (_reconnectAttempts <= 0) return; close(); boolean connected = false; for (int i = 0; i < _reconnectAttempts; i++) { ...
public void onException(JMSException ex) { if (log.isWarnEnabled()) log.warn(s_loc.get("jms-listener-error", _topicName), ex); if (_reconnectAttempts <= 0) return; close(); boolean connected = false; for (int i = 0; !connected && i < _reconnectAttempt...
void stopTest(boolean now); /* * 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, Version 2.0...
void stopTest(boolean now); /* * 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, Version 2.0...
void stopTest(boolean now) throws RemoteException; /* * 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 Apac...
void stopTest(boolean now) throws RemoteException; /* * 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 Apac...
// otherwise, just use the public/system/base Ids else if ((is.getSystemId() != null && is.getSystemId().length() > 0) || (is.getPublicId() != null && is.getPublicId().length() > 0)) { xis = new XMLInputSource (is.getPublicId (), is.getSystemId (), is.getBaseURI ());...
// otherwise, just use the public/system/base Ids else if ((is.getSystemId() != null && is.getSystemId().length() > 0) || (is.getPublicId() != null && is.getPublicId().length() > 0)) { xis = new XMLInputSource (is.getPublicId (), is.getSystemId (), is.getBaseURI ());...
public ScrollBar getHorizontalBar () { checkWidget (); return horizontalBar; } int getScrollBarHandle (int style) { int scrollbar = 0; if (scrolledHandle != 0) { int children = OS.Panel_Children (scrolledHandle); int enumerator = OS.UIElementCollection_GetEnumerator (children); int scrollType = OS.ScrollBar_...
public ScrollBar getHorizontalBar () { checkWidget (); return horizontalBar; } int getScrollBarHandle (int style) { int scrollbar = 0; if (scrolledHandle != 0) { int children = OS.Panel_Children (scrolledHandle); int enumerator = OS.UIElementCollection_GetEnumerator (children); int scrollType = OS.ScrollBar_...
public Class<? extends Page> getHomePage() { return null; }
public Class<? extends Page> getHomePage() { return MockHomePage.class; }
public RequestCycle getRequestCycle() { return requestCycle; } }
public MockRequestCycle getRequestCycle() { return requestCycle; } }
public ColorDialog(Shell parent, int style) { super(parent, style); checkSubclass (); }
public ColorDialog(Shell parent, int style) { super (parent, checkStyle (parent, style)); checkSubclass (); }
public ColorDialog (Shell parent, int style) { super (parent, parent == null? style : checkStyle (parent, style)); checkSubclass (); }
public ColorDialog (Shell parent, int style) { super (parent, checkStyle (parent, style)); checkSubclass (); }
public DirectoryDialog (Shell parent, int style) { super (parent, parent == null? style : checkStyle (parent, style)); checkSubclass (); }
public DirectoryDialog (Shell parent, int style) { super (parent, checkStyle (parent, style)); checkSubclass (); }
public FileDialog (Shell parent, int style) { super (parent, parent == null? style : checkStyle (parent, style)); checkSubclass (); }
public FileDialog (Shell parent, int style) { super (parent, checkStyle (parent, style)); checkSubclass (); }
public FontDialog (Shell parent, int style) { super (parent, parent == null? style : checkStyle (parent, style)); checkSubclass (); }
public FontDialog (Shell parent, int style) { super (parent, checkStyle (parent, style)); checkSubclass (); }
public final void setVsspath(String vssPath) { String projectPath; if (vssPath.startsWith("vss://")) { projectPath = vssPath.substring(5); } else { projectPath = vssPath; } if (projectPath.charAt(0) == '$') { m_vssPath = projectPath; ...
public final void setVsspath(String vssPath) { String projectPath; if (vssPath.startsWith("vss://")) { projectPath = vssPath.substring(5); } else { projectPath = vssPath; } if (projectPath.startsWith(PROJECT_PREFIX)) { m_vssPath = projectP...
protected IPresence createIPresence(Presence xmppPresence) { int priority = xmppPresence.getPriority(); String status = xmppPresence.getStatus(); IPresence newPresence = new org.eclipse.ecf.presence.Presence( createIPresenceType(xmppPresence), priority, status, ...
protected IPresence createIPresence(Presence xmppPresence) { int priority = xmppPresence.getPriority(); String status = xmppPresence.getStatus(); IPresence newPresence = new org.eclipse.ecf.presence.Presence( createIPresenceType(xmppPresence), status, createIP...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int widthProperty = OS.GridViewColumn_WidthProperty (); OS.DependencyObject_ClearValue (handle, widthProperty); OS.GCHandle_Free (widthProperty); OS.UIElement_UpdateLayout (headerHandle); }
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int widthProperty = OS.GridViewColumn_WidthProperty (); OS.DependencyObject_ClearValue (handle, widthProperty); OS.GCHandle_Free (widthProperty); // OS.UIElement_UpdateLayout (headerHandle); }
public IRequestablePage getPageInstance() { if (pageInstance == null) { pageInstance = getPageInstance(pageId, pageClass, pageParameters, renderCount); if (pageInstance == null) { throw new PageExpiredException("Page expired."); } touchPageInstance(pageInstance); } return pageInstance; }...
public IRequestablePage getPageInstance() { if (pageInstance == null) { pageInstance = getPageInstance(pageId, pageClass, pageParameters, renderCount); if (pageInstance == null) { throw new PageExpiredException("Page with id '" + pageId + "' has expired."); } touchPageInstance(pageInstance); ...
public void execute(Project project) throws BuildException{ final String classname = javaCommand.getExecutable(); final Object[] argument = { javaCommand.getArguments() }; AntClassLoader loader = null; try { if (sysProperties != null) { sysProperties.set...
public void execute(Project project) throws BuildException{ final String classname = javaCommand.getExecutable(); final Object[] argument = { javaCommand.getArguments() }; AntClassLoader loader = null; try { if (sysProperties != null) { sysProperties.set...
public int OnShowContextMenu(int aContextFlags, int aEvent, int aNode) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), aContextFlags, aEvent, aNode); }
public int OnShowContextMenu(int aContextFlags, int aEvent, int aNode) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aContextFlags, aEvent, aNode); }
public int GetInterface(nsID uuid, int[] result) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), uuid, result); }
public int GetInterface(nsID uuid, int[] result) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uuid, result); }
public int Alert(int parent, char[] dialogTitle, char[] text) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), parent, dialogTitle, text); }
public int Alert(int parent, char[] dialogTitle, char[] text) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, dialogTitle, text); }
public int GetWeakReference(int[] retVal) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), retVal); }
public int GetWeakReference(int[] retVal) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), retVal); }
public int QueryReferent(nsID uuid, int[] result) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), uuid, result); }
public int QueryReferent(nsID uuid, int[] result) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), uuid, result); }
public int CreateChromeWindow(int parent, int chromeFlags, int[] _retval) { return XPCOM.VtblCall(super.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, _retval); }
public int CreateChromeWindow(int parent, int chromeFlags, int[] _retval) { return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), parent, chromeFlags, _retval); }
public static CompositeTypesystem createWithoutUml () { final CompositeTypesystem result = new CompositeTypesystem (); result.register (new EmfTypesystem ()); return result; } }
public static CompositeTypesystem createJustEmf () { final CompositeTypesystem result = new CompositeTypesystem (); result.register (new EmfTypesystem ()); return result; } }
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ((locale != null && locale != component.getLocale()) || (style != null && style.equals(component.getStyle())...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ((locale != null && locale != component.getLocale()) || (style != null && style.equals(component.getStyle())...
public void copy () { checkWidget (); OS.SendMessage (handle, OS.WM_COPY, 0, 0); } void createHandle () { super.createHandle (); state &= ~CANVAS; /* Get the text and list window procs */ int hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText != 0 && EditProc == 0) { EditProc = OS.GetWindowLong (hwnd...
public void copy () { checkWidget (); OS.SendMessage (handle, OS.WM_COPY, 0, 0); } void createHandle () { super.createHandle (); state &= ~(CANVAS | TRANSPARENT); /* Get the text and list window procs */ int hwndText = OS.GetDlgItem (handle, CBID_EDIT); if (hwndText != 0 && EditProc == 0) { EditProc = OS.Get...
public Spinner (Composite parent, int style) { super (parent, checkStyle (style)); } int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle == 0) return 0; if (hwnd == hwndText) { return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam); } if (hwnd == hwndUpDown) { return OS.CallWin...
public Spinner (Composite parent, int style) { super (parent, checkStyle (style)); } int callWindowProc (int hwnd, int msg, int wParam, int lParam) { if (handle == 0) return 0; if (hwnd == hwndText) { return OS.CallWindowProc (EditProc, hwnd, msg, wParam, lParam); } if (hwnd == hwndUpDown) { return OS.CallWin...
private static final Group key = new Group(new MetaPattern(new MetaPattern[] { namespace, MetaPattern.VARIABLE_NAME }));
private static final Group key = new Group(new MetaPattern(new MetaPattern[] { namespace, MetaPattern.XML_ATTRIBUTE_NAME }));
public static void main(String[] args) { Server server = new Server(); SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort(8080); server.setConnectors(new Connector[] { connector }); WebAppContext web = new WebAppContext(); web.setContextPath("/org.apache.wicket-examples");...
public static void main(String[] args) { Server server = new Server(); SelectChannelConnector connector = new SelectChannelConnector(); connector.setPort(8080); server.setConnectors(new Connector[] { connector }); WebAppContext web = new WebAppContext(); web.setContextPath("/wicket-examples"); web.setW...
public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() { // Test FileDialog(Shell, int) FileDialog fd; fd = new FileDialog(shell, SWT.NULL); int style = fd.getStyle(); style &= ~SWT.LEFT_TO_RIGHT; style &= ~SWT.RIGHT_TO_LEFT; assertTrue(style==SWT.NULL); fd = new FileDialog(shell, SWT.APPLICATION_MODAL...
public void test_ConstructorLorg_eclipse_swt_widgets_ShellI() { // Test FileDialog(Shell, int) FileDialog fd; fd = new FileDialog(shell, SWT.NULL); int style = fd.getStyle(); style &= ~SWT.LEFT_TO_RIGHT; style &= ~SWT.RIGHT_TO_LEFT; assertTrue(style==SWT.APPLICATION_MODAL); fd = new FileDialog(shell, SWT.APPL...
public void load(final FormComponent component) { final Cookie cookie = getCookie(component); if (cookie != null) { final String value = cookie.getValue(); if (value != null) { // Assign the retrieved/persisted value to the component component.setModelValue(value.split(";")); } } }
public void load(final FormComponent component) { final Cookie cookie = getCookie(component); if (cookie != null) { final String value = cookie.getValue(); if (value != null) { // Assign the retrieved/persisted value to the component component.setModelValue(value.split(FormComponent.VALUE_SEPAR...
private String massageResponseHeaders(SampleResult res, boolean forcedHTTPS) { String headers = res.getResponseHeaders(); String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content int contentLengthIndex=-1; boolean fixContentLength = forcedHTTPS; for (i...
private String massageResponseHeaders(SampleResult res, boolean forcedHTTPS) { String headers = res.getResponseHeaders(); String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content int contentLengthIndex=-1; boolean fixContentLength = forcedHTTPS; for (i...
public void runGUITitle() throws Exception { if (guiTitles.size() > 0) { String title = guiItem.getStaticLabel(); boolean ct =guiTitles.contains(title); if (// Is this a work in progress ? (title.indexOf("(ALPHA") == -1) && (title.indexOf("(BETA") == -1) ) {// No, not a work in...
public void runGUITitle() throws Exception { if (guiTitles.size() > 0) { String title = guiItem.getStaticLabel(); boolean ct =guiTitles.contains(title); if (// Is this a work in progress ? (title.indexOf("(ALPHA") == -1) && (title.indexOf("(BETA") == -1) ) {// No, not a work in...
public void close () { checkWidget (); closeWidget (); } void createBalloonTipHandle () { balloonTipHandle = OS.CreateWindowEx ( 0, new TCHAR (0, OS.TOOLTIPS_CLASS, true), null, OS.TTS_ALWAYSTIP | OS.TTS_NOPREFIX | OS.TTS_BALLOON, OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0, handle, 0, OS.GetModuleHand...
public void close () { checkWidget (); closeWidget (); } void createBalloonTipHandle () { balloonTipHandle = OS.CreateWindowEx ( 0, new TCHAR (0, OS.TOOLTIPS_CLASS, true), null, OS.TTS_ALWAYSTIP | OS.TTS_NOPREFIX | OS.TTS_BALLOON, OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0, handle, 0, OS.GetModuleHand...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } static Table checkNull ...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } static Table checkNull ...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } static Tree checkNull (...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } static Tree checkNull (...
protected void doTMCommit() throws SharedObjectAddAbortException { trace("doTMCommit"); //$NON-NLS-1$ // Make sure we are connected. If so then send commit message if (getSharedObject().getGroupID() != null) { sendCommit(); } // Call local committed message localCommitted(); }
protected void doTMCommit() throws SharedObjectAddAbortException { trace("doTMCommit"); //$NON-NLS-1$ // Make sure we are connected. If so then send commit message if (getSharedObject().getConnectedID() != null) { sendCommit(); } // Call local committed message localCommitted(); }
public Object clone() { return new Property(); }
public Object clone() { return new Property2(); }
public XMLMapping getXMLMetaData(FieldMetaData fmd) { return null; } }
public XMLMetaData getXMLMetaData(FieldMetaData fmd) { return null; } }
private static Logger log = LoggingManager.getLoggerForClass(); Map data; Map iterators = new HashMap(); // Hashtable dataLine;
private static Logger log = LoggingManager.getLoggerForClass(); Map data; //Map iterators = new HashMap(); // Hashtable dataLine;
public void testAdd1() throws Exception { Logger log = LoggingManager.getLoggerForClass(); Collection treePath = Arrays.asList(new String[] { "1", "2", "3", "4" }); HashTree tree = new HashTree(); log.debug("treePath = " + treePath); ...
public void testAdd1() throws Exception { Logger log = LoggingManager.getLoggerForClass(); Collection treePath = Arrays.asList(new String[] { "1", "2", "3", "4" }); HashTree tree = new HashTree(); log.debug("treePath = " + treePath); ...
protected boolean scanRootElementHook() throws IOException, XNIException { if (!fDTDValidator.hasGrammar()) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeline // ...
protected boolean scanRootElementHook() throws IOException, XNIException { if (fDTDValidator != null && !fDTDValidator.hasGrammar()) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeli...
public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); eventTable.unhook (SWT.DefaultSelection, listener); } String parse (String string) { int length =...
public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); eventTable.unhook (SWT.DefaultSelection, listener); } String parse (String string) { int length =...
public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); eventTable.unhook (SWT.DefaultSelection, listener); } String parse (String string) { int length = ...
public void removeSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (SWT.Selection, listener); eventTable.unhook (SWT.DefaultSelection, listener); } String parse (String string) { int length = ...
public String getText () { checkWidget (); return text; } void enableWidget (boolean enabled) { super.enableWidget (enabled); TextStyle linkStyle = new TextStyle (null, enabled ? linkColor : disabledColor, null); linkStyle.underline = true; for (int i = 0; i < offsets.length; i++) { Point point = offsets [i]; ...
public String getText () { checkWidget (); return text; } void enableWidget (boolean enabled) { super.enableWidget (enabled); TextStyle linkStyle = new TextStyle (null, enabled ? linkColor : disabledColor, null); linkStyle.underline = true; for (int i = 0; i < offsets.length; i++) { Point point = offsets [i]; ...
public String getText () { checkWidget (); return text; } String parse (String string) { int length = string.length (); offsets = new Point [length / 4]; ids = new String [length / 4]; mnemonics = new int [length / 4 + 1]; StringBuffer result = new StringBuffer (); char [] buffer = new char [length]; string.g...
public String getText () { checkWidget (); return text; } String parse (String string) { int length = string.length (); offsets = new Point [length / 4]; ids = new String [length / 4]; mnemonics = new int [length / 4 + 1]; StringBuffer result = new StringBuffer (); char [] buffer = new char [length]; string.g...
public String getText () { checkWidget (); return text; } void HandleClick (int sender, int e) { if (!checkEvent (e)) return; int source = OS.RoutedEventArgs_Source (e); int i = OS.FrameworkContentElement_Tag (source); OS.GCHandle_Free (source); Event event = new Event (); event.text = ids [i]; sendEvent (SWT...
public String getText () { checkWidget (); return text; } void HandleClick (int sender, int e) { if (!checkEvent (e)) return; int source = OS.RoutedEventArgs_Source (e); int i = OS.FrameworkContentElement_Tag (source); OS.GCHandle_Free (source); Event event = new Event (); event.text = ids [i]; sendEvent (SWT...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { if ((style & SWT.CALENDAR) != 0) { RECT rect = new RECT (); OS.SendMessage(handle, OS.MCM_GETMINREQRECT, 0, rect); width = rect.right; height...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { if ((style & SWT.CALENDAR) != 0) { RECT rect = new RECT (); OS.SendMessage(handle, OS.MCM_GETMINREQRECT, 0, rect); width = rect.right; height...
public void renderHead(IHeaderResponse response) { super.renderHead(response); AppendingStringBuffer asb = new AppendingStringBuffer(); asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n"); asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n"); asb.append...
public void renderHead(IHeaderResponse response) { super.renderHead(response); AppendingStringBuffer asb = new AppendingStringBuffer(); asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n"); asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n"); asb.append...
private static void processNestedProperties(Project project, Object target, Element targetElement) throws BuildException { Class targetClass = target.getClass(); NodeList list = targetElement....
private static void processNestedProperties(Project project, Object target, Element targetElement) throws BuildException { Class targetClass = target.getClass(); NodeList list = targetElement....
public Text splitText(int offset) throws DOMException { if (isReadOnly()) { throw new DOMException( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); } if (needsSyncData()) { synchronizeData(); } if (offs...
public Text splitText(int offset) throws DOMException { if (isReadOnly()) { throw new DOMException( DOMException.NO_MODIFICATION_ALLOWED_ERR, "DOM001 Modification not allowed"); } if (needsSyncData()) { synchronizeData(); } if (offs...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // The resolver is needed because the tag id is '<auto>-body' but the // body's container is border.getId() + "Body" if (tag.isWicketBodyTag()) { if (this.body == null) { throw new ...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // The resolver is needed because the tag id is '<auto>-body' but the // body's container is border.getId() + "Body" if (tag.isWicketBodyTag()) { if (this.body == null) { throw new ...
public boolean loadDefaults() { ConfigurationProvider provider = Configurations.loadDefaults (getClass().getClassLoader()); if (provider != null) provider.setInto(this); // let system properties override other defaults try { fromProperties(new Has...
public boolean loadDefaults() { ConfigurationProvider provider = Configurations.loadDefaults (getClass().getClassLoader()); if (provider != null) provider.setInto(this); // let system properties override other defaults try { fromProperties(new Has...
public void waitUntilFinished(long timeout) throws InterruptedException { synchronized(notify) { while (!finished) { notify.wait(timeout); } } }
public void waitUntilFinished(long timeout) throws InterruptedException { synchronized(notify) { if(!finished) { notify.wait(timeout); } } }
public DerbyDictionary() { platform = "Apache Derby"; validationSQL = "VALUES(1)"; stringLengthFunction = "LENGTH({0})"; substringFunctionName = "SUBSTR"; maxConstraintNameLength = 18; maxIndexNameLength = 18; maxColumnNameLength = 30; maxTableNameLen...
public DerbyDictionary() { platform = "Apache Derby"; validationSQL = "VALUES(1)"; stringLengthFunction = "LENGTH({0})"; substringFunctionName = "SUBSTR"; maxConstraintNameLength = 18; maxIndexNameLength = 18; maxColumnNameLength = 30; maxTableNameLen...
public void putNextEntry(TarEntry entry) throws IOException { if (entry.getName().length() > TarConstants.NAMELEN) { if (longFileMode == LONGFILE_GNU) { // create a TarEntry for the LongLink, the contents // of which are the entry's name TarEntry...
public void putNextEntry(TarEntry entry) throws IOException { if (entry.getName().length() >= TarConstants.NAMELEN) { if (longFileMode == LONGFILE_GNU) { // create a TarEntry for the LongLink, the contents // of which are the entry's name TarEntr...
public String getWorkflowFileName() { return "resources/workflow/incrementalcallback.mwe"; }
public String getWorkflowFileName() { return "/workflow/incrementalcallback.mwe"; }
public String getWorkflowFileName() { return "resources/workflow/incrementalfacade.mwe"; }
public String getWorkflowFileName() { return "/workflow/incrementalfacade.mwe"; }
public void run() { if (hHook != 0) OS.UnhookWindowsHookEx(hHook); if (callback != null) callback.dispose(); } }); } static int /*long*/ getMsgProc(int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) { Display display = Display.getCurrent(); if (display == null) return 0; LONG hHook = (LONG)displ...
public void run() { if (hHook != 0) OS.UnhookWindowsHookEx(hHook); if (callback != null) callback.dispose(); } }); } static int /*long*/ getMsgProc(int /*long*/ code, int /*long*/ wParam, int /*long*/ lParam) { Display display = Display.getCurrent(); if (display == null) return 0; LONG hHook = (LONG)displ...
public void testRenderHomePage_1() throws Exception { boolean hit = false; try { executeTest(PanelPage_1.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().contains("Expected close tag for ")); assertTrue(mex....
public void testRenderHomePage_1() throws Exception { boolean hit = false; try { executeTest(PanelPage_1.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().contains("Tag does not have a close tag")); assertTru...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // If <wicket:...> if (tag instanceof WicketTag) { final WicketTag wTag = (WicketTag)tag; // If <wicket:fragment ...> if (wTag.isFragementTag(markupStream.getWicketNamespace())) { ...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // If <wicket:...> if (tag instanceof WicketTag) { final WicketTag wTag = (WicketTag)tag; // If <wicket:fragment ...> if (wTag.isFragementTag()) { // skip the markup associated ...
public TypeBinding makeTypeBinding(TypeX typeX) { //System.out.println("in: " + typeX.getSignature() + " have: " + addedTypeBindings); TypeBinding ret = (TypeBinding)addedTypeBindings.get(typeX); if (ret != null) return ret; if (typeX.isPrimitive()) { if (typeX == ResolvedTypeX.BOOLEAN) return BaseTypes....
public TypeBinding makeTypeBinding(TypeX typeX) { //System.out.println("in: " + typeX.getSignature() + " have: " + addedTypeBindings); TypeBinding ret = (TypeBinding)addedTypeBindings.get(typeX); if (ret != null) return ret; if (typeX.isPrimitive()) { if (typeX == ResolvedTypeX.BOOLEAN) return BaseTypes....
public void widgetSelected (SelectionEvent event) { recreateExampleWidgets (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayou...
public void widgetSelected (SelectionEvent event) { recreateExampleWidgets (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayou...
protected boolean isValidOs() { return getOs() == null && getOsFamily() == null ? Os.isFamily(Os.WINDOWS) : super.isValidOs(); }
protected boolean isValidOs() { return getOs() == null && getOsFamily() == null ? Os.isFamily(Os.FAMILY_WINDOWS) : super.isValidOs(); }
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public void showItem (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item, true); } void showItem (TreeItem item, boolean scroll) { TreeItem parentItem = item.parentItem; if (parentItem != n...
public void showItem (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item, true); } void showItem (TreeItem item, boolean scroll) { TreeItem parentItem = item.parentItem; if (parentItem != n...
public void run() { BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(is)); String line = null; while ((line = br.readLine()) != null) { buffer.append(line); buffer.append("\r\n"); ...
public void run() { BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(is)); // default charset String line = null; while ((line = br.readLine()) != null) { buffer.append(line); buffer.append("...
public void testStructureModel() { // AsmManager.setReporting("c:/debug.txt",true,true,true,true); runTest("declare all annotations on one class - source weaving"); if (getCurrentTest().canRunOnThisVM()) { IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement ipe = top.fi...
public void testStructureModel() { // AsmManager.setReporting("c:/debug.txt",true,true,true,true); runTest("declare all annotations on one class - source weaving"); if (getCurrentTest().canRunOnThisVM()) { IHierarchy top = AsmManager.getDefault().getHierarchy(); IProgramElement ipe = top.fi...
public void handleEvent(Event event) { trace("handleEvent("+event+")"); if (event instanceof ISharedObjectActivatedEvent) { ISharedObjectActivatedEvent ae = (ISharedObjectActivatedEvent) event; ID myID = getID(); if (myID == null) return; if (myID.equals(a...
public void handleEvent(Event event) { trace("handleEvent("+event+")"); if (event instanceof ISharedObjectActivatedEvent) { ISharedObjectActivatedEvent ae = (ISharedObjectActivatedEvent) event; ID myID = getID(); if (myID == null) return; if (myID.equals(a...
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(AnnotationFactoryTest.class); suite.addTestSuite(AnnotationsTest.class); suite.addTestSuite(ParamValuePairImplTest.class); suite.addTestSuite(ComplexAnnotationImplTest.class); suit...
public static Test suite() { TestSuite suite = new TestSuite(); suite.addTestSuite(AnnotationFactoryTest.class); suite.addTestSuite(AnnotationsTest.class); suite.addTestSuite(ParamValuePairImplTest.class); suite.addTestSuite(ComplexAnnotationImplTest.class); suit...
public static final String DEFAULT_PARSER = "org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser"; // $NON-NLS-1$
public static final String DEFAULT_PARSER = "org.apache.jmeter.protocol.http.parser.HtmlParserHTMLParser"; // $NON-NLS-1$