buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
float /*double*/ width = 0, height = 0;
String string = Double.toString (buttonView.maxValue ());
Font font = Font.cocoa_new(display, textView.font ());
NSAttributedString str = parent.createString(string, font, null, 0, true, false... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
float /*double*/ width = 0, height = 0;
String string = Double.toString (buttonView.maxValue ());
Font font = Font.cocoa_new(display, textView.font ());
NSAttributedString str = parent.createString(string, font, null, 0, false, true... |
public void addSelectionListener(SelectionListener listener) {
checkWidget();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Selection,typedListener);
addListener(SWT.DefaultSelection,typedListener);
}
static int checkStyle (int st... | public void addSelectionListener(SelectionListener listener) {
checkWidget();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener(listener);
addListener(SWT.Selection,typedListener);
addListener(SWT.DefaultSelection,typedListener);
}
static int checkStyle (int st... |
public SymbolHash getBuiltInTypes() {
return (SymbolHash)fFullTypes.makeClone();
}
// create all built-in types
static void createBuiltInTypes(SymbolHash types) {
// create base types first
BaseDVFactory.createBuiltInTypes(types);
// full schema simple type name... | public SymbolHash getBuiltInTypes() {
return (SymbolHash)fFullTypes.makeClone();
}
// create all built-in types
static void createBuiltInTypes(SymbolHash types) {
// create base types first
BaseDVFactory.createBuiltInTypes(types);
// full schema simple type name... |
public XSSimpleType createTypeUnion(String name, String targetNamespace,
short finalSet, XSSimpleType[] memberTypes) {
int typeNum = memberTypes.length;
XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum];
System.arraycopy(memberTypes, 0, mtypes,... | public XSSimpleType createTypeUnion(String name, String targetNamespace,
short finalSet, XSSimpleType[] memberTypes) {
int typeNum = memberTypes.length;
XSSimpleTypeDecl[] mtypes = new XSSimpleTypeDecl[typeNum];
System.arraycopy(memberTypes, 0, mtypes,... |
protected String getFullyQualifiedName() {
if (name == null)
return type.getName();
else
return type.getName() + name;
}
| protected String getFullyQualifiedName() {
if (name == null)
return type.getName();
else
return type.getName() + "@" + name;
}
|
public IMarkupFragment getMarkup(final Component child)
{
// Get the markup for the container
IMarkupFragment markup = getMarkup();
if (markup == null)
{
return null;
}
if (child == null)
{
return markup;
}
// Find the child's markup
markup = markup.find(null, child.getId(), 0);
if (mark... | public IMarkupFragment getMarkup(final Component child)
{
// Get the markup for the container
IMarkupFragment markup = getMarkup();
if (markup == null)
{
return null;
}
if (child == null)
{
return markup;
}
// Find the child's markup
markup = markup.find(child.getId(), 0);
if (markup != ... |
public IMarkupFragment getMarkup(Component child)
{
IMarkupFragment markup = getAssociatedMarkup();
if (markup == null)
{
return null;
}
if (child == null)
{
return markup;
}
return markup.find(null, child.getId(), 0);
}
}
| public IMarkupFragment getMarkup(Component child)
{
IMarkupFragment markup = getAssociatedMarkup();
if (markup == null)
{
return null;
}
if (child == null)
{
return markup;
}
return markup.find(child.getId(), 0);
}
}
|
protected CharSequence encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append('?');
url.... | protected CharSequence encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append('?');
url.... |
protected CharSequence encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append('?');
url.... | protected CharSequence encode(RequestCycle requestCycle,
IListenerInterfaceRequestTarget requestTarget)
{
final RequestListenerInterface rli = requestTarget.getRequestListenerInterface();
// Start string buffer for url
final AppendingStringBuffer url = new AppendingStringBuffer(64);
url.append('?');
url.... |
public Caret getCaret () {
checkWidget();
return caret;
}
int kEventControlDraw (int nextHandler, int theEvent, int userData) {
int [] theControl = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamDirectObject, OS.typeControlRef, null, 4, null, theControl);
boolean isFocus = theControl [0] == handle ... | public Caret getCaret () {
checkWidget();
return caret;
}
int kEventControlDraw (int nextHandler, int theEvent, int userData) {
int [] theControl = new int [1];
OS.GetEventParameter (theEvent, OS.kEventParamDirectObject, OS.typeControlRef, null, 4, null, theControl);
boolean isFocus = theControl [0] == handle ... |
public void setSpecFile(String sf) {
if ((sf == null) || (sf.trim().equals(""))) {
throw new BuildException("You must specify a spec file", getLocation());
}
this.specFile = sf;
}
| public void setSpecFile(String sf) {
if ((sf == null) || (sf.trim().length()==0)) {
throw new BuildException("You must specify a spec file", getLocation());
}
this.specFile = sf;
}
|
private void drawSample(String _title, String[] _xAxisLabels,
String _yAxisTitle, String[] _legendLabels,
double[][] _data, int _width, int _height, int _incrScaleYAxis,
Color[] _color, Font legendFont, Graphics g) {
double max = maxYAxisScale > 0 ? maxYAxisScal... | private void drawSample(String _title, String[] _xAxisLabels,
String _yAxisTitle, String[] _legendLabels,
double[][] _data, int _width, int _height, int _incrScaleYAxis,
Color[] _color, Font legendFont, Graphics g) {
double max = maxYAxisScale > 0 ? maxYAxisScal... |
Converter createConverter( ConverterInfo info )
/*
* 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.apach... | Converter createConverter( ConverterInfo info )
/*
* 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.apach... |
private final Component resolveAutomaticLink(final MarkupContainer container, final String id,
final ComponentTag tag)
{
final Page page = container.getPage();
final String href = tag.getAttributes().getString("href");
// If href contains URL query parameters ..
final PageParameters pageParameters;
Stri... | private final Component resolveAutomaticLink(final MarkupContainer container, final String id,
final ComponentTag tag)
{
final Page page = container.getPage();
final String href = tag.getAttributes().getString("href");
// If href contains URL query parameters ..
final PageParameters pageParameters;
Stri... |
private void escalateWarning(final String msg, final ComponentTag tag)
{
if (problemEscalation == ERR_LOG_WARN)
{
log.warn(msg + tag.toUserDebugString());
}
else if (problemEscalation == ERR_LOG_ERROR)
{
log.error(msg + tag.toUserDebugString());
}
else if (problemE... | private void escalateWarning(final String msg, final ComponentTag tag)
{
if (problemEscalation == ERR_LOG_WARN)
{
log.warn(msg + tag.toUserDebugString());
}
else if (problemEscalation == ERR_LOG_ERROR)
{
log.error(msg + tag.toUserDebugString());
}
else if (problemE... |
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)((int)input[i] ^ 0xff);
}
return result;
}
| 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;
}
|
public final IObjectProfileNode root()
{
IObjectProfileNode node = this;
for (IObjectProfileNode parent = parent(); parent != null; node = parent, parent = parent
.parent())
{
;
}
return node;
}
| public final IObjectProfileNode root()
{
IObjectProfileNode node = this;
for (IObjectProfileNode parent = parent(); parent != null; node = parent, parent = parent
.parent())
{
// no action required
}
return node;
}
|
public void initFilterChain()
{
appendMarkupFilter(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION));
}
};
try
{
parser.parse("<img src=\"\"/>");
assertTrue("Should have thrown an exception", false);
}
ca... | public void initFilterChain()
{
appendMarkupFilter(new HtmlProblemFinder(HtmlProblemFinder.ERR_THROW_EXCEPTION));
}
};
try
{
parser.parse("<img src=\"\"/>");
assertTrue("Should have thrown an exception", false);
}
ca... |
public void testResponsePageClass() throws Exception
{
MockWebApplication mockWebApp = new MockWebApplication(null);
mockWebApp.getPages().setHomePage(SimpleResponsePageClass.class);
mockWebApp.setupRequestAndResponse();
mockWebApp.processRequestCycle();
SimpleResponsePageClass m... | public void testResponsePageClass() throws Exception
{
MockWebApplication mockWebApp = new MockWebApplication(null);
mockWebApp.getPages().setHomePage(SimpleResponsePageClass.class);
mockWebApp.setupRequestAndResponse();
mockWebApp.processRequestCycle();
SimpleResponsePageClass m... |
protected void populateItem(final ListItem listItem)
{
; // do nothing
}
};
}
| protected void populateItem(final ListItem listItem)
{
// do nothing
}
};
}
|
public IModel getNestedModel()
{
// TODO remove: return station;
return null;
}
};
StringResourceModel model = new StringResourceModel("simple.text", page, wsDetachModel);
application.setupRequestAndResponse();
RequestCycle cycle = new WebRequestCycle(application.getWicketSession(),
applica... | public IModel getNestedModel()
{
// TODO remove: return station;
return null;
}
};
StringResourceModel model = new StringResourceModel("simple.text", page, wsDetachModel);
application.setupRequestAndResponse();
RequestCycle cycle = new WebRequestCycle(application.getWicketSession(),
applica... |
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... |
public void setFont (Font value) {
checkWidget ();
Font oldFont = getFont ();
super.setFont (value);
Font font = getFont ();
if (font.equals (oldFont)) return;
GC gc = new GC (this);
/* recompute the receiver's cached font height and item height values */
fontHeight = gc.getFontMetrics ().getHeight ();
it... | public void setFont (Font value) {
checkWidget ();
Font oldFont = getFont ();
super.setFont (value);
Font font = getFont ();
if (font.equals (oldFont)) return;
GC gc = new GC (this);
/* recompute the receiver's cached font height and item height values */
fontHeight = gc.getFontMetrics ().getHeight ();
it... |
public void setFont (Font value) {
checkWidget ();
Font oldFont = getFont ();
super.setFont (value);
Font font = getFont ();
if (font.equals (oldFont)) return;
GC gc = new GC (this);
/* recompute the receiver's cached font height and item height values */
fontHeight = gc.getFontMetrics ().getHeight ();
it... | public void setFont (Font value) {
checkWidget ();
Font oldFont = getFont ();
super.setFont (value);
Font font = getFont ();
if (font.equals (oldFont)) return;
GC gc = new GC (this);
/* recompute the receiver's cached font height and item height values */
fontHeight = gc.getFontMetrics ().getHeight ();
it... |
public ECFException(String message, Throwable cause) {
this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
((message == null) ? "" : message), cause));
}
| public ECFException(String message, Throwable cause) {
this(new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0,
((message == null) ? "" : message), cause)); //$NON-NLS-1$
}
|
public IRemoteService getRemoteService(final IRemoteServiceReference reference) {
Assert.isNotNull(reference);
final RemoteServiceReferenceImpl impl = (RemoteServiceReferenceImpl) reference;
return new RemoteServiceImpl(impl.getR_OSGiServiceReference(), remoteService.getRemoteService(impl.getR_OSGiServiceReferen... | public IRemoteService getRemoteService(final IRemoteServiceReference reference) {
Assert.isNotNull(reference);
final RemoteServiceReferenceImpl impl = (RemoteServiceReferenceImpl) reference;
return new RemoteServiceImpl(impl, remoteService.getRemoteService(impl.getR_OSGiServiceReference()));
}
|
protected RegexpHTMLParser() {
super();
// Define this here to ensure it's ready to report any trouble
// with the regexp:
log = LoggingManager.getLoggerForClass();
// Compile the regular expression:
try {
Perl5Compiler c = new Perl5Compiler();
pattern = c.compile(REGEXP, Perl5Compiler.CASE_INSENSI... | protected RegexpHTMLParser() {
super();
// Define this here to ensure it's ready to report any trouble
// with the regexp:
log = LoggingManager.getLoggerForClass();
// Compile the regular expression:
try {
Perl5Compiler c = new Perl5Compiler();
pattern = c.compile(REGEXP, Perl5Compiler.CASE_INSENSI... |
private void commonInit()
{
// Add a Body container if the associated markup contains a <body> tag
// get markup stream gracefully
MarkupStream markupStream = getAssociatedMarkupStream(false);
if (markupStream != null)
{
// The default <body> container. It can be accessed, replaced
// and attribute mo... | private void commonInit()
{
// Add a Body container if the associated markup contains a <body> tag
// get markup stream gracefully
MarkupStream markupStream = getAssociatedMarkupStream(false);
if (markupStream != null)
{
// The default <body> container. It can be accessed, replaced
// and attribute mo... |
public void setVisible (boolean visible) {
checkWidget();
int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
if ((style & mask) != 0) {
if (visible) {
display.setModalShell (this);
} else {
display.clearModal (this);
}
} else {
updateModal ();
}
if (window == null) {
super.se... | public void setVisible (boolean visible) {
checkWidget();
int mask = SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL;
if ((style & mask) != 0) {
if (visible) {
display.setModalShell (this);
} else {
display.clearModal (this);
}
} else {
updateModal ();
}
if (window == null) {
super.se... |
public Attr createAttributeNS(String namespaceURI, String qualifiedName,
String localpart)
throws DOMException
{
return new AttrNSImpl(this, namespaceURI, qualifiedName, localName);
}
| public Attr createAttributeNS(String namespaceURI, String qualifiedName,
String localpart)
throws DOMException
{
return new AttrNSImpl(this, namespaceURI, qualifiedName, localpart);
}
|
public Component resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
if (tag instanceof WicketTag)
{
WicketTag wtag = (WicketTag)tag;
if (wtag.isLinkTag() && (wtag.getNamespace() != null))
{
final String id = tag.getId() + container.getPage().getAutoI... | public Component resolve(final MarkupContainer container, final MarkupStream markupStream,
final ComponentTag tag)
{
if (tag instanceof WicketTag)
{
WicketTag wtag = (WicketTag)tag;
if (wtag.isLinkTag() && (wtag.getNamespace() != null))
{
String id = tag.getId() + "-" + container.getPage().getAutoI... |
public void process(){
StringBuffer sb = new StringBuffer(100);
JMeterContext threadContext = getThreadContext();
PropertyIterator i = threadContext.getCurrentSampler().propertyIterator();
while(i.hasNext())
{
JMeterProperty prop = i.next();
sb.append(... | public void process(){
StringBuffer sb = new StringBuffer(100);
JMeterContext threadContext = getThreadContext();
PropertyIterator i = threadContext.getCurrentSampler().propertyIterator();
while(i.hasNext())
{
JMeterProperty prop = i.next();
sb.append(... |
protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res) {
res.setSampleLabel("Error");
res.setDataType(HTTPSampleResult.TEXT);
ByteArrayOutputStream text = new ByteArrayOutputStream(200);
e.printStackTrace(new PrintStream(text));
res.setResponseData(text.toB... | protected HTTPSampleResult errorResult(Throwable e, HTTPSampleResult res) {
res.setSampleLabel("Error");
res.setDataType(SampleResult.TEXT);
ByteArrayOutputStream text = new ByteArrayOutputStream(200);
e.printStackTrace(new PrintStream(text));
res.setResponseData(text.toByteA... |
public IRemoteServiceRegistration registerRemoteService(final String[] clazzes, final Object service, final Dictionary properties) {
if (containerID == null) {
throw new IllegalStateException("Container is not connected"); //$NON-NLS-1$
}
final Dictionary props = properties == null ? new Hashtable() : clone(... | public IRemoteServiceRegistration registerRemoteService(final String[] clazzes, final Object service, final Dictionary properties) {
if (containerID == null) {
throw new IllegalStateException("Container is not connected"); //$NON-NLS-1$
}
final Dictionary props = properties == null ? new Hashtable() : clone(... |
public synchronized void readFiltersFromFile(File filtersFile) throws BuildException {
if (isReference()) {
throw tooManyAttributes();
}
if (!filtersFile.exists()) {
handleMissingFile("Could not read filters from file "
+ filtersFil... | public synchronized void readFiltersFromFile(File filtersFile) throws BuildException {
if (isReference()) {
throw tooManyAttributes();
}
if (!filtersFile.exists()) {
handleMissingFile("Could not read filters from file "
+ filtersFil... |
public MarkupContainer removeAll()
{
if (children != null)
{
addStateChange();
// Loop through child components
int size = children_size();
for (int i = 0; i < size; i++)
{
Object childObject = children_get(i, false);
if (childObject instanceof Component)
{
// Get next child
... | public MarkupContainer removeAll()
{
if (children != null)
{
addStateChange();
// Loop through child components
int size = children_size();
for (int i = 0; i < size; i++)
{
Object childObject = children_get(i, false);
if (childObject instanceof Component)
{
// Get next child
... |
protected void checkContent(String content, Object state, Vector enumeration, boolean asBase)
throws InvalidDatatypeValueException {
// validate against parent type if any
if ( this.fBaseValidator != null ) {
// validate content as a base type
((DoubleDatatypeValidator)fB... | protected void checkContent(String content, Object state, Vector enumeration, boolean asBase)
throws InvalidDatatypeValueException {
// validate against parent type if any
if ( this.fBaseValidator != null && !(fBaseValidator instanceof AnySimpleType)) {
// validate content as a base ... |
protected void checkContent(String content, Object state, Vector enumeration, boolean asBase)
throws InvalidDatatypeValueException {
// validate against parent type if any
if ( this.fBaseValidator != null ) {
// validate content as a base type
((FloatDatatypeValidator)fBa... | protected void checkContent(String content, Object state, Vector enumeration, boolean asBase)
throws InvalidDatatypeValueException {
// validate against parent type if any
if ( this.fBaseValidator != null && !(fBaseValidator instanceof AnySimpleType)) {
// validate content as a base ... |
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
return this; //??? no pointers out of here so we're okay
}
| public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
return new WithinPointcut(typePattern);
}
|
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
return this; //??? no pointers out of here so we're okay
}
| public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) {
return new WithincodePointcut(signature);
}
|
public void setText (int columnIndex, String value) {
checkWidget ();
if (value == null) error (SWT.ERROR_NULL_ARGUMENT);
int validColumnCount = Math.max (1, parent.columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return;
if (value.equals (getText (columnIndex, false))) return;
if (colu... | public void setText (int columnIndex, String value) {
checkWidget ();
if (value == null) error (SWT.ERROR_NULL_ARGUMENT);
int validColumnCount = Math.max (1, parent.columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return;
if (value.equals (getText (columnIndex, false))) return;
if (colu... |
private XmlTag parseTagText(final String tagText) throws ParseException
{
// Get the length of the tagtext
final int tagTextLength = tagText.length();
// If we match tagname pattern
final TagNameParser tagnameParser = new TagNameParser(tagText);
if (tagnameParser.matcher().lookingAt())
{
final XmlTag... | private XmlTag parseTagText(final String tagText) throws ParseException
{
// Get the length of the tagtext
final int tagTextLength = tagText.length();
// If we match tagname pattern
final TagNameParser tagnameParser = new TagNameParser(tagText);
if (tagnameParser.matcher().lookingAt())
{
final XmlTag... |
public boolean isSelected (int index) {
checkWidget ();
if (!(0 <= index && index < itemsCount)) return false;
return items [index].isSelected ();
}
void onArrowDown (int stateMask) {
if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) {
/* Down Arrow with no modifiers */
int newFocusIndex = focusItem.index + 1;
i... | public boolean isSelected (int index) {
checkWidget ();
if (!(0 <= index && index < itemsCount)) return false;
return items [index].isSelected ();
}
void onArrowDown (int stateMask) {
if ((stateMask & (SWT.SHIFT | SWT.CTRL)) == 0) {
/* Down Arrow with no modifiers */
int newFocusIndex = focusItem.index + 1;
i... |
package wicket.authorization.strategies.action;
/*
* $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 c... | package wicket.authorization.strategies.action;
/*
* $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 c... |
protected void handleChildren(
Object parent,
RuntimeConfigurable parentWrapper)
throws BuildException {
if (parent instanceof TypeAdapter) {
parent = ((TypeAdapter) parent).getProxy();
}
String parentUri = getNamespace();
Class parentClass = pare... | protected void handleChildren(
Object parent,
RuntimeConfigurable parentWrapper)
throws BuildException {
if (parent instanceof TypeAdapter) {
parent = ((TypeAdapter) parent).getProxy();
}
String parentUri = getNamespace();
Class parentClass = pare... |
private void printElementDecl(PrintWriter out, String name, Class element)
throws BuildException {
if (visited.containsKey(name)) {
return;
}
visited.put(name, "");
IntrospectionHelper ih = null;
try {
ih = IntrospectionHelper.getHelper(eleme... | private void printElementDecl(PrintWriter out, String name, Class element)
throws BuildException {
if (visited.containsKey(name)) {
return;
}
visited.put(name, "");
IntrospectionHelper ih = null;
try {
ih = IntrospectionHelper.getHelper(getPr... |
public void setBackgroundImage (Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (image == backgroundImage) return;
this.backgroundImage = image;
if (backgroundImage != null) {
setBackgroundPixmap (backgroundImage.pixmap);
redrawWidget (0, 0, 0,... | public void setBackgroundImage (Image image) {
checkWidget ();
if (image != null && image.isDisposed ()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (image == backgroundImage) return;
this.backgroundImage = image;
if (backgroundImage != null) {
setBackgroundPixmap (backgroundImage.pixmap);
redrawWidget (0, 0, 0,... |
public boolean execute() throws BuildException {
Commandline cmd = setupModernJavacCommand();
try {
String[] args = cmd.getArguments();
int result = runCompiler(args);
return (0 == result);
} catch (BuildException e) {
throw e;
} catch... | public boolean execute() throws BuildException {
Commandline cmd = setupModernJavacCommand();
try {
String[] args = cmd.getArguments();
int result = runCompiler(args);
return (0 == result);
} catch (BuildException e) {
throw e;
} catch... |
public void startElement(
QName element,
XMLAttributes attributes,
Augmentations augs)
throws XNIException {
fDepth++;
setState(getState(fDepth - 1));
// we process the xml:base and xml:lang attributes regardless
// of what type of element it is.
... | public void startElement(
QName element,
XMLAttributes attributes,
Augmentations augs)
throws XNIException {
fDepth++;
setState(getState(fDepth - 1));
// we process the xml:base and xml:lang attributes regardless
// of what type of element it is.
... |
public Object proceed (List<?> localParams) {
return proceedInternal (ctx, indNextAdvice+1, localParams);
}
};
final AroundAdvice advice = _advice.get (indNextAdvice);
final Object result = advice.evaluate (ctx, _scopeCounter, thisJoinPoint, _thisJoinPoin... | public Object proceedWithParams (List<?> localParams) {
return proceedInternal (ctx, indNextAdvice+1, localParams);
}
};
final AroundAdvice advice = _advice.get (indNextAdvice);
final Object result = advice.evaluate (ctx, _scopeCounter, thisJoinPoint, _th... |
public void testSomeFunctionAdviceCtx() {
Map<String, Object> vars = new HashMap<String, Object> ();
vars.put("param", "TestParam");
vars.put("p", _person);
Object result = XtendBackendFacade.evaluateExpression ("testSomeFunctionAdviceCtx(param, p)", "org::eclipse::xtend::middleend::xtend::test::expressions", ... | public void testSomeFunctionAdviceCtx() {
Map<String, Object> vars = new HashMap<String, Object> ();
vars.put("param", "TestParam");
vars.put("p", _person);
Object result = XtendBackendFacade.evaluateExpression ("testSomeFunctionAdviceCtx(param, p)", "org::eclipse::xtend::middleend::xtend::test::expressions", ... |
public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope scope) {
if (constructorDeclaration.isDefaultConstructor) {
stack.push(null); // a little wierd but does the job
return true;
}
StringBuffer argumentsSignature = new StringBuffer();
argumentsSignature.append("(");
if (const... | public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope scope) {
if (constructorDeclaration.isDefaultConstructor) {
stack.push(null); // a little wierd but does the job
return true;
}
StringBuffer argumentsSignature = new StringBuffer();
argumentsSignature.append("(");
if (const... |
protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) {
String urlStr = url.toString();
log.debug("Start : sample" + urlStr);
log.debug("method" + method);
HttpMethodBase httpMethod = null;
if (method.equals(POST)) {
httpMethod = n... | protected HTTPSampleResult sample(URL url, String method, boolean areFollowingRedirect, int frameDepth) {
String urlStr = url.toString();
log.debug("Start : sample" + urlStr);
log.debug("method" + method);
HttpMethodBase httpMethod = null;
if (method.equals(POST)) {
httpMethod = n... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
Point size = computeNativeSize (handle, wHint, hHint, changed);
Rectangle trim = computeTrim (0, 0, size.x, size.y);
size.x = trim.... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0;
if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0;
Point size = computeNativeSize (handle, wHint, hHint, changed);
Rectangle trim = computeTrim (0, 0, size.x, size.y);
size.x = trim.... |
public boolean setUrl(String url, String postData, String[] headers) {
html = null;
if (url.indexOf('/') == 0) {
url = PROTOCOL_FILE + url;
} else if (url.indexOf(':') == -1) {
url = PROTOCOL_HTTP + url;
}
NSString str = NSString.stringWith(url);
NSString unescapedStr = NSString.stringWith("%#"); //$NON-NLS... | public boolean setUrl(String url, String postData, String[] headers) {
html = null;
if (url.indexOf('/') == 0) {
url = PROTOCOL_FILE + url;
} else if (url.indexOf(':') == -1) {
url = PROTOCOL_HTTP + url;
}
NSString str = NSString.stringWith(url);
NSString unescapedStr = NSString.stringWith("%#"); //$NON-NLS... |
protected SQLBuffer toBulkOperation(ClassMapping mapping, Select sel,
JDBCStore store, Object[] params, Map updateParams) {
SQLBuffer sql = new SQLBuffer(this);
if (updateParams == null) {
if (requiresTargetForDelete) {
sql.append("DELETE ");
SQLBuffer delet... | protected SQLBuffer toBulkOperation(ClassMapping mapping, Select sel,
JDBCStore store, Object[] params, Map updateParams) {
SQLBuffer sql = new SQLBuffer(this);
if (updateParams == null) {
if (requiresTargetForDelete) {
sql.append("DELETE ");
SQLBuffer delet... |
private String messageResponseHeaders(SampleResult res, boolean forcedHTTPS) {
String headers = res.getResponseHeaders();
String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content
int contentLengthIndex=-1;
boolean fixContentLength = forcedHTTPS;
for (i... | private String messageResponseHeaders(SampleResult res, boolean forcedHTTPS) {
String headers = res.getResponseHeaders();
String [] headerLines=headers.split(NEW_LINE, 0); // drop empty trailing content
int contentLengthIndex=-1;
boolean fixContentLength = forcedHTTPS;
for (i... |
public void setHeaderManager(HeaderManager value) {
HeaderManager mgr = getHeaderManager();
if (mgr != null) {
log.warn("Existing HeaderManager '" + mgr.getName() + "' merged with '" + value.getName() + "'");
value = mgr.merge(value, true);
if (log.isDebugEnabled(... | public void setHeaderManager(HeaderManager value) {
HeaderManager mgr = getHeaderManager();
if (mgr != null) {
log.debug("Existing HeaderManager '" + mgr.getName() + "' merged with '" + value.getName() + "'");
value = mgr.merge(value, true);
if (log.isDebugEnabled... |
protected final String getJsTimeoutCall(final Duration updateInterval)
{
return "setTimeout(function() { " + getCallbackScript(false) + " }, "
+ updateInterval.getMilliseconds() + ");";
}
| protected final String getJsTimeoutCall(final Duration updateInterval)
{
return "setTimeout(function() { " + getCallbackScript(false, true) + " }, "
+ updateInterval.getMilliseconds() + ");";
}
|
protected void executedBehavior(final Class pageClass, final AbstractAjaxBehavior behavior,
final String filename) throws Exception
{
assertNotNull(behavior);
System.out.println("=== " + pageClass.getName() + " : " + behavior.toString() + " ===");
application.setupRequestAndResponse();
WebRequestCycl... | protected void executedBehavior(final Class pageClass, final AbstractAjaxBehavior behavior,
final String filename) throws Exception
{
assertNotNull(behavior);
System.out.println("=== " + pageClass.getName() + " : " + behavior.toString() + " ===");
application.setupRequestAndResponse();
WebRequestCycl... |
public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
setText (string, true);
}
void setText (String string, boolean notify) {
if (notify) {
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
string = verifyText (string, 0, getCharCount (), null);
if (str... | public void setText (String string) {
checkWidget ();
if (string == null) error (SWT.ERROR_NULL_ARGUMENT);
setText (string, true);
}
void setText (String string, boolean notify) {
if (notify) {
if (hooks (SWT.Verify) || filters (SWT.Verify)) {
string = verifyText (string, 0, getCharCount (), null);
if (str... |
private static String getResStringDefault(String key, String defaultValue)
{
if (key == null)
{
return null;
}
key = key.replace(' ', '_');
key = key.toLowerCase();
String resString = null;
try
{
resString = resources.getString(ke... | private static String getResStringDefault(String key, String defaultValue)
{
if (key == null)
{
return null;
}
key = key.replace(' ', '_');
key = key.toLowerCase();
String resString = null;
try
{
resString = resources.getString(ke... |
private Collection<StereotypeProperty> getProperties (BackendType owningType, Stereotype stereoType, UmlTypesystem umlTs) {
final Collection<StereotypeProperty> result = new HashSet<StereotypeProperty> ();
for (Property attrib: stereoType.getAttributes()) {
if (attrib.getName() ... | private Collection<StereotypeProperty> getProperties (BackendType owningType, Stereotype stereoType, UmlTypesystem umlTs) {
final Collection<StereotypeProperty> result = new HashSet<StereotypeProperty> ();
for (Property attrib: stereoType.getAttributes()) {
if (attrib.getName() ... |
public int getJDBCType(int metaTypeCode, boolean lob) {
if (lob) {
switch (metaTypeCode) {
case JavaTypes.STRING:
case JavaSQLTypes.ASCII_STREAM:
case JavaSQLTypes.CHAR_STREAM:
return getPreferredType(Types.CLOB);
... | public int getJDBCType(int metaTypeCode, boolean lob) {
if (lob) {
switch (metaTypeCode) {
case JavaTypes.STRING:
case JavaSQLTypes.ASCII_STREAM:
case JavaSQLTypes.CHAR_STREAM:
return getPreferredType(Types.CLOB);
... |
private void initRegex(String argName) {
String quotedArg = Perl5Compiler.quotemeta(argName);// Don't get tripped up by RE chars in the arg name
pathExtensionEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern(
SEMI_COLON + quotedArg + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?", // $NON-NLS-1$
Perl5C... | private void initRegex(String argName) {
String quotedArg = Perl5Compiler.quotemeta(argName);// Don't get tripped up by RE chars in the arg name
pathExtensionEqualsQuestionmarkRegexp = JMeterUtils.getPatternCache().getPattern(
SEMI_COLON + quotedArg + "=([^\"'>&\\s;]*)[&\\s\"'>;]?$?", // $NON-NLS-1$
Perl5C... |
public void setContentLength(long length)
{
httpServletResponse.setContentLength((int)length);
}
| public void setContentLength(long length)
{
httpServletResponse.addHeader("Content-Length", Long.toString(length));
}
|
private void handleDiscoveredServiceAvailable(
ECFServiceEndpointDescription ecfSED, IProgressMonitor monitor) {
// Find IRemoteServiceContainers for the given
// ECFServiceEndpointDescription via registered services
IRemoteServiceContainer[] rsContainers = findRemoteServiceContainersViaService(
ecfSED.ge... | private void handleDiscoveredServiceAvailable(
ECFServiceEndpointDescription ecfSED, IProgressMonitor monitor) {
// Find IRemoteServiceContainers for the given
// ECFServiceEndpointDescription via registered services
IRemoteServiceContainer[] rsContainers = findRemoteServiceContainersViaService(
ecfSED.ge... |
public static void addText(Project project, Object target, String text)
throws BuildException {
if (text == null || text.trim().length() == 0) {
return;
}
if(target instanceof TaskAdapter)
target = ((TaskAdapter) target).getProxy();
IntrospectionHel... | public static void addText(Project project, Object target, String text)
throws BuildException {
if (text == null ) {
return;
}
if(target instanceof TaskAdapter)
target = ((TaskAdapter) target).getProxy();
IntrospectionHelper.getHelper(target.getClas... |
public void execute() {
if (realThing == null) {
// plain impossible to get here, maybeConfigure should
// have thrown an exception.
throw new BuildException("Could not create task of type: "
+ elementName, location);
}
... | public void execute() {
if (realThing == null) {
// plain impossible to get here, maybeConfigure should
// have thrown an exception.
throw new BuildException("Could not create task of type: "
+ elementName, location);
}
... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0;
if (wHint == SWT.DEFAULT) {
if (columnCount != 0) {
for (int i=0; i<columnCount; i++) {
width += columns [i].getWidth () + CELL_GAP;
}
} else {
GC gc = new GC (this);
width += calculateWidth (items, ... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0;
if (wHint == SWT.DEFAULT) {
if (columnCount != 0) {
for (int i=0; i<columnCount; i++) {
width += columns [i].getWidth ();
}
} else {
GC gc = new GC (this);
width += calculateWidth (items, 0, gc) + CE... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
if (columnCount != 0) {
for (int i=0; i<columnCount; i++) {
width += columns [i].getWidth () + CELL_GAP;
}
} else {
GC gc = new GC (this);
width = calculateWid... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0;
if (wHint == SWT.DEFAULT) {
if (columnCount != 0) {
for (int i=0; i<columnCount; i++) {
width += columns [i].getWidth ();
}
} else {
GC gc = new GC (this);
width = calculateWidth (items, ... |
Object convert( Class destination, Object original, ConverterContext context )
/*
* 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 LICE... | Object convert( Class destination, Object original, ConverterContext context )
/*
* 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 LICE... |
private static PatternFormatter format =
new PatternFormatter(
"%{time:MM/dd/yyyy h:mm:ss a} %5.5{priority} - "
+ "%{category}: %{message} %{throwable}\n");
| private static PatternFormatter format =
new PatternFormatter(
"%{time:yyyy/MM/dd h:mm:ss a} %5.5{priority} - "
+ "%{category}: %{message} %{throwable}\n");
|
public Object component(final Component comp)
{
if (component instanceof Page && StatelessChecker.mustCheck(comp))
{
// Do not go deeper, because this component will be checked by checker
// itself.
// Actually we could go deeper but that would mean we traverse it twice
// (for... | public Object component(final Component comp)
{
if (component instanceof Page && StatelessChecker.mustCheck(comp))
{
// Do not go deeper, because this component will be checked by checker
// itself.
// Actually we could go deeper but that would mean we traverse it twice
// (for... |
public Object convert(Object value, Class c)
{
// Null is always converted to null
if (value == null)
{
return null;
}
// Class cannot be null
if (c == null)
{
throw new IllegalArgumentException("Class cannot be null");
}
// Catch all cases where value is already the right type
if (c.isAss... | public Object convert(Object value, Class c)
{
// Null is always converted to null
if (value == null)
{
return null;
}
// Class cannot be null
if (c == null)
{
throw new IllegalArgumentException("Class cannot be null");
}
// Catch all cases where value is already the right type
if (c.isAss... |
package org.apache.tools.ant.taskdefs;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are m... | package org.apache.tools.ant.taskdefs;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are m... |
package org.apache.tools.ant.taskdefs;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are m... | package org.apache.tools.ant.taskdefs;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are m... |
public String toString()
{
StringBuffer b = new StringBuffer("-- TREE MODEL --\n");
TreeState state = getTreeState();
TreeModel treeModel = null;
if (state != null)
{
treeModel = state.getModel();
}
if (treeModel != null)
{
StringBuffer tabs = new StringBuffer();
DefaultMutableTreeNode rootNo... | public String toString()
{
StringBuilder b = new StringBuilder("-- TREE MODEL --\n");
TreeState state = getTreeState();
TreeModel treeModel = null;
if (state != null)
{
treeModel = state.getModel();
}
if (treeModel != null)
{
StringBuffer tabs = new StringBuffer();
DefaultMutableTreeNode root... |
public String toString()
{
StringBuffer b = new StringBuffer("[RequestParameters ");
if (getComponentPath() != null)
{
b.append(" componentPath=").append(getComponentPath());
b.append(" pageMapName=").append(getPageMapName());
b.append(" versionNumber=").append(getVersionNumber());
b.append(" interf... | public String toString()
{
StringBuilder b = new StringBuilder("[RequestParameters ");
if (getComponentPath() != null)
{
b.append(" componentPath=").append(getComponentPath());
b.append(" pageMapName=").append(getPageMapName());
b.append(" versionNumber=").append(getVersionNumber());
b.append(" inte... |
public String toString()
{
StringBuffer b = new StringBuffer(getClass().getName()).append("@").append(hashCode())
.append(page).append("->").append(component.getId()).append("->IResourceListener");
return b.toString();
}
| public String toString()
{
StringBuilder b = new StringBuilder(getClass().getName()).append("@").append(hashCode())
.append(page).append("->").append(component.getId()).append("->IResourceListener");
return b.toString();
}
|
public String getStaticLabel()
{
return JMeterUtils.getResString("Login Config Element");
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("login_config_element");
}
|
public String getStaticLabel()
{
return JMeterUtils.getResString("Simple Config Element");
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("simple_config_element");
}
|
public String getStaticLabel()
{
return JMeterUtils.getResString("Test Plan");
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("test_plan");
}
|
public String getStaticLabel() {
return JMeterUtils.getResString("HTTP User Parameter Modifier");
}
| public String getStaticLabel() {
return JMeterUtils.getResString("http_user_parameter_modifier");
}
|
public String getStaticLabel()
{
return JMeterUtils.getResString("Java Request Defaults");
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("java_request_defaults");
}
|
public String getStaticLabel()
{
return JMeterUtils.getResString("Java Request");
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("java_request");
}
|
public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.SEARCH) != 0) {
style |= SWT.SINGLE | SWT.BORDER;
style &= ~SWT.PASSWORD;
}
style &= ~SWT.SEARCH;
if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) {
style &= ~SWT.... | public Text (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.SEARCH) != 0) {
style |= SWT.SINGLE | SWT.BORDER;
style &= ~SWT.PASSWORD;
}
style &= ~SWT.SEARCH;
if ((style & SWT.SINGLE) != 0 && (style & SWT.MULTI) != 0) {
style &= ~SWT.... |
private void normalizeWhitespace( String value, boolean collapse) {
boolean skipSpace = collapse;
char c;
int size = value.length();
// ensure the ch array is big enough
if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) {
fNormalizedStr.ch = new c... | private void normalizeWhitespace( String value, boolean collapse) {
boolean skipSpace = collapse;
char c;
int size = value.length();
// ensure the ch array is big enough
if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) {
fNormalizedStr.ch = new c... |
protected Value traversePath(Path path, String field, boolean pcOnly,
boolean allowNull) {
ClassMetaData meta = path.getMetaData();
if (meta == null)
throw parseException(EX_USER, "path-no-meta",
new Object[]{ field, path.getType() }, null);
FieldMetaData... | protected Value traversePath(Path path, String field, boolean pcOnly,
boolean allowNull) {
ClassMetaData meta = path.getMetaData();
if (meta == null)
throw parseException(EX_USER, "path-no-meta",
new Object[]{ field, path.getType() }, null);
FieldMetaData... |
public String getText (int columnIndex) {
checkWidget ();
int validColumnCount = Math.max (1, parent.columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return ""; //$NON-NLS-1$
if (columnIndex == 0) return getText ();
if (texts [columnIndex] == null) return ""; //$NON-NLS-1$
return texts ... | public String getText (int columnIndex) {
checkWidget ();
int validColumnCount = Math.max (1, parent.columns.length);
if (!(0 <= columnIndex && columnIndex < validColumnCount)) return ""; //$NON-NLS-1$
if (columnIndex == 0) return getText ();
if (texts [columnIndex] == null) return ""; //$NON-NLS-1$
return texts ... |
public void setVisible (boolean visible) {
checkWidget();
setWindowVisible (visible, false);
}
void setWindowVisible (boolean visible, boolean key) {
if (visible) {
if ((state & HIDDEN) == 0) return;
state &= ~HIDDEN;
} else {
if ((state & HIDDEN) != 0) return;
state |= HIDDEN;
}
if (window.isVisible() =... | public void setVisible (boolean visible) {
checkWidget();
setWindowVisible (visible, false);
}
void setWindowVisible (boolean visible, boolean key) {
if (visible) {
if ((state & HIDDEN) == 0) return;
state &= ~HIDDEN;
} else {
if ((state & HIDDEN) != 0) return;
state |= HIDDEN;
}
if (window.isVisible() =... |
public String toString() {
return "FileData[" + read + ";" + isDone() + "]";
}
| public String toString() {
return "FileData[" + read + ";" + isDone() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
|
protected ImageRegistry createImageRegistry() {
final ImageRegistry registry = super.createImageRegistry();
registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage());
return registry;
}
| protected ImageRegistry createImageRegistry() {
final ImageRegistry registry = super.createImageRegistry();
registry.put(ClientPluginConstants.DECORATION_DEFAULT_PROVIDER, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, "icons/default_provider_image.gif").createImage()); //$NON-NLS-1$
return registry;
}
|
public void run() {
final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
if (entry == null) {
MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), Messages.EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE, Messages.EditorCompoundContribut... | public void run() {
final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
if (entry == null) {
MessageDialog.openInformation(PlatformUI.getWorkbench().getDisplay().getActiveShell(), Messages.EditorCompoundContributionItem_EXCEPTION_NOT_CONNECTED_TITLE, Messages.EditorCompoundContribut... |
private void startDiscovery() throws Exception {
container = ContainerFactory.getDefault().createContainer("ecf.discovery.jmdns");
container.connect(null, null);
discoveryContainer = (IDiscoveryContainerAdapter) container.getAdapter(IDiscoveryContainerAdapter.class);
discoveryContainer.addServiceTypeListener(n... | private void startDiscovery() throws Exception {
container = ContainerFactory.getDefault().createContainer("ecf.discovery.jmdns"); //$NON-NLS-1$
container.connect(null, null);
discoveryContainer = (IDiscoveryContainerAdapter) container.getAdapter(IDiscoveryContainerAdapter.class);
discoveryContainer.addService... |
public LabelFieldEditor(String value, Composite parent) {
super("label", value, parent);
}
| public LabelFieldEditor(String value, Composite parent) {
super("label", value, parent); //$NON-NLS-1$
}
|
public SpacerFieldEditor(Composite parent) {
super("", parent);
}
| public SpacerFieldEditor(Composite parent) {
super("", parent); //$NON-NLS-1$
}
|
protected boolean isValidPath(String path)
{
if (path == null)
{
return false;
}
Matcher pathMatcher = Pattern.compile(PATH_PATTERN).matcher(path);
if (!pathMatcher.matches())
{
return false;
}
int slash2Count = countToken("//", path);
if (isOff(ALLOW_2_SLASHES) && (slash2Count > 0))
{
... | protected boolean isValidPath(String path)
{
if (path == null)
{
return false;
}
Matcher pathMatcher = Pattern.compile(PATH_PATTERN).matcher(path);
if (!pathMatcher.matches())
{
return false;
}
int slash2Count = countToken("//", path);
if (isOff(ALLOW_2_SLASHES) && (slash2Count > 0))
{
... |
private BackendType convertStereotypeType(Type t) {
if (t instanceof StereotypeType) {
Stereotype st = ((StereotypeType)t).getStereoType();
return _umlTypes.findType (st);
}
return null;
}
| private BackendType convertStereotypeType(Type t) {
if (t instanceof StereotypeType) {
Stereotype st = ((StereotypeType)t).getStereoType();
return _umlTypes.findType (UmlTypesystem.getUniqueIdentifier(st));
}
return null;
}
|
private void normalizeWhitespace( String value, boolean collapse) {
boolean skipSpace = collapse;
char c;
int size = value.length();
// ensure the ch array is big enough
if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) {
fNormalizedStr.ch = new c... | private void normalizeWhitespace( String value, boolean collapse) {
boolean skipSpace = collapse;
char c;
int size = value.length();
// ensure the ch array is big enough
if (fNormalizedStr.ch == null || fNormalizedStr.ch.length < size) {
fNormalizedStr.ch = new c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.