buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
private void generateTable(int[] lengths) {
// Sort the values using shellsort. Primary key is code size. Secondary key is value.
int codeValuesTemp;
for (int k = 0; k < 16; k++) {
for (int h = incs[k], i = h; i < lengths.length; i++) {
int v = lengths[i];
codeValuesTemp = codeValues[i];
int j = i;
whi... | private void generateTable(int[] lengths) {
// Sort the values using shellsort. Primary key is code size. Secondary key is value.
int codeValuesTemp;
for (int k = 0; k < 16; k++) {
for (int h = incs[k], i = h; i < lengths.length; i++) {
int v = lengths[i];
codeValuesTemp = codeValues[i];
int j = i;
whi... |
import org.apache.myrmidon.components.model.Project;
/*
* 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.... | import org.apache.myrmidon.components.model.Project;
/*
* 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.... |
import org.apache.myrmidon.components.model.Project;
/*
* 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.... | import org.apache.myrmidon.components.model.Project;
/*
* 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.... |
package org.apache.myrmidon.components.model;
/*
* 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.... | package org.apache.myrmidon.components.model;
/*
* 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.... |
package org.apache.myrmidon.components.model;
/*
* 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.... | package org.apache.myrmidon.components.model;
/*
* 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.... |
protected JmeterKeyStore getKeyStore() {
if (null == this.keyStore) {
String fileName = System.getProperty(JAVAX_NET_SSL_KEY_STORE,""); // empty if not provided
String fileType = System.getProperty(JAVAX_NET_SSL_KEY_STORE_TYPE, // use the system property to determine the type
... | protected JmeterKeyStore getKeyStore() {
if (null == this.keyStore) {
String fileName = System.getProperty(JAVAX_NET_SSL_KEY_STORE,""); // empty if not provided
String fileType = System.getProperty(JAVAX_NET_SSL_KEY_STORE_TYPE, // use the system property to determine the type
... |
public void writeData(Attributes attributes)
{
attributes.getResponse().write(bytes);
}
});
}
catch (IOException e)
{
log.debug(e.getMessage(), e);
return sendResourceError(resourceResponse, 500, "Unable to read resource stream");
}
catch (ResourceStreamNotFoundException ... | public void writeData(Attributes attributes)
{
attributes.getResponse().write(bytes);
}
});
}
catch (IOException e)
{
log.debug(e.getMessage(), e);
return sendResourceError(resourceResponse, 500, "Unable to read resource stream");
}
catch (ResourceStreamNotFoundException ... |
private void populateSampler(Map<String, String> pageEncodings, Map<String, String> formEncodings)
throws MalformedURLException, UnsupportedEncodingException {
sampler.setDomain(serverName());
if (log.isDebugEnabled()) {
log.debug("Proxy: setting server: " + sampler.getDomain... | private void populateSampler(Map<String, String> pageEncodings, Map<String, String> formEncodings)
throws MalformedURLException, UnsupportedEncodingException {
sampler.setDomain(serverName());
if (log.isDebugEnabled()) {
log.debug("Proxy: setting server: " + sampler.getDomain... |
public Arguments getDefaultParameters() {
Arguments params = new Arguments();
params.addArgument("SleepTime", String.valueOf(DEFAULT_SLEEP_TIME));
params.addArgument("SleepMask", "0x" + (Long.toHexString(DEFAULT_SLEEP_MASK)).toUpperCase());
return params;
}
| public Arguments getDefaultParameters() {
Arguments params = new Arguments();
params.addArgument("SleepTime", String.valueOf(DEFAULT_SLEEP_TIME));
params.addArgument("SleepMask", "0x" + (Long.toHexString(DEFAULT_SLEEP_MASK)).toUpperCase(java.util.Locale.ENGLISH));
return params;
}
|
public void testMD5() throws Exception {
assertEquals("D41D8CD98F00B204E9800998ECF8427E", MD5HexAssertion.baMD5Hex(new byte[] {}).toUpperCase());
}
| public void testMD5() throws Exception {
assertEquals("D41D8CD98F00B204E9800998ECF8427E", MD5HexAssertion.baMD5Hex(new byte[] {}).toUpperCase(java.util.Locale.ENGLISH));
}
|
private int readRF(String res, List l) throws Exception {
int fails = 0;
InputStream ras = this.getClass().getResourceAsStream(res);
BufferedReader fileReader = new BufferedReader(new InputStreamReader(ras));
String s;
while ((s = fileReader.readLine()) != null) {
if (s.length() > 0 && !s.startsWith("#") ... | private int readRF(String res, List l) throws Exception {
int fails = 0;
InputStream ras = this.getClass().getResourceAsStream(res);
BufferedReader fileReader = new BufferedReader(new InputStreamReader(ras));
String s;
while ((s = fileReader.readLine()) != null) {
if (s.length() > 0 && !s.startsWith("#") ... |
public void run() {
if (styledText == null) return;
int i;
long start = System.currentTimeMillis();
for (i = 0; i < lineCount; i++) {
if (lineHeight[i] == -1 || lineWidth[i] == -1) {
calculate(i, 1);
if (System.currentTimeMillis() - start > IDLE_TIME) break;
}
}
if (i < lineCount) ... | public void run() {
if (styledText == null) return;
int i;
long start = System.currentTimeMillis();
for (i = 0; i < lineCount; i++) {
if (lineHeight[i] == -1 || lineWidth[i] == -1) {
calculate(i, 1);
if (System.currentTimeMillis() - start > IDLE_TIME) break;
}
}
if (i < lineCount) ... |
public HttpTestSampleGui2() {
super.init();
}
| public HttpTestSampleGui2() {
super();
}
|
protected void init() {
setLayout(new BorderLayout(10, 10));
setBorder(makeBorder());
setBackground(Color.white);
add(createCommentPanel(), BorderLayout.NORTH);
add(createVariablePanel(), BorderLayout.CENTER);
}
} | private void init() {// called from ctor, so must not be overridable
setLayout(new BorderLayout(10, 10));
setBorder(makeBorder());
setBackground(Color.white);
add(createCommentPanel(), BorderLayout.NORTH);
add(createVariablePanel(), BorderLayout.CENTER);
}
} |
public Schema importSchema(Schema schema) {
if (schema == null)
return null;
Schema copy = addSchema(schema.getName());
Sequence[] seqs = schema.getSequences();
for (int i = 0; i < seqs.length; i++)
copy.importSequence(seqs[i]);
Table[] tables = sche... | public Schema importSchema(Schema schema) {
if (schema == null)
return null;
Schema copy = addSchema(schema.getName());
Sequence[] seqs = schema.getSequences();
for (int i = 0; i < seqs.length; i++)
copy.importSequence(seqs[i]);
Table[] tables = sche... |
public void redirect(String url)
{
if (!redirect)
{
if (httpServletResponse != null)
{
// encode to make sure no caller forgot this
url = httpServletResponse.encodeRedirectURL(url).toString();
try
{
if (httpServletResponse.isCommitted())
{
log.error("Unable to redirect to: " ... | public void redirect(String url)
{
if (!redirect)
{
if (httpServletResponse != null)
{
// encode to make sure no caller forgot this
url = httpServletResponse.encodeRedirectURL(url).toString();
try
{
if (httpServletResponse.isCommitted())
{
log.error("Unable to redirect to: " ... |
protected final void populateItem(Item<T> item)
{
RepeatingView<T> cells = new RepeatingView<T>(CELL_REPEATER_ID);
item.add(cells);
ArrayIteratorAdapter<ICellPopulator<T>> populators = getPopulatorsIterator();
for (int i = 0; populators.hasNext(); i++)
{
IModel<ICellPopulator<T>> populatorModel = popul... | protected final void populateItem(Item<T> item)
{
RepeatingView<T> cells = new RepeatingView<T>(CELL_REPEATER_ID);
item.add(cells);
ArrayIteratorAdapter<ICellPopulator<T>> populators = getPopulatorsIterator();
for (int i = 0; populators.hasNext(); i++)
{
IModel<ICellPopulator<T>> populatorModel = popul... |
public Collection getChoices()
{
return (Collection)choicesModel.getObject(this);
}
| public Collection getChoices()
{
return (Collection)choicesModel.getObject();
}
|
public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(this, null);
}
/*
* the input c... | public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(null);
}
/*
* the input contain... |
public boolean isEnabled()
{
return !((Boolean)hasVoted.getObject(RatingPanel.this)).booleanValue();
}
};
int iteration = item.getIteration();
// add the star image, which is either active (highlighted) or
// inactive (no star)
link.add(new WebMarkupContainer("star").add(new SimpleAttr... | public boolean isEnabled()
{
return !((Boolean)hasVoted.getObject()).booleanValue();
}
};
int iteration = item.getIteration();
// add the star image, which is either active (highlighted) or
// inactive (no star)
link.add(new WebMarkupContainer("star").add(new SimpleAttributeModifier("s... |
public final String getContent()
{
return (content != null) ? (String)content.getObject(this) : null;
}
| public final String getContent()
{
return (content != null) ? (String)content.getObject() : null;
}
|
public void setTabList (Control [] tabList) {
checkWidget ();
if (tabList != null) {
for (int i=0; i<tabList.length; i++) {
Control control = tabList [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent != this) e... | public void setTabList (Control [] tabList) {
checkWidget ();
if (tabList != null) {
for (int i=0; i<tabList.length; i++) {
Control control = tabList [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.parent != this) e... |
public final String join(final int first, final int last, final String separator)
{
// Allocate buffer of exactly the right length
final int length = totalLength() + (separator.length() * (Math.max(0, last - first - 1)));
final StringBuffer buf = new StringBuffer(length);
// Loop through indexes requested
... | public final String join(final int first, final int last, final String separator)
{
// Allocate buffer of exactly the right length
final int length = totalLength() + (separator.length() * (Math.max(0, last - first - 1)));
final AppendingStringBuffer buf = new AppendingStringBuffer(length);
// Loop through in... |
private String stringValue(String[] arrayOfStrings)
{
StringBuffer sb = new StringBuffer("{");
String komma = "";
for (int i = 0; i < arrayOfStrings.length; i++)
{
sb.append(komma);
sb.append(arrayOfStrings[i]);
komma = ",";
}
sb.append("}");
return sb.toString();
}
| private String stringValue(String[] arrayOfStrings)
{
AppendingStringBuffer sb = new AppendingStringBuffer("{");
String komma = "";
for (int i = 0; i < arrayOfStrings.length; i++)
{
sb.append(komma);
sb.append(arrayOfStrings[i]);
komma = ",";
}
sb.append("}");
return sb.toString();
}
|
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
{
this.checkComponentTag(openTag, "a");
if ((label != null) && (label.getObject() != null))
{
replaceComponentTagBody(markupStream, openTag, label.getObject().toString());
}
else
{
super.onComponentTagBody(markupStrea... | protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
{
this.checkComponentTag(openTag, "a");
if ((label != null) && (label.getObject() != null))
{
replaceComponentTagBody(markupStream, openTag, getModelObjectAsString(label.getObject()));
}
else
{
super.onComponentTagBod... |
public void getDefaultAction (AccessibleControlEvent e) {
e.result = isDropped () ? "Close" : "Open"; //$NON-NLS-1$ //$NON-NLS-2$
}
});
}
| public void getDefaultAction (AccessibleControlEvent e) {
e.result = isDropped () ? SWT.getMessage ("SWT_Close") : SWT.getMessage ("SWT_Open"); //$NON-NLS-1$ //$NON-NLS-2$
}
});
}
|
public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {
org.apache.openjpa.kernel.Query kernelQuery =_broker.newQuery(CriteriaBuilder.LANG_CRITERIA, criteriaQuery);
kernelQuery.compile();
QueryImpl<T> facadeQuery = new QueryImpl<T>(this, _ret, kernelQuery);
Set<Paramet... | public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {
org.apache.openjpa.kernel.Query kernelQuery =_broker.newQuery(CriteriaBuilder.LANG_CRITERIA, criteriaQuery);
kernelQuery.compile();
QueryImpl<T> facadeQuery = new QueryImpl<T>(this, _ret, kernelQuery);
Set<Paramet... |
protected boolean isAggregate() {
return true;
}
}
| public boolean isAggregate() {
return true;
}
}
|
protected boolean isAggregate() {
return true;
}
} | public boolean isAggregate() {
return true;
}
} |
private ValidatorFactory getDefaultValidatorFactory() {
ValidatorFactory factory = null;
try {
factory = Validation.buildDefaultValidatorFactory();
} catch (javax.validation.ValidationException e) {
// no validation providers found
}
return factory;
... | private ValidatorFactory getDefaultValidatorFactory() {
ValidatorFactory factory = null;
try {
factory = AccessController.doPrivileged(J2DoPrivHelper.buildDefaultValidatorFactoryAction());
} catch (javax.validation.ValidationException e) {
// no validation providers f... |
public synchronized void add(SampleResult sample)
{
// -1 is the code for a failed sample.
//
if (!sample.isSuccessful())
{
failureCount++;
successCount = 0;
}
else
{
successCount++;
}
if (this.isFailin... | public synchronized void add(SampleResult sample)
{
// -1 is the code for a failed sample.
//
if (!sample.isSuccessful())
{
failureCount++;
successCount = 0;
}
else
{
successCount++;
}
if (this.isFailin... |
public static void main(String[] args){
if (args != null & args.length == 2){
String file = null;
//int count = 1;
if (args[0] != null){
file = args[0];
}
if (args[1] != null){
//count = Integer.parseInt(args[1]);
}
try {
ObjectFactory of = ObjectFactory.getInstance();
java.io.Fi... | public static void main(String[] args){
if (args != null && args.length == 2){
String file = null;
//int count = 1;
if (args[0] != null){
file = args[0];
}
if (args[1] != null){
//count = Integer.parseInt(args[1]);
}
try {
ObjectFactory of = ObjectFactory.getInstance();
java.io.F... |
public void setAuthManager(AuthManager value) {
AuthManager mgr = getAuthManager();
if (log.isDebugEnabled() && mgr != null) {
log.warn("Existing AuthManager " + mgr.getName() + " superseded by " + value.getName());
}
setProperty(new TestElementProperty(AUTH_MANAGER, valu... | public void setAuthManager(AuthManager value) {
AuthManager mgr = getAuthManager();
if (log.isDebugEnabled() && mgr != null) {
log.debug("Existing AuthManager " + mgr.getName() + " superseded by " + value.getName());
}
setProperty(new TestElementProperty(AUTH_MANAGER, val... |
public TableTreeItem(TableTreeItem parent, int style, int index) {
this (parent.getParent(), parent, style, index);
}
TableTreeItem(TableTree parent, TableTreeItem parentItem, int style, int index) {
super(parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (parentItem == null) {
/* Root i... | public TableTreeItem(TableTreeItem parent, int style, int index) {
this (parent.getParent(), parent, style, index);
}
TableTreeItem(TableTree parent, TableTreeItem parentItem, int style, int index) {
super(parent, style);
this.parent = parent;
this.parentItem = parentItem;
if (parentItem == null) {
/* Root i... |
public ClientConnectComposentAction() {
super();
try {
targetID = IDFactory.makeStringID(COMPOSENT_TARGET);
} catch (Exception e) {
//
}
}
| public ClientConnectComposentAction() {
super();
try {
targetID = IDFactory.makeStringID(COMPOSENT_TARGET);
} catch (Exception e) {
throw new RuntimeException("Exception in ClientConnectAction()",e);
}
}
|
private Markup loadMarkup(final Application application, final String key,
final Resource markupResource) throws ParseException, IOException,
ResourceNotFoundException
{
final Markup markup = application.getMarkupParser().read(markupResource);
markupCache.put(key, markup);
return markup;
}
| private Markup loadMarkup(final Application application, final String key,
final Resource markupResource) throws ParseException, IOException,
ResourceNotFoundException
{
final Markup markup = application.getMarkupParser().readAndParse(markupResource);
markupCache.put(key, markup);
return markup;
}
|
public void add(SampleResult res) {
synchronized (calc) {
calc.addValue(res.getTime());
Sample newS = new Sample(res.getSampleLabel(), res.getTime(), 0, 0, 0, 0, 0, 0, res.isSuccessful(), calc
.getCount(), res.getTimeStamp(),res.getResponseData().length);
model.addRow(newS);
}
currentData = res.get... | public void add(SampleResult res) {
synchronized (calc) {
calc.addValue(res.getTime());
Sample newS = new Sample(res.getSampleLabel(), res.getTime(), 0, 0, 0, 0, 0, 0, res.isSuccessful(), calc
.getCount(), res.getTimeStamp(),res.getBytes());
model.addRow(newS);
}
currentData = res.getTime();
upda... |
public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
throw new DOMException(
DOMException.NO_MODIFICATI... | public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
throw new DOMException(
DOMException.NO_MODIFICATI... |
public void connect(ID connectID, IConnectContext connectContext) throws ContainerConnectException {
if (connection != null)
throw new ContainerConnectException(Messages.IRCRootContainer_Exception_Already_Connected);
if (connectID == null)
throw new ContainerConnectException(Messages.IRCRootContainer_Excepti... | public void connect(ID connectID, IConnectContext connectContext) throws ContainerConnectException {
if (connection != null)
throw new ContainerConnectException(Messages.IRCRootContainer_Exception_Already_Connected);
if (connectID == null)
throw new ContainerConnectException(Messages.IRCRootContainer_Excepti... |
public void setImage (int columnIndex, Image value) {
checkWidget ();
if (value != null && value.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
TreeColumn[] columns = parent.columns;
int validColumnCount = Math.max (1, columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return;
Image ... | public void setImage (int columnIndex, Image value) {
checkWidget ();
if (value != null && value.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
TreeColumn[] columns = parent.columns;
int validColumnCount = Math.max (1, columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return;
Image ... |
public void changing(LocationEvent event) {
String location = event.location;
int index = location.indexOf(PREAMBLE);
if (index != -1) {
int pageNumber = Integer.valueOf(location.substring(index + PREAMBLE.length())).intValue();
browser.setText(createPage(pageNumber));
event.doit = false;
... | public void changing(LocationEvent event) {
String location = event.location;
int index = location.indexOf(PREAMBLE);
if (index != -1) {
int pageNumber = Integer.valueOf(location.substring(index + PREAMBLE.length())).intValue();
browser.setText(createPage(pageNumber));
event.doit = false;
... |
private void parseFirstLine(String firstLine) {
if (log.isDebugEnabled()) {
log.debug("browser request: " + firstLine);
}
StringTokenizer tz = new StringTokenizer(firstLine);
method = getToken(tz).toUpperCase(java.util.Locale.ENGLISH);
url = getToken(tz);
... | private void parseFirstLine(String firstLine) {
if (log.isDebugEnabled()) {
log.debug("browser request: " + firstLine);
}
StringTokenizer tz = new StringTokenizer(firstLine);
method = getToken(tz).toUpperCase(java.util.Locale.ENGLISH);
url = getToken(tz);
... |
import org.apache.myrmidon.framework.file.Path;
/*
* 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.a... | import org.apache.myrmidon.framework.file.Path;
/*
* 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.a... |
public double getAvgPageBytes() {
int count = calculator.getCount();
if (count == 0) {
return 0;
}
return calculator.getTotalBytes() / count;
}
| public double getAvgPageBytes() {
int count = calculator.getCount();
if (count == 0) {
return 0;
}
return calculator.getTotalBytes() / (double) count;
}
|
private SSLSocketFactory getSSLSocketFactory(String host) throws IOException {
synchronized (hashHost) {
if (hashHost.containsKey(host)) {
log.debug(port + "Good, already in map, host=" + host);
return hashHost.get(host);
}
InputStream in =... | private SSLSocketFactory getSSLSocketFactory(String host) throws IOException {
synchronized (hashHost) {
if (hashHost.containsKey(host)) {
log.debug(port + "Good, already in map, host=" + host);
return hashHost.get(host);
}
InputStream in =... |
protected void localize(Map<String, Object> widgetProperties, IHeaderResponse response,
Map<String, Object> initVariables)
{
Locale locale = getLocale();
String key = "wicketCalendarI18n[\"" + locale.toString() + "\"]";
initVariables.put("i18n", key);
if (response.wasRendered(key))
{
return;
}
Da... | protected void localize(Map<String, Object> widgetProperties, IHeaderResponse response,
Map<String, Object> initVariables)
{
Locale locale = getLocale();
String key = "wicketCalendarI18n[\"" + locale.toString() + "\"]";
initVariables.put("i18n", key);
if (response.wasRendered(key))
{
return;
}
Da... |
protected final void addUnresolvedValue( final String name, final String value )
{
try
{
final Object objectValue = resolveValue( value.toString() );
final String name1 = m_prefix + name;
getContext().setProperty( name1, objectValue );
}
catch(... | protected final void addUnresolvedValue( final String name, final String value )
{
try
{
final Object objectValue = getContext().resolveValue( value.toString() );
final String name1 = m_prefix + name;
getContext().setProperty( name1, objectValue );
}
... |
protected void validate()
throws TaskException
{
// do some validation first
if( m_metamataHome == null || !m_metamataHome.exists() )
{
throw new TaskException( "'metamatahome' must point to Metamata home directory." );
}
m_metamataHome = resolveFile( ... | protected void validate()
throws TaskException
{
// do some validation first
if( m_metamataHome == null || !m_metamataHome.exists() )
{
throw new TaskException( "'metamatahome' must point to Metamata home directory." );
}
m_metamataHome = getContext().... |
public Map getCurrentTargets() {
return currentTargets;
}
/**
* Set the map of the targets in the current source file.
* @param currentTargets a map of targets.
*/
void setCurrentTargets(Map currentTargets) {
this.currentTargets = currentTargets;
}
}
| public void setCurrentTargets(Map currentTargets) {
this.currentTargets = currentTargets;
}
}
|
private void drawChevron (int /*long*/ hDC, RECT rect) {
int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
rect.left += 4;
rect.top += 4;
rect.rig... | private void drawChevron (int /*long*/ hDC, RECT rect) {
int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetSysColorBrush (OS.COLOR_BTNFACE));
OS.PatBlt (hDC, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, OS.PATCOPY);
OS.SelectObject (hDC, oldBrush);
rect.left += 4;
rect.top += 4;
rect.rig... |
public void addCookieFromHeader(String cookieHeader, URL url)
{
StringTokenizer st = new StringTokenizer(cookieHeader, ";");
String nvp;
// first n=v is name=value
nvp = st.nextToken();
int index = nvp.indexOf("=");
String name = nvp.substring(0, index);
... | public void addCookieFromHeader(String cookieHeader, URL url)
{
StringTokenizer st = new StringTokenizer(cookieHeader, ";");
String nvp;
// first n=v is name=value
nvp = st.nextToken();
int index = nvp.indexOf("=");
String name = nvp.substring(0, index);
... |
public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Feature in WinCE. The function WindowFromDC is not part of the
* WinCE SDK. The fix is to remember the HWND.
*/
int hwnd = data.hwnd;
if (hwnd == ... | public void copyArea(int srcX, int srcY, int width, int height, int destX, int destY, boolean paint) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
/*
* Feature in WinCE. The function WindowFromDC is not part of the
* WinCE SDK. The fix is to remember the HWND.
*/
int hwnd = data.hwnd;
if (hwnd == ... |
public void init(String file) throws IOException
{
File datafile = new File(file);
BufferedReader reader = null;
if (datafile.canRead())
{
reader = new BufferedReader(new FileReader(datafile));
}
else
{
JOptionPane.showMessageDialo... | public void init(String file) throws IOException
{
File datafile = new File(file);
BufferedReader reader = null;
if (datafile.canRead())
{
reader = new BufferedReader(new FileReader(datafile));
}
else
{
JOptionPane.showMessageDialo... |
private static void printUsage() {
System.err.println("usage: java sax.Counter (options) uri ...");
System.err.println();
System.err.println("options:");
System.err.println(" -p name Select parser by name.");
System.err.println(" -x number Select number of repetitio... | private static void printUsage() {
System.err.println("usage: java sax.Counter (options) uri ...");
System.err.println();
System.err.println("options:");
System.err.println(" -p name Select parser by name.");
System.err.println(" -x number Select number of repetitio... |
private Dictionary getPropertiesForRemoteService(
ServiceEndpointDescription description,
IRemoteServiceContainerAdapter containerAdapter,
IRemoteServiceReference remoteReference,
IRemoteService remoteService) {
Properties results = new Properties();
String[] propKeys = remoteReference.getPropertyKeys(... | private Dictionary getPropertiesForRemoteService(
ServiceEndpointDescription description,
IRemoteServiceContainerAdapter containerAdapter,
IRemoteServiceReference remoteReference,
IRemoteService remoteService) {
Properties results = new Properties();
String[] propKeys = remoteReference.getPropertyKeys(... |
public InstructionList createLoadInstructions(ResolvedTypeX toType, InstructionFactory fact) {
InstructionList il = new InstructionList();
Type jlClass = BcelWorld.makeBcelType(TypeX.JAVA_LANG_CLASS);
Type jlaAnnotation = BcelWorld.makeBcelType(TypeX.forSignature("Ljava.lang.annotation.Annotation;"));
il.appen... | public InstructionList createLoadInstructions(ResolvedTypeX toType, InstructionFactory fact) {
InstructionList il = new InstructionList();
Type jlClass = BcelWorld.makeBcelType(TypeX.JAVA_LANG_CLASS);
Type jlaAnnotation = BcelWorld.makeBcelType(TypeX.forSignature("Ljava.lang.annotation.Annotation;"));
il.appen... |
public AnnotationTypePattern resolveBindings(IScope scope,
Bindings bindings, boolean allowBinding) {
if (resolved) return this;
resolved = true;
if (formalName != null) {
FormalBinding formalBinding = scope.lookupFormal(formalName);
if (formalBinding != null) {
if (bindings == null) {
scope.me... | public AnnotationTypePattern resolveBindings(IScope scope,
Bindings bindings, boolean allowBinding) {
if (resolved) return this;
resolved = true;
if (formalName != null) {
FormalBinding formalBinding = scope.lookupFormal(formalName);
if (formalBinding != null) {
if (bindings == null) {
scope.me... |
private boolean checkPreferences() {
final String title = Messages.QuickSignatureCommand_4;
final String prefId = "org.eclipse.wst.xml.security.ui.preferences.Signatures"; //$NON-NLS-1$
int result = 2;
if (resource == null || "".equals(resource)) { //$NON-NLS-1$
result =... | private boolean checkPreferences() {
final String title = Messages.QuickSignatureCommand_4;
final String prefId = "org.eclipse.wst.xml.security.ui.preferences.Signature"; //$NON-NLS-1$
int result = 2;
if (resource == null || "".equals(resource)) { //$NON-NLS-1$
result = ... |
private String removeComment(String rawMarkup)
{
int pos1 = rawMarkup.indexOf("<!--");
while (pos1 >= 0)
{
final int pos2 = rawMarkup.indexOf("-->", pos1 + 4);
final AppendingStringBuffer buf = new AppendingStringBuffer(rawMarkup.length());
if ((pos2 >= 0) && (pos1 > 0))
{
final String comment ... | private String removeComment(String rawMarkup)
{
int pos1 = rawMarkup.indexOf("<!--");
while (pos1 >= 0)
{
final int pos2 = rawMarkup.indexOf("-->", pos1 + 4);
final AppendingStringBuffer buf = new AppendingStringBuffer(rawMarkup.length());
if ((pos2 >= 0) && (pos1 > 0))
{
final String comment ... |
public void setMailport(int port) {
this.port = Integer.valueOf(port);
}
| public void setMailport(int port) {
this.port = new Integer(port);
}
|
public XSDUniqueOrKeyTraverser (XSDHandler handler,
XMLErrorReporter errorReporter,
XSAttributeChecker gAttrCheck) {
super(handler, errorReporter, gAttrCheck);
}
void traverse(Element uElem, XSElementDecl element,
XSDo... | public XSDUniqueOrKeyTraverser (XSDHandler handler,
XMLErrorReporter errorReporter,
XSAttributeChecker gAttrCheck) {
super(handler, errorReporter, gAttrCheck);
}
void traverse(Element uElem, XSElementDecl element,
XSDo... |
public void renderHead(IHeaderResponse response)
{
if (includeYUILibraries())
{
YuiLib.load(response);
}
// variables for the initialization script
Map<String, Object> variables = new HashMap<String, Object>();
String widgetId = getEscapedComponentMarkupId();
variables.put("componentId", getComponen... | public void renderHead(IHeaderResponse response)
{
if (includeYUILibraries())
{
YuiLib.load(response);
}
// variables for the initialization script
Map<String, Object> variables = new HashMap<String, Object>();
String widgetId = getEscapedComponentMarkupId();
variables.put("componentId", getComponen... |
public void run() {
while (!isInterrupted()) {
try {
sleep(50);
read();
} catch (InterruptedException e) {
return;
} catch (IOException e) {
return;
} catch (RuntimeException e) {
System.out.println("Exception occurred: ");
e.printStackTrace();
}
}
}
}
| public void run() {
while (!isInterrupted()) {
try {
sleep(50);
read();
} catch (InterruptedException e) {
return;
} catch (IOException e) {
return;
} catch (RuntimeException e) {
System.out.println("Exception occurred:"); //$NON-NLS-1$
e.printStackTrace();
}
}
... |
private String literal;
static Status getStatus(String literal) {
if (literal.equals("NLN")) { //$NON-NLS-1$
return ONLINE;
} else if (literal.equals("AWY")) { //$NON-NLS-1$
return AWAY;
} else if (literal.equals("IDL")) { //$NON-NLS-1$
return IDLE;
} else if (literal.equals("BSY")) { //$NON-NLS-1$
... | private String literal;
static Status getStatus(String literal) {
if (literal.equals("NLN")) { //$NON-NLS-1$
return ONLINE;
} else if (literal.equals("AWY")) { //$NON-NLS-1$
return AWAY;
} else if (literal.equals("IDL")) { //$NON-NLS-1$
return IDLE;
} else if (literal.equals("BSY")) { //$NON-NLS-1$
... |
public void addEncodedArgument(String name,String value)
{
Arguments args = getArguments();
HTTPArgument arg = new HTTPArgument(name,value,true);
if(arg.getName().equals(arg.getEncodedName()) && arg.getValue().equals(arg.getEncodedValue()))
{
arg.setAlwaysEncode(false);
}
args.addArgument(new HTTPArgum... | public void addEncodedArgument(String name,String value)
{
Arguments args = getArguments();
HTTPArgument arg = new HTTPArgument(name,value,true);
if(arg.getName().equals(arg.getEncodedName()) && arg.getValue().equals(arg.getEncodedValue()))
{
arg.setAlwaysEncoded(false);
}
args.addArgument(new HTTPArgu... |
protected void processDisconnect(DisconnectEvent e) {
final IAsynchConnection conn = (IAsynchConnection) e.getConnection();
ID fromID = null;
synchronized (getGroupMembershipLock()) {
fromID = getIDForConnection(conn);
if (fromID == null)
return;
handleLeave(fromID, conn);
}
if (fromID != null)... | protected void processDisconnect(DisconnectEvent e) {
final IAsynchConnection conn = (IAsynchConnection) e.getConnection();
ID fromID = null;
synchronized (getGroupMembershipLock()) {
fromID = getIDForConnection(conn);
if (fromID == null)
return;
handleLeave(fromID, conn);
}
if (fromID != null)... |
public void timerExec (int milliseconds, Runnable runnable) {
checkDevice ();
if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT);
if (timerList == null) timerList = new Runnable [4];
if (timerIds == null) timerIds = new int [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runn... | public void timerExec (int milliseconds, Runnable runnable) {
checkDevice ();
if (runnable == null) error (SWT.ERROR_NULL_ARGUMENT);
if (timerList == null) timerList = new Runnable [4];
if (timerIds == null) timerIds = new int [4];
int index = 0;
while (index < timerList.length) {
if (timerList [index] == runn... |
public AbstractSQLServerDictionary() {
reservedWordSet.addAll(Arrays.asList(new String[]{ "FILE", "INDEX", "RULE" }));
systemTableSet.add("DTPROPERTIES");
validationSQL = "SELECT GETDATE()";
rangePosition = RANGE_POST_DISTINCT;
supportsDeferredConstraints = false;
su... | public AbstractSQLServerDictionary() {
reservedWordSet.addAll(Arrays.asList(new String[]{ "FILE", "INDEX" }));
systemTableSet.add("DTPROPERTIES");
validationSQL = "SELECT GETDATE()";
rangePosition = RANGE_POST_DISTINCT;
supportsDeferredConstraints = false;
supportsSe... |
public void addText(String text) {
ProjectHelper ph = ProjectHelper.getProjectHelper();
if (!(ph instanceof ProjectHelperImpl)) {
// New behavior for delayed task creation. Description
// will be evaluated in Project.getDescription()
return;
}
Str... | public void addText(String text) {
ProjectHelper ph = (ProjectHelper) getProject().getReference(ProjectHelper.PROJECTHELPER_REFERENCE);
if (!(ph instanceof ProjectHelperImpl)) {
// New behavior for delayed task creation. Description
// will be evaluated in Project.getDescrip... |
private void addAssertion(JMeterTreeModel model, JMeterTreeNode node) throws IllegalUserActionException {
ResponseAssertion ra = new ResponseAssertion();
ra.setProperty(TestElement.GUI_CLASS, ASSERTION_GUI);
ra.setName("Check response");
ra.setTestField(ResponseAssertion.RESPONSE_DATA);
model.addComponent(ra... | private void addAssertion(JMeterTreeModel model, JMeterTreeNode node) throws IllegalUserActionException {
ResponseAssertion ra = new ResponseAssertion();
ra.setProperty(TestElement.GUI_CLASS, ASSERTION_GUI);
ra.setName("Check response");
ra.setTestFieldResponseData();
model.addComponent(ra, node);
}
|
public static final ID makeID(String namespacename, Object[] args)
throws IDInstantiationException {
Namespace n = getNamespaceByName(namespacename);
if (n == null) throw new IDInstantiationException("Namespace named "+namespacename+" not found");
return makeID(n, args);
}
| public static final ID makeID(String namespacename, Object[] args)
throws IDInstantiationException {
Namespace n = getNamespaceByName(namespacename);
if (n == null) throw new IDInstantiationException("Namespace "+namespacename+" not found");
return makeID(n, args);
}
|
public void sendAndClose() throws IOException {
try {
sendDot();
sendQuit();
} finally {
disconnect();
}
}
// Make a limited attempt to extract a sanitized email address
// Prefer text in <brackets>, ignore anything in (parentheses)
static String sanitizeAddres... | public void sendAndClose() throws IOException {
try {
sendDot();
sendQuit();
} finally {
disconnect();
}
}
// Make a limited attempt to extract a sanitized email address
// Prefer text in <brackets>, ignore anything in (parentheses)
static String sanitizeAddres... |
private void errorStreams() {
if (error != null && error.length > 0) {
String logHead = new StringBuffer("Error ").append(
((appendErr) ? "appended" : "redirected")).append(" to ")
.toString();
errorStream = foldFiles(error, logHead, Project.MS... | private void errorStreams() {
if (error != null && error.length > 0) {
String logHead = new StringBuffer("Error ").append(
((appendErr) ? "appended" : "redirected")).append(" to ")
.toString();
errorStream = foldFiles(error, logHead, Project.MS... |
public int indexOf(TabItem item) {
checkWidget();
if (item == null) {
error(SWT.ERROR_NULL_ARGUMENT);
}
for (int i = 0; i < items.length; i++) {
if (items[i] == item) return i;
}
return -1;
}
/**
* Answer true when the left scroll button was clicked with mouse button 1.
*/
boolean isLeftButtonHit(Event eve... | public int indexOf(TabItem item) {
checkWidget();
if (item == null) {
error(SWT.ERROR_NULL_ARGUMENT);
}
for (int i = 0; i < items.length; i++) {
if (items[i] == item) return i;
}
return -1;
}
/**
* Answer true when the left scroll button was clicked with mouse button 1.
*/
boolean isLeftButtonHit(Event eve... |
public void configure(TestElement element)
{
sqlField.setText(element.getProperty(JDBCSampler.QUERY).toString());
super.configure(element);
}
| public void configure(TestElement element)
{
sqlField.setText(element.getPropertyAsString(JDBCSampler.QUERY));
super.configure(element);
}
|
public void setUp()
{
tester = new WicketTester();
}
| public void setUp()
{
tester = new WicketTester(new WicketApplication());
}
|
public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... | public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... |
public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... | public void setPrefix(String prefix)
throws DOMException
{
if (needsSyncData()) {
synchronizeData();
}
if (ownerDocument().errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "... |
public void add (Region region) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int geometries = OS.GeometryGroup_Children(handle);
if (OS.GeometryCollection_Count(geometries) == 0) {
... | public void add (Region region) {
if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
int geometries = OS.GeometryGroup_Children(handle);
if (OS.GeometryCollection_Count(geometries) == 0) {
... |
public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(this, null);
}
/*
* the input c... | public void updateModel()
{
Object object = getModelObject();
boolean isModelCollection = object instanceof Collection;
/*
* clear the model
*/
if (isModelCollection)
{
modelChanging();
((Collection)object).clear();
}
else
{
getModel().setObject(this, null);
}
/*
* the input c... |
public static final int RETRY_FOREVER = -1;
/**
| int RETRY_FOREVER = -1;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0... |
public void setVisible (boolean visible) {
checkWidget ();
int topHandle = topHandle ();
if ((OS.UIElement_Visibility (topHandle) == OS.Visibility_Visible) == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
}
OS.UIElement_Visibility (topHandle, visible ? OS.Visibility_Visible ... | public void setVisible (boolean visible) {
checkWidget ();
int topHandle = topHandle ();
if ((OS.UIElement_Visibility (topHandle) == OS.Visibility_Visible) == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
}
OS.UIElement_Visibility (topHandle, visible ? OS.Visibility_Visible ... |
protected void extractFile( FileUtils fileUtils, File srcF, File dir,
InputStream compressedInputStream,
String entryName,
Date entryDate, boolean isDirectory )
throws IOException, TaskException
{
if... | protected void extractFile( FileUtils fileUtils, File srcF, File dir,
InputStream compressedInputStream,
String entryName,
Date entryDate, boolean isDirectory )
throws IOException, TaskException
{
if... |
private void processFile( File src )
throws TaskException
{
if( !src.exists() )
{
throw new TaskException( "Replace: source file " + src.getPath() + " doesn't exist" );
}
File temp = fileUtils.createTempFile( "rep", ".tmp",
... | private void processFile( File src )
throws TaskException
{
if( !src.exists() )
{
throw new TaskException( "Replace: source file " + src.getPath() + " doesn't exist" );
}
File temp = fileUtils.createTempFile( "rep", ".tmp",
... |
public void execute()
throws TaskException
{
if( baseDir == null && filesets.size() == 0 && "zip".equals( archiveType ) )
{
throw new TaskException( "basedir attribute must be set, or at least " +
"one fileset must be given!" );
}
... | public void execute()
throws TaskException
{
if( baseDir == null && filesets.size() == 0 && "zip".equals( archiveType ) )
{
throw new TaskException( "basedir attribute must be set, or at least " +
"one fileset must be given!" );
}
... |
return 0; /* read hyperlink's name */
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* ... | return 0; /* read hyperlink's name */
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* ... |
public String getMessage() {
if (fMessage == null) {
fMessage = fFormatter.formatMessage(fLocale, fKey, fArguments);
// The references to the message formatter and locale
// aren't needed anymore so null them.
fFormatter = null;
fLocale = null;
... | public synchronized String getMessage() {
if (fMessage == null) {
fMessage = fFormatter.formatMessage(fLocale, fKey, fArguments);
// The references to the message formatter and locale
// aren't needed anymore so null them.
fFormatter = null;
fLocal... |
* has been posted by a Microsoft developer on the public webbrowser_ctl
* newsgroup. The workaround is to implement the IOleCommandTarget interface
* to test the argument of an undocumented command.
*/
if (nCmdID == 1 && COM.IsEqualGUID(guid, COM.CGID_Explorer) && ((nCmdExecOpt & 0xFFFF) == 0xA)) {
IE brow... | * has been posted by a Microsoft developer on the public webbrowser_ctl
* newsgroup. The workaround is to implement the IOleCommandTarget interface
* to test the argument of an undocumented command.
*/
if (nCmdID == 1 && COM.IsEqualGUID(guid, COM.CGID_Explorer) && ((nCmdExecOpt & 0xFFFF) == 0xA)) {
IE brow... |
public void populateItem(final ListItem listItem)
{
final ListObject value = (ListObject) listItem.getModelObject();
listItem.add(new Label("id", new Integer(value.getId())));
listItem.add(new Label("name", value.getName()));
listI... | public void populateItem(final ListItem listItem)
{
final ListObject value = (ListObject) listItem.getModelObject();
listItem.add(new Label("id", new Integer(value.getId())));
listItem.add(new Label("name", value.getName()));
listI... |
public boolean eval() throws BuildException {
PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject());
Object o = propertyHelper.parseProperties(condition);
return propertyHelper.testUnlessCondition(o);
}
}
| public boolean eval() throws BuildException {
PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(getProject());
Object o = propertyHelper.parseProperties(condition);
return !propertyHelper.testUnlessCondition(o);
}
}
|
public String getConfigurationPrefix() {
return "slice";
}
| public String getConfigurationPrefix() {
return "openjpa.slice";
}
|
public JMDNSServiceID(Namespace namespace, IServiceTypeID type, String name) {
super(namespace, type, name);
}
} | public JMDNSServiceID(final Namespace namespace, final IServiceTypeID type, final String name) {
super(namespace, type, name);
}
} |
public SampleResult sample() {
SampleResult result = new SampleResult();
result.setSuccessful(false); // Assume it will fail
result.setResponseCode("000"); // ditto $NON-NLS-1$
result.setSampleLabel(getName());
try {
result.setURL(this.getUrl());
org.w... | public SampleResult sample() {
SampleResult result = new SampleResult();
result.setSuccessful(false); // Assume it will fail
result.setResponseCode("000"); // ditto $NON-NLS-1$
result.setSampleLabel(getName());
try {
result.setURL(this.getUrl());
org.w... |
private void message(IStructuredSelection iss) {
Object element = iss.getFirstElement();
if (!(element instanceof IRosterEntry)) {
return;
}
IRosterEntry entry = (IRosterEntry) element;
synchronized (rosterAccounts) {
for (Iterator i = rosterAccounts.iterator(); i.hasNext();) {
MultiRosterAccount a... | private void message(IStructuredSelection iss) {
Object element = iss.getFirstElement();
if (!(element instanceof IRosterEntry)) {
return;
}
IRosterEntry entry = (IRosterEntry) element;
synchronized (rosterAccounts) {
for (Iterator i = rosterAccounts.iterator(); i.hasNext();) {
MultiRosterAccount a... |
public static void convertArgumentsToHTTP(Arguments args) {
List newArguments = new LinkedList();
PropertyIterator iter = args.getArguments().iterator();
while (iter.hasNext()) {
Argument arg = (Argument) iter.next().getObjectValue();
if (!(arg instanceof HTTPArgument... | public static void convertArgumentsToHTTP(Arguments args) {
List<Argument> newArguments = new LinkedList<Argument>();
PropertyIterator iter = args.getArguments().iterator();
while (iter.hasNext()) {
Argument arg = (Argument) iter.next().getObjectValue();
if (!(arg ins... |
public void doAction(ActionEvent e)
{
ActionRouter.getInstance().actionPerformed(new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY));
if (GuiPackage.getInstance().isDirty())
{
int chosenOption =
JOptionPane.showConfirmDialog(
... | public void doAction(ActionEvent e)
{
ActionRouter.getInstance().actionPerformed(new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY));
if (GuiPackage.getInstance().isDirty())
{
int chosenOption =
JOptionPane.showConfirmDialog(
... |
public void doAction(ActionEvent e)
{
HashTree subTree = null;
if(e.getActionCommand().equals(SAVE))
{
subTree = GuiPackage.getInstance().getCurrentSubTree();
}
else if(e.getActionCommand().equals(SAVE_ALL) || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
{
subTree = GuiPackage.getInstance().getTre... | public void doAction(ActionEvent e)
{
HashTree subTree = null;
if(e.getActionCommand().equals(SAVE))
{
subTree = GuiPackage.getInstance().getCurrentSubTree();
}
else if(e.getActionCommand().equals(SAVE_ALL) || e.getActionCommand().equals(SAVE_TO_PREVIOUS))
{
subTree = GuiPackage.getInstance().getTre... |
public URL getUrl() throws MalformedURLException
{
String pathAndQuery = null;
log.debug("#4, encoded path = " + getEncodedPath());
if (this.getMethod().equals(HTTPSampler.GET) && getQueryString().length() > 0)
{
log.debug("Path = " + getPath() + "Encoded path = " + g... | public URL getUrl() throws MalformedURLException
{
String pathAndQuery = null;
log.debug("#4, encoded path = " + getEncodedPath());
if (this.getMethod().equals(HTTPSampler.GET) && getQueryString().length() > 0)
{
log.debug("Path = " + getPath() + "Encoded path = " + g... |
private String getFixablePrefix(MarkerItem item) {
if (!item.isConcrete())
return null;
IMarker marker = item.getMarker();
// If there is no image get the full image rather than the decorated
// one
if (marker != null) {
if (IDE.getMarkerHelpRegistry().hasResolutions(marker)) {
return "[Fixable] ... | private String getFixablePrefix(MarkerItem item) {
if (item.getMarker() == null)
return null;
IMarker marker = item.getMarker();
// If there is no image get the full image rather than the decorated
// one
if (marker != null) {
if (IDE.getMarkerHelpRegistry().hasResolutions(marker)) {
return "[Fix... |
public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
throws SQLException {
Column[] cols = vers.getColumns();
if (cols == null || cols.length == 0 ||
!sm.isDirty() && !sm.isVersionUpdateRequired())
return;
Object curVersion = sm.getVersi... | public void update(OpenJPAStateManager sm, JDBCStore store, RowManager rm)
throws SQLException {
Column[] cols = vers.getColumns();
if (cols == null || cols.length == 0 ||
!sm.isDirty() && !sm.isVersionUpdateRequired())
return;
Object curVersion = sm.getVersi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.