buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public static String[] getAllFlags() {
return new String[]{"no_gen", "address", "const", "dynamic", "jni", "cpp", "new", "delete"};
}
| public static String[] getAllFlags() {
return new String[]{FLAG_NO_GEN, FLAG_ADDRESS, FLAG_CONST, FLAG_DYNAMIC, FLAG_JNI, FLAG_CPP, FLAG_NEW, FLAG_DELETE};
}
|
public static String[] getAllFlags() {
return new String[]{"no_in", "no_out", "critical", "init", "struct", "unicode"};
}
| public static String[] getAllFlags() {
return new String[]{FLAG_NO_IN, FLAG_NO_OUT, FLAG_CRITICAL, FLAG_INIT, FLAG_STRUCT, FLAG_UNICODE, FLAG_SENTINEL};
}
|
public Object[] getEntries() {
Object[] entries = new String[fNum << 1];
for (int i=0, j=0; i<fTableSize && j<fNum << 1; i++) {
for (Entry entry = fBuckets[i]; entry != null; entry = entry.next) {
entries[j] = entry.key;
entries[++j] = entry.value;
... | public Object[] getEntries() {
Object[] entries = new Object[fNum << 1];
for (int i=0, j=0; i<fTableSize && j<fNum << 1; i++) {
for (Entry entry = fBuckets[i]; entry != null; entry = entry.next) {
entries[j] = entry.key;
entries[++j] = entry.value;
... |
private String getTargetNamespace(IMethod method) {
if (hasDocumentWrappedSOAPBinding(method) && !isHeader(method)) {
return "";
}
return getDefaultTargetNamespace(method);
}
| private String getTargetNamespace(IMethod method) {
if (hasDocumentWrappedSOAPBinding(method) && !isHeader(method)) {
return ""; //$NON-NLS-1$
}
return getDefaultTargetNamespace(method);
}
|
public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(HandlerChain.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclarati... | public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(HandlerChain.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclarati... |
public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(WebMethod.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclaration... | public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(WebMethod.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclaration... |
public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(WebService.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclaration... | public void process() {
AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment
.getTypeDeclaration(WebService.class.getName());
Collection<Declaration> annotatedTypes = environment
.getDeclarationsAnnotatedWith(annotationDeclaration... |
private void checkWebServiceProvider(AnnotationMirror mirror) {
if (mirror.getAnnotationType().toString().equals(WebServiceProvider.class.getName())) {
printError(mirror.getPosition(), JAXWSCoreMessages
.WEBSERVICE_WEBSERVICEPROVIDER_COMBINATION);
}
}
| private void checkWebServiceProvider(AnnotationMirror mirror) {
if (mirror.getAnnotationType().toString().equals(WebServiceProvider.class.getName())) {
printFixableError(mirror.getPosition(), JAXWSCoreMessages
.WEBSERVICE_WEBSERVICEPROVIDER_COMBINATION);
}
}
|
private static String getLocationURI(ExtensibilityElement extensibilityElement) {
if (extensibilityElement instanceof SOAPAddress) {
return ((SOAPAddress) extensibilityElement).getLocationURI();
}
if (extensibilityElement instanceof SOAP12Address) {
return ((SOAP12Addres... | private static String getLocationURI(ExtensibilityElement extensibilityElement) {
if (extensibilityElement instanceof SOAPAddress) {
return ((SOAPAddress) extensibilityElement).getLocationURI();
}
if (extensibilityElement instanceof SOAP12Address) {
return ((SOAP12Addres... |
public void testWebParamModeHolderTypeRule() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("myMethod", new String[] { "QStrin... | public void testWebParamModeHolderTypeRule() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("myMethod", new String[] { "QStrin... |
public void testWebServiceSEIPresentNoWebParamRule() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("methodOne", new String[] { "QString;"... | public void testWebServiceSEIPresentNoWebParamRule() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("methodOne", new String[] { "QString;"... |
protected void setUp() throws Exception {
testJavaProject = new TestJavaProject("JavaProject");
testJavaProject.setAutoBuilding(isAutoBuildingEnabled());
testJavaProject.enableAnnotationProcessing(isAnnotationProcessingEnabled());
source = testJavaProject.createCompilationUnit(getPa... | protected void setUp() throws Exception {
testJavaProject = new TestJavaProject("JavaProject");
testJavaProject.setAutoBuilding(isAutoBuildingEnabled());
testJavaProject.enableAnnotationProcessing(isAnnotationProcessingEnabled());
source = testJavaProject.createCompilationUnit(getPa... |
public void testAddAnnotationToMethodParameter() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("add", new String[] { "I", "I" });
... | public void testAddAnnotationToMethodParameter() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("add", new String[] { "I", "I" });
... |
public void testRemoveAnnotationFromMethodParameter() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("add", new String[] { "I", "I" });
... | public void testRemoveAnnotationFromMethodParameter() {
try {
assertNotNull(annotation);
assertEquals(WebParam.class.getSimpleName(), AnnotationUtils.getAnnotationName(annotation));
IMethod method = source.findPrimaryType().getMethod("add", new String[] { "I", "I" });
... |
public void testCrypt()
{
final ICrypt crypt = new Crypt();
try
{
if (crypt.encryptString("test") != null)
{
assertEquals("KxMxhk6i4Us=", crypt.encryptString("test"));
assertEquals("test", crypt.decryptString("KxMxhk6i4Us="));
}
}
catch (Exception ex)
{
// fails on JVMs without sec... | public void testCrypt()
{
final ICrypt crypt = new SunJceCrypt();
try
{
if (crypt.encryptString("test") != null)
{
assertEquals("KxMxhk6i4Us=", crypt.encryptString("test"));
assertEquals("test", crypt.decryptString("KxMxhk6i4Us="));
}
}
catch (Exception ex)
{
// fails on JVMs witho... |
public void testAll() throws IOException {
executeTarget("forked");
PrintStream ps = System.out;
File f1 = new File("src/etc/testcases/taskdefs/forkedout");
File f2 = new File("src/etc/testcases/taskdefs/unforkedout");
PrintStream newps = new PrintStream(new FileOutputStream(... | public void testAll() throws IOException {
executeTarget("forked");
PrintStream ps = System.out;
File f1 = new File("src/etc/testcases/taskdefs/forkedout");
File f2 = new File("src/etc/testcases/taskdefs/unforkedout");
PrintStream newps = new PrintStream(new FileOutputStream(... |
public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
throws XNIException {
try {
// SAX1
if (fDocumentHandler != null) {
// REVISIT: should we support schema-normalized-value for SAX1 events
//
... | public void startElement(QName element, XMLAttributes attributes, Augmentations augs)
throws XNIException {
try {
// SAX1
if (fDocumentHandler != null) {
// REVISIT: should we support schema-normalized-value for SAX1 events
//
... |
public void showSelection () {
checkWidget ();
int hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
int state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) == 0... | public void showSelection () {
checkWidget ();
int hItem = 0;
if ((style & SWT.SINGLE) != 0) {
hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0);
if (hItem == 0) return;
int state = OS.SendMessage (handle, OS.TVM_GETITEMSTATE, hItem, OS.TVIS_SELECTED);
if ((state & OS.TVIS_SELECTED) == 0... |
public JDBCFetchConfiguration setIsolation(int level) {
if (level != -1 && level != DEFAULT
&& level != Connection.TRANSACTION_NONE
&& level != Connection.TRANSACTION_READ_UNCOMMITTED
&& level != Connection.TRANSACTION_READ_COMMITTED
&& level != Connection.TRA... | public JDBCFetchConfiguration setIsolation(int level) {
if (level != -1 && level != DEFAULT
&& level != Connection.TRANSACTION_NONE
&& level != Connection.TRANSACTION_READ_UNCOMMITTED
&& level != Connection.TRANSACTION_READ_COMMITTED
&& level != Connection.TRA... |
private JMenu makeLanguageMenu() {
final JMenu languageMenu = makeMenuRes("choose_language",'C'); //$NON-NLS-1$
LangMenuHelper langMenu = new LangMenuHelper(languageMenu);
/*
* Note: the item name is used by ChangeLanguage to create a Locale for
* that language, s... | public static String[] getLanguages(){
List lang = new ArrayList(20);
lang.add(Locale.ENGLISH.toString()); // en
lang.add(Locale.FRENCH.toString()); // fr
lang.add(Locale.GERMAN.toString()); // de
lang.add("no"); // $NON-NLS-1$
lang.add("pl"); // $NON-NLS-1$
l... |
private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog)
throws BuildException {
CommandlineJava cmd = (CommandlineJava) commandline.clone();
cmd.setClassname("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner");
cmd.createArgument().setValue(test.getName()... | private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog)
throws BuildException {
CommandlineJava cmd = (CommandlineJava) commandline.clone();
cmd.setClassname("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner");
cmd.createArgument().setValue(test.getName()... |
public CompositeServiceID(CompositeNamespace compositeNamespace, IServiceTypeID serviceTypeID, String string) {
super(compositeNamespace, serviceTypeID, string);
}
} | public CompositeServiceID(final CompositeNamespace compositeNamespace, final IServiceTypeID serviceTypeID, final String string) {
super(compositeNamespace, serviceTypeID, string);
}
} |
protected final DOMError modifyDOMError(String message, short severity, Node node){
fDOMError.reset();
fDOMError.fMessage = message;
fDOMError.fSeverity = severity;
fDOMError.fLocator = fLocator;
fLocator.fErrorNode = node;
return fDOMError;
}
| protected final DOMError modifyDOMError(String message, short severity, Node node){
fDOMError.reset();
fDOMError.fMessage = message;
fDOMError.fSeverity = severity;
fDOMError.fLocator = fLocator;
fLocator.fRelatedNode = node;
return fDOMError;
}
|
public static byte[] objectToByteArray(final Object object)
{
try
{
final ByteArrayOutputStream out = new ByteArrayOutputStream();
try
{
objectStreamFactory.newObjectOutputStream(out).writeObject(object);
}
finally
{
out.close();
}
return out.toByteArray();
}
catch (IOException... | public static byte[] objectToByteArray(final Object object)
{
try
{
final ByteArrayOutputStream out = new ByteArrayOutputStream();
try
{
objectStreamFactory.newObjectOutputStream(out).writeObject(object);
}
finally
{
out.close();
}
return out.toByteArray();
}
catch (Exception e... |
private ClassTypeSignature parseClassTypeSignature() {
SimpleClassTypeSignature outerType = null;
SimpleClassTypeSignature[] nestedTypes = new SimpleClassTypeSignature[0];
StringBuffer ret = new StringBuffer();
String identifier = eatIdentifier();
ret.append(identifier);
while (maybeEat("/"))... | private ClassTypeSignature parseClassTypeSignature() {
SimpleClassTypeSignature outerType = null;
SimpleClassTypeSignature[] nestedTypes = new SimpleClassTypeSignature[0];
StringBuffer ret = new StringBuffer();
String identifier = eatIdentifier();
ret.append(identifier);
while (maybeEat("/"))... |
public void setProperty(String property) {
this.property = property;
}
public void setClass(String classname) {
log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
this.classname = classname;
}
| public void setProperty(String property) {
this.property = property;
}
public void XsetClass(String classname) {
log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
this.classname = classname;
}
|
public void setBase(String base) {
this.base = base;
}
public void setClass(String classname) {
log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
this.classname = classname;
}
| public void setBase(String base) {
this.base = base;
}
public void XsetClass(String classname) {
log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
this.classname = classname;
}
|
public void handleButtonPress(int index) {
EmailAddressParsedResult emailResult = (EmailAddressParsedResult) getResult();
switch (index) {
case 0:
sendEmailFromUri(emailResult.getMailtoURI(), null, null);
break;
case 1:
String[] addresses = new String[1];
addresses[... | public void handleButtonPress(int index) {
EmailAddressParsedResult emailResult = (EmailAddressParsedResult) getResult();
switch (index) {
case 0:
sendEmailFromUri(emailResult.getMailtoURI(), emailResult.getEmailAddress(), null, null);
break;
case 1:
String[] addresses = ne... |
public int getTopPixel () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
byte [] position = new byte [ITER_SIZEOF];
GdkRectangle rect = new GdkRectangle ();
OS.gtk_text_view_get_visible_rect (handle, rect);
int [] lineTop = new int[1];
OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop... | public int getTopPixel () {
checkWidget ();
if ((style & SWT.SINGLE) != 0) return 0;
byte [] position = new byte [ITER_SIZEOF];
GdkRectangle rect = new GdkRectangle ();
OS.gtk_text_view_get_visible_rect (handle, rect);
int [] lineTop = new int[1];
OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop... |
public Rectangle getBounds () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
int hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
MARGINS margins = new MARGINS ();
OS.SendM... | public Rectangle getBounds () {
checkWidget ();
int index = parent.indexOf (this);
if (index == -1) return new Rectangle (0, 0, 0, 0);
int hwnd = parent.handle;
RECT rect = new RECT ();
OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);
if (OS.COMCTL32_MAJOR >= 6) {
MARGINS margins = new MARGINS ();
OS.SendM... |
public Rectangle getClientArea () {
checkWidget ();
/*
* Note: The CommandBar is part of the client area,
* not the trim. Applications don't expect this so
* subtract the height of the CommandBar.
*/
if (OS.IsHPC) {
Rectangle rect = super.getClientArea ();
if (menuBar != null) {
int hwndCB = menuBar.hwn... | public Rectangle getClientArea () {
checkWidget ();
/*
* Note: The CommandBar is part of the client area,
* not the trim. Applications don't expect this so
* subtract the height of the CommandBar.
*/
if (OS.IsHPC) {
Rectangle rect = super.getClientArea ();
if (menuBar != null) {
int hwndCB = menuBar.hwn... |
public boolean isAllowedByWildcard(QName element, int wuri, boolean wother) throws Exception{
// whether the uri is allowed directly by the wildcard
if (!wother && element.uri == wuri ||
//wother && element.uri != wuri && element.uri != fStringPool.EMPTY_STRING) { // ??? TODO
... | public boolean isAllowedByWildcard(QName element, int wuri, boolean wother) throws Exception{
// whether the uri is allowed directly by the wildcard
if (!wother && element.uri == wuri ||
//wother && element.uri != wuri && element.uri != fStringPool.EMPTY_STRING) { // ??? TODO
... |
public void threadFinished() {
log.debug("Thread Finished");
// Does not need to be synchronised, as all access is from same thread
Map map = (Map)httpClients.get();
if ( map != null ) {
for ( Iterator it = map.entrySet().iterator(); it.hasNext(); )
{
Map.Entry entry = (Map.Entry) it.next();
... | public void threadFinished() {
log.debug("Thread Finished");
// Does not need to be synchronised, as all access is from same thread
Map map = (Map)httpClients.get();
if ( map != null ) {
for ( Iterator it = map.entrySet().iterator(); it.hasNext(); )
{
Map.Entry entry = (Map.Entry) it.next();
... |
public void redraw (int x, int y, int width, int height, boolean all) {
checkWidget ();
if (drawCount == 0) super.redraw (x, y, width, height, all);
}
/*
* Redraws from the specified index down to the last available item inclusive. Note
* that the redraw bounds do not extend beyond the current last item, so clien... | public void redraw (int x, int y, int width, int height, boolean all) {
checkWidget ();
if (drawCount == 0) super.redraw (x, y, width, height, all);
}
/*
* Redraws from the specified index down to the last available item inclusive. Note
* that the redraw bounds do not extend beyond the current last item, so clien... |
private void doMultipleTransfer() throws IOException, JSchException {
Channel channel = openExecChannel("scp -d -t " + remotePath);
try {
OutputStream out = channel.getOutputStream();
InputStream in = channel.getInputStream();
channel.connect();
wait... | private void doMultipleTransfer() throws IOException, JSchException {
Channel channel = openExecChannel("scp -r -d -t " + remotePath);
try {
OutputStream out = channel.getOutputStream();
InputStream in = channel.getInputStream();
channel.connect();
w... |
public void addAdvices(String advice) {
addAdvices(advice);
}
| public void addAdvices(String advice) {
addAdvice(advice);
}
|
private static void doReportSystemProperties(PrintStream out) {
for (Enumeration keys = System.getProperties().keys();
keys.hasMoreElements();) {
String key = (String) keys.nextElement();
out.println(key + " : " + System.getProperty(key));
}
}
| private static void doReportSystemProperties(PrintStream out) {
for (Enumeration keys = System.getProperties().propertyNames();
keys.hasMoreElements();) {
String key = (String) keys.nextElement();
out.println(key + " : " + System.getProperty(key));
}
}
|
private void sendImage(ID targetID) {
final Job job = new ScreenCaptureJob(getDisplay(), targetID);
job.schedule();
}
| private void sendImage(ID targetID) {
final Job job = new ScreenCaptureJob(getDisplay(), targetID);
job.schedule(5000);
}
|
public SampleResult sample(Entry e) {
String responseData = "<ldapanswer>";
SampleResult res = new SampleResult();
res.setResponseData("successfull".getBytes());
res.setResponseMessage("Success");
res.setResponseCode("0");
boolean isSuccessful = true;
res.setSampleLabel(getName());
LdapExtClient temp_c... | public SampleResult sample(Entry e) {
String responseData = "<ldapanswer>";
SampleResult res = new SampleResult();
res.setResponseData("successfull".getBytes());
res.setResponseMessage("Success");
res.setResponseCode("0");
boolean isSuccessful = true;
res.setSampleLabel(getName());
LdapExtClient temp_c... |
throws AntServiceException;
/*
* 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.inte... | throws AntServiceException;
/*
* 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.inte... |
protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Buffer to hold generated body
final StringBuffer buffer = new StringBuffer();
// Iterate through choices
final List choices = getChoices();
// Loop through choices
for (int index=0;index<choices.... | protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Buffer to hold generated body
final StringBuffer buffer = new StringBuffer();
// Iterate through choices
final List choices = getChoices();
// Loop through choices
for (int index=0;index<choices.... |
protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Buffer to hold generated body
final StringBuffer buffer = new StringBuffer();
// Iterate through choices
final List choices = getChoices();
// Loop through choices
for (int index=0;index<ch... | protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Buffer to hold generated body
final StringBuffer buffer = new StringBuffer();
// Iterate through choices
final List choices = getChoices();
// Loop through choices
for (int index=0;index<ch... |
public void internal_dispose_Accessible() {
if (actionNames != null) actionNames.release();
actionNames = null;
if (attributeNames != null) attributeNames.release();
attributeNames = null;
if (parameterizedAttributeNames != null) parameterizedAttributeNames.release();
parameterizedAttributeNames = null;
... | public void internal_dispose_Accessible() {
if (actionNames != null) actionNames.release();
actionNames = null;
if (attributeNames != null) attributeNames.release();
attributeNames = null;
if (parameterizedAttributeNames != null) parameterizedAttributeNames.release();
parameterizedAttributeNames = null;
... |
public void select (int index) {
checkWidget ();
int count = getItemCount ();
if (0 <= index && index < count) {
if ((style & SWT.READ_ONLY) != 0) {
((NSPopUpButton)view).selectItemAtIndex(index);
sendEvent (SWT.Modify);
} else {
((NSComboBox)view).selectItemAtIndex(index);
}
}
}
//boolean sendKeyE... | public void select (int index) {
checkWidget ();
int count = getItemCount ();
if (0 <= index && index < count) {
if ((style & SWT.READ_ONLY) != 0) {
((NSPopUpButton)view).selectItemAtIndex(index);
sendEvent (SWT.Modify);
} else {
((NSComboBox)view).selectItemAtIndex(index);
}
}
}
//boolean sendKeyE... |
public Composite (Composite parent, int style) {
super (parent, style);
}
Control [] _getChildren () {
NSArray views = contentView().subviews();
int count = (int)/*64*/views.count();
Control [] children = new Control [count];
if (count == 0) return children;
int j = 0;
for (int i=0; i<count; i++){
Widget widg... | public Composite (Composite parent, int style) {
super (parent, style);
}
Control [] _getChildren () {
NSArray views = contentView().subviews();
int count = (int)/*64*/views.count();
Control [] children = new Control [count];
if (count == 0) return children;
int j = 0;
for (int i=0; i<count; i++){
Widget widg... |
public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... | public TableItem (Table parent, int style, int index) {
this (parent, style, index, true);
}
TableItem (Table parent, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
if (create) parent.createItem (this, index);
}
static Table checkNull (Table control) {
if (control == null) S... |
public ToolItem (ToolBar parent, int style, int index) {
super (parent, checkStyle (style));
this.parent = parent;
parent.createItem (this, index);
}
int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
NSString nsAttributeName = new NSString(arg0);
if (nsAttributeName.isEqualT... | public ToolItem (ToolBar parent, int style, int index) {
super (parent, checkStyle (style));
this.parent = parent;
parent.createItem (this, index);
}
int /*long*/ accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
NSString nsAttributeName = new NSString(arg0);
if (nsAttributeName... |
public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem, style, checkIndex (index), true);
}
TreeItem (Tree parent, TreeItem parentItem, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (crea... | public TreeItem (TreeItem parentItem, int style, int index) {
this (checkNull (parentItem).parent, parentItem, style, checkIndex (index), true);
}
TreeItem (Tree parent, TreeItem parentItem, int style, int index, boolean create) {
super (parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (crea... |
public void queryQualifiedId(boolean inMemory) throws Exception {
EntityManager em = emf.createEntityManager();
String query = "select KEY(e) from Compny1 c, " +
" in (c.orgs) e order by c.id";
Query q = em.createQuery(query);
if (inMemory)
setCandidate(q, C... | public void queryQualifiedId(boolean inMemory) throws Exception {
EntityManager em = emf.createEntityManager();
String query = "select KEY(e) from Compny1 c, " +
" in (c.orgs) e order by c.id";
Query q = em.createQuery(query);
if (inMemory)
setCandidate(q, C... |
protected void executeOn(String[] files)
throws Exception {
ClassLoader loader = getClassLoader();
if (!StringUtils.isEmpty(dirName))
flags.directory = Files.getFile(dirName, loader);
if (!StringUtils.isEmpty(typeMap))
flags.typeMap = Configurations.parsePrope... | protected void executeOn(String[] files)
throws Exception {
ClassLoader loader = getClassLoader();
if (!StringUtils.isEmpty(dirName))
flags.directory = Files.getFile(dirName, loader);
if (!StringUtils.isEmpty(typeMap))
flags.typeMap = Configurations.parsePrope... |
public void testGetIdGeneratorSeqGen() {
if (!supportsNativeSequence) {
System.out.println("Does not support native sequence");
return;
}
createEntityE2();
em.getTransaction().begin();
em.persist(entityE2);
em.getTransaction().commit();
... | public void testGetIdGeneratorSeqGen() {
if (!supportsNativeSequence) {
System.out.println("Does not support native sequence");
return;
}
createEntityE2();
em.getTransaction().begin();
em.persist(entityE2);
em.getTransaction().commit();
... |
private CVSEntry[] filterEntrySet( final CVSEntry[] entrySet )
{
final Vector results = new Vector();
for( int i = 0; i < entrySet.length; i++ )
{
final CVSEntry cvsEntry = entrySet[ i ];
final Date date = cvsEntry.getDate();
if( null != m_start && m_s... | private CVSEntry[] filterEntrySet( final CVSEntry[] entrySet )
{
final Vector results = new Vector();
for( int i = 0; i < entrySet.length; i++ )
{
final CVSEntry cvsEntry = entrySet[ i ];
final Date date = cvsEntry.getDate();
if( null != m_start && m_s... |
public static final void runSafe(Runnable runnable) {
if(SwingUtilities.isEventDispatchThread()) {
runnable.run();
} else {
try {
SwingUtilities.invokeAndWait(runnable);
} catch (InterruptedException e) {
throw new Error(e);
... | public static final void runSafe(Runnable runnable) {
if(SwingUtilities.isEventDispatchThread()) {
runnable.run();
} else {
try {
SwingUtilities.invokeAndWait(runnable);
} catch (InterruptedException e) {
log.warn("Interrupted in th... |
private SchemaGrammar(SymbolTable symbolTable, boolean fullSet) {
fSymbolTable = symbolTable;
fXSTypeCount = fullSet?BASICSET_COUNT:FULLSET_COUNT;
fTypeDeclType = new XSType[1][fXSTypeCount];
topLevelTypeDecls = new Hashtable();
try {
int typeIndex = 0;
... | private SchemaGrammar(SymbolTable symbolTable, boolean fullSet) {
fSymbolTable = symbolTable;
fXSTypeCount = fullSet?FULLSET_COUNT:BASICSET_COUNT;
fTypeDeclType = new XSType[1][fXSTypeCount];
topLevelTypeDecls = new Hashtable();
try {
int typeIndex = 0;
... |
public final void addComponentInstantiationListener(
final IComponentInstantiationListener listener)
{
if (listener == null)
{
throw new IllegalArgumentException("argument listener may not be null");
}
for (IComponentInstantiationListener element : componentInstantiationListeners)
{
if (listener =... | public final void addComponentInstantiationListener(
final IComponentInstantiationListener listener)
{
if (listener == null)
{
throw new IllegalArgumentException("argument listener may not be null");
}
for (IComponentInstantiationListener element : componentInstantiationListeners)
{
if (listener.e... |
public void setAutoresponse(String response) {
m_AutoResponse = response;
}
| public void setAutoresponse(String response) {
super.setInternalAutoResponse(response);
}
|
public Collection loadAll(Collection sms, PCState state, int load,
FetchConfiguration fetch, Object edata) {
if (isLocking(fetch))
return super.loadAll(sms, state, load, fetch, edata);
Map unloaded = null;
List smList = null;
Map caches = new HashMap();
Ope... | public Collection loadAll(Collection sms, PCState state, int load,
FetchConfiguration fetch, Object edata) {
if (load == StoreManager.FORCE_LOAD_REFRESH || isLocking(fetch))
return super.loadAll(sms, state, load, fetch, edata);
Map unloaded = null;
List smList = null;
... |
protected void appendOptionHtml(StringBuffer buffer, Object choice, int index)
{
final String displayValue = renderer.getDisplayValue(choice);
buffer.append("\n<option ");
if (isSelected(choice, index))
{
buffer.append("selected=\"selected\"");
}
buffer.append("value=\"");
buffer.append(renderer.getI... | protected void appendOptionHtml(StringBuffer buffer, Object choice, int index)
{
final String displayValue = renderer.getDisplayValue(choice);
buffer.append("\n<option ");
if (isSelected(choice, index))
{
buffer.append("selected=\"selected\"");
}
buffer.append("value=\"");
buffer.append(renderer.getI... |
protected String getDefaultChoice(final Object selected)
{
// The <option> tag buffer
final StringBuffer buffer = new StringBuffer();
// Is null a valid selection value?
if (isNullValid())
{
// Null is valid, so look up the value for it
final String option = getLocalizer().getString(getId() + ".null"... | protected String getDefaultChoice(final Object selected)
{
// The <option> tag buffer
final StringBuffer buffer = new StringBuffer();
// Is null a valid selection value?
if (isNullValid())
{
// Null is valid, so look up the value for it
final String option = getLocalizer().getString("null", this, "")... |
public Client(Socket aSocket, ObjectInputStream iStream,
ObjectOutputStream oStream,
ISynchAsynchConnectionEventHandler handler, int keepAlive,
int maxmsgs) throws IOException {
setSocket(socket);
inputStream = iStream;
| public Client(Socket aSocket, ObjectInputStream iStream,
ObjectOutputStream oStream,
ISynchAsynchConnectionEventHandler handler, int keepAlive,
int maxmsgs) throws IOException {
setSocket(aSocket);
inputStream = iStream;
|
protected boolean retrieveItem(HierarchicalStreamReader reader,
UnmarshallingContext context, SampleResult res, Object subItem)
{
if (subItem instanceof AssertionResult)
{
res.addAssertionResult((AssertionResult) subItem);
}
else if (subItem instanceof SampleResult)
... | protected boolean retrieveItem(HierarchicalStreamReader reader,
UnmarshallingContext context, SampleResult res, Object subItem)
{
if (subItem instanceof AssertionResult)
{
res.addAssertionResult((AssertionResult) subItem);
}
else if (subItem instanceof SampleResult)
... |
protected boolean checkAccess(RequestCycle cycle)
{
// Is a user signed into this cycle's session?
boolean signedIn = cycle.getSession().getProperty("user") != null;
// If nobody is signed in
if (!signedIn)
{
// redirect request to SignIn page
cyc... | protected boolean checkAccess(RequestCycle cycle)
{
// Is a user signed into this cycle's session?
boolean signedIn = cycle.getSession().getProperty("signin.user") != null;
// If nobody is signed in
if (!signedIn)
{
// redirect request to SignIn page
... |
public final void handleSubmit(final RequestCycle cycle)
{
// Sign the user in
if (properties.getString("username").equals("jonathan")
&& properties.getString("password").equals("password"))
{
cycle.getSession().setProperty("user", "jon... | public final void handleSubmit(final RequestCycle cycle)
{
// Sign the user in
if (properties.getString("username").equals("jonathan")
&& properties.getString("password").equals("password"))
{
cycle.getSession().setProperty("signin.user... |
protected boolean checkAccess(RequestCycle cycle)
{
boolean signedIn = cycle.getSession().getProperty("user") != null;
if (!signedIn)
{
cycle.redirectToInterceptPage(SignIn2.class);
}
return signedIn;
}
| protected boolean checkAccess(RequestCycle cycle)
{
boolean signedIn = cycle.getSession().getProperty("signin2.user") != null;
if (!signedIn)
{
cycle.redirectToInterceptPage(SignIn2.class);
}
return signedIn;
}
|
public String signIn(RequestCycle cycle, String username, String password)
{
// Sign the user in
if (username.equals("jonathan") && password.equals("password"))
{
// successfully signed in.
cycle.getSession()... | public String signIn(RequestCycle cycle, String username, String password)
{
// Sign the user in
if (username.equals("jonathan") && password.equals("password"))
{
// successfully signed in.
cycle.getSession()... |
public void testNullHandling2()
{
MockHttpServletRequest mockRequest = tester.getServletRequest();
mockRequest.setRequestToRedirectString("?=m"); // key is encoded as empty string
assertEquals("=m", mockRequest.getQueryString());
mockRequest.setParameter(null, "m2"); // force null string
assertEquals("=m2&=... | public void testNullHandling2()
{
MockHttpServletRequest mockRequest = tester.getServletRequest();
mockRequest.setRequestToRedirectString("?=m"); // key is encoded as empty string
assertEquals("=m", mockRequest.getQueryString());
mockRequest.setParameter(null, "m2"); // force null string
assertEquals("=m&=m... |
public void putBean(String name, Object bean)
{
if (beans.containsKey(name))
{
throw new IllegalArgumentException("a bean with name [" + name +
"] has alredy been added to the context");
}
beans.put(name, bean);
}
| public void putBean(String name, Object bean)
{
if (beans.containsKey(name))
{
throw new IllegalArgumentException("a bean with name [" + name +
"] has already been added to the context");
}
beans.put(name, bean);
}
|
public void setVisible (boolean visible) {
checkWidget ();
if (drawCount != 0) {
if (((state & HIDDEN) == 0) == visible) return;
} else {
if (visible == OS.IsWindowVisible (handle)) return;
}
if (visible) {
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the ... | public void setVisible (boolean visible) {
checkWidget ();
if (drawCount != 0) {
if (((state & HIDDEN) == 0) == visible) return;
} else {
if (visible == OS.IsWindowVisible (handle)) return;
}
if (visible) {
/*
* It is possible (but unlikely), that application
* code could have disposed the widget in the ... |
public void sendMessage(ID toContainerID, Object data) throws IOException {
if (isInactive()) {
trace("sendMessage("+toContainerID+","+data+") CONTEXT INACTIVE");
return;
} else {
trace("sendMessage("+toContainerID+","+data+") CONTEXT INACTIVE");
conta... | public void sendMessage(ID toContainerID, Object data) throws IOException {
if (isInactive()) {
trace("sendMessage("+toContainerID+","+data+") CONTEXT INACTIVE");
return;
} else {
trace("sendMessage("+toContainerID+","+data+") CONTEXT ACTIVE");
contain... |
public Namespace getConnectNamespace() {
return IDFactory.getDefault().getNamespaceByName("xmpp.jive");
}
| public Namespace getConnectNamespace() {
return IDFactory.getDefault().getNamespaceByName(XmppPlugin.NAMESPACE_IDENTIFIER);
}
|
public void deselectAll () {
checkWidget ();
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.deselectAll(null);
ignoreSelect = false;
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<... | public void deselectAll () {
checkWidget ();
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.deselectAll(null);
ignoreSelect = false;
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<... |
public final int getCurrentPage()
{
// If first cell is out of range, bring page back into range
while ((currentPage * rowsPerPage) >= getList().size())
{
currentPage--;
}
return currentPage;
}
| public final int getCurrentPage()
{
// If first cell is out of range, bring page back into range
while ((currentPage > 0) && ((currentPage * rowsPerPage) >= getList().size()))
{
currentPage--;
}
return currentPage;
}
|
public static Test suite() {
TestSuite suite = new TestSuite("Java5 - binary weaving");
//$JUnit-BEGIN$
suite.addTestSuite(MigrationTests.class);
suite.addTest(Ajc150Tests.suite());
suite.addTestSuite(Ajc150TestsNoHarness.class);
// These are binary weaving tests
suite.addTest(AccBridgeMethods.suite(... | public static Test suite() {
TestSuite suite = new TestSuite("Java5 - binary weaving");
//$JUnit-BEGIN$
suite.addTestSuite(MigrationTests.class);
suite.addTest(Ajc150Tests.suite());
suite.addTestSuite(Ajc150TestsNoHarness.class);
// These are binary weaving tests
suite.addTest(AccBridgeMethods.suite(... |
public static String filename(final String path)
{
return Strings.lastPathComponent(path.replace('/', File.separatorChar), File.separatorChar);
}
| public static String filename(final String path)
{
return Strings.lastPathComponent(path.replace('/', java.io.File.separatorChar), java.io.File.separatorChar);
}
|
protected Thread createPump(InputStream is, OutputStream os,
boolean closeWhenExhausted) {
final Thread result
= new ThreadWithPumper(new StreamPumper(is, os,
closeWhenExhausted,
... | protected Thread createPump(InputStream is, OutputStream os,
boolean closeWhenExhausted) {
final Thread result
= new ThreadWithPumper(new StreamPumper(is, os,
closeWhenExhausted,
... |
private List checkCache(QueryKey qk) {
if (qk == null)
return null;
FetchConfiguration fetch = getContext().getFetchConfiguration();
if (!fetch.getEnlistInQueryCache())
return null;
if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
return null;
... | private List checkCache(QueryKey qk) {
if (qk == null)
return null;
FetchConfiguration fetch = getContext().getFetchConfiguration();
if (!fetch.getQueryCacheEnabled())
return null;
if (fetch.getReadLockLevel() > LockLevels.LOCK_NONE)
return null;
... |
private static boolean assign(OpenJPAStateManager sm, StoreManager store,
FieldMetaData[] pks, boolean preFlush) {
for (int i = 0; i < pks.length; i++)
// If we are generating values...
if (pks[i].getValueStrategy() != ValueStrategies.NONE) {
// If a value alr... | private static boolean assign(OpenJPAStateManager sm, StoreManager store,
FieldMetaData[] pks, boolean preFlush) {
for (int i = 0; i < pks.length; i++)
// If we are generating values...
if (pks[i].getValueStrategy() != ValueStrategies.NONE) {
// If a value alr... |
private static final long serialVersionUID = 3691044287424901171L;
Object fData;
UserDataHandler fHandler;
UserDataRecord(Object data, UserDataHandler handler) {
fData = data;
fHandler = handler;
}
}
} // class ParentNode | private static final long serialVersionUID = 3258126977134310455L;
Object fData;
UserDataHandler fHandler;
UserDataRecord(Object data, UserDataHandler handler) {
fData = data;
fHandler = handler;
}
}
} // class ParentNode |
boolean hasAnnotation(ResolvedTypeX ofType);
/* *******************************************************************
* Copyright (c) 2004 IBM Corporation.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Common Public License v1.0
* which accompani... | boolean hasAnnotation(ResolvedTypeX ofType);
/* *******************************************************************
* Copyright (c) 2004 IBM Corporation.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Common Public License v1.0
* which accompani... |
public String open (Rectangle rect) {
Point listSize = list.computeSize (rect.width, SWT.DEFAULT);
Rectangle screenSize = shell.getDisplay().getBounds();
// Position the dialog so that it does not run off the screen and the largest number of items are visible
int spaceBelow = screenSize.height - (rect.y + rect.he... | public String open (Rectangle rect) {
Point listSize = list.computeSize (rect.width, SWT.DEFAULT, false);
Rectangle screenSize = shell.getDisplay().getBounds();
// Position the dialog so that it does not run off the screen and the largest number of items are visible
int spaceBelow = screenSize.height - (rect.y + ... |
public void close() {
if (!isClosed()) {
writeHeader();
write("\n}}\0");
super.close();
}
}
/**
* Returns the index of the specified color in the RTF color table.
*
* @param color the color
* @param defaultIndex return value if color is null
* @return the index of the specified color in the R... | public void close() {
if (!isClosed()) {
writeHeader();
write("\n}}\0");
super.close();
}
}
/**
* Returns the index of the specified color in the RTF color table.
*
* @param color the color
* @param defaultIndex return value if color is null
* @return the index of the specified color in the R... |
public Object getAdapter(Class clazz) {
if (clazz.equals(ISharedObjectContainerGroupManager.class)) {
return this;
} else return null;
}
| public Object getAdapter(Class clazz) {
if (clazz.equals(ISharedObjectContainerGroupManager.class)) {
return this;
} else return super.getAdapter(clazz);
}
|
public void execute() {
getScript().executeScript(attributes, nestedElementMap);
}
| public void execute() {
getScript().executeScript(attributes, nestedElementMap, this);
}
|
private void fillToAnalyseWithReverseReferencedResources() {
Set<IXtendXpandResource> reverseReferences = new HashSet<IXtendXpandResource>();
for (final Object name : toAnalyze) {
final IXtendXpandResource res = (IXtendXpandResource) name;
final IResource resource = (IResource) res.getUnderlyingStorage();
... | private void fillToAnalyseWithReverseReferencedResources() {
Set<IXtendXpandResource> reverseReferences = new HashSet<IXtendXpandResource>();
for (final Object name : toAnalyze) {
final IXtendXpandResource res = (IXtendXpandResource) name;
final IResource resource = (IResource) res.getUnderlyingStorage();
... |
public void testTypeXForParameterizedTypes() {
TypeX stringType = TypeX.forName("java/lang/String");
TypeX listOfStringType = TypeX.forParameterizedTypes("java/util/List", new TypeX[] {stringType});
assertEquals("1 type param",1,listOfStringType.typeParameters.length);
assertEquals(stringType,listOfStringType.... | public void testTypeXForParameterizedTypes() {
TypeX stringType = TypeX.forName("java/lang/String");
TypeX listOfStringType = TypeX.forParameterizedTypes(TypeX.forName("java/util/List"), new TypeX[] {stringType});
assertEquals("1 type param",1,listOfStringType.typeParameters.length);
assertEquals(stringType,li... |
protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
// must be attached to <input type="checkbox" .../> tag
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
CheckGroup<?> group = findParent(CheckGro... | protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
// must be attached to <input type="checkbox" .../> tag
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
CheckGroup<?> group = findParent(CheckGro... |
protected final void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
final String value = getValue();
if (value != null)
{
try
{
if (Strings.isTrue(value))
{
tag.put("checked", "checked");
}
else
{... | protected final void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "checkbox");
final String value = getValue();
if (value != null)
{
try
{
if (Strings.isTrue(value))
{
tag.put("checked", "checked");
}
else
{... |
protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// Should a roundtrip be made (have onSelectionChanged called) when the
// selection changed?
if (wantOnSelectionChangedNotifications())
{
// url that points to this components IOnChangeListener method
final Cha... | protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// Should a roundtrip be made (have onSelectionChanged called) when the
// selection changed?
if (wantOnSelectionChangedNotifications())
{
// url that points to this components IOnChangeListener method
final Cha... |
protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
// must be attached to <input type="radio" .../> tag
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "radio");
final RadioGroup group = findParent(RadioGroup.... | protected void onComponentTag(final ComponentTag tag)
{
// Default handling for component tag
super.onComponentTag(tag);
// must be attached to <input type="radio" .../> tag
checkComponentTag(tag, "input");
checkComponentTagAttribute(tag, "type", "radio");
final RadioGroup group = findParent(RadioGroup.... |
protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Iterate through choices
final List<T> choices = getChoices();
// Buffer to hold generated body
final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70);
// The sele... | protected final void onComponentTagBody(final MarkupStream markupStream,
final ComponentTag openTag)
{
// Iterate through choices
final List<T> choices = getChoices();
// Buffer to hold generated body
final AppendingStringBuffer buffer = new AppendingStringBuffer((choices.size() + 1) * 70);
// The sele... |
protected void onComponentTag(ComponentTag tag)
{
if (href != null)
{
Object hrefValue = href.getObject();
if (hrefValue != null)
{
String url = hrefValue.toString();
// if the tag is an anchor proper
if (tag.getName().equalsIgnoreCase("a") || tag.getName().equalsIgnoreCase("link")
|| t... | protected void onComponentTag(ComponentTag tag)
{
if (href != null)
{
Object hrefValue = href.getObject();
if (hrefValue != null)
{
String url = hrefValue.toString();
// if the tag is an anchor proper
if (tag.getName().equalsIgnoreCase("a") || tag.getName().equalsIgnoreCase("link")
|| t... |
protected final void onComponentTag(final ComponentTag tag)
{
// Default handling for tag
super.onComponentTag(tag);
// Set href to link to this link's linkClicked method
CharSequence url = getURL();
// append any anchor
url = appendAnchor(tag, url);
if (isLinkEnabled())
{
// if the tag is an ... | protected final void onComponentTag(final ComponentTag tag)
{
// Default handling for tag
super.onComponentTag(tag);
// Set href to link to this link's linkClicked method
CharSequence url = getURL();
// append any anchor
url = appendAnchor(tag, url);
if (isLinkEnabled())
{
// if the tag is an ... |
public final void setSrcAttribute(final ComponentTag tag)
{
// If locale has changed from the initial locale used to attach image
// resource, then we need to reload the resource in the new locale
if ( resourceKind == null &&
(!Objects.equal(locale, component.getLocale())
|| !Objects.equal(style, compo... | public final void setSrcAttribute(final ComponentTag tag)
{
// If locale has changed from the initial locale used to attach image
// resource, then we need to reload the resource in the new locale
if ( resourceKind == null &&
(!Objects.equal(locale, component.getLocale())
|| !Objects.equal(style, compo... |
private static void checkVersion(Class clazz, String expected) {
String actual = "*NONE*"; // $NON-NLS-1$
try {
actual = (String) clazz.getMethod("getVersion", null).invoke(null, null);
actual = extractVersion(actual);
} catch (Exception ignored) {
// Not needed
}
if (0 != actual.compareTo(expected... | private static void checkVersion(Class clazz, String expected) {
String actual = "*NONE*"; // $NON-NLS-1$
try {
actual = (String) clazz.getMethod("getVersion", null).invoke(null, null);
actual = extractVersion(actual);
} catch (Exception ignored) {
// Not needed
}
if (0 != actual.compareTo(expected... |
private Map extractAttributes(String attributeString)
{
Map m = new HashMap();
attributeString = Strings.replaceAll(attributeString.trim(), "\t", " ").toString();
attributeString = Strings.replaceAll(attributeString, " = ", "=").toString();
String[] attributeElements = attributeString.split(" ");
for (Strin... | private Map extractAttributes(String attributeString)
{
Map<String, String> m = new HashMap<String, String>();
attributeString = Strings.replaceAll(attributeString.trim(), "\t", " ").toString();
attributeString = Strings.replaceAll(attributeString, " = ", "=").toString();
String[] attributeElements = attribut... |
public IRequestTarget decode(RequestParameters requestParameters)
{
String remainder = requestParameters.getPath().substring(getMountPath().length());
final String parametersFragment;
int ix = remainder.indexOf('/', 1);
if (ix == -1)
{
ix = remainder.length();
parametersFragment = "";
}
else
{
... | public IRequestTarget decode(RequestParameters requestParameters)
{
String remainder = requestParameters.getPath().substring(getMountPath().length());
final String parametersFragment;
int ix = remainder.indexOf('/', 1);
if (ix == -1)
{
ix = remainder.length();
parametersFragment = "";
}
else
{
... |
public void testStyleDateConverterTimeZoneDifference() throws ParseException
{
TimeZone origJvmDef = TimeZone.getDefault();
DateTimeZone origJodaDef = DateTimeZone.getDefault();
TimeZone tzClient = TimeZone.getTimeZone("Etc/GMT-14");
TimeZone tzServer = TimeZone.getTimeZone("Etc/GMT+12");
TimeZone.setDefau... | public void testStyleDateConverterTimeZoneDifference() throws ParseException
{
TimeZone origJvmDef = TimeZone.getDefault();
DateTimeZone origJodaDef = DateTimeZone.getDefault();
TimeZone tzClient = TimeZone.getTimeZone("Etc/GMT-14");
TimeZone tzServer = TimeZone.getTimeZone("Etc/GMT+12");
TimeZone.setDefau... |
int[] rNums = {
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistribu... | int[] rNums = {
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistribu... |
PointcutExpression getPointcutExpression();
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies ... | PointcutExpression getPointcutExpression();
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies ... |
PointcutExpression getPointcutExpression();
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies ... | PointcutExpression getPointcutExpression();
/* *******************************************************************
* Copyright (c) 2005 Contributors.
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.