buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void setTopIndex (int index) { checkWidget (); if ((style & SWT.SINGLE) != 0) return; int row = Math.max(0, Math.min(index, getLineCount())); NSPoint pt = new NSPoint(); pt.x = scrollView.contentView().bounds().x; pt.y = getLineHeight() * row; view.scrollPoint(pt); }
public void setTopIndex (int index) { checkWidget (); if ((style & SWT.SINGLE) != 0) return; int row = Math.max(0, Math.min(index, getLineCount() - 1)); NSPoint pt = new NSPoint(); pt.x = scrollView.contentView().bounds().x; pt.y = getLineHeight() * row; view.scrollPoint(pt); }
NLS.bind(Messages.protectedDoc, ACTION)); } } if (results.size() == 0) { showInfo(Messages.refreshImpossible, Messages.noSignaturesInDocument); } // show results IWorkbenchPage page = PlatformUI.getWork...
NLS.bind(Messages.protectedDoc, ACTION)); } } if (results.size() == 0) { showInfo(Messages.signaturesView, Messages.noSignaturesInDocument); } // show results IWorkbenchPage page = PlatformUI.getWorkben...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...
private void createPageContent(final Composite parent) { FormLayout layout = new FormLayout(); layout.marginTop = Globals.MARGIN / 2; layout.marginBottom = Globals.MARGIN / 2; layout.marginLeft = Globals.MARGIN / 2; layout.marginRight = Globals.MARGIN / 2; parent.setL...
public NewSignatureWizard() { super(); signature = new Signature(); setWindowTitle(Messages.digitalSignatureWizard); setDialogSettings(getDigitalSignatureWizardSettings()); ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin(XmlSecurityPlugin.getId(), ...
public NewSignatureWizard() { super(); signature = new Signature(); setWindowTitle(Messages.signatureWizard); setDialogSettings(getDigitalSignatureWizardSettings()); ImageDescriptor image = AbstractUIPlugin.imageDescriptorFromPlugin(XmlSecurityPlugin.getId(), ...
public void testRenderHomePageWithHeaderContribution() throws Exception { tester.startComponentInPage(MyFormComponentPanel.class); String doc = tester.getLastResponse().getDocument(); log.error(doc); assertTrue(doc.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"../some.css\" />")); }
public void testRenderHomePageWithHeaderContribution() throws Exception { tester.startComponentInPage(MyFormComponentPanel.class); String doc = tester.getLastResponse().getDocument(); // log.error(doc); assertTrue(doc.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"../some.css\" />")); }
public Watchdog(long timeout) { if (timeout < 1) { throw new IllegalArgumentException("timeout lesser than 1."); } this.timeout = timeout; }
public Watchdog(long timeout) { if (timeout < 1) { throw new IllegalArgumentException("timeout less than 1."); } this.timeout = timeout; }
private static void printUsage() { System.err.println("usage: java dom.ASBuilder [-f|-F] -a uri ... [-i uri ...]"); System.err.println(); System.err.println("options:"); System.err.println(" -f | -F Turn on/off Schema full checking."); System.err.println(" -a uri ... ...
private static void printUsage() { System.err.println("usage: java dom.ASBuilder [-f|-F] -a uri ... [-i uri ...]"); System.err.println(); System.err.println("options:"); System.err.println(" -f | -F Turn on/off Schema full checking."); System.err.println(" -a uri ... ...
public Object invoke() { try { return createMethod(getTypes()).invoke(invokee, getArgs()); } catch (Exception e) { log.warn("Trouble functing method: ", e); throw new org.apache.jorphan.util.JMeterError(e); // JDK1.4 } }
public Object invoke() { try { return createMethod(getTypes()).invoke(invokee, getArgs()); } catch (Exception e) { log.warn("Trouble functing method: "+methodName+" invokee: "+invokee.getClass().getName(), e); throw new org.apache.jorphan.util.JMeterError(e); // JDK1.4 } }
public static boolean setCookie (String value, String url) { if (value == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (url == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); return WebBrowser.SetCookie (value, url); }
public static boolean setCookie (String value, String url) { if (value == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (url == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); return WebBrowser.SetCookie (value, url, true); }
protected void handleLeaveGroupMessage(ContainerMessage mess) { if (!isConnected()) return; ContainerMessage.LeaveGroupMessage lgm = (ContainerMessage.LeaveGroupMessage) mess .getData(); ID fromID = mess.getFromContainerID(); if (fromID == null || !fromID.equals(remoteServerID)) { // we ignore anythi...
protected void handleLeaveGroupMessage(ContainerMessage mess) { if (!isConnected()) return; ContainerMessage.LeaveGroupMessage lgm = (ContainerMessage.LeaveGroupMessage) mess .getData(); ID fromID = mess.getFromContainerID(); if (fromID == null || !fromID.equals(remoteServerID)) { // we ignore anythi...
protected void onUpdate(AjaxRequestTarget target) { target.addComponent(models); } }); }
protected void onUpdate(AjaxRequestTarget target) { target.add(models); } }); }
protected void onUpdate(AjaxRequestTarget target) { label.setDefaultModelObject(getValue(field.getDefaultModelObjectAsString())); target.addComponent(label); } }; field.add(onChangeAjaxBehavior); }
protected void onUpdate(AjaxRequestTarget target) { label.setDefaultModelObject(getValue(field.getDefaultModelObjectAsString())); target.add(label); } }; field.add(onChangeAjaxBehavior); }
public void onClick(AjaxRequestTarget target) { showDummy = !showDummy; if (showDummy) { outer.replace(new WebMarkupContainer("test")); } else { outer.replace(new Test("test")); } target.addComponent(outer); } });
public void onClick(AjaxRequestTarget target) { showDummy = !showDummy; if (showDummy) { outer.replace(new WebMarkupContainer("test")); } else { outer.replace(new Test("test")); } target.add(outer); } });
public void onEvent(IEvent<?> event) { super.onEvent(event); // check if this is a counter update event and if so repaint self if (event.getPayload() instanceof CounterUpdate) { CounterUpdate update = (CounterUpdate)event.getPayload(); update.getTarget().addComponent(this); } } }
public void onEvent(IEvent<?> event) { super.onEvent(event); // check if this is a counter update event and if so repaint self if (event.getPayload() instanceof CounterUpdate) { CounterUpdate update = (CounterUpdate)event.getPayload(); update.getTarget().add(this); } } }
public void onClick(final AjaxRequestTarget target) { if (!isSpamBot() && captcha.allKittensSelected()) { target.appendJavascript("alert('you win! happy kittens!');"); } else { errors++; if (isSpamBot()) { target.appendJavascript("alert('spammer alert');"); } ...
public void onClick(final AjaxRequestTarget target) { if (!isSpamBot() && captcha.allKittensSelected()) { target.appendJavascript("alert('you win! happy kittens!');"); } else { errors++; if (isSpamBot()) { target.appendJavascript("alert('spammer alert');"); } ...
public void show(final AjaxRequestTarget target) { if (shown == false) { getContent().setVisible(true); target.addComponent(this); target.appendJavascript(getWindowOpenJavascript()); shown = true; } }
public void show(final AjaxRequestTarget target) { if (shown == false) { getContent().setVisible(true); target.add(this); target.appendJavascript(getWindowOpenJavascript()); shown = true; } }
protected void onAjaxEvent(AjaxRequestTarget target) { target.addComponent(table); } }; }
protected void onAjaxEvent(AjaxRequestTarget target) { target.add(table); } }; }
public void onClick(AjaxRequestTarget target) { setSelectedTab(index); if (target != null) { target.addComponent(AjaxTabbedPanel.this); } onAjaxUpdate(target); } }; }
public void onClick(AjaxRequestTarget target) { setSelectedTab(index); if (target != null) { target.add(AjaxTabbedPanel.this); } onAjaxUpdate(target); } }; }
protected void onEvent(final AjaxRequestTarget target) { // Get clicked cursor position final Request request = RequestCycle.get().getRequest(); final int x = request.getRequestParameters().getParameterValue("x").toInt(0); final int y = request.getRequestParameters().getParameterValue("y").toInt(0...
protected void onEvent(final AjaxRequestTarget target) { // Get clicked cursor position final Request request = RequestCycle.get().getRequest(); final int x = request.getRequestParameters().getParameterValue("x").toInt(0); final int y = request.getRequestParameters().getParameterValue("y").toInt(0...
public void onClick(AjaxRequestTarget target) { ajaxLabel.setEnabled(!ajaxLabel.isEnabled()); target.addComponent(ajaxLabel); } }); }
public void onClick(AjaxRequestTarget target) { ajaxLabel.setEnabled(!ajaxLabel.isEnabled()); target.add(ajaxLabel); } }); }
protected final void onTimer(final AjaxRequestTarget target) { target.addComponent(getComponent()); onPostProcessTarget(target); }
protected final void onTimer(final AjaxRequestTarget target) { target.add(getComponent()); onPostProcessTarget(target); }
public void component(final Component component, final IVisit<Void> visit) { target.addComponent(component); } }); }
public void component(final Component component, final IVisit<Void> visit) { target.add(component); } }); }
protected void addComponent(AjaxRequestTarget target, Component component) { target.addComponent(component); }
protected void addComponent(AjaxRequestTarget target, Component component) { target.add(component); }
protected void onEvent(AjaxRequestTarget target) { target.addComponent(label); } }; label.add(ajaxEventBehavior); add(label); }
protected void onEvent(AjaxRequestTarget target) { target.add(label); } }; label.add(ajaxEventBehavior); add(label); }
public void onClick(AjaxRequestTarget target) { target.addComponent(this); } }
public void onClick(AjaxRequestTarget target) { target.add(this); } }
public void onClick(AjaxRequestTarget tgt) { _message = "ajax link clicked"; // Adding the entire page to the ajax request target // should force the entire page to be re-requested by the // browser, thereby reverting the _message value. tgt.addComponent(getPage()); // And it works. Howe...
public void onClick(AjaxRequestTarget tgt) { _message = "ajax link clicked"; // Adding the entire page to the ajax request target // should force the entire page to be re-requested by the // browser, thereby reverting the _message value. tgt.add(getPage()); // And it works. However the w...
public void onClick(AjaxRequestTarget target) { labelText = "Updated!"; target.addComponent(label); } }); }
public void onClick(AjaxRequestTarget target) { labelText = "Updated!"; target.add(label); } }); }
public void onClick(final AjaxRequestTarget target) { Label ajaxLabel2 = new Label("ajaxLabel", "BBBBBBB"); ajaxLabel2.setOutputMarkupId(true); ajaxLabel.getParent().replace(ajaxLabel2); if (target != null) { target.addComponent(ajaxLabel2, "ajaxLabel"); } } }); }
public void onClick(final AjaxRequestTarget target) { Label ajaxLabel2 = new Label("ajaxLabel", "BBBBBBB"); ajaxLabel2.setOutputMarkupId(true); ajaxLabel.getParent().replace(ajaxLabel2); if (target != null) { target.add(ajaxLabel2, "ajaxLabel"); } } }); }
public void onClick(AjaxRequestTarget target) { hidden = !hidden; target.addComponent(containerWrapper); } }); containerWrapper.setOutputMarkupPlaceholderTag(true); }
public void onClick(AjaxRequestTarget target) { hidden = !hidden; target.add(containerWrapper); } }); containerWrapper.setOutputMarkupPlaceholderTag(true); }
public ListNode addNext(AjaxRequestTarget target, int number) { ListNode next = new ListNode("next", number); nextContainer.add(next); nextContainer.setVisible(true); target.addComponent(nextContainer); return next; } }
public ListNode addNext(AjaxRequestTarget target, int number) { ListNode next = new ListNode("next", number); nextContainer.add(next); nextContainer.setVisible(true); target.add(nextContainer); return next; } }
public void onClick(AjaxRequestTarget target) { target.addComponent(fragmentContent); } }); }
public void onClick(AjaxRequestTarget target) { target.add(fragmentContent); } }); }
protected void onEvent(AjaxRequestTarget target) { text.validate(); submit.setEnabled(text.isValid()); target.addComponent(submit); } });
protected void onEvent(AjaxRequestTarget target) { text.validate(); submit.setEnabled(text.isValid()); target.add(submit); } });
public void execute() throws BuildException { if ("javadoc2".equals(taskType)) { log("!! javadoc2 is deprecated. Use javadoc instead. !!"); } if (sourcePath == null) { String msg = "sourcePath attribute must be set!"; throw new BuildException(msg); ...
public void execute() throws BuildException { if ("javadoc2".equals(taskType)) { log("!! javadoc2 is deprecated. Use javadoc instead. !!"); } if (sourcePath == null) { String msg = "sourcePath attribute must be set!"; throw new BuildException(msg); ...
public void testCreateMd5() throws IOException { FileUtils fileUtils = FileUtils.newFileUtils(); executeTarget("createMd5"); assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo.gif.MD5"), project.resolveFile("../asf-logo.gif.MD...
public void testCreateMd5() throws IOException { FileUtils fileUtils = FileUtils.newFileUtils(); executeTarget("createMd5"); assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo.gif.md5"), project.resolveFile("../asf-logo.gif.MD...
public void widgetSelected(SelectionEvent event) { shell.close (); } }); return menu; } /* * Set a style */ void setStyle(Widget widget) { Point sel = text.getSelectionRange(); if ((sel == null) || (sel.y == 0)) return; StyleRange style; for (int i = sel.x; i<sel.x+sel.y; i++) { StyleRange range = te...
public void widgetSelected(SelectionEvent event) { shell.close (); } }); return menu; } /* * Set a style */ void setStyle(Widget widget) { Point sel = text.getSelectionRange(); if ((sel == null) || (sel.y == 0)) return; StyleRange style; for (int i = sel.x; i<sel.x+sel.y; i++) { StyleRange range = te...
public void genLabelAndKind(MethodDeclaration methodDeclaration, IProgramElement node) { if (methodDeclaration instanceof AdviceDeclaration) { AdviceDeclaration ad = (AdviceDeclaration)methodDeclaration; node.setKind(IProgramElement.Kind.ADVICE); if (ad.kind == AdviceKind.Around) { node.setCorrespo...
public void genLabelAndKind(MethodDeclaration methodDeclaration, IProgramElement node) { if (methodDeclaration instanceof AdviceDeclaration) { AdviceDeclaration ad = (AdviceDeclaration)methodDeclaration; node.setKind(IProgramElement.Kind.ADVICE); if (ad.kind == AdviceKind.Around) { node.setCorrespo...
protected Test findResidueInternal(Shadow shadow, ExposedState state) { if (annotationTypePattern instanceof BindingAnnotationTypePattern) { BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)annotationTypePattern; UnresolvedType annotationType = btp.annotationType; Var var = shadow.getWithinA...
protected Test findResidueInternal(Shadow shadow, ExposedState state) { if (annotationTypePattern instanceof BindingAnnotationTypePattern) { BindingAnnotationTypePattern btp = (BindingAnnotationTypePattern)annotationTypePattern; UnresolvedType annotationType = btp.annotationType; Var var = shadow.getWithinA...
public Event processEvent(Event e); }
public Event processEvent(Event event); }
public static void main(String argv[]) { // too few parameters if (argv.length < 2) { printUsage(); System.exit(1); } XMLParserConfiguration parserConfiguration = null; String arg = null; int i = 0; arg = argv[i]; if (arg.equ...
public static void main(String argv[]) { // too few parameters if (argv.length < 2) { printUsage(); System.exit(1); } XMLParserConfiguration parserConfiguration = null; String arg = null; int i = 0; arg = argv[i]; if (arg.equ...
private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(scope); TypeX aspectTypeX = EclipseWorld.fromBinding(binding.declaringClass); TypeX targetTypeX = EclipseWorld.fromBinding(onTy...
private MethodDeclaration makePreMethod(ClassScope scope, ExplicitConstructorCall explicitConstructorCall) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(scope); TypeX aspectTypeX = EclipseWorld.fromBinding(binding.declaringClass); TypeX targetTypeX = EclipseWorld.fromBinding(onTy...
public void setInitialization(Expression initialization) { this.initialization = initialization; } public void build(ClassScope classScope, CrosscuttingMembers xcut) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(classScope); resolveOnType(classScope); binding = classScope.referenceCont...
public void setInitialization(Expression initialization) { this.initialization = initialization; } public void build(ClassScope classScope, CrosscuttingMembers xcut) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(classScope); resolveOnType(classScope); binding = classScope.referenceCont...
public void resolveStatements(ClassScope upperScope) { if (!Modifier.isAbstract(declaredModifiers)) super.resolveStatements(upperScope); } public void build(ClassScope classScope, CrosscuttingMembers xcut) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(classScope); resolveOnType(classSc...
public void resolveStatements(ClassScope upperScope) { if (!Modifier.isAbstract(declaredModifiers)) super.resolveStatements(upperScope); } public void build(ClassScope classScope, CrosscuttingMembers xcut) { EclipseWorld world = EclipseWorld.fromScopeLookupEnvironment(classScope); resolveOnType(classSc...
public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; } Widget getItem(Table table, int x, int y) { Point coordinates = new Point(x, y); coordinates = ...
public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; } Widget getItem(Table table, int x, int y) { Point coordinates = new Point(x, y); coordinates = ...
private Page(final PageParameters parameters, IModel<?> model) { super(null, model); if (parameters == null) { // TODO WICKET-NG is this necessary or can we keep the field as null to save space? pageParameters = new PageParameters(); }
private Page(final PageParameters parameters, IModel<?> model) { super(null, model); if (parameters == null) { pageParameters = new PageParameters(); }
private final String[] COLUMNS = { JMeterUtils.getResString("URL"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_count"), //$NON-NLS-1$ JMeterUtils.getResString("average"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_median"), //$NON-NLS-1$ JMeter...
private final String[] COLUMNS = { JMeterUtils.getResString("url"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_count"), //$NON-NLS-1$ JMeterUtils.getResString("average"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_median"), //$NON-NLS-1$ JMeter...
private static int calculateHeadersSize(HttpMethodBase httpMethod) { int headerSize = httpMethod.getStatusLine().toString().length()+2; // add a \r\n Header[] rh = httpMethod.getResponseHeaders(); for (int i = 0; i < rh.length; i++) { headerSize += (rh[i]).toString().length(); //...
private static int calculateHeadersSize(HttpMethodBase httpMethod) { int headerSize = httpMethod.getStatusLine().toString().length()+2; // add a \r\n Header[] rh = httpMethod.getResponseHeaders(); for (int i = 0; i < rh.length; i++) { headerSize += rh[i].toString().length(); // a...
private int getTableIndex(Table table, PathJoins pj, boolean create) { // if we have a from select, then there are no table aliases if (_from != null) return -1; Integer i = null; Object key = table.getFullIdentifier().getName(); if (pj != null && pj.path() != nu...
private int getTableIndex(Table table, PathJoins pj, boolean create) { // if we have a from select, then there are no table aliases if (_from != null) return -1; Integer i = null; Object key = table.getFullIdentifier().getName(); if (pj != null && pj.path() != nu...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter(); if (bshInterpreter == null) { result.setFailure(true); result.setError(true); ...
public AssertionResult getResult(SampleResult response) { AssertionResult result = new AssertionResult(getName()); final BeanShellInterpreter bshInterpreter = getBeanShellInterpreter(); if (bshInterpreter == null) { result.setFailure(true); result.setError(true); ...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public int validateContentSpecial(QName children[], int offset, int length) throws Exception{ if (DEBUG_VALIDATE_CONTENT) System.out.println("DFAContentModel#validateContentSpecial"); if (comparator==null) { return validateContent(children,offset, length); } ...
public int validateContentSpecial(QName children[], int offset, int length) throws Exception{ if (DEBUG_VALIDATE_CONTENT) System.out.println("DFAContentModel#validateContentSpecial"); if (comparator==null) { return validateContent(children,offset, length); } ...
public ScrollBar getVerticalBar () { checkWidget (); return verticalBar; } int hScrollBarWidth() { if (horizontalBar==null) return 0; int /*long*/ hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR(scrolledHandle); if (hBarHandle==0) return 0; GtkRequisition requisition = new GtkRequisition(); OS.gtk_widget_size_re...
public ScrollBar getVerticalBar () { checkWidget (); return verticalBar; } int hScrollBarWidth() { if (horizontalBar==null) return 0; int /*long*/ hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR(scrolledHandle); if (hBarHandle==0) return 0; GtkRequisition requisition = new GtkRequisition(); OS.gtk_widget_size_re...
protected XSDocumentInfo constructTrees(Document schemaRoot, String locationHint, XSDDescription desc) { if (schemaRoot == null) return null; String callerTNS = desc.getTargetNamespace(); short referType = desc.getContextType(); XSDocumentInfo currSchemaInfo = null; ...
protected XSDocumentInfo constructTrees(Document schemaRoot, String locationHint, XSDDescription desc) { if (schemaRoot == null) return null; String callerTNS = desc.getTargetNamespace(); short referType = desc.getContextType(); XSDocumentInfo currSchemaInfo = null; ...
private static void processMembers(List/*IProgramElement*/ members, PrintWriter writer, boolean declaringTypeIsInterface) throws DocException { for (Iterator it = members.iterator(); it.hasNext();) { IProgramElement member = (IProgramElement) it.next(); if (member.getKind().isType()) { if (!me...
private static void processMembers(List/*IProgramElement*/ members, PrintWriter writer, boolean declaringTypeIsInterface) throws DocException { for (Iterator it = members.iterator(); it.hasNext();) { IProgramElement member = (IProgramElement) it.next(); if (member.getKind().isType()) { if (!me...
public void testFailingBuild() { File file1 = new File("testdata/failing-build/Fail.java"); String[] args = { file1.getAbsolutePath() }; org.aspectj.tools.ajdoc.Main.main(args); assertTrue(Main.hasAborted()); }
public void testFailingBuild() { File file1 = new File("../ajdoc/testdata/failing-build/Fail.java"); String[] args = { file1.getAbsolutePath() }; org.aspectj.tools.ajdoc.Main.main(args); assertTrue(Main.hasAborted()); }
public void testSimpleExample() { // System.err.println(new File("testdata.figures-demo").exists()); // File file1 = new File("testdata/patterns/allPatterns.lst"); File outdir = new File("testdata/patterns/doc"); File srcdir = new File("../docs/sandbox/ubc-design-patterns/src"); String[] args = { // ...
public void testSimpleExample() { // System.err.println(new File("testdata.figures-demo").exists()); // File file1 = new File("testdata/patterns/allPatterns.lst"); File outdir = new File("testdata/patterns/doc"); File srcdir = new File("../../docs/sandbox/ubc-design-patterns/src"); String[] args = { /...
protected void create (DeviceData data) { checkSubclass (); checkDisplay(thread = Thread.currentThread ()); createDisplay (data); register (); if (Default == null) Default = this; } synchronized void createDisplay (DeviceData data) { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } OS.gtk_set_locale(...
protected void create (DeviceData data) { checkSubclass (); checkDisplay(thread = Thread.currentThread ()); createDisplay (data); register (); if (Default == null) Default = this; } synchronized void createDisplay (DeviceData data) { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } OS.gtk_set_locale(...
public AjpSamplerGui() { super(); }
public AjpSamplerGui() { super(true); }
public boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output) { return false; }
public boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map<File, String> output) { return false; }
public boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map output);
public boolean store(ClassMetaData[] metas, QueryMetaData[] queries, SequenceMetaData[] seqs, int mode, Map<File, String> output);
protected void create (DeviceData data) { checkSubclass (); checkDisplay(thread = Thread.currentThread (), false); createDisplay (data); register (); if (Default == null) Default = this; } synchronized void createDisplay (DeviceData data) { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } OS.gtk_set_...
protected void create (DeviceData data) { checkSubclass (); checkDisplay(thread = Thread.currentThread (), false); createDisplay (data); register (); if (Default == null) Default = this; } synchronized void createDisplay (DeviceData data) { if (!OS.g_thread_supported ()) { OS.g_thread_init (0); } OS.gtk_set_...
private void initializeProject() { Vector listeners = project.getBuildListeners(); for (int i = 0; i < listeners.size(); i++) { p1.addBuildListener((BuildListener)listeners.elementAt(i)); } if (output != null) { try { PrintStream out = new Pri...
private void initializeProject() { Vector listeners = project.getBuildListeners(); for (int i = 0; i < listeners.size(); i++) { p1.addBuildListener((BuildListener)listeners.elementAt(i)); } if (output != null) { try { PrintStream out = new Pri...
public Object component(Component component) { if (component.isVisible()) { component.renderHead(header); return CONTINUE_TRAVERSAL; } else { return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } } }); }
public Object component(Component component) { if (component.isVisibleInHierarchy()) { component.renderHead(header); return CONTINUE_TRAVERSAL; } else { return CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER; } } }); }
public boolean hasAnnotations() { return (annotationTypes==null); }
public boolean hasAnnotations() { return (annotationTypes!=null); }
public void setAttribute(String name, String value) { if(value == null || value.length() == 0) { removeAttribute(name); } else { super.setAttribute(name, value); } }
public void setAttribute(String name, String value) { if(value == null && getAttribute(name).length() != 0) { removeAttribute(name); } else { super.setAttribute(name, value); } }
protected void setMunger(ResolvedTypeMunger munger) { munger.getSignature().setPosition(sourceStart, sourceEnd); munger.getSignature().setSourceContext(new EclipseSourceContext(compilationResult)); this.munger = munger; } protected int generateInfoAttributes(ClassFile classFile) { List l;; Shadow.Kind ki...
protected void setMunger(ResolvedTypeMunger munger) { munger.getSignature().setPosition(sourceStart, sourceEnd); munger.getSignature().setSourceContext(new EclipseSourceContext(compilationResult)); this.munger = munger; } protected int generateInfoAttributes(ClassFile classFile) { List l; Shadow.Kind kin...
protected void runCommand(Commandline toExecute) throws BuildException { // XXX: we should use JCVS (www.ice.com/JCVS) instead of // command line execution so that we don't rely on having // native CVS stuff around (SM) // We can't do it ourselves as jCVS is GPLed, a third party tas...
protected void runCommand(Commandline toExecute) throws BuildException { // XXX: we should use JCVS (www.ice.com/JCVS) instead of // command line execution so that we don't rely on having // native CVS stuff around (SM) // We can't do it ourselves as jCVS is GPLed, a third party tas...
public void setJarfile(File jarFile) { log("DEPRECATED - The jarfile attribute is deprecated. Use file attribute instead."); super.setFile(jarFile); }
public void setJarfile(File jarFile) { log("DEPRECATED - The jarfile attribute is deprecated. Use file attribute instead."); setFile(jarFile); }
public BookmarkablePage(PageParameters pageParameters) { // get the message from the passed 'message' parameter or fall back to // the default // when no parameters were passed. String message; // note: the null check is here as a matter of defensive programming. // Actually, as this // constructor is ...
public BookmarkablePage(PageParameters pageParameters) { // get the message from the passed 'message' parameter or fall back to // the default // when no parameters were passed. String message; // note: the null check is here as a matter of defensive programming. // Actually, as this // constructor is ...
public Home(final PageParameters parameters) { add(new Label("message", "Hello world! Test: ���")); }
public Home(final PageParameters parameters) { add(new Label<String>("message", "Hello world! Test: ���")); }
public HelloWorld() { add(new Label("message", "Hello World!")); }
public HelloWorld() { add(new Label<String>("message", "Hello World!")); }
public class Home extends WicketExamplePage<Void> implements AuthenticatedWebPage /* * 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 ...
public class Home extends WicketExamplePage<Void> implements AuthenticatedWebPage /* * 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 ...
public class Sent 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 Sent 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 Page1() { setPageTitle("Template example, page 1"); add(new Panel1("panel1")); }
public Page1() { setPageTitle("Template example, page 1"); add(new Panel1<Void>("panel1")); }
protected boolean parseGeneratedMarkup() { return true; } }); for (Field field : fields) { panel.add(new TextField(field.getFieldName())); } }
protected boolean parseGeneratedMarkup() { return true; } }); for (Field field : fields) { panel.add(new TextField<Object>(field.getFieldName())); } }
public void test_1() throws Exception { GuestBookApplication book = new GuestBookApplication(); WicketTester tester = new WicketTester(book); tester.startPage(GuestBook.class); tester.assertContains("Wicket Examples - guestbook"); // check if the list of comments is empty tester.assertListView("comments...
public void test_1() throws Exception { GuestBookApplication book = new GuestBookApplication(); WicketTester tester = new WicketTester(book); tester.startPage(GuestBook.class); tester.assertContains("Wicket Examples - guestbook"); // check if the list of comments is empty tester.assertListView("comments...
public void run() { Display.getDefault().beep(); MessageDialog.openInformation( null, "Already connected", "Already connected for pr...
public void run() { Display.getDefault().beep(); MessageDialog.openInformation( null, "Already connected", "Already connected for pr...
public static void copyInto(Node src, Node dest) throws DOMException { // get node factory Document factory = dest.getOwnerDocument(); boolean domimpl = factory instanceof DocumentImpl; // placement variables Node start = src; Node parent = src; ...
public static void copyInto(Node src, Node dest) throws DOMException { // get node factory Document factory = dest.getOwnerDocument(); boolean domimpl = factory instanceof DocumentImpl; // placement variables Node start = src; Node parent = src; ...
private Process getProcess(int timetorun) throws Exception { String[] cmdArray = { "java", "-classpath", TEST_CLASSPATH, TimeProcess.class.getName(), String.valueOf(timetorun) }; //System.out.println("Testing with classpath: " + System.getProperty("java.class.path"));...
private Process getProcess(int timetorun) throws Exception { String[] cmdArray = { JavaEnvUtils.getJdkExecutable("java"), "-classpath", TEST_CLASSPATH, TimeProcess.class.getName(), String.valueOf(timetorun) }; //System.out.println("Testing with classpath: " + System.g...
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 void create (Composite parent, int style) { delegate = new MozillaDelegate (browser); Display display = parent.getDisplay (); int /*long*/[] result = new int /*long*/[1]; if (!initialized) { String mozillaPath = null; boolean initLoaded = false; try { Library.loadLibrary ("swt-xpcominit"); //$NON-...
public void create (Composite parent, int style) { delegate = new MozillaDelegate (browser); Display display = parent.getDisplay (); int /*long*/[] result = new int /*long*/[1]; if (!initialized) { String mozillaPath = null; boolean initLoaded = false; try { Library.loadLibrary ("swt-xpcominit"); //$NON-...
public void testRelativeToNoModel() { timedBuild(true); timedBuild(false); timedBuild(true); long rawBuildTime = timedBuild(false); long modelBuildTime = timedBuild(true); float overhead = (float)modelBuildTime / (float)rawBuildTime; assertTrue(overhead < 1.3); // System.err.println("> overhead: "...
public void testRelativeToNoModel() { timedBuild(true); timedBuild(false); timedBuild(true); long rawBuildTime = timedBuild(false); long modelBuildTime = timedBuild(true); float overhead = (float)modelBuildTime / (float)rawBuildTime; assertTrue("overhead is " + overhead + " > 1.3", overhead < 1.3);...
protected String[] buildArgs() { StringBuffer args = new StringBuffer(); // add any set options, and then files to compile at the end if (getAspectpath() != null) { args.append("-aspectpath "); args.append(getAspectpath()); args.append(" "); } if (getSourceroots() != null) { args.append("-sourcer...
protected String[] buildArgs() { StringBuffer args = new StringBuffer(); // add any set options, and then files to compile at the end if (getAspectpath() != null) { args.append("-aspectpath "); args.append(getAspectpath()); args.append(" "); } if (getSourceroots() != null) { args.append("-sourcer...
public void testXmlWrite() { AbstractRunSpec spec = new TestSpec(); spec.setOptions("-option1,-option2"); spec.setKeywords("keyword1, keyword2"); spec.setPaths("path1.java, path2.java"); spec.setDescription("some description, with extra"); XMLWriter out = new XMLWrite...
public void testXmlWrite() { AbstractRunSpec spec = new TestSpec(); spec.setOptions("-option1,-option2"); spec.setKeywords("keyword1, keyword2"); spec.setPaths("path1.java, path2.java"); spec.setDescription("some description, with extra"); XMLWriter out = new XMLWrite...
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Skip the components body. It will be replaced by the fragment if (((ComponentTag)markupStream.get(markupStream.getCurrentIndex() - 1)).isOpen()) { markupStream.skipRawMarkup(); } renderFragment(openTag); ...
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Skip the components body. It will be replaced by the fragment if (markupStream.getPreviousTag().isOpen()) { markupStream.skipRawMarkup(); } renderFragment(openTag); }
public void setPrefix(String prefix) { this.prefix = prefix; if (!prefix.endsWith(".")) { this.prefix += "."; } }
public void setPrefix(String prefix) { this.prefix = prefix; if (prefix != null && !prefix.endsWith(".")) { this.prefix += "."; } }
public static final String VERSION = "20050111"; static final boolean DEBUG = true; public static class IconResInfo { ImageData data; int offset; int size; IconResInfo next; }
public static final String VERSION = "20050111"; static final boolean DEBUG = false; public static class IconResInfo { ImageData data; int offset; int size; IconResInfo next; }
protected RE getCompiledPattern( int options ) throws TaskException { int cOptions = getCompilerOptions( options ); try { RE reg = new RE( pattern ); reg.setMatchFlags( cOptions ); return reg; } catch( RESyntaxException e ) ...
protected RE getCompiledPattern( int options ) throws TaskException { int cOptions = getCompilerOptions( options ); try { RE reg = new RE( pattern ); reg.setMatchFlags( cOptions ); return reg; } catch( RESyntaxException e ) ...
public Argument getArgument(int row) { Argument argument = null; if(row < getArguments().size()) { argument = (Argument)getArguments().get(row); } return argument; }
public Argument getArgument(int row) { Argument argument = null; if(row < getArguments().size()) { argument = (Argument)getArguments().get(row).getObjectValue(); } return argument; }
private ListedHashTree cloneTree(ListedHashTree tree) { TreeCloner cloner = new TreeCloner(false); tree.traverse(cloner); return cloner.getClonedTree(); }
private ListedHashTree cloneTree(ListedHashTree tree) { TreeCloner cloner = new TreeCloner(true); tree.traverse(cloner); return cloner.getClonedTree(); }
public void setRedraw (boolean redraw) { checkWidget(); if (redraw) { if (--drawCount == 0) { invalidateVisibleRegion (); redrawWidget(view, true); } } else { if (drawCount == 0) { invalidateVisibleRegion (); } drawCount++; } }
public void setRedraw (boolean redraw) { checkWidget(); if (redraw) { if (--drawCount == 0) { invalidateVisibleRegion (); redrawWidget(topView (), true); } } else { if (drawCount == 0) { invalidateVisibleRegion (); } drawCount++; } }
public static void main(String[] args) throws Exception { Server server = new Server(); SocketConnector connector = new SocketConnector(); connector.setPort(8080); server.setConnectors(new Connector[] { connector }); WebAppContext bb = new WebAppContext(); bb.setServer(server); bb.setContextPath("/${art...
public static void main(String[] args) throws Exception { Server server = new Server(); SocketConnector connector = new SocketConnector(); connector.setPort(8080); server.setConnectors(new Connector[] { connector }); WebAppContext bb = new WebAppContext(); bb.setServer(server); bb.setContextPath("/"); ...
private void internalAdd(final Behavior behavior) { component.data_add(behavior); if (behavior.isStateless(component)) { getBehaviorId(behavior); } }
private void internalAdd(final Behavior behavior) { component.data_add(behavior); if (behavior.getStatelessHint(component)) { getBehaviorId(behavior); } }
public void handleEvent (Event event) { log (event); } }; for (int i = 0; i < EVENT_NAMES.length; i++) { if (eventsFilter [i]) widget.addListener (i, listener); } } } /** * Logs an untyped event to the event console. */ void log(Event event) { String toString = EVENT_NAMES[event.t...
public void handleEvent (Event event) { log (event); } }; for (int i = 0; i < EVENT_NAMES.length; i++) { if (eventsFilter [i]) widget.addListener (i, listener); } } } /** * Logs an untyped event to the event console. */ void log(Event event) { String toString = EVENT_NAMES[event.t...
private boolean archiveIsUpToDate( final String[] files ) throws TaskException { final SourceFileScanner scanner = new SourceFileScanner(); setupLogger( scanner ); final MergingMapper mapper = new MergingMapper(); mapper.setTo( tarFile.getAbsolutePath() ); return ...
private boolean archiveIsUpToDate( final String[] files ) throws TaskException { final SourceFileScanner scanner = new SourceFileScanner(); setupLogger( scanner ); final MergingMapper mapper = new MergingMapper(); mapper.setTo( tarFile.getAbsolutePath() ); return ...
protected boolean isUpToDate( FileScanner[] scanners, File zipFile ) throws TaskException { String[][] fileNames = grabFileNames( scanners ); File[] files = grabFiles( scanners, fileNames ); if( files.length == 0 ) { if( m_emptyBehavior.equals( "skip" ) ) ...
protected boolean isUpToDate( FileScanner[] scanners, File zipFile ) throws TaskException { String[][] fileNames = grabFileNames( scanners ); File[] files = grabFiles( scanners, fileNames ); if( files.length == 0 ) { if( m_emptyBehavior.equals( "skip" ) ) ...
private JMenu makeLanguageMenu() { /* * Note: the item name is used by ChangeLanguage to create a Locale for * that language, so need to ensure that the language strings are valid * If they exist, use the Locale language constants */ // TODO: do accelerator keys m...
private JMenu makeLanguageMenu() { /* * Note: the item name is used by ChangeLanguage to create a Locale for * that language, so need to ensure that the language strings are valid * If they exist, use the Locale language constants */ // TODO: do accelerator keys m...
public final void configure(final String configurationType, final String sourceFolder) { if ("development".equalsIgnoreCase(configurationType)) { if (sourceFolder != null) { final Folder folder = new Folder(sourceFolder); if (folder.exists()) { setResourcePath(new Path(folder)); } e...
public final void configure(final String configurationType, final String sourceFolder) { if ("development".equalsIgnoreCase(configurationType)) { if (sourceFolder != null) { final Folder folder = new Folder(sourceFolder); if (folder.exists()) { setResourcePath(new Path(folder)); } e...
public void init(wicket.Application application) { try { String name = application.getName(); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); // register top level application object, but first check whether // multiple instances of the same application (name) are running and // if s...
public void init(wicket.Application application) { try { String name = application.getName(); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); // register top level application object, but first check whether // multiple instances of the same application (name) are running and // if s...
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { this.monitor = monitor; threadVars = new JMeterVariables(); testTree = test; compiler = new TestCompiler(testTree, threadVars); controller = (Controller) testTree.getArray()[0]; S...
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { this.monitor = monitor; threadVars = new JMeterVariables(); testTree = test; compiler = new TestCompiler(testTree); controller = (Controller) testTree.getArray()[0]; SearchByClass...
public void testConfigGathering() throws Exception { ListedHashTree testing = new ListedHashTree(); GenericController controller = new GenericController(); ConfigTestElement config1 = new ConfigTestElement(); config1.setName("config1"); config1.setProp...
public void testConfigGathering() throws Exception { ListedHashTree testing = new ListedHashTree(); GenericController controller = new GenericController(); ConfigTestElement config1 = new ConfigTestElement(); config1.setName("config1"); config1.setProp...