buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
public Page3()
{
add(new NavomaticBorder(this,"navomaticBorder"));
}
| public Page3()
{
add(new NavomaticBorder("navomaticBorder"));
}
|
public Page1(PageParameters parameters)
{
add(new BookmarkablePageLink(this,"homeLink", Home.class));
}
| public Page1(PageParameters parameters)
{
add(new BookmarkablePageLink("homeLink", Home.class));
}
|
public Page3(PageParameters parameters)
{
add(new BookmarkablePageLink(this,"homeLink", Home.class));
}
| public Page3(PageParameters parameters)
{
add(new BookmarkablePageLink("homeLink", Home.class));
}
|
public Page4(PageParameters parameters)
{
add(new BookmarkablePageLink(this,"homeLink", Home.class));
}
| public Page4(PageParameters parameters)
{
add(new BookmarkablePageLink("homeLink", Home.class));
}
|
public DataGridPage()
{
ICellPopulator[] columns = new ICellPopulator[5];
columns[0] = new PropertyPopulator("id");
columns[1] = new PropertyPopulator("firstName");
columns[2] = new PropertyPopulator("lastName");
columns[3] = new PropertyPopulator("homePhone");
columns[4] = new PropertyPopulator("cellPho... | public DataGridPage()
{
ICellPopulator[] columns = new ICellPopulator[5];
columns[0] = new PropertyPopulator("id");
columns[1] = new PropertyPopulator("firstName");
columns[2] = new PropertyPopulator("lastName");
columns[3] = new PropertyPopulator("homePhone");
columns[4] = new PropertyPopulator("cellPho... |
public void populateItem(Item cellItem, String componentId, IModel rowModel)
{
cellItem.add(new Label(cellItem,componentId, new PropertyModel(rowModel, property)));
}
| public void populateItem(Item cellItem, String componentId, IModel rowModel)
{
cellItem.add(new Label(componentId, new PropertyModel(rowModel, property)));
}
|
public void populateItem(Item item, String componentId, IModel model)
{
item.add(new Label(item,componentId, createLabelModel(model)));
}
| public void populateItem(Item item, String componentId, IModel model)
{
item.add(new Label(componentId, createLabelModel(model)));
}
|
public BasePage() {
add(new BookmarkablePageLink(this,"home-link", HomePage.class));
}
| public BasePage() {
add(new BookmarkablePageLink("home-link", HomePage.class));
}
|
public ContactsDisplayPage() {
IColumn[] cols = new IColumn[4];
cols[0] = new PropertyColumn(new Model("first name"), "firstName",
"firstName");
cols[1] = new PropertyColumn(new Model("last name"), "lastName",
"lastName");
cols[2] = new PropertyColumn(new Model("home phone"), "homePhone");
cols[3] = ... | public ContactsDisplayPage() {
IColumn[] cols = new IColumn[4];
cols[0] = new PropertyColumn(new Model("first name"), "firstName",
"firstName");
cols[1] = new PropertyColumn(new Model("last name"), "lastName",
"lastName");
cols[2] = new PropertyColumn(new Model("home phone"), "homePhone");
cols[3] = ... |
private void merge(final Markup markup, final Markup baseMarkup, int extendIndex)
{
// True if either <wicket:head> or <head> has been processed
boolean wicketHeadProcessed = false;
// Add all elements from the base markup to the new list
// until <wicket:child/> is found. Convert <wicket:child/>
// into <... | private void merge(final Markup markup, final Markup baseMarkup, int extendIndex)
{
// True if either <wicket:head> or <head> has been processed
boolean wicketHeadProcessed = false;
// Add all elements from the base markup to the new list
// until <wicket:child/> is found. Convert <wicket:child/>
// into <... |
public Scale (Composite parent, int style) {
super (parent, checkStyle (style));
}
int actionProc (int theControl, int partCode) {
int result = super.actionProc (theControl, partCode);
if (result == OS.noErr) return result;
sendEvent (SWT.Selection);
return result;
}
| public Scale (Composite parent, int style) {
super (parent, checkStyle (style));
}
int actionProc (int theControl, int partCode) {
int result = super.actionProc (theControl, partCode);
if (result == OS.noErr) return result;
sendSelectionEvent (SWT.Selection, null, true);
return result;
}
|
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
if (this.checked == checked) return;
setChecked (checked, false);
}
void setChecked (boolean checked, boolean notify) {
this.checked = checked;
cached = true;
redraw (Table.CHECK_COLUMN_ID);
if (notify) {
... | public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
if (this.checked == checked) return;
setChecked (checked, false);
}
void setChecked (boolean checked, boolean notify) {
this.checked = checked;
cached = true;
redraw (Table.CHECK_COLUMN_ID);
if (notify) {
... |
public boolean isVisible () {
checkWidget ();
return getVisible ();
}
void onMouseDown (Event event) {
notifyListeners (SWT.Selection, new Event ());
setVisible (false);
}
| public boolean isVisible () {
checkWidget ();
return getVisible ();
}
void onMouseDown (Event event) {
sendSelectionEvent (SWT.Selection, null, true);
setVisible (false);
}
|
public void setVisible (boolean visible) {
checkWidget ();
if (this.visible == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
}
this.visible = visible;
float width = image != null && visible ? OS.CGImageGetWidth (image.handle) + BORDER : 0;
Cocoa.objc_msgSend (handle, Cocoa.... | public void setVisible (boolean visible) {
checkWidget ();
if (this.visible == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
}
this.visible = visible;
float width = image != null && visible ? OS.CGImageGetWidth (image.handle) + BORDER : 0;
Cocoa.objc_msgSend (handle, Cocoa.... |
public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
if (this.checked == checked) return;
setChecked (checked, false);
}
void setChecked (boolean checked, boolean notify) {
this.checked = checked;
cached = true;
redraw (Tree.CHECK_COLUMN_ID);
if (notify) {
E... | public void setChecked (boolean checked) {
checkWidget ();
if ((parent.style & SWT.CHECK) == 0) return;
if (this.checked == checked) return;
setChecked (checked, false);
}
void setChecked (boolean checked, boolean notify) {
this.checked = checked;
cached = true;
redraw (Tree.CHECK_COLUMN_ID);
if (notify) {
E... |
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
| protected void configureResponse()
{
super.configureResponse();
getRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_FORBIDDEN);
}
|
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
| protected void configureResponse()
{
super.configureResponse();
getRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
|
protected void configureResponse()
{
super.configureResponse();
getWebRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
}
| protected void configureResponse()
{
super.configureResponse();
getRequestCycle().getWebResponse().getHttpServletResponse().setStatus(
HttpServletResponse.SC_NOT_FOUND);
}
|
public final RequestParameters decode(final Request request)
{
final RequestParameters parameters = new RequestParameters();
addInterfaceParameters(request, parameters);
addBookmarkablePageParameters(request, parameters);
addResourceParameters(request, parameters);
parameters.setBehaviorId(request.getParam... | public final RequestParameters decode(final Request request)
{
final RequestParameters parameters = new RequestParameters();
addInterfaceParameters(request, parameters);
addBookmarkablePageParameters(request, parameters);
addResourceParameters(request, parameters);
parameters.setBehaviorId(request.getParam... |
protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class homePageClass = application.getHomePage(... | protected IRequestTarget resolveHomePageTarget(final RequestCycle requestCycle,
final RequestParameters requestParameters)
{
Session session = requestCycle.getSession();
Application application = session.getApplication();
try
{
// Get the home page class
Class<? extends Page> homePageClass = applicat... |
public void afterRefresh(LifecycleEvent event) {
makeCallback(event);
}
| public void afterRefresh(LifecycleEvent event) {
// no analagous callback
}
|
public static Object convert(Object value, Class toType) {
if (value == null) {
value = "";
} else if (toType.isAssignableFrom(value.getClass())) {
return value;
} else if (toType.equals(float.class) || toType.equals(Float.class)) {
return new Float(getFloat(value));
} else if (toType.equals(double.cl... | public static Object convert(Object value, Class toType) {
if (value == null) {
value = "";
} else if (toType.isAssignableFrom(value.getClass())) {
return value;
} else if (toType.equals(float.class) || toType.equals(Float.class)) {
return new Float(getFloat(value));
} else if (toType.equals(double.cl... |
private static final String TAG = "CameraManager";
| private void setSharpness(Camera.Parameters parameters) {
int desiredSharpness = DESIRED_SHARPNESS;
String maxSharpnessString = parameters.get("sharpness-max");
if (maxSharpnessString != null) {
try {
int maxSharpness = Integer.parseInt(maxSharpnessString);
if (desiredSharpness > m... |
public static String getJMeterVersion()
{
return "@VERSION@";
}
| public static String getJMeterVersion()
{
return "1.7.3";
}
|
public void testExit() {
perms.setSecurityManager();
try {
System.out.println("If this is the last line on standard out the testExit f.a.i.l.e.d");
System.exit(3);
fail("Totaly impossible that this fail is ever executed. Please let me know if it is!");
} c... | public void testExit() {
perms.setSecurityManager();
try {
System.out.println("If this is the last line on standard out the testExit f.a.i.l.e.d");
System.exit(3);
fail("Totaly impossible that this fail is ever executed. Please let me know if it is!");
} c... |
public void test() throws ParseException
{
Assert.assertTrue(TimeOfDay.MIDNIGHT.getHour() == 0);
Assert.assertTrue(TimeOfDay.valueOf(TimeOfDay.MIDNIGHT.next()).equals(TimeOfDay.MIDNIGHT));
final TimeOfDay three = TimeOfDay.time(3, 0, TimeOfDay.PM);
final TimeOfDay five = TimeOfD... | public void test() throws ParseException
{
Assert.assertTrue(TimeOfDay.MIDNIGHT.hour() == 0);
Assert.assertTrue(TimeOfDay.valueOf(TimeOfDay.MIDNIGHT.next()).equals(TimeOfDay.MIDNIGHT));
final TimeOfDay three = TimeOfDay.time(3, 0, TimeOfDay.PM);
final TimeOfDay five = TimeOfDay.... |
package org.eclipse.ecf.remoteservice.client;
/*******************************************************************************
* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 whic... | package org.eclipse.ecf.remoteservice.client;
/*******************************************************************************
* Copyright (c) 2009 Composent, Inc. and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 whic... |
public void handleEvent(OleEvent event) {
switch (event.type) {
case BeforeNavigate2: {
Variant varResult = event.arguments[1];
String url = varResult.getString();
LocationEvent newEvent = new LocationEvent(Browser.this);
newEvent.display = getDisplay();
newEvent.widget = Browser.this;... | public void handleEvent(OleEvent event) {
switch (event.type) {
case BeforeNavigate2: {
Variant varResult = event.arguments[1];
String url = varResult.getString();
LocationEvent newEvent = new LocationEvent(Browser.this);
newEvent.display = getDisplay();
newEvent.widget = Browser.this;... |
public int getOffset (int x, int y, int[] trailing) {
checkLayout();
if (trailing != null && trailing.length < 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
computeRuns(null);
int line;
int lineCount = runs.length;
for (line=0; line<lineCount; line++) {
if (lineY[line + 1] > y) break;
}
line = Math.min(line, runs... | public int getOffset (int x, int y, int[] trailing) {
checkLayout();
if (trailing != null && trailing.length < 1) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
computeRuns(null);
int line;
int lineCount = runs.length;
for (line=0; line<lineCount; line++) {
if (lineY[line + 1] > y) break;
}
line = Math.min(line, runs... |
private void handle(Exception e) {
if (failonerror) {
throw (e instanceof BuildException)
? (BuildException) e : new BuildException(e);
}
log(e.getMessage(), quiet ? Project.MSG_VERBOSE : verbosity);
}
| private void handle(Exception e) {
if (failonerror) {
throw (e instanceof BuildException)
? (BuildException) e : new BuildException(e);
}
log(e, quiet ? Project.MSG_VERBOSE : verbosity);
}
|
Component createComponent(String id, DebugBar debugBar);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under th... | Component createComponent(String id, DebugBar debugBar);
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under th... |
public HelloWorld(final PageParameters parameters)
{
add(new Label("message", "Hello world!"));
}
| public HelloWorld(final PageParameters parameters)
{
add(new Label("hellomessage", "Hello world!"));
}
|
public void onClick()
{
getGame().newGame();
setResponsePage(new Guess());
}
});
}
| public void onClick()
{
getGame().newGame();
setResponsePage(Guess.class);
}
});
}
|
public UrlResourceStream(final URL url)
{
// Save URL
this.url = url;
URLConnection connection = null;
try
{
connection = url.openConnection();
contentLength = connection.getContentLength();
contentType = connection.getContentType();
lastModified = connection.getLastModified();
try
{
f... | public UrlResourceStream(final URL url)
{
// Save URL
this.url = url;
URLConnection connection = null;
try
{
connection = url.openConnection();
contentLength = connection.getContentLength();
contentType = connection.getContentType();
lastModified = connection.getLastModified();
try
{
f... |
public void setVisible (boolean visible) {
checkWidget();
setWindowVisible (visible, false);
}
void setWindowVisible (boolean visible, boolean key) {
if (window.isVisible() == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
if (key) {
window.makeKeyAndOrderFront (null);
... | public void setVisible (boolean visible) {
checkWidget();
setWindowVisible (visible, false);
}
void setWindowVisible (boolean visible, boolean key) {
if (window.isVisible() == visible) return;
if (visible) {
sendEvent (SWT.Show);
if (isDisposed ()) return;
if (key) {
window.makeKeyAndOrderFront (null);
... |
execution(* foo(*,*)) &&
aspect IfPointcut {
after(A a, B b) returning:
call(* foo(*,*)) &&
(args(b,a) || args(a,b)) {
System.out.println("Woven");
}
}
No newline at end of file | execution(* foo(*,*)) &&
aspect IfPointcut {
after(A a, B b) returning:
execution(* foo(*,*)) &&
(args(b,a) || args(a,b)) {
System.out.println("Woven");
}
}
No newline at end of file |
package org.eclipse.ecf.provider.comm;
/****************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ac... | package org.eclipse.ecf.provider.comm;
/****************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ac... |
package org.eclipse.ecf.provider.comm;
/****************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ac... | package org.eclipse.ecf.provider.comm;
/****************************************************************************
* Copyright (c) 2004 Composent, Inc. 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 ac... |
private boolean enforceDecpRule4_compatibleReturnTypes(BcelClassWeaver weaver, ResolvedMember superMethod, LazyMethodGen subMethod) {
boolean cont = true;
String superReturnTypeSig = superMethod.getReturnType().getSignature();
String subReturnTypeSig = subMethod.getReturnType().getSignat... | private boolean enforceDecpRule4_compatibleReturnTypes(BcelClassWeaver weaver, ResolvedMember superMethod, LazyMethodGen subMethod) {
boolean cont = true;
String superReturnTypeSig = superMethod.getReturnType().getSignature();
String subReturnTypeSig = subMethod.getReturnType().getSignat... |
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int border = getBorderWidth ();
int width = border * 2, height = border * 2;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAULT_WIDTH; height += 3;
} else {
width += 3; height += DEFAULT_HEIGHT;
}
if (wHint != SWT.DEFAULT) ... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget();
int border = getBorderWidth ();
int width = border * 2, height = border * 2;
if ((style & SWT.HORIZONTAL) != 0) {
width += DEFAULT_WIDTH; height += 3;
} else {
width += 3; height += DEFAULT_HEIGHT;
}
if (wHint != SWT.DEFAULT) ... |
private boolean addClasspathResource(String resource) {
/*
* pre Ant 1.6 this method used to call getClass().getResource
* while Ant 1.6 will call ClassLoader.getResource().
*
* The difference is that Class.getResource expects a leading
* slash for "absolute" res... | private boolean addClasspathResource(String resource) {
/*
* pre Ant 1.6 this method used to call getClass().getResource
* while Ant 1.6 will call ClassLoader.getResource().
*
* The difference is that Class.getResource expects a leading
* slash for "absolute" res... |
private void deleteAllAffectedFiles() {
for (Enumeration e = outOfDateClasses.elements(); e.hasMoreElements();) {
String className = (String)e.nextElement();
deleteAffectedFiles(className);
}
}
private void deleteAffectedFiles(String className) {
... | private void deleteAllAffectedFiles() {
for (Enumeration e = outOfDateClasses.elements(); e.hasMoreElements();) {
String className = (String)e.nextElement();
deleteAffectedFiles(className);
}
}
private void deleteAffectedFiles(String className) {
... |
protected PerformanceMeter createMeter(String id) {
Performance performance = Performance.getDefault();
String scenarioId = "org.eclipse.swt." + id;
PerformanceMeter meter = performance.createPerformanceMeter(scenarioId);
performance.tagAsSummary(meter, id, Dimension.CPU_TIME);
return meter;
}
| protected PerformanceMeter createMeter(String id) {
Performance performance = Performance.getDefault();
String scenarioId = "org.eclipse.swt " + id;
PerformanceMeter meter = performance.createPerformanceMeter(scenarioId);
performance.tagAsSummary(meter, id, Dimension.CPU_TIME);
return meter;
}
|
public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages();
}
return feedbackMessages;
}
| public final FeedbackMessages getFeedbackMessages()
{
if (feedbackMessages == null)
{
feedbackMessages = new FeedbackMessages(false);
}
return feedbackMessages;
}
|
public String[] dissect(String path) {
char sep = File.separatorChar;
path = path.replace('/', sep).replace('\\', sep);
// make sure we are dealing with an absolute path
if (!isAbsolutePath(path)) {
throw new BuildException(path + " is not an absolute path");
}
... | public String[] dissect(String path) {
char sep = File.separatorChar;
path = path.replace('/', sep).replace('\\', sep);
// make sure we are dealing with an absolute path
if (!isAbsolutePath(path)) {
throw new BuildException(path + " is not an absolute path");
}
... |
public final boolean isAuto()
{
// Search up hierarchy for FLAG_AUTO
for (Component current = this; current != null; current = current.getParent())
{
if (current.getFlag(FLAG_AUTO))
{
return true;
}
}
return false;
}
/**
*
* @return <code>true</code> if component has been prepared for r... | protected void onAfterRenderChildren()
{
}
|
public Reader chain(Reader rdr);
} | Reader chain(Reader rdr);
/*
* 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 met:
*
* 1. ... |
public static void main(String argv[]) {
// too fee parameters
if (argv.length < 2) {
printUsage();
System.exit(1);
}
// get DOM implementation
DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
... | public static void main(String argv[]) {
// too fee parameters
if (argv.length < 2) {
printUsage();
System.exit(1);
}
// get DOM implementation
DOMImplementationAS domImpl = (DOMImplementationAS)ASDOMImplementationImpl.getDOMImplementation();
... |
public void execute() throws BuildException {
if ("javadoc2".equals(getTaskType())) {
log("!! javadoc2 is deprecated. Use javadoc instead. !!");
}
Vector packagesToDoc = new Vector();
Path sourceDirs = new Path(getProject());
if (packageList != null && sourcePat... | public void execute() throws BuildException {
if ("javadoc2".equals(getTaskType())) {
log("!! javadoc2 is deprecated. Use javadoc instead. !!");
}
Vector packagesToDoc = new Vector();
Path sourceDirs = new Path(getProject());
if (packageList != null && sourcePat... |
public boolean eval() throws BuildException {
if (server == null) {
throw new BuildException("No server specified in socket "
+ "condition");
}
if (port == 0) {
throw new BuildException("No port specified in socket condition");
... | public boolean eval() throws BuildException {
if (server == null) {
throw new BuildException("No server specified in socket "
+ "condition");
}
if (port == 0) {
throw new BuildException("No port specified in socket condition");
... |
public PlanarImage executeTransformOperation(PlanarImage image)
{
BufferedImage bi = image.getAsBufferedImage();
Graphics2D graphics = (Graphics2D)bi.getGraphics();
for (int i=0; i<instructions.size(); i++)
{
ImageOperation instr = ((ImageOperation)instructions.eleme... | public PlanarImage executeTransformOperation(PlanarImage image)
{
BufferedImage bi = image.getAsBufferedImage();
Graphics2D graphics = (Graphics2D)bi.getGraphics();
for (int i=0; i<instructions.size(); i++)
{
ImageOperation instr = ((ImageOperation)instructions.eleme... |
public AncestorAnalyzer() {
// force BCEL classes to load now
try {
ClassParser parser = new ClassParser("force");
} catch (IOException e) {
// ignore
}
}
| public AncestorAnalyzer() {
// force BCEL classes to load now
try {
new ClassParser("force");
} catch (IOException e) {
// ignore
}
}
|
public FullAnalyzer() {
// force BCEL classes to load now
try {
ClassParser parser = new ClassParser("force");
} catch (IOException e) {
// ignore
}
}
| public FullAnalyzer() {
// force BCEL classes to load now
try {
new ClassParser("force");
} catch (IOException e) {
// ignore
}
}
|
Object[] args = new Object [] {refAttr, DOMUtil.getLocalName(child)};
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001, 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provide... | Object[] args = new Object [] {refAttr, DOMUtil.getLocalName(child)};
/*
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 2001, 2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provide... |
public void setRequestToComponent(final Component component)
{
parameters.put("component", component.getPath());
parameters.put("rendering", "" + component.getPage().getRendering());
Class c = null;
if (component instanceof IRedirectListener)
{
c = IRedirectLi... | public void setRequestToComponent(final Component component)
{
parameters.put("component", component.getPath());
parameters.put("version", "" + component.getPage().getVersion());
Class c = null;
if (component instanceof IRedirectListener)
{
c = IRedirectListen... |
private boolean validateDocument(String document, int expectedLinkClickCount) {
HtmlDocumentValidator validator = new HtmlDocumentValidator();
Tag html = new Tag("html");
Tag head = new Tag("head");
html.addExpectedChild(head);
Tag title = new Tag("title");
head.addEx... | private boolean validateDocument(String document, int expectedLinkClickCount) {
HtmlDocumentValidator validator = new HtmlDocumentValidator();
Tag html = new Tag("html");
Tag head = new Tag("head");
html.addExpectedChild(head);
Tag title = new Tag("title");
head.addEx... |
protected int Release() {
/* Workaround for javac 1.1.8 bug */
return super.Release();
}
int ResizeBorder(int prcBorder, int pUIWindow, int fFrameWindow) {
return COM.E_NOTIMPL;
}
int ShowContextMenu(int dwID, int ppt, int pcmdtReserved, int pdispReserved) {
Browser browser = (Browser)getParent().getParent();
Ev... | protected int Release() {
/* Workaround for javac 1.1.8 bug */
return super.Release();
}
int ResizeBorder(int prcBorder, int pUIWindow, int fFrameWindow) {
return COM.E_NOTIMPL;
}
int ShowContextMenu(int dwID, int ppt, int pcmdtReserved, int pdispReserved) {
Browser browser = (Browser)getParent().getParent();
Ev... |
protected void setUp() throws Exception {
super.setUp();
String xsd = getSrcDir() + "/FeatureMap.xsd";
String xml = getSrcDir() + "/FeatureMap.xml";
XSDMetaModel mm = new XSDMetaModel();
mm.setId("mm");
mm.addSchemaFile(xsd);
ExecutionContextImpl ctx = new ExecutionContextImpl();
ctx.registerMetaModel(... | protected void setUp() throws Exception {
super.setUp();
String xsd = getSrcDir() + "/FeatureMap.xsd";
String xml = getSrcDir() + "/FeatureMap.xml";
XSDMetaModel mm = new XSDMetaModel();
mm.setId("mm");
mm.addSchemaFile(xsd);
ExecutionContextImpl ctx = new ExecutionContextImpl();
ctx.registerMetaModel(... |
private boolean assignObjectId(boolean flush, boolean preFlushing) {
if (_oid != null || isEmbedded() || !isPersistent())
return true;
if (_broker.getStoreManager().assignObjectId(this, preFlushing)) {
if (!preFlushing)
assertObjectIdAssigned(true);
}... | public boolean assignObjectId(boolean flush) {
lock();
try {
return assignObjectId(flush, false);
} finally {
unlock();
}
}
/**
* Ask store manager to assign our oid, optionally flushing and
* optionally recaching on the new oid.
*/
... |
public static void main( String[] argv) {
if (argv.length == 0) {
printUsage();
System.exit(1);
}
try {
// get DOM Implementation using DOM Registry
System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMImplementat... | public static void main( String[] argv) {
if (argv.length == 0) {
printUsage();
System.exit(1);
}
try {
// get DOM Implementation using DOM Registry
System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMXSImplement... |
public static void main(String[] argv) {
if (argv.length == 0) {
printUsage();
System.exit(1);
}
try {
// get DOM Implementation using DOM Registry
System.setProperty(
DOMImplementationRegistry.PROPERTY,
"org.a... | public static void main(String[] argv) {
if (argv.length == 0) {
printUsage();
System.exit(1);
}
try {
// get DOM Implementation using DOM Registry
System.setProperty(
DOMImplementationRegistry.PROPERTY,
"org.a... |
public void handleEvent(OleEvent event) {
Variant url = event.arguments[1];
Variant postData = event.arguments[4];
if (postData != null) {
System.out.println("PostData = "+readSafeArray(postData)+", URL = "+url.getString());
}
}
});
// Navigate to this web site which uses post data to fill in th... | public void handleEvent(OleEvent event) {
Variant url = event.arguments[1];
Variant postData = event.arguments[4];
if (postData != null) {
System.out.println("PostData = "+readSafeArray(postData)+", URL = "+url.getString());
}
}
});
// Navigate to this web site which uses post data to fill in th... |
private void buildDFA(CMNode syntaxTree) {
//
// The first step we need to take is to rewrite the content model
// using our CMNode objects, and in the process get rid of any
// repetition short cuts, converting them into '*' style repetitions
// or getting rid of repetit... | private void buildDFA(CMNode syntaxTree) {
//
// The first step we need to take is to rewrite the content model
// using our CMNode objects, and in the process get rid of any
// repetition short cuts, converting them into '*' style repetitions
// or getting rid of repetit... |
private final static int DEFAULT_SLEEP_LENGTH = 100;
/**
* Creates this tab's controls. Subclasses must override.
*
* @param composite the parent composite
*/
abstract void createControls(Composite composite);
/**
* Creates the tab folder page.
*
* @param tabFolder the parent tab folder
* @return... | private final static int DEFAULT_SLEEP_LENGTH = 100;
/**
* Creates this tab's controls. Subclasses must override.
*
* @param composite the parent composite
*/
abstract void createControls(Composite composite);
/**
* Creates the tab folder page.
*
* @param tabFolder the parent tab folder
* @return... |
public synchronized void close() {
this.importedServiceReference = null;
this.endpointDescription = null;
}
| public synchronized org.osgi.service.remoteserviceadmin.EndpointDescription getImportedEndpoint() {
return endpointDescription;
}
synchronized void close() {
this.importedServiceReference = null;
this.endpointDescription = null;
}
|
private static final long CONNECT_TIMEOUT = new Long(System.getProperty(
"org.eclipse.ecf.provider.irc.connectTimeout", "30000"))
.longValue();
| private static final long CONNECT_TIMEOUT = new Long(System.getProperty(
"org.eclipse.ecf.provider.irc.connectTimeout", "60000"))
.longValue();
|
public void startElement( String namespaceURI, String localName,
String rawName, Attributes attrs )
{
int i;
boolean preserveSpace;
ElementState state;
String name;
String value;
String htmlName;
... | public void startElement( String namespaceURI, String localName,
String rawName, Attributes attrs )
{
int i;
boolean preserveSpace;
ElementState state;
String name;
String value;
String htmlName;
... |
public void startElement( String namespaceURI, String localName,
String rawName, Attributes attrs )
{
int i;
boolean preserveSpace;
ElementState state;
String name;
String value;
boolean addNSAttr = fals... | public void startElement( String namespaceURI, String localName,
String rawName, Attributes attrs )
{
int i;
boolean preserveSpace;
ElementState state;
String name;
String value;
boolean addNSAttr = fals... |
protected FieldStrategy defaultTypeStrategy(FieldMapping field,
boolean installHandlers, boolean adapting) {
switch (field.getTypeCode()) {
case JavaTypes.BOOLEAN:
case JavaTypes.BYTE:
case JavaTypes.CHAR:
case JavaTypes.DOUBLE:
case JavaTy... | protected FieldStrategy defaultTypeStrategy(FieldMapping field,
boolean installHandlers, boolean adapting) {
switch (field.getTypeCode()) {
case JavaTypes.BOOLEAN:
case JavaTypes.BYTE:
case JavaTypes.CHAR:
case JavaTypes.DOUBLE:
case JavaTy... |
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) {
handleChange((SupplicantState) intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE),
intent.hasExtra(WifiManager.EXTRA_SUPPLICANT_ERROR),
intent.getIntE... | public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION)) {
handleChange((SupplicantState) intent.getParcelableExtra(WifiManager.EXTRA_NEW_STATE),
intent.hasExtra(WifiManager.EXTRA_SUPPLICANT_ERROR),
intent.getIntE... |
private static final String IMPLEMENTATION;
static final String COPYRIGHT = "Copyright (c) 1998-2011 The Apache Software Foundation";
| private static final String IMPLEMENTATION;
static final String COPYRIGHT = "Copyright (c) 1998-2012 The Apache Software Foundation";
|
private static boolean isEnhanced(byte[] b) {
ConstantPoolTable table = new ConstantPoolTable(b);
int idx = table.getEndIndex();
idx += 6; // skip access, cls, super
int ifaces = table.readUnsignedShort(idx);
int clsEntry, utfEntry;
String name;
for (int i = ... | private static boolean isEnhanced(byte[] b) {
ConstantPoolTable table = new ConstantPoolTable(b);
int idx = table.getEndIndex();
idx += 6; // skip access, cls, super
int ifaces = table.readUnsignedShort(idx);
int clsEntry, utfEntry;
String name;
for (int i = ... |
package org.apache.myrmidon.interfaces.type;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.m... | package org.apache.myrmidon.interfaces.type;
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE file.
*/
package org.apache.m... |
protected String getReferencesParameter() {
//bail on no references
if (notEmpty(references)) {
if (isWindows) {
return REFERENCE_OPTION + '\"' + references + '\"';
} else {
return references;
}
} else {
return n... | protected String getReferencesParameter() {
//bail on no references
if (notEmpty(references)) {
if (isWindows) {
return REFERENCE_OPTION + '\"' + references + '\"';
} else {
return REFERENCE_OPTION + references;
}
} else {
... |
public void modifyTestElement(TestElement tc) {
configureTestElement(tc);
((ThroughputController) tc).setStyle(style);
((ThroughputController) tc).setPerThread(isPerThread);
if (style == ThroughputController.BYNUMBER) {
try {
((ThroughputController) tc).se... | public void modifyTestElement(TestElement tc) {
configureTestElement(tc);
((ThroughputController) tc).setStyle(style);
((ThroughputController) tc).setPerThread(isPerThread);
if (style == ThroughputController.BYNUMBER) {
try {
((ThroughputController) tc).se... |
public StandardParserConfiguration(SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
super(symbolTable, parentSettings);
// add default recognized features
final String[] r... | public StandardParserConfiguration(SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
super(symbolTable, parentSettings);
// add default recognized features
final String[] r... |
private void initializeProxyServiceFactoryBundle() throws Exception {
// First, find proxy bundle
for (Bundle b : context.getBundles()) {
if (b.getSymbolicName().equals(RSA_PROXY_BUNDLE_SYMBOLIC_ID)) {
// first start it
b.start();
// then get its bundle context
proxyServiceFactoryBundleContext =... | private void initializeProxyServiceFactoryBundle() throws Exception {
// First, find proxy bundle
for (Bundle b : context.getBundles()) {
if (RSA_PROXY_BUNDLE_SYMBOLIC_ID.equals(b.getSymbolicName())) {
// first start it
b.start();
// then get its bundle context
proxyServiceFactoryBundleContext =... |
public Object accept(PointcutVisitor visitor, Object data) {
return visitor.visit(this, data);
}
} | public Object accept(PatternNodeVisitor visitor, Object data) {
return visitor.visit(this, data);
}
} |
public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
if ( this.fElementDeclTab.containsKey( (String) elementName) ) {
... | public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
if ( this.fElementDeclTab.containsKey( (String) elementName) ) {
... |
public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
if (type != fCDATASymbol) {
normalizeDefaultAttrValue(defaul... | public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
if (type != fCDATASymbol && defaultValue != null) {
normaliz... |
public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
try {
// SAX2 extension
if (fDeclHandler != nu... | public void attributeDecl(String elementName, String attributeName,
String type, String[] enumeration,
String defaultType, XMLString defaultValue)
throws XNIException {
try {
// SAX2 extension
if (fDeclHandler != nu... |
public void setImage(final BufferedImage image)
{
imageData = toImageData(image);
lastModifiedTime = Time.now();
}
| public void setImage(final BufferedImage image)
{
imageData = toImageData(image);
setLastModifiedTime(Time.now());
}
|
private void newImage(final String value)
{
// Parse value
final ImageValueParser valueParser = new ImageValueParser(value);
// Does value match parser?
if (valueParser.matches())
{
final String imageReferenceName = valueParser.getImageReferenceName();
final String specification = Strings.replaceHtml... | private void newImage(final String value)
{
// Parse value
final ImageValueParser valueParser = new ImageValueParser(value);
// Does value match parser?
if (valueParser.matches())
{
final String imageReferenceName = valueParser.getImageReferenceName();
final String specification = Strings.replaceHtml... |
protected byte[] getImageData()
{
// Prevent image data from getting flushed while we access it
byte[] data;
synchronized (this)
{
if (imageData!=null)
data = (byte[]) imageData.get();
else
data = null;
}
if (data == null)
{
data = render();
synchronized (this)
{
imageData = n... | protected byte[] getImageData()
{
// Prevent image data from getting flushed while we access it
byte[] data;
synchronized (this)
{
if (imageData!=null)
data = (byte[]) imageData.get();
else
data = null;
}
if (data == null)
{
data = render();
synchronized (this)
{
imageData = n... |
public static final String REVISION_NUMBER;
static {
Package pack = OpenJPAVersion.class.getPackage();
String vers = pack == null ? null : pack.getImplementationVersion();
if (vers == null || vers.length() == 0)
vers = "0.0.0";
VERSION_NUMBER = vers;
String... | public static final String REVISION_NUMBER;
static {
Package pack = OpenJPAVersion.class.getPackage();
String vers = pack == null ? null : pack.getImplementationVersion();
if (vers == null || vers.length() == 0)
vers = "0.0.0";
VERSION_NUMBER = vers;
String... |
public String toString () {
return "line " + _lineNumber + "@" + _callableName + " [" + _compilationUnit + "]";
}
| public String toString () {
return _callableName + "@" + _lineNumber + " [" + _compilationUnit + "]";
}
|
public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets) {
fileEncoding = OldXtendHelper.normalizedFileEncoding (fileEncoding);
final BackendTypesystem ts = OldXtendHelper.guessTypesystem (mms);
... | public static Object executeStatement (String code, String fileEncoding, Collection<MetaModel> mms, Map<String, Object> variables, Collection <Outlet> outlets) {
fileEncoding = OldXtendHelper.normalizedFileEncoding (fileEncoding);
final BackendTypesystem ts = OldXtendHelper.guessTypesystem (mms);
... |
protected void registerResource( final String name,
final String classname,
final URL url )
throws AntException, RegistryException
{
if( null == classname )
{
try { m_engine.getTskDeployer().deployTa... | protected void registerResource( final String name,
final String classname,
final URL url )
throws AntException, RegistryException
{
if( null == classname )
{
try { m_engine.getTskDeployer().deployTa... |
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 FileObject[] listFiles( final TaskContext context )
throws TaskException
{
FileSystemManager fileSystemManager = (FileSystemManager)context.getService( FileSystemManager.class );
// TODO - move parsing to the VFS
final String[] elements = FileUtils.parsePath( m_path );
... | public FileObject[] listFiles( final TaskContext context )
throws TaskException
{
FileSystemManager fileSystemManager = (FileSystemManager)context.getService( FileSystemManager.class );
// TODO - move parsing to the VFS
final String[] elements = FileUtils.parsePath( m_path );
... |
public void sendMail(String from, List<String> vEmails, String subject, String attText, String smtpHost)
throws AddressException, MessagingException {
String host = smtpHost;
boolean debug = Boolean.valueOf(host).booleanValue();
// InetAddress remote = InetAddress.getByName(host)... | public void sendMail(String from, List<String> vEmails, String subject, String attText, String smtpHost)
throws AddressException, MessagingException {
String host = smtpHost;
boolean debug = Boolean.valueOf(host).booleanValue();
// InetAddress remote = InetAddress.getByName(host)... |
public void deselectAll () {
checkWidget ();
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.deselectAll(null);
ignoreSelect = false;
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<... | public void deselectAll () {
checkWidget ();
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.deselectAll(null);
ignoreSelect = false;
}
void destroyItem (TableColumn column) {
int index = 0;
while (index < columnCount) {
if (columns [index] == column) break;
index++;
}
for (int i=0; i<... |
public void handleEvent(IContainerEvent evt) {
if (evt instanceof IContainerDisconnectedEvent) {
IContainerDisconnectedEvent cd = (IContainerDisconnectedEvent) evt;
final ID departedContainerID = cd.getTargetID();
ID connectedID = newClientEntry.getConnectedID();
if (connectedID == null
... | public void handleEvent(IContainerEvent evt) {
if (evt instanceof IContainerDisconnectedEvent) {
IContainerDisconnectedEvent cd = (IContainerDisconnectedEvent) evt;
final ID departedContainerID = cd.getTargetID();
ID connectedID = newClientEntry.getConnectedID();
if (connectedID == null
... |
protected void processDisconnect(DisconnectEvent e) {
debug("processDisconnect[" + Thread.currentThread().getName() + "]");
try {
// Get connection responsible for disconnect event
IAsynchConnection conn = (IAsynchConnection) e.getConnection();
ID fromID = null;
synchronized (getGroupMembershipLock... | protected void processDisconnect(DisconnectEvent e) {
debug("processDisconnect[" + Thread.currentThread().getName() + "]");
try {
// Get connection responsible for disconnect event
IAsynchConnection conn = (IAsynchConnection) e.getConnection();
ID fromID = null;
synchronized (getGroupMembershipLock... |
static final int S_initWithProc = WebKit.sel_registerName("initWithProc:user_data:"); //$NON-NLS-1$
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made av... | static final int S_initWithProc = WebKit.sel_registerName("initWithProc:user_data:"); //$NON-NLS-1$
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made av... |
public SampleResult sample() {
SampleResult result = new SampleResult();
result.setSampleLabel(getName());
if (this.PUB == null) {
this.initClient();
}
int loop = this.getIterationCount();
if (this.PUB != null) {
result.sampleStart();
for (int idx = 0; idx < loop; idx++) {
String tmsg = this.g... | public SampleResult sample() {
SampleResult result = new SampleResult();
result.setSampleLabel(getName());
if (this.PUB == null) {
this.initClient();
}
int loop = this.getIterationCount();
if (this.PUB != null) {
result.sampleStart();
for (int idx = 0; idx < loop; idx++) {
String tmsg = this.g... |
public String getSecondaryTableName(String tableName) {
// if no secondary table joins, bad table name, exact match,
// or an already-qualified table name, nothing to do
if (_seconds == null || tableName == null
|| _seconds.containsKey(tableName)
|| tableName.indexOf(... | public String getSecondaryTableName(String tableName) {
// if no secondary table joins, bad table name, exact match,
// or an already-qualified table name, nothing to do
if (_seconds == null || tableName == null
|| _seconds.containsKey(tableName)
|| tableName.indexOf(... |
public void setItemCount (int count) {
checkWidget ();
checkItems (true);
count = Math.max (0, count);
if (count == itemCount) return;
setRedraw (false);
int[] top = new int [1], left = new int [1];
OS.GetDataBrowserScrollPosition (handle, top, left);
DataBrowserCallbacks callbacks = new DataBrowserCal... | public void setItemCount (int count) {
checkWidget ();
checkItems (true);
count = Math.max (0, count);
if (count == itemCount) return;
setRedraw (false);
int[] top = new int [1], left = new int [1];
OS.GetDataBrowserScrollPosition (handle, top, left);
DataBrowserCallbacks callbacks = new DataBrowserCal... |
public void testIterationStart(LoopIterationEvent event) {
hc.testIterationStart(event);
}
| public void testIterationStart(LoopIterationEvent event) {
hc.notifyFirstSampleAfterLoopRestart();
}
|
private Markup loadMarkup(final Application application, final String key,
final Resource markupResource) throws ParseException, IOException,
ResourceNotFoundException
{
final Markup markup = application.getMarkupParser().read(markupResource, getPage());
markupCache.put(key, markup);
return markup;
}
| private Markup loadMarkup(final Application application, final String key,
final Resource markupResource) throws ParseException, IOException,
ResourceNotFoundException
{
final Markup markup = application.getMarkupParser().read(markupResource);
markupCache.put(key, markup);
return markup;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.