buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected void onSubmit()
{
fileUpload = fileUploadField.getFileUpload();
}
};
add(form);
form.setMultiPart(true);
form.setMaxSize(Bytes.kilobytes(100));
form.add(new TextField<String>("text"));
fileUploadField = new FileUploadField("file", new Model<FileUpload>());
StringValue requiredParam ... | protected void onSubmit()
{
fileUpload = fileUploadField.getFileUpload();
}
};
add(form);
form.setMultiPart(true);
form.setMaxSize(Bytes.kilobytes(100));
form.add(new TextField<String>("text"));
fileUploadField = new FileUploadField("file", new Model<FileUpload>());
StringValue requiredParam ... |
public MockPageParameterPage(PageParameters pageParameters)
{
add(new BookmarkablePageLink("link", MockPageParameterPage.class,
new PageParameters("id=1")));
add(new Label("label", pageParameters.getNamedParameter("id").toString()));
}
| public MockPageParameterPage(PageParameters pageParameters)
{
add(new BookmarkablePageLink("link", MockPageParameterPage.class,
new PageParameters("id=1")));
add(new Label("label", pageParameters.get("id").toString()));
}
|
public void init(String [] args) throws Exception {
serverName = TCPServerSOContainer.getDefaultServerURL();
if (args.length > 0) {
if (!args[0].equals("-")) serverName = args[0]; //$NON-NLS-1$
}
if (args.length > 1) {
sharedObjectClassNames = new String[args.length - 1];
for (int i = 0; i < args.leng... | public void init(String [] args) throws Exception {
serverName = TCPServerSOContainer.getDefaultServerURL();
if (args.length > 0) {
if (!args[0].equals("-")) serverName = args[0]; //$NON-NLS-1$
}
if (args.length > 1) {
sharedObjectClassNames = new String[args.length - 1];
for (int i = 0; i < args.leng... |
public AjBuildConfig( ) {
javaOptions.put(
CompilerOptions.OPTION_LocalVariableAttribute,
//CompilerOptions.DO_NOT_GENERATE);
CompilerOptions.GENERATE);
javaOptions.put(
CompilerOptions.OPTION_LineNumberAttribute,
//CompilerOptions.DO_NOT_GENERATE);
CompilerOptions.GENERATE);
javaOptions.put(
... | public AjBuildConfig( ) {
javaOptions.put(
CompilerOptions.OPTION_LocalVariableAttribute,
//CompilerOptions.DO_NOT_GENERATE);
CompilerOptions.GENERATE);
javaOptions.put(
CompilerOptions.OPTION_LineNumberAttribute,
//CompilerOptions.DO_NOT_GENERATE);
CompilerOptions.GENERATE);
javaOptions.put(
... |
public void appendIndex(SQLBuffer sql, Select sel, Joins joins) {
sql.append(sel.getOrderedColumnAlias(field.getOrderColumn(),
field.getName()));
}
| public void appendIndex(SQLBuffer sql, Select sel, Joins joins) {
sql.append(sel.getColumnAlias(field.getOrderColumn(),
field.getName()));
}
|
public final void configure(final String configurationType)
{
configure(configurationType, "src/java");
}
| public final void configure(final String configurationType)
{
configure(configurationType, (IResourceFinder)null);
}
|
protected boolean startClass(String elem, Attributes attrs)
throws SAXException {
super.startClass(elem, attrs);
if (isMetaDataComplete(attrs)) {
setAnnotationParser(null);
} else if (!_isXMLMappingMetaDataComplete){
resetAnnotationParser();
}
// qu... | protected boolean startClass(String elem, Attributes attrs)
throws SAXException {
super.startClass(elem, attrs);
if (isMetaDataComplete(attrs)) {
setAnnotationParser(null);
} else if (!_isXMLMappingMetaDataComplete){
resetAnnotationParser();
}
// qu... |
protected OpenJPAEntityManagerFactorySPI createNamedEMF(String pu,
Object... props) {
Map map = new HashMap();//System.getProperties());
List<Class> types = new ArrayList<Class>();
boolean prop = false;
boolean fresh = false;
for (int i = 0; i < props.length; i++) {
... | protected OpenJPAEntityManagerFactorySPI createNamedEMF(String pu,
Object... props) {
Map map = new HashMap();//System.getProperties());
List<Class> types = new ArrayList<Class>();
boolean prop = false;
boolean fresh = false;
for (int i = 0; i < props.length; i++) {
... |
public IMarkupFragment getMarkup(final MarkupContainer parent, final Component child)
{
IMarkupFragment markup = parent.getAssociatedMarkup();
if (markup == null)
{
throw new MarkupNotFoundException("Failed to find markup file associated. " +
parent.getClass().getSimpleName() + ": " + parent.toString());... | public IMarkupFragment getMarkup(final MarkupContainer parent, final Component child)
{
IMarkupFragment markup = parent.getAssociatedMarkup();
if (markup == null)
{
throw new MarkupNotFoundException("Failed to find markup file associated. " +
parent.getClass().getSimpleName() + ": " + parent.toString());... |
public void setSelection (int index) {
checkWidget ();
int count = itemCount;
if (!(0 <= index && index < count)) return;
setSelection (index, false, false);
}
void setSelection (int index, boolean notify, boolean force) {
if (index >= itemCount) return;
int currentIndex = getSelectionIndex ();
if (!force && cu... | public void setSelection (int index) {
checkWidget ();
int count = itemCount;
if (!(0 <= index && index < count)) return;
setSelection (index, false, false);
}
void setSelection (int index, boolean notify, boolean force) {
if (!(0 <= index && index < itemCount)) return;
int currentIndex = getSelectionIndex ();
... |
public void testReceiveGzipWithGZFile() throws Exception {
File f = File.createTempFile("foo", "pascal.pack.gz");
FileOutputStream fos = new FileOutputStream(f);
System.out.println(f);
IStatus s = ECFTransport
.getInstance()
.download(
"http://download.eclipse.org/eclipse/updates/3.5-I-builds/plu... | public void testReceiveGzipWithGZFile() throws Exception {
File f = File.createTempFile("foo", "pascal.pack.gz");
FileOutputStream fos = new FileOutputStream(f);
System.out.println(f);
IStatus s = ECFTransport
.getInstance()
.download(
"http://download.eclipse.org/eclipse/updates/3.4/plugins/java... |
public ValidationError setVars(Map<String, Object> vars)
{
if (vars == null)
{
throw new IllegalArgumentException("Argument [[params]] cannot be null");
}
this.vars = vars;
return this;
}
| public ValidationError setVars(Map<String, Object> vars)
{
if (vars == null)
{
throw new IllegalArgumentException("Argument [[vars]] cannot be null");
}
this.vars = vars;
return this;
}
|
public abstract void execute()
throws Exception;
| public abstract void execute()
throws TaskException;
|
private Object evaluate(String extensionFile, String extensionName, Object... params) {
Object retVal = null;
try {
XtendFacade facade = XtendFacade.create(context, extensionFile);
retVal = facade.call(extensionName, params);
}
catch (IllegalArgumentException e) {
// no extension specified
}
catch... | private Object evaluate(String extensionFile, String extensionName, Object... params) {
Object retVal = null;
try {
XtendFacade facade = XtendFacade.create(context, extensionFile);
retVal = facade.call(extensionName, params);
}
catch (IllegalArgumentException e) {
// no extension specified
}
catch... |
private Object locateImage(String iconName, Resource eResource, EObject eObject) throws MalformedURLException,
IOException {
// TODO understand the requirements :)
Object retVal = null;
if (eResource != null) {
URI metaModelURI = eResource.getURI();
URI iconURI = createIconURI(eObject, iconName, metaMod... | private Object locateImage(String iconName, Resource eResource, EObject eObject) throws MalformedURLException,
IOException {
// TODO understand the requirements :)
Object retVal = null;
if (eResource != null) {
URI metaModelURI = eResource.getURI();
URI iconURI = createIconURI(eObject, iconName, metaMod... |
private static final long serialVersionUID = 6802729912091130335L;
Object[] errorSubstText=null;
Element errorElem = null;
ComplexTypeRecoverableError() {
super();
}
ComplexTypeRecoverableError(String msgKey, Object[] args, Element e) {
s... | private static final long serialVersionUID = 6802729912091130335L;
Object[] errorSubstText=null;
Element errorElem = null;
ComplexTypeRecoverableError() {
super();
}
ComplexTypeRecoverableError(String msgKey, Object[] args, Element e) {
s... |
private boolean fIsBuiltIn = false;
XSDSimpleTypeTraverser (XSDHandler handler,
XSAttributeChecker gAttrCheck) {
super(handler, gAttrCheck);
if (schemaFactory instanceof SchemaDVFactoryImpl) {
((SchemaDVFactoryImpl)schemaFactory).setDeclPool(handler.fDeclPool);
... | private boolean fIsBuiltIn = false;
XSDSimpleTypeTraverser (XSDHandler handler,
XSAttributeChecker gAttrCheck) {
super(handler, gAttrCheck);
if (schemaFactory instanceof SchemaDVFactoryImpl) {
((SchemaDVFactoryImpl)schemaFactory).setDeclPool(handler.fDeclPool);
... |
public ClassIntrospectionException(Throwable cause) {
super(cause.toString());
this.cause = cause;
}
| public ClassIntrospectionException(Throwable cause) {
super(cause.getMessage());
this.cause = cause;
}
|
void addTask(Task task) throws ExecutionException;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditi... | void addTask(Task task) throws ExecutionException;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditi... |
public synchronized Class getExecutionTaskClass() throws ClassNotFoundException {
if (taskClass == null) {
taskClass = taskClassLoader.loadClass(taskClassName);
}
return taskClass;
}
| public synchronized Class getExecutionTaskClass() throws ClassNotFoundException {
if (taskClass == null) {
taskClass = Class.forName(taskClassName, true, taskClassLoader);
}
return taskClass;
}
|
public AntException(Throwable cause) {
super(cause.toString());
this.cause = cause;
}
| public AntException(Throwable cause) {
super(cause.getMessage());
this.cause = cause;
}
|
public boolean isMapped() {
return _embedded != Boolean.TRUE;
}
/**
* Return the closest mapped superclass.
*/
public ClassMetaData getMappedPCSuperclassMetaData() {
ClassMetaData sup = getPCSuperclassMetaData();
if (sup == null || sup.isMapped())
return su... | public boolean isMapped() {
return _embedded != Boolean.TRUE;
}
/**
* Return the closest mapped superclass.
*/
public ClassMetaData getMappedPCSuperclassMetaData() {
ClassMetaData sup = getPCSuperclassMetaData();
if (sup == null || sup.isMapped())
return su... |
public String compress(String original)
{
return JavascriptStripper.stripCommentsAndWhitespace(original);
}
| public String compress(String original)
{
return new JavascriptStripper().stripCommentsAndWhitespace(original);
}
|
public Iterator getEmbeddedResourceURLs(byte[] html, URL baseUrl, URLCollection urls) throws HTMLParseException {
Parser htmlParser = null;
try {
String contents = new String(html);
StringReader reader = new StringReader(contents);
NodeReader nreader = new NodeReader(reader, contents.length());
htmlPar... | public Iterator getEmbeddedResourceURLs(byte[] html, URL baseUrl, URLCollection urls) throws HTMLParseException {
Parser htmlParser = null;
try {
String contents = new String(html);
StringReader reader = new StringReader(contents);
NodeReader nreader = new NodeReader(reader, contents.length());
htmlPar... |
public boolean isVisible () {
checkWidget();
return getVisible () && parent.isVisible ();
}
Decorations menuShell () {
return parent.menuShell ();
}
int kEventAccessibleGetChildAtPoint (int nextHandler, int theEvent, int userData) {
if (accessible != null) {
return accessible.internal_kEventAccessibleGetChildAt... | public boolean isVisible () {
checkWidget();
return getVisible () && parent.isVisible ();
}
Decorations menuShell () {
return parent.menuShell ();
}
int kEventAccessibleGetChildAtPoint (int nextHandler, int theEvent, int userData) {
if (accessible != null) {
return accessible.internal_kEventAccessibleGetChildAt... |
public void deselectAll () {
checkWidget ();
list.deselectAll ();
}
void dropDown (boolean drop) {
if (drop == isDropped ()) return;
if (!drop) {
popup.setVisible (false);
if (!isDisposed ()&& arrow.isFocusControl()) {
text.setFocus();
}
return;
}
if (getShell() != popup.getParent ()) {
String[] ite... | public void deselectAll () {
checkWidget ();
list.deselectAll ();
}
void dropDown (boolean drop) {
if (drop == isDropped ()) return;
if (!drop) {
popup.setVisible (false);
if (!isDisposed ()&& arrow.isFocusControl()) {
text.setFocus();
}
return;
}
if (getShell() != popup.getParent ()) {
String[] ite... |
public void handleEvent(Event event) {
accessible.setFocus(ACC.CHILDID_SELF);
}
});
}
/*
* Return the Label immediately preceding the receiver in the z-order,
* or null if none.
*/
Label getAssociatedLabel () {
Control[] siblings = getParent ().getChildren ();
for (int i = 0; i < siblings.length; i++) {... | public void handleEvent(Event event) {
accessible.setFocus(ACC.CHILDID_SELF);
}
});
}
/*
* Return the Label immediately preceding the receiver in the z-order,
* or null if none.
*/
Label getAssociatedLabel () {
Control[] siblings = getParent ().getChildren ();
for (int i = 0; i < siblings.length; i++) {... |
private static final String[] COMP_TYPE = {
null, // index 0
"attribute declaration",
"attribute group",
"elment declaration",
"group",
"identity constraint",
"notation",
"type definition",
};
| private static final String[] COMP_TYPE = {
null, // index 0
"attribute declaration",
"attribute group",
"element declaration",
"group",
"identity constraint",
"notation",
"type definition",
};
|
private static void checkVersion(Class clazz, String expected) {
String actual = "*NONE*"; // $NON-NLS-1$
try {
actual = (String) clazz.getMethod("getVersion", null).invoke(null, null);
actual = extractVersion(actual);
} catch (Exception ignored) {
// Not needed
}
if (0 != actual.compareTo(expected... | private static void checkVersion(Class clazz, String expected) {
String actual = "*NONE*"; // $NON-NLS-1$
try {
actual = (String) clazz.getMethod("getVersion", null).invoke(null, null);
actual = extractVersion(actual);
} catch (Exception ignored) {
// Not needed
}
if (0 != actual.compareTo(expected... |
public JRockitAgent() {
if (START_RMP_SERVER) {
// the management server will be spawned in a new thread
RmpSocketListener management = new RmpSocketListener();
}
JVMFactory.getJVM().getClassLibrary().setClassPreProcessor(this);
}
| public JRockitAgent() {
if (START_RMP_SERVER) {
// the management server will be spawned in a new thread
/*RmpSocketListener management = */new RmpSocketListener();
}
JVMFactory.getJVM().getClassLibrary().setClassPreProcessor(this);
}
|
public IChatRoomContainer createChatRoomContainer() throws ContainerInstantiationException;
} | //public IChatRoomContainer createChatRoomContainer() throws ContainerInstantiationException;
} |
public static URI createDefaultURI() {
//TODO-mkuppe https://bugs.eclipse.org/216944
// return URI.create(PROTOCOL + "://" + USERNAME + ":" + PASSWORD + "@" + getHost() + ":" + PORT + "/" + PATH + "?" + QUERY + "#" + FRAGMENT);
return URI.create(PROTOCOLS[0] + "://" + USERNAME + "@" + getHost() + ":" + PORT + PATH)... | public static URI createDefaultURI() {
//TODO-mkuppe https://bugs.eclipse.org/216944
// return URI.create(PROTOCOL + "://" + USERNAME + ":" + PASSWORD + "@" + getHost() + ":" + PORT + "/" + PATH + "?" + QUERY + "#" + FRAGMENT);
return URI.create(PROTOCOLS[0] + "://"/* + USERNAME + "@" */+ getHost() + ":" + PORT + P... |
public void setMaxPageVersions(int maxPageVersions)
{
if (maxPageVersions < 0)
{
throw new IllegalArgumentException("Value for maxPages must be >= 0");
}
this.maxPageVersions = maxPageVersions;
}
| public void setMaxPageVersions(int maxPageVersions)
{
if (maxPageVersions < 0)
{
throw new IllegalArgumentException("Value for maxPageVersions must be >= 0");
}
this.maxPageVersions = maxPageVersions;
}
|
public void component(final Component component, final IVisit<Boolean> visit)
{
if (!component.isStateless())
{
visit.stop(Boolean.FALSE);
}
}
});
if (returnValue == null)
{
stateless = Boolean.TRUE;
}
else if (returnValue instanceof Boolean)
{
stateless = retu... | public void component(final Component component, final IVisit<Boolean> visit)
{
if (!component.isStateless())
{
visit.stop(Boolean.FALSE);
}
}
});
if (returnValue == null)
{
stateless = Boolean.TRUE;
}
else
{
stateless = returnValue;
}
// TODO (matej_k):... |
protected boolean instanceOf(final Class<?> type, final Class<?> superType)
{
return superType.isAssignableFrom(type);
}
| protected boolean instanceOf(final Class<?> type, final Class<?> superType)
{
return superType != null && superType.isAssignableFrom(type);
}
|
public boolean equals(final Object o)
{
if (o instanceof String)
{
return string.equals(o);
}
if (o instanceof RawMarkup)
{
return string.equals(((RawMarkup)o).string);
}
return false;
}
| public boolean equals(final Object o)
{
if (o instanceof CharSequence)
{
return string.equals(o);
}
if (o instanceof RawMarkup)
{
return string.equals(((RawMarkup)o).string);
}
return false;
}
|
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 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.... |
private static void append(final AppendingStringBuffer buffer, final CharSequence s,
final int from, final int to)
{
if (s instanceof AppendingStringBuffer)
{
AppendingStringBuffer asb = (AppendingStringBuffer)s;
buffer.append(asb.getValue(), from, to - from);
}
else if (s instanceof StringBuffer)
{... | private static void append(final AppendingStringBuffer buffer, final CharSequence s,
final int from, final int to)
{
if (s instanceof AppendingStringBuffer)
{
AppendingStringBuffer asb = (AppendingStringBuffer)s;
buffer.append(asb.getValue(), from, to - from);
}
else if (s instanceof StringBuilder)
... |
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
// read values
in.defaultReadObject();
OutputStream output = getOutputStream();
if (cachedContent != null)
{
output.write(cachedContent);
}
else
{
FileInputStream input = new FileInputStream(dfosFile);
... | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
// read values
in.defaultReadObject();
OutputStream output = getOutputStream();
if (cachedContent != null)
{
output.write(cachedContent);
}
else
{
FileInputStream input = new FileInputStream(dfosFile);
... |
public int getTopPixel () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
byte [] position = new byte [ITER_SIZEOF];
GdkRectangle rect = new GdkRectangle ();
OS.gtk_text_view_get_visible_rect (handle, rect);
int [] lineTop = new int[1];
OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop... | public int getTopPixel () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
byte [] position = new byte [ITER_SIZEOF];
GdkRectangle rect = new GdkRectangle ();
OS.gtk_text_view_get_visible_rect (handle, rect);
int [] lineTop = new int[1];
OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop... |
Collection<Object> getSelectedNodes();
/*
* 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, ... | Collection<Object> getSelectedNodes();
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, ... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
Point size;
if (layout != null) {
if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) {
changed |= (state & LAYOUT_CHANGED) != 0;
size = layout.computeSize (this, wHint, hHint, changed);
state &= ~LAYOUT_CHANGED;
} else ... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
Point size;
if (layout != null) {
if ((wHint == SWT.DEFAULT) || (hHint == SWT.DEFAULT)) {
changed |= (state & LAYOUT_CHANGED) != 0;
size = layout.computeSize (this, wHint, hHint, changed);
state &= ~LAYOUT_CHANGED;
} else ... |
public AccessLogSamplerBeanInfo() {
super(AccessLogSampler.class);
log.debug("Entered access log sampler bean info");
try {
createPropertyGroup("defaults", // $NON-NLS-1$
new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON... | public AccessLogSamplerBeanInfo() {
super(AccessLogSampler.class);
log.debug("Entered access log sampler bean info");
try {
createPropertyGroup("defaults", // $NON-NLS-1$
new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON... |
protected void writeJsReference(final Response response, final PackageResourceReference ref)
{
String url = RequestCycle.get().urlFor(ref);
response.write("\t<script language=\"JavaScript\" type=\"text/javascript\" " + "src=\"");
response.write(url);
response.write("\"></script>\n");
}
| protected void writeJsReference(final Response response, final PackageResourceReference ref)
{
String url = RequestCycle.get().urlFor(ref);
response.write("\t<script language=\"JavaScript\" type=\"text/javascript\" " + "src=\"");
response.write(url);
response.println("\"></script>");
}
|
public Object create( final String name )
throws TypeException
{
TypeFactory factory = getTypeFactory( name );
if( null == factory && null != m_parent )
{
factory = m_parent.getTypeFactory( name );
}
if( null == factory )
{
final ... | public Object create( final String name )
throws TypeException
{
TypeFactory factory = getTypeFactory( name );
if( null == factory && null != m_parent )
{
factory = m_parent.getTypeFactory( name );
}
if( null == factory )
{
final ... |
public OpenJPAStateManager persist(Object pc, Object id, boolean explicit,
OpCallbacks call) {
OpenJPAStateManager sm = getStateManager(pc);
SliceInfo info = null;
boolean replicated = SliceImplHelper.isReplicated(sm);
if (getOperatingSet().isEmpty() && !SliceImplHelper.isSliceAssigned(sm)) {
info = Slic... | public OpenJPAStateManager persist(Object pc, Object id, boolean explicit,
OpCallbacks call) {
OpenJPAStateManager sm = getStateManager(pc);
SliceInfo info = null;
boolean replicated = SliceImplHelper.isReplicated(pc, getConfiguration());
if (getOperatingSet().isEmpty() && !SliceImplHelper.isSliceAssigned(s... |
private Object handleConcatVal(Object value, Object ob, Object[] params,
OpenJPAStateManager sm) {
org.apache.openjpa.jdbc.kernel.exps.Concat concatVal =
(org.apache.openjpa.jdbc.kernel.exps.Concat)value;
Val value1 = concatVal.getVal1();
Object val1 = getValue(value1, ob... | private Object handleConcatVal(Object value, Object ob, Object[] params,
OpenJPAStateManager sm) {
org.apache.openjpa.jdbc.kernel.exps.Concat concatVal =
(org.apache.openjpa.jdbc.kernel.exps.Concat)value;
Val value1 = concatVal.getVal1();
Object val1 = getValue(value1, ob... |
public static String substituteParams(String sql, List<Integer> paramOrder)
throws IOException {
// if there's no "?" parameter marker, then we don't need to
// perform the parsing process
if (sql.indexOf("?") == -1)
return sql;
paramOrder... | public static String substituteParams(String sql, List<Integer> paramOrder)
throws IOException {
// if there's no "?" parameter marker, then we don't need to
// perform the parsing process
if (sql.indexOf("?") == -1)
return sql;
paramOrder... |
private Value getLiteralRawString(Value val) {
if (val instanceof Lit) {
Lit lit = (Lit) val;
StringBuffer value = new StringBuffer();
int pType = lit.getParseType();
if (pType == Literal.TYPE_SQ_STRING ||
pType == Literal.TYPE_STRING)
... | private Value getLiteralRawString(Value val) {
if (val instanceof Lit) {
Lit lit = (Lit) val;
StringBuilder value = new StringBuilder();
int pType = lit.getParseType();
if (pType == Literal.TYPE_SQ_STRING ||
pType == Literal.TYPE_STRING)
... |
private static String replaceEscape(String str, String from, String to,
String escape) {
String[] parts = Strings.split(str, from, Integer.MAX_VALUE);
StringBuffer repbuf = new StringBuffer();
for (int i = 0; i < parts.length; i++) {
if (i > 0) {
// if the... | private static String replaceEscape(String str, String from, String to,
String escape) {
String[] parts = Strings.split(str, from, Integer.MAX_VALUE);
StringBuilder repbuf = new StringBuilder();
for (int i = 0; i < parts.length; i++) {
if (i > 0) {
// if t... |
private String getDiscriminator(LitExpState lstate) {
StringBuffer disc = new StringBuffer(lstate.discValue.toString());
switch(lstate.disc.getJavaType()) {
case JavaTypes.INT:
return disc.toString();
case JavaTypes.CHAR:
case JavaTypes.STRING:
default:
... | private String getDiscriminator(LitExpState lstate) {
StringBuilder disc = new StringBuilder(lstate.discValue.toString());
switch(lstate.disc.getJavaType()) {
case JavaTypes.INT:
return disc.toString();
case JavaTypes.CHAR:
case JavaTypes.STRING:
default:
... |
public String getDescription() {
StringBuffer buf = new StringBuffer();
buf.append("Full Name: ").append(getFullName()).append("\n");
buf.append("Type: ").append(Schemas.getJDBCName(getType())).
append("\n");
buf.append("Size: ").append(getSize()).append("\n");
bu... | public String getDescription() {
StringBuilder buf = new StringBuilder();
buf.append("Full Name: ").append(getFullName()).append("\n");
buf.append("Type: ").append(Schemas.getJDBCName(getType())).
append("\n");
buf.append("Size: ").append(getSize()).append("\n");
... |
public static String toString(DatabaseMetaData meta)
throws SQLException {
String lineSep = J2DoPrivHelper.getLineSeparator();
StringBuffer buf = new StringBuffer();
try {
buf.append("catalogSeparator: ")
.append(meta.getCatalogSeparator())
... | public static String toString(DatabaseMetaData meta)
throws SQLException {
String lineSep = J2DoPrivHelper.getLineSeparator();
StringBuilder buf = new StringBuilder(4096);
try {
buf.append("catalogSeparator: ")
.append(meta.getCatalogSeparator())
... |
protected String getSequencesSQL(String schemaName, String sequenceName) {
StringBuffer buf = new StringBuffer();
buf.append(sequenceSQL);
if (schemaName != null || sequenceName != null)
buf.append(" WHERE ");
if (schemaName != null) {
buf.append(sequenceSchem... | protected String getSequencesSQL(String schemaName, String sequenceName) {
StringBuilder buf = new StringBuilder();
buf.append(sequenceSQL);
if (schemaName != null || sequenceName != null)
buf.append(" WHERE ");
if (schemaName != null) {
buf.append(sequenceSch... |
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("[");
for (Iterator itr = iterator(); itr.hasNext();) {
buf.append("<").append(itr.next()).append(">");
if (itr.hasNext())
buf.append(", ");
}
return buf.appen... | public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("[");
for (Iterator itr = iterator(); itr.hasNext();) {
buf.append("<").append(itr.next()).append(">");
if (itr.hasNext())
buf.append(", ");
}
return buf.app... |
public String[] getDeleteTableContentsSQL(Table[] tables,Connection conn) {
// mysql >= 4 supports more-optimal delete syntax
if (!optimizeMultiTableDeletes)
return super.getDeleteTableContentsSQL(tables,conn);
else {
StringBuffer buf = new StringBuffer(tables.length ... | public String[] getDeleteTableContentsSQL(Table[] tables,Connection conn) {
// mysql >= 4 supports more-optimal delete syntax
if (!optimizeMultiTableDeletes)
return super.getDeleteTableContentsSQL(tables,conn);
else {
StringBuilder buf = new StringBuilder(tables.lengt... |
public String toString() {
StringBuffer buf = new StringBuffer(255);
buf.append(super.toString()).
append("[query:[").append(_query).append("]").
append(",access path:").append(_accessPathClassNames).
append(",subs:").append(_subclasses).
append(",igno... | public String toString() {
StringBuilder buf = new StringBuilder(1024);
buf.append(super.toString()).
append("[query:[").append(_query).append("]").
append(",access path:").append(_accessPathClassNames).
append(",subs:").append(_subclasses).
append(",i... |
code.tab().append("private static String toString").openParen(true).
append("byte[] b").closeParen().openBrace(2).endl();
code.tab(2).append("if").openParen(true).
append("b == null").closeParen().endl();
code.tab(3).append("return \"null\";").endl(2);
code.tab(... | code.tab().append("private static String toString").openParen(true).
append("byte[] b").closeParen().openBrace(2).endl();
code.tab(2).append("if").openParen(true).
append("b == null").closeParen().endl();
code.tab(3).append("return \"null\";").endl(2);
code.tab(... |
private void processViolations() {
if (_violations == null)
return;
String sep = J2DoPrivHelper.getLineSeparator();
StringBuffer buf = new StringBuffer();
for (Iterator itr = _violations.iterator(); itr.hasNext();) {
buf.append(itr.next());
if (it... | private void processViolations() {
if (_violations == null)
return;
String sep = J2DoPrivHelper.getLineSeparator();
StringBuilder buf = new StringBuilder();
for (Iterator itr = _violations.iterator(); itr.hasNext();) {
buf.append(itr.next());
if (... |
public void makeReadOnly() {
if (_readOnly)
return;
lock();
try {
// check again
if (_readOnly)
return;
_readOnly = true;
Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isInfoEnabled(... | public void makeReadOnly() {
if (_readOnly)
return;
lock();
try {
// check again
if (_readOnly)
return;
_readOnly = true;
Log log = _conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
if (log.isInfoEnabled(... |
private String getPathString() {
List<FetchConfigurationImpl> path = getPath();
if (path.isEmpty())
return "";
StringBuffer buf = new StringBuffer().append (": ");
for (Iterator<FetchConfigurationImpl> itr = path.iterator(); itr.hasNext();) {
buf.append(itr.ne... | private String getPathString() {
List<FetchConfigurationImpl> path = getPath();
if (path.isEmpty())
return "";
StringBuilder buf = new StringBuilder().append (": ");
for (Iterator<FetchConfigurationImpl> itr = path.iterator(); itr.hasNext();) {
buf.append(itr.... |
public String toString() {
StringBuffer buf = new StringBuffer(64);
buf.append("Query: ").append(super.toString());
buf.append("; candidate class: ").append(_class);
buf.append("; query: ").append(_query);
return buf.toString();
}
| public String toString() {
StringBuilder buf = new StringBuilder(255);
buf.append("Query: ").append(super.toString());
buf.append("; candidate class: ").append(_class);
buf.append("; query: ").append(_query);
return buf.toString();
}
|
protected Object eval(Object candidate, Object orig,
StoreContext ctx, Object[] params) {
Object str = _val.eval(candidate, orig, ctx, params);
StringBuffer cat = new StringBuffer(str.toString());
Object arg = _args.eval(candidate, orig, ctx, params);
if (arg instanceof Obje... | protected Object eval(Object candidate, Object orig,
StoreContext ctx, Object[] params) {
Object str = _val.eval(candidate, orig, ctx, params);
StringBuilder cat = new StringBuilder(str.toString());
Object arg = _args.eval(candidate, orig, ctx, params);
if (arg instanceof Ob... |
private static String assemble(JPQLNode node, String delimiter, int last) {
StringBuffer result = new StringBuffer();
JPQLNode[] parts = node.children;
for (int i = 0; parts != null && i < parts.length - last; i++)
result.append(result.length() > 0 ? delimiter : "").
... | private static String assemble(JPQLNode node, String delimiter, int last) {
StringBuilder result = new StringBuilder();
JPQLNode[] parts = node.children;
for (int i = 0; parts != null && i < parts.length - last; i++)
result.append(result.length() > 0 ? delimiter : "").
... |
public String getOrderDeclaration() {
if (_orderDec == null && _orders != null) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < _orders.length; i++) {
if (i > 0)
buf.append(", ");
buf.append(_orders[i].getName()).append... | public String getOrderDeclaration() {
if (_orderDec == null && _orders != null) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < _orders.length; i++) {
if (i > 0)
buf.append(", ");
buf.append(_orders[i].getName()).appe... |
private static String toModeString(int mode) {
StringBuffer buf = new StringBuffer(31);
if ((mode & MODE_META) != 0)
buf.append("[META]");
if ((mode & MODE_QUERY) != 0)
buf.append("[QUERY]");
if ((mode & MODE_MAPPING) != 0)
buf.append("[MAPPING]");... | private static String toModeString(int mode) {
StringBuilder buf = new StringBuilder(31);
if ((mode & MODE_META) != 0)
buf.append("[META]");
if ((mode & MODE_QUERY) != 0)
buf.append("[QUERY]");
if ((mode & MODE_MAPPING) != 0)
buf.append("[MAPPING]"... |
public static String toXMLName(String propName) {
if (propName == null)
return null;
StringBuffer buf = new StringBuffer();
char c;
for (int i = 0; i < propName.length(); i++) {
c = propName.charAt(i);
// convert sequences of all-caps to downcase ... | public static String toXMLName(String propName) {
if (propName == null)
return null;
StringBuilder buf = new StringBuilder();
char c;
for (int i = 0; i < propName.length(); i++) {
c = propName.charAt(i);
// convert sequences of all-caps to downcas... |
public String unalias(String str) {
// defer to super.unalias
String[] aliases = getAliases();
if (aliases.length <= 0 || str == null)
return super.unalias(str);
str = str.trim();
if (str.length() <= 0)
return super.unalias(str);
... | public String unalias(String str) {
// defer to super.unalias
String[] aliases = getAliases();
if (aliases.length <= 0 || str == null)
return super.unalias(str);
str = str.trim();
if (str.length() <= 0)
return super.unalias(str);
... |
private static void log(String msg, Connection conn,
Log log, long startTime) {
if (log == null || !log.isTraceEnabled())
return;
long totalTime = -1;
if (startTime != -1)
totalTime = System.currentTimeMillis() - startTime;
StringBuffer buf = new Str... | private static void log(String msg, Connection conn,
Log log, long startTime) {
if (log == null || !log.isTraceEnabled())
return;
long totalTime = -1;
if (startTime != -1)
totalTime = System.currentTimeMillis() - startTime;
StringBuilder buf = new St... |
public String toString() {
StringBuffer buf = new StringBuffer("metadata ").append(hashCode());
buf.append("[").append(_metaData.toString()).append("]");
return buf.toString();
}
| public String toString() {
StringBuilder buf = new StringBuilder("metadata ").append(hashCode());
buf.append("[").append(_metaData.toString()).append("]");
return buf.toString();
}
|
public static String getSourceLocationMessage(SourceTracker[] trackers) {
StringBuffer buf = new StringBuffer(20 * (trackers.length + 1));
buf.append(_loc.get("source-trackers-location-header")).append(SEP);
String sourceFilePath;
for (int i = 0; i < trackers.length; i++) {
... | public static String getSourceLocationMessage(SourceTracker[] trackers) {
StringBuilder buf = new StringBuilder(20 * (trackers.length + 1));
buf.append(_loc.get("source-trackers-location-header")).append(SEP);
String sourceFilePath;
for (int i = 0; i < trackers.length; i++) {
... |
public static String encode(byte[] byteArray) {
StringBuffer hexBuffer = new StringBuffer(byteArray.length * 2);
for (int i = 0; i < byteArray.length; i++)
for (int j = 1; j >= 0; j--)
hexBuffer.append(HEX[(byteArray[i] >> (j * 4)) & 0xF]);
return hexBuffer.toStri... | public static String encode(byte[] byteArray) {
StringBuilder hexBuffer = new StringBuilder(byteArray.length * 2);
for (int i = 0; i < byteArray.length; i++)
for (int j = 1; j >= 0; j--)
hexBuffer.append(HEX[(byteArray[i] >> (j * 4)) & 0xF]);
return hexBuffer.toSt... |
public <X> void populate(AbstractManagedType<X> type) {
Class<X> cls = type.getJavaType();
Class<?> mcls = repos.getMetaModel(cls, true);
if (mcls == null)
return;
StaticMetamodel anno = mcls.getAnnotation(StaticMetamodel.class);
if (anno == null)
throw new IllegalArgumentException... | public <X> void populate(AbstractManagedType<X> type) {
Class<X> cls = type.getJavaType();
Class<?> mcls = repos.getMetaModel(cls, true);
if (mcls == null)
return;
StaticMetamodel anno = mcls.getAnnotation(StaticMetamodel.class);
if (anno == null)
throw new IllegalArgumentException... |
public static String toString(Collection<? extends Element> elements) {
StringBuilder tmp = new StringBuilder();
int i = 0;
for (Element e : elements) {
tmp.append(e.getSimpleName() + (++i == elements.size() ? "" : ","));
}
return tmp.toString();
}
St... | public static String toString(Collection<? extends Element> elements) {
StringBuilder tmp = new StringBuilder();
int i = 0;
for (Element e : elements) {
tmp.append(e.getSimpleName() + (++i == elements.size() ? "" : ","));
}
return tmp.toString();
}
St... |
public String asExpression(AliasContext ctx) {
StringBuffer tmp = new StringBuffer(OPEN_BRACE);
for (int i = 0; i < _values.length; i++) {
Object v = _values[i];
tmp.append((v instanceof Visitable ?
((Visitable)v).asExpression(ctx) : JPQLHelper.toJPQL(ctx, v)))
.append(i == _... | public String asExpression(AliasContext ctx) {
StringBuilder tmp = new StringBuilder(OPEN_BRACE);
for (int i = 0; i < _values.length; i++) {
Object v = _values[i];
tmp.append((v instanceof Visitable ?
((Visitable)v).asExpression(ctx) : JPQLHelper.toJPQL(ctx, v)))
.append(i ==... |
public String asJoinable(AliasContext ctx) {
return new StringBuffer(getOperator().toString())
.append(getParent().asProjection(ctx))
.append(NAVIGATION)
.append(getLastSegment())
.append(" ")
.append(ctx.getAlias(this)).toString();
}
| public String asJoinable(AliasContext ctx) {
return new StringBuilder(getOperator().toString())
.append(getParent().asProjection(ctx))
.append(NAVIGATION)
.append(getLastSegment())
.append(" ")
.append(ctx.getAlias(this)).toString();
}
|
public String asExpression(AliasContext ctx) {
String start = _start == null ? EMPTY : COMMA +
((Visitable)_start).asExpression(ctx);
return new StringBuffer(_op.toString())
.append(OPEN_BRACE)
.append(((Visitable)_e1).asExpression(ctx))
.append(COMMA)
.append(((Visit... | public String asExpression(AliasContext ctx) {
String start = _start == null ? EMPTY : COMMA +
((Visitable)_start).asExpression(ctx);
return new StringBuilder(_op.toString())
.append(OPEN_BRACE)
.append(((Visitable)_e1).asExpression(ctx))
.append(COMMA)
.append(((Visi... |
public String asProjection(AliasContext ctx) {
StringBuffer tmp = new StringBuffer("NEW ").append(_cls.getName())
.append("(");
if (_args == null || _args.isEmpty())
return tmp.append(")").toString();
int i = 0;
int N = _args.size();
for (SelectItem arg : _args) {
i++;
tmp.append(((Visit... | public String asProjection(AliasContext ctx) {
StringBuilder tmp = new StringBuilder("NEW ").append(_cls.getName())
.append("(");
if (_args == null || _args.isEmpty())
return tmp.append(")").toString();
int i = 0;
int N = _args.size();
for (SelectItem arg : _args) {
i++;
tmp.append(((Vis... |
public String asExpression(AliasContext ctx) {
StringBuffer tmp = new StringBuffer();
for (int i = 0; i < _values.length; i++) {
Visitable v = (Visitable)_values[i];
tmp.append(v.asExpression(ctx))
.append(i == _values.length-1 ? "" : ", ");
}
return tmp.toString();
}
| public String asExpression(AliasContext ctx) {
StringBuilder tmp = new StringBuilder();
for (int i = 0; i < _values.length; i++) {
Visitable v = (Visitable)_values[i];
tmp.append(v.asExpression(ctx))
.append(i == _values.length-1 ? "" : ", ");
}
return tmp.toString();
}
|
public String toJPQL(AliasContext ctx) {
StringBuffer tmp = new StringBuffer();
tmp.append(" WHEN ").append(JPQLHelper.toJPQL(ctx, when))
.append(" THEN ").append(JPQLHelper.toJPQL(ctx, then));
return tmp.toString();
}
| public String toJPQL(AliasContext ctx) {
StringBuilder tmp = new StringBuilder();
tmp.append(" WHEN ").append(JPQLHelper.toJPQL(ctx, when))
.append(" THEN ").append(JPQLHelper.toJPQL(ctx, then));
return tmp.toString();
}
|
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append("Class: (" + _meta.getDescribedType().getName() + ")\n");
buf.append("Object Id: (" + _oid + ")\n");
buf.append("Version: (" + _version + ")\n");
FieldMetaData[] fmds = _meta.getFields();
for... | public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("Class: (" + _meta.getDescribedType().getName() + ")\n");
buf.append("Object Id: (" + _oid + ")\n");
buf.append("Version: (" + _version + ")\n");
FieldMetaData[] fmds = _meta.getFields();
f... |
private long getTimeDiff(FTPClient ftp) {
long returnValue = 0;
File tempFile = findFileName(ftp);
try {
// create a local temporary file
fileUtils.createNewFile(tempFile);
long localTimeStamp = tempFile.lastModified();
BufferedInputStream inst... | private long getTimeDiff(FTPClient ftp) {
long returnValue = 0;
File tempFile = findFileName(ftp);
try {
// create a local temporary file
fileUtils.createNewFile(tempFile);
long localTimeStamp = tempFile.lastModified();
BufferedInputStream inst... |
protected void initManager(BSFManager mgr) throws BSFException{
final String label = getName();
final String fileName = getFilename();
final String scriptParameters = getParameters();
// Use actual class name for log
final Logger logger = LoggingManager.getLoggerForShortName(... | protected void initManager(BSFManager mgr) throws BSFException{
final String label = getName();
final String fileName = getFilename();
final String scriptParameters = getParameters();
// Use actual class name for log
final Logger logger = LoggingManager.getLoggerForShortName(... |
public void addShellListener (ShellListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Close,typedListener);
addListener (SWT.Iconify,typedListener);
addListener (SWT.Deiconify,typedListener);
add... | public void addShellListener (ShellListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Close,typedListener);
addListener (SWT.Iconify,typedListener);
addListener (SWT.Deiconify,typedListener);
add... |
public TypeDeployer createDeployer( final File file )
throws DeploymentException
{
try
{
URLClassLoader classLoader = getClassLoaderForFile( file );
return createDeployment( classLoader, file.toURL() );
}
catch( Exception e )
{
... | public TypeDeployer createDeployer( final File file )
throws DeploymentException
{
try
{
final URLClassLoader classLoader = getClassLoaderForFile( file );
return createDeployment( classLoader, file.toURL() );
}
catch( Exception e )
{
... |
public void testNoOverwrite() throws IOException {
executeTarget("test1");
File result =
new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/result/Junk1.java");
long modTime = result.lastModified();
/*
* Sleep for some time to make sure a n... | public void testNoOverwrite() throws IOException {
executeTarget("test1");
File result =
new File(System.getProperty("root"), "src/etc/testcases/taskdefs/fixcrlf/result/Junk1.java");
long modTime = result.lastModified();
/*
* Sleep for some time to make sure a n... |
public void testFilesOnlyDoesntCauseRecreate()
throws InterruptedException {
executeTarget("testFilesOnlyDoesntCauseRecreateSetup");
long l = getProject().resolveFile("test3.zip").lastModified();
Thread.currentThread().sleep(3000);
executeTarget("testFilesOnlyDoesntCauseRecre... | public void testFilesOnlyDoesntCauseRecreate()
throws InterruptedException {
executeTarget("testFilesOnlyDoesntCauseRecreateSetup");
long l = getProject().resolveFile("test3.zip").lastModified();
Thread.sleep(3000);
executeTarget("testFilesOnlyDoesntCauseRecreate");
a... |
public void testSleep() {
try {
Thread.currentThread().sleep(5 * 1000);
} catch (InterruptedException e) {
} // end of try-catch
}
| public void testSleep() {
try {
Thread.sleep(5 * 1000);
} catch (InterruptedException e) {
} // end of try-catch
}
|
public static URI toURI(IPath path) {
try {
return new URI(MemoryFileSystem.SCHEME_MEMORY, path.toPortableString(), null);
} catch (URISyntaxException e) {
//should not happen
throw new RuntimeException(e);
}
}
| public static URI toURI(IPath path) {
try {
return new URI(MemoryFileSystem.SCHEME_MEMORY, null, path.setDevice(null).toPortableString(), null);
} catch (URISyntaxException e) {
//should not happen
throw new RuntimeException(e);
}
}
|
private void addCXFJSTWEB24Servlet(IProject webProject, org.eclipse.jst.j2ee.webapplication.WebApp webapp) {
List servlets = webapp.getServlets();
for (int i = 0; i < servlets.size(); i++) {
Servlet servlet = (Servlet) servlets.get(i);
if (servlet.getServletName().equals("cxf... | private void addCXFJSTWEB24Servlet(IProject webProject, org.eclipse.jst.j2ee.webapplication.WebApp webapp) {
List servlets = webapp.getServlets();
for (int i = 0; i < servlets.size(); i++) {
org.eclipse.jst.j2ee.webapplication.Servlet servlet = (org.eclipse.jst.j2ee.webapplication.Servle... |
protected void loadProperties(ClassLoader al, URL url) {
InputStream is = null;
try {
is = url.openStream();
if (is == null) {
log("Could not load definitions from " + url,
Project.MSG_WARN);
return;
}
... | protected void loadProperties(ClassLoader al, URL url) {
InputStream is = null;
try {
is = url.openStream();
if (is == null) {
log("Could not load definitions from " + url,
Project.MSG_WARN);
return;
}
... |
public BaseChannelConfig(ID id, IChannelListener listener, Map properties) {
if (id == null)
throw new NullPointerException(Messages.BaseChannelConfig_ID_Not_Null);
this.id = id;
this.listener = listener;
this.properties = properties;
}
| public BaseChannelConfig(ID id, IChannelListener listener, Map properties) {
if (id == null)
throw new NullPointerException("id cannot be null"); //$NON-NLS-1$
this.id = id;
this.listener = listener;
this.properties = properties;
}
|
public Index[] getIndexes() {
if (_idxs == null)
_idxs = (_idxMap == null) ? Schemas.EMPTY_INDEXES : (Index[])
_idxMap.values().toArray(new Index[_idxMap.size()]);
return _idxs;
}
| public Index[] getIndexes() {
if (_idxs == null || _idxs.length == 0)
_idxs = (_idxMap == null) ? Schemas.EMPTY_INDEXES : (Index[])
_idxMap.values().toArray(new Index[_idxMap.size()]);
return _idxs;
}
|
public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(this, null);
}
/*
* the input c... | public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(this, null);
}
/*
* the input c... |
public void evict(Object obj, OpCallbacks call) {
if (obj == null)
return;
beginOperation(false);
try {
StateManagerImpl sm = getStateManagerImpl(obj, true);
if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call)
& OpCallbacks.ACT_RUN) ... | public void evict(Object obj, OpCallbacks call) {
if (obj == null)
return;
beginOperation(false);
try {
StateManagerImpl sm = getStateManagerImpl(obj, true);
if ((processArgument(OpCallbacks.OP_EVICT, obj, sm, call)
& OpCallbacks.ACT_RUN) ... |
protected Resource newResource()
{
// Create JAR resource
final JarResourceFactory factory = new JarResourceFactory();
factory.addClassClosures(classes);
return factory.getResource();
}
};
String servletPath = ((ServletWebRequest)getRequest()).getServletPath();
tag.put("codebase", servle... | protected Resource newResource()
{
// Create JAR resource
final JarResourceFactory factory = new JarResourceFactory();
factory.addClassClosures(classes);
return factory.getResource();
}
};
String servletPath = ((ServletWebRequest)getRequest()).getServletPath();
tag.put("codebase", servle... |
package org.apache.wicket.injection;
/*
* 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, Ve... | package org.apache.wicket.injection;
/*
* 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, Ve... |
package org.apache.wicket.proxy.util;
/*
* 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, V... | package org.apache.wicket.proxy.util;
/*
* 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, V... |
package org.apache.wicket.proxy.util;
/*
* 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, V... | package org.apache.wicket.proxy.util;
/*
* 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, V... |
public MarkupElement nextTag() throws ParseException
{
// Get the next tag. If null, no more tags are available
final ComponentTag tag = (ComponentTag)getParent().nextTag();
if (tag == null || tag.getId() != null)
{
return tag;
}
// Don't touch any wicket:id component
if (tag.getId() != null)
{... | public MarkupElement nextTag() throws ParseException
{
// Get the next tag. If null, no more tags are available
final ComponentTag tag = (ComponentTag)getParent().nextTag();
if (tag == null || tag.getId() != null)
{
return tag;
}
// Don't touch any wicket:id component
if (tag.getId() != null)
{... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.