buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public String getConstraintValue() {
// REVISIT: SCAPI: what's the proper representation
return getConstraintType() == XSConstants.VC_NONE ?
null :
fDefault.actualValue.toString();
}
| public String getConstraintValue() {
// REVISIT: SCAPI: what's the proper representation
return getConstraintType() == XSConstants.VC_NONE ?
null :
fDefault.stringValue();
}
|
public void addTreeListener(TreeListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Expand, typedListener);
addListener (SWT.Collapse, typedListener);
}
int calculateWidth (int [] ids, GC gc) {
if... | public void addTreeListener(TreeListener listener) {
checkWidget ();
if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);
TypedListener typedListener = new TypedListener (listener);
addListener (SWT.Expand, typedListener);
addListener (SWT.Collapse, typedListener);
}
int calculateWidth (int [] ids, GC gc) {
if... |
public boolean isUnique() {
lock();
try {
assertOpen();
if (_unique != null)
return _unique.booleanValue();
if (_query == null || _compiling || _broker == null)
return false;
// check again after compilation; maybe enco... | public boolean isUnique() {
lock();
try {
assertOpen();
if (_unique != null)
return _unique.booleanValue();
if ((_query == null && _language.endsWith("JPQL")) || _compiling || _broker == null)
return false;
// check aga... |
public void widgetSelected (SelectionEvent e) {
shell.close ();
}
});
editItem.setMenu (menu);
shell.pack ();
shell.setSize (400, 500);
shell.open ();
Display display = shell.getDisplay ();
while (!shell.isDisposed ())
if (!display.readAndDispatch ()) display.sleep ... | public void widgetSelected (SelectionEvent e) {
shell.close ();
}
});
editItem.setMenu (menu);
shell.pack ();
shell.setSize (400, 500);
shell.open ();
Display display = shell.getDisplay ();
while (!shell.isDisposed ())
if (!display.readAndDispatch ()) display.sleep ... |
public void modifyText(ExtendedModifyEvent e) {
handleExtendedModify(e);
}
});
}
void createToolBar() {
toolBar = new ToolBar(shell, SWT.NULL);
SelectionAdapter listener = new SelectionAdapter() {
| public void modifyText(ExtendedModifyEvent e) {
handleExtendedModify(e);
}
});
}
void createToolBar() {
toolBar = new ToolBar(shell, SWT.NONE);
SelectionAdapter listener = new SelectionAdapter() {
|
protected Resource newResource()
{
// Create JAR resource
return new ByteArrayResource("application/x-compressed", jarClasses(classes))
.setCacheable(false);
}
};
String servletPath = ((ServletWebRequest)getRequest()).getServletPath();
tag.put("codebase", servletPath + '/'
+ Strings.be... | protected Resource newResource()
{
// Create JAR resource
return new ByteArrayResource("application/x-compressed", jarClasses(classes))
.setCacheable(false);
}
};
String servletPath = ((ServletWebRequest)getRequest()).getServletPath();
tag.put("codebase", servletPath + '/'
+ Strings.be... |
protected String getTestName() {
String test = getName();
int index = test.lastIndexOf('_');
if(index != -1)
test = test.substring(index+1, test.length());
String clss = getClassName();
if((!test.equals("MenuDetect") || clss.equals("Table") || clss.equals("TableTree") || test.startsWith("Che... | protected String getTestName() {
String test = getName();
int index = test.lastIndexOf('_');
if(index != -1)
test = test.substring(index+1, test.length());
String clss = getClassName();
if((!test.equals("MenuDetect") || clss.equals("Table") || clss.equals("TableTree") || test.startsWith("Che... |
public Control (Composite parent, int style) {
super (parent, style);
this.parent = parent;
createWidget (0);
}
int /*long*/ defaultFont () {
return display.defaultFont;
}
| public Control (Composite parent, int style) {
super (parent, style);
this.parent = parent;
createWidget (0);
}
int /*long*/ defaultFont () {
return display.getSystemFont ().handle;
}
|
public void init(Properties props) throws BuildException {
String file = props.getProperty("file");
OutputStream os = null;
if (file != null) {
try {
// fixme need to resolve the file !!!!
os = new FileOutputStream(file);
} catch (IOExc... | public void init(Properties props) throws BuildException {
String file = props.getProperty(FILE_KEY);
OutputStream os = null;
if (file != null) {
try {
// fixme need to resolve the file !!!!
os = new FileOutputStream(file);
} catch (IOE... |
public void setHints(Hashtable hints) {
this.hints = hints;
boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);
Vector formats = hints == null ? null : (Vector) hints.get(DecodeHintType.POSSIBLE_FORMATS);
readers = new Vector();
if (formats != null) {
boolean ... | public void setHints(Hashtable hints) {
this.hints = hints;
boolean tryHarder = hints != null && hints.containsKey(DecodeHintType.TRY_HARDER);
Vector formats = hints == null ? null : (Vector) hints.get(DecodeHintType.POSSIBLE_FORMATS);
readers = new Vector();
if (formats != null) {
boolean ... |
private static Hashtable<DecodeHintType, Object> buildHints(boolean tryHarder,
boolean pureBarcode,
boolean productsOnly) {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHint... | private static Hashtable<DecodeHintType, Object> buildHints(boolean tryHarder,
boolean pureBarcode,
boolean productsOnly) {
Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHint... |
public void showSelection () {
checkWidget ();
OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0);
}
String verifyText (String string, int start, int end, Event keyEvent) {
if (ignoreVerify) return string;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
if (keyEvent != null... | public void showSelection () {
checkWidget ();
OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0);
}
String verifyText (String string, int start, int end, Event keyEvent) {
if (ignoreVerify) return string;
Event event = new Event ();
event.text = string;
event.start = start;
event.end = end;
if (keyEvent != null... |
public int getSelectionIndex () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) {
return (int)/*64*/((NSPopUpButton)view).indexOfSelectedItem();
} else {
return indexOf (getText ());
}
}
| public int getSelectionIndex () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) {
return (int)/*64*/((NSPopUpButton)view).indexOfSelectedItem();
} else {
return (int)/*64*/((NSComboBox)view).indexOfSelectedItem();
}
}
|
public NavigationToolbar(MarkupContainer parent, String id, final DataTable table)
{
super(parent, id, table);
this.table = table;
WebMarkupContainer span = new WebMarkupContainer<Object>(this, "span");
span.add(new AttributeModifier("colspan", true, new Model<String>(String.valueOf(table
.getColumns().l... | public NavigationToolbar(MarkupContainer parent, String id, final DataTable table)
{
super(parent, id, table);
this.table = table;
WebMarkupContainer span = new WebMarkupContainer(this, "span");
span.add(new AttributeModifier("colspan", true, new Model<String>(String.valueOf(table
.getColumns().length)))... |
public final void treeStructureChanged(TreeModelEvent e)
{
if (dirtyAll)
{
return;
}
// get the parent node of changed nodes
Object node = e.getTreePath() != null ? e.getTreePath().getLastPathComponent() : null;
// has the tree root changed?
if (e == null || e.getTreePath().getPathCount() == 1)
{... | public final void treeStructureChanged(TreeModelEvent e)
{
if (dirtyAll)
{
return;
}
// get the parent node of changed nodes
Object node = e.getTreePath() != null ? e.getTreePath().getLastPathComponent() : null;
// has the tree root changed?
if (node == null || e.getTreePath().getPathCount() == 1)
... |
public void processRequestCycle()
{
WebRequestCycle cycle = new WebRequestCycle(wicketSession, wicketRequest, wicketResponse);
try
{
cycle.request();
}
catch (ServletException ex)
{
throw new WicketRuntimeException("Error while processing Wicket request cycle.", ex);
}
previousRenderedPage = l... | public void processRequestCycle()
{
WebRequestCycle cycle = new WebRequestCycle(wicketSession, wicketRequest, wicketResponse);
try
{
cycle.request();
}
catch (ServletException ex)
{
throw new WicketRuntimeException("Error while processing Wicket request cycle.", ex);
}
previousRenderedPage = l... |
* public API. It is marked public only so that it can be shared
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
*/
int handle;
short id;
int x, y, itemCount;
// int width, height;
boolean hasLocation, modified, closed... | * public API. It is marked public only so that it can be shared
* within the packages provided by SWT. It is not available on all
* platforms and should never be accessed from application code.
* </p>
*/
int handle;
short id;
int x, y, itemCount;
// int width, height;
boolean hasLocation, modified, closed... |
public PerformanceTests() {
super();
/* The logical order to run the tests in is:
* - SWT, SWTError, SWTException
* - Display
* - graphics classes
* - items and Caret, etc
* - widgets
* - dialogs
* - layout
* - custom widgets
* - printing and program
* - events
* - drag & drop
* - accessibil... | public PerformanceTests() {
super();
/* The logical order to run the tests in is:
* - SWT, SWTError, SWTException
* - Display
* - graphics classes
* - items and Caret, etc
* - widgets
* - dialogs
* - layout
* - custom widgets
* - printing and program
* - events
* - drag & drop
* - accessibil... |
protected void evalGrouping(QueryExpressions exps, ExpressionFactory factory, CriteriaQueryImpl<?> q) {
// exps.grouping = null; // Value[]
// exps.groupingClauses = null; // String[]
List<Expression<?>> groups = q.getGroupList();
MetamodelImpl model = q.getMetamodel();
... | protected void evalGrouping(QueryExpressions exps, ExpressionFactory factory, CriteriaQueryImpl<?> q) {
// exps.grouping = null; // Value[]
// exps.groupingClauses = null; // String[]
List<Expression<?>> groups = q.getGroupList();
MetamodelImpl model = q.getMetamodel();
... |
public void moveRow(int start, int end, int to) {
List<Object> subList = objects.subList(start, end);
for (int x = end - 1; x >= start; x--) {
objects.remove(x);
}
objects.addAll(to, subList);
super.fireTableChanged(new TableModelEvent(this));
}
| public void moveRow(int start, int end, int to) {
List<Object> subList = new ArrayList(objects.subList(start, end));
for (int x = end - 1; x >= start; x--) {
objects.remove(x);
}
objects.addAll(to, subList);
super.fireTableChanged(new TableModelEvent(this));
}... |
public String getCookieHeaderForURL(URL url) {
boolean debugEnabled = log.isDebugEnabled();
String protocol = url.getProtocol().trim();
if (!protocol.equalsIgnoreCase(HTTPSamplerBase.PROTOCOL_HTTP) &&
!protocol.equalsIgnoreCase(HTTPSamplerBase.PROTOCOL_HTTP)) {
return null;
}
S... | public String getCookieHeaderForURL(URL url) {
boolean debugEnabled = log.isDebugEnabled();
String protocol = url.getProtocol().trim();
if (!protocol.equalsIgnoreCase(HTTPSamplerBase.PROTOCOL_HTTP) &&
!protocol.equalsIgnoreCase(HTTPSamplerBase.PROTOCOL_HTTPS)) {
return null;
}
... |
private void boundsCheck(double d) throws InvalidDatatypeValueException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( d <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( ... | private void boundsCheck(double d) throws InvalidDatatypeValueException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( d <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( ... |
private void boundsCheck(float f) throws InvalidDatatypeValueException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f... | private void boundsCheck(float f) throws InvalidDatatypeValueException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f... |
private void boundsCheck(long f) throws InvalidDatatypeFacetException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f ... | private void boundsCheck(long f) throws InvalidDatatypeFacetException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f ... |
private void boundsCheck(long f) throws InvalidDatatypeFacetException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f ... | private void boundsCheck(long f) throws InvalidDatatypeFacetException {
boolean inUpperBound = false;
boolean inLowerBound = false;
if ( isMaxInclusiveDefined ) {
inUpperBound = ( f <= fMaxInclusive );
} else if ( isMaxExclusiveDefined ) {
inUpperBound = ( f ... |
public void widgetSelected(SelectionEvent event) {
if (!((Button) event.widget).getSelection ()) return;
recreateExampleWidgets ();
};
};
topButton.addSelectionListener (selectionListener);
bottomButton.addSelectionListener (selectionListener);
}
/**
* Gets the "Example" widget children's item... | public void widgetSelected(SelectionEvent event) {
if (!((Button) event.widget).getSelection ()) return;
recreateExampleWidgets ();
}
};
topButton.addSelectionListener (selectionListener);
bottomButton.addSelectionListener (selectionListener);
}
/**
* Gets the "Example" widget children's items... |
public void widgetSelected (SelectionEvent event) {
setWidgetLinesVisible ();
};
});
}
/**
* Creates the "Example" group.
*/
void createExampleGroup () {
super.createExampleGroup ();
/* Create a group for the table */
tableGroup = new Group (exampleGroup, SWT.NONE);
tableGroup.setLayout ... | public void widgetSelected (SelectionEvent event) {
setWidgetLinesVisible ();
}
});
}
/**
* Creates the "Example" group.
*/
void createExampleGroup () {
super.createExampleGroup ();
/* Create a group for the table */
tableGroup = new Group (exampleGroup, SWT.NONE);
tableGroup.setLayout (... |
public void widgetSelected (SelectionEvent event) {
setWidgetLinesVisible ();
};
});
}
/**
* Creates the "Example" group.
*/
void createExampleGroup () {
super.createExampleGroup ();
/* Create a group for the text tree */
treeGroup = new Group (exampleGroup, SWT.NONE);
treeGroup.setLayou... | public void widgetSelected (SelectionEvent event) {
setWidgetLinesVisible ();
}
});
}
/**
* Creates the "Example" group.
*/
void createExampleGroup () {
super.createExampleGroup ();
/* Create a group for the text tree */
treeGroup = new Group (exampleGroup, SWT.NONE);
treeGroup.setLayout... |
private QueryKey toQueryKey(Query q) {
QueryImpl impl = (QueryImpl) q;
if (impl.hasPositionalParameters())
return QueryKey.newInstance(impl.getDelegate(),
impl.getPositionalParameters().toArray());
return QueryKey.newInstance(impl.getDelegate(),
impl.g... | private QueryKey toQueryKey(Query q) {
QueryImpl impl = (QueryImpl) q;
if (impl.hasPositionalParameters())
return QueryKey.newInstance(impl.getDelegate(),
impl.getPositionalParameters());
return QueryKey.newInstance(impl.getDelegate(),
impl.getNamedPar... |
public String stripCommentsAndWhitespace(String original)
{
// let's be optimistic
AppendingStringBuffer result = new AppendingStringBuffer(original.length() / 2);
int state = REGULAR_TEXT;
boolean wasNewLineInWhitespace = false;
for (int i = 0; i < original.length(); ++i)
{
char c = original.charAt(i... | public String stripCommentsAndWhitespace(String original)
{
// let's be optimistic
AppendingStringBuffer result = new AppendingStringBuffer(original.length() / 2);
int state = REGULAR_TEXT;
boolean wasNewLineInWhitespace = false;
for (int i = 0; i < original.length(); ++i)
{
char c = original.charAt(i... |
private static final String REGEXP=
"<(?:"
+ "BASE(?=\\s)[^\\>]*\\sHREF\\s*=\\s*\"([^\">]*)\""
+ "|(?:IMG|SCRIPT)(?=\\s)[^\\>]*\\sSRC\\s*=\\s*\"([^\">]*)\""
+ "|APPLET(?=\\s)[^\\>]*\\sCODE(?:BASE)?\\s*=\\s*\"([^\">]*)\""
| private static final String REGEXP=
"<(?:"
+ "BASE(?=\\s)[^\\>]*\\sHREF\\s*=\\s*\"([^\">]*)\""
+ "|(?:IMG|SCRIPT|FRAME|IFRAME)(?=\\s)[^\\>]*\\sSRC\\s*=\\s*\"([^\">]*)\""
+ "|APPLET(?=\\s)[^\\>]*\\sCODE(?:BASE)?\\s*=\\s*\"([^\">]*)\""
|
public ScrollBar getVerticalBar () {
checkWidget ();
return verticalBar;
}
void HandlePreviewMouseWheel (int sender, int e) {
super.HandlePreviewMouseWheel (sender, e);
if (!checkEvent (e)) return;
if ((state & CANVAS) != 0) {
if (verticalBar != null) {
int vHandle = verticalBar.handle;
int delta = OS.Mou... | public ScrollBar getVerticalBar () {
checkWidget ();
return verticalBar;
}
void HandlePreviewMouseWheel (int sender, int e) {
super.HandlePreviewMouseWheel (sender, e);
if (!checkEvent (e)) return;
if ((state & CANVAS) != 0) {
if (verticalBar != null) {
int vHandle = verticalBar.handle;
int delta = OS.Mou... |
public void run() {
if (!display.isDisposed() && !browser.isDisposed())
listener.changed(progress);
}
}
);
}
NSNumber identifier = NSNumber.numberWithInt(resourceCount++);
if (this.identifier == 0) {
WebDataSource dataSource = new WebDataSource(dataSourceID);
WebFrame frame = dataSource.... | public void run() {
if (!display.isDisposed() && !browser.isDisposed())
listener.changed(progress);
}
}
);
}
NSNumber identifier = NSNumber.numberWithInt(resourceCount++);
if (this.identifier == 0) {
WebDataSource dataSource = new WebDataSource(dataSourceID);
WebFrame frame = dataSource.... |
private void flushBlock() throws IOException {
if (debug) {
System.err.println("TarBuffer.flushBlock() called.");
}
if (outStream == null) {
throw new IOException("writing to an input buffer");
}
if (currRecIdx > 0) {
writeBlock();
... | private void writeBlock() throws IOException {
if (debug) {
System.err.println("WriteBlock: blkIdx = " + currBlkIdx);
}
if (outStream == null) {
throw new IOException("writing to an input buffer");
}
outStream.write(blockBuffer, 0, blockSize);
... |
public Object component(Component component)
{
component.setFlag(FLAG_ATTACHING, false);
component.setFlag(FLAG_ATTACHED, true);
return IVisitor.CONTINUE_TRAVERSAL;
}
});
setFlag(FLAG_ATTACHING, false);
setFlag(FLAG_ATTACHED, true);
}
}
void detachChildren()
{
// Loop throug... | protected void onBeforeRenderChildren()
{
super.onBeforeRenderChildren();
try
{
// Loop through child components
final int size = children_size();
for (int i = 0; i < size; i++)
{
// Get next child
final Component child = children_get(i);
// Call begin request on the child
child.bef... |
public void process() {
try {
ScriptEngine scriptEngine = getScriptEngine();
processFileOrScript(scriptEngine);
} catch (ScriptException e) {
log.warn("Problem in JSR223 script ", e);
} catch (IOException e) {
log.warn("Problem in JSR223 script... | public void process() {
try {
ScriptEngine scriptEngine = getScriptEngine();
processFileOrScript(scriptEngine, null);
} catch (ScriptException e) {
log.warn("Problem in JSR223 script ", e);
} catch (IOException e) {
log.warn("Problem in JSR223 ... |
public long delay() {
long delay = 0;
try {
ScriptEngine scriptEngine = getScriptEngine();
Object o = processFileOrScript(scriptEngine);
if (o == null) {
log.warn("Script did not return a value");
return 0;
}
... | public long delay() {
long delay = 0;
try {
ScriptEngine scriptEngine = getScriptEngine();
Object o = processFileOrScript(scriptEngine, null);
if (o == null) {
log.warn("Script did not return a value");
return 0;
}
... |
public static final Object CONTENTS[][] = {
// Internal message formatter messages
{ "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
{ "FormatFailed", "An internal error occurred while formatting the following message:\n " },
{ "NotBoolean", "{0} is not a bo... | public static final Object CONTENTS[][] = {
// Internal message formatter messages
{ "BadMajorCode", "The majorCode parameter to createMessage was out of bounds." },
{ "FormatFailed", "An internal error occurred while formatting the following message:\n " },
{ "NotBoolean", "{0} is not a bo... |
protected CharSequence encode(RequestCycle requestCycle,
ISharedResourceRequestTarget requestTarget)
{
final String sharedResourceKey = requestTarget.getResourceKey();
if ((sharedResourceKey == null) || (sharedResourceKey.trim().length() == 0))
{
return "";
}
else
{
final AppendingStringBuffer bu... | protected CharSequence encode(RequestCycle requestCycle,
ISharedResourceRequestTarget requestTarget)
{
final String sharedResourceKey = requestTarget.getResourceKey();
if ((sharedResourceKey == null) || (sharedResourceKey.trim().length() == 0))
{
return "";
}
else
{
final AppendingStringBuffer bu... |
public Proceed(MessageSend parent) {
super();
this.receiver = parent.receiver;
this.selector = parent.selector;
this.arguments = parent.arguments;
this.binding = parent.binding;
this.codegenBinding = parent.codegenBinding;
this.nameSourcePosition = parent.nameSourcePosition;
this.receiverType = ... | public Proceed(MessageSend parent) {
super();
this.receiver = parent.receiver;
this.selector = parent.selector;
this.arguments = parent.arguments;
this.binding = parent.binding;
this.codegenBinding = parent.codegenBinding;
this.nameSourcePosition = parent.nameSourcePosition;
this.receiverType = ... |
private DeweyDecimal getVersion() {
Project p = new Project();
p.init();
String versionString = p.getProperty("ant.version");
String v = versionString.substring(versionString.indexOf("Ant version")+12,
versionString.indexOf("compiled on")-1);
char[] cs = v.to... | private DeweyDecimal getVersion() {
Project p = new Project();
p.init();
String versionString = p.getProperty("ant.version");
String v = versionString.substring(versionString.indexOf("Ant version")+12,
versionString.indexOf("Ant version")+17);
char[] cs = v.t... |
private final void respond(final Response response)
{
try
{
final OutputStream out = response.getOutputStream();
try
{
Streams.copy(resourceStream.getInputStream(), out);
}
finally
{
resourceStream.close();
out.flush();
}
}
catch(SocketException se)
{
String message = se.... | private final void respond(final Response response)
{
try
{
final OutputStream out = response.getOutputStream();
try
{
Streams.copy(resourceStream.getInputStream(), out);
}
finally
{
resourceStream.close();
out.flush();
}
}
catch(SocketException se)
{
String message = se.... |
public void setUp() {
setUp(Dog.class);
}
| public void setUp() {
setUp(Dog.class, CLEAR_TABLES);
}
|
public String getURIFromIncludeParent(String prefix) {
int lastValidContext = fCurrentContext - 1;
while (!fValidContext[lastValidContext]) {
lastValidContext--;
}
return getURI(prefix, lastValidContext);
}
| public String getURIFromIncludeParent(String prefix) {
int lastValidContext = fCurrentContext - 1;
while (lastValidContext > 0 && !fValidContext[lastValidContext]) {
lastValidContext--;
}
return getURI(prefix, lastValidContext);
}
|
public boolean applies(ConfigTestElement configElement) {
return true;
}
| public boolean applies(ConfigTestElement configElement) {
return false;
}
|
private void checkDuplicateDefinitions(Set<AnalysationIssue> issues) {
Set<Definition> definitionSet = new HashSet<Definition>();
for (Definition def : definitions) {
if (!definitionSet.contains(def)) {
definitionSet.add(def);
}
else {
Definition origDef = null;
for (Iterator<Definition> it = ... | private void checkDuplicateDefinitions(Set<AnalysationIssue> issues) {
Set<Definition> definitionSet = new HashSet<Definition>();
for (Definition def : definitions) {
if (!definitionSet.contains(def)) {
definitionSet.add(def);
}
else {
Definition origDef = null;
for (Iterator<Definition> it = ... |
public static void run(URL url, IFtpRunnable runnable, IProgressMonitor monitor) throws FtpException {
monitor = Policy.monitorFor(monitor);
IClient openClient = (IClient) openClients.get();
monitor.beginTask(null, 100);
//if the wrong client is connected, disconnect before trying again
if (openClient != nul... | public static void run(URL url, IFtpRunnable runnable, IProgressMonitor monitor) throws FtpException {
monitor = Policy.monitorFor(monitor);
IClient openClient = (IClient) openClients.get();
monitor.beginTask("", 100);
//if the wrong client is connected, disconnect before trying again
if (openClient != null ... |
private void simpleQuery(boolean simple2, String findOneQName,
String findAllQName, String nameOne, String ValueOne, String nameTwo,
String ValueTwo) {
EntityManager em = emf.createEntityManager();
List list = em.createNamedQuery(findOneQName).setParameter(1, nameOne)
.g... | private void simpleQuery(boolean simple2, String findOneQName,
String findAllQName, String nameOne, String ValueOne, String nameTwo,
String ValueTwo) {
EntityManager em = emf.createEntityManager();
List list = em.createNamedQuery(findOneQName).setParameter("fname", nameOne)
... |
public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch == -1) {
changeReaders().scanQName(fastcheck, qname);
return;
}
if (!fCalledCharPropInit) {
XMLCharacterProperties.initCharFlags();
f... | public void scanQName(char fastcheck, QName qname) throws Exception {
int ch = fMostRecentChar;
if (ch == -1) {
changeReaders().scanQName(fastcheck, qname);
return;
}
if (!fCalledCharPropInit) {
XMLCharacterProperties.initCharFlags();
f... |
public void testRenderHomePage_6() throws Exception
{
boolean hit = false;
try
{
executeTest(SimplePage_6.class, "SimplePageExpectedResult_6.html");
}
catch (MarkupNotFoundException ex)
{
hit = true;
}
assertTrue("Did expect a MarkupException", hit);
}
| public void testRenderHomePage_6() throws Exception
{
boolean hit = false;
try
{
executeTest(SimplePage_6.class, "SimplePageExpectedResult_6.html");
}
catch (MarkupException ex)
{
hit = true;
}
assertTrue("Did expect a MarkupException", hit);
}
|
public String toString() {
StringBuffer buf = new StringBuffer(
"IOutgoingFileTransferSendDoneEvent[");
buf.append("isDone="+getSource().isDone());
buf.append(";bytesSent=").append(
getSource().getBytesSent()).append(
"]");
return buf.toString();
}
... | public String toString() {
StringBuffer buf = new StringBuffer(
"IOutgoingFileTransferSendDoneEvent[");
buf.append("isDone="+getSource().isDone());
buf.append(";bytesSent=").append(
getSource().getBytesSent()).append(
"]");
return buf.toString();
}
... |
public void execute() {
if (file == null) {
throw new BuildException("import requires file attribute");
}
if (getOwningTarget() == null
|| !"".equals(getOwningTarget().getName())) {
throw new BuildException("import only allowed as a top-level task");
... | public void execute() {
if (file == null) {
throw new BuildException("import requires file attribute");
}
if (getOwningTarget() == null
|| !"".equals(getOwningTarget().getName())) {
throw new BuildException("import only allowed as a top-level task");
... |
public static final String SERVICE_ID =
"/META-INF/services/org.apache.tools.ant.ProjectHelper";
| public static final String SERVICE_ID =
"META-INF/services/org.apache.tools.ant.ProjectHelper";
|
public byte[] getPictureData() {
// TODO: update this when avatars have been implemented
return null;
}
| public byte[] getPictureData() {
// TODO: update this when avatars have been implemented
return new byte[0];
}
|
public void checkConfigurationInternal (Issues issues) {
super.checkConfiguration (issues);
if (_expression == null && _emfAllChildrenSlot != null)
_expression = _emfAllChildrenSlot + ".eAllContents.union ( {" + _emfAllChildrenSlot + "} )";
else if (_expression != null ... | public void checkConfigurationInternal (Issues issues) {
super.checkConfigurationInternal (issues);
if (_expression == null && _emfAllChildrenSlot != null)
_expression = _emfAllChildrenSlot + ".eAllContents.union ( {" + _emfAllChildrenSlot + "} )";
else if (_expression ... |
protected void populateItem(ListItem item)
{
RequestData rd = (RequestData)item.getModelObject();
item.add(new Label("id", new Model(rd.getSessionId())).setVisible(sessionData == null));
item.add(new Label("startDate", new Model(sdf.format(rd.getStartDate()))));
item.add(new Label("timeTaken", ne... | protected void populateItem(ListItem item)
{
RequestData rd = (RequestData)item.getModelObject();
item.add(new Label("id", new Model(rd.getSessionId())).setVisible(sessionData == null));
item.add(new Label("startDate", new Model(sdf.format(rd.getStartDate()))));
item.add(new Label("timeTaken", ne... |
public Decorations (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.NO_TRIM) != 0) {
style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.BORDER);
}
if ((style & (SWT.MENU | SWT.MIN | SWT.MAX | SWT.CLOSE)) != 0) {
styl... | public Decorations (Composite parent, int style) {
super (parent, checkStyle (style));
}
static int checkStyle (int style) {
if ((style & SWT.NO_TRIM) != 0) {
style &= ~(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.BORDER);
}
if ((style & (SWT.MENU | SWT.MIN | SWT.MAX | SWT.CLOSE)) != 0) {
styl... |
public Class[][] getSupportedParameterTypesForCreateInstance() {
return new Class[][] { { String.class } };
}
} | public Class[][] getSupportedParameterTypes() {
return new Class[][] { { String.class } };
}
} |
public Class[][] getSupportedParameterTypesForCreateInstance() {
return new Class[][] { { String.class, String.class, String.class,
String.class, String.class } };
}
} | public Class[][] getSupportedParameterTypes() {
return new Class[][] { { String.class, String.class, String.class,
String.class, String.class } };
}
} |
public static String absolutePath(final Class<?> p, final String relativePath)
{
String packName = extractPackageName(p);
return absolutePath(packName, relativePath);
}
| public static String absolutePath(final Class<?> p, final String relativePath)
{
String packName = (p != null ? extractPackageName(p) : "");
return absolutePath(packName, relativePath);
}
|
public void testReverseReplacement() throws Exception {
ValueReplacer replacer = new ValueReplacer(variables);
assertTrue(variables.getUserDefinedVariables().containsKey("server"));
assertTrue(replacer.variables.containsKey("server"));
TestElement element = new TestPlan();
element.setProperty(new Strin... | public void testReverseReplacement() throws Exception {
ValueReplacer replacer = new ValueReplacer(variables);
assertTrue(variables.getUserDefinedVariables().containsKey("server"));
assertTrue(replacer.containsKey("server"));
TestElement element = new TestPlan();
element.setProperty(new StringProperty(... |
private void makeSearchMenu() {
// Search MENU
searchMenu = makeMenuRes("menu_search"); //$NON-NLS-1$
JMenuItem search = makeMenuItemRes("menu_search", ActionNames.SEARCH_TREE); //$NON-NLS-1$
searchMenu.add(search);
searchMenu.setEnabled(true);
JMenuItem searchReset... | private void makeSearchMenu() {
// Search MENU
searchMenu = makeMenuRes("menu_search"); //$NON-NLS-1$
JMenuItem search = makeMenuItemRes("menu_search", 'F', ActionNames.SEARCH_TREE, KeyStrokes.SEARCH_TREE); //$NON-NLS-1$
searchMenu.add(search);
searchMenu.setEnabled(true);
... |
private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("panel");
}
| private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("panel");
}
|
public static final String AUTOLINK_ID = "_autolink_";
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("link");
}
| public static final String AUTOLINK_ID = "_autolink_";
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("link");
}
|
public static final String IGNORE = "<<Removed by WicketRemoveTagHandler>>";
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("remove");
}
| public static final String IGNORE = "<<Removed by WicketRemoveTagHandler>>";
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("remove");
}
|
private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("component");
}
| private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("component");
}
|
private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("fragment");
}
| private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("fragment");
}
|
private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKownTagName("head");
}
| private static final long serialVersionUID = 1L;
static
{
// register "wicket:fragement"
WicketTagIdentifier.registerWellKnownTagName("head");
}
|
public final void testDefaultWicketTag() throws ParseException,
ResourceStreamNotFoundException, IOException
{
final MarkupParser parser = new MarkupParser(new XmlPullParser());
parser.setWicketNamespace("wcn");
Markup markup = parser.parse("<span wcn:id=\"test\"/>");
assertEquals(1, markup.size());
ma... | public final void testDefaultWicketTag() throws ParseException,
ResourceStreamNotFoundException, IOException
{
final MarkupParser parser = new MarkupParser(new XmlPullParser());
parser.setWicketNamespace("wcn");
Markup markup = parser.parse("<span wcn:id=\"test\"/>");
assertEquals(1, markup.size());
ma... |
public void setUp() {
Map options = new HashMap();
// turn on caching
options.put("openjpa.DataCache", "true");
options.put("openjpa.RemoteCommitProvider", "sjvm");
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation works
options.p... | public void setUp() {
Map options = new HashMap();
// turn on caching
options.put("openjpa.DataCache", "true");
options.put("openjpa.RemoteCommitProvider", "sjvm");
// ensure that OpenJPA knows about our type, so that
// auto-schema-creation works
options.p... |
public void addDeclare(Declare declare) {
// this is not extensible, oh well
if (declare instanceof DeclareErrorOrWarning) {
ShadowMunger m = new Checker((DeclareErrorOrWarning)declare);
m.setDeclaringType(declare.getDeclaringType());
addShadowMunger(m);
} else if (declare instanceof DeclarePrecedence) ... | public void addDeclare(Declare declare) {
// this is not extensible, oh well
if (declare instanceof DeclareErrorOrWarning) {
ShadowMunger m = new Checker((DeclareErrorOrWarning)declare);
m.setDeclaringType(declare.getDeclaringType());
addShadowMunger(m);
} else if (declare instanceof DeclarePrecedence) ... |
public void resolve(IScope scope) {
patterns = patterns.resolveBindings(scope, Bindings.NONE, false, false);
boolean seenStar = false;
for (int i=0; i < patterns.size(); i++) {
TypePattern pi = patterns.get(i);
if (pi.isStar()) {
if (seenStar) {
scope.getWorld().show... | public void resolve(IScope scope) {
patterns = patterns.resolveBindings(scope, Bindings.NONE, false, false);
boolean seenStar = false;
for (int i=0; i < patterns.size(); i++) {
TypePattern pi = patterns.get(i);
if (pi.isStar()) {
if (seenStar) {
scope.getWorld().show... |
private boolean determineWicketNamespace(final ComponentTag tag)
{
String attrValue = null;
final ValueMap attributes = tag.getAttributes();
final Iterator it = attributes.keySet().iterator();
while (it.hasNext())
{
final String attributeName = (String)it.next();
if (attributeName.startsWith("xmlns:")... | private boolean determineWicketNamespace(final ComponentTag tag)
{
String attrValue = null;
final ValueMap attributes = tag.getAttributes();
final Iterator it = attributes.keySet().iterator();
while (it.hasNext())
{
final String attributeName = (String)it.next();
if (attributeName.startsWith("xmlns:")... |
protected Commandline setupModernJavacCommandlineSwitches(Commandline cmd) {
setupJavacCommandlineSwitches(cmd, true);
if (attributes.getSource() != null && !assumeJava13()) {
cmd.createArgument().setValue("-source");
String source = attributes.getSource();
if (so... | protected Commandline setupModernJavacCommandlineSwitches(Commandline cmd) {
setupJavacCommandlineSwitches(cmd, true);
if (attributes.getSource() != null && !assumeJava13()) {
cmd.createArgument().setValue("-source");
String source = attributes.getSource();
if (so... |
private void defineClass(ClassLoader loader, String name, byte[] bytes) {
if (trace.isTraceEnabled()) trace.enter("defineClass",this,new Object[] {loader,name,bytes});
Object clazz = null;
info("generating class '" + name + "'");
try {
//TODO av protection domain, and optimize
Method defineClass... | private void defineClass(ClassLoader loader, String name, byte[] bytes) {
if (trace.isTraceEnabled()) trace.enter("defineClass",this,new Object[] {loader,name,bytes});
Object clazz = null;
debug("generating class '" + name + "'");
try {
//TODO av protection domain, and optimize
Method defineClas... |
public ContainerTypeDescription[] getDescriptionsForAdapter(Class containerAdapter);
}
| public ContainerTypeDescription[] getDescriptionsForContainerAdapter(Class containerAdapter);
}
|
public void testIncrementalSuite() {
System.err.println("skippping testIncrementalSuite - too long");
if (true) return;
if (!eclipseAvailable()) {
System.err.println("skipping test - eclipse classes not available");
return;
}
String[] options = new Str... | public void testIncrementalSuite() {
System.err.println("skipping testIncrementalSuite - too long");
if (true) return;
if (!eclipseAvailable()) {
System.err.println("skipping test - eclipse classes not available");
return;
}
String[] options = new Stri... |
public void testHangmanFailureWebGame()
{
getTestContext().setBaseUrl("http://localhost:8098/wicket-examples");
beginAt("/hangman?word=hangman");
assertTitleEquals("Wicket Examples - hangman");
assertLinkPresent("start");
clickLink("start");
assertTitleEquals("Wicket Examples - hangman");
assertTextPre... | public void testHangmanFailureWebGame()
{
getTestContext().setBaseUrl("http://localhost:8098/wicket-examples");
beginAt("/hangman?word=hangman");
assertTitleEquals("Wicket Examples - hangman");
assertLinkPresent("start");
clickLink("start");
assertTitleEquals("Wicket Examples - hangman");
assertTextPre... |
public boolean needsSpinup () {
return false;
}
void onDispose (int embedHandle) {
handles.remove (new LONG (embedHandle));
if (listener != null) {
| public void handleEvent (Event event) {
if (event.widget == browser) return;
((Mozilla)browser.webBrowser).Deactivate ();
hasFocus = false;
browser.getDisplay ().removeFilter (SWT.FocusIn, this);
browser.getShell ().removeListener (SWT.Deactivate, this);
listener = null;
}
};
browser.getDispla... |
public boolean needsSpinup () {
return false;
}
| boolean needsSpinup () {
/*******************************************************************************
* Copyright (c) 2005, 2007 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
* which accompa... |
public File resolveFile(String fileName, File rootDir) {
fileName = fileName.replace('/', File.separatorChar).replace('\\', File.separatorChar);
// deal with absolute files
if (fileName.startsWith(File.separator)) {
try {
return new File(new File(fileName).getCan... | public File resolveFile(String fileName, File rootDir) {
fileName = fileName.replace('/', File.separatorChar).replace('\\', File.separatorChar);
// deal with absolute files
if (fileName.startsWith(File.separator)) {
try {
return new File(new File(fileName).getCan... |
public void execute() throws ExecutionException {
AntContext context = getAntContext();
ComponentService componentService = (ComponentService)
context.getCoreService(ComponentService.class);
componentService.loadLib(url.toString(), importAll);
}
| public void execute() throws ExecutionException {
AntContext context = getAntContext();
ComponentService componentService = (ComponentService)
context.getCoreService(ComponentService.class);
componentService.loadLib(url.toString(), importAll, false);
}
|
protected void printError(String type, XMLParseException ex) {
System.err.print("[");
System.err.print(type);
System.err.print("] ");
String systemId = ex.getSystemId();
if (systemId != null) {
int index = systemId.lastIndexOf('/');
if (index != -1)
... | protected void printError(String type, XMLParseException ex) {
System.err.print("[");
System.err.print(type);
System.err.print("] ");
String systemId = ex.getExpandedSystemId();
if (systemId != null) {
int index = systemId.lastIndexOf('/');
if (index ... |
private void printError(String type, XMLParseException ex) {
fOut.print("[");
fOut.print(type);
fOut.print("] ");
String systemId = ex.getSystemId();
if (systemId != null) {
int index = systemId.lastIndexOf('/');
if (index != -1)
syste... | private void printError(String type, XMLParseException ex) {
fOut.print("[");
fOut.print(type);
fOut.print("] ");
String systemId = ex.getExpandedSystemId();
if (systemId != null) {
int index = systemId.lastIndexOf('/');
if (index != -1)
... |
public About(AppContext context) {
super(context.getParentFrame(), true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
String version = null;
String date = null;
String contributors = null;
Properties props = new Properties();
try {
props.load(getClass().getResourceAsStream("version.txt"));
}
ca... | public About(AppContext context) {
super(context.getParentFrame(), true);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
String version = null;
String date = null;
String contributors = null;
Properties props = new Properties();
try {
props.load(getClass().getResourceAsStream("version.txt"));
}
ca... |
public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
if (clazz == null)
{
return null;
}
if (log.isDebugEnabled())
{
log.debug("key: '" + key + "'; class: '" + clazz.getName() + "'; locale: '" + locale +
"'; Style:... | public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
if (clazz == null)
{
return null;
}
if (log.isDebugEnabled())
{
log.debug("key: '" + key + "'; class: '" + clazz.getName() + "'; locale: '" + locale +
"'; Style:... |
public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
if (clazz == null)
{
return null;
}
// Load the properties associated with the path
IPropertiesFactory propertiesFactory = Application.get()
.getResourceSettings()
... | public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
if (clazz == null)
{
return null;
}
// Load the properties associated with the path
IPropertiesFactory propertiesFactory = Application.get()
.getResourceSettings()
... |
public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
// only care about IValidator subclasses
if (clazz == null || !IValidator.class.isAssignableFrom(clazz))
{
return null;
}
IPropertiesFactory propertiesFactory = Applica... | public String loadStringResource(Class<?> clazz, final String key, final Locale locale,
final String style, final String variation)
{
// only care about IValidator subclasses
if (clazz == null || !IValidator.class.isAssignableFrom(clazz))
{
return null;
}
IPropertiesFactory propertiesFactory = Applica... |
public static final String ATT_CONTAINER_TYPE_NAME = "containerTypeName";
} | public static final String ATT_CONTAINER_TYPE_NAME = "containerFactoryName";
} |
public WordGenerator()
{
try
{
final IResourceStream resource = new ClassLoaderResourceStreamLocator().locate(
"wicket/examples/hangman/WordList", "", Locale.getDefault(), ".txt");
final String wordlist = Streams.readString(resource.getInputStream());
this.words = Arrays.asList(wordlist.split("\\s+"... | public WordGenerator()
{
try
{
final IResourceStream resource = new ClassLoaderResourceStreamLocator().locate(null,
"wicket/examples/hangman/WordList", "", Locale.getDefault(), ".txt");
final String wordlist = Streams.readString(resource.getInputStream());
this.words = Arrays.asList(wordlist.split("... |
public void startEntity(String entityName, boolean literal)
throws IOException, XNIException {
// was entity declared?
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
if (fEntityHandler != null) {
String encoding = null;
... | public void startEntity(String entityName, boolean literal)
throws IOException, XNIException {
// was entity declared?
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
if (fEntityHandler != null) {
String encoding = null;
... |
private Object createDefaultValue(int i)
{
Class colClass = getColumnClass(i);
try
{
return colClass.newInstance();
}
catch (Exception e)
{
try
{
Constructor constr =
colClass.getConstructor(n... | private Object createDefaultValue(int i)
{
Class colClass = getColumnClass(i);
try
{
return colClass.newInstance();
}
catch (Exception e)
{
try
{
Constructor constr =
colClass.getConstructor(n... |
public void clearGui() {
super.clearGui();
rootdn.setText(""); //$NON-NLS-1$
searchbase.setText(""); //$NON-NLS-1$
searchfilter.setText(""); //$NON-NLS-1$
delete.setText(""); //$NON-NLS-1$
add.setText(""); //$NON-NLS-1$
modify.setText(""); //$NON-NLS-... | public void clearGui() {
super.clearGui();
rootdn.setText(""); //$NON-NLS-1$
searchbase.setText(""); //$NON-NLS-1$
searchfilter.setText(""); //$NON-NLS-1$
delete.setText(""); //$NON-NLS-1$
add.setText(""); //$NON-NLS-1$
modify.setText(""); //$NON-NLS-... |
before(): execution(public * *(..)) && within(figures.*) {
Log.log(thisJoinPoint.toString());
}
| before(): execution(public * *(..)) && within(figures.*) {
Log.write(thisJoinPoint);
}
|
public void javaToNative(Object object, TransferData transferData) {
if (!checkFile(object) || !isSupportedType(transferData)) {
DND.error(DND.ERROR_INVALID_DATA);
}
String[] fileNames = (String[]) object;
StringBuffer allFiles = new StringBuffer();
for (int i = 0; i < fileNames.length; i++) {
allFiles.append(... | public void javaToNative(Object object, TransferData transferData) {
if (!checkFile(object) || !isSupportedType(transferData)) {
DND.error(DND.ERROR_INVALID_DATA);
}
String[] fileNames = (String[]) object;
StringBuffer allFiles = new StringBuffer();
for (int i = 0; i < fileNames.length; i++) {
allFiles.append(... |
public int pIDataObject;
static boolean sameType(TransferData data1, TransferData data2) {
if (data1 == data2) return true;
if (data1 == null || data2 == null) return false;
return (data1.type == data2.type &&
data1.formatetc.cfFormat == data2.formatetc.cfFormat &&
data1.formatetc.dwAspect == data2... | public int /*long*/ pIDataObject;
static boolean sameType(TransferData data1, TransferData data2) {
if (data1 == data2) return true;
if (data1 == null || data2 == null) return false;
return (data1.type == data2.type &&
data1.formatetc.cfFormat == data2.formatetc.cfFormat &&
data1.formatetc.dwAspect... |
public GroupDrawData() {
state = new int[1];
}
static final int GROUP_HEADER_X = 9;
static final int GROUP_HEADER_PAD = 2;
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bo... | public GroupDrawData() {
state = new int[1];
}
static final int GROUP_HEADER_X = 9;
static final int GROUP_HEADER_PAD = 2;
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int /*long*/ hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.... |
public ProgressBarDrawData() {
state = new int[1];
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bounds.x;
rect.right = rect.left + bounds.width;
rect.top = bounds.y... | public ProgressBarDrawData() {
state = new int[1];
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int /*long*/ hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bounds.x;
rect.right = rect.left + bounds.width;
rect.top =... |
public ScaleDrawData() {
state = new int[4];
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
// TODO - drawScale not done
int style = this.style;
int minimum = this.minimum;
int maximum = this.maximum;
int selection = this.selection;
int pageIncremen... | public ScaleDrawData() {
state = new int[4];
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
// TODO - drawScale not done
int style = this.style;
int minimum = this.minimum;
int maximum = this.maximum;
int selection = this.selection;
int pageIncremen... |
public TabFolderDrawData() {
state = new int[1];
if (SWT.getPlatform().equals("gtk")) {
spacing = -2;
}
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bounds.x;
rec... | public TabFolderDrawData() {
state = new int[1];
if (SWT.getPlatform().equals("gtk")) {
spacing = -2;
}
}
void draw(Theme theme, GC gc, Rectangle bounds) {
if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
int /*long*/ hTheme = OS.OpenThemeData(0, getClassId());
RECT rect = new RECT ();
rect.left = bounds... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.