buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public boolean cache(PreparedQuery q) {
lock();
try {
String id = q.getIdentifier();
if (isCachable(id) == Boolean.FALSE) {
if (_log != null && _log.isWarnEnabled())
_log.warn(_loc.get("prepared-query-not-cachable", id));
return false;
}
Exclusion exclusion = getMatchedExclu... | public boolean cache(PreparedQuery q) {
lock();
try {
String id = q.getIdentifier();
if (isCachable(id) == Boolean.FALSE) {
if (_log != null && _log.isWarnEnabled())
_log.warn(_loc.get("prepared-query-not-cachable", id));
return false;
}
Exclusion exclusion = getMatchedExclu... |
public <T> Expression<T> function(String name, Class<T> type,
Expression<?>... args) {
throw new AbstractMethodError();
}
| public <T> Expression<T> function(String name, Class<T> type,
Expression<?>... args) {
return new Expressions.DatabaseFunction(name, type, args);
}
|
package wicket.authorization.strategies.role;
/*
* $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 ... | package wicket.authorization.strategies.role;
/*
* $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 static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$
/**
* Read in the properties having to do with saving from a properties file.
*/
static {
Properties props = JMeterUtils.getJMeterProperties();
_subresults = TRUE.equalsIgnoreCase(props.getProperty(SUBRESULT... | private static final String DEFAULT_DELIMITER = ","; // $NON_NLS-1$
/**
* Read in the properties having to do with saving from a properties file.
*/
static {
Properties props = JMeterUtils.getJMeterProperties();
_subresults = TRUE.equalsIgnoreCase(props.getProperty(SUBRESULT... |
public Object component(final Component component)
{
// If component never rendered
if (renderedComponents == null || !renderedComponents.contains(component))
{
// If auto component ...
if (component.isAuto())
{
// Add to list of unrendered auto components to
// de... | public Object component(final Component component)
{
// If component never rendered
if (renderedComponents == null || !renderedComponents.contains(component))
{
// If auto component ...
if (component.isAuto())
{
// Add to list of unrendered auto components to
// de... |
private void activateSelectorFor(IdentityConstraint ic) throws XNIException {
Selector selector = ic.getSelector();
FieldActivator activator = this;
if (selector == null)
return;
XPathMatcher matcher = selector.createMatcher(activator);
fMatcherStack.addMatcher(ma... | private void activateSelectorFor(IdentityConstraint ic) throws XNIException {
Selector selector = ic.getSelector();
FieldActivator activator = this;
if (selector == null)
return;
XPathMatcher matcher = selector.createMatcher(activator);
fMatcherStack.addMatcher(ma... |
public void dispose () {
/*
* Note: It is valid to attempt to dispose a widget
* more than once. If this happens, fail silently.
*/
if (isDisposed ()) return;
if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
release (true);
}
void enableHandle (boolean enabled, int widgetHandle) {
int [] argLis... | public void dispose () {
/*
* Note: It is valid to attempt to dispose a widget
* more than once. If this happens, fail silently.
*/
if (isDisposed ()) return;
if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
release (true);
}
void enableHandle (boolean enabled, int widgetHandle) {
int [] argLis... |
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (string.equals (text)) return;
int index = parent.indexOf (this);
if (index == -1) return;
super.setText (string);
/*
* Bug in Windows. For some reason, when the title
* of a column is changed after ... | public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (string.equals (text)) return;
int index = parent.indexOf (this);
if (index == -1) return;
super.setText (string);
/*
* Bug in Windows. For some reason, when the title
* of a column is changed after ... |
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (string.equals (text)) return;
int index = parent.indexOf (this);
if (index == -1) return;
super.setText (string);
/*
* Bug in Windows. When a column header contains a
* mnemonic character, Windows do... | public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
if (string.equals (text)) return;
int index = parent.indexOf (this);
if (index == -1) return;
super.setText (string);
/*
* Bug in Windows. When a column header contains a
* mnemonic character, Windows do... |
protected void onSubmit()
{
info("button2.onSubmit executed");
}
};
button2.setImmediate(true);
form.add(button2);
add(form);
}
| protected void onSubmit()
{
info("button2.onSubmit executed");
}
};
button2.setDefaultFormProcessing(false);
form.add(button2);
add(form);
}
|
protected void appendOptionHtml(AppendingStringBuffer buffer, E choice, int index,
String selected)
{
T objectValue = (T)renderer.getDisplayValue(choice);
Class<T> objectClass = (Class<T>)(objectValue == null ? null : objectValue.getClass());
String displayValue = "";
if (objectClass != null && objectClass... | protected void appendOptionHtml(AppendingStringBuffer buffer, E choice, int index,
String selected)
{
T objectValue = (T)renderer.getDisplayValue(choice);
Class<T> objectClass = (Class<T>)(objectValue == null ? null : objectValue.getClass());
String displayValue = "";
if (objectClass != null && objectClass... |
protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Iterate through choices
final List<? extends T> choices = getChoices();
// Buffer to hold generated body
final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70);
//... | protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Iterate through choices
final List<? extends T> choices = getChoices();
// Buffer to hold generated body
final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70);
//... |
private final void invokeSetter(final Object object, final String name, final String value,
final Locale locale)
{
// Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus
// 'name' will be all lowercase.
// Note: because the attributes are all lowercase, there is slight
// possibility of err... | private final void invokeSetter(final Object object, final String name, final String value,
final Locale locale)
{
// Note: tag attributes are maintained in a LowerCaseKeyValueMap, thus
// 'name' will be all lowercase.
// Note: because the attributes are all lowercase, there is slight
// possibility of err... |
public boolean print (GC gc) {
checkWidget ();
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
int topHandle = topHandle ();
int bits = OS.GetWindowLong (topHandle, OS.GWL_STYLE);
if ((bits &... | public boolean print (GC gc) {
checkWidget ();
if (gc == null) error (SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (5, 1)) {
int /*long*/ topHandle = topHandle ();
int bits = OS.GetWindowLong (topHandle, OS.GWL_STYLE);
if... |
private void defineActions(IPageLayout layout) {
// Add "new wizards".
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
// Add "show views".
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout... | private void defineActions(IPageLayout layout) {
// Add "new wizards".
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
// Add "show views".
layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
layout... |
protected boolean hasAllContent(XSParticleDecl particle) {
// If the content is not empty, is the top node ALL?
if (particle != null && particle.fType == XSParticleDecl.PARTICLE_MODELGROUP) {
return ((XSModelGroupImpl)particle.fValue).fCompositor == XSModelGroupImpl.MODELGROUP_ALL;
... | protected boolean hasAllContent(XSParticleDecl particle) {
// If the content is not empty, is the top node ALL?
if (particle != null && particle.fType == XSParticleDecl.PARTICLE_MODELGROUP) {
return ((XSModelGroupImpl)particle.fValue).fCompositor == XSModelGroupImpl.MODELGROUP_ALL;
... |
private Map getRestrictedDefintion() {
Map result = new HashMap();
synchronized (restrictedDefinitions) {
for(Iterator i = restrictedDefinitions.entrySet().iterator();
i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
List en... | private Map getRestrictedDefintion() {
Map result = new HashMap();
synchronized (restrictedDefinitions) {
for(Iterator i = restrictedDefinitions.entrySet().iterator();
i.hasNext();) {
Map.Entry entry = (Map.Entry) i.next();
List en... |
public void run() {
Control control = DropTarget.this.control;
if (control == null || control.isDisposed() || dragOverStart == 0) return;
long time = System.currentTimeMillis();
int delay = DRAGOVER_HYSTERESIS;
if (time < dragOverStart) {
delay = (int)(dragOverStart - time);
} else {
int al... | public void run() {
Control control = DropTarget.this.control;
if (control == null || control.isDisposed() || dragOverStart == 0) return;
long time = System.currentTimeMillis();
int delay = DRAGOVER_HYSTERESIS;
if (time < dragOverStart) {
delay = (int)(dragOverStart - time);
} else {
int al... |
public static Receiver createReceiver(ConnectionFactory factory, Destination receiveQueue,
String principal, String credentials, boolean useResMsgIdAsCorrelId)
throws JMSException {
Receiver receiver = new Receiver(factory, receiveQueue, principal, credentials, useResMsgIdAsCorrelId)... | public static Receiver createReceiver(ConnectionFactory factory, Destination receiveQueue,
String principal, String credentials, boolean useResMsgIdAsCorrelId)
throws JMSException {
Receiver receiver = new Receiver(factory, receiveQueue, principal, credentials, useResMsgIdAsCorrelId)... |
public void run() {
if (styledText == null) return;
int i;
long start = System.currentTimeMillis();
for (i = 0; i < lineCount; i++) {
if (lineHeight[i] == -1 || lineWidth[i] == -1) {
calculate(i, 1);
if (System.currentTimeMillis() - start > IDLE_TIME) break;
}
}
if (i < lineCount) ... | public void run() {
if (styledText == null) return;
int i;
long start = System.currentTimeMillis();
for (i = 0; i < lineCount; i++) {
if (lineHeight[i] == -1 || lineWidth[i] == -1) {
calculate(i, 1);
if (System.currentTimeMillis() - start > IDLE_TIME) break;
}
}
if (i < lineCount) ... |
* public void modifyText(ModifyEvent e) {
* Text text = (Text)editor.getEditor();
* editor.getItem().setText(EDITABLECOLUMN, text.getText());
* }
* });
* newEditor.selectAll();
* newEditor.setFocus();
* editor.setEditor(newEditor, item, EDITABLECOLUMN);
* }
* });
* </pre></code>
*/
public class T... | * public void modifyText(ModifyEvent e) {
* Text text = (Text)editor.getEditor();
* editor.getItem().setText(EDITABLECOLUMN, text.getText());
* }
* });
* newEditor.selectAll();
* newEditor.setFocus();
* editor.setEditor(newEditor, item, EDITABLECOLUMN);
* }
* });
* </pre></code>
*/
public class T... |
* public void modifyText(ModifyEvent e) {
* Text text = (Text)editor.getEditor();
* editor.getItem().setText(text.getText());
* }
* });
* newEditor.selectAll();
* newEditor.setFocus();
* editor.setEditor(newEditor, item);
* }
* });
* </pre></code>
*/
public class TreeEditor extends ControlEditor ... | * public void modifyText(ModifyEvent e) {
* Text text = (Text)editor.getEditor();
* editor.getItem().setText(text.getText());
* }
* });
* newEditor.selectAll();
* newEditor.setFocus();
* editor.setEditor(newEditor, item);
* }
* });
* </pre></code>
*/
public class TreeEditor extends ControlEditor ... |
public final void onComponentTag(Component component, ComponentTag tag)
{
if (tag.getType() != XmlTag.CLOSE)
{
replaceAttibuteValue(component, tag);
}
}
| public final void onComponentTag(Component component, ComponentTag tag)
{
if (tag.getType() != XmlTag.Type.CLOSE)
{
replaceAttibuteValue(component, tag);
}
}
|
protected void onComponentTag(final ComponentTag tag)
{
if (tag.isOpenClose())
{
tag.setType(XmlTag.OPEN);
}
super.onComponentTag(tag);
}
| protected void onComponentTag(final ComponentTag tag)
{
if (tag.isOpenClose())
{
tag.setType(XmlTag.Type.OPEN);
}
super.onComponentTag(tag);
}
|
protected void onComponentTag(final ComponentTag tag)
{
if (tag.isOpenClose())
{
this.wasOpenCloseTag = true;
// Convert <span wicket:id="myPanel" /> into
// <span wicket:id="myPanel">...</span>
tag.setType(XmlTag.OPEN);
}
super.onComponentTag(tag);
}
| protected void onComponentTag(final ComponentTag tag)
{
if (tag.isOpenClose())
{
this.wasOpenCloseTag = true;
// Convert <span wicket:id="myPanel" /> into
// <span wicket:id="myPanel">...</span>
tag.setType(XmlTag.Type.OPEN);
}
super.onComponentTag(tag);
}
|
protected void onComponentTag(ComponentTag tag)
{
// Convert <wicket:message /> into
// <wicket:message>...</wicket:message>
if (tag.isOpenClose())
{
tag.setType(XmlTag.OPEN);
}
super.onComponentTag(tag);
}
}
| protected void onComponentTag(ComponentTag tag)
{
// Convert <wicket:message /> into
// <wicket:message>...</wicket:message>
if (tag.isOpenClose())
{
tag.setType(XmlTag.Type.OPEN);
}
super.onComponentTag(tag);
}
}
|
public OpenJPAConfigurationImpl(boolean derivations, boolean loadGlobals) {
super(false);
String[] aliases;
classResolverPlugin = addPlugin("ClassResolver", true);
aliases =
new String[] { "default",
"org.apache.openjpa.util.ClassResolverImpl",
... | public OpenJPAConfigurationImpl(boolean derivations, boolean loadGlobals) {
super(false);
String[] aliases;
classResolverPlugin = addPlugin("ClassResolver", true);
aliases =
new String[] { "default",
"org.apache.openjpa.util.ClassResolverImpl",
... |
package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... | package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... |
package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... | package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... |
package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... | package org.apache.wicket.jmx;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version ... |
public void testCreateBook_validateFail() throws Exception
{
MyMockApplication tester = new MyMockApplication();
Session.get().setLocale(Locale.US); // fix locale
tester.startPage(CreateBook.class);
FormTester formTester = tester.newFormTester("createForm");
formTester.setValue("id", "");
formTester.set... | public void testCreateBook_validateFail() throws Exception
{
MyMockApplication tester = new MyMockApplication();
Session.get().setLocale(Locale.US); // fix locale
tester.startPage(CreateBook.class);
FormTester formTester = tester.newFormTester("createForm");
formTester.setValue("id", "");
formTester.set... |
public void addHeader(String name, String value)
{
// be lenient and strip leading / trailing blanks
value = Args.notEmpty(value, "value").trim();
internalAdd(name, value);
}
| public void addHeader(String name, String value)
{
// be lenient and strip leading / trailing blanks
value = Args.notNull(value, "value").trim();
internalAdd(name, value);
}
|
protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, getLocalID() + "." + msg); //$NON-NLS-1$
}
| protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.CONNECTION, getLocalID() + "." + msg); //$NON-NLS-1$
}
|
protected void trace(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, msg + ":" + container.getID()); //$NON-NLS-1$
}
| protected void trace(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.SHAREDOBJECTCONTEXT, msg + ":" + container.getID()); //$NON-NLS-1$
}
|
protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, msg + ":" + container.getID()); //$NON-NLS-1$
}
| protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.SHAREDOBJECTMANAGER, msg + ":" + container.getID()); //$NON-NLS-1$
}
|
protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, "SOWrapper:oID=" + sharedObjectID + ":" + msg + ":cID=" + container.getID()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
| protected void debug(String msg) {
Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.SHAREDOBJECTWRAPPER, msg + ":oID=" + sharedObjectID + ":cID=" + container.getID()); //$NON-NLS-1$ //$NON-NLS-2$
}
|
protected Result execute(StoreContext ctx, JDBCStore store,
JDBCFetchConfiguration fetch, int lockLevel)
throws SQLException {
boolean forUpdate = false;
if (!isAggregate() && _grouping == null) {
JDBCLockManager lm = store.getLockManager();
if (lm != null)
... | protected Result execute(StoreContext ctx, JDBCStore store,
JDBCFetchConfiguration fetch, int lockLevel)
throws SQLException {
boolean forUpdate = false;
if (!isAggregate() && _grouping == null) {
JDBCLockManager lm = store.getLockManager();
if (lm != null)
... |
public void valueUnbound(HttpSessionBindingEvent event)
{
// will happen when the session gets invalidated or a timeout.
String id = event.getSession().getId();
Application application = getApplication();
if(application instanceof WebApplication)
{
((WebApplication)application).sessionDestroyed(id);
}
... | public void valueUnbound(HttpSessionBindingEvent event)
{
// will happen when the session gets invalidated or a timeout.
String id = getSessionStore().getId();
Application application = getApplication();
if(application instanceof WebApplication)
{
((WebApplication)application).sessionDestroyed(id);
}
... |
public Java15ReflectionBasedReferenceTypeDelegate() {}
@Override
public void initialize(ReferenceType aType, Class aClass, ClassLoader classLoader, World aWorld) {
super.initialize(aType, aClass, classLoader, aWorld);
myType = AjTypeSystem.getAjType(aClass);
annotationFinder = new Java15AnnotationFinder();
... | public Java15ReflectionBasedReferenceTypeDelegate() {}
@Override
public void initialize(ReferenceType aType, Class aClass, ClassLoader classLoader, World aWorld) {
super.initialize(aType, aClass, classLoader, aWorld);
myType = AjTypeSystem.getAjType(aClass);
annotationFinder = new Java15AnnotationFinder();
... |
public Pointcut concretize1(ResolvedTypeX searchStart, IntMap bindings) {
if (concretizing) {
Thread.currentThread().dumpStack();
searchStart.getWorld().getMessageHandler().handleMessage(
MessageUtil.error("circular pointcut declaration involving: " + this,
getSourceLocation()));
return Pointcu... | public Pointcut concretize1(ResolvedTypeX searchStart, IntMap bindings) {
if (concretizing) {
Thread.currentThread().dumpStack();
searchStart.getWorld().getMessageHandler().handleMessage(
MessageUtil.error("circular pointcut declaration involving: " + this,
getSourceLocation()));
return Pointcu... |
private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog)
throws BuildException {
if(perm != null) {
log("Permissions ignored when running in forked mode!", Project.MSG_WARN);
}
CommandlineJava cmd = (CommandlineJava) commandline.clone();
cmd.setCla... | private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog)
throws BuildException {
if(perm != null) {
log("Permissions ignored when running in forked mode!", Project.MSG_WARN);
}
CommandlineJava cmd = (CommandlineJava) commandline.clone();
cmd.setCla... |
public String toString () {
String string = "*Disposed*"; //$NON-NLS-1$
if (!isDisposed ()) {
string = "*Wrong Thread*"; //$NON-NLS-1$
if (isValidThread ()) string = getNameText ();
}
return getName () + " {" + string + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
LRESULT wmCaptureChanged (int hwnd, int wParam, int lPar... | public String toString () {
String string = "*Disposed*"; //$NON-NLS-1$
if (!isDisposed ()) {
string = "*Wrong Thread*"; //$NON-NLS-1$
if (isValidThread ()) string = getNameText ();
}
return getName () + " {" + string + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
LRESULT wmCaptureChanged (int hwnd, int wParam, int lPar... |
public String getRelativePath(HttpServletRequest request)
{
String path = request.getRequestURI();
String contextPath = request.getContextPath();
path = path.substring(contextPath.length());
if (servletMode)
{
String servletPath = request.getServletPath();
path = path.substring(servletPath.length());
... | public String getRelativePath(HttpServletRequest request)
{
String path = Strings.stripJSessionId(request.getRequestURI());
String contextPath = request.getContextPath();
path = path.substring(contextPath.length());
if (servletMode)
{
String servletPath = request.getServletPath();
path = path.substrin... |
protected final String exceptionMessage(final String message)
{
return toString() + " : " + message;
}
| protected final String exceptionMessage(final String message)
{
return message + ": \n" + toString();
}
|
protected final void setMarkupStream(final MarkupStream markupStream)
{
this.markupStream = markupStream;
}
/**
* This method allows a component to be added by an auto-resolver such as
* AutoComponentResolver or AutoLinkResolver. While the component is being
* added, the component's FLAG_AUTO boolean is se... | protected final void setMarkupStream(final MarkupStream markupStream)
{
this.markupStream = markupStream;
}
/**
* This method allows a component to be added by an auto-resolver such as
* AutoComponentResolver or AutoLinkResolver. While the component is being
* added, the component's FLAG_AUTO boolean is se... |
public Object component(final Component component)
{
// If component never rendered
if ((renderedComponents == null) || !renderedComponents.contains(component))
{
// Throw exception
throw new WicketRuntimeException(component
.exceptionMessage("Component never rendered. You probably fa... | public Object component(final Component component)
{
// If component never rendered
if ((renderedComponents == null) || !renderedComponents.contains(component))
{
// Throw exception
throw new WicketRuntimeException(component
.exceptionMessage("Component never rendered. You probably fa... |
public boolean execute()
throws TaskException
{
getLogger().debug( "Using classic compiler" );
Commandline cmd = setupJavacCommand( true );
OutputStream logstr = new LogOutputStream( m_attributes.hackGetLogger(), true );
try
{
// Create an instance of... | public boolean execute()
throws TaskException
{
getLogger().debug( "Using classic compiler" );
Commandline cmd = setupJavacCommand( true );
OutputStream logstr = new LogOutputStream( getLogger(), true );
try
{
// Create an instance of the compiler, re... |
public static void inlineMethod(
LazyMethodGen donor,
LazyMethodGen recipient,
InstructionHandle call)
{
// assert recipient.contains(call)
/* Implementation notes:
*
* We allocate two slots for every tempvar so we don't screw up
* longs and doubles which may share space. This could be conse... | public static void inlineMethod(
LazyMethodGen donor,
LazyMethodGen recipient,
InstructionHandle call)
{
// assert recipient.contains(call)
/* Implementation notes:
*
* We allocate two slots for every tempvar so we don't screw up
* longs and doubles which may share space. This could be conse... |
public void packBody(MethodGen gen) {
HashMap map = new HashMap();
InstructionList fresh = gen.getInstructionList();
/* Make copies of all instructions, append them to the new list
* and associate old instruction references with the new ones, i.e.,
* a 1:1 mapping.... | public void packBody(MethodGen gen) {
HashMap map = new HashMap();
InstructionList fresh = gen.getInstructionList();
/* Make copies of all instructions, append them to the new list
* and associate old instruction references with the new ones, i.e.,
* a 1:1 mapping.... |
public String toString() {
return shadow.toString();
}
void extractInstructionsInto(LazyMethodGen freshMethod, IntMap remap, boolean addReturn) {
LazyMethodGen.assertGoodBody(getBody(), toString());
freshMethod.assertGoodBody();
InstructionList freshBody = freshMethod.getBody();
... | public String toString() {
return shadow.toString();
}
void extractInstructionsInto(LazyMethodGen freshMethod, IntMap remap, boolean addReturn) {
LazyMethodGen.assertGoodBody(getBody(), toString());
freshMethod.assertGoodBody();
InstructionList freshBody = freshMethod.getBody();
... |
private XSSimpleType traverseSimpleTypeDecl(Element simpleTypeDecl,
Object[] attrValues,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar) {
// get name and final v... | private XSSimpleType traverseSimpleTypeDecl(Element simpleTypeDecl,
Object[] attrValues,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar) {
// get name and final v... |
public void layout (Control [] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... | public void layout (Control [] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... |
public FieldBinding getField(
SourceTypeBinding sourceTypeBinding,
char[] fieldName,
InvocationSite site,
Scope scope)
{
FieldBinding retField = sourceTypeBinding.getFieldBase(fieldName, false); // XXX may need to get the correct value for second parameter in the future
if (interTypeFields.isEmpty()) ret... | public FieldBinding getField(
SourceTypeBinding sourceTypeBinding,
char[] fieldName,
InvocationSite site,
Scope scope)
{
FieldBinding retField = sourceTypeBinding.getFieldBase(fieldName, true); // XXX may need to get the correct value for second parameter in the future (see #55341)
if (interTypeFields.is... |
public void select(Select sel, int idx) {
ClassMapping elem = (elems.length == 0) ? null : elems[idx];
resJoins[idx] = selectAll(sel, elem, sm, store, fetch,
JDBCFetchConfiguration.EAGER_PARALLEL);
}
});
// create proxy
... | public void select(Select sel, int idx) {
ClassMapping elem = (elems.length == 0) ? null : elems[idx];
resJoins[idx] = selectAll(sel, elem, sm, store, fetch,
JDBCFetchConfiguration.EAGER_PARALLEL);
}
});
// create proxy
... |
public TextLayout (Device device) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
wrapWidth = ascent = descent = -1;
lineSpacing = 0;
orientation = SWT.LEFT_TO_RIGHT;
XFontStruct fontStruct = getFontHeigth(device.getSystemFont());
... | public TextLayout (Device device) {
if (device == null) device = Device.getDevice();
if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
this.device = device;
wrapWidth = ascent = descent = -1;
lineSpacing = 0;
orientation = SWT.LEFT_TO_RIGHT;
XFontStruct fontStruct = getFontHeigth(device.getSystemFont());
... |
public void XtestRootFilesInIndex() throws IOException {
ZipFile archive = null;
try {
executeTarget("testIndexTests");
archive = new ZipFile(getProject().resolveFile(tempJar));
ZipEntry ze = archive.getEntry("META-INF/INDEX.LIST");
InputStream is = ar... | public void testRootFilesInIndex() throws IOException {
ZipFile archive = null;
try {
executeTarget("testIndexTests");
archive = new ZipFile(getProject().resolveFile(tempJar));
ZipEntry ze = archive.getEntry("META-INF/INDEX.LIST");
InputStream is = arc... |
public interface IChangeListener
/*
* 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, Versio... | public interface IChangeListener
/*
* 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, Versio... |
public final boolean add(final IModifiable modifiable, final IChangeListener listener)
{
// Look up entry for modifiable
final Entry entry = modifiableToEntry.get(modifiable);
// Found it?
if (entry == null)
{
Time lastModifiedTime = modifiable.lastModifiedTime();
if (lastModifiedTime != null)
{
... | public final boolean add(final IModifiable modifiable, final IChangeListener listener)
{
// Look up entry for modifiable
final Entry entry = modifiableToEntry.get(modifiable);
// Found it?
if (entry == null)
{
Time lastModifiedTime = modifiable.lastModifiedTime();
if (lastModifiedTime != null)
{
... |
public static Object create(IMemento memento) {
String source = memento.getString(SOURCEPLUGIN);
String message = memento.getString(MESSAGE);
int severity = memento.getInteger(SEVERITY).intValue();
int hint = memento.getInteger(HINT).intValue();
boolean wrapped = Boolean.getBoolean(memento.getString(WR... | public static Object create(IMemento memento) {
String source = memento.getString(SOURCEPLUGIN);
String message = memento.getString(MESSAGE);
int severity = memento.getInteger(SEVERITY).intValue();
int hint = memento.getInteger(HINT).intValue();
boolean wrapped = new Boolean(memento.getString(WRAPPED))... |
public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... | public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... |
public void XtestStackTraceLineBreaks() throws Exception {
expectReportWithText("testStackTraceLineBreaks", null);
FileReader r = null;
try {
r = new FileReader(new File(System.getProperty("root"),
"src/etc/testcases/taskdefs/optional/junit... | public void testStackTraceLineBreaks() throws Exception {
expectReportWithText("testStackTraceLineBreaks", null);
FileReader r = null;
try {
r = new FileReader(new File(System.getProperty("root"),
"src/etc/testcases/taskdefs/optional/junitr... |
protected Reader getReader(XMLInputSource source) throws IOException {
if (source.getCharacterStream() != null) {
return source.getCharacterStream();
}
else {
InputStream stream = null;
String encoding = source.getEncoding();
if (encoding == n... | protected Reader getReader(XMLInputSource source) throws IOException {
if (source.getCharacterStream() != null) {
return source.getCharacterStream();
}
else {
InputStream stream = null;
String encoding = source.getEncoding();
if (encoding == n... |
public TreeRow(String componentName, Tree tree, NodeModel nodeModel)
{
super(componentName);
if(nodeModel != null)
{
TreeNodeLink link = new TreeNodeLink("link", tree, nodeModel);
link.add(new Label("label", String.valueOf(nodeModel.getUserObject())));
... | public TreeRow(String componentName, Tree tree, TreeNodeModel nodeModel)
{
super(componentName);
if(nodeModel != null)
{
TreeNodeLink link = new TreeNodeLink("link", tree, nodeModel);
link.add(new Label("label", String.valueOf(nodeModel.getUserObject())));
... |
private static ResourceReference getYuiLoader()
{
if (YUILOADER == null)
{
StringBuffer sb = new StringBuffer();
sb.append("yuiloader");
if (Application.get().usesDeploymentConfig())
{
sb.append("-min");
}
sb.append(".js");
YUILOADER = new CompressedResourceReference(YuiLib.class, sb.toSt... | private static ResourceReference getYuiLoader()
{
if (YUILOADER == null)
{
StringBuilder sb = new StringBuilder();
sb.append("yuiloader");
if (Application.get().usesDeploymentConfig())
{
sb.append("-min");
}
sb.append(".js");
YUILOADER = new CompressedResourceReference(YuiLib.class, sb.to... |
protected String getValue(String input)
{
if (Strings.isEmpty(input))
{
return "";
}
StringBuffer buffer = new StringBuffer();
Locale[] locales = Locale.getAvailableLocales();
for (int i = 0; i < locales.length; i++)
{
final Locale locale = locales[i];
final String country = locale.getDispla... | protected String getValue(String input)
{
if (Strings.isEmpty(input))
{
return "";
}
StringBuilder buffer = new StringBuilder();
Locale[] locales = Locale.getAvailableLocales();
for (int i = 0; i < locales.length; i++)
{
final Locale locale = locales[i];
final String country = locale.getDisp... |
private String listAsString(List<String> list)
{
StringBuffer b = new StringBuffer();
for (Iterator<String> i = list.iterator(); i.hasNext();)
{
b.append(i.next());
if (i.hasNext())
{
b.append(", ");
}
}
return b.toString();
}
}
| private String listAsString(List<String> list)
{
StringBuilder b = new StringBuilder();
for (Iterator<String> i = list.iterator(); i.hasNext();)
{
b.append(i.next());
if (i.hasNext())
{
b.append(", ");
}
}
return b.toString();
}
}
|
public String toString()
{
StringBuffer b = new StringBuffer();
b.append("[TestInputObject stringProperty = '")
| public String toString()
{
StringBuilder b = new StringBuilder();
b.append("[TestInputObject stringProperty = '")
|
public String asString(final boolean hideUnguessed)
{
final StringBuffer buffer = new StringBuffer();
for (Letter letter : letters)
{
if (hideUnguessed)
{
buffer.append(letter.isGuessed() ? letter.asString() : "_");
}
else
{
buffer.append(letter.asString());
}
}
return buffer.toStr... | public String asString(final boolean hideUnguessed)
{
final StringBuilder buffer = new StringBuilder();
for (Letter letter : letters)
{
if (hideUnguessed)
{
buffer.append(letter.isGuessed() ? letter.asString() : "_");
}
else
{
buffer.append(letter.asString());
}
}
return buffer.toS... |
public String getObject()
{
TimeZone timeZone = properties.getTimeZone();
if (timeZone != null)
{
Calendar cal = Calendar.getInstance(timeZone);
Locale locale = getLocale();
DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.LONG, locale);
String calAsString = dateFormat... | public String getObject()
{
TimeZone timeZone = properties.getTimeZone();
if (timeZone != null)
{
Calendar cal = Calendar.getInstance(timeZone);
Locale locale = getLocale();
DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.LONG, locale);
String calAsString = dateFormat... |
private String join(List<org.apache.wicket.util.string.StringValue> values)
{
StringBuffer sb = new StringBuffer();
for (org.apache.wicket.util.string.StringValue sv : values)
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(sv.toString());
}
return sb.toString();
}
| private String join(List<org.apache.wicket.util.string.StringValue> values)
{
StringBuilder sb = new StringBuilder();
for (org.apache.wicket.util.string.StringValue sv : values)
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(sv.toString());
}
return sb.toString();
}
|
private String generatePhoneNumber()
{
return new StringBuffer().append(rint(2, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.append("-555-")
.append(rint(1, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.toString();
}
| private String generatePhoneNumber()
{
return new StringBuilder().append(rint(2, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.append("-555-")
.append(rint(1, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.append(rint(0, 9))
.toString();
}
|
public String getObject()
{
// name contains the name of the selected file
if (Strings.isEmpty(name) &&
Strings.isEmpty(getPage().getRequest()
.getRequestParameters()
.getParameterValue(SOURCE)
.toOptionalString()))
{
return "";
}
BufferedReader br = null;
String source = nu... | public String getObject()
{
// name contains the name of the selected file
if (Strings.isEmpty(name) &&
Strings.isEmpty(getPage().getRequest()
.getRequestParameters()
.getParameterValue(SOURCE)
.toOptionalString()))
{
return "";
}
BufferedReader br = null;
String source = nu... |
private String generatePhoneNumber()
{
return new StringBuffer().append(rint(2, 9)).append(rint(0, 9)).append(rint(0, 9)).append(
"-555-").append(rint(1, 9)).append(rint(0, 9)).append(rint(0, 9))
.append(rint(0, 9)).toString();
}
| private String generatePhoneNumber()
{
return new StringBuilder().append(rint(2, 9)).append(rint(0, 9)).append(rint(0, 9)).append(
"-555-").append(rint(1, 9)).append(rint(0, 9)).append(rint(0, 9))
.append(rint(0, 9)).toString();
}
|
protected String buildJSCall(String funcName)
{
return new StringBuffer(funcName).append("('")
.append(getChoicesComponent().getMarkupId())
.append("','")
.append(getSelectionComponent().getMarkupId())
.append("','")
.append(getRecorderComponent().getMarkupId())
.append("');")
.toString();
}
| protected String buildJSCall(String funcName)
{
return new StringBuilder(funcName).append("('")
.append(getChoicesComponent().getMarkupId())
.append("','")
.append(getSelectionComponent().getMarkupId())
.append("','")
.append(getRecorderComponent().getMarkupId())
.append("');")
.toString();
}
|
private void initIds()
{
// construct the model string based on selection collection
IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
StringBuffer modelStringBuffer = new StringBuffer();
Collection<T> modelCollection = getPalette().getModelCollection();
if (modelCollection == null)
{
thr... | private void initIds()
{
// construct the model string based on selection collection
IChoiceRenderer<T> renderer = getPalette().getChoiceRenderer();
StringBuilder modelStringBuffer = new StringBuilder();
Collection<T> modelCollection = getPalette().getModelCollection();
if (modelCollection == null)
{
t... |
public String toString()
{
return new StringBuffer().append("[SortParam property=").append(getProperty()).append(
" ascending=").append(asc).append("]").toString();
}
| public String toString()
{
return new StringBuilder().append("[SortParam property=").append(getProperty()).append(
" ascending=").append(asc).append("]").toString();
}
|
public String decode(String s, String enc)
{
if (s == null)
{
return null;
}
boolean needToChange = false;
int numChars = s.length();
StringBuffer sb = new StringBuffer(numChars > 500 ? numChars / 2 : numChars);
int i = 0;
if (enc.length() == 0)
{
throw new RuntimeException(new UnsupportedEn... | public String decode(String s, String enc)
{
if (s == null)
{
return null;
}
boolean needToChange = false;
int numChars = s.length();
StringBuilder sb = new StringBuilder(numChars > 500 ? numChars / 2 : numChars);
int i = 0;
if (enc.length() == 0)
{
throw new RuntimeException(new Unsupported... |
public String encode(String s, String enc)
{
boolean needToChange = false;
StringBuffer out = new StringBuffer(s.length());
Charset charset;
CharArrayWriter charArrayWriter = new CharArrayWriter();
if (enc == null)
{
throw new NullPointerException("charsetName");
}
try
{
charset = Charset.fo... | public String encode(String s, String enc)
{
boolean needToChange = false;
StringBuilder out = new StringBuilder(s.length());
Charset charset;
CharArrayWriter charArrayWriter = new CharArrayWriter();
if (enc == null)
{
throw new NullPointerException("charsetName");
}
try
{
charset = Charset.... |
public String toString()
{
StringBuffer buf = new StringBuffer("[");
PathNode node = this;
while (node != null)
{
buf.append("(");
buf.append(Integer.toString(node.i));
buf.append(",");
buf.append(Integer.toString(node.j));
buf.append(")");
node = node.prev;
}
buf.append("]");
return b... | public String toString()
{
StringBuilder buf = new StringBuilder("[");
PathNode node = this;
while (node != null)
{
buf.append("(");
buf.append(Integer.toString(node.i));
buf.append(",");
buf.append(Integer.toString(node.j));
buf.append(")");
node = node.prev;
}
buf.append("]");
return... |
public static String readString(final Reader in) throws IOException
{
final StringBuffer buffer = new StringBuffer(2048);
int value;
while ((value = in.read()) != -1)
{
buffer.append((char)value);
}
return buffer.toString();
}
| public static String readString(final Reader in) throws IOException
{
final StringBuilder buffer = new StringBuilder(2048);
int value;
while ((value = in.read()) != -1)
{
buffer.append((char)value);
}
return buffer.toString();
}
|
private void failIncorrectLicenceHeaders(Map<ILicenseHeaderHandler, List<File>> files)
{
if (files.size() > 0)
{
StringBuffer failString = new StringBuffer();
for (Entry<ILicenseHeaderHandler, List<File>> entry : files.entrySet())
{
ILicenseHeaderHandler licenseHeaderHandler = entry.getKey();
Li... | private void failIncorrectLicenceHeaders(Map<ILicenseHeaderHandler, List<File>> files)
{
if (files.size() > 0)
{
StringBuilder failString = new StringBuilder();
for (Entry<ILicenseHeaderHandler, List<File>> entry : files.entrySet())
{
ILicenseHeaderHandler licenseHeaderHandler = entry.getKey();
... |
public String toString()
{
if (pattern != null)
{
return pattern.pattern();
}
else
{
final StringBuffer buffer = new StringBuffer();
for (int i = 0; i < patterns.size(); i++)
{
buffer.append(patterns.get(i));
}
return buffer.toString();
}
}
| public String toString()
{
if (pattern != null)
{
return pattern.pattern();
}
else
{
final StringBuilder buffer = new StringBuilder();
for (int i = 0; i < patterns.size(); i++)
{
buffer.append(patterns.get(i));
}
return buffer.toString();
}
}
|
public String toString()
{
// Result buffer
final StringBuffer buffer = new StringBuffer();
// For each occurrences of "${"or "$$"
int start;
int pos = 0;
while ((start = lowerPositive(string.indexOf("$$", pos), string.indexOf("${", pos))) != -1)
{
// Append text before possible variable
buffer.... | public String toString()
{
// Result buffer
final StringBuilder buffer = new StringBuilder();
// For each occurrences of "${"or "$$"
int start;
int pos = 0;
while ((start = lowerPositive(string.indexOf("$$", pos), string.indexOf("${", pos))) != -1)
{
// Append text before possible variable
buffe... |
public String toString()
{
StringBuffer sbTemp = new StringBuffer();
sbTemp.append("boundary='");
for (byte b : boundary)
{
if (Character.isDefined(b))
{
sbTemp.append((char)b);
}
else
{
sbTemp.append("#");
sbTemp.append(b);
sbTemp.append(";");
}
}
sbTemp.append("'; bufSi... | public String toString()
{
StringBuilder sbTemp = new StringBuilder();
sbTemp.append("boundary='");
for (byte b : boundary)
{
if (Character.isDefined(b))
{
sbTemp.append((char)b);
}
else
{
sbTemp.append("#");
sbTemp.append(b);
sbTemp.append(";");
}
}
sbTemp.append("'; buf... |
public String toString()
{
final StringBuffer buffer = new StringBuffer();
boolean first = true;
for (Map.Entry<String, Object> entry : entrySet())
{
if (first == false)
{
buffer.append(' ');
}
first = false;
buffer.append(entry.getKey());
buffer.append(" = \"");
final Object value =... | public String toString()
{
final StringBuilder buffer = new StringBuilder();
boolean first = true;
for (Map.Entry<String, Object> entry : entrySet())
{
if (first == false)
{
buffer.append(' ');
}
first = false;
buffer.append(entry.getKey());
buffer.append(" = \"");
final Object value... |
private String getWebXml(String filter, String url)
{
StringBuffer webxml = new StringBuffer();
webxml.append("<web-app>");
webxml.append("<" + filter + ">");
webxml.append(" <" + filter + "-name>HelloWorldApplication</" + filter + "-name>");
webxml.append(" <" + filter + "-class>org.apache.wicket.protocol.... | private String getWebXml(String filter, String url)
{
StringBuilder webxml = new StringBuilder();
webxml.append("<web-app>");
webxml.append("<" + filter + ">");
webxml.append(" <" + filter + "-name>HelloWorldApplication</" + filter + "-name>");
webxml.append(" <" + filter + "-class>org.apache.wicket.protoco... |
public final IResourceStream getMarkupResourceStream(MarkupContainer container,
Class< ? > containerClass)
{
Reader reader = getTemplateReader();
if (reader == null)
{
throw new WicketRuntimeException("could not find velocity template for panel: " + this);
}
// evaluate the template and return a new ... | public final IResourceStream getMarkupResourceStream(MarkupContainer container,
Class< ? > containerClass)
{
Reader reader = getTemplateReader();
if (reader == null)
{
throw new WicketRuntimeException("could not find velocity template for panel: " + this);
}
// evaluate the template and return a new ... |
public String toString(final boolean detailed)
{
final StringBuffer buffer = new StringBuffer();
buffer.append("[" + this.getClass().getSimpleName() + " ");
buffer.append(super.toString(detailed));
if (detailed)
{
if (getMarkupStream() != null)
{
buffer.append(", markupStream = " + getMarkupStream... | public String toString(final boolean detailed)
{
final StringBuilder buffer = new StringBuilder();
buffer.append("[" + this.getClass().getSimpleName() + " ");
buffer.append(super.toString(detailed));
if (detailed)
{
if (getMarkupStream() != null)
{
buffer.append(", markupStream = " + getMarkupStre... |
public String toHtmlDebugString()
{
final StringBuffer buffer = new StringBuffer();
for (int i = 0; i < markup.size(); i++)
{
if (i == currentIndex)
{
buffer.append("<font color = \"red\">");
}
final MarkupElement element = markup.get(i);
buffer.append(Strings.escapeMarkup(element.toString... | public String toHtmlDebugString()
{
final StringBuilder buffer = new StringBuilder();
for (int i = 0; i < markup.size(); i++)
{
if (i == currentIndex)
{
buffer.append("<font color = \"red\">");
}
final MarkupElement element = markup.get(i);
buffer.append(Strings.escapeMarkup(element.toStri... |
public void error(IValidationError error)
{
if (error == null)
{
throw new IllegalArgumentException("Argument [[error]] cannot be null");
}
MessageSource source = new MessageSource();
String message = error.getErrorMessage(source);
if (message == null)
{
StringBuffer buffer = new StringBuffer();
... | public void error(IValidationError error)
{
if (error == null)
{
throw new IllegalArgumentException("Argument [[error]] cannot be null");
}
MessageSource source = new MessageSource();
String message = error.getErrorMessage(source);
if (message == null)
{
StringBuilder buffer = new StringBuilder()... |
protected final String getTriggerJavaScript()
{
if (getForm() != null)
{
// find the root form - the one we are really going to submit
Form<?> root = getForm().getRootForm();
StringBuffer sb = new StringBuffer(100);
sb.append("var e=document.getElementById('");
sb.append(root.getHiddenFieldId());
... | protected final String getTriggerJavaScript()
{
if (getForm() != null)
{
// find the root form - the one we are really going to submit
Form<?> root = getForm().getRootForm();
StringBuilder sb = new StringBuilder(100);
sb.append("var e=document.getElementById('");
sb.append(root.getHiddenFieldId());... |
private String importRelativeUrl(CharSequence url)
{
// make the url absolute
HttpServletRequest req = ((ServletWebRequest)getRequest()).getHttpServletRequest();
StringBuffer buildUrl = new StringBuffer(url.length());
String scheme = req.getScheme();
int port = req.getServerPort();
buildUrl.append(scheme)... | private String importRelativeUrl(CharSequence url)
{
// make the url absolute
HttpServletRequest req = ((ServletWebRequest)getRequest()).getHttpServletRequest();
StringBuilder buildUrl = new StringBuilder(url.length());
String scheme = req.getScheme();
int port = req.getServerPort();
buildUrl.append(schem... |
private String polygonCoordinates(int... coordinates)
{
final StringBuffer buffer = new StringBuffer();
for (int i = 0; i < coordinates.length; i++)
{
buffer.append(coordinates[i]);
if (i < (coordinates.length - 1))
{
buffer.append(',');
}
}
return buffer.toString();
}
| private String polygonCoordinates(int... coordinates)
{
final StringBuilder buffer = new StringBuilder();
for (int i = 0; i < coordinates.length; i++)
{
buffer.append(coordinates[i]);
if (i < (coordinates.length - 1))
{
buffer.append(',');
}
}
return buffer.toString();
}
|
public String getPopupJavaScript()
{
String windowTitle = windowName;
if (windowTitle == null)
{
windowTitle = "";
}
else
{
// Fix for IE bug.
windowTitle = windowTitle.replaceAll("\\W", "_");
}
StringBuffer script = new StringBuffer("var w = window.open(" + target + ", '").append(
windo... | public String getPopupJavaScript()
{
String windowTitle = windowName;
if (windowTitle == null)
{
windowTitle = "";
}
else
{
// Fix for IE bug.
windowTitle = windowTitle.replaceAll("\\W", "_");
}
StringBuilder script = new StringBuilder("var w = window.open(" + target + ", '").append(
win... |
public String toString()
{
StringBuffer sb = new StringBuffer("Model:classname=[");
sb.append(getClass().getName()).append("]");
return sb.toString();
}
| public String toString()
{
StringBuilder sb = new StringBuilder("Model:classname=[");
sb.append(getClass().getName()).append("]");
return sb.toString();
}
|
public String toString()
{
StringBuffer sb = new StringBuffer(super.toString());
sb.append(":attached=").append(attached).append(":tempModelObject=[").append(
this.transientModelObject).append("]");
return sb.toString();
}
| public String toString()
{
StringBuilder sb = new StringBuilder(super.toString());
sb.append(":attached=").append(attached).append(":tempModelObject=[").append(
this.transientModelObject).append("]");
return sb.toString();
}
|
public String toString()
{
StringBuffer sb = new StringBuffer("Model:classname=[");
sb.append(getClass().getName()).append("]");
sb.append(":object=[").append(object).append("]");
return sb.toString();
}
| public String toString()
{
StringBuilder sb = new StringBuilder("Model:classname=[");
sb.append(getClass().getName()).append("]");
sb.append(":object=[").append(object).append("]");
return sb.toString();
}
|
public String toString()
{
StringBuffer sb = new StringBuffer(super.toString());
sb.append(":expression=[").append(expression).append("]");
return sb.toString();
}
| public String toString()
{
StringBuilder sb = new StringBuilder(super.toString());
sb.append(":expression=[").append(expression).append("]");
return sb.toString();
}
|
public String toString()
{
StringBuffer b = new StringBuffer();
Field[] fields = ClientProperties.class.getDeclaredFields();
for (int i = 0; i < fields.length; i++)
{
Field field = fields[i];
// Ignore these fields
if (field.getName().equals("serialVersionUID") == false &&
field.getName().star... | public String toString()
{
StringBuilder b = new StringBuilder();
Field[] fields = ClientProperties.class.getDeclaredFields();
for (int i = 0; i < fields.length; i++)
{
Field field = fields[i];
// Ignore these fields
if (field.getName().equals("serialVersionUID") == false &&
field.getName().st... |
public static String asLined(final Collection<?> objects)
{
StringBuffer lined = new StringBuffer();
for (Iterator<?> iter = objects.iterator(); iter.hasNext();)
| public static String asLined(final Collection<?> objects)
{
StringBuilder lined = new StringBuilder();
for (Iterator<?> iter = objects.iterator(); iter.hasNext();)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.