buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void retrieveBuddyList() throws IOException {
write("SYN", "0 0"); //$NON-NLS-1$ //$NON-NLS-2$
BufferedReader reader = new BufferedReader(new InputStreamReader(getInputStream()));
String input = reader.readLine();
while (input == null || !input.startsWith("SYN")) { //$NON-NLS-1$
input = reader.read... | private void retrieveBuddyList() throws IOException {
write("SYN", "0 0"); //$NON-NLS-1$ //$NON-NLS-2$
BufferedReader reader = new BufferedReader(new InputStreamReader(getInputStream(), "UTF-8")); //$NON-NLS-1$
String input = reader.readLine();
while (input == null || !input.startsWith("SYN")) { //$NON-NLS-1$... |
public int /*long*/ method4 (int /*long*/[] args) {return PromptForSaveToFile (args[0], args[1], args[2], args[3], args[4]);}
};
}
void disposeCOMInterfaces () {
if (supports != null) {
supports.dispose ();
supports = null;
}
if (helperAppLauncherDialog != null) {
helperAppLauncherDialog.dispose ();
h... | public int /*long*/ method4 (int /*long*/[] args) {return PromptForSaveToFile (args[0], args[1], args[2], args[3], args[4]);}
};
}
void disposeCOMInterfaces () {
if (supports != null) {
supports.dispose ();
supports = null;
}
if (helperAppLauncherDialog != null) {
helperAppLauncherDialog.dispose ();
h... |
public int /*long*/ method7 (int /*long*/[] args) {return IsNonBlocking (args[0]);}
};
}
void disposeCOMInterfaces () {
if (inputStream != null) {
inputStream.dispose ();
inputStream = null;
}
}
int /*long*/ getAddress () {
return inputStream.getAddress ();
}
int /*long*/ QueryInterface (int /*long*/ riid... | public int /*long*/ method7 (int /*long*/[] args) {return IsNonBlocking (args[0]);}
};
}
void disposeCOMInterfaces () {
if (inputStream != null) {
inputStream.dispose ();
inputStream = null;
}
}
int /*long*/ getAddress () {
return inputStream.getAddress ();
}
int /*long*/ QueryInterface (int /*long*/ riid... |
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 Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0, height = 0;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAULT_WIDTH; height += 5;
} else {
width += 5; height += DEFAULT_HEIGHT;
}
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = ... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0, height = 0;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAULT_WIDTH; height += 5;
} else {
width += 5; height += DEFAULT_HEIGHT;
}
if (wHint != SWT.DEFAULT) width = wHint;
if (hHint != SWT.DEFAULT) height = ... |
public void setAttributeNS(String namespaceURI,String qualifiedName,
String value) {
if (ownerDocument.errorChecking && isReadOnly()) {
String msg =
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"NO_MODIFICATION_ALLOWED_ERR",
null);
throw ... | public void setAttributeNS(String namespaceURI,String qualifiedName,
String value) {
if (ownerDocument.errorChecking && isReadOnly()) {
String msg =
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"NO_MODIFICATION_ALLOWED_ERR",
null);
throw ... |
public void map(boolean adapt) {
super.map(adapt);
ValueMapping key = field.getKeyMapping();
if (key.getTypeCode() != JavaTypes.PC || key.isEmbeddedPC())
throw new MetaDataException(_loc.get("not-relation", key));
ValueMapping val = field.getElementMapping();
if ... | public void map(boolean adapt) {
super.map(adapt);
ValueMapping key = field.getKeyMapping();
if (key.getTypeCode() != JavaTypes.PC || key.isEmbeddedPC())
throw new MetaDataException(_loc.get("not-relation", key));
ValueMapping val = field.getElementMapping();
if ... |
public void bug_testCustomParametersWithSpecialCharacters()
{
BookmarkablePageLink<MockPageWithLink> link = new BookmarkablePageLink<MockPageWithLink>(
"link", MockPageWithLink.class);
link.getPageParameters().set("urlEscapeNeeded", "someone's ^b%a&d pa\"rameter");
tester.startComponentInPage(link, null);
... | public void testCustomParametersWithSpecialCharacters()
{
BookmarkablePageLink<MockPageWithLink> link = new BookmarkablePageLink<MockPageWithLink>(
"link", MockPageWithLink.class);
link.getPageParameters().set("urlEscapeNeeded", "someone's ^b%a&d pa\"rameter");
tester.startComponentInPage(link, null);
Str... |
public int getTo()
{
if (getOf() == 0)
{
return 0;
}
return Math.min(getOf(), getFrom() + table.getRowsPerPage());
}
}
| public int getTo()
{
if (getOf() == 0)
{
return 0;
}
return Math.min(getOf(), getFrom() + table.getRowsPerPage()-1);
}
}
|
private void unpackAjAttributes(World world) {
associatedShadowMunger = null;
List as = BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),method.getAttributes(), getSourceContext(world),world.getMessageHandler());
processAttributes(world, as);
as = AtAjAttributes.readAj5MethodAttributes(m... | private void unpackAjAttributes(World world) {
associatedShadowMunger = null;
List as = BcelAttributes.readAjAttributes(getDeclaringType().getClassName(),method.getAttributes(), getSourceContext(world),world.getMessageHandler());
processAttributes(world, as);
as = AtAjAttributes.readAj5MethodAttributes(m... |
public LogFactory[] getDelegates() {
return (LogFactory[]) _delegates.toArray(new LogFactory[0]);
}
| public LogFactory[] getDelegates() {
return (LogFactory[]) _delegates.toArray(new LogFactory[_delegates.size()]);
}
|
public StringBuilder asValue(AliasContext q) {
return Expressions.asValue(q, "LOCATE", OPEN_BRACE, pattern, COMMA, path, CLOSE_BRACE);
}
}
public static class Trim extends BinarayFunctionalExpression<String> {
static Expression<Character> defaultTrim = new Constant<Chara... | public StringBuilder asValue(AliasContext q) {
return Expressions.asValue(q, "LOCATE", OPEN_BRACE, pattern, COMMA, path, CLOSE_BRACE);
}
}
public static class Trim extends BinarayFunctionalExpression<String> {
static Expression<Character> defaultTrim = new Constant<Chara... |
private String readAspect(String name, ClassLoader loader){
if (true) return name+"@"+(loader==null?"0":loader.hashCode());
// FIXME AV - ?? can someone tell me why we read the whole bytecode
// especially one byte by one byte
// also it does some NPE sometime (see AtAjLTW "LTW Decp2... | private String readAspect(String name, ClassLoader loader){
if (true) return name+"@"+(loader==null?"0":Integer.toString(loader.hashCode()));
// FIXME AV - ?? can someone tell me why we read the whole bytecode
// especially one byte by one byte
// also it does some NPE sometime (see ... |
public boolean dragDetect (MouseEvent event) {
checkWidget ();
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
return dragDetect (event.button, event.count, event.stateMask, event.x, event.y);
}
boolean dragDetect (int button, int count, int stateMask, int x, int y) {
if (button != 1 || count != 1) return fals... | public boolean dragDetect (MouseEvent event) {
checkWidget ();
if (event == null) error (SWT.ERROR_NULL_ARGUMENT);
return dragDetect (event.button, event.count, event.stateMask, event.x, event.y);
}
boolean dragDetect (int button, int count, int stateMask, int x, int y) {
if (button != 1 || count != 1) return fals... |
public Object transform(Object value) {
if (value instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) value;
Object selection = structuredSelection.getFirstElement();
if (selection instanceof IFile) {
IFile ... | public Object transform(Object value) {
if (value instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) value;
Object selection = structuredSelection.getFirstElement();
if (selection instanceof IFile) {
IFile ... |
public static final native long getNativeHandleFromAWT(Object frame);
} | public static final native int getNativeHandleFromAWT(Object frame);
} |
public void write(byte[] b, int off, int len) throws IOException
{
if (off == 0 || len == b.length)
{
write(b);
}
else
{
byte copy[] = new byte[len];
System.arraycopy(b, off, copy, 0, len);
write(copy);
}
}
};
try
{
Streams.copy(stream, s);
... | public void write(byte[] b, int off, int len) throws IOException
{
if (off == 0 && len == b.length)
{
write(b);
}
else
{
byte copy[] = new byte[len];
System.arraycopy(b, off, copy, 0, len);
write(copy);
}
}
};
try
{
Streams.copy(stream, s);
... |
public static void main(String args[]){
int port = 8080;
if (args.length > 0){
port = Integer.parseInt(args[0]);
}
LoggingManager.setPriority("INFO"); // default level
LoggingManager.setLoggingLevels(System.getProperties() ); // allow override by system properties... | public static void main(String args[]){
int port = 8081;
if (args.length > 0){
port = Integer.parseInt(args[0]);
}
LoggingManager.setPriority("INFO"); // default level
LoggingManager.setLoggingLevels(System.getProperties() ); // allow override by system properties... |
public DBDictionary() {
fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{
"BIGINT", "BIT", "BLOB", "CLOB", "DATE", "DECIMAL", "DISTINCT",
"DOUBLE", "FLOAT", "INTEGER", "JAVA_OBJECT", "NULL",
"OTHER", "REAL", "REF", "SMALLINT", "STRUCT", "TIME", "TIMESTAMP",
... | public DBDictionary() {
fixedSizeTypeNameSet.addAll(Arrays.asList(new String[]{
"BIGINT", "BIT", "BLOB", "CLOB", "DATE", "DECIMAL", "DISTINCT",
"DOUBLE", "FLOAT", "INTEGER", "JAVA_OBJECT", "NULL", "NUMERIC",
"OTHER", "REAL", "REF", "SMALLINT", "STRUCT", "TIME", "TIMESTAMP... |
public void layout (Control [] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... | public void layout (Control [] changed) {
checkWidget ();
if (changed == null) error (SWT.ERROR_INVALID_ARGUMENT);
for (int i=0; i<changed.length; i++) {
Control control = changed [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
bool... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0;
if (wHint == SWT.DEFAULT) {
NSCell cell = column.dataCell ();
Font font = this.font != null ? this.font : defaultFont ();
cell.setFont (font.handle);
for (int i = 0; i < items.length; i++) {
if (items[i] != nu... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int width = 0;
if (wHint == SWT.DEFAULT) {
NSCell cell = column.dataCell ();
Font font = this.font != null ? this.font : defaultFont ();
cell.setFont (font.handle);
for (int i = 0; i < items.length; i++) {
if (items[i] != nu... |
public void setUp() {
super.setUp(CLEAR_TABLES, State.class, Transition.class);
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
if (dict instanceof OracleDictionary) {
((OracleDictionary) dict).useTriggersForAutoAssign = true;
... | public void setUp() {
super.setUp(DROP_TABLES, State.class, Transition.class);
DBDictionary dict = ((JDBCConfiguration) emf.getConfiguration()).getDBDictionaryInstance();
if (dict instanceof OracleDictionary) {
((OracleDictionary) dict).useTriggersForAutoAssign = true;
... |
private static String makeDeclaredSignature(ResolvedType aGenericType, UnresolvedType[] someParameters) {
StringBuffer ret = new StringBuffer();
String rawSig = aGenericType.getErasureSignature();
ret.append(rawSig.substring(0,rawSig.length()-1));
ret.append("<");
for (int i = 0; i < someParameters.length; ... | private static String makeDeclaredSignature(ResolvedType aGenericType, UnresolvedType[] someParameters) {
StringBuffer ret = new StringBuffer();
String rawSig = aGenericType.getErasureSignature();
ret.append(rawSig.substring(0,rawSig.length()-1));
ret.append("<");
for (int i = 0; i < someParameters.length; ... |
public static byte[] wcsToMbcs (String codePage, String string, boolean terminate) {
char[] chars = new char [string.length()];
string.getChars (0, chars.length, chars, 0);
int cfstring = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
byte[] buffer = null;
if (cfstring != 0) {
CFR... | public static byte[] wcsToMbcs (String codePage, String string, boolean terminate) {
char[] chars = new char [string.length()];
string.getChars (0, chars.length, chars, 0);
int cfstring = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, chars, chars.length);
byte[] buffer = null;
if (cfstring != 0) {
CFR... |
public String toString()
{
return toExtension().toString();
}
| public String toString()
{
return "{" + toExtension().toString() + "}";
}
|
public Apt() {
super();
super.setCompiler(AptExternalCompilerAdapter.class.getName());
setFork(true);
}
| public Apt() {
super();
super.setCompiler(AptExternalCompilerAdapter.class.getName());
super.setFork(true);
}
|
protected final void setAttribute(String name, Object value)
{
if (!isTemporary())
{
RequestCycle cycle = RequestCycle.get();
if (cycle == null)
{
throw new IllegalStateException(
"Cannot set the attribute: no RequestCycle available");
}
ISessionStore store = getSessionStore();
Reques... | protected final void setAttribute(String name, Object value)
{
if (!isTemporary())
{
RequestCycle cycle = RequestCycle.get();
if (cycle == null)
{
throw new IllegalStateException(
"Cannot set the attribute: no RequestCycle available. If you get this error when using WicketTester.startPage(Page... |
protected void removeDefault (Attr attribute, AttributeMap attrMap){
if ((fDocument.features & CoreDocumentImpl.DEFAULTS) != 0) {
// remove default attributes
if (!attribute.getSpecified()) {
if (DEBUG_ND) {
System.out.println("==>remove default at... | protected void removeDefault (Attr attribute, AttributeMap attrMap){
if ((fDocument.features & CoreDocumentImpl.DEFAULTS) != 0) {
// remove default attributes
if (!attribute.getSpecified()) {
if (DEBUG_ND) {
System.out.println("==>remove default at... |
public Attr removeAttributeNode(Attr oldAttr)
throws DOMException {
if (ownerDocument.errorChecking && isReadOnly()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
"DOM001 Modification not allowed");
}
if (needs... | public Attr removeAttributeNode(Attr oldAttr)
throws DOMException {
if (ownerDocument.errorChecking && isReadOnly()) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
"DOM001 Modification not allowed");
}
if (needs... |
private static InternetAddress[] internetAddresses( Vector list )
throws AddressException, UnsupportedEncodingException
{
InternetAddress addrs[] = new InternetAddress[ list.size() ];
for( int i = 0; i < list.size(); ++i )
{
EmailAddress addr = (EmailAddress)list.elem... | private static InternetAddress[] internetAddresses( Vector list )
throws AddressException, UnsupportedEncodingException
{
InternetAddress[] addrs = new InternetAddress[ list.size() ];
for( int i = 0; i < list.size(); ++i )
{
EmailAddress addr = (EmailAddress)list.elem... |
public ShadowMunger concretize(ResolvedTypeX fromType, World world, PerClause clause) {
pointcut = pointcut.concretize(fromType, 0);
return this;
}
| public ShadowMunger concretize(ResolvedTypeX fromType, World world, PerClause clause) {
pointcut = pointcut.concretize(fromType, 0, this);
return this;
}
|
private void addShadowMunger(ShadowMunger m) {
//if (inAspect.isAbstract()) return; // we don't do mungers for abstract aspects
addConcreteShadowMunger(m.concretize(inAspect, world, perClause));
}
| private void addShadowMunger(ShadowMunger m) {
if (inAspect.isAbstract()) return; // we don't do mungers for abstract aspects
addConcreteShadowMunger(m.concretize(inAspect, world, perClause));
}
|
public PerClause concretize(ResolvedTypeX inAspect) {
PerCflow ret = new PerCflow(entry, isBelow);
ret.inAspect = inAspect;
if (inAspect.isAbstract()) return ret;
Member cflowStackField = new ResolvedMember(
Member.FIELD, inAspect, Modifier.STATIC|Modifier.PUBLIC|Modifier.FINAL,
TypeX.forName(NameM... | public PerClause concretize(ResolvedTypeX inAspect) {
PerCflow ret = new PerCflow(entry, isBelow);
ret.inAspect = inAspect;
if (inAspect.isAbstract()) return ret;
Member cflowStackField = new ResolvedMember(
Member.FIELD, inAspect, Modifier.STATIC|Modifier.PUBLIC|Modifier.FINAL,
TypeX.forName(NameM... |
public PerClause concretize(ResolvedTypeX inAspect) {
PerObject ret = new PerObject(entry, isThis);
ret.inAspect = inAspect;
if (inAspect.isAbstract()) return ret;
World world = inAspect.getWorld();
Pointcut concreteEntry = entry.concretize(inAspect, IntMap.EMPTY);
//concreteEntry = new AndPoin... | public PerClause concretize(ResolvedTypeX inAspect) {
PerObject ret = new PerObject(entry, isThis);
ret.inAspect = inAspect;
if (inAspect.isAbstract()) return ret;
World world = inAspect.getWorld();
Pointcut concreteEntry = entry.concretize(inAspect, 0, null);
//concreteEntry = new AndPointcut(... |
protected int /*long*/ getLicenseInfo(GUID clsid) {
int /*long*/[] ppvObject = new int /*long*/[1];
if (COM.CoGetClassObject(clsid, COM.CLSCTX_INPROC_HANDLER
| COM.CLSCTX_INPROC_SERVER, 0, COM.IIDIClassFactory, ppvObject) != COM.S_OK) {
return 0;
}
int result = 0;
IUnknown unknown = new IUnknown(ppvObject[0]... | protected int /*long*/ getLicenseInfo(GUID clsid) {
int /*long*/[] ppvObject = new int /*long*/[1];
if (COM.CoGetClassObject(clsid, COM.CLSCTX_INPROC_HANDLER
| COM.CLSCTX_INPROC_SERVER, 0, COM.IIDIClassFactory, ppvObject) != COM.S_OK) {
return 0;
}
int /*long*/ result = 0;
IUnknown unknown = new IUnknown(ppv... |
public void onLinkClicked() {
final RequestCycle requestCycle = getRequestCycle();
System.err.println("Linked clicked for letter: " + letter);
setEnabled(false);
Guess guessPage = (Guess)requestCycle.getPage();
Hangman hangman = (Hangman)guessPage.getM... | public void onClick() {
final RequestCycle requestCycle = getRequestCycle();
System.err.println("Linked clicked for letter: " + letter);
setEnabled(false);
Guess guessPage = (Guess)requestCycle.getPage();
Hangman hangman = (Hangman)guessPage.getModelOb... |
public void onLinkClicked() {
Hangman hangman = (Hangman) guessPage.getModelObject();
hangman.newGame();
guessPage.resetLetters();
getRequestCycle().setPage(guessPage);
}
});
}
} | public void onClick() {
Hangman hangman = (Hangman) guessPage.getModelObject();
hangman.newGame();
guessPage.resetLetters();
getRequestCycle().setPage(guessPage);
}
});
}
} |
public void onLinkClicked() {
Hangman hangman = (Hangman)guessPage.getModelObject();
hangman.newGame();
guessPage.resetLetters();
getRequestCycle().setPage(guessPage);
}
});
}
} | public void onClick() {
Hangman hangman = (Hangman)guessPage.getModelObject();
hangman.newGame();
guessPage.resetLetters();
getRequestCycle().setPage(guessPage);
}
});
}
} |
public void onLinkClicked()
{
File toDelete = new File(tempDir, fileName);
log.info("delete " + toDelete);
toDelete.delete();
try
{
Thread.sleep(100); // wait for ... | public void onClick()
{
File toDelete = new File(tempDir, fileName);
log.info("delete " + toDelete);
toDelete.delete();
try
{
Thread.sleep(100); // wait for file l... |
private void contributeDependencies(IHeaderResponse response)
{
response.renderJavascriptReference(new PackageResourceReference(YuiLib.class,
"yahoo-dom-event/yahoo-dom-event.js"));
response.renderJavascriptReference(new PackageResourceReference(AbstractCalendar.class,
"calendar-min.js"));
response.rend... | private void contributeDependencies(IHeaderResponse response)
{
response.renderJavascriptReference(new PackageResourceReference(YuiLib.class,
"yahoodomevent/yahoo-dom-event.js"));
response.renderJavascriptReference(new PackageResourceReference(AbstractCalendar.class,
"calendar-min.js"));
response.render... |
protected void executedBehavior(final Class pageClass, final AbstractAjaxBehavior behavior,
final String filename) throws Exception
{
assertNotNull(behavior);
System.out.println("=== " + pageClass.getName() + " : " + behavior.toString() + " ===");
application.setupRequestAndResponse();
WebRequestCycl... | protected void executedBehavior(final Class pageClass, final AbstractAjaxBehavior behavior,
final String filename) throws Exception
{
assertNotNull(behavior);
System.out.println("=== " + pageClass.getName() + " : " + behavior.toString() + " ===");
application.setupRequestAndResponse();
WebRequestCycl... |
public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
if (popup != null) {
log.debug("Showing pop up for " + invoker + " at x,y = " + e.getX() + "," + e.getY());
popup.pack();
popup.show(invoker, e.getX(), e.getY());
popup.setVisible(t... | public void displayPopUp(Component invoker, MouseEvent e, JPopupMenu popup) {
if (popup != null) {
log.debug("Showing pop up for " + invoker + " at x,y = " + e.getX() + "," + e.getY());
popup.pack();
popup.show(invoker, e.getX(), e.getY());
popup.setVisible(t... |
public void run() {
comp.requestFocus();
}
});
}
| public void run() {
comp.requestFocusInWindow();
}
});
}
|
public void focusLost(FocusEvent e) {
try {
dateFormat.parse(getText());
} catch (ParseException e1) {
requestFocus();
}
}
}
| public void focusLost(FocusEvent e) {
try {
dateFormat.parse(getText());
} catch (ParseException e1) {
requestFocusInWindow();
}
}
}
|
private long checkTextField(FocusEvent evt, String defaultValue) {
JTextField temp = (JTextField) evt.getSource();
// boolean pass = true;
long longVal = 0;
try {
longVal = Long.parseLong(temp.getText());
} catch (NumberFormatException err) {
JOptionP... | private long checkTextField(FocusEvent evt, String defaultValue) {
JTextField temp = (JTextField) evt.getSource();
// boolean pass = true;
long longVal = 0;
try {
longVal = Long.parseLong(temp.getText());
} catch (NumberFormatException err) {
JOptionP... |
private void displayPopUp(MouseEvent e, JPopupMenu popup) {
log.warn("Shouldn't be here");
if (popup != null) {
popup.pack();
popup.show(tree, e.getX(), e.getY());
popup.setVisible(true);
popup.requestFocus();
}
}
| private void displayPopUp(MouseEvent e, JPopupMenu popup) {
log.warn("Shouldn't be here");
if (popup != null) {
popup.pack();
popup.show(tree, e.getX(), e.getY());
popup.setVisible(true);
popup.requestFocusInWindow();
}
}
|
protected IDataStore newDataStore()
{
IStoreSettings storeSettings = getStoreSettings();
Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
File fileStoreFolder = storeSettings.getFileStoreFolder();
return new DiskDataStore(application.getName(), fileStoreFolder, maxSizePerSession);
}
IStoreS... | protected IDataStore newDataStore()
{
IStoreSettings storeSettings = getStoreSettings();
Bytes maxSizePerSession = storeSettings.getMaxSizePerSession();
File fileStoreFolder = storeSettings.getFileStoreFolder();
return new DiskDataStore(application.getName(), fileStoreFolder, maxSizePerSession);
}
IStoreS... |
public void testCreateAllowedComponent() throws Exception
{
new WicketTester();
new WebComponent(new EmptyPage(), "test");
}
| public void testCreateAllowedComponent() throws Exception
{
new WicketTester();
new WebComponent(new MockPageWithOneComponent(), "component");
}
|
public void testInComponentConstructor()
{
new MyLabel(new EmptyPage(), "myLabel");
}
| public void testInComponentConstructor()
{
new MyLabel(new MockPageWithOneComponent(), "component");
}
|
public void testIteratorOrder()
{
MarkupContainer container = new WebMarkupContainer(new EmptyPage(), "test");
for (int i = 0; i < 10; i++)
{
new WebComponent(container, Integer.toString(i));
}
int i = 0;
Iterator iter = container.iterator();
while (iter.hasNext())
{
Component component = (Compo... | public void testIteratorOrder()
{
MarkupContainer container = new WebMarkupContainer(new MockPageWithOneComponent(), "component");
for (int i = 0; i < 10; i++)
{
new WebComponent(container, Integer.toString(i));
}
int i = 0;
Iterator iter = container.iterator();
while (iter.hasNext())
{
Componen... |
public BorderTestHierarchyPage_4()
{
Border border = new BorderComponent1(this, "border1");
new Label(border, "label1");
}
| public BorderTestHierarchyPage_4()
{
Border border = new BorderComponent1(this, "border1");
new Label(this, "label1");
}
|
public int Point.check(int i, Line l) { return 1 + i; }
}
aspect DeclareCoverage {
pointcut illegalNewFigElt(): call(Point.new(..)) && !withincode(* *.doIt(..));
declare error: illegalNewFigElt(): "Illegal constructor call.";
declare warning: call(* Point.setX(..)): "Illegal call.";
declare pare... | public int Point.check(int i, Line l) { return 1 + i; }
}
aspect DeclareCoverage {
pointcut illegalNewFigElt(): call(Point.new(..)) && !withincode(* *.doIt(..));
declare error: illegalNewFigElt(): "Illegal constructor call.";
declare warning: call(* Point.setX(..)): "Illegal call.";
declare pare... |
private void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm,
Object vals)
throws SQLException {
Collection coll;
if (field.getTypeCode() == JavaTypes.ARRAY)
coll = JavaTypes.toList(vals, field.getElement().getType(),
false);
else
... | private void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm,
Object vals)
throws SQLException {
Collection coll;
if (field.getTypeCode() == JavaTypes.ARRAY)
coll = JavaTypes.toList(vals, field.getElement().getType(),
false);
else
... |
private void insert(OpenJPAStateManager sm, RowManager rm, Object vals)
throws SQLException {
Collection coll = toCollection(vals);
if (coll == null || coll.isEmpty())
return;
Row row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT);
row.setForeignKey(fi... | private void insert(OpenJPAStateManager sm, RowManager rm, Object vals)
throws SQLException {
Collection coll = toCollection(vals);
if (coll == null || coll.isEmpty())
return;
Row row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT);
row.setForeignKey(fi... |
protected String normalize(String fileName) {
if(fileName != null && !fileName.startsWith(FILEURL)) {
return FILEURL + fileName;
}
return fileName;
}
| protected String normalize(String fileName) {
if(fileName != null && !fileName.startsWith(FILEURL)) {
return FILEURL + "///" + fileName;
}
return fileName;
}
|
public void validate(Form form)
{
// we have a choice to validate the type converted values or the raw
// input values, we validate the raw input
final FormComponent formComponent1 = components[0];
final FormComponent<?> formComponent2 = components[1];
if (!Objects.equal(formComponent1.getInput(), formComp... | public void validate(Form form)
{
// we have a choice to validate the type converted values or the raw
// input values, we validate the raw input
final FormComponent formComponent1 = components[0];
final FormComponent<?> formComponent2 = components[1];
if (!Objects.equal(formComponent1.getInput(), formComp... |
private void addPath(String path, boolean getJars, List libPathURLs)
throws MalformedURLException {
StringTokenizer tokenizer = new StringTokenizer(path, File.pathSeparator);
while(tokenizer.hasMoreElements()) {
String elementName = tokenizer.nextToken();
File ele... | private void addPath(String path, boolean getJars, List libPathURLs)
throws MalformedURLException {
StringTokenizer tokenizer = new StringTokenizer(path, File.pathSeparator);
while(tokenizer.hasMoreElements()) {
String elementName = tokenizer.nextToken();
File ele... |
public void execute() {
if (_name == null) {
throw new BuildException("Missing 'property' attribute!");
}
if (_dir == null) {
throw new BuildException("Missing 'jarfile' attribute!");
}
if (getProject().getProperty(_name) != null) {
throw new Bui... | public void execute() {
if (_name == null) {
throw new BuildException("Missing 'property' attribute!");
}
if (_dir == null) {
throw new BuildException("Missing 'jarfile' attribute!");
}
if (getProject().getProperty(_name) != null) {
throw new Bui... |
public String toURI(String path) {
// #8031: first try Java 1.4.
Class uriClazz = null;
try {
uriClazz = Class.forName("java.net.URI");
} catch (ClassNotFoundException e) {
// OK, Java 1.3.
}
if (uriClazz != null) {
try {
... | public String toURI(String path) {
// #8031: first try Java 1.4.
Class uriClazz = null;
try {
uriClazz = Class.forName("java.net.URI");
} catch (ClassNotFoundException e) {
// OK, Java 1.3.
}
if (uriClazz != null) {
try {
... |
private List<Outlet> getInitializedOutlets() {
if (_initializedOutlets.isEmpty()) {
final List<Outlet> result = new ArrayList<Outlet> (_outlets);
if (result.isEmpty()) {
if (_genPath != null) { // backward compatibility
result.add (new Outlet (fals... | private List<Outlet> getInitializedOutlets() {
if (_initializedOutlets.isEmpty()) {
final List<Outlet> result = new ArrayList<Outlet> (_outlets);
if (result.isEmpty()) {
if (_genPath != null) { // backward compatibility
result.add (new Outlet (fals... |
public void testFilenameAndFiledirAsParam() throws Exception {
executeTarget("testFilenameAndFiledirAsParam");
assertFileContains("out/out/one.txt", "filename='one.xml'");
assertFileContains("out/out/one.txt", "filedir =''");
assertFileContains("out/out/dir/four.txt", "file... | public void testFilenameAndFiledirAsParam() throws Exception {
executeTarget("testFilenameAndFiledirAsParam");
assertFileContains("out/out/one.txt", "filename='one.xml'");
assertFileContains("out/out/one.txt", "filedir ='.'");
assertFileContains("out/out/dir/four.txt", "fil... |
public void process(IFormSubmittingComponent submittingComponent)
{
// save the page in case the component is removed during submit
Page page = getPage();
| public void process(IFormSubmittingComponent submittingComponent)
{
// save the page in case the component is removed during submit
final Page page = getPage();
|
public void testRender_2()
{
tester.startPage(MockFormAndButtonPage.class);
tester.assertContains("<input name=\"button\" type=\"submit\" wicket:id=\"button\"/>");
String doc = tester.getServletResponse().getDocument();
boolean contains = doc.contains("<input onclick=\"var e=document.getElementById('form:hf:... | public void testRender_2()
{
tester.startPage(MockFormAndButtonPage.class);
tester.assertContains("<input name=\"button\" type=\"submit\" wicket:id=\"button\"/>");
String doc = tester.getServletResponse().getDocument();
boolean contains = doc.contains("<input onclick=\"var e=document.getElementById('form0:hf... |
public Object attach(AttachManager manager, Object toAttach,
ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner,
ValueMetaData ownerMeta, boolean explicit) {
BrokerImpl broker = manager.getBroker();
PersistenceCapable pc = ImplHelper.toPersistenceCapable(toAttach,... | public Object attach(AttachManager manager, Object toAttach,
ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner,
ValueMetaData ownerMeta, boolean explicit) {
BrokerImpl broker = manager.getBroker();
PersistenceCapable pc = ImplHelper.toPersistenceCapable(toAttach,... |
public void setLineStyle(int lineStyle) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int style = -1;
switch (lineStyle) {
case SWT.LINE_SOLID: style = OS.PS_SOLID; break;
case SWT.LINE_DASH: style = OS.PS_DASH; break;
case SWT.LINE_DOT: style = OS.PS_DOT; break;
case SWT.LINE_D... | public void setLineStyle(int lineStyle) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
int style = -1;
switch (lineStyle) {
case SWT.LINE_SOLID: style = OS.PS_SOLID; break;
case SWT.LINE_DASH: style = OS.PS_DASH; break;
case SWT.LINE_DOT: style = OS.PS_DOT; break;
case SWT.LINE_D... |
protected Properties getProperties(int database){
Properties props = null;
switch (database){
case ORACLE:
props = getProperties("oracle.jdbc.driver.OracleDriver", "test", "test", "jdbc:oracle:thin:@127.0.0.1:1521:orcl");
break;
case MYSQL:
... | protected Properties getProperties(int database){
Properties props = null;
switch (database){
case ORACLE:
props = getProperties("oracle.jdbc.driver.OracleDriver", "test", "test", "jdbc:oracle:thin:@127.0.0.1:1521:orcl");
break;
case MYSQL:
... |
public interface Constants
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.myrmidon;
/**
* A... | public interface Constants
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.myrmidon;
/**
* A... |
public final static void main( final String[] args )
throws Exception
{
try
{
//actually try to discover the install directory based on where
// the myrmidon.jar is
final File installDirectory = findInstallDir();
System.setProperty( "myrmid... | public final static void main( final String[] args )
throws Exception
{
try
{
//actually try to discover the install directory based on where
// the myrmidon.jar is
final File installDirectory = findInstallDir();
System.setProperty( "myrmid... |
protected XQueryParser prepareParser(String fileName, char[] source, IProblemReporter reporter) {
if (fParser != null) {
return fParser;
}
ANTLRStringStream inputStream = new ANTLRStringStream(source, source.length);
XQueryLexer lexer = new XQueryLexer(inputStream);
... | protected XQueryParser prepareParser(String fileName, char[] source, IProblemReporter reporter) {
if (fParser != null) {
return fParser;
}
ANTLRStringStream inputStream = new ANTLRStringStream(source, source.length);
XQueryLexer lexer = new XQueryLexer(inputStream);
... |
private final ResolvedType resolveToReferenceType(UnresolvedType ty) {
if (ty.isParameterizedType()) {
// ======= parameterized types ================
ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false);
ReferenceType parameterizedType =
TypeFactory.createParameterizedType(gen... | private final ResolvedType resolveToReferenceType(UnresolvedType ty) {
if (ty.isParameterizedType()) {
// ======= parameterized types ================
ReferenceType genericType = (ReferenceType)resolveGenericTypeFor(ty,false);
ReferenceType parameterizedType =
TypeFactory.createParameterizedType(gen... |
public void mathFunction(SQLBuffer buf, String op, FilterValue lhs,
FilterValue rhs) {
boolean castlhs = false;
boolean castrhs = false;
Class lc = Filters.wrap(lhs.getType());
Class rc = Filters.wrap(rhs.getType());
int type = 0;
if (requiresCastForMathFuncti... | public void mathFunction(SQLBuffer buf, String op, FilterValue lhs,
FilterValue rhs) {
boolean castlhs = false;
boolean castrhs = false;
Class lc = Filters.wrap(lhs.getType());
Class rc = Filters.wrap(rhs.getType());
int type = 0;
if (requiresCastForMathFuncti... |
private JMeterTreeNode findTargetControllerNode() {
JMeterTreeNode myTarget = getTarget();
if (myTarget != null) {
return myTarget;
}
myTarget = findFirstNodeOfType(RecordingController.class);
if (myTarget != null) {
return myTarget;
}
... | private JMeterTreeNode findTargetControllerNode() {
JMeterTreeNode myTarget = getTarget();
if (myTarget != null) {
return myTarget;
}
myTarget = findFirstNodeOfType(RecordingController.class);
if (myTarget != null) {
return myTarget;
}
... |
protected void onComponentTag(final ComponentTag tag)
{
// Get tag attributes
final ValueMap attributes = tag.getAttributes();
// Default handling for component tag
super.onComponentTag(tag);
try
{
String value = getValue();
if(value != null)
{
tag.put("value", getValue());
}
}
catc... | protected void onComponentTag(final ComponentTag tag)
{
// Get tag attributes
final ValueMap attributes = tag.getAttributes();
// Default handling for component tag
super.onComponentTag(tag);
try
{
String value = getValue();
if(value != null)
{
tag.put("value", value);
}
}
catch(Exc... |
protected void synchronizeData() {
// no need to sync in the future
syncData(false);
// fluff data
DeferredDocumentImpl ownerDocument =
(DeferredDocumentImpl) this.ownerDocument();
data = ownerDocument.getNodeValueString(fNodeIndex);
ignorableWhitespace(... | protected void synchronizeData() {
// no need to sync in the future
syncData(false);
// fluff data
DeferredDocumentImpl ownerDocument =
(DeferredDocumentImpl) this.ownerDocument();
data = ownerDocument.getNodeValueString(fNodeIndex);
ignorableWhitespace(... |
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag);
} | public boolean resolve(final MarkupContainer< ? > container, final MarkupStream markupStream,
final ComponentTag tag);
} |
public void parse(Project project, Object source, RootHandler handler)
throws BuildException
{
AntXmlContext context=handler.context;
if(source instanceof File) {
context.buildFile=(File)source;
// } else if (source instanceof InputStream ) {
// } else i... | public void parse(Project project, Object source, RootHandler handler)
throws BuildException
{
AntXmlContext context=handler.context;
if(source instanceof File) {
context.buildFile=(File)source;
// } else if (source instanceof InputStream ) {
// } else i... |
public PerClause concretize(ResolvedTypeX inAspect) {
PerSingleton ret = new PerSingleton();
ret.copyLocationFrom(this);
ret.inAspect = inAspect;
//ATAJ: add a munger to add the aspectOf(..) to the @AJ aspects
if (!inAspect.isAbstract() && Ajc5MemberMaker.isAnnotationStyleAspect(inAspect... | public PerClause concretize(ResolvedTypeX inAspect) {
PerSingleton ret = new PerSingleton();
ret.copyLocationFrom(this);
ret.inAspect = inAspect;
//ATAJ: add a munger to add the aspectOf(..) to the @AJ aspects
if (!inAspect.isAbstract() && Ajc5MemberMaker.isAnnotationStyleAspect(inAspect... |
public boolean containsBean(String name)
{
throw new UnsupportedOperationException();
}
| public boolean containsBean(String name)
{
return beans.containsKey(name);
}
|
public void testIterator() {
int abstractPublic = Modifier.ABSTRACT | Modifier.PUBLIC;
ResolvedTypeX iter = world.getCoreType(TypeX.forName("java.util.Iterator"));
modifiersTest(iter, abstractPublic | Modifier.INTERFACE);
fieldsTest(iter, ResolvedMember.NONE);
methodsT... | public void testIterator() {
int abstractPublic = Modifier.ABSTRACT | Modifier.PUBLIC;
ResolvedTypeX iter = world.getCoreType(TypeX.forRawTypeNames("java.util.Iterator"));
modifiersTest(iter, abstractPublic | Modifier.INTERFACE);
fieldsTest(iter, ResolvedMember.NONE);
... |
protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(this);
int len = str.length();
int end = getDate(str, 0, len, date);
parseTimeZone (str, end, len, date);
//validate and normalize
//REVISIT: do we need Sc... | protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
int end = getDate(str, 0, len, date);
parseTimeZone (str, end, len, date);
//validate and normalize
//REVISIT: do we ne... |
protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(this);
int len = str.length();
int end = indexOf (str, 0, len, 'T');
// both time and date
int dateEnd = getDate(str, 0, end, date);
getTime(str, end+1, le... | protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
int end = indexOf (str, 0, len, 'T');
// both time and date
int dateEnd = getDate(str, 0, end, date);
getTime(str, end+... |
protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(this);
int len = str.length();
if (str.charAt(0)!='-' || str.charAt(1)!='-' || str.charAt(2)!='-') {
throw new SchemaDateTimeException ("Error in day parsing");
... | protected DateTimeData parse(String str) throws SchemaDateTimeException {
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
if (str.charAt(0)!='-' || str.charAt(1)!='-' || str.charAt(2)!='-') {
throw new SchemaDateTimeException ("Error in day parsing");
... |
protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(this);
int len = str.length();
//set constants
date.year=YEAR;
date.day=DAY;
if (str.charAt(0)!='-' || str.charAt(1)!='-') {
throw new SchemaDate... | protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
//set constants
date.year=YEAR;
date.day=DAY;
if (str.charAt(0)!='-' || str.charAt(1)!='-') {
throw new Schem... |
protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(this);
int len = str.length();
//initialize
date.year=YEAR;
if (str.charAt(0)!='-' || str.charAt(1)!='-') {
throw new SchemaDateTimeException("Invalid f... | protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
//initialize
date.year=YEAR;
if (str.charAt(0)!='-' || str.charAt(1)!='-') {
throw new SchemaDateTimeException("Inva... |
protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(this);
int len = str.length();
// time
// initialize to default values
date.year=YEAR;
date.month=MONTH;
date.day=15;
getTime(str, 0, len, da... | protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
// time
// initialize to default values
date.year=YEAR;
date.month=MONTH;
date.day=15;
getTime(str, 0, le... |
protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(this);
int len = str.length();
// check for preceding '-' sign
int start = 0;
if (str.charAt(0)=='-') {
start = 1;
}
int sign = findUTCSi... | protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
// check for preceding '-' sign
int start = 0;
if (str.charAt(0)=='-') {
start = 1;
}
int sign = find... |
protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(this);
int len = str.length();
// get date
int end = getYearMonth(str, 0, len, date);
date.day = DAY;
parseTimeZone (str, end, len, date);
//validat... | protected DateTimeData parse(String str) throws SchemaDateTimeException{
DateTimeData date = new DateTimeData(str, this);
int len = str.length();
// get date
int end = getYearMonth(str, 0, len, date);
date.day = DAY;
parseTimeZone (str, end, len, date);
//va... |
public Type analyze(final String string, Object[] objects, final Set<AnalysationIssue> issues) {
if (objects == null) {
objects = new Object[0];
}
final Extension extension = ctx.getExtension(string, objects);
final Type[] params = new Type[objects.length];
for (i... | public Type analyze(final String string, Object[] objects, final Set<AnalysationIssue> issues) {
if (objects == null) {
objects = new Object[0];
}
final Extension extension = ctx.getExtension(string, objects);
final Type[] params = new Type[objects.length];
for (i... |
protected ExecutionContextImpl getExecutionContext(final WorkflowContext ctx) {
final ExecutionContextImpl executionContext = new ExecutionContextImpl(getResourceManager(), null,
new TypeSystemImpl(), new HashMap<String, Variable>(), getGlobalVars(ctx), null, exceptionHandler,
null, getNullEvaluationHandler... | protected ExecutionContextImpl getExecutionContext(final WorkflowContext ctx) {
final ExecutionContextImpl executionContext = new ExecutionContextImpl(getResourceManager(), null,
new TypeSystemImpl(), new HashMap<String, Variable>(), getGlobalVars(ctx), null, exceptionHandler,
null, getNullEvaluationHandler... |
public void load(InputStream is, String pword) throws Exception {
char pw[] = pword==null ? null : pword.toCharArray();
store.load(is, pw);
ArrayList<String> v_names = new ArrayList<String>();
ArrayList<PrivateKey> v_keys = new ArrayList<PrivateKey>();
ArrayList<X509Cert... | public void load(InputStream is, String pword) throws Exception {
char pw[] = pword==null ? null : pword.toCharArray();
store.load(is, pw);
ArrayList<String> v_names = new ArrayList<String>();
ArrayList<PrivateKey> v_keys = new ArrayList<PrivateKey>();
ArrayList<X509Cert... |
private QueryKey findKey(String key) {
QueryStatistics<QueryKey> stats = getStatistics();
for (QueryKey qk : stats.keys()) {
if (qk.toString().equals(key.toString())) {
return qk;
}
}
return null;
}
| private QueryKey findKey(String key) {
QueryStatistics<QueryKey> stats = getStatistics();
for (QueryKey qk : stats.keys()) {
if (qk.toString().equals(key)) {
return qk;
}
}
return null;
}
|
protected Object operate(Object o, Class c) {
return new Double(Math.sqrt(((Number) o).doubleValue()));
}
| protected Object operate(Object o, Class c) {
return Double.valueOf(Math.sqrt(((Number) o).doubleValue()));
}
|
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 / abstra... | 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 / abstra... |
public Object getIdObject() {
return new Double(key);
}
| public Object getIdObject() {
return Double.valueOf(key);
}
|
public Object getIdObject() {
return new Float(key);
}
| public Object getIdObject() {
return Float.valueOf(key);
}
|
public boolean remove(Process process) {
synchronized (processes) {
boolean processRemoved = processes.removeElement(process);
if (processes.size() == 0) {
processes.notify();
removeShutdownHook();
}
return processRemoved;
... | public boolean remove(Process process) {
synchronized (processes) {
boolean processRemoved = processes.removeElement(process);
if (processes.size() == 0) {
processes.notifyAll();
removeShutdownHook();
}
return processRemoved;
... |
public void run() {
synchronized (this) {
// Just in case this object is reused in the future
finished = false;
}
final byte[] buf = new byte[SIZE];
int length;
try {
while ((length = is.read(buf)) > 0) {
os.write(buf, 0, ... | public void run() {
synchronized (this) {
// Just in case this object is reused in the future
finished = false;
}
final byte[] buf = new byte[SIZE];
int length;
try {
while ((length = is.read(buf)) > 0) {
os.write(buf, 0, ... |
protected void initZipOutputStream(ZipOutputStream zOut)
throws IOException, BuildException
{
// add manifest first
if (manifest != null) {
super.zipDir(new File(manifest.getParent()), zOut, "META-INF/");
super.zipFile(manifest, zOut, "META-INF/MANIFEST.MF");
} else {
/*
... | protected void initZipOutputStream(ZipOutputStream zOut)
throws IOException, BuildException
{
// add manifest first
if (manifest != null) {
super.zipDir(new File(manifest.getParent()), zOut, "META-INF/");
super.zipFile(manifest, zOut, "META-INF/MANIFEST.MF");
} else {
/*
... |
public void doAction(ActionEvent e)
{
Locale loc = new Locale(((Component)e.getSource()).getName());
log.debug("Changing language to "+loc.getLanguage());
JMeterUtils.reinitializeLocale(loc);
}
| public void doAction(ActionEvent e)
{
Locale loc = new Locale(((Component)e.getSource()).getName(),"");
log.debug("Changing language to "+loc.getLanguage());
JMeterUtils.reinitializeLocale(loc);
}
|
protected JSLPServiceTypeID(final Namespace namespace, final String type) throws IDCreateException {
super(namespace);
try {
st = new ServiceType(type);
// verify that the ServiceType is proper
Assert.isNotNull(st.toString());
Assert.isTrue(!st.toString().equals("")); //$NON-NLS-1$
final String na ... | protected JSLPServiceTypeID(final Namespace namespace, final String type) throws IDCreateException {
super(namespace);
try {
st = new ServiceType(type);
// verify that the ServiceType is proper
Assert.isNotNull(st.toString());
Assert.isTrue(!st.toString().equals("")); //$NON-NLS-1$
final String na ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.