buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected Object toData(FieldMetaData fmd, Object val, StoreContext ctx) {
// avoid caching large result set fields
if (fmd.isLRS())
return NULL;
return super.toData(fmd, val, ctx);
}
| protected Object toData(FieldMetaData fmd, Object val, StoreContext ctx) {
// avoid caching large result set fields
if (fmd.isLRS() || fmd.isStream())
return NULL;
return super.toData(fmd, val, ctx);
}
|
public MockPageParameterPage(PageParameters pageParameters)
{
add(new BookmarkablePageLink("link", MockPageParameterPage.class,
new PageParameters("id=1")));
add(new Label("label", pageParameters.getString("id")));
}
| public MockPageParameterPage(PageParameters pageParameters)
{
add(new BookmarkablePageLink("link", MockPageParameterPage.class,
new PageParameters("id=1")));
add(new Label("label", pageParameters.getNamedParameter("id").toString()));
}
|
public MenuApplication()
{
getPages().setHomePage(Home.class);
ApplicationSettings settings = getSettings();
settings.configure("development", "src/java");
settings.setStripWicketTags(true);
}
| public MenuApplication()
{
getPages().setHomePage(Home.class);
ApplicationSettings settings = getSettings();
settings.configure("development", "src/eelco/java");
settings.setStripWicketTags(true);
}
|
public ObjectEditApplication()
{
getPages().setHomePage(Home.class);
ApplicationSettings settings = getSettings();
settings.configure("development", "src/java");
}
| public ObjectEditApplication()
{
getPages().setHomePage(Home.class);
ApplicationSettings settings = getSettings();
settings.configure("development", "src/eelco/java");
}
|
public static final int VER_PLATFORM_WIN32_CE = 3;
/* Get the Windows version and the flags */
static {
/*
* Try the UNICODE version of GetVersionEx first
* and then the ANSI version. The UNICODE version
* is present on all versions of Windows but is not
* implemented on Win95/98/ME.
*
* NOTE: The ... | public static final int VER_PLATFORM_WIN32_CE = 3;
/* Get the Windows version and the flags */
static {
/*
* Try the UNICODE version of GetVersionEx first
* and then the ANSI version. The UNICODE version
* is present on all versions of Windows but is not
* implemented on Win95/98/ME.
*
* NOTE: The ... |
public final void warn(Component reporter, String message)
{
add(new FeedbackMessage(reporter, message, FeedbackMessage.WARNING));
}
/**
* Adds a message.
*
* @param message
* the message
*/
final void add(FeedbackMessage message)
{
if (log.isDebugEnabled())
{
log.debug("Adding fee... | public final void add(FeedbackMessage message)
{
if (log.isDebugEnabled())
{
log.debug("Adding feedback message " + message);
}
messages.add(message);
}
}
|
public void test4() {
executeTarget("test4");
File jarFile = new File(getProjectDir(), tempJar);
assert(jarFile.exists());
jarModifiedDate = jarFile.lastModified();
}
| public void test4() {
executeTarget("test4");
File jarFile = new File(getProjectDir(), tempJar);
assertTrue(jarFile.exists());
jarModifiedDate = jarFile.lastModified();
}
|
public void test3() {
executeTarget("test3");
File outputDirectory = new File(TASKDEFS_DIR + "antlr.tmp");
String[] calcFiles = outputDirectory.list(new CalcFileFilter());
assert(5 == calcFiles.length);
}
| public void test3() {
executeTarget("test3");
File outputDirectory = new File(TASKDEFS_DIR + "antlr.tmp");
String[] calcFiles = outputDirectory.list(new CalcFileFilter());
assertEquals(5, calcFiles.length);
}
|
public void testCircularReferenceCheck() {
Mapper m = new Mapper(project);
project.addReference("dummy", m);
m.setRefid(new Reference("dummy"));
try {
m.getImplementation();
fail("Can make Mapper a Reference to itself.");
} catch (BuildException be) {
... | public void testCircularReferenceCheck() {
Mapper m = new Mapper(project);
project.addReference("dummy", m);
m.setRefid(new Reference("dummy"));
try {
m.getImplementation();
fail("Can make Mapper a Reference to itself.");
} catch (BuildException be) {
... |
public final Component setModelObject(final Object object)
{
final IModel model = getModel();
if (model != null)
{
if (!getComparator().compareValue(this, object))
{
modelChanging();
model.setObject(this, object);
modelChanged();
}
}
else
{
throw new IllegalStateException("Attempt ... | public final Component setModelObject(final Object object)
{
final IModel model = getModel();
if (model != null)
{
if (!getComparator().compareValue(this, object))
{
modelChanging();
model.setObject(this, object);
modelChanged();
}
}
else
{
throw new IllegalStateException("Attempt ... |
public DiscoveredServiceNotificationImpl(int type, IServiceInfo serviceInfo) {
this.type = type;
this.serviceEndpointDescription = new ECFServiceEndpointDescriptionImpl(
serviceInfo);
}
| public DiscoveredServiceNotificationImpl(int type, IServiceInfo serviceInfo) {
this.type = type;
this.serviceEndpointDescription = new RemoteServiceEndpointDescriptionImpl(
serviceInfo);
}
|
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0, border = getBorderWidth ();
if ((style & SWT.ARROW) != 0) {
if ((style & (SWT.UP | SWT.DOWN)) != 0) {
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);
height += OS.GetSystemMetrics (OS.SM_CYVSCROLL);
... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0, border = getBorderWidth ();
if ((style & SWT.ARROW) != 0) {
if ((style & (SWT.UP | SWT.DOWN)) != 0) {
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);
height += OS.GetSystemMetrics (OS.SM_CYVSCROLL);
... |
public void setAccessType(int type) {
if (type == _accessType || type == AccessCode.UNKNOWN)
return;
if (!AccessCode.isValidClassCode(type)) {
throw new IllegalArgumentException(_loc.get("access-type-invalid",
this, AccessCode.toClassString(type)).getMessage());
}
if... | public void setAccessType(int type) {
if (type == _accessType || type == AccessCode.UNKNOWN)
return;
if (!AccessCode.isValidClassCode(type)) {
throw new IllegalArgumentException(_loc.get("access-type-invalid",
this, AccessCode.toClassString(type)).getMessage());
}
if... |
public void activated(ID [] others) {
debug("activated()");
try {
if (!getContext().isGroupServer()) {
GetExec.showURL(url,true);
} else {
debug("Not executing commands because is server");
}
} catch (Exception e) {
debug(e, "Exception on startup()");
/*
* For now, just ignore failure.... | public void activated(ID [] others) {
debug("activated()");
try {
if (!getContext().isGroupManager()) {
GetExec.showURL(url,true);
} else {
debug("Not executing commands because is server");
}
} catch (Exception e) {
debug(e, "Exception on startup()");
/*
* For now, just ignore failure... |
protected final String encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final StringBuffer url = new StringBuffer(64);
url.append(urlPrefix(requestCycle));
u... | protected final String encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append(urlPrefix(r... |
public ListItem(final int index, final IModel model)
{
super(Integer.toString(index), model);
this.index = index;
}
| public ListItem(final int index, final IModel model)
{
super(Integer.toString(index).intern(), model);
this.index = index;
}
|
public Item(final String id, int index, final IModel model)
{
super(id, model);
this.index = index;
}
| public Item(final String id, int index, final IModel model)
{
super(id.intern(), model);
this.index = index;
}
|
public final Resource getResource()
{
return getApplication().getSharedResources().get(Application.class, getId(), getLocale(),
getStyle());
}
| public final Resource getResource()
{
return getApplication().getSharedResources().get(Application.class, getId(), getLocale(),
getStyle(), false);
}
|
public SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc) {
// reset pools
fDOMPool.reset();
fSchemaParser.setPool(fDOMPool);
// first try to find it in the bucket/pool, return if one is found
SchemaGrammar grammar = findGrammar(desc);
if (grammar != ... | public SchemaGrammar parseSchema(XMLInputSource is, XSDDescription desc) {
// reset pools
fDOMPool.reset();
fSchemaParser.setPool(fDOMPool);
// first try to find it in the bucket/pool, return if one is found
SchemaGrammar grammar = findGrammar(desc);
if (grammar != ... |
public void setImage (int index, Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) {
error(SWT.ERROR_INVALID_ARGUMENT);
}
int itemIndex = parent.indexOf (this);
if (itemIndex == -1) return;
if (parent.imageBounds == null && image != null) {
parent.setItemHeight (image, null);
}
if (in... | public void setImage (int index, Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) {
error(SWT.ERROR_INVALID_ARGUMENT);
}
int itemIndex = parent.indexOf (this);
if (itemIndex == -1) return;
if (parent.imageBounds == null && image != null) {
parent.setItemHeight (image, null, false);
}
... |
public void setImage (int index, Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (parent.imageBounds == null && image != null) {
parent.setItemHeight (image, null);
}
if (index == 0) {
if (image != null && image.type == SWT.ICON) {
if (... | public void setImage (int index, Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) {
error (SWT.ERROR_INVALID_ARGUMENT);
}
if (parent.imageBounds == null && image != null) {
parent.setItemHeight (image, null, false);
}
if (index == 0) {
if (image != null && image.type == SWT.ICON) {
... |
private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyAlias(tKeyName.getText());
if (cAlgorithm.getText().equa... | private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyName(tKeyName.getText());
if (cAlgorithm.getText().equal... |
private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyAlias(tKeyName.getText());
if (cKeyAlgorithm.getText().e... | private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyName(tKeyName.getText());
if (cKeyAlgorithm.getText().eq... |
private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeyAlgorithm(keyAlgorithm);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyAlias(tKeyName.... | private void saveDataToModel() {
signature.setKeystore(keystore);
signature.setKeyAlgorithm(keyAlgorithm);
signature.setKeystorePassword(tKeystorePassword.getText().toCharArray());
signature.setKeyPassword(tKeyPassword.getText().toCharArray());
signature.setKeyName(tKeyName.g... |
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.ARROW) != 0) return;
text = string;
/* This code is intentionally commented */
// if (OS.COMCTL32_MAJOR < 6) {
// if (text.length () == 0 && image != null) {
// _setImage (image);
// ret... | public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.ARROW) != 0) return;
text = string;
/* This code is intentionally commented */
// if (OS.COMCTL32_MAJOR < 6) {
// if (text.length () == 0 && image != null) {
// _setImage (image);
// ret... |
public void showSelection () {
checkWidget ();
int index;
if ((style & SWT.SINGLE) != 0) {
index = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
} else {
int [] indices = new int [1];
int result = OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
index = indices [0];
if (result != 1) index = -1;
... | public void showSelection () {
checkWidget ();
int index;
if ((style & SWT.SINGLE) != 0) {
index = OS.SendMessage (handle, OS.LB_GETCURSEL, 0, 0);
} else {
int [] indices = new int [1];
int result = OS.SendMessage (handle, OS.LB_GETSELITEMS, 1, indices);
index = indices [0];
if (result != 1) index = -1;
... |
public void setSelection (int value) {
checkWidget ();
OS.SendMessage (handle, OS.TBM_SETPOS, 1, value);
}
int widgetStyle () {
int bits = super.widgetStyle () | OS.WS_TABSTOP | OS.TBS_BOTH | OS.TBS_AUTOTICKS;
if ((style & SWT.HORIZONTAL) != 0) return bits | OS.TBS_HORZ | OS.TBS_DOWNISLEFT;
return bits | OS.TBS_V... | public void setSelection (int value) {
checkWidget ();
OS.SendMessage (handle, OS.TBM_SETPOS, 1, value);
}
int widgetStyle () {
int bits = super.widgetStyle () | OS.WS_TABSTOP | OS.TBS_BOTH | OS.TBS_AUTOTICKS;
if ((style & SWT.HORIZONTAL) != 0) return bits | OS.TBS_HORZ | OS.TBS_DOWNISLEFT;
return bits | OS.TBS_V... |
public void setVisible (boolean visible) {
checkWidget();
boolean isVisible = (state & HIDDEN) == 0;
if (isVisible == visible) return;
/*
* On Windows CE, use SIF_DISABLENOSCROLL to show and
* hide the scroll bar when the page size is equal to
* the range.
*/
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLI... | public void setVisible (boolean visible) {
checkWidget();
boolean isVisible = (state & HIDDEN) == 0;
if (isVisible == visible) return;
/*
* On Windows CE, use SIF_DISABLENOSCROLL to show and
* hide the scroll bar when the page size is equal to
* the range.
*/
if (OS.IsWinCE) {
SCROLLINFO info = new SCROLLI... |
public void setValues (int selection, int minimum, int maximum, int thumb, int increment, int pageIncrement) {
checkWidget ();
if (minimum < 0) return;
if (maximum < 0) return;
if (thumb < 1) return;
if (increment < 1) return;
if (pageIncrement < 1) return;
this.increment = increment;
this.pageIncrement = pageI... | public void setValues (int selection, int minimum, int maximum, int thumb, int increment, int pageIncrement) {
checkWidget ();
if (minimum < 0) return;
if (maximum < 0) return;
if (thumb < 1) return;
if (increment < 1) return;
if (pageIncrement < 1) return;
this.increment = increment;
this.pageIncrement = pageI... |
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 int checkStyle (int... | 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 int checkStyle (int... |
public void setVisible (boolean visible) {
checkWidget ();
if (OS.IsWinCE) return;
if (visible == getVisible ()) return;
if (item == null) {
int hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
int hwndToolTip = hwndToolTip ();
Shel... | public void setVisible (boolean visible) {
checkWidget ();
if (OS.IsWinCE) return;
if (visible == getVisible ()) return;
if (item == null) {
int hwnd = parent.handle;
TOOLINFO lpti = new TOOLINFO ();
lpti.cbSize = TOOLINFO.sizeof;
lpti.uId = id;
lpti.hwnd = hwnd;
int hwndToolTip = hwndToolTip ();
Shel... |
public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
int hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
tvItem... | public void setExpanded (boolean expanded) {
checkWidget ();
/* Do nothing when the item is a leaf or already expanded */
int hwnd = parent.handle;
if (OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, handle) == 0) {
return;
}
int state = 0;
if (OS.IsWinCE) {
TVITEM tvItem = new TVITEM ();
tvItem... |
public void removeAll () {
checkWidget ();
ignoreDeselect = ignoreSelect = true;
boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
/*
* This code is intentionally commented.
*/
// OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
... | public void removeAll () {
checkWidget ();
ignoreDeselect = ignoreSelect = true;
boolean redraw = drawCount == 0 && OS.IsWindowVisible (handle);
if (redraw) {
OS.DefWindowProc (handle, OS.WM_SETREDRAW, 0, 0);
/*
* This code is intentionally commented.
*/
// OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
... |
public void testResolveGeneric() {
UnresolvedType collectionType = UnresolvedType.forName("java.util.Collection");
world.resolve(collectionType).getRawType().resolve(world);
ResolvedMember[] methods = world.resolve(collectionType).getDeclaredMethods();
int i = findMethod("toArray", 1, methods);
assertTrue("C... | public void testResolveGeneric() {
UnresolvedType collectionType = UnresolvedType.forName("java.util.Collection");
world.resolve(collectionType).getRawType().resolve(world);
ResolvedMember[] methods = world.resolve(collectionType).getDeclaredMethods();
int i = findMethod("toArray", 1, methods);
assertTrue("C... |
abstract protected IModel<T> model(Object object);
} | abstract protected IModel<T> model(T object);
} |
private void checkContent( String content )throws InvalidDatatypeValueException {
if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) {
if ( fRegex == null || fRegex.matches( content) == false )
throw new InvalidDatatypeValueException("Value'"+content+
... | private void checkContent( String content )throws InvalidDatatypeValueException {
if ( (fFacetsDefined & DatatypeValidator.FACET_PATTERN ) != 0 ) {
if ( fRegex == null || fRegex.matches( content) == false )
throw new InvalidDatatypeValueException("Value'"+content+
... |
public void printText( StringBuffer text )
{
_text.append( text );
}
| public void printText( StringBuffer text )
{
_text.append( text.toString() );
}
|
public static Class relativeClass(final Class scope, final String path)
throws ClassNotFoundException
{
return Class.forName(Packages.absolutePath(scope, path).replace('/', '.'));
}
/**
* @param className
* Class to resolve
* @return Resolved class
*/
public static Class resolveClass(final... | public static Class relativeClass(final Class scope, final String path)
throws ClassNotFoundException
{
return Class.forName(Packages.absolutePath(scope, path).replace('/', '.'));
}
/**
* @param className
* Class to resolve
* @return Resolved class
*/
public static Class resolveClass(final... |
public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) {
// special resolution processing for already resolved types.
if (ty instanceof ResolvedType) {
ResolvedType rty = (ResolvedType) ty;
rty = resolve(rty);
return rty;
}
// dispatch back to the type vari... | public ResolvedType resolve(UnresolvedType ty, boolean allowMissing) {
// special resolution processing for already resolved types.
if (ty instanceof ResolvedType) {
ResolvedType rty = (ResolvedType) ty;
rty = resolve(rty);
return rty;
}
// dispatch back to the type vari... |
public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages(false);
}
return feedbackMessages;
}
| public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages();
}
return feedbackMessages;
}
|
public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages(true);
}
return feedbackMessages;
}
| public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages();
}
return feedbackMessages;
}
|
public void generateSequences(DBIdentifier schemaName, DBIdentifier sequenceName,
Connection conn, DatabaseMetaData meta)
throws SQLException {
fireGenerationEvent(_loc.get("generating-sequences", schemaName));
if (_log.isTraceEnabled())
_log.trace(_loc.get("gen-seqs", sc... | public void generateSequences(DBIdentifier schemaName, DBIdentifier sequenceName,
Connection conn, DatabaseMetaData meta)
throws SQLException {
fireGenerationEvent(_loc.get("generating-sequences", schemaName));
if (_log.isTraceEnabled())
_log.trace(_loc.get("gen-seqs", sc... |
public void close () {
checkWidget ();
closeWidget ();
}
void createBalloonTipHandle () {
balloonTipHandle = OS.CreateWindowEx (
0,
new TCHAR (0, OS.TOOLTIPS_CLASS, true),
null,
OS.TTS_ALWAYSTIP | OS.TTS_BALLOON,
OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
handle,
0,
OS.GetModuleHandle (null),
null)... | public void close () {
checkWidget ();
closeWidget ();
}
void createBalloonTipHandle () {
balloonTipHandle = OS.CreateWindowEx (
0,
new TCHAR (0, OS.TOOLTIPS_CLASS, true),
null,
OS.TTS_ALWAYSTIP | OS.TTS_BALLOON,
OS.CW_USEDEFAULT, 0, OS.CW_USEDEFAULT, 0,
handle,
0,
OS.GetModuleHandle (null),
null)... |
public void handleEvent(Event event) {
TreeItem item = (TreeItem)event.item;
if (item != null) {
setTab((GraphicsTab)item.getData());
}
}
});
}
GraphicsTab[] createTabs() {
return new GraphicsTab[] {
new LineTab(this),
new StarPolyTab(this),
tab = new IntroTab(this),
new BlackWholeTab(this),... | public void handleEvent(Event event) {
TreeItem item = (TreeItem)event.item;
if (item != null) {
setTab((GraphicsTab)item.getData());
}
}
});
}
GraphicsTab[] createTabs() {
return new GraphicsTab[] {
new LineTab(this),
new StarPolyTab(this),
tab = new IntroTab(this),
new BlackHoleTab(this),
... |
public void process(IFormSubmittingComponent submittingComponent)
{
// set the error based on which link submitted the form
if (submittingComponent == submitFormComponent)
{
formComponent.error("FormComponent validation error");
}
else if (submittingComponent == submitComponent)
{
... | public void process(IFormSubmitter submittingComponent)
{
// set the error based on which link submitted the form
if (submittingComponent == submitFormComponent)
{
formComponent.error("FormComponent validation error");
}
else if (submittingComponent == submitComponent)
{
invalidP... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = OpenJPAPersistence.cast(
Persistence.createEntityManagerFactory("test", props));
_conf = (JDBCConfiguration) emf.g... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = OpenJPAPersistence.cast(
Persistence.createEntityManagerFactory("test", props));
_conf = (JD... |
public void testDynamicJPQLWithNamedEntity() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ NamedEntity.class.getName() + ")");
OpenJPAEntityManagerFactory emf = OpenJPAPersistence.cast(
Persistence.createEntityManagerFactory("test",... | public void testDynamicJPQLWithNamedEntity() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ NamedEntity.class.getName() + ")");
OpenJPAEntityManagerFactory emf = OpenJPAPersistence.cast(
Persistence.createEntity... |
public void setUp() {
Map options = new HashMap();
// turn on caching
options.put("openjpa.DataCache", "true");
options.put("openjpa.RemoteCommitProvider", "sjvm");
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation works
options.p... | public void setUp() {
Map options = new HashMap(System.getProperties());
// turn on caching
options.put("openjpa.DataCache", "true");
options.put("openjpa.RemoteCommitProvider", "sjvm");
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation w... |
public void setUp() {
String types = DetachmentOneManyParent.class.getName() + ";"
+ DetachmentOneManyChild.class.getName();
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = Persistence.createEntityManagerFactory("test", ... | public void setUp() {
String types = DetachmentOneManyParent.class.getName() + ";"
+ DetachmentOneManyChild.class.getName();
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = Persistence.createEntityM... |
public void setUp() {
String types = DetachmentOneManyParent.class.getName() + ";"
+ DetachmentOneManyChild.class.getName();
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = (OpenJPAEntityManagerFactory) Persistence.
... | public void setUp() {
String types = DetachmentOneManyParent.class.getName() + ";"
+ DetachmentOneManyChild.class.getName();
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = (OpenJPAEntityManagerFact... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + IdentityGenerationType.class.getName() + ")");
emf = (OpenJPAEntityManagerFactory) Persistence.
createEntityManagerFactory("test", props);
/*
* If the... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + IdentityGenerationType.class.getName() + ")");
emf = (OpenJPAEntityManagerFactory) Persistence.
createEntityManagerFactory("test", props);
... |
public void setUp() {
String types = MappedSuperclassBase.class.getName() + ";"
+ MappedSuperclassL2.class.getName() + ";"
+ EntityL3.class.getName();
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = Persistenc... | public void setUp() {
String types = MappedSuperclassBase.class.getName() + ";"
+ MappedSuperclassL2.class.getName() + ";"
+ EntityL3.class.getName();
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ NamedEntity.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
NamedEntity e = new NamedEntity();
e.setName("e");
Ent... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ NamedEntity.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
NamedEntity e = new NamedEntity();
e.setNa... |
public void setUp() {
Map options = new HashMap();
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation works
options.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = Persistence.createEntityManag... | public void setUp() {
Map options = new HashMap(System.getProperties());
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation works
options.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = Persist... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ ManyOneEntity.class.getName() + ";"
+ ManyOneEntitySub.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
ManyOneEntity e1 ... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ ManyOneEntity.class.getName() + ";"
+ ManyOneEntitySub.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ ManyOneEntity.class.getName() + ";"
+ ManyOneEntitySub.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
ManyOneEnt... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ ManyOneEntity.class.getName() + ";"
+ ManyOneEntitySub.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props... |
public void setUp() {
String types = CascadingOneManyParent.class.getName() + ";"
+ CascadingOneManyChild.class.getName();
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = (OpenJPAEntityManagerFactory) Persistence.
... | public void setUp() {
String types = CascadingOneManyParent.class.getName() + ";"
+ CascadingOneManyChild.class.getName();
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types=" + types + ")");
emf = (OpenJPAEntityManagerFactor... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ BasicEntity.class.getName() + ";"
+ DataStoreBasicEntity.class.getName() + ";"
+ ManyOneIdOwner.class.getName() + ";"
+ DataStoreManyOneIdOwner.class.... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ BasicEntity.class.getName() + ";"
+ DataStoreBasicEntity.class.getName() + ";"
+ ManyOneIdOwner.class.getName() + ";"
+ DataStor... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ EmbeddableWithRelation.class.getName() + ";"
+ MultipleSameTypedEmbedded.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
... | public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ EmbeddableWithRelation.class.getName() + ";"
+ MultipleSameTypedEmbedded.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("t... |
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ TargetedIFaceRelationParent.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
}
| public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory", "jpa(Types="
+ TargetedIFaceRelationParent.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
}
|
public void setUp() {
Map props = new HashMap();
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
}
| public void setUp() {
Map props = new HashMap(System.getProperties());
props.put("openjpa.MetaDataFactory",
"jpa(Types=" + AllFieldTypes.class.getName() + ")");
emf = Persistence.createEntityManagerFactory("test", props);
}
|
public void cut () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) return;
OS.SendMessage (handle, OS.WM_CUT, 0, 0);
}
int defaultBackground () {
return OS.GetSysColor (OS.COLOR_WINDOW);
}
boolean dragDetect (int x, int y) {
if (hooks (SWT.DragDetect)) {
int [] start = new int [1], end = new int [1];
OS.... | public void cut () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) return;
OS.SendMessage (handle, OS.WM_CUT, 0, 0);
}
int defaultBackground () {
return OS.GetSysColor (OS.COLOR_WINDOW);
}
boolean dragDetect (int x, int y) {
if (hooks (SWT.DragDetect)) {
int [] start = new int [1], end = new int [1];
OS.... |
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 int checkStyle (int... | 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 int checkStyle (int... |
public void setImeInputMode (int mode) {
checkWidget();
}
void setInitialSize () {
Monitor monitor = getMonitor ();
Rectangle rect = monitor.getClientArea ();
int width = rect.width * 5 / 8;
int height = rect.height * 5 / 8;
OS.gtk_widget_set_size_request (scrolledHandle, width, height);
OS.gtk_window_resize (s... | public void setImeInputMode (int mode) {
checkWidget();
}
void setInitialBounds () {
Monitor monitor = getMonitor ();
Rectangle rect = monitor.getClientArea ();
int width = rect.width * 5 / 8;
int height = rect.height * 5 / 8;
OS.gtk_widget_set_size_request (scrolledHandle, width, height);
OS.gtk_window_resize ... |
private void initialize(Select sel, ExpContext ctx, QueryExpressions exps,
QueryExpressionsState state) {
Map contains = null;
if (HasContainsExpressionVisitor.hasContains(exps.filter)
|| HasContainsExpressionVisitor.hasContains(exps.having))
contains = new HashMap(7... | private void initialize(Select sel, ExpContext ctx, QueryExpressions exps,
QueryExpressionsState state) {
Map contains = null;
if (HasContainsExpressionVisitor.hasContains(exps.filter)
|| HasContainsExpressionVisitor.hasContains(exps.having))
contains = new HashMap(7... |
protected BuildElement getModel() {
return model;
}
}
| public BuildElement getModel() {
return model;
}
}
|
public void insert(String string) {
checkWidget();
if (string == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
if (blockSelection) {
insertBlockSelectionText(string, false);
} else {
Point sel = getSelectionRange();
replaceTextRange(sel.x, sel.y, string);
}
}
int insertBlockSelectionText(String text, boo... | public void insert(String string) {
checkWidget();
if (string == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
if (blockSelection) {
insertBlockSelectionText(string, false);
} else {
Point sel = getSelectionRange();
replaceTextRange(sel.x, sel.y, string);
}
}
int insertBlockSelectionText(String text, boo... |
public void setCaret (Caret caret) {
checkWidget ();
Caret newCaret = caret;
Caret oldCaret = this.caret;
this.caret = newCaret;
if (isFocusControl ()) {
if (oldCaret != null) oldCaret.killFocus ();
if (newCaret != null) {
if (newCaret.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
newCaret.setFocus ()... | public void setCaret (Caret caret) {
checkWidget ();
Caret newCaret = caret;
Caret oldCaret = this.caret;
this.caret = newCaret;
if (hasFocus ()) {
if (oldCaret != null) oldCaret.killFocus ();
if (newCaret != null) {
if (newCaret.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT);
newCaret.setFocus ();
}
... |
private Ant createAntTask(File directory) {
Ant antTask = new Ant(this);
antTask.init();
if (subTarget != null && subTarget.length() > 0) {
antTask.setTarget(subTarget);
}
if (output != null) {
antTask.setOutput(output);
}
if (direct... | private Ant createAntTask(File directory) {
Ant antTask = new Ant(this);
antTask.init();
if (subTarget != null && subTarget.length() > 0) {
antTask.setTarget(subTarget);
}
if (output != null) {
antTask.setOutput(output);
}
if (direct... |
public String toString(final boolean detailed)
{
final StringBuffer buffer = new StringBuffer();
buffer.append("[MarkupContainer ");
buffer.append(super.toString(true));
if (detailed)
{
if (getMarkupStream() != null)
{
buffer.append(", markupStream = " + getMarkupStream());
}
if (children_s... | public String toString(final boolean detailed)
{
final StringBuffer buffer = new StringBuffer();
buffer.append("[MarkupContainer ");
buffer.append(super.toString(detailed));
if (detailed)
{
if (getMarkupStream() != null)
{
buffer.append(", markupStream = " + getMarkupStream());
}
if (childr... |
public IContainer createInstance(ContainerTypeDescription description, Object[] parameters)
throws ContainerCreateException {
try {
RpcId ID = null;
if (parameters != null && parameters[0] instanceof RpcId)
ID = (RpcId) parameters[0];
else
ID = (RpcId) IDFactory.getDefault().createID(RpcNamespace... | public IContainer createInstance(ContainerTypeDescription description, Object[] parameters)
throws ContainerCreateException {
try {
RpcId ID = null;
if (parameters != null && parameters[0] instanceof RpcId)
ID = (RpcId) parameters[0];
else
ID = (RpcId) IDFactory.getDefault().createID(RpcNamespace... |
public void collectInto(NodeList collectionList, String filter)
{
if (filter == REMARK_NODE_FILTER)
collectionList.add(this);
}
| public void collectInto(NodeList collectionList, String filter)
{
if (filter.equals(REMARK_NODE_FILTER))
collectionList.add(this);
}
|
public void collectInto(NodeList collectionList, String filter)
{
if (filter == STRING_FILTER)
collectionList.add(this);
}
| public void collectInto(NodeList collectionList, String filter)
{
if (filter.equals(STRING_FILTER))
collectionList.add(this);
}
|
public void collectInto(NodeList collectionList, String filter)
{
if (thisScanner != null && thisScanner.getFilter() == filter)
collectionList.add(this);
}
| public void collectInto(NodeList collectionList, String filter)
{
if (thisScanner != null && thisScanner.getFilter().equals(filter))
collectionList.add(this);
}
|
protected boolean isMetaDataNormal(HTTPArgument arg)
{
return arg.getMetaData() == null
|| arg.getMetaData().equals("=")
|| (arg.getValue() != null &&
arg.getValue().toString().length() > 0);
}
| protected boolean isMetaDataNormal(HTTPArgument arg)
{
return arg.getMetaData() == null
|| arg.getMetaData().equals("=")
|| (arg.getValue() != null &&
arg.getValue().length() > 0);
}
|
public void actionPerformed(ActionEvent evt)
{
if (evt.getSource() == classnameCombo)
{
String className =
((String) classnameCombo.getSelectedItem()).trim();
try
{
JavaSamplerClient client = (JavaSamplerClient) Class.forName(
... | public void actionPerformed(ActionEvent evt)
{
if (evt.getSource() == classnameCombo)
{
String className =
((String) classnameCombo.getSelectedItem()).trim();
try
{
JavaSamplerClient client = (JavaSamplerClient) Class.forName(
... |
public void clear() {
this.SERVERMAP.clear();
this.SERVERS.removeAll();
this.SERVERS.updateUI();
}
} | public void clearData() {
this.SERVERMAP.clear();
this.SERVERS.removeAll();
this.SERVERS.updateUI();
}
} |
public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
int hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
info.cx = (short) width;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO... | public void setWidth (int width) {
checkWidget();
if ((style & SWT.SEPARATOR) == 0) return;
if (width < 0) return;
int hwnd = parent.handle;
TBBUTTONINFO info = new TBBUTTONINFO ();
info.cbSize = TBBUTTONINFO.sizeof;
info.dwMask = OS.TBIF_SIZE;
info.cx = (short) width;
OS.SendMessage (hwnd, OS.TB_SETBUTTONINFO... |
public boolean isChildFragmentResolved() {
return fIsFragmentResolved & ( fMatchingChildCount > 0);
}
| public boolean isChildFragmentResolved() {
return fIsFragmentResolved && (fMatchingChildCount > 0);
}
|
private final Object lookupSpringBean(ApplicationContext ctx, Class clazz)
{
Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors(ctx, clazz);
if (beans.size() == 0)
{
throw new IllegalStateException("bean of type ["
+ clazz.getName() + "] not found");
}
if (beans.size() > 1)
{
// ther... | private final Object lookupSpringBean(ApplicationContext ctx, Class clazz)
{
Map beans = BeanFactoryUtils.beansOfTypeIncludingAncestors(ctx, clazz);
if (beans.size() == 0)
{
throw new IllegalStateException("bean of type ["
+ clazz.getName() + "] not found");
}
if (beans.size() > 1)
{
// ther... |
private void addValue(long newValue, int sampleCount) {
count =+ sampleCount;
minimum=Math.min(newValue, minimum);
maximum=Math.max(newValue, maximum);
double currentVal = newValue;
sum += currentVal;
sumOfSquares += currentVal * currentVal;
// Calculate each ... | private void addValue(long newValue, int sampleCount) {
count += sampleCount;
minimum=Math.min(newValue, minimum);
maximum=Math.max(newValue, maximum);
double currentVal = newValue;
sum += currentVal;
sumOfSquares += currentVal * currentVal;
// Calculate each ... |
public AjType<? super T> getSupertype() {
Class<? super T> superclass = clazz.getSuperclass();
return (AjType<? super T>) new AjTypeImpl(superclass);
}
| public AjType<? super T> getSupertype() {
Class<? super T> superclass = clazz.getSuperclass();
return superclass==null ? null : (AjType<? super T>) new AjTypeImpl(superclass);
}
|
public StringList getLexicalPattern() {
if (fPatternType == SPECIAL_PATTERN_NONE && fValidationDV != DV_INTEGER && fPatternStr == null)
return null;
if (fLexicalPattern == null){
int size = fPatternStr == null ? 0 : fPatternStr.size();
String[] strs;
i... | public StringList getLexicalPattern() {
if (fPatternType == SPECIAL_PATTERN_NONE && fValidationDV != DV_INTEGER && fPatternStr == null)
return null;
if (fLexicalPattern == null){
int size = fPatternStr == null ? 0 : fPatternStr.size();
String[] strs;
i... |
public static final Quantifier NONE = new Quantifier("none");
private static abstract class Predicate {
abstract boolean eval(int t, int f);
}
| public static final Quantifier NONE = new Quantifier("none");
private abstract static class Predicate {
abstract boolean eval(int t, int f);
}
|
private final void invokeSetter(final Object object, final String name, final String value,
final Locale locale)
{
// Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus
// 'name' will be all lowercase.
// Note: because the attributes are all lowercase, there is slight
// possibility of err... | private final void invokeSetter(final Object object, final String name, final String value,
final Locale locale)
{
// Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus
// 'name' will be all lowercase.
// Note: because the attributes are all lowercase, there is slight
// possibility of err... |
public ServiceURL getServiceURL() throws ServiceLocationException {
IServiceTypeID stid = getServiceID().getServiceTypeID();
return new ServiceURL(stid.getInternal() + "://" + getLocation().getScheme() + "://" + getLocation().getHost() + ":" + getLocation().getPort(), ServiceURL.LIFETIME_PERMANENT); //$NON-NLS-1$ ... | public ServiceURL getServiceURL() throws ServiceLocationException {
IServiceTypeID stid = getServiceID().getServiceTypeID();
return new ServiceURL(stid.getInternal() + "://" + getLocation().getScheme() + "://" + getLocation().getAuthority(), ServiceURL.LIFETIME_PERMANENT); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$... |
public final void redirectToInterceptPage(final Page page)
{
interceptContinuationURL = page.getResponse().encodeURL(page.getRequest().getURL());
page.getRequestCycle().redirectToPage(page);
session.dirty();
}
| public final void redirectToInterceptPage(final Page page)
{
interceptContinuationURL = page.getResponse().encodeURL(page.getRequest().getURL());
page.redirectTo(page);
session.dirty();
}
|
protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// If a user subclasses this class and implements IOnChangeListener
// an onChange scriptlet is added
final String url = getPage().urlFor(this, IOnChangeListener.class);
// Should the form be resubmitted if the s... | protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// If a user subclasses this class and implements IOnChangeListener
// an onChange scriptlet is added
final String url = urlFor(IOnChangeListener.class);
// Should the form be resubmitted if the selection changes... |
public void GUIComponents2() throws Exception
{
String name = guiItem.getClass().getName();
//TODO these assertions should be separate tests
TestElement el = guiItem.createTestElement();
assertNotNull(
name+".createTestElement should be non-null ", el);
assertEquals(
"GUI-CLASS: Failed on "... | public void GUIComponents2() throws Exception
{
String name = guiItem.getClass().getName();
//TODO these assertions should be separate tests
TestElement el = guiItem.createTestElement();
assertNotNull(
name+".createTestElement should be non-null ", el);
assertEquals(
"GUI-CLASS: Failed on "... |
public void testParseWithoutHandler() {
try {
PointcutParser
.getPointcutParserSupportingAllPrimitivesAndUsingContextClassloaderForResolution()
.parsePointcutExpression("bean(service.*");
fail("should not be able to parse bean(service.*)");
} catch(IllegalArgumentException ex) {
assertTrue("cont... | public void testParseWithoutHandler() {
try {
PointcutParser
.getPointcutParserSupportingAllPrimitivesAndUsingContextClassloaderForResolution()
.parsePointcutExpression("bean(service.*");
fail("should not be able to parse bean(service.*)");
} catch(IllegalArgumentException ex) {
assertTrue("cont... |
public final Page startPage(final Page page)
{
setHomePage(DummyHomePage.class);
rerender(page);
Page last = getLastRenderedPage();
getWicketSession().touch(page);
if (page != last)
{
getWicketSession().touch(last);
}
return last;
}
| public final Page startPage(final Page page)
{
setHomePage(DummyHomePage.class);
processRequestCycle(page);
Page last = getLastRenderedPage();
getWicketSession().touch(page);
if (page != last)
{
getWicketSession().touch(last);
}
return last;
}
|
public void testSimpleTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.setHomePage(SimpleTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
SimpleTablePage page = (SimpleTablePage)application.getLastRenderedPage();... | public void testSimpleTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.setHomePage(SimpleTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
SimpleTablePage page = (SimpleTablePage)application.getLastRenderedPage();... |
public void testVersionTimestamp() {
// ensure that some time has passed
// since the records were created
try {
Thread.sleep(50);
}
catch (InterruptedException e) {
// do nothing
}
EntityManager em1 = emf.createEntityManager()... | public void testVersionTimestamp() {
// ensure that some time has passed
// since the records were created
try {
Thread.sleep(5000);
}
catch (InterruptedException e) {
// do nothing
}
EntityManager em1 = emf.createEntityManager... |
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
TreeItem [] children = parentItem == null ? items : parentItem.items;
... | public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
TreeItem [] children = parentItem == null ? items : parentItem.items;
... |
protected CharSequence getPreconditionScript()
{
return "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId() + "')";
}
| protected CharSequence getPreconditionScript()
{
return "return Wicket.$$(this)&&Wicket.$$('" + getForm().getMarkupId() + "')";
}
|
public String toString() {
StringBuffer b = new StringBuffer("SharedObjectContainerDescription[");
b.append("name:").append(name).append(";");
if (instantiator == null)
b.append("class:").append(instantiatorClass).append(";");
else
b.append("instantiator:").append(instantiator).append(";");
b.append("d... | public String toString() {
StringBuffer b = new StringBuffer("ContainerTypeDescription[");
b.append("name:").append(name).append(";");
if (instantiator == null)
b.append("class:").append(instantiatorClass).append(";");
else
b.append("instantiator:").append(instantiator).append(";");
b.append("desc:").a... |
public void init() {
p1 = new Project();
p1.detectJavaVersion();
p1.addTaskDefinition("property",
(Class)project.getTaskDefinitions().get("property"));
}
| public void init() {
p1 = new Project();
p1.setJavaVersionProperty();
p1.addTaskDefinition("property",
(Class)project.getTaskDefinitions().get("property"));
}
|
public String getVsspath() {
return new String(m_vssPath);
}
| public String getVsspath() {
return m_vssPath;
}
|
public void lineGetSegments(BidiSegmentEvent event) {
listenerCalled = true;
}
};
try {
text.addBidiSegmentListener(null);
}
catch (IllegalArgumentException e) {
exceptionThrown = true;
}
assertTrue("Expected exception not thrown", exceptionThrown);
listenerCalled = false;
text.setText(line);
... | public void lineGetSegments(BidiSegmentEvent event) {
listenerCalled = true;
}
};
try {
text.addBidiSegmentListener(null);
}
catch (IllegalArgumentException e) {
exceptionThrown = true;
}
assertTrue("Expected exception not thrown", exceptionThrown);
listenerCalled = false;
text.setText(line);
... |
public void maybeConfigure(Project p) throws BuildException {
if (attributes != null) {
ProjectHelper.configure(wrappedObject, attributes, p);
attributes = null;
}
if (characters.length() != 0) {
ProjectHelper.addText(wrappedObject, characters.toString());... | public void maybeConfigure(Project p) throws BuildException {
if (attributes != null) {
ProjectHelper.configure(wrappedObject, attributes, p);
attributes = null;
}
if (characters.length() != 0) {
ProjectHelper.addText(p, wrappedObject, characters.toString(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.