buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public boolean dispatch(boolean complete)
throws IOException, XNIException {
fEntityManager.setEntityHandler(null);
try {
boolean again;
XMLResourceIdentifierImpl resourceIdentifier = new XMLResourceIdentifierImpl();
do {
... | public boolean dispatch(boolean complete)
throws IOException, XNIException {
fEntityManager.setEntityHandler(null);
try {
boolean again;
XMLResourceIdentifierImpl resourceIdentifier = new XMLResourceIdentifierImpl();
do {
... |
public void testGetServiceReference() throws Exception {
final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
// client [0]/adapter[0] is the service 'server'
// client [1]/adapter[1] is the service target (client)
final Dictionary props = new Hashtable();
props.put(Constants.SERVICE... | public void testGetServiceReference() throws Exception {
final IRemoteServiceContainerAdapter[] adapters = getRemoteServiceAdapters();
// client [0]/adapter[0] is the service 'server'
// client [1]/adapter[1] is the service target (client)
final Dictionary props = new Hashtable();
props.put(Constants.SERVICE... |
protected IRemoteCallParameter[] prepareParametersForRequest(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException {
List results = new ArrayList();
Object[] callParameters = call.getParameters();
IRemoteCallParameter[] defaultCallableParameters = callable.getDefaultParameters()... | protected IRemoteCallParameter[] prepareParametersForRequest(String uri, IRemoteCall call, IRemoteCallable callable) throws NotSerializableException {
List results = new ArrayList();
Object[] callParameters = call.getParameters();
IRemoteCallParameter[] defaultCallableParameters = callable.getDefaultParameters()... |
public String serializeParameter(String uri, IRemoteCall call, IRemoteCallable callable, Object param, IRemoteCallParameter defaultParam) throws NotSerializableException;
} | public IRemoteCallParameter serializeParameter(String uri, IRemoteCall call, IRemoteCallable callable, IRemoteCallParameter paramDefault, Object paramToSerialize) throws NotSerializableException;
} |
public void releaseAttrList(int attrListHandle) {
if (attrListHandle == -1)
return;
int chunk = attrListHandle >> CHUNK_SHIFT;
int index = attrListHandle & CHUNK_MASK;
while (true) {
boolean last = (fAttFlags[chunk][index] & ATTFLAG_LASTATTR) != 0;
... | public void releaseAttrList(int attrListHandle) {
if (attrListHandle == -1)
return;
int chunk = attrListHandle >> CHUNK_SHIFT;
int index = attrListHandle & CHUNK_MASK;
while (true) {
boolean last = (fAttFlags[chunk][index] & ATTFLAG_LASTATTR) != 0;
... |
public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch < 0x80) {
if (XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) {
qname.clear();
return;
}
if (ch == ':') {
... | public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch < 0x80) {
if (XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) {
qname.clear();
return;
}
if (ch == ':') {
... |
public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch < 0x80) {
if (XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) {
qname.clear();
return;
}
if (ch == ':') {
... | public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch < 0x80) {
if (XMLCharacterProperties.fgAsciiInitialNameChar[ch] == 0) {
qname.clear();
return;
}
if (ch == ':') {
... |
public void scanQName(char fastcheck, QName qname) throws Exception {
// REVISIT: possible bugs with surrogate characters -el
int nameOffset = fCurrentOffset;
int ch;
int prefixend=-1;
int offset=fCurrentOffset;
ch = getChar(fCurrentOffset);
if (ch < 0x80) {... | public void scanQName(char fastcheck, QName qname) throws Exception {
// REVISIT: possible bugs with surrogate characters -el
int nameOffset = fCurrentOffset;
int ch;
int prefixend=-1;
int offset=fCurrentOffset;
ch = getChar(fCurrentOffset);
if (ch < 0x80) {... |
private void registerExistingServices(final EventHookImpl hook,
final BundleContext bundleContext) {
try {
final ServiceReference[] refs = bundleContext.getServiceReferences(
(String) null,
"(" + IDistributionConstants.SERVICE_EXPORTED_INTERFACES //$NON-NLS-1$
+ "=*)"); //$NON-NLS-1$
if (re... | private void registerExistingServices(final EventHookImpl hook,
final BundleContext bundleContext) {
try {
final ServiceReference[] refs = bundleContext.getServiceReferences(
null,
"(" + IDistributionConstants.SERVICE_EXPORTED_INTERFACES //$NON-NLS-1$
+ "=*)"); //$NON-NLS-1$
if (refs != nul... |
private static String getChannelURI(final URI serviceURI) {
return URI.create(
serviceURI.getScheme() + "://" + serviceURI.getHost() + ":" //$NON-NLS-1$ //$NON-NLS-2$
+ serviceURI.getPort()).toString();
}
/**
* the method is called when the R-OSGi bundle is about to be stopped.
* removes all registe... | private static String getChannelURI(final URI serviceURI) {
return URI.create(
serviceURI.getScheme() + "://" + serviceURI.getHost() + ":" //$NON-NLS-1$ //$NON-NLS-2$
+ serviceURI.getPort()).toString();
}
/**
* the method is called when the R-OSGi bundle is about to be stopped.
* removes all registe... |
protected ServiceRegistration registerService(String[] clazzes,
Object service, Properties props) throws Exception {
return getContext().registerService(clazzes, service, (Dictionary) props);
}
| protected ServiceRegistration registerService(String[] clazzes,
Object service, Properties props) throws Exception {
return getContext().registerService(clazzes, service, props);
}
|
public void testQueryTimeout5() {
if (skipTests) {
return;
}
Integer setTime = new Integer(-2000);
getLog().trace("testQueryTimeout5() - setHint(" + setTime + ")");
EntityManager em = null;
try {
em = emf.createEntityManager();
asse... | public void testQueryTimeout5() {
if (skipTests) {
return;
}
Integer setTime = new Integer(-2000);
getLog().trace("testQueryTimeout5() - setHint(" + setTime + ")");
EntityManager em = null;
try {
em = emf.createEntityManager();
asse... |
private int imageWidth() {
Image image = getImage();
if (image != null && !image.isDisposed()) {
return image.getBounds().width;
} else {
return 0;
}
}
/**
* Paint the receiver.
*/
void paint(GC gc, boolean isSelected) {
// high light colored line across left and top
gc.setForeground(display.getSystemCol... | private int imageWidth() {
Image image = getImage();
if (image != null && !image.isDisposed()) {
return image.getBounds().width;
} else {
return 0;
}
}
/**
* Paint the receiver.
*/
void paint(GC gc, boolean isSelected) {
// high light colored line across left and top
gc.setForeground(display.getSystemCol... |
public XSDAbstractIDConstraintTraverser (XSDHandler handler,
XSAttributeChecker gAttrCheck) {
super(handler, gAttrCheck);
}
void traverseIdentityConstraint(IdentityConstraint ic,
Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) {
// Gener... | public XSDAbstractIDConstraintTraverser (XSDHandler handler,
XSAttributeChecker gAttrCheck) {
super(handler, gAttrCheck);
}
void traverseIdentityConstraint(IdentityConstraint ic,
Element icElem, XSDocumentInfo schemaDoc, Object [] icElemAttrs) {
// Gener... |
public Object component(Check<T> check)
{
if (String.valueOf(check.getValue()).equals(value))
{
return check;
}
return CONTINUE_TRAVERSAL;
}
});
if (checkbox == null)
{
throw new WicketRuntimeException(
"submitted http post valu... | public Object component(Check<T> check)
{
if (String.valueOf(check.getValue()).equals(value))
{
return check;
}
return CONTINUE_TRAVERSAL;
}
});
if (checkbox == null)
{
throw new WicketRuntimeException(
"submitted http post valu... |
public Object component(Radio<T> radio)
{
if (radio.getValue().equals(value))
{
return radio;
}
return CONTINUE_TRAVERSAL;
}
});
if (choice == null)
{
throw new WicketRuntimeException(
"submitted http post value [" +
value +
"] for RadioGrou... | public Object component(Radio<T> radio)
{
if (radio.getValue().equals(value))
{
return radio;
}
return CONTINUE_TRAVERSAL;
}
});
if (choice == null)
{
throw new WicketRuntimeException(
"submitted http post value [" +
value +
"] for RadioGrou... |
public void testBoundCompoundPropertyModel()
{
CompoundPropertyModel<String> emptyModel = new CompoundPropertyModel<String>("");
String expected = "Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[]";
assertEquals(expected, emptyModel.toString());
Properties properties = new Prope... | public void testBoundCompoundPropertyModel()
{
CompoundPropertyModel<String> emptyModel = new CompoundPropertyModel<String>("");
String expected = "Model:classname=[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[]";
assertEquals(expected, emptyModel.toString());
Properties properties = new Prope... |
public void setRedraw (boolean redraw) {
checkWidget ();
super.setRedraw (redraw);
if (redraw && drawCount == 0) {
checkItems ();
setScrollWidth ();
}
}
boolean setScrollWidth () {
return setScrollWidth (true, items, true);
}
boolean setScrollWidth (boolean set, TreeItem[] items, boolean recurse) {
if (item... | public void setRedraw (boolean redraw) {
checkWidget ();
super.setRedraw (redraw);
if (redraw && drawCount == 0) {
checkItems ();
setScrollWidth ();
}
}
boolean setScrollWidth () {
return setScrollWidth (true, items, true);
}
boolean setScrollWidth (boolean set, TreeItem[] items, boolean recurse) {
if (item... |
public Control [] getTabList () {
checkWidget ();
Control [] tabList = _getTabList ();
if (tabList == null) {
int count = 0;
Control [] list =_getChildren ();
for (int i=0; i<list.length; i++) {
if (list [i].isTabGroup ()) count++;
}
tabList = new Control [count];
int index = 0;
for (int i=0; i<list... | public Control [] getTabList () {
checkWidget ();
Control [] tabList = _getTabList ();
if (tabList == null) {
int count = 0;
Control [] list =_getChildren ();
for (int i=0; i<list.length; i++) {
if (list [i].isTabGroup ()) count++;
}
tabList = new Control [count];
int index = 0;
for (int i=0; i<list... |
public final Component setModel(final IModel model)
{
// See if there is a current model
final IModel currentModel = getModel();
// Detach if IDetachableModel
if (currentModel != null && currentModel instanceof IDetachableModel)
{
((IDetachableModel)currentModel).detach();
}
// Set self in case the... | public final Component setModel(final IModel model)
{
// See if there is a current model
final IModel currentModel = getModel();
// Detach if IDetachableModel
if (currentModel != null && currentModel instanceof IDetachableModel)
{
((IDetachableModel)currentModel).detach();
}
// Set self in case the... |
public static void main(String[] args) {
Display display = new Display();
Color red = display.getSystemColor(SWT.COLOR_RED);
Color blue = display.getSystemColor(SWT.COLOR_BLUE);
Color white = display.getSystemColor(SWT.COLOR_WHITE);
Color gray = display.getSystemColor(SWT.COLOR_GRAY);
Shell shell = new Shell(disp... | public static void main(String[] args) {
Display display = new Display();
Color red = display.getSystemColor(SWT.COLOR_RED);
Color blue = display.getSystemColor(SWT.COLOR_BLUE);
Color white = display.getSystemColor(SWT.COLOR_WHITE);
Color gray = display.getSystemColor(SWT.COLOR_GRAY);
Shell shell = new Shell(disp... |
public NiceUrlApplication()
{
super();
// mount single bookmarkable pages
mountBookmarkablePage("/the/homepage/path", Home.class);
mountBookmarkablePage("/a/nice/path/to/the/first/page", Page1.class);
mountBookmarkablePage("/path/to/page2", Page2.class);
// mount a whole package at once (all bookmarkable... | public NiceUrlApplication()
{
super();
// mount single bookmarkable pages
mountBookmarkablePage("/the/homepage/path", Home.class);
mountBookmarkablePage("/a/nice/path/to/the/first/page", Page1.class);
mountBookmarkablePage("/path/to/page2", Page2.class);
// mount a whole package at once (all bookmarkable... |
protected void setUp() throws Exception
{
super.setUp();
application.getMarkupSettings().setMarkupParserFactory(
new MarkupParserFactory(application.getMarkupSettings(), new PrependContextPathHandler()));
}
| protected void setUp() throws Exception
{
super.setUp();
application.getMarkupSettings().setMarkupParserFactory(
new MarkupParserFactory(application, new PrependContextPathHandler()));
}
|
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 st... | 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 st... |
public int getSelection () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
return (int) adjustment.value;
}
int gtk_activate (int widget) {
//TODO FIND A BETTER SOLUTION FOR THIS PROBL... | public int getSelection () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
return (int) adjustment.value;
}
int gtk_activate (int widget) {
//TODO FIND A BETTER SOLUTION FOR THIS PROBL... |
public QueryBuilder getQueryBuilder() {
return new QueryBuilderImpl();
}
| public QueryBuilder getQueryBuilder() {
return new QueryBuilderImpl(this);
}
|
public HangmanApplication()
{
getPages().setHomePage(Home.class);
getSettings().setStripComponentIds(true);
}
| public HangmanApplication()
{
getPages().setHomePage(Home.class);
getSettings().setStripWicketTags(true);
}
|
private boolean validateDocument(String document, int expectedLinkClickCount) {
HtmlDocumentValidator validator = new HtmlDocumentValidator();
Tag html = new Tag("html");
Tag head = new Tag("head");
html.addExpectedChild(head);
Tag title = new Tag("title");
head.addExpectedChild(title);
title.addExpected... | private boolean validateDocument(String document, int expectedLinkClickCount) {
HtmlDocumentValidator validator = new HtmlDocumentValidator();
Tag html = new Tag("html");
Tag head = new Tag("head");
html.addExpectedChild(head);
Tag title = new Tag("title");
head.addExpectedChild(title);
title.addExpected... |
public static final Object CONTENTS[][] = {
// Internal message formatter messages
{ "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
{ "FormatFailed", "An internal error occurred while formatting the following message:\n " },
{ "NoValidatorFor", "No validato... | public static final Object CONTENTS[][] = {
// Internal message formatter messages
{ "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
{ "FormatFailed", "An internal error occurred while formatting the following message:\n " },
{ "NoValidatorFor", "No validato... |
public void execute() throws BuildException {
if (toUri == null) {
throw new BuildException("Either 'todir' or 'tofile' attribute "
+ "is required.");
}
if (fromUri == null && fileSets == null) {
throw new BuildException("Either t... | public void execute() throws BuildException {
if (toUri == null) {
throw new BuildException("Either 'todir' or 'tofile' attribute "
+ "is required.");
}
if (fromUri == null && fileSets == null) {
throw new BuildException("Either t... |
public XSObject itemByName(String namespace, String localName) {
for (int i = 0; i < fNSNum; i++) {
if (isEqual(namespace, fNamespaces[i])) {
XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName);
// only return it if it matches the required type
... | public XSObject itemByName(String namespace, String localName) {
for (int i = 0; i < fNSNum; i++) {
if (isEqual(namespace, fNamespaces[i])) {
XSTypeDefinition type = (XSTypeDefinition)fMaps[i].get(localName);
// only return it if it matches the required type
... |
public void addHeader(String s)
{
header.add(s);
data.put(s, new ArrayList(size()));
}
| public void addHeader(String s)
{
header.add(s);
data.put(s, new ArrayList(Math.max(size(),100)));
}
|
public RatingPanel(String id, int nrOfStars)
{
this(id, null, 5, true);
}
| public RatingPanel(String id, int nrOfStars)
{
this(id, null, nrOfStars, true);
}
|
public void fireMessageListeners(ID sender, String msg) {
for (Iterator i = msgListeners.iterator(); i.hasNext();) {
IIMMessageListener l = (IIMMessageListener) i.next();
l.handleMessageEvent(new ChatRoomMessageEvent(sender,
new ChatRoomMessage(sender, msg)));
}
}
| public void fireMessageListeners(ID sender, String msg) {
for (Iterator i = msgListeners.iterator(); i.hasNext();) {
IIMMessageListener l = (IIMMessageListener) i.next();
l.handleMessageEvent(new ChatRoomMessageEvent(sender,
new ChatRoomMessage(sender, targetID, msg)));
}
}
|
private static final long CONNECT_TIMEOUT = new Long(System.getProperty(
"org.eclipse.ecf.provider.irc.connectTimeout", "60000"))
.longValue();
| private static final long CONNECT_TIMEOUT = new Long(System.getProperty(
"org.eclipse.ecf.provider.irc.connectTimeout", "30000"))
.longValue();
|
public void open(Display display) {
clipboard = new Clipboard(display);
shell = new Shell (display);
shell.setText("SWT Clipboard");
shell.setLayout(new FillLayout());
ScrolledComposite sc = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);
Composite parent = new Composite(sc, SWT.NONE);
sc.setContent... | public void open(Display display) {
clipboard = new Clipboard(display);
shell = new Shell (display);
shell.setText("SWT Clipboard");
shell.setLayout(new FillLayout());
ScrolledComposite sc = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);
Composite parent = new Composite(sc, SWT.NONE);
sc.setContent... |
package org.apache.wicket.page;
/*
* 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... | package org.apache.wicket.page;
/*
* 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... |
public void testDetachCascadeIsSet() {
MetaDataRepository repos = emf.getConfiguration()
.getMetaDataRepositoryInstance();
ClassMetaData meta = repos.getCachedMetaData(DMCustomer.class);
assertEquals(ValueMetaData.CASCADE_IMMEDIATE, meta.getField("firstN... | public void testDetachCascadeIsSet() {
MetaDataRepository repos = emf.getConfiguration()
.getMetaDataRepositoryInstance();
ClassMetaData meta = repos.getCachedMetaData(DMCustomer.class);
assertEquals(ValueMetaData.CASCADE_NONE, meta.getField("firstName")... |
protected String getForUpdateClause(JDBCFetchConfiguration fetch,
boolean forUpdate) {
if (fetch.getIsolationLevel() != -1)
throw new IllegalStateException(_loc.get(
"isolation-level-config-not-supported", getClass().getName())
.getMessage());
else... | protected String getForUpdateClause(JDBCFetchConfiguration fetch,
boolean forUpdate) {
if (fetch != null && fetch.getIsolationLevel() != -1)
throw new IllegalStateException(_loc.get(
"isolation-level-config-not-supported", getClass().getName())
.getMessage... |
public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate,
SQLBuffer buf, boolean val1Null, boolean val2Null) {
if (val1Null && val2Null)
buf.append("1 = 1");
else if (val1Null || val2Null) {
Val val = (val1Null) ? getValue2() : getValue1();
... | public void appendTo(Select sel, ExpContext ctx, BinaryOpExpState bstate,
SQLBuffer buf, boolean val1Null, boolean val2Null) {
if (val1Null && val2Null)
buf.append("1 = 1");
else if (val1Null || val2Null) {
Val val = (val1Null) ? getValue2() : getValue1();
... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int[] w = new int [1], h = new int [1];
int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle);
OS.pango_layout_get_size (layo... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int[] w = new int [1], h = new int [1];
int /*long*/ layout = OS.gtk_entry_get_layout (entryHandle);
OS.pango_layout_get_size (layo... |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
int xborder = 0, yborder = 0;
int /*long*/ style = OS.gtk_widget_get_style (handle);
if ((this.style & SWT.BORDER) != 0) {
xborder += OS.gtk_style_get_xthickness (style);
yborder += OS.gtk_style_get_ythickness (style);
}
xbor... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
int xborder = 0, yborder = 0;
int /*long*/ style = OS.gtk_widget_get_style (handle);
if ((this.style & SWT.BORDER) != 0) {
xborder += OS.gtk_style_get_xthickness (style);
yborder += OS.gtk_style_get_ythickness (style);
}
xbor... |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
Rectangle trim = super.computeTrim (x, y, width, height);
int xborder = 0, yborder = 0;
if ((style & SWT.SINGLE) != 0) {
if ((style & SWT.BORDER) != 0) {
int /*long*/ style = OS.gtk_widget_get_style (handle);
xborder += OS.... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
Rectangle trim = super.computeTrim (x, y, width, height);
int xborder = 0, yborder = 0;
if ((style & SWT.SINGLE) != 0) {
if ((style & SWT.BORDER) != 0) {
int /*long*/ style = OS.gtk_widget_get_style (handle);
xborder += OS.... |
public void write(byte buf[], int off, int len) {
for (int i = 0; i < len; i++) {
write(buf[off + i]);
}
}
void rawWrite(int b) {
super.write(b);
}
void rawPrint(String s) {
int len = s.length();
for (int i = 0; i < len; i++) {
rawWrite(s.charAt(i));
}
}
}
| public void write(byte[] buf, int off, int len) {
for (int i = 0; i < len; i++) {
write(buf[off + i]);
}
}
void rawWrite(int b) {
super.write(b);
}
void rawPrint(String s) {
int len = s.length();
for (int i = 0; i < len; i++) {
rawWrite(s.charAt(i));
}
}
}
|
protected EndpointDescription createExportEndpointDescription(
ServiceReference serviceReference,
Map<String, Object> overridingProperties,
String[] exportedInterfaces, String[] serviceIntents,
IRemoteServiceRegistration rsRegistration,
IRemoteServiceContainer rsContainer) {
IContainer container = rs... | protected EndpointDescription createExportEndpointDescription(
ServiceReference serviceReference,
Map<String, Object> overridingProperties,
String[] exportedInterfaces, String[] serviceIntents,
IRemoteServiceRegistration rsRegistration,
IRemoteServiceContainer rsContainer) {
IContainer container = rs... |
public IRemoteServiceContainer selectConsumerContainer(
EndpointDescription endpointDescription) {
trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$
// Get the endpointID
ID endpointID = IDUtil.createContainerID(endpointDescription);
// Get the remote supported ... | public IRemoteServiceContainer selectConsumerContainer(
EndpointDescription endpointDescription) {
trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$
// Get the endpointID
ID endpointID = IDUtil.createContainerID(endpointDescription);
// Get the remote supported ... |
private static final String DEFAULT_LIMIT = "2"; //$NON-NLS-1$
/** The listener for changes. */
ChangeListener changeListener;
| private static final String DEFAULT_LIMIT = "2"; //$NON-NLS-1$
/** The listener for changes. */
transient ChangeListener changeListener;
|
public void setUp() {
super.setUp(AllFieldTypes.class, CLEAR_TABLES, "openjpa.Log", "SQL=TRACE");
AllFieldTypes pc1 = new AllFieldTypes();
AllFieldTypes pc2 = new AllFieldTypes();
AllFieldTypes pc3 = new AllFieldTypes();
AllFieldTypes pc4 = new AllFieldTypes();
// p... | public void setUp() {
super.setUp(AllFieldTypes.class, CLEAR_TABLES);
AllFieldTypes pc1 = new AllFieldTypes();
AllFieldTypes pc2 = new AllFieldTypes();
AllFieldTypes pc3 = new AllFieldTypes();
AllFieldTypes pc4 = new AllFieldTypes();
// pc1 and pc2, pc3 and pc4 grou... |
public boolean addOrReplaceAspect(ResolvedType aspectType,boolean careAboutShadowMungers) {
boolean change = false;
CrosscuttingMembers xcut = (CrosscuttingMembers)members.get(aspectType);
if (xcut == null) {
members.put(aspectType, aspectType.collectCrosscuttingMembers());
clearCaches();
CflowPointcut.... | public boolean addOrReplaceAspect(ResolvedType aspectType,boolean careAboutShadowMungers) {
boolean change = false;
CrosscuttingMembers xcut = (CrosscuttingMembers)members.get(aspectType);
if (xcut == null) {
members.put(aspectType, aspectType.collectCrosscuttingMembers());
clearCaches();
CflowPointcut.... |
public Button (Composite parent, int style) {
super (parent, checkStyle (style));
}
void _setImage (Image image) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
OS.SendMessage (handle, OS.BCM_SETIMAGELIST, 0, 0);
if (imageList != null) imageList.dispose ();
imageList = null;
if (image != null) {
imag... | public Button (Composite parent, int style) {
super (parent, checkStyle (style));
}
void _setImage (Image image) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
OS.SendMessage (handle, OS.BCM_SETIMAGELIST, 0, 0);
if (imageList != null) imageList.dispose ();
imageList = null;
if (image != null) {
imag... |
public boolean getVisible () {
checkWidget ();
if ((style & SWT.BAR) != 0) {
return this == parent.menuShell ().menuBar;
}
if ((style & SWT.POP_UP) != 0) {
Menu [] popups = display.popups;
if (popups == null) return false;
for (int i=0; i<popups.length; i++) {
if (popups [i] == this) return true;
}
}
... | public boolean getVisible () {
checkWidget ();
if ((style & SWT.BAR) != 0) {
return this == parent.menuShell ().menuBar;
}
if ((style & SWT.POP_UP) != 0) {
Menu [] popups = display.popups;
if (popups == null) return false;
for (int i=0; i<popups.length; i++) {
if (popups [i] == this) return true;
}
}
... |
public int getSelectionIndex () {
checkWidget ();
return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
if (image == null) return OS.I_IMAGENONE;
if (imageList == null) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (bounds.width, bounds.height);
... | public int getSelectionIndex () {
checkWidget ();
return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
if (image == null) return OS.I_IMAGENONE;
if (imageList == null) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (style & SWT.RIGHT_TO_LEFT, bound... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0, height = 0;
if ((style & SWT.SEPARATOR) != 0) {
if ((style & SWT.HORIZONTAL) != 0) {
width = DEFAULT_WIDTH;
height = 3;
} else {
width = 3;
height = DEFAULT_HEIGHT;
}
} else {
if (image != null && is... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0, height = 0;
if ((style & SWT.SEPARATOR) != 0) {
if ((style & SWT.HORIZONTAL) != 0) {
width = DEFAULT_WIDTH;
height = 3;
} else {
width = 3;
height = DEFAULT_HEIGHT;
}
} else {
if (image != null && is... |
public static final String REVISION_NUMBER;
static {
Package pack = OpenJPAVersion.class.getPackage();
String vers = pack == null ? null : pack.getImplementationVersion();
if (vers == null || vers.length() == 0)
vers = "0.0.0";
VERSION_NUMBER = vers;
String... | public static final String REVISION_NUMBER;
static {
Package pack = OpenJPAVersion.class.getPackage();
String vers = pack == null ? null : pack.getImplementationVersion();
if (vers == null || vers.length() == 0)
vers = "0.0.0";
VERSION_NUMBER = vers;
String... |
void register (Collection <? extends NamedFunction> f);
/*
Copyright (c) 2008 Arno Haase.
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 available at
http://www.eclipse.org/legal/epl-v10.... | void register (Collection <? extends NamedFunction> f);
/*
Copyright (c) 2008 Arno Haase.
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 available at
http://www.eclipse.org/legal/epl-v10.... |
public static Test suite() {
TestSuite suite = new TestSuite(EajcModuleTests.class.getName());
suite.addTest(org.aspectj.ajdt.ajc.AjdtAjcTests.suite());
suite.addTest(org.aspectj.ajdt.internal.compiler.batch.AjdtBatchTests.suite());
suite.addTest(org.aspectj.ajdt.internal.core.bui... | public static Test suite() {
TestSuite suite = new TestSuite(EajcModuleTests.class.getName());
suite.addTest(org.aspectj.ajdt.ajc.AjdtAjcTests.suite());
suite.addTest(org.aspectj.ajdt.internal.compiler.batch.AjdtBatchTests.suite());
suite.addTest(org.aspectj.ajdt.internal.core.bui... |
int[] RAND_NUMS = new int[]
/*
* 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.aut.bzip2;
/*... | int[] RAND_NUMS = new int[]
/*
* 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.aut.bzip2;
/*... |
public BoxBorderTestPage_8()
{
Border border1 = new BorderComponent1("border1");
add(border1);
Fragment panel1 = new Fragment("panel1", "frag1", this);
border1.addToBorderBody(panel1);
Fragment panel2 = new Fragment("panel2", "frag2", this);
border1.addToBorderBody(panel2);
}
| public BoxBorderTestPage_8()
{
Border border1 = new BorderComponent1("border1");
add(border1);
Fragment panel1 = new Fragment("panel1", "frag1", border1.getBodyContainer());
border1.addToBorderBody(panel1);
Fragment panel2 = new Fragment("panel2", "frag2", this);
border1.addToBorderBody(panel2);
}
|
public String[] getParameters(final String key)
{
if (parameters != null)
{
return (String[])parameters.keySet().toArray();
}
return super.getParameters(key);
}
| public String[] getParameters(final String key)
{
if (parameters != null)
{
return new String[] {getParameter(key)};
}
return super.getParameters(key);
}
|
public void testRenderHomePage_4() throws Exception
{
boolean hit = false;
try
{
executeTest(SimplePage_4.class, "SimplePageExpectedResult_4.html");
}
catch (MarkupException mex)
{
hit = true;
assertNotNull(mex.getMarkupStream());
assertTrue(mex.getMessage().contains("<span>"));
assertTrue... | public void testRenderHomePage_4() throws Exception
{
boolean hit = false;
try
{
executeTest(SimplePage_4.class, "SimplePageExpectedResult_4.html");
}
catch (MarkupException mex)
{
hit = true;
assertNotNull(mex.getMarkupStream());
assertTrue(mex.getMessage().contains("<span>"));
assertTrue... |
public void testRenderHomePage_1() throws Exception
{
boolean hit = false;
try
{
executeTest(PanelPage_1.class, "Dummy.html");
}
catch (MarkupException mex)
{
hit = true;
assertNotNull(mex.getMarkupStream());
assertTrue(mex.getMessage().contains("Tag does not have a close tag"));
assertTru... | public void testRenderHomePage_1() throws Exception
{
boolean hit = false;
try
{
executeTest(PanelPage_1.class, "Dummy.html");
}
catch (MarkupException mex)
{
hit = true;
assertNotNull(mex.getMarkupStream());
assertTrue(mex.getMessage().contains("Tag does not have a close tag"));
assertTru... |
public Image(Device device, Image srcImage, int flag) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
if (srcImage == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (srcImage.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
Rectang... | public Image(Device device, Image srcImage, int flag) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
if (srcImage == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (srcImage.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
Rectang... |
public void addDefine(Define define) {
definitionList.add(define);
}
| public void addDefine(Define define) {
definitionList.addElement(define);
}
|
public void threadStarted() {
logThreadStart();
Context context = null;
thrown = null;
try {
context = getInitialContext();
Object obj = context.lookup(getQueueConnectionFactory());
if (!(obj instanceof QueueConnectionFactory)) {
S... | public void threadStarted() {
logThreadStart();
Context context = null;
thrown = null;
try {
context = getInitialContext();
Object obj = context.lookup(getQueueConnectionFactory());
if (!(obj instanceof QueueConnectionFactory)) {
S... |
protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) {
String urlStr = url.toString();
log.debug("Start : sample " + urlStr);
PostMethod httpMethod;
httpMethod = new PostMethod(urlStr);
HTTPSampleResult res = new HTTPSamp... | protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) {
String urlStr = url.toString();
log.debug("Start : sample " + urlStr);
PostMethod httpMethod;
httpMethod = new PostMethod(urlStr);
HTTPSampleResult res = new HTTPSamp... |
// Sigh. This doesn't work; too many nodes have private data that
// would have to be manually tweaked. May be able to add local
// shortcuts to each nodetype. Consider ?????
// if(source instanceof NodeImpl &&
// !(source instanceof DocumentImpl))
// {
// // Ca... | // Sigh. This doesn't work; too many nodes have private data that
// would have to be manually tweaked. May be able to add local
// shortcuts to each nodetype. Consider ?????
// if(source instanceof NodeImpl &&
// !(source instanceof DocumentImpl))
// {
// // Ca... |
public void configure( final Configuration configuration )
throws ConfigurationException
{
final String[] attributes = configuration.getAttributeNames();
for( int i = 0; i < attributes.length; i++ )
{
final String name = attributes[ i ];
final String value... | public void configure( final Configuration configuration )
throws ConfigurationException
{
final String[] attributes = configuration.getAttributeNames();
for( int i = 0; i < attributes.length; i++ )
{
final String name = attributes[ i ];
final String value... |
protected final Task doCreateTask( final String name, final ExecutionFrame frame )
throws TaskException
{
try
{
final TypeFactory factory = frame.getTypeManager().getFactory( Task.class );
return (Task)factory.create( name );
}
catch( final TypeExc... | protected final Task doCreateTask( final String name, final ExecutionFrame frame )
throws TaskException
{
try
{
final TypeFactory factory = frame.getTypeManager().getFactory( Task.ROLE );
return (Task)factory.create( name );
}
catch( final TypeExce... |
public Object create( final String name )
throws TypeException
{
// Locate the factory to use
TypeFactory factory = findFactory( name );
if( null == factory )
{
final String message = REZ.getString( "no-factory.error", name );
throw new TypeExcepti... | public Object create( final String name )
throws TypeException
{
// Locate the factory to use
TypeFactory factory = findFactory( name );
if( null == factory )
{
final String message = REZ.getString( "no-factory.error", name );
throw new TypeExcepti... |
public void configure( final Configuration configuration )
throws ConfigurationException
{
final DefaultConfiguration newConfiguration =
new DefaultConfiguration( configuration.getName(), configuration.getLocation() );
final String[] attributes = configuration.getAttributeNa... | public void configure( final Configuration configuration )
throws ConfigurationException
{
final DefaultConfiguration newConfiguration =
new DefaultConfiguration( configuration.getName(), configuration.getLocation() );
final String[] attributes = configuration.getAttributeNa... |
private void registerFactory( final String serviceRoleName,
final Class serviceType,
final Class factoryClass )
throws Exception
{
// TODO - add stuff to TypeDeployer to do this instead
final RoleManager roleManager = (R... | private void registerFactory( final String serviceRoleName,
final Class serviceType,
final Class factoryClass )
throws Exception
{
// TODO - add stuff to TypeDeployer to do this instead
final RoleManager roleManager = (R... |
public void onRendered(Component component)
{
final Response r = component.getResponse();
r.write("<span style=\"display:none;\" class=\"");
r.write(getSpanClass());
r.write("\" ");
r.write("id=\"");
r.write(getMarkupId());
r.write("\">");
r.write("<img src=\"");
r.write(getIndicatorUrl());
r.wri... | public void onRendered(Component component)
{
final Response r = component.getResponse();
r.write("<span style=\"display:none;\" class=\"");
r.write(getSpanClass());
r.write("\" ");
r.write("id=\"");
r.write(getMarkupId());
r.write("\">");
r.write("<img src=\"");
r.write(getIndicatorUrl());
r.wri... |
public Rectangle getBounds () {
checkWidget ();
int [] x = new int [1], y = new int [1];
OS.gtk_window_get_position (shellHandle, x, y);
int width = OS.GTK_WIDGET_WIDTH (vboxHandle);
int height = OS.GTK_WIDGET_HEIGHT (vboxHandle);
return new Rectangle (x [0], y [0], width + trimWidth (), height + trimHeight ());
... | public Rectangle getBounds () {
checkWidget ();
int [] x = new int [1], y = new int [1];
OS.gtk_window_get_position (shellHandle, x, y);
int width = OS.GTK_WIDGET_WIDTH (vboxHandle);
int height = OS.GTK_WIDGET_HEIGHT (vboxHandle);
return new Rectangle (x [0], y [0], width + trimWidth (), height + trimHeight ());
... |
public SchemaGrammar(SchemaGrammar grammar) {
fTargetNamespace = grammar.fTargetNamespace;
fGrammarDescription = grammar.fGrammarDescription.makeClone();
//fGrammarDescription.fContextType |= XSDDescription.CONTEXT_COLLISION; // REVISIT
fSymbolTable = grammar.fSymbolTable; // REVISIT... | public SchemaGrammar(SchemaGrammar grammar) {
fTargetNamespace = grammar.fTargetNamespace;
fGrammarDescription = grammar.fGrammarDescription.makeClone();
//fGrammarDescription.fContextType |= XSDDescription.CONTEXT_COLLISION; // REVISIT
fSymbolTable = grammar.fSymbolTable; // REVISIT... |
private void openDump () {
if (print != null) return;
Date now = new Date();
fileName = FILENAME_PREFIX + "."
+ new SimpleDateFormat("yyyyMMdd").format(now) + "."
+ new SimpleDateFormat("HHmmss.SSS").format(now) + "."
+ FILENAME_SUFFIX;
try {
print = new PrintStream(new FileOutputStream(fileName... | private void openDump () {
if (print != null) return;
Date now = new Date();
fileName = FILENAME_PREFIX + "."
+ new SimpleDateFormat("yyyyMMdd").format(now) + "."
+ new SimpleDateFormat("HHmmss.SSS").format(now) + "."
+ FILENAME_SUFFIX;
try {
print = new PrintStream(new FileOutputStream(fileName... |
private void configureElement(AntLibFactory factory, Object element,
BuildElement model)
throws ExecutionException {
Setter setter = getSetter(element.getClass());
// start by setting the attributes of this element
for (Iterator i = model.getAttribu... | private void configureElement(AntLibFactory factory, Object element,
BuildElement model)
throws ExecutionException {
Setter setter = getSetter(element.getClass());
// start by setting the attributes of this element
for (Iterator i = model.getAttribu... |
void addNestedTask(Task task) throws ExecutionException;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following c... | void addNestedTask(Task task) throws ExecutionException;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following c... |
public void changed (Control[] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... | public void changed (Control[] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim (x, y, width, height);
if (menuBar != null) {
XtWidgetGeometry request = new XtWidgetGeometry ();
XtWidgetGeometry result = new XtWidgetGeometry ();
request.request_mode = OS.CWWidth;
reques... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim (x, y, width, height);
if (menuBar != null) {
XtWidgetGeometry request = new XtWidgetGeometry ();
XtWidgetGeometry result = new XtWidgetGeometry ();
request.request_mode = OS.CWWidth;
reques... |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim (x, y, width, height);
/*
* Feature in Motif. There is no way to get the single pixel border
* surrounding a TopLevelShell or a TransientShell. Attempts to set a
* border on either the shell han... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim (x, y, width, height);
/*
* Feature in Motif. There is no way to get the single pixel border
* surrounding a TopLevelShell or a TransientShell. Attempts to set a
* border on either the shell han... |
private static final TableCellRenderer[] RENDERERS =
new TableCellRenderer[]{
null, // Label
null, // count
null, // Mean
null, // Min
null, // Max
new NumberRenderer("#0.00"), // Std Dev.
new NumberRenderer("#0.00%"), // Er... | private static final TableCellRenderer[] RENDERERS =
new TableCellRenderer[]{
null, // Label
null, // count
null, // Mean
null, // Min
null, // Max
new NumberRenderer("#0.00"), // Std Dev.
new NumberRenderer("#0.00%"), // Er... |
public static synchronized Context lookupContext(String initialContextFactory,
String providerUrl, boolean useAuth, String securityPrincipal, String securityCredentials) {
Context ctx = MAP.get(initialContextFactory + providerUrl);
if (ctx == null) {
Properties props = new P... | public static synchronized Context lookupContext(String initialContextFactory,
String providerUrl, boolean useAuth, String securityPrincipal, String securityCredentials) {
Context ctx = MAP.get(initialContextFactory + providerUrl);
if (ctx == null) {
Properties props = new P... |
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... |
public interface ICallable {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ... | public interface ICallable {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ... |
public interface IEnqueuePredicate {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 acco... | public interface IEnqueuePredicate {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 acco... |
public interface IQueue extends IQueueDequeue, IQueueEnqueue {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Publ... | public interface IQueue extends IQueueDequeue, IQueueEnqueue {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Publ... |
public interface IQueueDequeue {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 accompan... | public interface IQueueDequeue {
/*******************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 accompan... |
public Image(Device device, ImageData source, ImageData mask) {
super(device);
if (source == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (mask == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (source.width != mask.width || source.height != mask.height) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
mask = ImageData... | public Image(Device device, ImageData source, ImageData mask) {
super(device);
if (source == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (mask == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (source.width != mask.width || source.height != mask.height) {
SWT.error(SWT.ERROR_INVALID_ARGUMENT);
}
mask = ImageData... |
List<String> getAttributeNames(Request request);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache... | List<String> getAttributeNames(Request request);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache... |
public void sendOpenAndSelectForFile(User touser, String resourceName, int offset, int length) {
ID receiver = null;
if (touser != null) {
receiver = touser.getUserID();
}
try {
final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG, getUser(), resourceName, new Sha... | public void sendOpenAndSelectForFile(User touser, String resourceName, int offset, int length) {
ID receiver = null;
if (touser != null) {
receiver = touser.getUserID();
}
try {
final SharedObjectMsg m = SharedObjectMsg.createMsg(null, HANDLE_OPEN_AND_SELECT_FOR_FILE_MSG, getUser(), resourceName, new Sha... |
protected void init()
{
super.init();
getRootMapperAsCompound().add(new MountedMapper("/hello", HelloWorld.class));
}
| protected void init()
{
super.init();
getRootRequestMapperAsCompound().add(new MountedMapper("/hello", HelloWorld.class));
}
|
public static GC gtk_new(Drawable drawable, GCData data) {
GC gc = new GC();
int /*long*/ gdkGC = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, gdkGC);
return gc;
}
void checkGC (int mask) {
int state = data.state;
if ((state & mask) == mask) return;
state = (state ^ mask) & ... | public static GC gtk_new(Drawable drawable, GCData data) {
GC gc = new GC();
int /*long*/ gdkGC = drawable.internal_new_GC(data);
gc.device = data.device;
gc.init(drawable, data, gdkGC);
return gc;
}
void checkGC (int mask) {
int state = data.state;
if ((state & mask) == mask) return;
state = (state ^ mask) & ... |
public boolean isVisible () {
checkWidget();
return getVisible ();
}
void register () {
super.register ();
display.addWidget (shellHandle, this);
}
void releaseParent () {
/* Do nothing */
}
int /*long*/ topHandle () {
return shellHandle;
}
void fixActiveShell () {
if (display.activeShell == this) {
Shell ... | public boolean isVisible () {
checkWidget();
return getVisible ();
}
void register () {
super.register ();
display.addWidget (shellHandle, this);
}
void releaseParent () {
/* Do nothing */
}
int /*long*/ topHandle () {
return shellHandle;
}
void fixActiveShell () {
if (display.activeShell == this) {
Shell ... |
public void testFindClassesInPaths() {
String testPath = System.getProperty("user.dir") + "/classes";
List listPaths = new ArrayList();
ArrayList listClasses = new ArrayList();
// listPaths will contain the path/jars where all classes will be listed
listPaths.add(testPath);
try {
findClassesInPa... | public void testFindClassesInPaths() {
String testPath = JMeterUtils.getJMeterHome() + "/build";
List listPaths = new ArrayList();
ArrayList listClasses = new ArrayList();
// listPaths will contain the path/jars where all classes will be listed
listPaths.add(testPath);
try {
findClassesInPaths(l... |
public static String getJMeterVersion()
{
return "1.7.2";
}
| public static String getJMeterVersion()
{
return "@VERSION@";
}
|
static String className(final Object o)
/*
* 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,... | static String className(final Object o)
/*
* 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 run() {
// threadContext is not thread-safe, so keep within thread
JMeterContext threadContext = JMeterContextService.getContext();
LoopIterationListener iterationListener=null;
try {
iterationListener = initRun(threadContext);
while (running) {
... | public void run() {
// threadContext is not thread-safe, so keep within thread
JMeterContext threadContext = JMeterContextService.getContext();
LoopIterationListener iterationListener=null;
try {
iterationListener = initRun(threadContext);
while (running) {
... |
public Page getTestPage()
{
return page;
}
});
tester.clickLink(MockPageWithLinkAndComponent.LINK_ID);
String document = tester.getServletResponse().getDocument();
assertTrue("Error while execution ajax request", Pattern.compile("</ajax-response>").matcher(document).find());
Pattern pat = Pa... | public Page getTestPage()
{
return page;
}
});
tester.clickLink(MockPageWithLinkAndComponent.LINK_ID);
String document = tester.getServletResponse().getDocument();
assertTrue("Error while execution ajax request", Pattern.compile("</ajax-response>").matcher(document).find());
Pattern pat = Pa... |
public void executeTest(final Class<? extends Page> pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
tester = new WicketTester(pageClass);
// Do the processing
tester.setupRequestAndResponse();
tester.processRequestCycle();
// Validate the ... | public void executeTest(final Class<? extends Page> pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
tester = new WicketTester(pageClass);
// Do the processing
tester.setupRequestAndResponse();
tester.processRequestCycle();
// Validate the ... |
public void test7() throws Exception
{
executeTest(BoxBorderTestPage_7.class, "BoxBorderTestPage_ExpectedResult_7.html");
tester.clickLink("link");
String document = tester.getServletResponse().getDocument();
assertTrue(DiffUtil.validatePage(document, this.getClass(), "BoxBorderTestPage_ExpectedResult_7-1... | public void test7() throws Exception
{
executeTest(BoxBorderTestPage_7.class, "BoxBorderTestPage_ExpectedResult_7.html");
tester.clickLink("link");
String document = tester.getServletResponse().getDocument();
DiffUtil.validatePage(document, this.getClass(), "BoxBorderTestPage_ExpectedResult_7-1.html",true... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.