buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void initializeDefaultPreferences() {
IPreferenceStore store = XmlSecurityPlugin.getDefault().getPreferenceStore();
// Canonicalization
store.setDefault(PreferenceConstants.CANON_TYPE, "exclusive");
store.setDefault(PreferenceConstants.CANON_TARGET, "internal");
// Encryption
store.setD... | public void initializeDefaultPreferences() {
IPreferenceStore store = XmlSecurityPlugin.getDefault().getPreferenceStore();
// Canonicalization
store.setDefault(PreferenceConstants.CANON_TYPE, "exclusive");
store.setDefault(PreferenceConstants.CANON_TARGET, "internal");
// Encryption
store.setD... |
public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
AppendingStringBuffer asb = new AppendingStringBuffer();
asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n");
asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n");
asb.append... | public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
AppendingStringBuffer asb = new AppendingStringBuffer();
asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n");
asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n");
asb.append... |
public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
int hwnd = parent.handle;
int hDC = OS.GetDC (hwnd);
int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp =... | public void pack () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return;
int columnWidth = 0;
int hwnd = parent.handle;
int hDC = OS.GetDC (hwnd);
int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0);
if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);
int cp =... |
public void showSelection () {
checkWidget();
int index = getSelectionIndex ();
if (index == -1) return;
int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index);
int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
OS.gtk_tree_view... | public void showSelection () {
checkWidget();
int index = getSelectionIndex ();
if (index == -1) return;
int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());
OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index);
int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);
OS.gtk_tree_view... |
* public IModel model(Object object)
* {
* return new DetachableUserModel((User)object);
* }
* }
* </pre>
*
* You can use the {@link IDetachable#detach()} method for cleaning up your IDataProvider instance.
* So that you can do one query that returns both the size and the values if your dataset is small
... | * public IModel model(Object object)
* {
* return new DetachableUserModel((User)object);
* }
* }
* </pre>
*
* You can use the {@link IDetachable#detach()} method for cleaning up your IDataProvider instance.
* So that you can do one query that returns both the size and the values if your dataset is small
... |
public String encode(byte[] octetString) {
int bits24;
int bits6;
// CheckStyle:MagicNumber OFF
char[] out = new char[((octetString.length - 1) / 3 + 1) * 4];
// CheckStyle:MagicNumber ON
int outIndex = 0;
int i = 0;
// CheckStyle:MagicNumber OFF
... | public String encode(byte[] octetString) {
int bits24;
int bits6;
// CheckStyle:MagicNumber OFF
char[] out = new char[((octetString.length - 1) / 3 + 1) * 4];
// CheckStyle:MagicNumber ON
int outIndex = 0;
int i = 0;
// CheckStyle:MagicNumber OFF
... |
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you m... | }
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you m... |
public PrinterData open() {
PrinterData data = null;
NSPrintPanel panel = NSPrintPanel.printPanel();
NSPrintInfo printInfo = new NSPrintInfo(NSPrintInfo.sharedPrintInfo().copy().id);
NSDictionary dict = printInfo.dictionary();
if (printToFile) {
dict.setValue_forKey_(new NSString(OS.NSPrintSaveJob()), new NSStr... | public PrinterData open() {
PrinterData data = null;
NSPrintPanel panel = NSPrintPanel.printPanel();
NSPrintInfo printInfo = new NSPrintInfo(NSPrintInfo.sharedPrintInfo().copy().id);
NSDictionary dict = printInfo.dictionary();
if (printToFile) {
dict.setValue_forKey_(new NSString(OS.NSPrintSaveJob()), new NSStr... |
private Set parsePersistentTypeNames(ClassLoader loader)
throws IOException {
ClassArgParser cparser = newClassArgParser();
String[] clss;
Set<String> names = new HashSet<String>();
if (files != null) {
File file;
for (Iterator itr = files.iterator(); ... | private Set parsePersistentTypeNames(ClassLoader loader)
throws IOException {
ClassArgParser cparser = newClassArgParser();
String[] clss;
Set<String> names = new HashSet<String>();
if (files != null) {
File file;
for (Iterator itr = files.iterator(); ... |
public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
AppendingStringBuffer asb = new AppendingStringBuffer();
asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n");
asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n");
asb.append... | public void renderHead(IHeaderResponse response)
{
super.renderHead(response);
AppendingStringBuffer asb = new AppendingStringBuffer();
asb.append("function attachChoiceHandlers(markupId, callbackScript) {\n");
asb.append(" var inputNodes = wicketGet(markupId).getElementsByTagName('input');\n");
asb.append... |
public FuzzyBoolean matches(ResolvedTypeX[] someArgs) {
// do some quick length tests first
int numArgsMatchedByEllipsis = (someArgs.length + ellipsisCount) - typePatterns.length;
if (numArgsMatchedByEllipsis < 0) return FuzzyBoolean.NO;
if ((numArgsMatchedByEllipsis > 0) && (ellipsisCount == 0)) {
return F... | public FuzzyBoolean matches(ResolvedTypeX[] someArgs) {
// do some quick length tests first
int numArgsMatchedByEllipsis = (someArgs.length + ellipsisCount) - typePatterns.length;
if (numArgsMatchedByEllipsis < 0) return FuzzyBoolean.NO;
if ((numArgsMatchedByEllipsis > 0) && (ellipsisCount == 0)) {
return F... |
public final void render(final MarkupStream markupStream)
{
setMarkupStream(markupStream);
setFlag(FLAG_IS_RENDERED_ONCE, true);
// Determine if component is visible using it's authorization status
// and the isVisible property.
if (renderAllowed && isVisible())
{
// Rendering is beginning
if (log.... | public final void render(final MarkupStream markupStream)
{
setMarkupStream(markupStream);
setFlag(FLAG_IS_RENDERED_ONCE, true);
// Determine if component is visible using it's authorization status
// and the isVisible property.
if (renderAllowed && isVisible())
{
// Rendering is beginning
if (log.... |
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 width, height;
if (OS.COMCTL32_MAJOR >= 6) {
int hDC = OS.GetDC (handle);
int newFont = OS.SendMessage (handle, OS.WM_GETFON... | 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 width, height;
if (OS.COMCTL32_MAJOR >= 6) {
int hDC = OS.GetDC (handle);
int newFont = OS.SendMessage (handle, OS.WM_GETFON... |
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);
}
int callWindowProc (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);
}
int callWindowProc (int ... |
public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
Shell shell = _getShell ();
GdkEventButton gdkEvent = new GdkEventButton ();
OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
if (gdkEvent.type == OS.G... | public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
Shell shell = _getShell ();
GdkEventButton gdkEvent = new GdkEventButton ();
OS.memmove (gdkEvent, event, GdkEventButton.sizeof);
if (gdkEvent.type == OS.G... |
public void checkNonSchemaAttributes(XSGrammarResolver grammarResolver) throws Exception {
// for all attributes
Enumeration enum = fNonSchemaAttrs.keys();
XSAttributeDecl tempAttrDecl = new XSAttributeDecl();
while (enum.hasMoreElements()) {
// get name, uri, localpart
... | public void checkNonSchemaAttributes(XSGrammarResolver grammarResolver) throws Exception {
// for all attributes
Enumeration enum = fNonSchemaAttrs.keys();
XSAttributeDecl tempAttrDecl = new XSAttributeDecl();
while (enum.hasMoreElements()) {
// get name, uri, localpart
... |
public void handleEvent(IContainerEvent event) {
Activator activator = Activator.getDefault();
if (activator == null)
return;
final IContainerManager containerManager = activator.getContainerManager();
if (containerManager == null)
return;
IContainer container = containerManager.getContainer(ev... | public void handleEvent(IContainerEvent event) {
Activator activator = Activator.getDefault();
if (activator == null)
return;
final IContainerManager containerManager = activator.getContainerManager();
if (containerManager == null)
return;
IContainer container = containerManager.getContainer(ev... |
public void setProperty(String prop, Object value) {
if (!setKernelProperty(this, prop, value)) {
if (!setKernelProperty(this.getFetchPlan(), prop, value)) {
Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isWarnEnabled()) {
... | public void setProperty(String prop, Object value) {
if (!setKernelProperty(this, prop, value)) {
if (!setKernelProperty(this.getFetchPlan(), prop, value)) {
Log log = getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isWarnEnabled()) {
... |
private final byte[] decryptByteArray(final byte[] encrypted)
{
try
{
return crypt(encrypted, Cipher.DECRYPT_MODE);
}
catch (GeneralSecurityException e)
{
throw new WicketRuntimeException("Unable to decrypt the text '" + encrypted + "'", e);
}
}
| private final byte[] decryptByteArray(final byte[] encrypted)
{
try
{
return crypt(encrypted, Cipher.DECRYPT_MODE);
}
catch (GeneralSecurityException e)
{
throw new WicketRuntimeException("Unable to decrypt the text '" + encrypted.toString() + "'", e);
}
}
|
public TextAreaEditor(PropertyDescriptor descriptor) {
textUI = new JSyntaxTextArea(20, 20);
textUI.setSyntaxEditingStyle((String) descriptor.getValue(GenericTestBeanCustomizer.SYNTAX_TYPE));
scroller = new JTextScrollPane(textUI, true);
init();
}
| public TextAreaEditor(PropertyDescriptor descriptor) {
textUI = new JSyntaxTextArea(20, 20);
// textUI.setSyntaxEditingStyle((String) descriptor.getValue(GenericTestBeanCustomizer.SYNTAX_TYPE));
scroller = new JTextScrollPane(textUI, true);
init();
}
|
public int changeX(int x) {
this.x = x;
return x;
}
void doIt() {
try {
File f = new File(".");
f.getCanonicalPath();
} catch (IOException ioe) {
System.err.println("!");
}
setX(10);
new Point();
}
}
class SubPoint extends Point { }
class Line { }
aspect AdvisesRelationshipCoverage ... | public int changeX(int x) {
this.x = x;
return x;
}
void doIt() {
try {
File f = new File(".");
f.getCanonicalPath();
} catch (IOException ioe) {
System.err.println("!");
}
setX(10);
new Point();
}
}
class SubPoint extends Point { }
class Line { }
aspect AdvisesRelationshipCoverage ... |
public IProgramElement findElementForHandle(String handle) {
StringTokenizer st = new StringTokenizer(handle, IProgramElement.ID_DELIM);
String file = st.nextToken();
int line = new Integer(st.nextToken()).intValue();
int col = new Integer(st.nextToken()).intValue();
// TODO: use column number when available... | public IProgramElement findElementForHandle(String handle) {
StringTokenizer st = new StringTokenizer(handle, ProgramElement.ID_DELIM);
String file = st.nextToken();
int line = new Integer(st.nextToken()).intValue();
int col = new Integer(st.nextToken()).intValue();
// TODO: use column number when available
... |
public VEXCoreTestSuite() {
super("VEX Core Tests");
addTestSuite(CssTest.class);
addTestSuite(PropertyTest.class);
addTestSuite(RuleTest.class);
addTestSuite(SerializationTest.class);
addTestSuite(BlockElementBoxTest.class);
addTestSuite(DFABuilderTest.class);
addTestSuite(DocumentWriterTest.class);
... | public VEXCoreTestSuite() {
super("Vex Core Tests");
addTestSuite(CssTest.class);
addTestSuite(PropertyTest.class);
addTestSuite(RuleTest.class);
addTestSuite(SerializationTest.class);
addTestSuite(BlockElementBoxTest.class);
addTestSuite(DFABuilderTest.class);
addTestSuite(DocumentWriterTest.class);
... |
private void restoreSelected()
{
if (selectedNode == null)
{
Vector nodePath = getNodePath();
if (nodePath != null)
{
GuiPackage gp = GuiPackage.getInstance();
if ( gp != null )
{
JMeterTreeNode root = (JMeterTreeNode)gp.getTreeModel().getRoot();
nodePath.remove(0);
traverse(r... | private void restoreSelected()
{
if (selectedNode == null)
{
Vector nodePath = getNodePath();
if (nodePath != null && nodePath.size()>0)
{
GuiPackage gp = GuiPackage.getInstance();
if ( gp != null )
{
JMeterTreeNode root = (JMeterTreeNode)gp.getTreeModel().getRoot();
nodePath.remov... |
private static final String VERSION = "2.4";
static final String COPYRIGHT = "Copyright (c) 1998-2009 The Apache Software Foundation";
| private static final String VERSION = "2.4";
static final String COPYRIGHT = "Copyright (c) 1998-2010 The Apache Software Foundation";
|
public void valueChanged(TreeSelectionEvent e) {
try {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) resultsTree.getLastSelectedPathComponent();
SampleResult sr = (SampleResult) node.getUserObject();
AssertionResult[] results = sr.getAssertion... | public void valueChanged(TreeSelectionEvent e) {
try {
DefaultMutableTreeNode node = (DefaultMutableTreeNode) resultsTree.getLastSelectedPathComponent();
SampleResult sr = (SampleResult) node.getUserObject();
AssertionResult[] results = sr.getAssertion... |
public void setImage (Image value) {
checkWidget ();
if (value == image) return;
if (value != null && value.equals (image)) return; /* same value */
super.setImage (value);
/*
* If this is the first image being put into the header then the header
* height may be adjusted, in which case a full redraw is neede... | public void setImage (Image value) {
checkWidget ();
if (value == image) return;
if (value != null && value.equals (image)) return; /* same value */
super.setImage (value);
/*
* If this is the first image being put into the header then the header
* height may be adjusted, in which case a full redraw is neede... |
public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
boolean hasBorder () {
return (style & SWT.BORDER) != 0;
}
boolean hasFocus () {
NSWindow window = view.window();
NSResponder nsResponder = window.firstResponder();
if (nsResponder.id == focusView().id) return true;
NSText fieldEdito... | public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
boolean hasBorder () {
return (style & SWT.BORDER) != 0;
}
boolean hasFocus () {
NSWindow window = view.window();
NSResponder nsResponder = window.firstResponder();
if (nsResponder.id == focusView().id) return true;
NSText fieldEdito... |
public File createTempFile(String prefix, String suffix, File parentDir,
boolean deleteOnExit, boolean createFile) {
File result = null;
String parent = (parentDir == null)
? System.getProperty("java.io.tmpdir")
: parentDir.getPath();
if (createFi... | public File createTempFile(String prefix, String suffix, File parentDir,
boolean deleteOnExit, boolean createFile) {
File result = null;
String parent = (parentDir == null)
? System.getProperty("java.io.tmpdir")
: parentDir.getPath();
if (createFi... |
public void showSelection () {
checkWidget ();
int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (index != -1) showItem (index);
}
String toolTipText (NMTTDISPINFO hdr) {
int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTi... | public void showSelection () {
checkWidget ();
int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED);
if (index != -1) showItem (index);
}
String toolTipText (NMTTDISPINFO hdr) {
int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0);
if (hwndToolTip == hdr.hwndFrom && toolTi... |
public void showSelection () {
checkWidget ();
int hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_G... | public void showSelection () {
checkWidget ();
int hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_G... |
public void setUp() {
setUp(Node.class);
}
| public void setUp() {
setUp(DROP_TABLES, Node.class);
}
|
private void addDirectParentControllers(List controllers, TestElement maybeController)
{
if(maybeController instanceof Controller)
{
log.info("adding controller: " + maybeController + " to sampler config");
controllers.add(maybeController);
}
}
| private void addDirectParentControllers(List controllers, TestElement maybeController)
{
if(maybeController instanceof Controller)
{
log.debug("adding controller: " + maybeController + " to sampler config");
controllers.add(maybeController);
}
}
|
private InputStream getInputStream( final String resource )
throws Exception
{
final String filename = "src" + File.separator + "testcases" + File.separator +
getClass().getName().replace( '.', File.separatorChar );
final String path = FileUtil.getPath( filename );
fi... | private InputStream getInputStream( final String resource )
throws Exception
{
final String filename = "src" + File.separator + "test" + File.separator +
getClass().getName().replace( '.', File.separatorChar );
final String path = FileUtil.getPath( filename );
final F... |
public boolean post (Event event) {
synchronized (Device.class) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
if (!OS.GDK_WINDOWING_X11()) return false;
int /*long*/ xDisplay = OS.GDK_DISPLAY ();
int type = event.type;
switch (type) {
case SW... | public boolean post (Event event) {
synchronized (Device.class) {
if (isDisposed ()) error (SWT.ERROR_DEVICE_DISPOSED);
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
if (!OS.GDK_WINDOWING_X11()) return false;
int /*long*/ xDisplay = OS.GDK_DISPLAY ();
int type = event.type;
switch (type) {
case SW... |
private WebApplication createApplication(final String applicationClassName)
{
try
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null)
{
loader = getClass().getClassLoader();
}
final Class applicationClass = loader.loadClass(applicationClassName);
if (We... | protected WebApplication createApplication(final String applicationClassName)
{
try
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();
if (loader == null)
{
loader = getClass().getClassLoader();
}
final Class applicationClass = loader.loadClass(applicationClassName);
if (... |
private static void configureMetaData(ClassMetaData meta,
OpenJPAConfiguration conf, boolean redefineAvailable, boolean warn) {
setDetachedState(meta);
// If warn & (implicit field access | mixed access) & noredef
if (warn && ((AccessCode.isField(meta.getAccessType())
&... | private static void configureMetaData(ClassMetaData meta,
OpenJPAConfiguration conf, boolean redefineAvailable, boolean warn) {
setDetachedState(meta);
// If warn & (implicit field access | mixed access) & noredef
if (warn && ((AccessCode.isField(meta.getAccessType())
&... |
public final void replaceAttibuteValue(final Component component, final ComponentTag tag)
{
if (isEnabled())
{
final ValueMap<String, CharSequence> attributes = tag.getAttributes();
final Object replacementValue = getReplacementOrNull(component);
if (VALUELESS_ATTRIBUTE_ADD.equals(replacementValue))
... | public final void replaceAttibuteValue(final Component component, final ComponentTag tag)
{
if (isEnabled())
{
final ValueMap attributes = tag.getAttributes();
final Object replacementValue = getReplacementOrNull(component);
if (VALUELESS_ATTRIBUTE_ADD.equals(replacementValue))
{
attributes.put(a... |
public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if (headIndex != -1 && bodyIndex != -1)
{
Map<S... | public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if (headIndex != -1 && bodyIndex != -1)
{
Map m... |
private String getTriggerJavaScript()
{
Form form = getForm();
StringBuffer sb = new StringBuffer(100);
sb.append("document.getElementById('");
sb.append(form.getHiddenFieldId(Form.HIDDEN_FIELD_FAKE_SUBMIT));
sb.append("').name=\'");
sb.append(getInputName());
sb.append("';");
sb.append("var f=docume... | private String getTriggerJavaScript()
{
Form form = getForm();
StringBuffer sb = new StringBuffer(100);
sb.append("document.getElementById('");
sb.append(form.getHiddenFieldId());
sb.append("').name=\'");
sb.append(getInputName());
sb.append("';");
sb.append("var f=document.getElementById('");
sb.a... |
public interface ICompoundModel extends IModel
/*
* $Id$
* $Revision$
* $Date$
*
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a... | public interface ICompoundModel extends IModel
/*
* $Id$
* $Revision$
* $Date$
*
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a... |
private void shortPause() {
try {
this.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e.getMessage());
}
}
| private void shortPause() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e.getMessage());
}
}
|
public void removeRemoteServiceListener(IRemoteServiceListener listener) {
registrySharedObject.remoteRemoteServiceListener(listener);
}
| public void removeRemoteServiceListener(IRemoteServiceListener listener) {
registrySharedObject.removeRemoteServiceListener(listener);
}
|
package org.apache.wicket.authroles.authorization.strategies.role;
/*
* 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 Yo... | package org.apache.wicket.authroles.authorization.strategies.role;
/*
* 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 Yo... |
public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context)
{
HTTPSampleResult res = (HTTPSampleResult) createCollection(context
.getRequiredType());
retrieveAttributes(reader, res);
while (reader.hasMoreChildren())
{
reader.moveDown... | public Object unmarshal(HierarchicalStreamReader reader,
UnmarshallingContext context)
{
HTTPSampleResult res = (HTTPSampleResult) createCollection(context
.getRequiredType());
retrieveAttributes(reader, context, res);
while (reader.hasMoreChildren())
{
reader... |
public void saveJComponent(String filename, int type, JComponent component) {
Dimension size = component.getSize();
BufferedImage image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_INT_RGB);
Graphics2D grp = image.createGraphics();
component.paint(grp);
if... | public void saveJComponent(String filename, int type, JComponent component) {
Dimension size = component.getSize();
BufferedImage image = new BufferedImage(size.width, size.height, BufferedImage.TYPE_BYTE_INDEXED);
Graphics2D grp = image.createGraphics();
component.paint(grp);
... |
public void expandAll()
{
if (nodes.isEmpty() && nodesCollapsed == true)
{
// all nodes are already expanded, do nothing
}
else
{
// clear node set and set nodes policy as collapsed
nodes.clear();
nodesCollapsed = true;
Object[] listenersCopy = listeners.toArray();
for (int i = 0; i < lis... | public void expandAll()
{
if (nodes.isEmpty() && nodesCollapsed == true)
{
// all nodes are already expanded, do nothing
}
else
{
// clear node set and set nodes policy as collapsed
nodes.clear();
nodesCollapsed = true;
Object[] listenersCopy = listeners.toArray();
for (int i = 0; i < lis... |
private JPanel createGraphTitlePane() {
JPanel titleNamePane = new JPanel(new BorderLayout());
syncWithName.setFont(FONT_SMALL);
titleNamePane.add(graphTitle, BorderLayout.CENTER);
titleNamePane.add(syncWithName, BorderLayout.EAST);
JPanel titleStylePane = new JPanel();
... | private JPanel createGraphTitlePane() {
JPanel titleNamePane = new JPanel(new BorderLayout());
syncWithName.setFont(FONT_SMALL);
titleNamePane.add(graphTitle, BorderLayout.CENTER);
titleNamePane.add(syncWithName, BorderLayout.EAST);
JPanel titleStylePane = new JPanel();
... |
public JPopupMenu createPopupMenu() {
JPopupMenu pop = new JPopupMenu();
JMenu addMenu = new JMenu(JMeterUtils.getResString("Add"));
addMenu.add(ReportMenuFactory.makeMenuItem(new ReportPageGui().getStaticLabel(),
ReportPageGui.class.getName(),
"Add")); // $NO... | public JPopupMenu createPopupMenu() {
JPopupMenu pop = new JPopupMenu();
JMenu addMenu = new JMenu(JMeterUtils.getResString("add")); // $NON-NLS-1$
addMenu.add(ReportMenuFactory.makeMenuItem(new ReportPageGui().getStaticLabel(),
ReportPageGui.class.getName(),
... |
protected void popupShouldSave(ActionEvent e) {
log.debug("popupShouldSave");
if (ReportGuiPackage.getInstance().getReportPlanFile() == null) {
if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(),
JMeterUtils.getResString("should_save"), /... | protected void popupShouldSave(ActionEvent e) {
log.debug("popupShouldSave");
if (ReportGuiPackage.getInstance().getReportPlanFile() == null) {
if (JOptionPane.showConfirmDialog(ReportGuiPackage.getInstance().getMainFrame(),
JMeterUtils.getResString("should_save"), /... |
protected void startEngine() {
/**
* this will need to be changed
ReportGuiPackage gui = ReportGuiPackage.getInstance();
engine = new StandardJMeterEngine();
HashTree testTree = gui.getTreeModel().getTestPlan();
convertSubTree(testTree);
DisabledComponentRemo... | protected void startEngine() {
/**
* this will need to be changed
ReportGuiPackage gui = ReportGuiPackage.getInstance();
engine = new StandardJMeterEngine();
HashTree testTree = gui.getTreeModel().getTestPlan();
convertSubTree(testTree);
DisabledComponentRemo... |
public Object getAdapter(Class clazz) {
return null;
}
| public Object getAdapter(Class clazz) {
return container.getAdapter(clazz);
}
|
public int getTopIndex () {
checkWidget();
int[] top = new int [1], left = new int [1];
OS.GetDataBrowserScrollPosition (handle, top, left);
return top [0] / getItemHeight ();
}
int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) {
switch (inReques... | public int getTopIndex () {
checkWidget();
int[] top = new int [1], left = new int [1];
OS.GetDataBrowserScrollPosition (handle, top, left);
return top [0] / getItemHeight ();
}
int helpProc (int inControl, int inGlobalMouse, int inRequest, int outContentProvided, int ioHelpContent) {
switch (inReques... |
public TreeItem getTopItem () {
checkWidget();
//TODO - optimize
Rect rect = new Rect ();
if (!OS.HIVIEW) OS.GetControlBounds (handle, rect);
int y = rect.top + getBorder () + getHeaderHeight ();
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
int columnId = (columnCount... | public TreeItem getTopItem () {
checkWidget();
//TODO - optimize
Rect rect = new Rect ();
if (!OS.HIVIEW) OS.GetControlBounds (handle, rect);
int y = rect.top + getBorder () + getHeaderHeight ();
for (int i=0; i<items.length; i++) {
TreeItem item = items [i];
if (item != null) {
int columnId = (columnCount... |
public void respond(RequestCycle requestCycle)
{
if (pageClass != null)
{
if (requestCycle.getRedirect())
{
IRequestCycleProcessor processor = requestCycle.getRequestCycleProcessor();
String redirectUrl = processor.getRequestEncoder().encode(requestCycle,
new BookmarkablePageRequestTarget(page... | public void respond(RequestCycle requestCycle)
{
if (pageClass != null)
{
if (requestCycle.getRedirect())
{
IRequestCycleProcessor processor = requestCycle.getRequestCycleProcessor();
String redirectUrl = processor.getRequestEncoder().encode(requestCycle,
new BookmarkablePageRequestTarget(page... |
public final void processEvents(final RequestCycle requestCycle)
{
// Assume cluster needs to be updated now, unless listener
// invocation changes this
requestCycle.setUpdateCluster(true);
// Clear all feedback messages if it isn't a redirect
getPage().getFeedbackMessages().clear();
getPage().startCo... | public final void processEvents(final RequestCycle requestCycle)
{
// Assume cluster needs to be updated now, unless listener
// invocation changes this
requestCycle.setUpdateSession(true);
// Clear all feedback messages if it isn't a redirect
getPage().getFeedbackMessages().clear();
getPage().startCo... |
public void respond(RequestCycle requestCycle)
{
// Should page be redirected to?
if (requestCycle.getRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
requestCycle.setUpdateCluster(true);
// Let page render itself
page.doRender();
}
}
| public void respond(RequestCycle requestCycle)
{
// Should page be redirected to?
if (requestCycle.getRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
requestCycle.setUpdateSession(true);
// Let page render itself
page.doRender();
}
}
|
private MethodBinding getEquivalentStaticBinding(MethodBinding template) {
ReferenceBinding b = (ReferenceBinding)thisJoinPointStaticPartDec.type;
return b.getExactMethod(template.selector, template.parameters);
}
| private MethodBinding getEquivalentStaticBinding(MethodBinding template) {
ReferenceBinding b = (ReferenceBinding)thisJoinPointStaticPartDec.type;
return b.getExactMethod(template.selector, template.parameters,null);
}
|
public void testDashX() {
String xoptionText = ResourceBundle.getBundle("org.aspectj.ajdt.ajc.messages").getString("xoption.usage");
xoptionText = xoptionText.substring("{compiler.name}".length());
CompilationResult result = ajc(null,new String[] {"-X"});
assertMessages(result,"Expecting xoptions u... | public void testDashX() {
String xoptionText = ResourceBundle.getBundle("org.aspectj.ajdt.ajc.messages").getString("xoption.usage");
xoptionText = "non-standard options:"; //xoptionText.substring("{0}".length());
CompilationResult result = ajc(null,new String[] {"-X"});
assertMessages(result,"Expec... |
public void execute( Project project )
throws TaskException
{
final String classname = javaCommand.getExecutable();
final Object[] argument = {javaCommand.getArguments()};
AntClassLoader loader = null;
try
{
if( sysProperties != null )
{
... | public void execute( Project project )
throws TaskException
{
final String classname = javaCommand.getExecutable();
final Object[] argument = {javaCommand.getArguments()};
AntClassLoader loader = null;
try
{
if( sysProperties != null )
{
... |
public void create (Composite parent, int style) {
String className = "SWTWebViewDelegate"; //$NON-NLS-1$
if (OS.objc_lookUpClass(className) == 0) {
Class safariClass = this.getClass();
Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$
int /*long*/ proc3 = Callback3.getAddress();
if (proc... | public void create (Composite parent, int style) {
String className = "SWTWebViewDelegate"; //$NON-NLS-1$
if (OS.objc_lookUpClass(className) == 0) {
Class safariClass = this.getClass();
Callback3 = new Callback(safariClass, "browserProc", 3); //$NON-NLS-1$
int /*long*/ proc3 = Callback3.getAddress();
if (proc... |
public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.SEARCH) != 0) {
style |= SWT.SINGLE | SWT.BORDER;
style &= ~SWT.PASSWORD;
}
style &= ~SWT.SEARCH;
if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) {
style &= ~SWT.... | public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.SEARCH) != 0) {
style |= SWT.SINGLE | SWT.BORDER;
style &= ~SWT.PASSWORD;
}
style &= ~SWT.SEARCH;
if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) {
style &= ~SWT.... |
public RegexFunction()
{
valueIndex = between = name = "";
try
{
templatePattern = compiler.compile("\\$(\\d+)\\$");
}
catch (MalformedPatternException e)
{
log.error("", e);
}
}
| public RegexFunction()
{
valueIndex = between = name = "";
try
{
templatePattern = compiler.compile("\\$(\\d+)\\$", Perl5Compiler.READ_ONLY_MASK);
}
catch (MalformedPatternException e)
{
log.error("", e);
}
}
|
public void testRegisterServerContainer() throws Exception {
Properties props = new Properties();
props.put(OSGI_REMOTE_INTERFACES, new String[] {OSGI_REMOTE_INTERFACES_WILDCARD});
props.put(OSGI_REMOTE_CONFIGURATION_TYPE,new String[] { ECF_REMOTE_CONFIGURATION_TYPE });
IContainer serverContainer = getServer()... | public void testRegisterServerContainer() throws Exception {
Properties props = new Properties();
props.put(OSGI_REMOTE_INTERFACES, new String[] {OSGI_REMOTE_INTERFACES_WILDCARD});
props.put(OSGI_REMOTE_CONFIGURATION_TYPE,new String[] { ECF_REMOTE_CONFIGURATION_TYPE });
IContainer serverContainer = getServer()... |
protected void connectToServiceFromInfo(IServiceInfo svcInfo) {
IServiceProperties props = svcInfo.getServiceProperties();
String type = (String) props.getPropertyString(PROP_CONTAINER_TYPE_NAME);
if (type == null || type.equals("")) {
type = CollabClient.GENERIC_CONTAINER_CLIENT_NAME;
}
String username =... | protected void connectToServiceFromInfo(IServiceInfo svcInfo) {
IServiceProperties props = svcInfo.getServiceProperties();
String type = (String) props.getPropertyString(PROP_CONTAINER_TYPE_NAME);
if (type == null || type.equals("")) {
type = CollabClient.GENERIC_CONTAINER_CLIENT_NAME;
}
String username =... |
static public void test() {
SubClass s = new SubClass(0);
Tester.checkEqual(Aspect.count, 2, "introduced constructors");
}
}
class Class {}
class SubClass extends Class {}
// this should introduce a unary constructor for
// Class and SubClass
aspect Aspect {
static int count = 0;
//introduction sub... | static public void test() {
SubClass s = new SubClass(0);
Tester.checkEqual(Aspect.count, 2, "introduced constructors");
}
}
class Class {}
class SubClass extends Class {}
// this should introduce a unary constructor for
// Class and SubClass
aspect Aspect {
static int count = 0;
//introduction sub... |
HW.new(String s) { this(); }
// The actual ctor that gets put in type 'HW' during compilation is
// HW(String,A)
// This is an artifact of the implementation of ctor ITDing - unfortunately this artifact
// can be seen by the declare warning. So,
// initialization(HW.new(..)) will match our new ctor
// initializat... | HW.new(String s) { this(); }
// The actual ctor that gets put in type 'HW' during compilation is
// HW(String,A)
// This is an artifact of the implementation of ctor ITDing - unfortunately this artifact
// can be seen by the declare warning. So,
// initialization(HW.new(..)) will match our new ctor
// initializat... |
public static void test() {
Tester.checkEqual(new Foo(10).foo(5), 6, "foo");
}
int Foo.foo(int n) { return n; }
Foo.new(int w) {}
int around(int n):
within(AdviceOnIntroduced) &&
(args(n) && execution(int foo(int))) {
int result = proceed(n);
re... | public static void test() {
Tester.checkEqual(new Foo(10).foo(5), 6, "foo");
}
int Foo.foo(int n) { return n; }
Foo.new(int w) {this();}
int around(int n):
within(AdviceOnIntroduced) &&
(args(n) && execution(int foo(int))) {
int result = proceed(n);
... |
public static void test() {
Tester.checkEqual(new Foo(10).foo(5), 6, "foo");
}
int Foo.foo(int n) { return n; }
Foo.new(int w) {}
int around(int n):
within(AdviceOnIntroduced) &&
(args(n) && execution(int foo(int))) {
int result = proceed(n);
re... | public static void test() {
Tester.checkEqual(new Foo(10).foo(5), 6, "foo");
}
int Foo.foo(int n) { return n; }
Foo.new(int w) { this(); }
int around(int n):
within(AdviceOnIntroduced) &&
(args(n) && execution(int foo(int))) {
int result = proceed(n);
... |
<T> Parse3.new(T cupOf) {this();}
// Simple ITDC
public class Parse3 { }
aspect X {
<T> Parse3.new(T cupOf) {}
} | <T> Parse3.new(T cupOf) {this();}
// Simple ITDC
public class Parse3 { }
aspect X {
<T> Parse3.new(T cupOf) {this();}
} |
public Base<Z>.new(Z aNumber) {
;
}
| public Base<Z>.new(Z aNumber) {
this() ;
}
|
A.new(int i) { this(); } // CE 10
/** @testcase PR851 declaring an aspect constructor with argument should be prohibited */
aspect A {
A() {}
}
aspect B {
A.new(int i) {} // CE 10
} | A.new(int i) { this(); } // CE 10
/** @testcase PR851 declaring an aspect constructor with argument should be prohibited */
aspect A {
A() {}
}
aspect B {
A.new(int i) { this(); } // CE 10
} |
A.new(int i) { this(); } // CE 10
/** @testcase PR851 declaring an aspect constructor with argument should be prohibited - sole constructor */
aspect A {
}
aspect B {
A.new(int i) {} // CE 10
} | A.new(int i) { this(); } // CE 10
/** @testcase PR851 declaring an aspect constructor with argument should be prohibited - sole constructor */
aspect A {
}
aspect B {
A.new(int i) { this(); } // CE 10
} |
protected XpandPluginExecutionContext(ResourceManager resourceManager, Resource currentResource,
TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, Output output,
ProtectedRegionResolver prs, ProgressMonitor monitor, IXtendXpandProject xp,
Map<Pair<String, List<Type>>, Ty... | protected XpandPluginExecutionContext(ResourceManager resourceManager, Resource currentResource,
TypeSystemImpl typeSystem, Map<String, Variable> vars, Map<String, Variable> globalVars, Output output,
ProtectedRegionResolver prs, ProgressMonitor monitor, IXtendXpandProject xp,
Map<Pair<String, List<Type>>, Ty... |
protected void makeChildNode() {
if (hasStringValue()) {
if (value != null) {
TextImpl text =
(TextImpl) ownerDocument().createTextNode((String) value);
value = text;
text.isFirstChild(true);
text.previousSibling... | protected void makeChildNode() {
if (hasStringValue()) {
if (value != null) {
TextImpl text =
(TextImpl) ownerDocument().createTextNode((String) value);
value = text;
text.isFirstChild(true);
text.previousSibling... |
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... |
package org.apache.tools.ant.taskdefs.exec;
/*
* 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 file.
*/
package org.apache.to... | package org.apache.tools.ant.taskdefs.exec;
/*
* 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 file.
*/
package org.apache.to... |
protected final static Namespace removeNamespace0(Namespace n) {
if (n == null)
return null;
return (Namespace) namespaces.remove(n);
}
| protected final static Namespace removeNamespace0(Namespace n) {
if (n == null)
return null;
return (Namespace) namespaces.remove(n.getName());
}
|
protected Node nextMatchingElementAfter(Node current) {
Node next;
while (current != null) {
// Look down to first child.
if (current.hasChildNodes()) {
current = (current.getFirstChild());
}
// Look right to sibli... | protected Node nextMatchingElementAfter(Node current) {
Node next;
while (current != null) {
// Look down to first child.
if (current.hasChildNodes()) {
current = (current.getFirstChild());
}
// Look right to sibli... |
public final void setResourceReference(final ResourceReference resourceReference)
{
setResourceReference(resourceReference, null);
}
| public final void setResourceReference(final ResourceReference resourceReference)
{
setResourceReference(resourceReference, resourceParameters);
}
|
public Rectangle getBounds() {
checkLayout();
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
computeRuns();
NSRect rect = layoutManager.usedRectForTextContainer(textContainer);
if (wrapWidth != -1) rect.width = wrapWidth;
... | public Rectangle getBounds() {
checkLayout();
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
computeRuns();
NSRect rect = layoutManager.usedRectForTextContainer(textContainer);
if (wrapWidth != -1) rect.width = wrapWidth;
... |
public static String getJMeterCopyright() {
return JMeterVersion.COPYRIGHT;
}
| public static String getJMeterCopyright() {
return JMeterVersion.getCopyRight();
}
|
public TypeDeployer createDeployer( final File file )
throws DeploymentException
{
try
{
final ClassLoader classLoader = m_classLoaderManager.createClassLoader( file );
return createDeployment( classLoader, file.toURL() );
}
catch( final Exception ... | public TypeDeployer createDeployer( final File file )
throws DeploymentException
{
try
{
final ClassLoader classLoader = m_classLoaderManager.getClassLoader( file );
return createDeployment( classLoader, file.toURL() );
}
catch( final Exception e )... |
public long getDateHeader(String name)
{
List<Object> dates = headers.get(name);
if (dates == null || dates.isEmpty())
{
throw new WicketRuntimeException("Date header with name '" + name + "' does not exist.");
}
Object date = dates.get(0);
if (date instanceof Long == false)
{
throw new WicketRu... | public long getDateHeader(String name)
{
List<Object> dates = headers.get(name);
if (dates == null || dates.isEmpty())
{
return -1;
}
Object date = dates.get(0);
if (date instanceof Long == false)
{
throw new WicketRuntimeException("Date header with name '" + name +
"' is not a valid long.")... |
public void testRequestWithIndexedParamsAndQueryString()
{
final WebRequestCycle cycle = tester.setupRequestAndResponse();
final PageParameters params = new PageParameters();
params.add("0", "param0");
params.add("1", "param1");
params.put("test", new String[] { "testval1", "testval2" });
params.add("foo... | public void testRequestWithIndexedParamsAndQueryString()
{
final WebRequestCycle cycle = tester.setupRequestAndResponse();
final PageParameters params = new PageParameters();
params.add("0", "param0");
params.add("1", "param1");
params.put("test", new String[] { "testval1", "testval2" });
params.add("foo... |
public Browser (Composite parent, int style) {
super (checkParent (parent), checkStyle (style));
String platform = SWT.getPlatform ();
Display display = parent.getDisplay ();
if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$
String className = null;
if ((style & SWT.MOZILLA) != 0... | public Browser (Composite parent, int style) {
super (checkParent (parent), checkStyle (style));
String platform = SWT.getPlatform ();
Display display = parent.getDisplay ();
if ("gtk".equals (platform)) display.setData (NO_INPUT_METHOD, null); //$NON-NLS-1$
String className = null;
if ((style & SWT.MOZILLA) != 0... |
public NSPoint convertPoint_toView_(NSPoint aPoint, NSView aView) {
NSPoint result = new NSPoint();
OS.objc_msgSend_stret(result, this.id, OS.sel_convertPoint_1toView_1, aPoint, aView != null ? aView.id : 0);
return result;
}
| public NSPoint convertPoint_toView_(NSPoint aPoint, NSView aView) {
NSPoint result = new NSPoint();
OS.objc_msgSend_struct(result, this.id, OS.sel_convertPoint_1toView_1, aPoint, aView != null ? aView.id : 0);
return result;
}
|
public void testValidate() {
FilenameSelector s = (FilenameSelector)getInstance();
try {
s.isSelected(basedir,filenames[0],files[0]);
fail("FilenameSelector did not check for required fields");
} catch (BuildException be1) {
assertEquals("The name attribut... | public void testValidate() {
FilenameSelector s = (FilenameSelector)getInstance();
try {
s.isSelected(basedir,filenames[0],files[0]);
fail("FilenameSelector did not check for required fields");
} catch (BuildException be1) {
assertEquals("The name or regex... |
public BasePage()
{
add(new BookmarkablePageLink("back", Index.class).setAutoEnable(true));
}
| public BasePage()
{
add(new BookmarkablePageLink<Void>("back", Index.class).setAutoEnable(true));
}
|
public BookmarkablePage(PageParameters pageParameters)
{
// get the message from the passed 'message' parameter or fall back to
// the default
// when no parameters were passed.
String message;
// note: the null check is here as a matter of defensive programming.
// Actually, as this
// constructor is ... | public BookmarkablePage(PageParameters pageParameters)
{
// get the message from the passed 'message' parameter or fall back to
// the default
// when no parameters were passed.
String message;
// note: the null check is here as a matter of defensive programming.
// Actually, as this
// constructor is ... |
public void populateItem(Item<ICellPopulator<Contact>> cellItem, String componentId,
IModel<Contact> model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});
columns.add(new PropertyColumn<Long>(new Model<String>("ID"), "id"));
columns.add(new PropertyColumn<String>(new Model<String>("F... | public void populateItem(Item<ICellPopulator<Contact>> cellItem, String componentId,
IModel<Contact> model)
{
cellItem.add(new ActionPanel(componentId, model));
}
});
columns.add(new PropertyColumn<Long>(new Model<String>("ID"), "id"));
columns.add(new PropertyColumn<String>(new Model<String>("F... |
public BasePage()
{
add(new BookmarkablePageLink("home-link", HomePage.class));
}
| public BasePage()
{
add(new BookmarkablePageLink<Void>("home-link", HomePage.class));
}
|
List<IBreadCrumbParticipant> allBreadCrumbParticipants();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under t... | List<IBreadCrumbParticipant> allBreadCrumbParticipants();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under t... |
public AttributeMap(Map map)
{
super(map);
}
} | public AttributeMap(Map<String,Object> map)
{
super(map);
}
} |
public BorderRenderWrappedTestPage_1()
{
BoxBorder border = new BoxBorder("box");
// border.setBorderBodyVisible(false);
border.getBodyContainer().setVisible(false);
add(border);
// NOTE in order for body.setVisible(false) to be able to work properly,
// you must add the body child components to the body.... | public BorderRenderWrappedTestPage_1()
{
BoxBorder border = new BoxBorder("box");
// border.setBorderBodyVisible(false);
border.getBodyContainer().setVisible(false);
add(border);
// NOTE in order for body.setVisible(false) to be able to work properly,
// you must add the body child components to the body.... |
public BoxBorderTestPage_2()
{
BoxBorder border = new BoxBorder("box");
add(border);
border.add(new TextField("text"));
border.add(new Image("img"));
}
| public BoxBorderTestPage_2()
{
BoxBorder border = new BoxBorder("box");
add(border);
border.add(new TextField<String>("text"));
border.add(new Image("img"));
}
|
public BlockedResourceLinkPage()
{
add(new ResourceLink("link", new ResourceReference(BlockedResourceLinkPage.class,
"BlockedResourceLinkPage.html")));
}
| public BlockedResourceLinkPage()
{
add(new ResourceLink<Void>("link", new ResourceReference(BlockedResourceLinkPage.class,
"BlockedResourceLinkPage.html")));
}
|
protected void addCompilerSpecificOptions(NetCommand command) {
if (pureJava) {
command.addArgument("/x");
}
if (secureScoping) {
command.addArgument("/securescoping");
}
}
| protected void addCompilerSpecificOptions(NetCommand command) {
if (pureJava) {
command.addArgument("/x:all");
}
if (secureScoping) {
command.addArgument("/securescoping");
}
}
|
public int internal_kEventAccessibleGetNamedAttribute (int nextHandler, int theEvent, int userData) {
if (axuielementref != 0) {
int [] stringRef = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamAccessibleAttributeName, OS.typeCFStringRef, null, 4, null, stringRef);
int length = 0;
if (string... | public int internal_kEventAccessibleGetNamedAttribute (int nextHandler, int theEvent, int userData) {
if (axuielementref != 0) {
int [] stringRef = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamAccessibleAttributeName, OS.typeCFStringRef, null, 4, null, stringRef);
int length = 0;
if (string... |
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 width, height;
if (OS.COMCTL32_MAJOR >= 6) {
int hDC = OS.GetDC (handle);
int newFont = OS.SendMessage (handle, OS.WM_GETFON... | 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 width, height;
if (OS.COMCTL32_MAJOR >= 6) {
int hDC = OS.GetDC (handle);
int newFont = OS.SendMessage (handle, OS.WM_GETFON... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.