buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public void clearGui(){
super.clearGui();
useProperties.setSelected(false); // $NON-NLS-1$
jndiICF.setText(""); // $NON-NLS-1$
urlField.setText(""); // $NON-NLS-1$
jndiConnFac.setText(""); // $NON-NLS-1$
jmsDestination.setText(""); // $NON-NLS-1$
jmsUser.setTe... | public void clearGui(){
super.clearGui();
useProperties.setSelected(false); // $NON-NLS-1$
jndiICF.setText(""); // $NON-NLS-1$
urlField.setText(""); // $NON-NLS-1$
jndiConnFac.setText(""); // $NON-NLS-1$
jmsDestination.setText(""); // $NON-NLS-1$
jmsUser.setTe... |
public void deselectAll () {
checkWidget ();
deselect (null, 0);
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null) {
if (columnCount <= ... | public void deselectAll () {
checkWidget ();
deselect (null, 0);
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<itemCount; i++) {
TableItem item = items [i];
if (item != null) {
if (columnCount <= ... |
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 void deselectAll () {
checkWidget ();
ignoreSelect = true;
/*
* Bug in the Macintosh. When the DataBroswer selection flags includes
* both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
* two items are selected when SetDataBrowserSelectedItems() is called
* with kDataBrowserItemsAssign... | public void deselectAll () {
checkWidget ();
ignoreSelect = true;
/*
* Bug in the Macintosh. When the DataBroswer selection flags includes
* both kDataBrowserNeverEmptySelectionSet and kDataBrowserSelectOnlyOne,
* two items are selected when SetDataBrowserSelectedItems() is called
* with kDataBrowserItemsAssign... |
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... |
protected boolean sameBaseURIAsIncludeParent() {
String parentBaseURI = getIncludeParentBaseURI();
String baseURI = fCurrentBaseURI.getExpandedSystemId();
// REVISIT: should we use File#sameFile() ?
// I think the benefit of using it is that it resolves host names
//... | protected boolean sameBaseURIAsIncludeParent() {
String parentBaseURI = getIncludeParentBaseURI();
String baseURI = fCurrentBaseURI.getExpandedSystemId();
// REVISIT: should we use File#sameFile() ?
// I think the benefit of using it is that it resolves host names
//... |
void configure(HashTree testTree, String host) throws RemoteException;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file t... | void configure(HashTree testTree, String host) throws RemoteException;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file t... |
package org.apache.wicket.markup.html.tree;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lice... | package org.apache.wicket.markup.html.tree;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lice... |
package org.apache.wicket.markup.html.tree;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lice... | package org.apache.wicket.markup.html.tree;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lice... |
package org.apache.wicket.markup.html.tree.table;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apach... | package org.apache.wicket.markup.html.tree.table;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apach... |
public interface AbstractNamed {
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://w... | public interface AbstractNamed {
/**
* <copyright>
*
* Copyright (c) 2002-2007 itemis AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://w... |
public void chatRoomViewClosing() {
container.dispose();
}
};
}
| public void chatRoomViewClosing() {
container.disconnect();
}
};
}
|
private void scanDir(File from, File to) {
String[] list = from.list(new DesirableFilter());
if (list == null) {
project.log("Source directory " + srcDir.getAbsolutePath()
+ " does not exist.", "copydir", Project.MSG_WARN);
return;
}
for (int i... | private void scanDir(File from, File to) {
String[] list = from.list(new DesirableFilter());
if (list == null) {
project.log("Source directory " + srcDir.getAbsolutePath()
+ " does not exist.", "copydir", Project.MSG_WARN);
return;
}
for (int i... |
public void execute() throws org.apache.tools.ant.BuildException {
int result = 0;
if (repository == null || repository.trim().equals("")) {
throw new BuildException("Required argument repository not specified");
}
// Check workspace exists
// Launch PCLI listve... | public void execute() throws org.apache.tools.ant.BuildException {
int result = 0;
if (repository == null || repository.trim().equals("")) {
throw new BuildException("Required argument repository not specified");
}
// Check workspace exists
// Launch PCLI listve... |
public Object component(final Component component)
{
// Get button
final IFormSubmittingComponent submit = (IFormSubmittingComponent)component;
// Check for button-name or button-name.x request string
if (submit.getForm().getRootForm() == Form.this
&& (getRequest().getParamete... | public Object component(final Component component)
{
// Get button
final IFormSubmittingComponent submit = (IFormSubmittingComponent)component;
// Check for button-name or button-name.x request string
if (submit.getForm() != null && submit.getForm().getRootForm() == Form.this
... |
public static void main(String[] args) {
Server server = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });
WebAppContext web = new WebAppContext();
web.setContextPath("/wicket-examples");
web.setWa... | public static void main(String[] args) {
Server server = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });
WebAppContext web = new WebAppContext();
web.setContextPath("/wicket-auth-roles-examples");
... |
private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
XSAttributeGroupDecl toAttrGrp,
String typeName,
boolean extension,
Element elem)
throws ComplexTypeRecoverableError {
XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
X... | private void mergeAttributes(XSAttributeGroupDecl fromAttrGrp,
XSAttributeGroupDecl toAttrGrp,
String typeName,
boolean extension,
Element elem)
throws ComplexTypeRecoverableError {
XSObjectList attrUseS = fromAttrGrp.getAttributeUses();
X... |
public void setUp() {
// Need to skip tests on MySQL, Oracle and MS SQL Server
// See createSchemas() comment at the bottom
setUnsupportedDatabases(
org.apache.openjpa.jdbc.sql.MySQLDictionary.class,
org.apache.openjpa.jdbc.sql.OracleDictionary.class,
... | public void setUp() {
// Need to skip tests on MySQL, Oracle and MS SQL Server
// See createSchemas() comment at the bottom
setUnsupportedDatabases(
org.apache.openjpa.jdbc.sql.MySQLDictionary.class,
org.apache.openjpa.jdbc.sql.OracleDictionary.class,
... |
protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,boolean xlinterror) {
return binaryWeave(inpath,insource,expErrors,expWarnings,false,"");
}
| protected CompilationResult binaryWeave(String inpath, String insource,int expErrors,int expWarnings,boolean xlinterror) {
return binaryWeave(inpath,insource,expErrors,expWarnings,xlinterror,"");
}
|
public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width <= 0 || height <= 0) return;
int deltaX = destX - srcX, deltaY = destY - srcY;
if (deltaX == 0 && deltaY == 0) return;
NSAutoreleasePool pool =... | public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) {
if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (width <= 0 || height <= 0) return;
int deltaX = destX - srcX, deltaY = destY - srcY;
if (deltaX == 0 && deltaY == 0) return;
NSAutoreleasePool pool =... |
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;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_G... | 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;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_STATE;
tvItem.hItem = hItem;
OS.SendMessage (handle, OS.TVM_G... |
public void testStrategy() {
EntityManagerFactory emf = Persistence.
createEntityManagerFactory("example", System.getProperties());
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Person person = new Person();
person.setName("parul");
person.setAge(21);
// no... | public void testStrategy() {
EntityManagerFactory emf = Persistence.
createEntityManagerFactory("testStrategy", System.getProperties());
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Person person = new Person();
person.setName("parul");
person.setAge(21);
... |
protected void onComponentTag(ComponentTag tag)
{
String href = tag.getString("href");
if (href.charAt(0) != '/')
{
WebRequestCycle hcycle = (WebRequestCycle)getRequestCycle();
String requestUrl = ((WebRequest)hcycle.getRequest()).getHttpServletRequest().getReques... | protected void onComponentTag(ComponentTag tag)
{
String href = tag.getString("href");
if (href.charAt(0) != '/')
{
WebRequestCycle hcycle = (WebRequestCycle)getRequestCycle();
String requestUrl = ((WebRequest)hcycle.getRequest()).getHttpServletRequest().getReques... |
protected boolean checkAccess()
{
// Is user signed in?
if (getLibrarySession().isSignedIn())
{
// okay to proceed
return true;
}
else
{
// Force sign in
getRequestCycle().redirectToInterceptPage(SignIn.class);
... | protected boolean checkAccess()
{
// Is user signed in?
if (getLibrarySession().isSignedIn())
{
// okay to proceed
return true;
}
else
{
// Force sign in
redirectToInterceptPage(newPage(SignIn.class));
re... |
protected boolean checkAccess()
{
// Is a user signed into this cycle's session?
boolean signedIn = getSignInSession().isSignedIn();
// If nobody is signed in
if (!signedIn)
{
// Redirect request to SignIn page
getRequestCycle().redirectToIntercep... | protected boolean checkAccess()
{
// Is a user signed into this cycle's session?
boolean signedIn = getSignInSession().isSignedIn();
// If nobody is signed in
if (!signedIn)
{
// Redirect request to SignIn page
redirectToInterceptPage(newPage(Sign... |
protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// If a user subclasses this class and implements IOnChangeListener
// an onChange scriptlet is added
final String url = getRequestCycle().urlFor(this, IOnChangeListener.class);
// Should the form be resubmitted ... | protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "select");
// If a user subclasses this class and implements IOnChangeListener
// an onChange scriptlet is added
final String url = getPage().urlFor(this, IOnChangeListener.class);
// Should the form be resubmitted if the s... |
protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "form");
super.onComponentTag(tag);
tag.put("method", "POST");
String url = getRequestCycle().urlFor(Form.this, IFormSubmitListener.class);
url = url.replaceAll("&", "&");
tag.put("action", url);
}
| protected void onComponentTag(final ComponentTag tag)
{
checkComponentTag(tag, "form");
super.onComponentTag(tag);
tag.put("method", "POST");
String url = getPage().urlFor(Form.this, IFormSubmitListener.class);
url = url.replaceAll("&", "&");
tag.put("action", url);
}
|
protected String getURL()
{
// gets url to the dispatcher
return getRequestCycle().urlFor(pageClass, parameters);
}
| protected String getURL()
{
// gets url to the dispatcher
return getPage().urlFor(pageClass, parameters);
}
|
public int indexOf (TabItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
int count = OS.GetControl32BitMaximum (handle);
for (int i=0; i<count; i++) {
if (items [i] == item) return i;
}
return -1;
}
Point minimumSize (int wHint, int hHint, boolean flushCache) {
Control [] childre... | public int indexOf (TabItem item) {
checkWidget ();
if (item == null) error (SWT.ERROR_NULL_ARGUMENT);
int count = OS.GetControl32BitMaximum (handle);
for (int i=0; i<count; i++) {
if (items [i] == item) return i;
}
return -1;
}
Point minimumSize (int wHint, int hHint, boolean flushCache) {
Control [] childre... |
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 = (String)getConverter().convert(renderer.getDisplayValue(choice), String.class);
buffer.append("\n<option ");
if (isSelected(choice, index))
{
buffer.append("selected=\"selected\"");
}
buffer.app... |
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 < cho... | 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 < cho... |
Object getDisplayValue(Object object);
/*
* $Id$ $Revision$ $Date$
*
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* th... | Object getDisplayValue(Object object);
/*
* $Id$ $Revision$ $Date$
*
* ==============================================================================
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* th... |
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 < c... | 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 < c... |
public void beforeRender(final Component component)
{
Response response = component.getResponse();
Object parent = getParentNode(node);
CharSequence classes[] = new CharSequence[level];
for (int i = 0; i < level; ++i)
{
if (parent == null || isNodeLast(parent))
{
classes[i] = "spacer";
... | public void beforeRender(final Component component)
{
Response response = component.getResponse();
Object parent = getParentNode(node);
CharSequence classes[] = new CharSequence[level];
for (int i = 0; i < level; ++i)
{
if (parent == null || isNodeLast(parent))
{
classes[i] = "spacer";
... |
public void testHelloWorld() {
beginAt("/forminput");
assertTitleEquals("Wicket - Form Input Example");
}
| public void testHelloWorld() {
beginAt("/forminput");
assertTitleEquals("Wicket Examples - forminput");
}
|
public void testHelloWorld() {
beginAt("/linkomatic");
assertTitleEquals("Wicket - LinkOMatic example");
}
| public void testHelloWorld() {
beginAt("/linkomatic");
assertTitleEquals("Wicket Examples - linkomatic");
}
|
public void testHomePage()
{
beginAt("/spring");
assertTitleEquals("Wicket: Spring integration example");
}
| public void testHomePage()
{
beginAt("/spring");
assertTitleEquals("Wicket Examples - springframework");
}
|
public void testHomePage()
{
beginAt("/spring2");
assertTitleEquals("2nd Spring example");
}
| public void testHomePage()
{
beginAt("/spring2");
assertTitleEquals("Wicket Examples - springframework2");
}
|
protected void registerResource( final String name,
final String className,
final File file )
throws TaskException
{
if( null == className )
{
try { getDeployer().deployDataType( name, file ); }
... | protected void registerResource( final String name,
final String className,
final File file )
throws TaskException
{
if( null == className )
{
try { getDeployer().deployType( DataType.ROLE, name, file )... |
protected void registerResource( final String name,
final String className,
final File file )
throws TaskException
{
if( null == className )
{
try { getDeployer().deployTask( name, file ); }
... | protected void registerResource( final String name,
final String className,
final File file )
throws TaskException
{
if( null == className )
{
try { getDeployer().deployType( Task.ROLE, name, file ); }
... |
String getRoleForName( String name );
/*
* 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.myrmido... | String getRoleForName( String name );
/*
* 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.myrmido... |
protected void scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
boolean checkEntities,Stri... | protected void scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
boolean checkEntities,Stri... |
protected void scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
boolean checkEntities,Stri... | protected void scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes, int attrIndex,
boolean checkEntities,Stri... |
public NumberFormat getNumberFormat(Locale locale)
{
NumberFormat numberFormat = numberFormats.get(locale);
if (numberFormat == null)
{
numberFormat = NumberFormat.getIntegerInstance(locale);
numberFormat.setParseIntegerOnly(true);
numberFormat.setGroupingUsed(false);
numberFormats.put(locale, numbe... | public NumberFormat getNumberFormat(final Locale locale)
{
NumberFormat numberFormat = numberFormats.get(locale);
if (numberFormat == null)
{
numberFormat = NumberFormat.getIntegerInstance(locale);
numberFormat.setParseIntegerOnly(true);
numberFormat.setGroupingUsed(false);
numberFormats.put(locale,... |
public String convertToString(final Number value, Locale locale)
{
NumberFormat fmt = getNumberFormat(locale);
if (fmt != null)
{
return fmt.format(value);
}
return value.toString();
}
} | public String convertToString(final Number value, final Locale locale)
{
NumberFormat fmt = getNumberFormat(locale);
if (fmt != null)
{
return fmt.format(value);
}
return value.toString();
}
} |
public CachingSunJceCryptFactory(String encryptionKey)
{
super(new ClassCryptFactory(SunJceCrypt.class, encryptionKey));
}
} | public CachingSunJceCryptFactory(final String encryptionKey)
{
super(new ClassCryptFactory(SunJceCrypt.class, encryptionKey));
}
} |
protected byte[] crypt(byte[] input, int mode) throws GeneralSecurityException
{
final byte[] result = new byte[input.length];
for (int i = 0; i < input.length; i++)
{
result[i] = (byte)(input[i] ^ 0xff);
}
return result;
}
} | protected byte[] crypt(final byte[] input, final int mode) throws GeneralSecurityException
{
final byte[] result = new byte[input.length];
for (int i = 0; i < input.length; i++)
{
result[i] = (byte)(input[i] ^ 0xff);
}
return result;
}
} |
public DiffException(String msg)
{
super(msg);
}
} | public DiffException(final String msg)
{
super(msg);
}
} |
public DifferentiationFailedException(String msg)
{
super(msg);
}
} | public DifferentiationFailedException(final String msg)
{
super(msg);
}
} |
public PatchFailedException(String msg)
{
super(msg);
}
} | public PatchFailedException(final String msg)
{
super(msg);
}
} |
public final char charAt(int pos)
{
return input.charAt(pos);
}
} | public final char charAt(final int pos)
{
return input.charAt(pos);
}
} |
public Object readResolve() throws java.io.ObjectStreamException
{
EnumeratedType result = this;
List<EnumeratedType> values = getValues(getClass());
if (values != null)
{
for (EnumeratedType value : values)
{
if (value.toString() != null && value.toString().equals(this.toString()))
{
resul... | public Object readResolve() throws java.io.ObjectStreamException
{
EnumeratedType result = this;
List<EnumeratedType> values = getValues(getClass());
if (values != null)
{
for (EnumeratedType value : values)
{
if ((value.toString() != null) && value.toString().equals(this.toString()))
{
res... |
public AttributeMap(Map<String, Object> map)
{
super(map);
}
} | public AttributeMap(final Map<String, Object> map)
{
super(map);
}
} |
private boolean acceptGranularity(ProgramElementNode.Kind kind, StructureViewProperties.Granularity granularity) {
if (granularity == StructureViewProperties.Granularity.DECLARED_ELEMENTS) {
return true;
} else if (granularity == StructureViewProperties.Granularity.MEMBER &&
(kind == ProgramElementNode.K... | private boolean acceptGranularity(ProgramElementNode.Kind kind, StructureViewProperties.Granularity granularity) {
if (granularity == StructureViewProperties.Granularity.DECLARED_ELEMENTS) {
return true;
} else if (granularity == StructureViewProperties.Granularity.MEMBER &&
(kind != ProgramElementNode.K... |
public EndpointListenerHolder[] getMatchingEndpointListenerHolders(
ServiceReference[] refs, EndpointDescription description) {
if (refs == null)
return null;
List results = new ArrayList();
for (int i = 0; i < refs.length; i++) {
EndpointListener listener = (EndpointListener) context
.getService(r... | public EndpointListenerHolder[] getMatchingEndpointListenerHolders(
ServiceReference[] refs, EndpointDescription description) {
if (refs == null)
return null;
List results = new ArrayList();
for (int i = 0; i < refs.length; i++) {
EndpointListener listener = (EndpointListener) context
.getService(r... |
public static String[] getServiceIntents(ServiceReference serviceReference) {
List results = new ArrayList();
String[] intents = getStringArrayFromPropertyValue(serviceReference
.getProperty(org.osgi.service.remoteserviceadmin.RemoteConstants.SERVICE_INTENTS));
if (intents != null)
results.addAll(Arrays.a... | public static String[] getServiceIntents(ServiceReference serviceReference) {
List results = new ArrayList();
String[] intents = getStringArrayFromPropertyValue(serviceReference
.getProperty(org.osgi.service.remoteserviceadmin.RemoteConstants.SERVICE_INTENTS));
if (intents != null)
results.addAll(Arrays.a... |
private URL scanNodes(Node node, URLCollection urls, URL baseUrl) throws HTMLParseException {
if (node == null) {
return baseUrl;
}
String name = node.getNodeName();
int type = node.getNodeType();
switch (type) {
case Node.DOCUMENT_NODE:
scanNodes(((Document) node).getDocumentElement(), urls, bas... | private URL scanNodes(Node node, URLCollection urls, URL baseUrl) throws HTMLParseException {
if (node == null) {
return baseUrl;
}
String name = node.getNodeName();
int type = node.getNodeType();
switch (type) {
case Node.DOCUMENT_NODE:
scanNodes(((Document) node).getDocumentElement(), urls, bas... |
protected Sampler nextIsNull() throws NextIsNullException {
reInitialize();
if (endOfLoop()) {
if (!getContinueForever()) {
setDone(true);
} else {
resetLoopCount();
}
return null;
} else {
return next();
}
}
| protected Sampler nextIsNull() throws NextIsNullException {
reInitialize();
if (endOfLoop()) {
if (!getContinueForever()) {
setDone(true);
} else {
resetLoopCount();
}
return null;
} else {
return doNext();
}
}
|
public Sample addSample(SampleResult res) {
Sample s = null;
synchronized (calculator) {
long byteslength = 0;
// in case the sampler doesn't return the contents
// we see if the bytes was set
if (res.getResponseData() == null || res.getResponseData().length == 0) {
byteslength = res.getBytes();
... | public Sample addSample(SampleResult res) {
Sample s = null;
synchronized (calculator) {
long byteslength = 0;
// in case the sampler doesn't return the contents
// we see if the bytes was set
if (res.getResponseData() == null || res.getResponseData().length == 0) {
byteslength = res.getContentLeng... |
public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
TreeItem [] children = parentItem == null ? items : parentItem.items;
... | public void setItemCount (int count) {
checkWidget ();
count = Math.max (0, count);
setItemCount (null, count);
}
void setItemCount (TreeItem parentItem, int count) {
int itemCount = getItemCount (parentItem);
if (count == itemCount) return;
TreeItem [] children = parentItem == null ? items : parentItem.items;
... |
public ImageList () {
handle = OS.ImageList_Create (32, 32, COLOR_FLAGS | OS.ILC_MASK, 16, 16);
images = new Image [4];
}
| public ImageList () {
handle = OS.ImageList_Create (32, 32, COLOR_FLAGS | OS.ILC_MASK | OS.ILC_MIRROR, 16, 16);
images = new Image [4];
}
|
public int getSelectionIndex () {
checkWidget ();
return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
if (image == null) return OS.I_IMAGENONE;
if (imageList == null) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (new Point (bounds.width, bounds.... | public int getSelectionIndex () {
checkWidget ();
return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);
}
int imageIndex (Image image) {
if (image == null) return OS.I_IMAGENONE;
if (imageList == null) {
Rectangle bounds = image.getBounds ();
imageList = display.getImageList (bounds.width, bounds.height);
... |
public int getTopIndex () {
checkWidget ();
/*
* Bug in Windows. Under rare circumstances, LVM_GETTOPINDEX
* can return a negative number. When this happens, the table
* is displaying blank lines at the top of the controls. The
* fix is to check for a negative number and return zero instead.
*/
return Math.m... | public int getTopIndex () {
checkWidget ();
/*
* Bug in Windows. Under rare circumstances, LVM_GETTOPINDEX
* can return a negative number. When this happens, the table
* is displaying blank lines at the top of the controls. The
* fix is to check for a negative number and return zero instead.
*/
return Math.m... |
public TreeItem getTopItem () {
checkWidget ();
int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return null;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_PARAM;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) == 0) return null... | public TreeItem getTopItem () {
checkWidget ();
int hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_FIRSTVISIBLE, 0);
if (hItem == 0) return null;
TVITEM tvItem = new TVITEM ();
tvItem.mask = OS.TVIF_PARAM;
tvItem.hItem = hItem;
if (OS.SendMessage (handle, OS.TVM_GETITEM, 0, tvItem) == 0) return null... |
private void traverseLocal(XSParticleDecl particle, Element elmDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
int allContextFlags) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.... | private void traverseLocal(XSParticleDecl particle, Element elmDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
int allContextFlags) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.... |
public void widgetSelected(SelectionEvent e) {
TableItem [] items = table.getItems();
for (int i = 0; i < EVENT_NAMES.length; i++) {
items[i].setChecked(false);
}
for (int i = 0; i < customNames.length; i++) {
items[EVENT_NAMES.length + i].setChecked(false);
}
}
});
Label filler ... | public void widgetSelected(SelectionEvent e) {
TableItem [] items = table.getItems();
for (int i = 0; i < EVENT_NAMES.length; i++) {
items[i].setChecked(false);
}
for (int i = 0; i < customNames.length; i++) {
items[EVENT_NAMES.length + i].setChecked(false);
}
}
});
new Label(dia... |
public XMLSerializer( OutputFormat format )
{
super( format != null ? format : new OutputFormat( Method.XML, null, false ) );
format.setMethod( Method.XML );
}
| public XMLSerializer( OutputFormat format )
{
super( format != null ? format : new OutputFormat( Method.XML, null, false ) );
_format.setMethod( Method.XML );
}
|
public XSElementDecl fSubGroup = null;
// identity constraints
static final int INITIAL_SIZE = 8;
int fIDCPos = 0;
| public XSElementDecl fSubGroup = null;
// identity constraints
static final int INITIAL_SIZE = 2;
int fIDCPos = 0;
|
public void testSetHTTPFileArgs() throws Exception {
List newHTTPFileArgs = new LinkedList();
newHTTPFileArgs.add(new HTTPFileArg("hede"));
HTTPFileArgs files = new HTTPFileArgs();
files.setHTTPFileArgs((List) newHTTPFileArgs);
assertEquals(1, files.getHTTPFileArgCount());
assertEquals("hede", ((HTTPFileAr... | public void testSetHTTPFileArgs() throws Exception {
List newHTTPFileArgs = new LinkedList();
newHTTPFileArgs.add(new HTTPFileArg("hede"));
HTTPFileArgs files = new HTTPFileArgs();
files.setHTTPFileArgs(newHTTPFileArgs);
assertEquals(1, files.getHTTPFileArgCount());
assertEquals("hede", ((HTTPFileArg) file... |
public String leaveDTD()
{
// Only works if we're going out of DTD mode.
if ( _writer == _dtdWriter ) {
_line.append( _text );
_text = new StringBuffer( 20 );
flushLine( false );
_writer = _docWriter;
return _dtdWriter.toString();
... | public String leaveDTD()
{
// Only works if we're going out of DTD mode.
if ( _writer == _dtdWriter ) {
_line.append( _text );
_text = new StringBuffer( 20 );
flushLine( false );
_writer = _docWriter;
return _dtdWriter.toString();
... |
public String leaveDTD()
throws IOException
{
// Only works if we're going out of DTD mode.
if ( _writer == _dtdWriter ) {
flushLine( false );
_writer = _docWriter;
return _dtdWriter.toString();
} else
return null;
}
| public String leaveDTD()
throws IOException
{
// Only works if we're going out of DTD mode.
if ( _writer == _dtdWriter ) {
flushLine( false );
_writer = _docWriter;
return _dtdWriter.toString();
}
return null;
}
|
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 testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(PagedTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTablePage page = (PagedTablePage)application.getLastRendered... | public void testPagedTable() throws Exception
{
MockWebApplication application = new MockWebApplication(null);
application.getPages().setHomePage(PagedTablePage.class);
application.setupRequestAndResponse();
application.processRequestCycle();
PagedTablePage page = (PagedTablePage)application.getLastRendered... |
private URL[] buildClasspath( final ArrayList files )
throws MalformedURLException
{
final URL[] urls = new URL[ files.size() + 1 ];
final int count = files.size();
for( int i = 0; i < count; i++ )
{
final File file = (File)files.get( i );
urls[ i ... | private URL[] buildClasspath( final ArrayList files )
throws MalformedURLException
{
final URL[] urls = new URL[ files.size() ];
final int count = files.size();
for( int i = 0; i < count; i++ )
{
final File file = (File)files.get( i );
urls[ i ] = ... |
public static final boolean autoCreateProxyContainer = new Boolean(
System.getProperty(
"org.eclipse.ecf.osgi.services.distribution.autoCreateProxyContainer", //$NON-NLS-1$
"false")).booleanValue(); //$NON-NLS-1$
| public static final boolean autoCreateProxyContainer = new Boolean(
System.getProperty(
"org.eclipse.ecf.osgi.services.distribution.autoCreateProxyContainer", //$NON-NLS-1$
"true")).booleanValue(); //$NON-NLS-1$
|
private static void preDetach(Broker broker, StateManagerImpl sm,
BitSet idxs) {
// make sure the existing object has the right fields fetched; call
// even if using currently-loaded fields for detach to make sure
// version is set
int detachMode = broker.getDetachState();
... | private static void preDetach(Broker broker, StateManagerImpl sm,
BitSet idxs) {
// make sure the existing object has the right fields fetched; call
// even if using currently-loaded fields for detach to make sure
// version is set
int detachMode = broker.getDetachState();
... |
public Object attach(AttachManager manager, Object toAttach,
ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner,
ValueMetaData ownerMeta, boolean explicit) {
BrokerImpl broker = manager.getBroker();
PersistenceCapable pc = (PersistenceCapable) toAttach;
b... | public Object attach(AttachManager manager, Object toAttach,
ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner,
ValueMetaData ownerMeta, boolean explicit) {
BrokerImpl broker = manager.getBroker();
PersistenceCapable pc = (PersistenceCapable) toAttach;
b... |
public void setUp() {
setUp("openjpa.DetachState", "fgs",
DetachmentOneManyParent.class, DetachmentOneManyChild.class);
}
| public void setUp() {
setUp("openjpa.DetachState", "fetch-groups",
DetachmentOneManyParent.class, DetachmentOneManyChild.class);
}
|
public ChatMessage(ID threadID, String subject, String body) {
this(threadID, IChatMessage.Type.NORMAL, subject, body);
}
| public ChatMessage(ID threadID, String subject, String body) {
this(threadID, IChatMessage.Type.CHAT, subject, body);
}
|
public void run() {
IResource resource = ResourcesPlugin.getWorkspace().getRoot();
ClientConnectAction action = new ClientConnectAction();
action.setProject(resource);
}
| public void run() {
IResource resource = ResourcesPlugin.getWorkspace().getRoot();
URIClientConnectAction action = new URIClientConnectAction();
action.setProject(resource);
}
|
public synchronized Object connect(ID remote, Object data, int timeout)
throws IOException {
trace("connect(" + remote + "," + data + "," + timeout + ")");
if (socket != null)
throw new ConnectException("Already connected to "+getAddressPort());
// parse URI
U... | public synchronized Object connect(ID remote, Object data, int timeout)
throws IOException {
trace("connect(" + remote + "," + data + "," + timeout + ")");
if (socket != null)
throw new ConnectException("Already connected to "+getAddressPort());
// parse URI
U... |
public String toString() {
return JMeterUtils.getResString("view_results_render_text");
}
| public String toString() {
return JMeterUtils.getResString("view_results_render_text"); // $NON-NLS-1$
}
|
public void append(String string) {
checkWidget();
if (string == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
int lastChar = Math.max(getCharCount(), 0);
replaceTextRange(lastChar, 0, string);
}
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
Sc... | public void append(String string) {
checkWidget();
if (string == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
int lastChar = Math.max(getCharCount(), 0);
replaceTextRange(lastChar, 0, string);
}
/**
* Calculates the scroll bars
*/
void calculateScrollBars() {
ScrollBar horizontalBar = getHorizontalBar();
Sc... |
protected void setDone(boolean done) {
nbLoops = null;
super.setDone(true);
}
| protected void setDone(boolean done) {
nbLoops = null;
super.setDone(done);
}
|
private ID userID;
MessageNotificationPopup(IWorkbenchWindow window, Shell parent, ID userID) {
super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE | SWT.ON_TOP, false, false, false, false, null, null);
this.window = window;
this.userID = userID;
}
| private ID userID;
MessageNotificationPopup(IWorkbenchWindow window, Shell parent, ID userID) {
super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE | SWT.ON_TOP, false, false, false, false, false, null, null);
this.window = window;
this.userID = userID;
}
|
public final void writeOutput(final Response response, final boolean stripWicketAttributes,
final String namespace)
{
response.write("<");
if (getType() == TagType.CLOSE)
{
response.write("/");
}
if (getNamespace() != null)
{
response.write(getNamespace());
response.write(":");
}
respons... | public final void writeOutput(final Response response, final boolean stripWicketAttributes,
final String namespace)
{
response.write("<");
if (getType() == TagType.CLOSE)
{
response.write("/");
}
if (getNamespace() != null)
{
response.write(getNamespace());
response.write(":");
}
respons... |
public CharSequence toXmlString(final String attributeToBeIgnored)
{
final AppendingStringBuffer buffer = new AppendingStringBuffer();
buffer.append('<');
if (type == TagType.CLOSE)
{
buffer.append('/');
}
if (namespace != null)
{
buffer.append(namespace);
buffer.append(':');
}
buffer.a... | public CharSequence toXmlString(final String attributeToBeIgnored)
{
final AppendingStringBuffer buffer = new AppendingStringBuffer();
buffer.append('<');
if (type == TagType.CLOSE)
{
buffer.append('/');
}
if (namespace != null)
{
buffer.append(namespace);
buffer.append(':');
}
buffer.a... |
public void populateItem(final ListItem listItem)
{
final Comment comment = (Comment)listItem.getModelObject();
listItem.add(new Label("date", new Model(comment.getDate())));
listItem.add(new MultiLineLabel("text", comment.getText()));
}
});
}
| public void populateItem(final ListItem listItem)
{
final Comment comment = (Comment)listItem.getModelObject();
listItem.add(new Label("date", new Model(comment.getDate())));
listItem.add(new MultiLineLabel("text", comment.getText()));
}
}).setVersioned(false);
}
|
public int validateContent(QName children[], int offset, int length) throws CMException {
if (DEBUG_VALIDATE_CONTENT)
System.out.println("DFAContentModel#validateContent");
//
// A DFA content model must *always* have at least 1 child
// so a failure is given if no chi... | public int validateContent(QName children[], int offset, int length) throws CMException {
if (DEBUG_VALIDATE_CONTENT)
System.out.println("DFAContentModel#validateContent");
//
// A DFA content model must *always* have at least 1 child
// so a failure is given if no chi... |
protected IMarkupLoader newMarkupLoader()
{
return new DefaultMarkupLoader();
}
| protected IMarkupLoader newMarkupLoader()
{
return new DefaultMarkupLoader(application);
}
|
public void testScan() throws ParserException {
createParser(
"<html><head><TITLE>test page</TITLE><BASE HREF=\"http://www.abc.com/\"><a href=\"home.cfm\">Home</a>...</html>",
"http://www.google.com/test/index.html");
LinkScanner linkScanner = new LinkScanner("-l");
parser.addScanner(linkScanner);
pars... | public void testScan() throws ParserException {
createParser(
"<html><head><TITLE>test page</TITLE><BASE HREF=\"http://www.abc.com/\"><a href=\"home.cfm\">Home</a>...</html>",
"http://www.google.com/test/index.html");
LinkScanner linkScanner = new LinkScanner("-l");
parser.addScanner(linkScanner);
pars... |
public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if (headIndex != -1 && bodyIndex != -1)
{
Map<S... | public AppendingStringBuffer filter(AppendingStringBuffer responseBuffer)
{
int headIndex = responseBuffer.indexOf("<head>");
int bodyIndex = responseBuffer.indexOf("</body>");
long timeTaken = System.currentTimeMillis() - RequestCycle.get().getStartTime();
if (headIndex != -1 && bodyIndex != -1)
{
Map<S... |
private void respondComponent(final Response response, final String markupId,
final Component component)
{
if (component.getRenderBodyOnly() == true)
{
throw new IllegalStateException(
"Ajax render cannot be called on component that has setRenderBodyOnly enabled. Component: " +
component.toString())... | private void respondComponent(final Response response, final String markupId,
final Component component)
{
if (component.getRenderBodyOnly() == true)
{
throw new IllegalStateException(
"Ajax render cannot be called on component that has setRenderBodyOnly enabled. Component: " +
component.toString())... |
public CharSequence encodeURL(CharSequence url)
{
return currentResponse.encodeURL(url);
}
};
redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding());
// redirect the response to the buffer
setResponse(redirectResponse);
// render the page into the buffer... | public CharSequence encodeURL(CharSequence url)
{
return currentResponse.encodeURL(url);
}
};
redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding());
// redirect the response to the buffer
setResponse(redirectResponse);
// render the page into the buffer... |
public void respond(RequestCycle requestCycle)
{
Page page = getPage(requestCycle);
// if the listener call wanted to redirect
// then do that if the page is not stateless.
if (requestCycle.isRedirect() && !page.isPageStateless())
{
requestCycle.redirectTo(page);
}
else
{
// else render the page... | public void respond(RequestCycle requestCycle)
{
Page page = getPage(requestCycle);
// if the listener call wanted to redirect
// then do that if the page is not stateless.
if (requestCycle.isRedirect() && !page.isPageStateless())
{
requestCycle.redirectTo(page);
}
else
{
// else render the page... |
public void respond(RequestCycle requestCycle)
{
if (pageClassRef != null && pageClassRef.get() != null)
{
if (requestCycle.isRedirect())
{
IRequestCycleProcessor processor = requestCycle.getProcessor();
String redirectUrl = processor.getRequestCodingStrategy()
.encode(requestCycle, this)
... | public void respond(RequestCycle requestCycle)
{
if (pageClassRef != null && pageClassRef.get() != null)
{
if (requestCycle.isRedirect())
{
IRequestCycleProcessor processor = requestCycle.getProcessor();
String redirectUrl = processor.getRequestCodingStrategy()
.encode(requestCycle, this)
... |
public void respond(final RequestCycle requestCycle)
{
// Initialize temporary variables
Page page = component.getPage();
if (page != null)
{
page.startComponentRender(component);
}
// Render the component
try
{
// Let pages render itself
if (component instanceof Page)
{
// Use the de... | public void respond(final RequestCycle requestCycle)
{
// Initialize temporary variables
Page page = component.getPage();
if (page != null)
{
page.startComponentRender(component);
}
// Render the component
try
{
// Let pages render itself
if (component instanceof Page)
{
// Use the de... |
public void respond(RequestCycle requestCycle)
{
Page page = reference.getPage();
// Should page be redirected to?
if (requestCycle.isRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
// Let page render itself
page.renderPage();
}
}
| public void respond(RequestCycle requestCycle)
{
Page page = reference.getPage();
// Should page be redirected to?
if (requestCycle.isRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
// Let page render itself
page.render();
}
}
|
public void respond(RequestCycle requestCycle)
{
// Should page be redirected to?
if (requestCycle.isRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
// Let page render itself
page.renderPage();
}
}
| public void respond(RequestCycle requestCycle)
{
// Should page be redirected to?
if (requestCycle.isRedirect())
{
// Redirect to the page
requestCycle.redirectTo(page);
}
else
{
// Let page render itself
page.render();
}
}
|
public AjaxEditableLabel(String id, IModel model)
{
super(id);
init(model);
}
| public AjaxEditableLabel(String id, IModel model)
{
super(id, model);
init(model);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.