buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void execute() throws BuildException {
if (weblogicSystemHome == null) {
throw new BuildException("weblogic home must be set");
}
if (!weblogicSystemHome.isDirectory()) {
throw new BuildException("weblogic home directory " + weblogicSystemHome.getPath() +
... | public void execute() throws BuildException {
if (weblogicSystemHome == null) {
throw new BuildException("weblogic home must be set");
}
if (!weblogicSystemHome.isDirectory()) {
throw new BuildException("weblogic home directory " + weblogicSystemHome.getPath() +
... |
public void execute() throws BuildException {
if (username == null || password == null) {
throw new BuildException("weblogic username and password must both be set");
}
if (serverURL == null) {
throw new BuildException("The url of the weblogic server must... | public void execute() throws BuildException {
if (username == null || password == null) {
throw new BuildException("weblogic username and password must both be set");
}
if (serverURL == null) {
throw new BuildException("The url of the weblogic server must... |
private void buildBorlandStubs(Iterator ithomes) {
Execute execTask = null;
execTask = new Execute(this);
Project project = getTask().getProject();
execTask.setAntRun(project);
execTask.setWorkingDirectory(project.getBaseDir());
Commandline commandline = new Command... | private void buildBorlandStubs(Iterator ithomes) {
Execute execTask = null;
execTask = new Execute(this);
Project project = getTask().getProject();
execTask.setAntRun(project);
execTask.setWorkingDirectory(project.getBaseDir());
Commandline commandline = new Command... |
protected CharSequence encode(RequestCycle requestCycle,
ISharedResourceRequestTarget requestTarget)
{
final String sharedResourceKey = requestTarget.getResourceKey();
if ((sharedResourceKey == null) || (sharedResourceKey.trim().length() == 0))
{
return "";
}
else
{
final AppendingStringBuffer bu... | protected CharSequence encode(RequestCycle requestCycle,
ISharedResourceRequestTarget requestTarget)
{
final String sharedResourceKey = requestTarget.getResourceKey();
if ((sharedResourceKey == null) || (sharedResourceKey.trim().length() == 0))
{
return "";
}
else
{
final AppendingStringBuffer bu... |
private final String iconPathPressed;
/**
* Constructor to transform a line value (from icon set file) to a icon bean for toolbar.
* @param strToSplit - the line value (i18n key, ActionNames ID, icon path, optional icon pressed path)
* @throws JMeterException if error in parsing.
*/
Ico... | private final String iconPathPressed;
/**
* Constructor to transform a line value (from icon set file) to a icon bean for toolbar.
* @param strToSplit - the line value (i18n key, ActionNames ID, icon path, optional icon pressed path)
* @throws JMeterException if error in parsing.
*/
Ico... |
public void testSimpleExample() {
// System.err.println(new File("testdata/figures-demo").exists());
File outdir = new File("testdata/spacewar/doc");
File sourcepath = new File("testdata/spacewar");
String[] args = { "-d",
outdir.getAbsolutePath(),
"-sourcepath",
sourcepath.getAbsolutePath(),... | public void testSimpleExample() {
// System.err.println(new File("testdata/figures-demo").exists());
File outdir = new File("testdata/spacewar/docdir");
File sourcepath = new File("testdata/spacewar");
String[] args = { "-d",
outdir.getAbsolutePath(),
"-sourcepath",
sourcepath.getAbsolutePath... |
public String getText (int index) {
checkWidget();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getText ();
if (strings != null) {
if (0 <= index && index < strings.length) {
String string = strings [index];
return string != null ? string : "";
}
}
return... | public String getText (int index) {
checkWidget();
if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED);
if (index == 0) return getText ();
if (strings != null) {
if (0 <= index && index < strings.length) {
String string = strings [index];
return string != null ? string : "";
}
}
return... |
public final void validate()
{
validateRequired();
if (isValid())
{
convertInput();
if (isValid() && isRequired() && getConvertedInput() == null)
{
reportRequiredError();
}
if (isValid())
{
validateValidators();
}
}
| public final void validate()
{
validateRequired();
if (isValid())
{
convertInput();
if (isValid() && isRequired() && getConvertedInput() == null && !isInputNullable())
{
reportRequiredError();
}
if (isValid())
{
validateValidators();
}
}
|
public int getSelection () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
return (int) adjustment.value;
}
int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
postEvent (SWT.Selection... | public int getSelection () {
checkWidget ();
int /*long*/ hAdjustment = OS.gtk_range_get_adjustment (handle);
GtkAdjustment adjustment = new GtkAdjustment ();
OS.memmove (adjustment, hAdjustment);
return (int) adjustment.value;
}
int /*long*/ gtk_value_changed (int /*long*/ adjustment) {
sendSelectionEvent (SWT... |
public int getWidth () {
checkWidget();
if (!OS.gtk_tree_view_column_get_visible (handle)) {
return 0;
}
if (useFixedWidth) return OS.gtk_tree_view_column_get_fixed_width (handle);
return OS.gtk_tree_view_column_get_width (handle);
}
int /*long*/ gtk_clicked (int /*long*/ widget) {
/*
* There is no API to get... | public int getWidth () {
checkWidget();
if (!OS.gtk_tree_view_column_get_visible (handle)) {
return 0;
}
if (useFixedWidth) return OS.gtk_tree_view_column_get_fixed_width (handle);
return OS.gtk_tree_view_column_get_width (handle);
}
int /*long*/ gtk_clicked (int /*long*/ widget) {
/*
* There is no API to get... |
public int getRowCount () {
checkWidget();
/* On GTK, toolbars cannot wrap */
return 1;
}
ToolItem [] _getTabItemList () {
if (tabItemList == null) return tabItemList;
int count = 0;
for (int i=0; i<tabItemList.length; i++) {
if (!tabItemList [i].isDisposed ()) count++;
}
if (count == tabItemList.length) re... | public int getRowCount () {
checkWidget();
/* On GTK, toolbars cannot wrap */
return 1;
}
ToolItem [] _getTabItemList () {
if (tabItemList == null) return tabItemList;
int count = 0;
for (int i=0; i<tabItemList.length; i++) {
if (!tabItemList [i].isDisposed ()) count++;
}
if (count == tabItemList.length) re... |
public boolean getVisible () {
checkWidget ();
if ((style & SWT.BALLOON) != 0) return OS.GTK_WIDGET_VISIBLE (handle);
int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
return OS.GTK_WIDGET_VISIBLE (tipWindow);
}
int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
notifyList... | public boolean getVisible () {
checkWidget ();
if ((style & SWT.BALLOON) != 0) return OS.GTK_WIDGET_VISIBLE (handle);
int /*long*/ tipWindow = OS.GTK_TOOLTIPS_TIP_WINDOW (handle);
return OS.GTK_WIDGET_VISIBLE (tipWindow);
}
int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) {
sendSelect... |
private void prepare()
{
try
{
getApplication().getSessionStore().onBeginRequest(getRequest());
}
catch (RuntimeException e)
{
log.error("Exception occurred during onEndRequest of the SessionStore", e);
}
// Event callback
onBeginRequest();
}
| private void prepare()
{
try
{
getApplication().getSessionStore().onBeginRequest(getRequest());
}
catch (RuntimeException e)
{
log.error("Exception occurred during onBeginRequest of the SessionStore", e);
}
// Event callback
onBeginRequest();
}
|
protected IStatus run(final IProgressMonitor monitor) {
if (EmfToolsPlugin.trace) {
System.out.println(Messages.ProjectAnalyzer_1 + project.getProject().getProject().getName());
}
// load models
rs = ConverterUtil.createResourceSet();
mapping = new HashMap<IStorage, Resource>();
// TODO: ensure that th... | protected IStatus run(final IProgressMonitor monitor) {
if (EmfToolsPlugin.trace) {
System.out.println(Messages.ProjectAnalyzer_1 + project.getProject().getProject().getName());
}
// load models
rs = ConverterUtil.createResourceSet();
mapping = new HashMap<IStorage, Resource>();
// TODO: ensure that th... |
public void attlistDecl(QName elementDecl, QName attributeDecl,
int attType, boolean attList, String enumString,
int attDefaultType,
int attDefaultValue) throws Exception
{
if (fDeclHandler != null || DEBUG_CALLBACKS) {
... | public void attlistDecl(QName elementDecl, QName attributeDecl,
int attType, boolean attList, String enumString,
int attDefaultType,
int attDefaultValue) throws Exception
{
if (fDeclHandler != null || DEBUG_CALLBACKS) {
... |
public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
int /*long*/ getVisibleRegion () {
if (visibleRgn == 0) {
visibleRgn = OS.NewRgn ();
calculateVisibleRegion (view, visibleRgn, true);
}
int /*long*/ result = OS.NewRgn ();
OS.CopyRgn (visibleRgn, result);
return result;
}
boolean... | public boolean getVisible () {
checkWidget();
return (state & HIDDEN) == 0;
}
int /*long*/ getVisibleRegion () {
if (visibleRgn == 0) {
visibleRgn = OS.NewRgn ();
calculateVisibleRegion (view, visibleRgn, true);
}
int /*long*/ result = OS.NewRgn ();
OS.CopyRgn (visibleRgn, result);
return result;
}
boolean... |
public void setCompositionOffset (int offset) {
checkWidget ();
if (offset < 0) return;
if (startOffset != -1) {
startOffset = offset;
}
}
boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ selRange) {
if (!isInlineEnabled ()) return true;
resetStyles ();
... | public void setCompositionOffset (int offset) {
checkWidget ();
if (offset < 0) return;
if (startOffset != -1) {
startOffset = offset;
}
}
boolean setMarkedText_selectedRange (int /*long*/ id, int /*long*/ sel, int /*long*/ string, int /*long*/ selRange) {
if (!isInlineEnabled ()) return true;
resetStyles ();
... |
protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "form");
super.onComponentTag(tag);
tag.put("method", "POST");
tag.put("action", urlFor(IFormSubmitListener.class).replaceAll("&", "&"));
}
| protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "form");
super.onComponentTag(tag);
tag.put("method", "POST");
tag.put("action", Strings.replaceAll(urlFor(IFormSubmitListener.class),"&", "&"));
}
|
public static String toString(final Throwable throwable)
{
if (throwable != null)
{
final StringWriter stringWriter = new StringWriter();
throwable.printStackTrace(new PrintWriter(stringWriter));
return stringWriter.toString().replaceAll("\t", " ");
}
else
{
return "<Null Throwable>";
}
}
| public static String toString(final Throwable throwable)
{
if (throwable != null)
{
final StringWriter stringWriter = new StringWriter();
throwable.printStackTrace(new PrintWriter(stringWriter));
return Strings.replaceAll(stringWriter.toString(),"\t", " ");
}
else
{
return "<Null Throwable>";... |
private CollectionProperty getValues() {
CollectionProperty threadValues = (CollectionProperty) getProperty(THREAD_VALUES);
if (threadValues.size() > 0) {
return (CollectionProperty) threadValues.get(getThreadContext().getThreadNum() % threadValues.size());
}
return new C... | private CollectionProperty getValues() {
CollectionProperty threadValues = (CollectionProperty) getProperty(THREAD_VALUES);
if (threadValues.size() > 0) {
return (CollectionProperty) threadValues.get(getThreadContext().getThreadNum() % threadValues.size());
}
return new C... |
public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... | public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... |
public void testSimpleStructure() throws IOException, CoreException {
AjBuildManager manager = new AjBuildManager(messageWriter);
BuildArgParser parser = new BuildArgParser();
String javaClassPath = System.getProperty("java.class.path");
AjBuildConfig buildConfig =
parser.genBuildConfig(new String... | public void testSimpleStructure() throws IOException, CoreException {
AjBuildManager manager = new AjBuildManager(messageWriter);
BuildArgParser parser = new BuildArgParser();
String javaClassPath = System.getProperty("java.class.path");
AjBuildConfig buildConfig =
parser.genBuildConfig(new String... |
public WicketComponentTreeTestPage(final PageParameters parameters)
{
add(new Label("label1", "test1"));
// Create a dummy component with inner class
add(new Label("label2", "test22"));
// Add component tree
add(new WicketComponentTree("componentList", this));
}
| public WicketComponentTreeTestPage(final PageParameters parameters)
{
add(new Label("label1", "test1"));
// Create a dummy component with inner class
add(new Label("label2", "test22"));
// Add component tree
add(new WicketPageView("componentList", this));
}
|
public void testInnerClosure() {
Project project = getProject();
executeTarget("testinnerclosure");
assertEquals("Depend did not leave correct number of files", 2,
getResultFiles().size());
}
| public void testInnerClosure() {
Project project = getProject();
executeTarget("testinnerclosure");
assertEquals("Depend did not leave correct number of files", 4,
getResultFiles().size());
}
|
public void activated(ID [] others)
{
debug("activated()");
try {
// Only try to open output file if this is not the host instance
if (!isHost() && !getContext().isGroupServer()) {
// Then notify listener about starting the receive
if (progres... | public void activated(ID [] others)
{
debug("activated()");
try {
// Only try to open output file if this is not the host instance
if (!isHost() && !getContext().isGroupServer()) {
// Then notify listener about starting the receive
if (progres... |
public ID createInstance(Object[] parameters) throws IDCreateException {
if(parameters != null && parameters.length == 1 && parameters[0] instanceof String) {
String str = (String) parameters[0];
return new DnsSdServiceTypeID(this, str);
} else if (parameters != null && parameters.length == 1 && parameters[0... | public ID createInstance(Object[] parameters) throws IDCreateException {
if(parameters != null && parameters.length == 1 && parameters[0] instanceof String) {
String str = (String) parameters[0];
return new DnsSdServiceTypeID(this, str);
} else if (parameters != null && parameters.length == 1 && parameters[0... |
protected byte [] serializeSharedObjectMessage(ID sharedObjectID, Object message) throws IOException {
if (!(message instanceof Serializable)) throw new NotSerializableException("sharedobjectmessage "+message+" not serializable");
ByteArrayOutputStream bouts = new ByteArrayOutputStream();
Id... | protected byte [] serializeSharedObjectMessage(ID sharedObjectID, Object message) throws IOException {
if (!(message instanceof Serializable)) throw new NotSerializableException("sharedobjectmessage "+message+" not serializable");
ByteArrayOutputStream bouts = new ByteArrayOutputStream();
Id... |
private void updateVisualizer(MailerModel model) {
addressField.setText(model.getToAddress());
fromField.setText(model.getFromAddress());
smtpHostField.setText(model.getSmtpHost());
smtpPortField.setText(Integer.toString(model.getSmtpPort()));
smtpLoginField.setText(model.get... | private void updateVisualizer(MailerModel model) {
addressField.setText(model.getToAddress());
fromField.setText(model.getFromAddress());
smtpHostField.setText(model.getSmtpHost());
smtpPortField.setText(model.getSmtpPort());
smtpLoginField.setText(model.getLogin());
... |
public String getObject()
{
if (max == UNLIMITED)
{
return getString(RESOURCE_UNLIMITED);
}
else
{
HashMap<String, Object> vars = new HashMap<String, Object>(1);
vars.put("max", max);
return getString(RESOURCE_LIMITED, Model.of(vars));
}
}
}
| public String getObject()
{
if (max == UNLIMITED)
{
return getString(RESOURCE_UNLIMITED);
}
else
{
HashMap<String, Object> vars = new HashMap<String, Object>(1);
vars.put("max", max);
return getString(RESOURCE_LIMITED, new Model<HashMap<String, Object>>(vars));
}
}
}
|
@Target(ElementType.FIELD)
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* 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 distr... | @Target(ElementType.FIELD)
/*******************************************************************************
* Copyright (c) 2005 Contributors.
* 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 distr... |
private void unpackAttributes(World world) {
Attribute[] attrs = field.getAttributes();
List as = BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),attrs, getSourceContext(world),world.getMessageHandler(),bcelObjectType.getWeaverVersionAttribute());
as.addAll(AtAjAttributes.readAj5Fie... | private void unpackAttributes(World world) {
Attribute[] attrs = field.getAttributes();
List as = BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),attrs, getSourceContext(world),world.getMessageHandler(),bcelObjectType.getWeaverVersionAttribute());
as.addAll(AtAjAttributes.readAj5Fie... |
public void verifyRefresh(boolean useDataCache, LockModeType lock,
boolean makeDirtyBeforeRefresh, boolean refreshFromDataCache,
String expected) {
OpenJPAEntityManagerFactorySPI emf = (useDataCache)
? emfWithDataCache : emfWithoutDataCache;
emf.getConfiguration... | public void verifyRefresh(boolean useDataCache, LockModeType lock,
boolean makeDirtyBeforeRefresh, boolean refreshFromDataCache,
String expected) {
OpenJPAEntityManagerFactorySPI emf = (useDataCache)
? emfWithDataCache : emfWithoutDataCache;
emf.getConfiguration... |
public final List getValidators()
{
final int size = validators_size();
if (size == 0)
{
return Collections.EMPTY_LIST;
}
else
{
final List list = new ArrayList();
for (int i = 0; i < size; i++)
{
list.add(validators_get(i));
}
return Collections.unmodifiableList(list);
}
| public final List getValidators()
{
final int size = validators_size();
if (size == 0)
{
return Collections.EMPTY_LIST;
}
else
{
final List list = new ArrayList(size);
for (int i = 0; i < size; i++)
{
list.add(validators_get(i));
}
return Collections.unmodifiableList(list);
}
|
public void run() {
synchronized (this) {
// Just in case this object is reused in the future
finished = false;
}
final byte[] buf = new byte[SIZE];
int length;
try {
while ((length = is.read(buf)) > 0) {
os.write(buf, 0, ... | public void run() {
synchronized (this) {
// Just in case this object is reused in the future
finished = false;
}
final byte[] buf = new byte[SIZE];
int length;
try {
while ((length = is.read(buf)) > 0) {
os.write(buf, 0, ... |
public BasePage() {
add(new BookmarkablePageLink(this,"home-link", HomePage.class));
}
| public BasePage() {
new BookmarkablePageLink(this,"home-link", HomePage.class);
}
|
public void configure(TestElement element) {
super.configure(element);
// N.B. this will be a config element, so we cannot use the getXXX() methods
classname.setText(element.getPropertyAsString(TCPSampler.CLASSNAME));
serverPanel.setServer(element.getPropertyAsString(TCPSampler.SERVE... | public void configure(TestElement element) {
super.configure(element);
// N.B. this will be a config element, so we cannot use the getXXX() methods
classname.setText(element.getPropertyAsString(TCPSampler.CLASSNAME));
serverPanel.setServer(element.getPropertyAsString(TCPSampler.SERVE... |
public static synchronized QueueConnection getQueueConnection(Context ctx, String queueConn) {
if (factory != null) {
try {
return qfactory.createQueueConnection();
} catch (JMSException e) {
log.error(e.getMessage());
}
}
r... | public static synchronized QueueConnection getQueueConnection(Context ctx, String queueConn) {
if (qfactory != null) {
try {
return qfactory.createQueueConnection();
} catch (JMSException e) {
log.error(e.getMessage());
}
}
... |
public void updateModel()
{
String input = getInput();
// if input was null then value was not submitted (disabled field), ignore it
if (input != null)
{
// Get any validation type
final Class type = getValidationType();
if (type != null)
{
// Set model to request string converted to the appro... | public void updateModel()
{
String input = getInput();
// if input was null then value was not submitted (disabled field), ignore it
if (input != null)
{
// Get any validation type
final Class type = getValidationType();
if (type != null)
{
// Set model to request string converted to the appro... |
public IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class containerClass)
{
// Get locator to search for the resource
final IResourceStreamLocator locator = Application.get().getResourceSettings()
.getResourceStreamLocator();
String style = container.getStyle();
Locale loca... | public IResourceStream getMarkupResourceStream(final MarkupContainer container,
Class containerClass)
{
// Get locator to search for the resource
final IResourceStreamLocator locator = Application.get().getResourceSettings()
.getResourceStreamLocator();
String style = container.getStyle();
Locale loca... |
private void sendMimeMail(Project project, Values values, String message) {
Mailer mailer = null;
try {
mailer = (Mailer) ClasspathUtils.newInstance(
"org.apache.tools.ant.taskdefs.email.MimeMailer",
MailLogger.class.getClassLoader(), Mailer.class)... | private void sendMimeMail(Project project, Values values, String message) {
Mailer mailer = null;
try {
mailer = (Mailer) ClasspathUtils.newInstance(
"org.apache.tools.ant.taskdefs.email.MimeMailer",
MailLogger.class.getClassLoader(), Mailer.class)... |
private void moveDown() {
cancelEditing();
int rowSelected = table.getSelectedRow();
if (rowSelected < table.getRowCount()-1) {
tableModel.moveRow(rowSelected, rowSelected+1, rowSelected+1);
table.setRowSelectionInterval(rowSelected+1, rowSelected+1);
}
}... | private void moveDown() {
cancelEditing();
int rowSelected = table.getSelectedRow();
if (rowSelected >=0 && rowSelected < table.getRowCount()-1) {
tableModel.moveRow(rowSelected, rowSelected+1, rowSelected+1);
table.setRowSelectionInterval(rowSelected+1, rowSelected+... |
public boolean getExpanded () {
checkWidget ();
return expanded;
}
/*
* Returns the bounds of the receiver's expander box, regardless of whether the
* receiver currently has children or not.
*/
Rectangle getExpanderBounds () {
int itemHeight = parent.itemHeight;
int x = parent.getCellPadding () - parent.horizon... | public boolean getExpanded () {
checkWidget ();
return expanded;
}
/*
* Returns the bounds of the receiver's expander box, regardless of whether the
* receiver currently has children or not.
*/
Rectangle getExpanderBounds () {
int itemHeight = parent.itemHeight;
int x = parent.getCellPadding () - parent.horizon... |
public static String DEFAULT_HOST = System.getProperty("org.eclipse.ecf.provider.generic.host", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
static {
final Boolean useHostname = Boolean.valueOf(System.getProperty("org.eclipse.ecf.provider.generic.host.useHostName", "false")); //$NON-NLS-1$ //$NON-NLS-2$
if (useHost... | public static String DEFAULT_HOST = System.getProperty("org.eclipse.ecf.provider.generic.host", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
static {
final Boolean useHostname = Boolean.valueOf(System.getProperty("org.eclipse.ecf.provider.generic.host.useHostName", "true")); //$NON-NLS-1$ //$NON-NLS-2$
if (useHostn... |
private void internalAdd(final Behavior behavior)
{
component.data_add(behavior);
if (behavior.getStatelessHint(component))
{
getBehaviorId(behavior);
}
}
| private void internalAdd(final Behavior behavior)
{
component.data_add(behavior);
if (!behavior.getStatelessHint(component))
{
getBehaviorId(behavior);
}
}
|
private void setNodePath() {
List nodePath = new ArrayList();
if (selectedNode != null) {
TreeNode[] path = selectedNode.getPath();
for (int i = 0; i < path.length; i++) {
nodePath.add(((JMeterTreeNode) path[i]).getName());
}
// nodePat... | private void setNodePath() {
List<String> nodePath = new ArrayList<String>();
if (selectedNode != null) {
TreeNode[] path = selectedNode.getPath();
for (int i = 0; i < path.length; i++) {
nodePath.add(((JMeterTreeNode) path[i]).getName());
}
... |
public AnnotationTypePattern resolveBindings(IScope scope, Bindings bindings,
boolean allowBinding)
{
this.typePattern = typePattern.resolveBindings(scope,bindings,false,false);
resolved = true;
if (typePattern instanceof ExactTypePattern) {
ExactTypePattern et = ... | public AnnotationTypePattern resolveBindings(IScope scope, Bindings bindings,
boolean allowBinding)
{
this.typePattern = typePattern.resolveBindings(scope,bindings,false,false);
resolved = true;
if (typePattern instanceof ExactTypePattern) {
ExactTypePattern et = ... |
protected IStatus run(IProgressMonitor monitor) {
try {
ISearch search = search(criteria);
UserSearchCompleteEvent complete = new UserSearchCompleteEvent(
search);
listener.handleUserSearchEvent(complete);
} catch (UserSearchException e) {
log(e.getLocalizedMessage(), e);
retu... | protected IStatus run(IProgressMonitor monitor) {
try {
ISearch search = search(criteria);
UserSearchCompleteEvent complete = new UserSearchCompleteEvent(
search);
listener.handleUserSearchEvent(complete);
} catch (UserSearchException e) {
log(e.getLocalizedMessage(), e);
retu... |
public void test_removeI() {
try {
combo.remove(0);
fail("No exception thrown for illegal index argument");
}
catch (IllegalArgumentException e) {
}
try {
combo.remove(3);
fail("No exception thrown for illegal index argument");
}
catch (IllegalArgumentException e) {
}
combo.add("string0");
try {
c... | public void test_removeI() {
try {
combo.remove(0);
fail("No exception thrown for illegal index argument");
}
catch (IllegalArgumentException e) {
}
try {
combo.remove(3);
fail("No exception thrown for illegal index argument");
}
catch (IllegalArgumentException e) {
}
combo.add("string0");
try {
c... |
interface CriteriaExpression {
/*
* 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, Ver... | interface CriteriaExpression {
/*
* 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, Ver... |
public void addString(String string, float x, float y, Font font) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int length = string.length();
char[] buffer = new char[length];
string.ge... | public void addString(String string, float x, float y, Font font) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int length = string.length();
char[] buffer = new char[length];
string.ge... |
protected final void renderComponentTag(ComponentTag tag)
{
final ApplicationSettings settings = getApplication().getSettings();
if (!(tag instanceof ComponentWicketTag) || !settings.getStripWicketTags())
{
// Apply attribute modifiers
if (attributeModifiers != null && tag.getType() != XmlTag.CLOSE)
{
... | protected final void renderComponentTag(ComponentTag tag)
{
final ApplicationSettings settings = getApplication().getSettings();
if (!(tag instanceof ComponentWicketTag) || !settings.getStripWicketTags())
{
// Apply attribute modifiers
if (attributeModifiers != null && tag.getType() != XmlTag.CLOSE)
{
... |
public String getDiagnosticContext() {
if (!_diagContextComputed) {
// this initialization has to happen lazily because there is no
// guarantee that conf.getId() will be populated by the time that
// endConfiguration() is called.
if (_diagContext == null) {
... | public String getDiagnosticContext() {
if (!_diagContextComputed) {
// this initialization has to happen lazily because there is no
// guarantee that conf.getId() will be populated by the time that
// endConfiguration() is called.
if (_diagContext == null && _... |
public boolean isVisible () {
checkWidget();
return getVisible () && parent.isVisible ();
}
void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
if (hasKeyboardFocus(id)) {
Shell s = this.getShell();
s.keyInputHappened = false;
boolean textInput = OS.objc_msgSend (id, OS.sel_conformsToPro... | public boolean isVisible () {
checkWidget();
return getVisible () && parent.isVisible ();
}
void keyDown (int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
if (hasKeyboardFocus(id)) {
Shell s = this.getShell();
s.keyInputHappened = false;
boolean textInput = OS.objc_msgSend (id, OS.sel_conformsToPro... |
protected void renderChoice(T object, Response response, String criteria)
{
response.write(getTextValue(object));
}
} | protected void renderChoice(final T object, final Response response, final String criteria)
{
response.write(getTextValue(object));
}
} |
protected String getTextValue(Object object)
{
return object.toString();
}
} | protected String getTextValue(final Object object)
{
return object.toString();
}
} |
protected final IBreadCrumbParticipant getParticipant(String componentId)
{
return breadCrumbPanelFactory.create(componentId, breadCrumbModel);
}
} | protected final IBreadCrumbParticipant getParticipant(final String componentId)
{
return breadCrumbPanelFactory.create(componentId, breadCrumbModel);
}
} |
public Component getHeader(String componentId)
{
Component header = super.getHeader(componentId);
return header.setEscapeModelStrings(false);
}
} | public Component getHeader(final String componentId)
{
Component header = super.getHeader(componentId);
return header.setEscapeModelStrings(false);
}
} |
public NoFilter(String id)
{
super(id);
}
} | public NoFilter(final String id)
{
super(id);
}
} |
protected <T extends Page> void executeTest(final Class<T> pageClass,
PageParameters parameters, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
tester.startPage(pageClass, parameters);
tester.assertRenderedPage(pageClass);
tester.assertResultPage(getCla... | protected <T extends Page> void executeTest(final Class<T> pageClass,
final PageParameters parameters, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
tester.startPage(pageClass, parameters);
tester.assertRenderedPage(pageClass);
tester.assertResultPage(... |
public void onClick(AjaxRequestTarget target)
{
ajaxLabel.setEnabled(!ajaxLabel.isEnabled());
target.add(ajaxLabel);
}
});
}
} | public void onClick(final AjaxRequestTarget target)
{
ajaxLabel.setEnabled(!ajaxLabel.isEnabled());
target.add(ajaxLabel);
}
});
}
} |
public static final String CHAT_ROOM_NAME = System.getProperty("chat.room.name");
List<ID> invitationsReceived = new ArrayList<ID>();
| public static final String CHAT_ROOM_NAME = System.getProperty("chat.room.name");
List invitationsReceived = new ArrayList();
|
public String getText(Object object) {
String label = ((IHost)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_IHost_type") : //$NON-NLS-1$
getString("_UI_IHost_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
| public String getText(Object object) {
String label = ((IHost)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_IHost_type") : //$NON-NLS-1$
label;
}
|
protected void processElement() {
if (inEJBRef) {
return;
}
if (currentElement.equals(HOME_INTERFACE) ||
currentElement.equals(REMOTE_INTERFACE) ||
currentElement.equals(BEAN_CLASS) ||
currentElement.equals(PK_CLASS)) {
... | protected void processElement() {
if (inEJBRef) {
return;
}
if (currentElement.equals(HOME_INTERFACE) ||
currentElement.equals(REMOTE_INTERFACE) ||
currentElement.equals(BEAN_CLASS) ||
currentElement.equals(PK_CLASS)) {
... |
public void test4() {
expectBuildException("test4", "ANTLR exited with an error code of 1 ( try forking )");
}
| public void test4() {
executeTarget("test4");
}
|
public LocaleDropDownChoice(String id)
{
super(id, FormInputApplication.LOCALES, new LocaleChoiceRenderer());
// set the model that gets the current locale, and that is used for
// updating the current locale to property 'locale' of FormInput
setDefaultModel(new PropertyModel<Locale>(FormInput.this, "l... | public LocaleDropDownChoice(String id)
{
super(id, FormInputApplication.LOCALES, new LocaleChoiceRenderer());
// set the model that gets the current locale, and that is used for
// updating the current locale to property 'locale' of FormInput
setModel(new PropertyModel<Locale>(FormInput.this, "locale")... |
public Rectangle getBounds(int start, int end) {
checkLayout();
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
computeRuns();
int length = text.length();
if (length == 0) return new Rectangle(0, 0, 0, 0);
if (start > end)... | public Rectangle getBounds(int start, int end) {
checkLayout();
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init();
try {
computeRuns();
int length = text.length();
if (length == 0) return new Rectangle(0, 0, 0, 0);
if (start > end)... |
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
NSBox widget = (NSBox)view;
int border = (int)(0.5f + widget.borderWidth ());
NSSize margins = widget.contentViewMargins();
NSRect frame = contentView.frame();
width += (margins.width + border) * 2;
height += (margins.height + b... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget ();
NSBox widget = (NSBox)view;
int border = (int)Math.ceil (widget.borderWidth ());
NSSize margins = widget.contentViewMargins();
NSRect frame = contentView.frame();
width += (margins.width + border) * 2;
height += (margins.height ... |
public void selectAll () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.selectAll(null);
ignoreSelect = false;
}
void sendDoubleSelection() {
postEvent (SWT.DefaultSelection);
}
boolean sendKeyEvent (NSEvent nsEvent, int type) {
bo... | public void selectAll () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return;
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.selectAll(null);
ignoreSelect = false;
}
void sendDoubleSelection() {
postEvent (SWT.DefaultSelection);
}
boolean sendKeyEvent (NSEvent nsEvent, int type) {
bo... |
public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... | public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... |
public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem, style, checkIndex (index), true);
}
TreeItem (Tree parent, TreeItem parentItem, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (crea... | public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem, style, checkIndex (index), true);
}
TreeItem (Tree parent, TreeItem parentItem, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (crea... |
public String toURI(String path) {
boolean isDir = (new File(path)).isDirectory();
StringBuffer sb = new StringBuffer("file:");
// catch exception if normalize thinks this is not an absolute path
try {
path = normalize(path).getAbsolutePath();
sb.append("//"... | public String toURI(String path) {
boolean isDir = (new File(path)).isDirectory();
StringBuffer sb = new StringBuffer("file:");
// catch exception if normalize thinks this is not an absolute path
try {
path = normalize(path).getAbsolutePath();
sb.append("//"... |
public ColorDialog (Shell parent) {
this (parent, SWT.NULL);
}
| public ColorDialog (Shell parent) {
this (parent, SWT.NONE);
}
|
public Tray getSystemTray () {
checkDevice ();
if (tray != null) return tray;
return tray = new Tray (this, SWT.NULL);
}
| public Tray getSystemTray () {
checkDevice ();
if (tray != null) return tray;
return tray = new Tray (this, SWT.NONE);
}
|
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
int border = getBorder ();
Rect rect = new Rect ();
OS.GetDataBrowserScrollBarInset (handle, rect);
x -= rect.left + border;
y -= rect.top + border;
width += rect.left + rect.right + border + border;
height += rect.top + rect.bo... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
int border = getBorder ();
Rect rect = new Rect ();
OS.GetDataBrowserScrollBarInset (handle, rect);
x -= rect.left + border;
y -= rect.top + border;
width += rect.left + rect.right + border + border;
height += rect.top + rect.bo... |
public int getAlpha() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
initCairo();
return (int)(Cairo.cairo_current_alpha(data.cairo) * 255);
}
| public int getAlpha() {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.cairo == 0) return 0xFF;
return (int)(Cairo.cairo_current_alpha(data.cairo) * 255);
}
|
public void actionPerformed(ActionEvent e) {
if (e.getSource() == clear) {
this.clearFiles();
} else if (e.getActionCommand().equals(ACTION_BROWSE)) {
JFileChooser chooser = new JFileChooser();
String start = JMeterUtils.getPropDefault("user.dir", ""); // $NON-NLS-1$ // $NON-... | public void actionPerformed(ActionEvent e) {
if (e.getSource() == clear) {
this.clearFiles();
} else if (e.getActionCommand().equals(ACTION_BROWSE)) {
JFileChooser chooser = new JFileChooser();
String start = JMeterUtils.getPropDefault("user.dir", ""); // $NON-NLS-1$ // $NON-... |
public SampleResult sample(Entry e) {
SampleResult res = new SampleResult();
res.setSuccessful(false); // Assume failure
String remote = getRemoteFilename();
String local = getLocalFilename();
boolean binaryTransfer = isBinaryMode();
res.setSampleLabel(getName());
final String label = getLabel();
... | public SampleResult sample(Entry e) {
SampleResult res = new SampleResult();
res.setSuccessful(false); // Assume failure
String remote = getRemoteFilename();
String local = getLocalFilename();
boolean binaryTransfer = isBinaryMode();
res.setSampleLabel(getName());
final String label = getLabel();
... |
private void writeManifest(ZipOutputStream zOut, Manifest manifest)
throws IOException {
for (Enumeration e = manifest.getWarnings();
e.hasMoreElements();) {
log("Manifest warning: " + (String) e.nextElement(),
Project.MSG_WARN);
}
zipDir(nul... | private void writeManifest(ZipOutputStream zOut, Manifest manifest)
throws IOException {
for (Enumeration e = manifest.getWarnings();
e.hasMoreElements();) {
log("Manifest warning: " + (String) e.nextElement(),
Project.MSG_WARN);
}
zipDir(nul... |
public void execute() throws BuildException {
if (manifestFile == null) {
throw new BuildException("the file attribute is required");
}
Manifest toWrite = Manifest.getDefaultManifest();
Manifest current = null;
BuildException error = null;
if (manifestFi... | public void execute() throws BuildException {
if (manifestFile == null) {
throw new BuildException("the file attribute is required");
}
Manifest toWrite = Manifest.getDefaultManifest();
Manifest current = null;
BuildException error = null;
if (manifestFi... |
public static final int sizeof = 12;
} | public static final int sizeof = Gdip.ColorPalette_sizeof ();
} |
public static final int sizeof = 13;
} | public static final int sizeof = COM.DVTARGETDEVICE_sizeof ();
} |
public static final int sizeof = 16;
} | public static final int sizeof = COM.GUID_sizeof ();
} |
public IEnumFORMATETC(int address) {
super(address);
}
} | public IEnumFORMATETC(int /*long*/ address) {
super(address);
}
} |
public IEnumSTATSTG(int address) {
super(address);
}
} | public IEnumSTATSTG(int /*long*/ address) {
super(address);
}
} |
public IEnumVARIANT(int address) {
super(address);
}
} | public IEnumVARIANT(int /*long*/ address) {
super(address);
}
} |
public IMoniker(int address) {
super(address);
}
} | public IMoniker(int /*long*/ address) {
super(address);
}
} |
public static final int sizeof = 12;
} | public static final int sizeof = COM.LICINFO_sizeof ();
} |
public static final int sizeof = 8;
} | public static final int sizeof = COM.OLECMD_sizeof ();
} |
public static final int sizeof = OS.IsWinCE ? 8 : 6;
} | public static final int sizeof = OS.ACCEL_sizeof ();
} |
public static final int sizeof = 40;
} | public static final int sizeof = OS.BITMAPINFOHEADER_sizeof ();
} |
public static final int sizeof = 4;
} | public static final int sizeof = OS.BLENDFUNCTION_sizeof ();
} |
public static final int sizeof = 28;
} | public static final int sizeof = OS.COMPOSITIONFORM_sizeof ();
} |
public static final int sizeof = 20;
} | public static final int sizeof = OS.DLLVERSIONINFO_sizeof ();
} |
public static final int sizeof = 20;
} | public static final int sizeof = OS.DROPFILES_sizeof ();
} |
static final public int sizeof = 8;
}
| static final public int sizeof = OS.FILETIME_sizeof ();
}
|
public static final int sizeof = 8;
}
| public static final int sizeof = OS.GRADIENT_RECT_sizeof ();
}
|
public static int sizeof = 16;
} | public static int sizeof = OS.HDHITTESTINFO_sizeof ();
} |
public static final int sizeof = 8;
} | public static final int sizeof = OS.INITCOMMONCONTROLSEX_sizeof ();
} |
public static final int sizeof = 28;
} | public static final int sizeof = OS.INPUT_sizeof ();
} |
public static final int sizeof = 4280;
} | public static final int sizeof = OS.LITEM_sizeof ();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.