buggy_function stringlengths 1 391k | fixed_function stringlengths 0 392k |
|---|---|
protected Commandline setupGCJCommand()
throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path();
// gcj doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspat... | protected Commandline setupGCJCommand()
throws TaskException
{
Commandline cmd = new Commandline();
Path classpath = new Path();
// gcj doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspat... |
public boolean execute()
throws TaskException
{
getLogger().debug( "Using jikes compiler" );
Path classpath = new Path();
// Jikes doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspath !=... | public boolean execute()
throws TaskException
{
getLogger().debug( "Using jikes compiler" );
Path classpath = new Path();
// Jikes doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspath !=... |
public boolean execute()
throws TaskException
{
getLogger().debug( "Using jvc compiler" );
Path classpath = new Path();
// jvc doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspath != nul... | public boolean execute()
throws TaskException
{
getLogger().debug( "Using jvc compiler" );
Path classpath = new Path();
// jvc doesn't support bootclasspath dir (-bootclasspath)
// so we'll emulate it for compatibility and convenience.
if( m_bootclasspath != nul... |
protected Commandline setupKjcCommand()
throws TaskException
{
Commandline cmd = new Commandline();
// generate classpath, because kjc does't support sourcepath.
Path classpath = getCompileClasspath();
if( m_deprecation == true )
{
cmd.createArgument... | protected Commandline setupKjcCommand()
throws TaskException
{
Commandline cmd = new Commandline();
// generate classpath, because kjc does't support sourcepath.
Path classpath = getCompileClasspath();
if( m_deprecation == true )
{
cmd.createArgument... |
public void addConfiguredRoot(ClassRoot root) {
rootClasses.add(root.getClassname());
}
| public void addConfiguredRoot(ClassRoot root) {
rootClasses.addElement(root.getClassname());
}
|
public MockRequestParameters getPostRequestParameters()
{
return postRequestParameters;
}
} | public MockRequestParameters getPostParameters()
{
return postRequestParameters;
}
} |
public String renderUrlFor(IRequestHandler handler)
{
Url url = urlFor(handler);
if (url != null)
{
return getUrlRenderer().renderUrl(url);
}
| public String renderUrlFor(IRequestHandler handler)
{
Url url = urlFor(handler);
if (url != null)
{
return getResponse().encodeURL(getUrlRenderer().renderUrl(url));
}
|
public void testAjaxButtonWhenCancelButtonHasAModelValue()
{
// start and render the test page
tester.startPage(HomePage.class);
// assert rendered page class
tester.assertRenderedPage(HomePage.class);
// assert rendered label component
tester.assertLabel("message",
"If you see this message wicket is p... | public void testAjaxButtonWhenCancelButtonHasAModelValue()
{
// start and render the test page
tester.startPage(HomePage.class);
// assert rendered page class
tester.assertRenderedPage(HomePage.class);
// assert rendered label component
tester.assertLabel("message",
"If you see this message wicket is p... |
public void test3() throws Exception
{
executeTest(BoxBorderTestPage_3.class, "BoxBorderTestPage_ExpectedResult_3.html");
Border border = (Border)tester.getLastRenderedPage().get("border");
assertNotNull(border);
Form<?> form = (Form<?>)tester.getLastRenderedPage().get("border:myForm");
TextField<String> ... | public void test3() throws Exception
{
executeTest(BoxBorderTestPage_3.class, "BoxBorderTestPage_ExpectedResult_3.html");
Border border = (Border)tester.getLastRenderedPage().get("border");
assertNotNull(border);
Form<?> form = (Form<?>)tester.getLastRenderedPage().get("border:myForm");
TextField<String> ... |
public void testWithBorder2()
{
TextField textfield = (TextField)tester.getLastRenderedPage().get(
"border:form2:border_body:textfield1");
tester.getRequest().getPostRequestParameters().setParameterValue(textfield.getInputName(),
"abcde");
tester.executeAjaxEvent("border:form2:submit", "onclick");
teste... | public void testWithBorder2()
{
TextField textfield = (TextField)tester.getLastRenderedPage().get(
"border:form2:border_body:textfield1");
tester.getRequest().getPostParameters().setParameterValue(textfield.getInputName(),
"abcde");
tester.executeAjaxEvent("border:form2:submit", "onclick");
tester.asser... |
public void testExecuteAjaxEvent_ajaxFormSubmitLink()
{
tester.startPage(MockPageWithFormAndAjaxFormSubmitBehavior.class);
// Get the page
MockPageWithFormAndAjaxFormSubmitBehavior page = (MockPageWithFormAndAjaxFormSubmitBehavior)tester.getLastRenderedPage();
Pojo pojo = page.getPojo();
assertEquals("Mo... | public void testExecuteAjaxEvent_ajaxFormSubmitLink()
{
tester.startPage(MockPageWithFormAndAjaxFormSubmitBehavior.class);
// Get the page
MockPageWithFormAndAjaxFormSubmitBehavior page = (MockPageWithFormAndAjaxFormSubmitBehavior)tester.getLastRenderedPage();
Pojo pojo = page.getPojo();
assertEquals("Mo... |
public ISynchAsynchConnection makeInstance(ISynchAsynchConnectionEventHandler handler, Class[] clazzes,
Object[] args) throws ConnectionInstantiationException {
try {
Integer ka = new Integer(0);
if (args.length > 0) {
ka = (Integer... | public ISynchAsynchConnection makeInstance(ISynchAsynchConnectionEventHandler handler, Class[] clazzes,
Object[] args) throws ConnectionInstantiationException {
try {
Integer ka = new Integer(0);
if (args != null && args.length > 0) {
... |
protected void doReplace(File f, int options)
throws IOException {
File parentDir = fileUtils.getParentFile(f);
File temp = fileUtils.createTempFile("replace", ".txt", parentDir);
FileReader r = null;
FileWriter w = null;
try {
r = new FileReader(f);
... | protected void doReplace(File f, int options)
throws IOException {
File parentDir = fileUtils.getParentFile(f);
File temp = fileUtils.createTempFile("replace", ".txt", parentDir);
FileReader r = null;
FileWriter w = null;
try {
r = new FileReader(f);
... |
private DatatypeValidator traverseSimpleTypeDecl(Element simpleTypeDecl, Object[] attrValues,
XSDocumentInfo schemaDoc, boolean isGlobal) {
String nameProperty = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
String qualifiedName = nameProp... | private DatatypeValidator traverseSimpleTypeDecl(Element simpleTypeDecl, Object[] attrValues,
XSDocumentInfo schemaDoc, boolean isGlobal) {
String nameProperty = (String)attrValues[XSAttributeChecker.ATTIDX_NAME];
String qualifiedName = nameProp... |
public void create (Composite parent, int style) {
delegate = new MozillaDelegate (browser);
final Display display = parent.getDisplay ();
int /*long*/[] result = new int /*long*/[1];
if (!Initialized) {
boolean initLoaded = false;
boolean IsXULRunner = false;
String greInitialized = System.getProperty (GRE... | public void create (Composite parent, int style) {
delegate = new MozillaDelegate (browser);
final Display display = parent.getDisplay ();
int /*long*/[] result = new int /*long*/[1];
if (!Initialized) {
boolean initLoaded = false;
boolean IsXULRunner = false;
String greInitialized = System.getProperty (GRE... |
public Member getMemberByProperty(ClassMetaData meta, String property,
int access, boolean applyDefaultRule) {
Class<?> cls = meta.getDescribedType();
Field field = Reflection.findField(cls, property, false);;
Method getter = Reflection.findGetter(cls, property, false);
Method set... | public Member getMemberByProperty(ClassMetaData meta, String property,
int access, boolean applyDefaultRule) {
Class<?> cls = meta.getDescribedType();
Field field = Reflection.findField(cls, property, false);;
Method getter = Reflection.findGetter(cls, property, false);
Method set... |
public String getAsText() {
return textField.getPassword().toString();
}
| public String getAsText() {
return new String(textField.getPassword());
}
|
public void testResponsePageClass() throws Exception
{
tester.startPage(SimpleResponsePageClass.class);
SimpleResponsePageClass manageBook = (SimpleResponsePageClass)tester.getLastRenderedPage();
Form form = (Form)manageBook.get("form");
tester.submitForm(form);
// assertion failed, getLastRenderedPage()... | public void testResponsePageClass() throws Exception
{
tester.startPage(SimpleResponsePageClass.class);
SimpleResponsePageClass manageBook = (SimpleResponsePageClass)tester.getLastRenderedPage();
Form<?> form = (Form<?>)manageBook.get("form");
tester.submitForm(form);
// assertion failed, getLastRendered... |
public void testHideableBorder() throws Exception
{
executeTest(HideableBorderPage.class, "HideableBorderPage_ExpectedResult.html");
Page page = tester.getLastRenderedPage();
Border border = (Border)page.get("hideable");
assertNotNull(border);
AjaxLink link = (AjaxLink)border.get("hideLink");
assertNotNu... | public void testHideableBorder() throws Exception
{
executeTest(HideableBorderPage.class, "HideableBorderPage_ExpectedResult.html");
Page page = tester.getLastRenderedPage();
Border border = (Border)page.get("hideable");
assertNotNull(border);
AjaxLink<?> link = (AjaxLink<?>)border.get("hideLink");
asser... |
private void ajaxRepaintOnlyToggleableComponentsContainer(AjaxRequestTarget target)
{
target.addComponent(toggleable);
}
| private void ajaxRepaintOnlyToggleableComponentsContainer(AjaxRequestTarget target)
{
target.add(toggleable);
}
|
public void testInternalErrorPage()
{
tester.startPage(TestErrorPage.class);
tester.setExposeExceptions(false);
AjaxLink link = (AjaxLink)tester.getComponentFromLastRenderedPage("link");
tester.executeAjaxEvent(link, "onclick");
assertEquals(500, tester.getLastResponse().getStatus());
}
| public void testInternalErrorPage()
{
tester.startPage(TestErrorPage.class);
tester.setExposeExceptions(false);
AjaxLink<?> link = (AjaxLink<?>)tester.getComponentFromLastRenderedPage("link");
tester.executeAjaxEvent(link, "onclick");
assertEquals(500, tester.getLastResponse().getStatus());
}
|
public MockResourceLinkPage()
{
add(new ResourceLink("link", new PackageResourceReference(MockResourceLinkPage.class,
"test.html")));
}
| public MockResourceLinkPage()
{
add(new ResourceLink<Void>("link", new PackageResourceReference(MockResourceLinkPage.class,
"test.html")));
}
|
public ScrollBar getVerticalBar () {
checkWidget ();
return verticalBar;
}
void releaseWidget () {
if (horizontalBar != null) horizontalBar.releaseResources ();
if (verticalBar != null) verticalBar.releaseResources ();
horizontalBar = verticalBar = null;
super.releaseWidget ();
}
int widgetExtStyle () {
return... | public ScrollBar getVerticalBar () {
checkWidget ();
return verticalBar;
}
void releaseWidget () {
if (horizontalBar != null) horizontalBar.releaseResources ();
if (verticalBar != null) verticalBar.releaseResources ();
horizontalBar = verticalBar = null;
super.releaseWidget ();
}
int widgetExtStyle () {
return... |
public void beforeWriteAndClose(final FileHandle info) {
log.error("Use the XmlBeautifier from XSD Feature: org.eclipse.xtend.typesystem.xsd.XmlBeautifier instead.");
}
| public void beforeWriteAndClose(final FileHandle info) {
log.error("Use the XmlBeautifier from XSD Feature: org.eclipse.xtend.typesystem.xsd.XMLBeautifier instead.");
}
|
public void scanQName(char fastcheck, QName qname) throws Exception {
// REVISIT: possible bugs with surrogate characters -el
int nameOffset = fCurrentOffset;
int ch;
int prefixend=-1;
int offset=fCurrentOffset;
ch = getChar(fCurrentOffset);
if (ch < 0x80) {... | public void scanQName(char fastcheck, QName qname) throws Exception {
// REVISIT: possible bugs with surrogate characters -el
int nameOffset = fCurrentOffset;
int ch;
int prefixend=-1;
int offset=fCurrentOffset;
ch = getChar(fCurrentOffset);
if (ch < 0x80) {... |
public String encodedata(final String value) {
final int len = value.length();
StringBuffer sb = new StringBuffer(len);
for (int i = 0; i < len; ++i) {
final char c = value.charAt(i);
if (isLegalCharacter(c)) {
sb.append(c);
}
}
... | public String encodedata(final String value) {
final int len = value.length();
StringBuffer sb = new StringBuffer(len);
for (int i = 0; i < len; ++i) {
final char c = value.charAt(i);
if (isLegalCharacter(c)) {
sb.append(c);
}
}
... |
private void notifyTestListenersOfEnd(SearchByClass testListeners) {
log.info("Notifying test listeners of end of test", new Throwable());
Iterator iter = testListeners.getSearchResults().iterator();
while (iter.hasNext()) {
TestListener tl = (TestListener) iter.next();
... | private void notifyTestListenersOfEnd(SearchByClass testListeners) {
log.info("Notifying test listeners of end of test");
Iterator iter = testListeners.getSearchResults().iterator();
while (iter.hasNext()) {
TestListener tl = (TestListener) iter.next();
try {
... |
private void signOneJar(File jarSource, File jarTarget)
throws BuildException {
File targetFile = jarTarget;
if (targetFile == null) {
targetFile = jarSource;
}
if (isUpToDate(jarSource, targetFile)) {
return;
}
long lastModified... | private void signOneJar(File jarSource, File jarTarget)
throws BuildException {
File targetFile = jarTarget;
if (targetFile == null) {
targetFile = jarSource;
}
if (isUpToDate(jarSource, targetFile)) {
return;
}
long lastModified... |
public void load(final FormComponent component)
{
final Cookie cookie = getCookie(component);
if (cookie != null)
{
final String value = cookie.getValue();
if (value != null)
{
// Assign the retrieved/persisted value to the component
component.setModelValue(value);
}
}
}
| public void load(final FormComponent component)
{
final Cookie cookie = getCookie(component);
if (cookie != null)
{
final String value = cookie.getValue();
if (value != null)
{
// Assign the retrieved/persisted value to the component
component.setModelValue(value.split(";"));
}
}
}
|
public void execute() throws BuildException {
ScriptRunner runner = new ScriptRunner();
if (language != null) {
runner.setLanguage(language);
}
if (src != null) {
runner.setSrc(src);
}
if (text != null) {
runner.addText(text);
... | public void execute() throws BuildException {
ScriptRunner runner = new ScriptRunner();
if (language != null) {
runner.setLanguage(language);
}
if (src != null) {
runner.setSrc(src);
}
if (text != null) {
runner.addText(text);
... |
public void executeScript(Map attributes, Map elements) {
runner.addBean("attributes", attributes);
runner.addBean("elements", elements);
runner.addBean("project", getProject());
runner.executeScript("scriptdef <" + name + ">");
}
| public void executeScript(Map attributes, Map elements) {
runner.addBean("attributes", attributes);
runner.addBean("elements", elements);
runner.addBean("project", getProject());
runner.executeScript("scriptdef_" + name);
}
|
public String getLabelResource() {
return "throughput_control_title";
}
| public String getLabelResource() {
return "throughput_control_title"; // $NON-NLS-1$
}
|
public String toString() {
return JMeterUtils.getResString("constant_throughput_timer_memo");
}
| public String toString() {
return JMeterUtils.getResString("constant_throughput_timer_memo"); //$NON-NLS-1$
}
|
public String getLabelResource() {
return "constant_timer_title";
}
| public String getLabelResource() {
return "constant_timer_title"; // $NON-NLS-1$
}
|
public String getLabelResource() {
return "summariser_title";
}
| public String getLabelResource() {
return "summariser_title"; //$NON-NLS-1$
}
|
public String getClassLabel() {
return JMeterUtils.getResString("httpmirror_title");
}
| public String getClassLabel() {
return JMeterUtils.getResString("httpmirror_title"); //$NON-NLS-1$
}
|
public String getStaticLabel() {
return JMeterUtils.getResString("web_testing2_title");
}
| public String getStaticLabel() {
return JMeterUtils.getResString("web_testing2_title"); //$NON-NLS-1$
}
|
public IndicatingAjaxButton(String id)
{
super(id);
}
| public IndicatingAjaxButton(String id)
{
this(id, null);
}
|
protected MarkupElement onComponentTag(ComponentTag tag) throws ParseException
{
if (tag == null || tag.isClose() || tag instanceof WicketTag)
{
return tag;
}
String related = tag.getAttribute(AutoLabelResolver.WICKET_FOR);
if (related == null)
{
return tag;
}
related = related.trim();
if (r... | protected MarkupElement onComponentTag(final ComponentTag tag) throws ParseException
{
if (tag == null || tag.isClose() || tag instanceof WicketTag)
{
return tag;
}
String related = tag.getAttribute(AutoLabelResolver.WICKET_FOR);
if (related == null)
{
return tag;
}
related = related.trim();
... |
private void initialize() {
invisibleRoot = new TreeParent(null,"",null);
root = new TreeParent(null,"Discovered Service Types",null);
invisibleRoot.addChild(root);
}
void replaceOrAdd(TreeParent top, TreeParent newEntry) {
TreeObject [] childs = top.getChildren();
for(int i=0; i < childs.length; i... | private void initialize() {
invisibleRoot = new TreeParent(null,"",null);
root = new TreeParent(null,"Services",null);
invisibleRoot.addChild(root);
}
void replaceOrAdd(TreeParent top, TreeParent newEntry) {
TreeObject [] childs = top.getChildren();
for(int i=0; i < childs.length; i++) {
if (ch... |
public final void setEnabled(final boolean enabled)
{
this.enabled = enabled;
}
/**
* Detach the model if it was a IDetachableModel
* Internal method. shouldn't be called from the outside
*/
final void detachModel()
{
if (replaceModel instanceof IDetachableModel)
{
((IDetachableModel)replaceModel... | public final void setEnabled(final boolean enabled)
{
this.enabled = enabled;
}
/**
* Detach the model if it was a IDetachableModel
* Internal method. shouldn't be called from the outside
*/
final void detachModel()
{
if (replaceModel instanceof IDetachableModel)
{
((IDetachableModel)replaceModel... |
public wicket.resource.IPropertiesFactory getPropertiesFactory()
{
if (propertiesFactory == null)
{
propertiesFactory = new PropertiesFactory();
}
return propertiesFactory;
}
| public wicket.resource.IPropertiesFactory getPropertiesFactory()
{
if (propertiesFactory == null)
{
propertiesFactory = new PropertiesFactory(this.application);
}
return propertiesFactory;
}
|
public Class getHomePage()
{
return HomePage.class;
}
} | public Class<HomePage> getHomePage()
{
return HomePage.class;
}
} |
public boolean accept(File dir, String name) {
if (name.endsWith(".java")) {
foundJavaFile = true;
return false;
}
File d = new File(dir, name);
if (d.isDirectory()) {
return true;
}
return false;
}
});
if (foundJav... | public boolean accept(File dir, String name) {
if (name.endsWith(".java")) {
foundJavaFile = true;
return false;
}
File d = new File(dir, name);
if (d.isDirectory()) {
return true;
}
return false;
}
});
if (foundJav... |
public void setText (String string) {
checkWidget ();
setText (0, string);
}
void updateBackground (int index) {
int panel = findPart (index, Table.STACKPANEL_PART_NAME);
if (panel != 0) {
if (cellBackground != null && cellBackground [index] != null) {
int brush = OS.gcnew_SolidColorBrush (cellBackground [ind... | public void setText (String string) {
checkWidget ();
setText (0, string);
}
void updateBackground (int index) {
int panel = findPart (index, Table.DOCKPANEL_PART_NAME);
if (panel != 0) {
if (cellBackground != null && cellBackground [index] != null) {
int brush = OS.gcnew_SolidColorBrush (cellBackground [inde... |
public static int getShareModeAsInt(String mode) {
if (mode.length() == 0){
return SHARE_ALL; // default (e.g. if test plan does not have definition)
}
for (int i = 0; i < SHARE_TAGS.length; i++) {
if (SHARE_TAGS[i].equals(mode)) {
return i;
... | public static int getShareModeAsInt(String mode) {
if (mode == null || mode.length() == 0){
return SHARE_ALL; // default (e.g. if test plan does not have definition)
}
for (int i = 0; i < SHARE_TAGS.length; i++) {
if (SHARE_TAGS[i].equals(mode)) {
ret... |
public boolean isFilesystemOnly() {
return getResource().isFilesystemOnly();
}
| public boolean isFilesystemOnly() {
return false;
}
|
public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim(x, y, width, height);
NSRect rect = new NSRect ();
rect.x = trim.x;
rect.y = trim.y;
rect.width = trim.width;
rect.height = trim.height;
if (window != null) {
if (!fixResize()) {
rect = wi... | public Rectangle computeTrim (int x, int y, int width, int height) {
checkWidget();
Rectangle trim = super.computeTrim(x, y, width, height);
NSRect rect = new NSRect ();
rect.x = trim.x;
rect.y = trim.y;
rect.width = trim.width;
rect.height = trim.height;
if (window != null) {
if (!fixResize()) {
rect = wi... |
public Page1()
{
setPageTitle("Template example, page 1");
add(new Panel1("panel1"));
}
| public Page1()
{
setPageTitle("Template example, page 1 - page inheritance");
add(new Panel1("panel1"));
}
|
public boolean eval() {
if (sourceFileSets.size() == 0 && _sourceFile == null) {
throw new BuildException("At least one srcfile or a nested "
+ "<srcfiles> element must be set.");
}
if (sourceFileSets.size() > 0 && _sourceFile != null) {
... | public boolean eval() {
if (sourceFileSets.size() == 0 && _sourceFile == null) {
throw new BuildException("At least one srcfile or a nested "
+ "<srcfiles> element must be set.");
}
if (sourceFileSets.size() > 0 && _sourceFile != null) {
... |
public void dumpStack(Throwable e, String msg) {
msg(msg);
e.printStackTrace(printStream);
}
| public void dumpStack(Throwable e, String msg) {
msg(msg);
if (e != null) e.printStackTrace(printStream);
}
|
public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) {
checkLayout();
computeRuns(gc);
if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (selectionForeground !=... | public void draw (GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) {
checkLayout();
computeRuns(gc);
if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
if (selectionForeground !=... |
public void execute() throws BuildException {
if (defaultSetDefined || defaultSet.getDir(project) == null) {
super.execute();
}
else {
// we are chmodding the given directory
createArg().setValue(defaultSet.getDir(project).getPath());
Execute e... | public void execute() throws BuildException {
if (defaultSetDefined || defaultSet.getDir(project) == null) {
super.execute();
}
else if (isValidOs()) {
// we are chmodding the given directory
createArg().setValue(defaultSet.getDir(project).getPath());
... |
public boolean getVisible () {
checkWidget ();
int /*long*/ scrolledHandle = parent.scrolledHandle;
int [] hsp = new int [1], vsp = new int [1];
OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp);
if ((style & SWT.HORIZONTAL) != 0) {
return hsp [0] != OS.GTK_POLICY_NEVER;
} else {
return vsp [0] != ... | public boolean getVisible () {
checkWidget ();
int /*long*/ scrolledHandle = parent.scrolledHandle;
int [] hsp = new int [1], vsp = new int [1];
OS.gtk_scrolled_window_get_policy (scrolledHandle, hsp, vsp);
if ((style & SWT.HORIZONTAL) != 0) {
return hsp [0] != OS.GTK_POLICY_NEVER;
} else {
return vsp [0] != ... |
protected void invokeInternal2(final WorkflowContext ctx, final ProgressMonitor monitor, final Issues issues) {
OutputStream verboseProfileOutputStream = null;
if (verboseProfileFilename != null) {
try {
verboseProfileOutputStream = new BufferedOutputStream(new FileOutputStream(verboseProfileFilename));
... | protected void invokeInternal2(final WorkflowContext ctx, final ProgressMonitor monitor, final Issues issues) {
OutputStream verboseProfileOutputStream = null;
if (verboseProfileFilename != null) {
try {
verboseProfileOutputStream = new BufferedOutputStream(new FileOutputStream(verboseProfileFilename));
... |
public Callback getCallback();
Type getReturnType(Extension extension, Type[] paramTypes,
Set<AnalysationIssue> issues);
} | public VetoableCallback getCallback();
Type getReturnType(Extension extension, Type[] paramTypes,
Set<AnalysationIssue> issues);
} |
public String toString(final boolean detailed)
{
final StringBuffer buffer = new StringBuffer();
buffer.append("[MarkupContainer ");
buffer.append(super.toString());
if (detailed)
{
if (markupStream != null)
{
buffer.append(", markupStream = " + markupStream);
}
if (childForId != null && ch... | public String toString(final boolean detailed)
{
final StringBuffer buffer = new StringBuffer();
buffer.append("[MarkupContainer ");
buffer.append(super.toString(true));
if (detailed)
{
if (markupStream != null)
{
buffer.append(", markupStream = " + markupStream);
}
if (childForId != null &... |
public Shell [] getShells () {
checkWidget();
int count = 0;
Shell [] shells = display.getShells ();
for (int i=0; i<shells.length; i++) {
Control shell = shells [i];
do {
shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) count++;
}
int index = 0;
Shell [] result... | public Shell [] getShells () {
checkWidget();
int count = 0;
Shell [] shells = display.getShells ();
for (int i=0; i<shells.length; i++) {
Control shell = shells [i];
do {
shell = shell.getParent ();
} while (shell != null && shell != this);
if (shell == this) count++;
}
int index = 0;
Shell [] result... |
public Object getPropertyHook( String ns, String name , boolean user) {
if( ! name.startsWith(PREFIX) ) {
// pass to next
return super.getPropertyHook(ns, name, user);
}
name=name.substring( PREFIX.length() );
//Object o=jxpathCtx... | public Object getPropertyHook( String ns, String name , boolean user) {
if( ! name.startsWith(PREFIX) ) {
// pass to next
return super.getPropertyHook(ns, name, user);
}
name=name.substring( PREFIX.length() );
//Object o=jxpathCtx... |
public class BasePage<T> extends WicketExamplePage<T>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the A... | public class BasePage<T> extends WicketExamplePage<T>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the A... |
public class HomePage extends BasePage<Void>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lic... | public class HomePage extends BasePage<Void>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache Lic... |
public class BasePage<T> extends WicketExamplePage<T>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the A... | public class BasePage<T> extends WicketExamplePage<T>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the A... |
public class AuthenticatedWebPage<T> extends WicketExamplePage<T>
/*
* 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... | public class AuthenticatedWebPage<T> extends WicketExamplePage<T>
/*
* 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... |
public class Home extends WicketExamplePage<Void>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apach... | public class Home extends WicketExamplePage<Void>
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apach... |
public Object nativeToJava(TransferData transferData) {
if (!isSupportedType(transferData) || transferData.pIDataObject == 0) return null;
IDataObject dataObject = new IDataObject(transferData.pIDataObject);
dataObject.AddRef();
FORMATETC formatetc = new FORMATETC();
formatetc.cfFormat = COM.CF_DIB;
formatetc.ptd... | public Object nativeToJava(TransferData transferData) {
if (!isSupportedType(transferData) || transferData.pIDataObject == 0) return null;
IDataObject dataObject = new IDataObject(transferData.pIDataObject);
dataObject.AddRef();
FORMATETC formatetc = new FORMATETC();
formatetc.cfFormat = COM.CF_DIB;
formatetc.ptd... |
public MultipartUrlConfigGui(boolean showSamplerFields, boolean showImplementation) {
super(showSamplerFields, showImplementation);
init();
}
| public MultipartUrlConfigGui(boolean showSamplerFields, boolean showImplementation) {
super(showSamplerFields, showImplementation, true);
init();
}
|
public SelectExecutor whereClone(int sels) {
if (sels < 1)
sels = 1;
Select[] clones = null;
SelectImpl sel;
for (int i = 0; i < sels; i++) {
sel = (SelectImpl) conf.getSQLFactoryInstance().newSelect();
sel._flags = _flags;
sel._flags ... | public SelectExecutor whereClone(int sels) {
if (sels < 1)
sels = 1;
Select[] clones = null;
SelectImpl sel;
for (int i = 0; i < sels; i++) {
sel = (SelectImpl) _conf.getSQLFactoryInstance().newSelect();
sel._flags = _flags;
sel._flags... |
public void run() {
log.debug("Starting thread");
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
in = new BufferedInputStream(clientSocket.getInputStream());
// Read the header part, we will be looking for a content-length
... | public void run() {
log.debug("Starting thread");
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
in = new BufferedInputStream(clientSocket.getInputStream());
// Read the header part, we will be looking for a content-length
... |
protected void lockInternal(OpenJPAStateManager sm, int level, int timeout,
Object sdata, boolean postLockVersionCheck) {
if (level >= MixedLockLevels.LOCK_PESSIMISTIC_FORCE_INCREMENT) {
setVersionCheckOnReadLock(true);
setVersionUpdateOnWriteLock(true);
super.loc... | protected void lockInternal(OpenJPAStateManager sm, int level, int timeout,
Object sdata, boolean postLockVersionCheck) {
if (level >= MixedLockLevels.LOCK_PESSIMISTIC_FORCE_INCREMENT) {
setVersionCheckOnReadLock(true);
setVersionUpdateOnWriteLock(true);
super.loc... |
public void select (int index) {
checkWidget();
if (0 <= index && index < itemCount) {
NSIndexSet indexes = (NSIndexSet)new NSIndexSet().alloc();
indexes.initWithIndex(index);
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
((NSTableView)view).selectRowIndexes(indexes, true);
ignoreSelect = f... | public void select (int index) {
checkWidget();
if (0 <= index && index < itemCount) {
NSIndexSet indexes = (NSIndexSet)new NSIndexSet().alloc();
indexes.initWithIndex(index);
NSTableView widget = (NSTableView)view;
ignoreSelect = true;
widget.selectRowIndexes(indexes, true);
ignoreSelect = false;
}
}
|
public TypePattern parseSingleTypePattern() {
List names = parseDottedNamePattern();
// new ArrayList();
// NamePattern p1 = parseNamePattern();
// names.add(p1);
// while (maybeEat(".")) {
// if (maybeEat(".")) {
// names.add(NamePattern.ELLIPSIS);
// }
// NamePattern p2 = parseNamePattern();
// nam... | public TypePattern parseSingleTypePattern() {
List names = parseDottedNamePattern();
// new ArrayList();
// NamePattern p1 = parseNamePattern();
// names.add(p1);
// while (maybeEat(".")) {
// if (maybeEat(".")) {
// names.add(NamePattern.ELLIPSIS);
// }
// NamePattern p2 = parseNamePattern();
// nam... |
public TypePattern resolveBindings(IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType)
{
if (isNamePatternStar()) {
// If there is an annotation specified we have to
// use a special variant of Any TypePattern called
// AnyWithAnnotation
... | public TypePattern resolveBindings(IScope scope, Bindings bindings,
boolean allowBinding, boolean requireExactType)
{
if (isNamePatternStar()) {
// If there is an annotation specified we have to
// use a special variant of Any TypePattern called
// AnyWithAnnotation
... |
protected abstract void updateModel();
}
| public abstract void updateModel();
}
|
protected final void updateModel()
{
final String id = getInput();
if (Strings.isEmpty(id))
{
setModelObject(null);
}
else
{
setModelValue(id);
}
}
}
| public final void updateModel()
{
final String id = getInput();
if (Strings.isEmpty(id))
{
setModelObject(null);
}
else
{
setModelValue(id);
}
}
}
|
protected void updateModel()
{
String input = getInput();
if (input != null && getConvertEmptyInputStringToNull() && Strings.isEmpty(input))
{
input = null;
}
setModelObject(input);
}
} | public void updateModel()
{
String input = getInput();
if (input != null && getConvertEmptyInputStringToNull() && Strings.isEmpty(input))
{
input = null;
}
setModelObject(input);
}
} |
protected void updateModel()
{
try
{
setModelObject(Strings.toBoolean(getInput()));
}
catch (StringValueConversionException e)
{
throw new WicketRuntimeException("Invalid boolean input value posted \"" + getInput() + "\"");
}
}
static
{
// Allow optional use of the IOnChangeListener interface
... | public void updateModel()
{
try
{
setModelObject(Strings.toBoolean(getInput()));
}
catch (StringValueConversionException e)
{
throw new WicketRuntimeException("Invalid boolean input value posted \"" + getInput() + "\"");
}
}
static
{
// Allow optional use of the IOnChangeListener interface
R... |
protected final void updateModel()
{
// Get the list of selected values
Collection selectedValues = (Collection)getModelObject();
if (selectedValues != null)
{
selectedValues.clear();
}
else
{
selectedValues = new ArrayList();
setModelObject(selectedValues);
}
// Get indices selected from... | public final void updateModel()
{
// Get the list of selected values
Collection selectedValues = (Collection)getModelObject();
if (selectedValues != null)
{
selectedValues.clear();
}
else
{
selectedValues = new ArrayList();
setModelObject(selectedValues);
}
// Get indices selected from re... |
protected void updateModel()
{
// Get any validation type
final Class type = getValidationType();
if (type != null)
{
// Set model to request string converted to the appropriate type
setModelObject(getConverter().convert(getInput(), type));
}
else
{
// Update String model
super.updateModel()... | public void updateModel()
{
// Get any validation type
final Class type = getValidationType();
if (type != null)
{
// Set model to request string converted to the appropriate type
setModelObject(getConverter().convert(getInput(), type));
}
else
{
// Update String model
super.updateModel();
... |
protected void updateModel()
{
// Get request
final Request request = getRequest();
// If we successfully installed a multipart request
if (request instanceof MultipartWebRequest)
{
// Get the item for the path
final FileItem item = ((MultipartWebRequest)request).getFile(getPath());
// Only u... | public void updateModel()
{
// Get request
final Request request = getRequest();
// If we successfully installed a multipart request
if (request instanceof MultipartWebRequest)
{
// Get the item for the path
final FileItem item = ((MultipartWebRequest)request).getFile(getPath());
// Only upda... |
public void init() {
p1 = new Project();
Vector listeners = project.getBuildListeners();
for (int i = 0; i < listeners.size(); i++) {
p1.addBuildListener((BuildListener)listeners.elementAt(i));
}
if (output != null) {
try {
PrintStream... | public void init() {
p1 = new Project();
Vector listeners = project.getBuildListeners();
for (int i = 0; i < listeners.size(); i++) {
p1.addBuildListener((BuildListener)listeners.elementAt(i));
}
if (output != null) {
try {
PrintStream... |
public void execute() throws BuildException {
if (srcDir == null) {
throw new BuildException("srcdir attribute must be set!",
location);
}
if (!srcDir.exists()) {
throw new BuildException("srcdir "+srcDir.toString()
... | public void execute() throws BuildException {
if (srcDir == null) {
throw new BuildException("srcdir attribute must be set!",
location);
}
if (!srcDir.exists()) {
throw new BuildException("srcdir "+srcDir.toString()
... |
public void execute() throws BuildException {
project.log("Deleting: " + dir.getAbsolutePath());
if (dir.exists()) {
if (!dir.isDirectory()) {
if (!dir.delete()) {
throw new BuildException("Unable to delete file " + dir.getAbsolutePath());
}
return;
// String msg = "Given dir: " ... | public void execute() throws BuildException {
log("Deleting: " + dir.getAbsolutePath());
if (dir.exists()) {
if (!dir.isDirectory()) {
if (!dir.delete()) {
throw new BuildException("Unable to delete file " + dir.getAbsolutePath());
}
return;
// String msg = "Given dir: " + dir.ge... |
public void execute() throws BuildException {
if (source == null) {
throw new BuildException("No source specified");
}
if (!source.exists()) {
throw new BuildException("source doesn't exist");
}
if (source.isDirectory()) {
throw new Build... | public void execute() throws BuildException {
if (source == null) {
throw new BuildException("No source specified");
}
if (!source.exists()) {
throw new BuildException("source doesn't exist");
}
if (source.isDirectory()) {
throw new Build... |
public void execute() throws BuildException {
File dir = project.resolveFile(dirName);
if (!dir.exists()) {
boolean result = dir.mkdirs();
if (result == false) {
String msg = "Directory " + dirName + " creation was not " +
"succesful for an unknown reason";
throw new BuildException(msg);
... | public void execute() throws BuildException {
File dir = project.resolveFile(dirName);
if (!dir.exists()) {
boolean result = dir.mkdirs();
if (result == false) {
String msg = "Directory " + dirName + " creation was not " +
"succesful for an unknown reason";
throw new BuildException(msg);
... |
public void execute() throws BuildException {
if (token == null) {
throw new BuildException("replace token must not be null");
}
if (src == null && dir == null) {
throw new BuildException("Either the file or the dir attribute must be specified");
}
... | public void execute() throws BuildException {
if (token == null) {
throw new BuildException("replace token must not be null");
}
if (src == null && dir == null) {
throw new BuildException("Either the file or the dir attribute must be specified");
}
... |
public void execute() throws BuildException {
project.log("Building tar: "+ tarFile.getAbsolutePath());
if (baseDir == null) {
throw new BuildException("basedir attribute must be set!");
}
if (!baseDir.exists()) {
throw new BuildException("basedir does not ex... | public void execute() throws BuildException {
log("Building tar: "+ tarFile.getAbsolutePath());
if (baseDir == null) {
throw new BuildException("basedir attribute must be set!");
}
if (!baseDir.exists()) {
throw new BuildException("basedir does not exist!");
... |
public void setClass(String v) {
project.log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
value = v;
}
| public void setClass(String v) {
log("The class attribute is deprecated. " +
"Please use the classname attribute.",
Project.MSG_WARN);
value = v;
}
|
public void execute() throws BuildException {
if (baseDir == null) {
throw new BuildException("basedir attribute must be set!");
}
if (!baseDir.exists()) {
throw new BuildException("basedir does not exist!");
}
DirectoryScanner ds = super.getDirectory... | public void execute() throws BuildException {
if (baseDir == null) {
throw new BuildException("basedir attribute must be set!");
}
if (!baseDir.exists()) {
throw new BuildException("basedir does not exist!");
}
DirectoryScanner ds = super.getDirectory... |
public String sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException {
// Buffer to hold the post body, except file content
StringBuffer postedBody = new StringBuffer(1000);
// Check if we should do a multipart/form-data or an
// application/x-www-form-u... | public String sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException {
// Buffer to hold the post body, except file content
StringBuffer postedBody = new StringBuffer(1000);
// Check if we should do a multipart/form-data or an
// application/x-www-form-u... |
public String getStaticLabel()
{
return JMeterUtils.getResString("bsh_sampler_title") + " (BETA CODE)";
}
| public String getStaticLabel()
{
return JMeterUtils.getResString("bsh_sampler_title");
}
|
public void reset(SymbolTable symbolTable) {
// save symbols
fXmlSymbol = symbolTable.addSymbol("xml");
fXmlnsSymbol = symbolTable.addSymbol("xmlns");
// reset namespace and context info
fNamespaceSize = 0;
fCurrentContext = 0;
fContext[fCurrentContext] = fN... | public void reset(SymbolTable symbolTable) {
// save symbols
fXmlSymbol = symbolTable.addSymbol("xml");
fXmlnsSymbol = symbolTable.addSymbol("xmlns");
// reset namespace and context info
fNamespaceSize = 0;
fCurrentContext = 0;
fContext[fCurrentContext] = fN... |
static public int getDataLength (byte[] hexData) {
if (!isArrayByteHex(hexData))
return -1;
return hexData.length / 2;
}
} | static public int getDecodedDataLength (byte[] hexData) {
if (!isArrayByteHex(hexData))
return -1;
return hexData.length / 2;
}
} |
protected int getLength( String content) {
return Base64.getDataLength(content.getBytes());
}
| protected int getLength( String content) {
return Base64.getDecodedDataLength(content.getBytes());
}
|
protected int getLength( String content) {
return HexBin.getDataLength(content.getBytes());
}
| protected int getLength( String content) {
return HexBin.getDecodedDataLength(content.getBytes());
}
|
public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0, border = getBorderWidth ();
if ((style & SWT.ARROW) != 0) {
if ((style & (SWT.UP | SWT.DOWN)) != 0) {
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);
height += OS.GetSystemMetrics (OS.SM_CYVSCROLL);
... | public Point computeSize (int wHint, int hHint, boolean changed) {
checkWidget ();
int width = 0, height = 0, border = getBorderWidth ();
if ((style & SWT.ARROW) != 0) {
if ((style & (SWT.UP | SWT.DOWN)) != 0) {
width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);
height += OS.GetSystemMetrics (OS.SM_CYVSCROLL);
... |
protected void reset(XMLComponentManager componentManager){
if (componentManager == null) {
fSymbolTable = null;
fValidationHandler = null;
return;
}
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
if (fSymbolTable == null) ... | protected void reset(XMLComponentManager componentManager){
if (componentManager == null) {
fSymbolTable = null;
fValidationHandler = null;
return;
}
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
if (fSymbolTable == null) ... |
public void reset(XMLComponentManager componentManager)
throws XNIException {
// features
try {
fNamespaces = componentManager.getFeature(NAMESPACES);
}
catch (XMLConfigurationException e) {
fNamespaces = true;
}
// Xerces properties
... | public void reset(XMLComponentManager componentManager)
throws XNIException {
// features
try {
fNamespaces = componentManager.getFeature(NAMESPACES);
}
catch (XMLConfigurationException e) {
fNamespaces = true;
}
// Xerces properties
... |
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
// get error reporter
fXSIErrorReporter.reset((XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER));
fSchemaLoader.setProperty(ERROR_REPORTER, fXSIErrorReporter.fErrorReporter);
// ... | public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
// get error reporter
fXSIErrorReporter.reset((XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER));
fSchemaLoader.setProperty(ERROR_REPORTER, fXSIErrorReporter.fErrorReporter);
// ... |
private boolean reset() {
serializer.reset();
serializer.fNSBinder.reset(serializer.fSymbolTable);
// during serialization always have a mapping to empty string
// so we assume there is a declaration.
serializer.fNSBinder.declarePrefix(XMLSymbols.EMPTY_STRING, XMLSymbols.EMPT... | private boolean reset() {
serializer.reset();
serializer.fNSBinder.reset();
// during serialization always have a mapping to empty string
// so we assume there is a declaration.
serializer.fNSBinder.declarePrefix(XMLSymbols.EMPTY_STRING, XMLSymbols.EMPTY_STRING);
seri... |
public void setHeaderVisible (boolean show) {
checkWidget ();
int style = 0;
if (!show) {
style = OS.gcnew_Style ();
int dp = OS.FrameworkElement_VisibilityProperty ();
int setter = OS.gcnew_Setter (dp, OS.Visibility_Collapsed);
int collection = OS.Style_Setters (style);
OS.SetterBaseCollection_Add (collec... | public void setHeaderVisible (boolean show) {
checkWidget ();
int style = 0;
if (!show) {
style = OS.gcnew_Style ();
int dp = OS.UIElement_VisibilityProperty ();
int setter = OS.gcnew_Setter (dp, OS.Visibility_Collapsed);
int collection = OS.Style_Setters (style);
OS.SetterBaseCollection_Add (collection, s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.