buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public Class< ? extends Page< ? >> getHomePage()
{
return Index.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Index.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Captcha.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Captcha.class;
}
} |
public Class<? extends Page<?>> getHomePage()
{
return Index.class;
}
} | public Class<? extends Page> getHomePage()
{
return Index.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return DatesPage.class;
}
} | public Class< ? extends Page> getHomePage()
{
return DatesPage.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Echo.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Echo.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Home.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Home.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return GuestBook.class;
}
}
| public Class< ? extends Page> getHomePage()
{
return GuestBook.class;
}
}
|
public Class< ? extends Page< ? >> getHomePage()
{
return HomePage.class;
}
} | public Class< ? extends Page> getHomePage()
{
return HomePage.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return HelloWorld.class;
}
} | public Class< ? extends Page> getHomePage()
{
return HelloWorld.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Page1.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Page1.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Home.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Home.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Index.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Index.class;
}
} |
public class Home extends WicketExamplePage implements AuthenticatedWebPage
/*
* 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 f... | public class Home extends WicketExamplePage implements AuthenticatedWebPage
/*
* 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 f... |
public class AuthenticatedWebPage extends WicketExamplePage
/*
* 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... | public class AuthenticatedWebPage extends WicketExamplePage
/*
* 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... |
public class Sent extends WicketExamplePage
/*
* 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 Lice... | public class Sent extends WicketExamplePage
/*
* 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 Lice... |
public Class<? extends Page<?>> getHomePage()
{
return StockQuotePage.class;
}
} | public Class<? extends Page> getHomePage()
{
return StockQuotePage.class;
}
} |
public Class< ? extends Page< ? >> getHomePage()
{
return Index.class;
}
} | public Class< ? extends Page> getHomePage()
{
return Index.class;
}
} |
public Page1()
{
setPageTitle("Template example, page 1");
add(new Panel1<Void>("panel1"));
}
| public Page1()
{
setPageTitle("Template example, page 1");
add(new Panel1("panel1"));
}
|
public Class<? extends Page<?>> getHomePage()
{
return UnicodeConverter.class;
}
} | public Class<? extends Page> getHomePage()
{
return UnicodeConverter.class;
}
} |
public class Home extends WicketExamplePage
/*
* 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 Lice... | public class Home extends WicketExamplePage
/*
* 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 Lice... |
protected final void populateItem(Item<T> item)
{
RepeatingView<T> cells = new RepeatingView<T>(CELL_REPEATER_ID);
item.add(cells);
ArrayIteratorAdapter<ICellPopulator<T>> populators = getPopulatorsIterator();
for (int i = 0; populators.hasNext(); i++)
{
IModel<ICellPopulator<T>> populatorModel = popul... | protected final void populateItem(Item<T> item)
{
RepeatingView cells = new RepeatingView(CELL_REPEATER_ID);
item.add(cells);
ArrayIteratorAdapter<ICellPopulator<T>> populators = getPopulatorsIterator();
for (int i = 0; populators.hasNext(); i++)
{
IModel<ICellPopulator<T>> populatorModel = populators.... |
Component getHeader(String componentId);
/*
* 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... | Component getHeader(String componentId);
/*
* 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... |
Component getFilter(String componentId, FilterForm form);
/*
* 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 t... | Component getFilter(String componentId, FilterForm form);
/*
* 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 t... |
public Component< ? > restoreComponent(String id);
} | public Component restoreComponent(String id);
} |
public IRequestTarget newRequestTarget(Page< ? > page, Component< ? > component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new ComponentResourceRequestTarget(page, component, listener);
}
};
/**
* Called when a resource is requested.
*/
void onResourceRequested... | public IRequestTarget newRequestTarget(Page page, Component component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new ComponentResourceRequestTarget(page, component, listener);
}
};
/**
* Called when a resource is requested.
*/
void onResourceRequested();
} |
private String findIndicatorId()
{
if (getComponent() instanceof IAjaxIndicatorAware)
{
return ((IAjaxIndicatorAware)getComponent()).getAjaxIndicatorMarkupId();
}
if (this instanceof IAjaxIndicatorAware)
{
return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId();
}
Component< ? > parent = g... | private String findIndicatorId()
{
if (getComponent() instanceof IAjaxIndicatorAware)
{
return ((IAjaxIndicatorAware)getComponent()).getAjaxIndicatorMarkupId();
}
if (this instanceof IAjaxIndicatorAware)
{
return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId();
}
Component parent = getCom... |
protected void onComponentTag(final ComponentTag tag)
{
super.onComponentTag(tag);
// only add the event handler when the component is enabled.
Component< ? > myComponent = getComponent();
if (myComponent.isEnabled() && myComponent.isEnableAllowed())
{
tag.put(event, getEventHandler());
}
}
| protected void onComponentTag(final ComponentTag tag)
{
super.onComponentTag(tag);
// only add the event handler when the component is enabled.
Component myComponent = getComponent();
if (myComponent.isEnabled() && myComponent.isEnableAllowed())
{
tag.put(event, getEventHandler());
}
}
|
protected Form< ? > getForm()
{
if (form == null)
{
// try to find form in the hierarchy of owning component
Component< ? > component = getComponent();
form = component.findParent(Form.class);
if (form == null)
{
throw new IllegalStateException(
"form was not specified in the constructor a... | protected Form< ? > getForm()
{
if (form == null)
{
// try to find form in the hierarchy of owning component
Component component = getComponent();
form = component.findParent(Form.class);
if (form == null)
{
throw new IllegalStateException(
"form was not specified in the constructor and ca... |
protected Link<Object> newPagingNavigationLink(String id, IPageable pageable, int pageIndex)
{
return new AjaxPagingNavigationLink(id, pageable, pageIndex);
}
} | protected Link newPagingNavigationLink(String id, IPageable pageable, int pageIndex)
{
return new AjaxPagingNavigationLink(id, pageable, pageIndex);
}
} |
protected void onEvent(AjaxRequestTarget target)
{
// handle the event
owner.onClick(target);
// find the PagingNavigator parent of this link
AjaxPagingNavigator navigator = (AjaxPagingNavigator)((Component< ? >)owner).findParent(AjaxPagingNavigator.class);
if (navigator == null)
{
throw new WicketRun... | protected void onEvent(AjaxRequestTarget target)
{
// handle the event
owner.onClick(target);
// find the PagingNavigator parent of this link
AjaxPagingNavigator navigator = (AjaxPagingNavigator)((Component)owner).findParent(AjaxPagingNavigator.class);
if (navigator == null)
{
throw new WicketRuntimeE... |
void onInstantiation(Component component);
/*
* 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 Licen... | void onInstantiation(Component component);
/*
* 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 Licen... |
public void onAfterRender(Component< ? > component);
} | public void onAfterRender(Component component);
} |
public void onBeforeRender(Component< ? > component);
} | public void onBeforeRender(Component component);
} |
void onUnauthorizedInstantiation(Component component);
/*
* 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 ... | void onUnauthorizedInstantiation(Component component);
/*
* 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 ... |
boolean authorizeAction(Component component);
/*
* 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 Li... | boolean authorizeAction(Component component);
/*
* 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 Li... |
public IRequestTarget newRequestTarget(Page< ? > page, Component< ? > component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new BehaviorRequestTarget(page, component, listener, requestParameters);
}
};
} | public IRequestTarget newRequestTarget(Page page, Component component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new BehaviorRequestTarget(page, component, listener, requestParameters);
}
};
} |
public IRequestTarget newRequestTarget(Page< ? > page, Component< ? > component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new BehaviorRequestTarget(page, component, listener, requestParameters);
}
};
/**
* Called when a request to a behavior is received.
*/
vo... | public IRequestTarget newRequestTarget(Page page, Component component,
RequestListenerInterface listener, RequestParameters requestParameters)
{
return new BehaviorRequestTarget(page, component, listener, requestParameters);
}
};
/**
* Called when a request to a behavior is received.
*/
void onReque... |
public void onComponentTag(final Component< ? > component, final ComponentTag tag)
{
if (isEnabled(component))
{
tag.getAttributes().put(attribute, value);
}
}
} | public void onComponentTag(final Component component, final ComponentTag tag)
{
if (isEnabled(component))
{
tag.getAttributes().put(attribute, value);
}
}
} |
public String getCacheKey(final MarkupContainer< ? > container, final Class< ? > clazz)
{
final String classname = clazz.getName();
final Locale locale = container.getLocale();
// TODO until now getStyle() == style + variation
final String style = container.getStyle();
final String markupType = container.ge... | public String getCacheKey(final MarkupContainer container, final Class< ? > clazz)
{
final String classname = clazz.getName();
final Locale locale = container.getLocale();
// TODO until now getStyle() == style + variation
final String style = container.getStyle();
final String markupType = container.getMark... |
public IResourceStream getMarkupResourceStream(final MarkupContainer<?> container,
Class<?> containerClass)
{
// Get locator to search for the resource
final IResourceStreamLocator locator = Application.get()
.getResourceSettings()
.getResourceStreamLocator();
String style = container.getStyle();
Loc... | public IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class<?> containerClass)
{
// Get locator to search for the resource
final IResourceStreamLocator locator = Application.get()
.getResourceSettings()
.getResourceStreamLocator();
String style = container.getStyle();
Locale... |
String getCacheKey(final MarkupContainer container, Class<?> containerClass);
/*
* 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... | String getCacheKey(final MarkupContainer container, Class<?> containerClass);
/*
* 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... |
IResourceStream getMarkupResourceStream(final MarkupContainer container,
/*
* 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... | IResourceStream getMarkupResourceStream(final MarkupContainer container,
/*
* 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... |
public void onSelectionChanged()
{
convertInput();
updateModel();
onSelectionChanged(getModelObject());
}
| public void onSelectionChanged()
{
convertInput();
updateModel();
onSelectionChanged(getDefaultModelObject());
}
|
FormComponent[] getDependentFormComponents();
/*
* 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 Li... | FormComponent[] getDependentFormComponents();
/*
* 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 Li... |
public int getViewSize()
{
if (getModelObject() != null)
{
super.setStartIndex(getCurrentPage() * getRowsPerPage());
super.setViewSize(getRowsPerPage());
}
return super.getViewSize();
}
| public int getViewSize()
{
if (getDefaultModelObject() != null)
{
super.setStartIndex(getCurrentPage() * getRowsPerPage());
super.setViewSize(getRowsPerPage());
}
return super.getViewSize();
}
|
public ComponentFeedbackPanel(String id, Component<?> filter)
{
super(id, new ComponentFeedbackMessageFilter(filter));
}
} | public ComponentFeedbackPanel(String id, Component filter)
{
super(id, new ComponentFeedbackMessageFilter(filter));
}
} |
protected ResourceReference getImageResourceReference(BaseTree tree, Object node)
{
TreeModel model = (TreeModel)tree.getModelObject();
if (model.isLeaf(node))
{
return getResourceItemLeaf(node);
}
else
{
if (tree.getTreeState().isNodeExpanded(node))
{
return getResourceFolderOpen(node);
}... | protected ResourceReference getImageResourceReference(BaseTree tree, Object node)
{
TreeModel model = (TreeModel)tree.getDefaultModelObject();
if (model.isLeaf(node))
{
return getResourceItemLeaf(node);
}
else
{
if (tree.getTreeState().isNodeExpanded(node))
{
return getResourceFolderOpen(node... |
public final Markup loadMarkup(final MarkupContainer< ? > container,
final MarkupResourceStream markupResourceStream, final IMarkupLoader baseLoader,
final boolean enforceReload) throws IOException, ResourceStreamNotFoundException
{
IMarkupLoader loader = new InheritedMarkupMarkupLoader();
return loader.loadM... | public final Markup loadMarkup(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final IMarkupLoader baseLoader,
final boolean enforceReload) throws IOException, ResourceStreamNotFoundException
{
IMarkupLoader loader = new InheritedMarkupMarkupLoader();
return loader.loadMarkup... |
Markup loadMarkup(final MarkupContainer container,
/*
* 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... | Markup loadMarkup(final MarkupContainer container,
/*
* 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... |
public final Markup loadMarkup(final MarkupContainer< ? > container,
final MarkupResourceStream markupResourceStream, final IMarkupLoader baseLoader,
final boolean enforceReload) throws IOException, ResourceStreamNotFoundException
{
return Application.get().getMarkupSettings().getMarkupParserFactory().newMarkup... | public final Markup loadMarkup(final MarkupContainer container,
final MarkupResourceStream markupResourceStream, final IMarkupLoader baseLoader,
final boolean enforceReload) throws IOException, ResourceStreamNotFoundException
{
return Application.get().getMarkupSettings().getMarkupParserFactory().newMarkupParse... |
public boolean resolve(final MarkupContainer< ? > container, final MarkupStream markupStream,
final ComponentTag tag)
{
if ((tag instanceof WicketTag) && ((WicketTag)tag).isEnclosureTag())
{
CharSequence wicketId = tag.getString("wicket:id");
String id = null;
if (wicketId != null)
{
id = wicket... | public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
if ((tag instanceof WicketTag) && ((WicketTag)tag).isEnclosureTag())
{
CharSequence wicketId = tag.getString("wicket:id");
String id = null;
if (wicketId != null)
{
id = wicketId.to... |
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 associa... | 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 w... |
public boolean resolve(final MarkupContainer< ? > container, final MarkupStream markupStream,
final ComponentTag tag);
} | public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag);
} |
public boolean resolve(final MarkupContainer< ? > container, final MarkupStream markupStream,
final ComponentTag tag)
{
// this is only here so we register wicket:container tag, this resolver
// does not actually do anything special to the tag
return false;
}
} | public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
// this is only here so we register wicket:container tag, this resolver
// does not actually do anything special to the tag
return false;
}
} |
CharSequence transform(final Component component, final CharSequence output)
/*
* 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 ... | CharSequence transform(final Component component, final CharSequence output)
/*
* 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 ... |
public final Object getObject(Component<?> component)
{
throw new UnsupportedOperationException();
}
}
| public final Object getObject(Component component)
{
throw new UnsupportedOperationException();
}
}
|
<W> IWrapModel<W> wrapOnInheritance(Component component);
/*
* 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 t... | <W> IWrapModel<W> wrapOnInheritance(Component component);
/*
* 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 t... |
protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class<? extends Page<?>> homePageClass = applic... | protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class<? extends Page> homePageClass = applicati... |
Class<? extends Page> getPageClass();
/*
* 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, V... | Class<? extends Page> getPageClass();
/*
* 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, V... |
Component getTarget();
/*
* 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
* (... | Component getTarget();
/*
* 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
* (... |
public final String loadStringResource(final Component<?> component, final String key)
{
final Locale locale = (component != null) ? component.getLocale() : null;
return loadStringResource(null, key, locale, null);
}
} | public final String loadStringResource(final Component component, final String key)
{
final Locale locale = (component != null) ? component.getLocale() : null;
return loadStringResource(null, key, locale, null);
}
} |
public String loadStringResource(Component< ? > component, String key)
{
if (component == null)
{
return loadStringResource(null, key, Session.get().getLocale(), Session.get()
.getStyle());
}
return super.loadStringResource(component, key);
}
}
| public String loadStringResource(Component component, String key)
{
if (component == null)
{
return loadStringResource(null, key, Session.get().getLocale(), Session.get()
.getStyle());
}
return super.loadStringResource(component, key);
}
}
|
String loadStringResource(Component component, String key);
/*
* 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... | String loadStringResource(Component component, String key);
/*
* 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... |
public void evict(final IPageMap pageMap)
{
if (pageMap instanceof AccessStackPageMap)
{
synchronized (Session.get())
{
AccessStackPageMap accessPM = (AccessStackPageMap)pageMap;
// Do we need to evict under this strategy?
if (accessPM.getVersions() > maxVersions)
{
// Remove oldest ent... | public void evict(final IPageMap pageMap)
{
if (pageMap instanceof AccessStackPageMap)
{
synchronized (Session.get())
{
AccessStackPageMap accessPM = (AccessStackPageMap)pageMap;
// Do we need to evict under this strategy?
if (accessPM.getVersions() > maxVersions)
{
// Remove oldest ent... |
public Object component(final Component component)
{
final ComponentData object = new ComponentData();
// anonymous class? Get the parent's class name
String name = component.getClass().getName();
if (name.indexOf("$") > 0)
{
name = component.getClass().getSuperclass().getName();... | public Object component(final Component component)
{
final ComponentData object = new ComponentData();
// anonymous class? Get the parent's class name
String name = component.getClass().getName();
if (name.indexOf("$") > 0)
{
name = component.getClass().getSuperclass().getName();... |
void onAdded(Component component);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Vers... | void onAdded(Component component);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Vers... |
* public void onClick() {
* // ...
* }
* }
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLink extends WebPage<Void>
{
| * public void onClick() {
* // ...
* }
* }
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLink extends WebPage
{
|
* public void onClick()
* {
* // ...
* }
* });
*
* page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID));
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLinkAndComponent extends WebPage<Void>
{
| * public void onClick()
* {
* // ...
* }
* });
*
* page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID));
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLinkAndComponent extends WebPage
{
|
public void testPagedTable() throws Exception
{
WicketTester application = new WicketTester();
application.startPage(PagedTableNavigatorPage.class);
PagedTableNavigatorPage page = (PagedTableNavigatorPage)application.getLastRenderedPage();
String document = application.getServletResponse().getDocument();
ap... | public void testPagedTable() throws Exception
{
WicketTester application = new WicketTester();
application.startPage(PagedTableNavigatorPage.class);
PagedTableNavigatorPage page = (PagedTableNavigatorPage)application.getLastRenderedPage();
String document = application.getServletResponse().getDocument();
ap... |
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
replaceComponentTagBody(markupStream, openTag, getModelObjectAsString());
}
| protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag)
{
replaceComponentTagBody(markupStream, openTag, getDefaultModelObjectAsString());
}
|
private static void buildJrePackages() {
jrePackages=new Vector();
switch(javaVersionNumber) {
case 14:
jrePackages.addElement("org.apache.crimson");
jrePackages.addElement("org.apache.xalan");
jrePackages.addElement("org.apache.xml");
... | private static void buildJrePackages() {
jrePackages=new Vector();
switch(javaVersionNumber) {
case 14:
jrePackages.addElement("org.apache.crimson");
jrePackages.addElement("org.apache.xalan");
jrePackages.addElement("org.apache.xml");
... |
public Object start(IApplicationContext appContext) throws Exception {
bundleContext = Activator.getContext();
// Process Arguments
processArgs(appContext);
// Create Container of desired type
IContainerManager containerManager = getContainerManagerService();
if (containerId == null || "".equals(containerI... | public Object start(IApplicationContext appContext) throws Exception {
bundleContext = Activator.getContext();
// Process Arguments
processArgs(appContext);
// Create Container of desired type
IContainerManager containerManager = getContainerManagerService();
if (containerId == null || "".equals(containerI... |
package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... | package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... |
package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... | package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... |
package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... | package org.eclipse.xand3.analyzation.typesystem.type;
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is av... |
package org.apache.tools.ant.types;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.... | package org.apache.tools.ant.types;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.... |
public void handleEvent(Event event) {
if (selectedIndex == -1) {
accessible.setFocus(ACC.CHILDID_SELF);
} else {
accessible.setFocus(selectedIndex);
}
}
});
}
void onKeyDown (Event event) {
switch (event.keyCode) {
case SWT.ARROW_LEFT:
case SWT.ARROW_RIGHT:
int count = items.length;
if... | public void handleEvent(Event event) {
if (selectedIndex == -1) {
accessible.setFocus(ACC.CHILDID_SELF);
} else {
accessible.setFocus(selectedIndex);
}
}
});
}
void onKeyDown (Event event) {
switch (event.keyCode) {
case SWT.ARROW_LEFT:
case SWT.ARROW_RIGHT:
int count = items.length;
if... |
public boolean endOperation() {
try {
if (_operationCount == 1 && (_autoDetach & DETACH_NONTXREAD) != 0
&& (_flags & FLAG_ACTIVE) == 0) {
detachAllInternal(null);
}
if (_operationCount < 1)
throw new InternalException();
... | public boolean endOperation() {
try {
if (_operationCount == 1 && (_autoDetach & DETACH_NONTXREAD) != 0
&& (_flags & FLAG_ACTIVE) == 0) {
detachAllInternal(null);
}
if (_operationCount < 1)
throw new InternalException(_loc.g... |
private JPanel createJNDIPanel() {
JPanel jndiPanel = new JPanel(new BorderLayout());
jndiPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
JMeterUtils.getResString("jms_jndi_props")));
JPanel contextPanel = new JPanel(new BorderLayout(10, 0));
contextPanel.add(... | private JPanel createJNDIPanel() {
JPanel jndiPanel = new JPanel(new BorderLayout());
jndiPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
JMeterUtils.getResString("jms_jndi_props")));
JPanel contextPanel = new JPanel(new BorderLayout(10, 0));
contextPanel.add(... |
public void validate(IValidatable validatable)
{
Iterator it = validators.iterator();
while (it.hasNext() && validatable.isValid())
{
((IValidator)it.next()).validate(validatable);
}
}
} | public final void validate(IValidatable validatable)
{
Iterator it = validators.iterator();
while (it.hasNext() && validatable.isValid())
{
((IValidator)it.next()).validate(validatable);
}
}
} |
private boolean useInverseKeyMapping(FieldMapping field) {
FieldMapping mapped = field.getMappedByMapping();
if (mapped != null) {
//bi-/M-1/JoinTable ==> join table strategy
if (isBiMTo1JT(field))
return false;
if (mapped.getTypeCode() == JavaTyp... | private boolean useInverseKeyMapping(FieldMapping field) {
FieldMapping mapped = field.getMappedByMapping();
if (mapped != null) {
//bi-/M-1/JoinTable ==> join table strategy
if (isBiMTo1JT(field))
return false;
if (mapped.getTypeCode() == JavaTyp... |
private void resolveDeclaredType(Class type) {
ClassMetaData meta = _owner.getRepository().getMetaData(type,
_owner.getDefiningMetaData().getEnvClassLoader(), false);
if (meta != null)
_decCode = JavaTypes.PC;
if (meta != null && meta.isEmbeddedOnly())
... | private void resolveDeclaredType(Class type) {
ClassMetaData meta = _owner.getRepository().getMetaData(type,
_owner.getDefiningMetaData().getEnvClassLoader(), false);
if (meta != null)
_decCode = JavaTypes.PC;
if (meta != null && meta.isEmbeddedOnly() && !met... |
public void testRelationMappings() {
JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
ClassMapping cls = conf.getMappingRepositoryInstance().
getMapping(EmbeddableSuperSub.class, null, true);
FieldMapping fm = cls.getFieldMapping("sub");
assertTrue(fm.... | public void testRelationMappings() {
JDBCConfiguration conf = (JDBCConfiguration) emf.getConfiguration();
ClassMapping cls = conf.getMappingRepositoryInstance().
getMapping(EmbeddableSuperSub.class, null, true);
FieldMapping fm = cls.getFieldMapping("sub");
assertTrue(fm.... |
protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class<? extends Page> homePageClass = applicati... | protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class<? extends Page<?>> homePageClass = applic... |
Class<? extends Page<?>> getPageClass();
/*
* 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... | Class<? extends Page<?>> getPageClass();
/*
* 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... |
* public void onClick() {
* // ...
* }
* }
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLink extends WebPage
{
| * public void onClick() {
* // ...
* }
* }
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLink extends WebPage<Void>
{
|
* public void onClick()
* {
* // ...
* }
* });
*
* page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID));
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLinkAndComponent extends WebPage
{
| * public void onClick()
* {
* // ...
* }
* });
*
* page.add(new WebComponent(MockPageWithLinkAndComponent.COMPONENT_ID));
* </pre>
*
* @author Frank Bille
*/
public class MockPageWithLinkAndComponent extends WebPage<Void>
{
|
public void localize(Notification notification) {
if (notification.getType() == Notification.AVAILABLE) {
// inform listeners interested in this service type
for (IServiceListener srl : ZooDiscoveryContainer
.getSingleton()
.getServiceListenersForType(notification.getServiceTypeID())) {
srl.servi... | public void localize(Notification notification) {
if (notification.getType() == Notification.AVAILABLE) {
// inform listeners interested in this service type
for (IServiceListener srl : ZooDiscoveryContainer
.getSingleton()
.getServiceListenersForType(notification.getServiceTypeID())) {
srl.servi... |
public static void log(int level, String message, Exception e) {
if (logServices.isEmpty()) {
e.printStackTrace();
return;
}
for (LogService ls : logServices) {
ls.log(DiscoveryActivator.getContext().getServiceReference(
ZooDiscoveryContainer.class.getName()), level, message, e);
}
}
| public static void log(int level, String message, Exception e) {
if (logServices.isEmpty()) {
//e.printStackTrace();
return;
}
for (LogService ls : logServices) {
ls.log(DiscoveryActivator.getContext().getServiceReference(
ZooDiscoveryContainer.class.getName()), level, message, e);
}
}
|
public void run() {
structureTree.removeAll();
SwingTreeViewNode currNode;
if (structureView.getRootNode() == null) {
structureTree.setModel(NO_STRUCTURE_MODEL);
} else {
structureTree.setModel(new StructureTr... | public void run() {
structureTree.removeAll();
// SwingTreeViewNode currNode;
if (structureView.getRootNode() == null) {
structureTree.setModel(NO_STRUCTURE_MODEL);
} else {
structureTree.setMod... |
public void compileFinished(String buildConfigFile, int buildTime, boolean succeeded, boolean warnings) {
int timeInSeconds = buildTime/1000;
buildSucceeded = succeeded;
buildFinished = true;
}
| public void compileFinished(String buildConfigFile, int buildTime, boolean succeeded, boolean warnings) {
// int timeInSeconds = buildTime/1000;
buildSucceeded = succeeded;
buildFinished = true;
}
|
public String toString()
{
final Page page = findPage();
return "ComponentID: " + getId() + " [" + (page == null ? "<No Page>" : getPage().getClass().getName()) + " path = "
+ getPath() + "." + Classes.name(getClass()) + ", isVisible = " + isVisible()
+ ", isVersioned = " + isVersioned() + "]";
}
| public String toString()
{
final Page page = findPage();
return "[" + (page == null ? "<No Page>" : getPage().getClass().getName()) + " path = "
+ getPath() + "." + Classes.name(getClass()) + ", isVisible = " + isVisible()
+ ", isVersioned = " + isVersioned() + "]";
}
|
private final static int DEFAULT_SLEEP_LENGTH = 100;
/**
* Creates this tab's controls. Subclasses must override.
*
* @param composite the parent composite
*/
abstract void createControls(Composite composite);
/**
* Creates the tab folder page.
*
* @param tabFolder the parent tab folder
* @return... | private final static int DEFAULT_SLEEP_LENGTH = 100;
/**
* Creates this tab's controls. Subclasses must override.
*
* @param composite the parent composite
*/
abstract void createControls(Composite composite);
/**
* Creates the tab folder page.
*
* @param tabFolder the parent tab folder
* @return... |
protected String getVersion(Document document) {
if (document == null) {
return null;
}
String version = null;
Method getXMLVersion = null;
try {
getXMLVersion = document.getClass().getMethod("getXmlVersion", new Class[]{});
// If Document class imp... | protected String getVersion(Document document) {
if (document == null) {
return null;
}
String version = null;
Method getXMLVersion = null;
try {
getXMLVersion = document.getClass().getMethod("getXmlVersion", new Class[]{});
// If Document class imp... |
protected String getVersion() {
if (fLocator == null) {
return null;
}
String version = null;
Method getXMLVersion = null;
try {
getXMLVersion = fLocator.getClass().getMethod("getXMLVersion", new Class[]{});
// If Locator implements Locator... | protected String getVersion() {
if (fLocator == null) {
return null;
}
String version = null;
Method getXMLVersion = null;
try {
getXMLVersion = fLocator.getClass().getMethod("getXMLVersion", new Class[]{});
// If Locator implements Locator... |
protected MarkupElement onComponentTag(ComponentTag tag) throws ParseException
{
final String namespace = markup.getWicketNamespace();
// If the form <tag wicket:id = "value"> is used
final String wicketIdValue = tag.getAttributes().getString(namespace + ":id");
// Identify tags with Wicket namespace
if (... | protected MarkupElement onComponentTag(ComponentTag tag) throws ParseException
{
final String namespace = markup.getWicketNamespace();
// If the form <tag wicket:id = "value"> is used
final String wicketIdValue = tag.getAttributes().getString(namespace + ":id");
// Identify tags with Wicket namespace
if (... |
public static Configuration getConfiguration(SampleResult result, SampleSaveConfiguration saveConfig) {
DefaultConfiguration config = new DefaultConfiguration(SAMPLE_RESULT_TAG_NAME, "JMeter Save Service"); // $NON-NLS-1$
if (saveConfig.saveTime()) {
config.setAttribute(TIME, String.valueOf(result.getTime()));... | public static Configuration getConfiguration(SampleResult result, SampleSaveConfiguration saveConfig) {
DefaultConfiguration config = new DefaultConfiguration(SAMPLE_RESULT_TAG_NAME, "JMeter Save Service"); // $NON-NLS-1$
if (saveConfig.saveTime()) {
config.setAttribute(TIME, String.valueOf(result.getTime()));... |
public boolean isRunning() {
return OS.objc_msgSend(this.id, OS.sel_isRunning) != 0;
}
| public boolean isRunning() {
return OS.objc_msgSend_bool(this.id, OS.sel_isRunning);
}
|
protected void checkWidget () {
Display display = this.display;
if (display == null) error (SWT.ERROR_WIDGET_DISPOSED);
if (display.thread != Thread.currentThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
}
| protected void checkWidget () {
Display display = this.display;
if (display == null) error (SWT.ERROR_WIDGET_DISPOSED);
if (display.thread != Thread.currentThread () && !display.isEmbedded) error (SWT.ERROR_THREAD_INVALID_ACCESS);
if ((state & DISPOSED) != 0) error (SWT.ERROR_WIDGET_DISPOSED);
}
|
public void setProcessOutputStream( InputStream is )
throws IOException
{
String buffer = "";
try
{
BufferedReader reader = new BufferedReader( new InputStreamReader( is ) );
buffer = reader.readLine();
if( buffer != null )
{
... | public void setProcessOutputStream( InputStream is )
throws TaskException, IOException
{
String buffer = "";
try
{
BufferedReader reader = new BufferedReader( new InputStreamReader( is ) );
buffer = reader.readLine();
if( buffer != null )
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.