buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected void setTransactionDone() {
this.transactionDone = true;
// Set the overall status for the transaction sample
// TODO: improve, e.g. by adding counts to the SampleResult class
transactionSampleResult.setResponseMessage("Number of samples in transaction : "
... | protected void setTransactionDone() {
this.transactionDone = true;
// Set the overall status for the transaction sample
// TODO: improve, e.g. by adding counts to the SampleResult class
transactionSampleResult.setResponseMessage("Number of samples in transaction : "
... |
private static long sampleClock() {
return SampleResult.currentTimeInMs();
}
| private static long sampleClock() {
return System.currentTimeMillis();
}
|
public String toString() {
StringBuffer buf = new StringBuffer("Request[");
buf.append("requestId=").append(requestId).append(";cont=").append(
requestContainerID).append(";serviceId=").append(serviceId)
.append(";call=").append(call).append(";done=").append(done)
.append(";response=").append(response)... | public String toString() {
final StringBuffer buf = new StringBuffer("Request[");
buf.append("requestId=").append(requestId).append(";cont=").append(
requestContainerID).append(";serviceId=").append(serviceId)
.append(";call=").append(call).append(";done=").append(done)
.append(";response=").append(res... |
public String toString() {
StringBuffer buf = new StringBuffer("Response[");
buf.append("requestId=").append(requestId).append(";response=").append(
response).append(";exception=").append(exception).append("]");
return buf.toString();
}
| public String toString() {
final StringBuffer buf = new StringBuffer("Response[");
buf.append("requestId=").append(requestId).append(";response=").append(
response).append(";exception=").append(exception).append("]");
return buf.toString();
}
|
public static <T> List<T> slice(List<T> seq, int pos, int count)
{
if (count <= 0)
{
return new ArrayList<T>(seq.subList(pos, pos));
}
else
{
return new ArrayList<T>(seq.subList(pos, pos + count));
}
}
| public static <T> List<T> slice(List<T> seq, int pos, int count)
{
if (count <= 0)
{
return new ArrayList<T>();
}
else
{
return new ArrayList<T>(seq.subList(pos, pos + count));
}
}
|
package org.apache.aut.converter;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.myrmidon... | package org.apache.aut.converter;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.aut.conv... |
import org.apache.aut.converter.Converter;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache... | import org.apache.aut.converter.Converter;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache... |
public void widgetSelected(SelectionEvent event) {
MenuItem menuItem = (MenuItem)event.widget;
if (menuItem.getSelection()) {
Menu menu = menuItem.getParent();
prevSelected = menu.indexOf(menuItem);
TableItem item = new TableItem(table, SWT.NONE);
String name ... | public void widgetSelected(SelectionEvent event) {
MenuItem menuItem = (MenuItem)event.widget;
if (menuItem.getSelection()) {
Menu menu = menuItem.getParent();
prevSelected = menu.indexOf(menuItem);
TableItem item = new TableItem(table, SWT.NONE);
String name ... |
public String signIn(final RequestCycle cycle, final String username, final String password)
{
return null;
}
};
this.panel.setPersistent(true);
this.form = (Form)panel.get("signInForm");
final String encryptedPassword = application.getSettings().... | public String signIn(final RequestCycle cycle, final String username, final String password)
{
return null;
}
};
this.panel.setPersistent(true);
this.form = (Form)panel.get("signInForm");
final String encryptedPassword = application.getSettings().... |
public void execute() {
try {
// Gump friendly - don't mess with the core loader if only classpath
if ("only".equals(getProject().getProperty("build.sysclasspath"))
&& (name == null || SYSTEM_LOADER_REF.equals(name))) {
log("Changing the system loader ... | public void execute() {
try {
// Gump friendly - don't mess with the core loader if only classpath
if ("only".equals(getProject().getProperty("build.sysclasspath"))
&& (name == null || SYSTEM_LOADER_REF.equals(name))) {
log("Changing the system loader ... |
public void execute() throws BuildException {
validate();
if (classpath != null) {
getProject().log("using user supplied classpath: " + classpath,
Project.MSG_DEBUG);
classpath = classpath.concatSystemClasspath("ignore");
} else {
class... | public void execute() throws BuildException {
validate();
if (classpath != null) {
getProject().log("using user supplied classpath: " + classpath,
Project.MSG_DEBUG);
classpath = classpath.concatSystemClasspath("ignore");
} else {
class... |
event.row = (int)/*64*/row;
/*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which acco... | event.row = (int)/*64*/row;
/*******************************************************************************
* Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which acco... |
public final String getPath()
{
final StringBuffer buffer = new StringBuffer();
buffer.append("resources/");
buffer.append(SharedResources.path(scope, name, locale, style));
return buffer.toString();
}
| public final String getPath()
{
final StringBuffer buffer = new StringBuffer();
buffer.append("resources/");
buffer.append(SharedResources.path(RequestCycle.get().getApplication(), scope, name, locale, style));
return buffer.toString();
}
|
public String urlFor(final String pageMapName, final Class pageClass,
final PageParameters parameters)
{
if (pageClass == null)
{
throw new NullPointerException("argument pageClass may not be null");
}
final WebRequestCycle cycle = getWebRequestCycle();
final StringBuffer buffer = urlPrefix(cycle);
... | public String urlFor(final String pageMapName, final Class pageClass,
final PageParameters parameters)
{
if (pageClass == null)
{
throw new NullPointerException("argument pageClass may not be null");
}
final WebRequestCycle cycle = getWebRequestCycle();
final StringBuffer buffer = urlPrefix(cycle);
... |
private boolean bookmarkablePage()
{
// Get any component parameter
final String bookmarkableName = request.getParameter("bookmarkablePage");
if (bookmarkableName != null)
{
// first see whether we have a logical mapping
Class pageClass = application.getPages().pageClassForAlias(bookmarkableName);
/... | private boolean bookmarkablePage()
{
// Get any component parameter
final String bookmarkableName = request.getParameter("bookmarkablePage");
if (bookmarkableName != null)
{
// first see whether we have a logical mapping
Class pageClass = application.getPages().classForAlias(bookmarkableName);
// no... |
public void setValue(Object value) {
if (value == null || ! (value instanceof Double)) {
setText("#N/A"); // TODO: should this just call super()?
return;
}
double rate = ((Double) value).doubleValue();
if (rate == Double.MAX_VALUE){
setText("#N/A")... | public void setValue(Object value) {
if (!(value instanceof Double)) {
setText("#N/A"); // TODO: should this just call super()?
return;
}
double rate = ((Double) value).doubleValue();
if (rate == Double.MAX_VALUE){
setText("#N/A"); // TODO: should ... |
public int /*long*/ method17 (int /*long*/[] args) {return Show (args [0]);}
};
}
void disposeCOMInterfaces () {
if (supports != null) {
supports.dispose ();
supports = null;
}
if (filePicker != null) {
filePicker.dispose ();
filePicker = null;
}
}
int /*long*/ getAddress () {
return filePicker.getA... | public int /*long*/ method17 (int /*long*/[] args) {return Show (args [0]);}
};
}
void disposeCOMInterfaces () {
if (supports != null) {
supports.dispose ();
supports = null;
}
if (filePicker != null) {
filePicker.dispose ();
filePicker = null;
}
}
int /*long*/ getAddress () {
return filePicker.getA... |
public Object newValue(Object object)
{
if (setMethod == null)
{
setMethod = findSetter(getMethod, object.getClass());
}
if (setMethod == null)
{
log.warn("Null setMethod");
return null;
}
Class clz = getMethod.getReturnType();
Object value = null;
try
{
value = clz.n... | public Object newValue(Object object)
{
if (setMethod == null)
{
setMethod = findSetter(getMethod, object.getClass());
}
if (setMethod == null)
{
log.warn("Null setMethod");
return null;
}
Class<?> clz = getMethod.getReturnType();
Object value = null;
try
{
value = cl... |
public void pack () {
checkWidget();
int width = 0;
if (buttonHandle != 0) {
GtkRequisition requisition = new GtkRequisition ();
OS.gtk_widget_size_request (buttonHandle, requisition);
width = requisition.width;
}
if ((parent.style & SWT.VIRTUAL) != 0) {
//NOT DONE
} else {
int /*long*/ iter = OS.g_mall... | public void pack () {
checkWidget();
int width = 0;
if (buttonHandle != 0) {
GtkRequisition requisition = new GtkRequisition ();
OS.gtk_widget_size_request (buttonHandle, requisition);
width = requisition.width;
}
if ((parent.style & SWT.VIRTUAL) != 0) {
//NOT DONE
} else {
int /*long*/ iter = OS.g_mall... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
NSSlider widget = (NSSlider)view;
NSRect oldRect = widget.frame();
widget.sizeToFit();
NSRect newRect = widget.frame();
widget.setFrame (oldRect);
int width = 0, height = 0;
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)n... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
NSSlider widget = (NSSlider)view;
NSRect oldRect = widget.frame();
widget.sizeToFit();
NSRect newRect = widget.frame();
widget.setFrame (oldRect);
int width = 0, height = 0;
if ((style & SWT.HORIZONTAL) != 0) {
height = (int)n... |
private static final String CONDITION_ANTLIB
= "antlib:org.apache.tools.ant.taskdefs.condition:";
| private static final String CONDITION_ANTLIB
= "antlib:org.apache.tools.ant.types.conditions:";
|
protected void setUp() throws Exception
{
field = NoopFieldValueFactoryTest.class.getDeclaredField("testField");
}
| protected void setUp() throws Exception
{
field = NoopFieldValueFactoryTest.class.getDeclaredField("field");
}
|
public Class getReturnType() {
if (returnType == null) returnType = extractType(6);
return returnType;
}
String toString(StringMaker sm) {
//XXX this signature needs a lot of work
StringBuffer buf = new StringBuffer("ADVICE: ");
buf.append(sm.makeModifiersStr... | public Class getReturnType() {
if (returnType == null) returnType = extractType(6);
return returnType;
}
String toString(StringMaker sm) {
//XXX this signature needs a lot of work
StringBuffer buf = new StringBuffer("ADVICE: ");
buf.append(sm.makeModifiersStr... |
public String getName() { return "<init>"; }
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
buf.append(sm.makePrimaryTypeName(getDeclaringType()));
sm.addSignature(buf, getParameterTypes());
... | public String getName() { return "<init>"; }
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
buf.append(sm.makePrimaryTypeName(getDeclaringType(),getDeclaringTypeName()));
sm.addSignature(buf, getPa... |
public Class getFieldType() {
if (fieldType == null) fieldType = extractType(3);
return fieldType;
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
if (sm.includeArgs) buf.append(sm.mak... | public Class getFieldType() {
if (fieldType == null) fieldType = extractType(3);
return fieldType;
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
if (sm.includeArgs) buf.append(sm.mak... |
public String getName() {
return Modifier.isStatic(getModifiers()) ? "<clinit>": "<init>";
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
buf.append(sm.makePrimaryTypeName(getDeclaringType()));
... | public String getName() {
return Modifier.isStatic(getModifiers()) ? "<clinit>": "<init>";
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
buf.append(sm.makePrimaryTypeName(getDeclaringType(),get... |
public Class getReturnType() {
if (returnType == null) returnType = extractType(6);
return returnType;
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
if (sm.includeArgs) buf.append(sm... | public Class getReturnType() {
if (returnType == null) returnType = extractType(6);
return returnType;
}
String toString(StringMaker sm) {
StringBuffer buf = new StringBuffer();
buf.append(sm.makeModifiersString(getModifiers()));
if (sm.includeArgs) buf.append(sm... |
private static Method setContextClassLoader = null;
static {
try {
getProtectionDomain = Class.class.getMethod("getProtectionDomain", new Class[0]);
Class protectionDomain = Class.forName("java.security.ProtectionDomain");
Class[] args = new Class[] {String.class, byt... | private static Method setContextClassLoader = null;
static {
try {
getProtectionDomain = Class.class.getMethod("getProtectionDomain", new Class[0]);
Class protectionDomain = Class.forName("java.security.ProtectionDomain");
Class[] args = new Class[] {String.class, byt... |
public CheckGroupTestPage1()
{
super(new ArrayList());
}
| public CheckGroupTestPage1()
{
super(new ArrayList<String>());
}
|
public CharSequence transform(Component component, String output)
{
// Convert all text to uppercase
return output.toUpperCase();
}
};
Border border = new SimpleBorder(borderContainer, "myBorder");
Border border2 = new SimpleBorder(this, "myBorder2");
border2.setRenderBodyOnly(false);
borde... | public CharSequence transform(Component component, String output)
{
// Convert all text to uppercase
return output.toUpperCase();
}
};
Border border = new SimpleBorder(borderContainer, "myBorder");
Border border2 = new SimpleBorder(this, "myBorder2");
border2.setRenderBodyOnly(false);
borde... |
public void setYear (int year) {
checkWidget ();
SYSTEMTIME systime = new SYSTEMTIME ();
int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME;
OS.SendMessage (handle, msg, 0, systime);
msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_SETCURSEL : OS.DTM_SETSYSTEMTIME;
systime.wYear = (short)ye... | public void setYear (int year) {
checkWidget ();
SYSTEMTIME systime = new SYSTEMTIME ();
int msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_GETCURSEL : OS.DTM_GETSYSTEMTIME;
OS.SendMessage (handle, msg, 0, systime);
msg = (style & SWT.CALENDAR) != 0 ? OS.MCM_SETCURSEL : OS.DTM_SETSYSTEMTIME;
systime.wYear = (short)ye... |
public void storePage(String sessionId, Page page)
{
File sessionDir = new File(getWorkDir(), sessionId);
sessionDir.mkdirs();
File pageFile = getPageFile(page.getNumericId(), page.getCurrentVersionNumber(), sessionDir);
// TODO check can this be called everytime at this place? Putting should
// be called a... | public void storePage(String sessionId, Page page)
{
File sessionDir = new File(getWorkDir(), sessionId);
sessionDir.mkdirs();
File pageFile = getPageFile(page.getNumericId(), page.getCurrentVersionNumber(), sessionDir);
// TODO check can this be called everytime at this place? Putting should
// be called a... |
public void setAttribute(Request request, String name, Object value)
{
// Do some extra profiling/ debugging. This can be a great help
// just for testing whether your webbapp will behave when using
// session replication
if (Application.get().getDebugSettings().getSerializeSessionAttributes())
{
if (val... | public void setAttribute(Request request, String name, Object value)
{
// Do some extra profiling/ debugging. This can be a great help
// just for testing whether your webbapp will behave when using
// session replication
if (Application.get().getDebugSettings().getSerializeSessionAttributes())
{
if (val... |
public CharSequence encodeURL(CharSequence url)
{
return currentResponse.encodeURL(url);
};
};
redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding());
// redirect the response to the buffer
setResponse(redirectResponse);
// render the page into the buffe... | public CharSequence encodeURL(CharSequence url)
{
return currentResponse.encodeURL(url);
};
};
redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding());
// redirect the response to the buffer
setResponse(redirectResponse);
// render the page into the buffe... |
public Page getTestPage()
{
return page;
}
});
// Setup the request. It should be a IMultipartWebRequest
RequestCycle requestCycle = tester.createRequestCycle();
MockHttpServletRequest servletRequest = tester.getServletRequest();
servletRequest.setMethod("POST");
servletRequest.setParameter("f... | public Page getTestPage()
{
return page;
}
});
// Setup the request. It should be a IMultipartWebRequest
RequestCycle requestCycle = tester.createRequestCycle();
MockHttpServletRequest servletRequest = tester.getServletRequest();
servletRequest.setMethod("POST");
servletRequest.setParameter("f... |
public static void main(String[] args) {
Tester.expectEvent("within 2 method-call");
Tester.expectEvent("within 2 method-execution");
new TargetClass().callInt(2);
Tester.checkAllEvents();
}
}
class TargetClass {
void callInt(int i) {
while (i > 0) { --i; }
}
}
... | public static void main(String[] args) {
Tester.expectEvent("within 2 method-call");
Tester.expectEvent("within 2 method-execution");
new TargetClass().callInt(2);
Tester.checkAllEvents();
}
}
class TargetClass {
void callInt(int i) {
while (i > 0) { --i; }
}
}
... |
public IRequestablePage getPageInstance(final int pageId)
{
IManageablePage manageablePage = Application.get().getPageManager().getPage(pageId);
IRequestablePage requestablePage = null;
if (manageablePage instanceof IRequestablePage)
{
requestablePage = (IRequestablePage)manageablePage;
}
return reques... | public IRequestablePage getPageInstance(final int pageId)
{
IManageablePage manageablePage = Session.get().getPageManager().getPage(pageId);
IRequestablePage requestablePage = null;
if (manageablePage instanceof IRequestablePage)
{
requestablePage = (IRequestablePage)manageablePage;
}
return requestabl... |
protected ISharedObjectContainer createClient() throws Exception {
// Make identity instance for the new container
ID newContainerID = IDFactory.getDefault().createGUID();
ISharedObjectContainer result = SharedObjectContainerFactory.getDefault().createSharedObjectContainer(contd,null,new Object[] { newContainer... | protected ISharedObjectContainer createClient() throws Exception {
// Make identity instance for the new container
ID newContainerID = IDFactory.getDefault().createGUID();
ISharedObjectContainer result = SharedObjectContainerFactory.getDefault().createSharedObjectContainer(contd,new Object[] { newContainerID, n... |
public AjConstructorDeclaration(CompilationResult compilationResult) {
super(compilationResult);
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile)
*/
protected int generateInfoAttributes(ClassFile clas... | public AjConstructorDeclaration(CompilationResult compilationResult) {
super(compilationResult);
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration#generateInfoAttributes(org.eclipse.jdt.internal.compiler.ClassFile)
*/
protected int generateInfoAttributes(ClassFile clas... |
protected void addAttribute(EclipseAttributeAdapter eaa) {
attributes.add(eaa);
}
/**
* Overridden to add extra AJ stuff, also adds synthetic if boolean is true.
*/
protected int generateInfoAttributes(ClassFile classFile,boolean addAjSynthetic) {
// add extra attributes into list then call 2-arg version ... | protected void addAttribute(EclipseAttributeAdapter eaa) {
attributes.add(eaa);
}
/**
* Overridden to add extra AJ stuff, also adds synthetic if boolean is true.
*/
protected int generateInfoAttributes(ClassFile classFile,boolean addAjSynthetic) {
// add extra attributes into list then call 2-arg version ... |
public ISourceLocation getSourceLocation() {
return getResolvedTypeX().getSourceContext().makeSourceLocation(0); //FIXME ??? we can do better than this
}
| public ISourceLocation getSourceLocation() {
return getResolvedTypeX().getSourceContext().makeSourceLocation(0, 0); //FIXME ??? we can do better than this
}
|
public static void main (String [] args) {
File sourceDir = new File("src/org/eclipse/swt/snippets");
boolean hasSource = sourceDir.exists();
int count = 300;
if (hasSource) {
File [] files = sourceDir.listFiles();
if (files.length > 0) count = files.length;
}
for (int i = 1; i < count; i++) {
if ... | public static void main (String [] args) {
File sourceDir = new File("src/org/eclipse/swt/snippets");
boolean hasSource = sourceDir.exists();
int count = 500;
if (hasSource) {
File [] files = sourceDir.listFiles();
if (files.length > 0) count = files.length;
}
for (int i = 1; i < count; i++) {
if ... |
private AssertionResult evaluateResponse(SampleResult response)
{
boolean pass = true;
boolean not = (NOT & getTestType()) > 0;
AssertionResult result = new AssertionResult();
String toCheck=""; // The string to check (Url or data)
// What are we testing against?
if (Res... | private AssertionResult evaluateResponse(SampleResult response)
{
boolean pass = true;
boolean not = (NOT & getTestType()) > 0;
AssertionResult result = new AssertionResult();
String toCheck=""; // The string to check (Url or data)
// What are we testing against?
if (Res... |
private void readRF(String res, List l) throws Exception
{
InputStream ras = this.getClass().getResourceAsStream(res);
BufferedReader fileReader =
new BufferedReader(new InputStreamReader(ras));
String s;
while((s=fileReader.readLine())!=null)
{
if (s.length() > 0) {
... | private void readRF(String res, List l) throws Exception
{
InputStream ras = this.getClass().getResourceAsStream(res);
BufferedReader fileReader =
new BufferedReader(new InputStreamReader(ras));
String s;
while((s=fileReader.readLine())!=null)
{
if (s.length() > 0 && !s... |
protected Commandline setupRmicCommand(String[] options) {
Commandline cmd = new Commandline();
if (options != null) {
for (int i = 0; i < options.length; i++) {
cmd.createArgument().setValue(options[i]);
}
}
Path classpath = getCompileClassp... | protected Commandline setupRmicCommand(String[] options) {
Commandline cmd = new Commandline();
if (options != null) {
for (int i = 0; i < options.length; i++) {
cmd.createArgument().setValue(options[i]);
}
}
Path classpath = getCompileClassp... |
private static Throwable translateStoreException(OpenJPAException ke) {
Exception e;
Throwable cause = (ke.getNestedThrowables() != null
&& ke.getNestedThrowables().length == 1)
? ke.getNestedThrowables()[0] : null;
if (ke.getSubtype() == Sto... | private static Throwable translateStoreException(OpenJPAException ke) {
Exception e;
Throwable cause = (ke.getNestedThrowables() != null
&& ke.getNestedThrowables().length == 1)
? ke.getNestedThrowables()[0] : null;
if (ke.getSubtype() == Sto... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int border = getBorderWidth ();
int width = border * 2, height = border * 2;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAUL... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
int border = getBorderWidth ();
int width = border * 2, height = border * 2;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAUL... |
public final void beforeRender()
{
if (!getFlag(FLAG_RENDERING) && !getFlag(FLAG_PREPARED_FOR_RENDER))
{
setFlag(FLAG_BEFORE_RENDERING_SUPER_CALL_VERIFIED, false);
onBeforeRender();
getApplication().notifyComponentOnBeforeRenderListeners(this);
if (!getFlag(FLAG_BEFORE_RENDERING_SUPER_CALL_VERIFIED))... | public final void beforeRender()
{
if (isVisible() && !getFlag(FLAG_RENDERING) && !getFlag(FLAG_PREPARED_FOR_RENDER))
{
setFlag(FLAG_BEFORE_RENDERING_SUPER_CALL_VERIFIED, false);
onBeforeRender();
getApplication().notifyComponentOnBeforeRenderListeners(this);
if (!getFlag(FLAG_BEFORE_RENDERING_SUPER_... |
public IME getIME () {
checkWidget();
return ime;
}
int kEventControlDraw (int nextHandler, int theEvent, int userData) {
int [] theControl = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamDirectObject, OS.typeControlRef, null, 4, null, theControl);
boolean isFocus = OS.VERSION < 0x1040 && theContr... | public IME getIME () {
checkWidget();
return ime;
}
int kEventControlDraw (int nextHandler, int theEvent, int userData) {
int [] theControl = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamDirectObject, OS.typeControlRef, null, 4, null, theControl);
boolean isFocus = OS.VERSION < 0x1040 && theContr... |
CharSequence transform(final Component component, final CharSequence output) throws Exception;
/*
* 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 ... | CharSequence transform(final Component component, final CharSequence output) throws Exception;
/*
* 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 ... |
private static AssertionResult verifySignature(SMIMEAssertionTestElement testElement, SMIMESignedParser s, String name)
throws CMSException {
AssertionResult res = new AssertionResult(name);
try {
CertStore certs = s.getCertificatesAndCRLs("Collection", "BC"); // $NON-NLS-1$... | private static AssertionResult verifySignature(SMIMEAssertionTestElement testElement, SMIMESignedParser s, String name)
throws CMSException {
AssertionResult res = new AssertionResult(name);
try {
CertStore certs = s.getCertificatesAndCRLs("Collection", "BC"); // $NON-NLS-1$... |
protected void execSQL(String sql, PrintStream out) throws SQLException {
// Check and ignore empty statements
if ("".equals(sql.trim())) {
return;
}
try {
totalSql++;
log("SQL: " + sql, Project.MSG_VERBOSE);
boolean ret;
... | protected void execSQL(String sql, PrintStream out) throws SQLException {
// Check and ignore empty statements
if ("".equals(sql.trim())) {
return;
}
try {
totalSql++;
log("SQL: " + sql, Project.MSG_VERBOSE);
boolean ret;
... |
public boolean contains(float x, float y, GC gc, boolean outline) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutorel... | public boolean contains(float x, float y, GC gc, boolean outline) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
NSAutoreleasePool pool = null;
if (!NSThread.isMainThread()) pool = (NSAutorel... |
public synchronized String execute(SampleResult result, Sampler sampler)
throws InvalidVariableException
{
String str = ""; //$NON-NLS-1$
CompoundVariable var = (CompoundVariable) values[0];
String exp = var.getRawParameters();
try
{
Expression e... | public synchronized String execute(SampleResult result, Sampler sampler)
throws InvalidVariableException
{
String str = ""; //$NON-NLS-1$
CompoundVariable var = (CompoundVariable) values[0];
String exp = var.execute();
try
{
Expression e = Expres... |
public boolean contains (int x, int y) {
return (x >= this.x) && (y >= this.y) && ((x - this.x) < width) && ((y - this.y) < height);
}
| public boolean contains (int x, int y) {
return (x >= this.x) && (y >= this.y) && x < (this.x + width) && y < (this.y + height);
}
|
public PngEncoder(ImageLoader loader) {
this.loader = loader;
this.data = loader.data[0];
this.transparencyType = data.getTransparencyType();
this.width = data.width;
this.height = data.height;
this.bitDepth = 8;
this.colorType = 2;
if (data.palette.isDirect) {
if (transparencyType == SWT.TRANSPARENC... | public PngEncoder(ImageLoader loader) {
this.loader = loader;
this.data = loader.data[0];
this.transparencyType = data.getTransparencyType();
this.width = data.width;
this.height = data.height;
this.bitDepth = 8;
this.colorType = 2;
if (data.palette.isDirect) {
if (transparencyType == SWT.TRANSPARENC... |
public String prepareURIForRequest(IRemoteCall call, IRemoteCallable callable) {
String resourcePath = callable.getResourcePath();
if (resourcePath == null || "".equals(resourcePath)) //$NON-NLS-1$
return null;
// if resourcePath startswith http then we use it unmodified
if (resourcePath.startsWith("http://... | public String prepareEndpoint(IRemoteCall call, IRemoteCallable callable) {
String resourcePath = callable.getResourcePath();
if (resourcePath == null || "".equals(resourcePath)) //$NON-NLS-1$
return null;
// if resourcePath startswith http then we use it unmodified
if (resourcePath.startsWith("http://")) /... |
public Object getActualValue(String content) throws InvalidDatatypeValueException {
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "date"});
}
}
| public Object getActualValue(String content) throws InvalidDatatypeValueException {
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "date"});
}
}
|
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "dateTime"});
}
... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, ... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gDay"});
}
... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, ... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gMonth"});
}
... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gMonthDay"});
}... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, ... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "time"});
}
}... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYear"});
}
... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "... |
public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return parse(content);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYearMonth"});
}... | public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
try{
return new DateTimeData(parse(content), this);
} catch(Exception ex){
throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "... |
public void initialize() {
;
}
/**
* Weave
*
* @param className
* @param bytes
* @param loader
* @return weaved bytes
*/
public byte[] preProcess(String className, byte[] bytes, ClassLoader loader) {
//TODO AV needs to doc that
if (loader == nu... | public void initialize() {
;
}
/**
* Weave
*
* @param className
* @param bytes
* @param loader
* @return weaved bytes
*/
public byte[] preProcess(String className, byte[] bytes, ClassLoader loader) {
//TODO AV needs to doc that
if (loader == nu... |
public void execute() throws BuildException {
// XXX: we should use JCVS (www.ice.com/JCVS) instead of command line
// execution so that we don't rely on having native CVS stuff around (SM)
// We can't do it ourselves as jCVS is GPLed, a third party task
// outside of jakarta repositories would... | public void execute() throws BuildException {
// XXX: we should use JCVS (www.ice.com/JCVS) instead of command line
// execution so that we don't rely on having native CVS stuff around (SM)
// We can't do it ourselves as jCVS is GPLed, a third party task
// outside of jakarta repositories would... |
public void defaultAlphabet()
{
Set<String> encoded = new HashSet<String>();
for (int i = 0; i < 10000; i++)
{
String enc = LongEncoder.encode(i);
Assert.assertFalse("uniqueness: " + i, encoded.contains(enc));
encoded.add(enc);
Assert.assertEquals("decoding: " + i, i, LongEncoder.decode(enc));
}
... | public void defaultAlphabet()
{
Set<String> encoded = new HashSet<String>();
for (int i = -10000; i < 10000; i++)
{
String enc = LongEncoder.encode(i);
Assert.assertFalse("uniqueness: " + i, encoded.contains(enc));
encoded.add(enc);
Assert.assertEquals("decoding: " + i, i, LongEncoder.decode(enc));
... |
public Date convertToObject(final String value, Locale locale)
{
if (value == null || Strings.isEmpty(value))
{
return null;
}
else
{
return (Date)parse(getDateFormat(locale), value, locale);
}
}
| public Date convertToObject(final String value, Locale locale)
{
if (value == null || Strings.isEmpty(value))
{
return null;
}
else
{
return new Date(((java.util.Date)parse(getDateFormat(locale), value, locale)).getTime());
}
}
|
private final void renderNext(final MarkupStream markupStream)
{
// Get the current markup element
final MarkupElement element = markupStream.get();
// If it a tag like <wicket..> or <span wicket:id="..." >
if ((element instanceof ComponentTag) && !markupStream.atCloseTag())
{
// Get element as tag
f... | private final void renderNext(final MarkupStream markupStream)
{
// Get the current markup element
final MarkupElement element = markupStream.get();
// If it a tag like <wicket..> or <span wicket:id="..." >
if ((element instanceof ComponentTag) && !markupStream.atCloseTag())
{
// Get element as tag
f... |
public StringBuffer filter(StringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if(headIndex != -1 && bodyIndex != -1)
{
HashMap map = new HashMa... | public StringBuffer filter(StringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if(headIndex != -1 && bodyIndex != -1)
{
HashMap map = new HashMa... |
public Object getObject(Component component)
{
return (getApplication().getAuthorizationStrategy().allowEnabledState(FormComponent.this) && FormComponent.this
.isEnabled()) ? null : "disabled";
}
| public Object getObject(Component component)
{
return (getApplication().getSecuritySettings().getAuthorizationStrategy().allowEnabledState(FormComponent.this) && FormComponent.this
.isEnabled()) ? null : "disabled";
}
|
private IResourceFactory getResourceFactory(final Application application,
final String factoryName)
{
final IResourceFactory factory = application.getResourceFactory(factoryName);
// Found factory?
if (factory == null)
{
throw new WicketRuntimeException("Could not find image resource factory named "
... | private IResourceFactory getResourceFactory(final Application application,
final String factoryName)
{
final IResourceFactory factory = application.getResourceSettings().getResourceFactory(factoryName);
// Found factory?
if (factory == null)
{
throw new WicketRuntimeException("Could not find image reso... |
public final MarkupElement nextTag() throws ParseException
{
// Get the next tag from the next MarkupFilter in the chain
// If null, no more tags are available
final ComponentTag tag = (ComponentTag)getParent().nextTag();
if (tag == null)
{
return tag;
}
final String wicketMessageAttribute = tag.get... | public final MarkupElement nextTag() throws ParseException
{
// Get the next tag from the next MarkupFilter in the chain
// If null, no more tags are available
final ComponentTag tag = (ComponentTag)getParent().nextTag();
if (tag == null)
{
return tag;
}
final String wicketMessageAttribute = tag.get... |
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
// It must be <body onload>
if (tag instanceof WicketTag)
{
WicketTag wtag = (WicketTag)tag;
if (wtag.isMessageTag() && (wtag.getNamespace() != null))
{
String messageKey = wtag.get... | public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
// It must be <body onload>
if (tag instanceof WicketTag)
{
WicketTag wtag = (WicketTag)tag;
if (wtag.isMessageTag() && (wtag.getNamespace() != null))
{
String messageKey = wtag.get... |
public CharSequence transform(final Component component, final String output) throws Exception
{
String filepath = component.findParentWithAssociatedMarkup().getClass().getPackage()
.getName().replace('.', '/')
+ "/" + component.getId();
IResourceStream resourceStream = Application.get().getResourceStrea... | public CharSequence transform(final Component component, final String output) throws Exception
{
String filepath = component.findParentWithAssociatedMarkup().getClass().getPackage()
.getName().replace('.', '/')
+ "/" + component.getId();
IResourceStream resourceStream = Application.get().getResourceSetti... |
public String encodeURL(String url)
{
// Get the crypt implementation from the application
ICrypt urlCrypt = Application.get().newCrypt();
if (urlCrypt != null)
{
// The url must have a query string, otherwise keep the url unchanged
final int pos = url.indexOf('?');
if (pos > 0)
{
... | public String encodeURL(String url)
{
// Get the crypt implementation from the application
ICrypt urlCrypt = Application.get().getSecuritySettings().getCryptFactory().newCrypt();
if (urlCrypt != null)
{
// The url must have a query string, otherwise keep the url unchanged
final int pos = url.in... |
protected final String encode(RequestCycle requestCycle,
IBookmarkablePageRequestTarget requestTarget)
{
final Class pageClass = requestTarget.getPageClass();
final Class homePageClass = requestCycle.getApplication().getPages().getHomePage();
// TODO fix homepage class
final PageParameters parameters = r... | protected final String encode(RequestCycle requestCycle,
IBookmarkablePageRequestTarget requestTarget)
{
final Class pageClass = requestTarget.getPageClass();
final Class homePageClass = requestCycle.getApplication().getRequiredPageSettings().getHomePage();
// TODO fix homepage class
final PageParameters... |
protected IRequestTarget resolveHomePageTarget(RequestCycle requestCycle,
RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class homePageClass = application.getPages().getHomePage()... | protected IRequestTarget resolveHomePageTarget(RequestCycle requestCycle,
RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class homePageClass = application.getRequiredPageSettings(... |
protected Page newPage(Class pageClass, RequestCycle requestCycle)
{
PageParameters params = pageParameters;
// TODO ? the parameters should already have been resolved ?
/*
* if (isMounted()) { //decode page parameters from url Request request =
* requestCycle.getRequest(); String urlFragment =
* requ... | protected Page newPage(Class pageClass, RequestCycle requestCycle)
{
PageParameters params = pageParameters;
// TODO ? the parameters should already have been resolved ?
/*
* if (isMounted()) { //decode page parameters from url Request request =
* requestCycle.getRequest(); String urlFragment =
* requ... |
public ExpiredPageClassRequestTarget()
{
super(Application.get().getPages().getPageExpiredErrorPage());
}
| public ExpiredPageClassRequestTarget()
{
super(Application.get().getRequiredPageSettings().getPageExpiredErrorPage());
}
|
protected Properties getProperties(final Class clazz, final Locale locale, final String style)
{
return application.getPropertiesFactory().get(application, clazz, style, locale);
}
| protected Properties getProperties(final Class clazz, final Locale locale, final String style)
{
return application.getResourceSettings().getPropertiesFactory().get(application, clazz, style, locale);
}
|
protected void setUp() throws Exception
{
super.setUp();
application = new MockWebApplication(null);
application.getPages().setHomePage(AttributeModifierComponentPage.class);
}
| protected void setUp() throws Exception
{
super.setUp();
application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(AttributeModifierComponentPage.class);
}
|
protected void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application.getPages().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
application.processRequestCycle();
assertEq... | protected void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application.getRequiredPageSettings().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
application.processRequestCycle... |
public void executeTest(final Class pageClass, final String filename) throws Exception
{
application = new MockWebApplication(null);
application.getPages().setHomePage(pageClass);
application.getSettings().setStripWicketTags(true);
// Do the processing
application.setupRequestAndResponse();
application.p... | public void executeTest(final Class pageClass, final String filename) throws Exception
{
application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(pageClass);
application.getSettings().setStripWicketTags(true);
// Do the processing
application.setupRequestAndResponse();
... |
public void testRenderHomePage_4() throws Exception
{
System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ===");
application.getPages().setHomePage(MarkupInheritanceExtension_4.class);
// Do the processing
application.setupRequestAndResponse();
application.processRequestCycle();... | public void testRenderHomePage_4() throws Exception
{
System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ===");
application.getRequiredPageSettings().setHomePage(MarkupInheritanceExtension_4.class);
// Do the processing
application.setupRequestAndResponse();
application.process... |
public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application = new MockWebApplication(null);
application.getPages().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
app... | public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(pageClass);
// Do the processing
application.setupRequestAndRe... |
public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application = new MockWebApplication(null);
application.getPages().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
app... | public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(pageClass);
// Do the processing
application.setupRequestAndRe... |
protected void setUp() throws Exception
{
super.setUp();
application.getComponentResolvers().add(new ScopedComponentResolver());
}
| protected void setUp() throws Exception
{
super.setUp();
application.getRequestCycleSettings().getComponentResolvers().add(new ScopedComponentResolver());
}
|
public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(PagedTableNavigatorPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorPage page = (PagedTableNavigatorPage)... | public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(PagedTableNavigatorPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorPage page = (PagedTabl... |
public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(PagedTableNavigatorWithLabelProviderPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorWithLabelProviderPag... | public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(PagedTableNavigatorWithLabelProviderPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorWithL... |
public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(PagedTableNavigatorWithMarginPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorWithMarginPage page = (Page... | public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(PagedTableNavigatorWithMarginPage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTableNavigatorWithMarginPa... |
public void testSimpleTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(SimpleTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
SimpleTablePage page = (SimpleTablePage)application.getLastRend... | public void testSimpleTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(SimpleTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
SimpleTablePage page = (SimpleTablePage)applicat... |
public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application.getPages().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
application.getWicketSession().setLocale(null);
... | public void executeTest(final Class pageClass, final String filename) throws Exception
{
System.out.println("=== " + pageClass.getName() + " ===");
application.getRequiredPageSettings().setHomePage(pageClass);
// Do the processing
application.setupRequestAndResponse();
application.getWicketSession().set... |
protected void setUp() throws Exception
{
super.setUp();
application = new MockWebApplication(null);
application.getPages().setHomePage(WicketPanelPage.class);
}
| protected void setUp() throws Exception
{
super.setUp();
application = new MockWebApplication(null);
application.getRequiredPageSettings().setHomePage(WicketPanelPage.class);
}
|
public static File getToolsJar() {
// firstly check if the tools jar is already in the classpath
boolean toolsJarAvailable = false;
try {
// just check whether this throws an exception
Class.forName("com.sun.tools.javac.Main");
toolsJarAvailable = true;
... | public static File getToolsJar() {
// firstly check if the tools jar is already in the classpath
boolean toolsJarAvailable = false;
try {
// just check whether this throws an exception
Class.forName("com.sun.tools.javac.Main");
toolsJarAvailable = true;
... |
public JSLPServiceInfo(IServiceInfo aSI) throws IDCreateException, SecurityException {
this(aSI.getLocation(), ServiceIDFactory.getDefault().createServiceID(IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME), aSI.getServiceID().getServiceTypeID()), aSI.getPriority(), aSI.getWeight(), aSI.getServicePropert... | public JSLPServiceInfo(IServiceInfo aSI) throws IDCreateException, SecurityException {
this(aSI.getLocation(), ServiceIDFactory.getDefault().createServiceID(IDFactory.getDefault().getNamespaceByName(JSLPNamespace.NAME), aSI.getServiceID().getServiceTypeID(), aSI.getServiceID().getServiceName()), aSI.getPriority(), a... |
public String toString() {
if (fDescription == null) {
StringBuffer buffer = new StringBuffer();
if (fCompositor == MODELGROUP_ALL)
buffer.append("all(");
else
buffer.append('(');
if (fParticles.length > 0)
buffe... | public String toString() {
if (fDescription == null) {
StringBuffer buffer = new StringBuffer();
if (fCompositor == MODELGROUP_ALL)
buffer.append("all(");
else
buffer.append('(');
if (fParticleCount > 0)
buffer.a... |
private void printElementDecl(PrintWriter out, String name, Class element)
throws BuildException {
if (visited.containsKey(name)) {
return;
}
visited.put(name, "");
IntrospectionHelper ih = IntrospectionHelper.getHelper(element);
StringBuffer sb = new ... | private void printElementDecl(PrintWriter out, String name, Class element)
throws BuildException {
if (visited.containsKey(name)) {
return;
}
visited.put(name, "");
IntrospectionHelper ih = IntrospectionHelper.getHelper(element);
StringBuffer sb = new ... |
public ClassMetaData[] getImplementorMetaDatas(Class cls,
ClassLoader envLoader, boolean mustExist) {
if (cls == null && mustExist)
throw new MetaDataException(_loc.get("no-meta", cls));
if (cls == null)
return EMPTY_METAS;
// get impls of given interface / a... | public ClassMetaData[] getImplementorMetaDatas(Class cls,
ClassLoader envLoader, boolean mustExist) {
if (cls == null && mustExist)
throw new MetaDataException(_loc.get("no-meta", cls));
if (cls == null)
return EMPTY_METAS;
// get impls of given interface / a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.