buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void onSelectionChanged(final Object newSelection) { int anz = Integer.parseInt((String)newSelection); Label info5 = (Label)ExamplePaging.this.get("info5"); List<ListObject> data5 = (List)ExamplePaging.this.get("rows5").getModelObject(); if (anz > 0) { data5.addAll(data.subLis...
protected void onSelectionChanged(final String newSelection) { int anz = Integer.parseInt((String)newSelection); Label info5 = (Label)ExamplePaging.this.get("info5"); List<ListObject> data5 = (List)ExamplePaging.this.get("rows5").getModelObject(); if (anz > 0) { data5.addAll(data.subLis...
private void drawSample(SamplingStatCalculator p_model, Graphics g) { int width = getWidth(); double height = getHeight() - 1.0; // first lets draw the grid for (int y = 0; y < 4; y++) { int q1 = (int) (height - (height * 0.25 * y)); g.setColor(Color.lightGra...
private void drawSample(SamplingStatCalculator p_model, Graphics g) { int width = getWidth(); double height = getHeight() - 1.0; // first lets draw the grid for (int y = 0; y < 4; y++) { int q1 = (int) (height - (height * 0.25 * y)); g.setColor(Color.lightGra...
void showDropTargetEffect(int effect, int eventType, int x, int y) {} /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the...
void showDropTargetEffect(int effect, int eventType, int x, int y) {} /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the...
void showDropTargetEffect(int effect, int eventType, int x, int y){} /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
void showDropTargetEffect(int effect, int eventType, int x, int y){} /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
void showDropTargetEffect(int effect, int eventType, int x, int y) { /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
void showDropTargetEffect(int effect, int eventType, int x, int y) { /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
void showDropTargetEffect(int effect, int eventType, int x, int y) { /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
void showDropTargetEffect(int effect, int eventType, int x, int y) { /******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the ...
public OracleDictionary() { platform = "Oracle"; validationSQL = "SELECT SYSDATE FROM DUAL"; nextSequenceQuery = "SELECT {0}.NEXTVAL FROM DUAL"; stringLengthFunction = "LENGTH({0})"; joinSyntax = SYNTAX_DATABASE; maxTableNameLength = 30; maxColumnNameLength = ...
public OracleDictionary() { platform = "Oracle"; validationSQL = "SELECT SYSDATE FROM DUAL"; nextSequenceQuery = "SELECT {0}.NEXTVAL FROM DUAL"; stringLengthFunction = "LENGTH({0})"; joinSyntax = SYNTAX_DATABASE; maxTableNameLength = 30; maxColumnNameLength = ...
public boolean accept(FeedbackMessage message) { return container.getParent().contains(message.getReporter(), false); }
public boolean accept(FeedbackMessage message) { return container.contains(message.getReporter(), true); }
public Object convert(Object value, Class c) { if (value == null) { return null; } if(Boolean.class.isAssignableFrom(c)) { if (value instanceof Boolean) { return (value); } try { String stringValue = value.toString(); if (stringValue.equalsIgnoreCase("yes") || stringValue.equa...
public Object convert(Object value, Class c) { if (value == null) { return null; } if(c == CONVERT_TO_DEFAULT_TYPE || Boolean.class.isAssignableFrom(c)) { if (value instanceof Boolean) { return (value); } try { String stringValue = value.toString(); if (stringValue.equalsIgnor...
private static final String[] FILES = new String[] { "AssertionTestPlan.jmx", "AuthManagerTestPlan.jmx", "HeaderManagerTestPlan.jmx", "InterleaveTestPlan2.jmx", "InterleaveTestPlan.jmx", "LoopTestPlan.jmx", "Modification Manager.jmx", "OnceOnlyTestPla...
private static final String[] FILES = new String[] { "AssertionTestPlan.jmx", "AuthManagerTestPlan.jmx", "HeaderManagerTestPlan.jmx", "InterleaveTestPlan2.jmx", "InterleaveTestPlan.jmx", "LoopTestPlan.jmx", "Modification Manager.jmx", "OnceOnlyTestPla...
public static GC carbon_new(int context, GCData data) { GC gc = new GC(); gc.device = data.device; gc.init(null, data, context); return gc; } void checkGC (int mask) { NSGraphicsContext.setCurrentContext(handle); NSView view = data.view; if (view != null && data.paintRect == null) { NSRect rect = view.conve...
public static GC carbon_new(int context, GCData data) { GC gc = new GC(); gc.device = data.device; gc.init(null, data, context); return gc; } void checkGC (int mask) { NSGraphicsContext.setCurrentContext(handle); NSView view = data.view; if (view != null && data.paintRect == null) { NSRect rect = view.conve...
public TreeItem [] getSelection () { checkWidget (); NSOutlineView widget = (NSOutlineView) view; if (widget.numberOfSelectedRows () == 0) { return new TreeItem [0]; } NSIndexSet selection = widget.selectedRowIndexes (); int count = (int)/*64*/selection.count (); int [] indexBuffer = new int [count]; selectio...
public TreeItem [] getSelection () { checkWidget (); NSOutlineView widget = (NSOutlineView) view; if (widget.numberOfSelectedRows () == 0) { return new TreeItem [0]; } NSIndexSet selection = widget.selectedRowIndexes (); int count = (int)/*64*/selection.count (); int /*long*/ [] indexBuffer = new int /*long*/ ...
public void setOptional(boolean optional) { this.optional = true; }
public void setOptional(boolean optional) { this.optional = optional; }
public static void log(String message) { getDefault().getLog().log( new Status(IStatus.OK, RssPlugin.getDefault().getBundle() .getSymbolicName(), IStatus.OK, message, null)); }
public static void log(String message) { getDefault().getLog().log( new Status(IStatus.OK, getDefault().getBundle() .getSymbolicName(), IStatus.OK, message, null)); }
public void characters(XMLString text, Augmentations augs) throws XNIException { normalizeAndPrint(text); fOut.println("one call..."); fOut.flush(); } // characters(XMLString,Augmentations)
public void characters(XMLString text, Augmentations augs) throws XNIException { normalizeAndPrint(text); //fOut.println("one call..."); fOut.flush(); } // characters(XMLString,Augmentations)
public void init() throws BuildException { project.addFilter(token, value); } }
public void execute() throws BuildException { project.addFilter(token, value); } }
public void init() throws BuildException { try { Date d = new Date(); SimpleDateFormat dstamp = new SimpleDateFormat ("yyyyMMdd"); project.setProperty("DSTAMP", dstamp.format(d)); SimpleDateFormat tstamp = new SimpleDateFormat ("HHmm"); project.s...
public void execute() throws BuildException { try { Date d = new Date(); SimpleDateFormat dstamp = new SimpleDateFormat ("yyyyMMdd"); project.setProperty("DSTAMP", dstamp.format(d)); SimpleDateFormat tstamp = new SimpleDateFormat ("HHmm"); projec...
public SampleResult sample(Entry e) { String responseData ="<ldapanswer>"; SampleResult res = new SampleResult(); res.setResponseData("successfull".getBytes()); res.setResponseMessage("Success"); res.setResponseCode("0"); boolean isSuccessful = true; Searc...
public SampleResult sample(Entry e) { String responseData ="<ldapanswer>"; SampleResult res = new SampleResult(); res.setResponseData("successfull".getBytes()); res.setResponseMessage("Success"); res.setResponseCode("0"); boolean isSuccessful = true; Searc...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.setSamplerData(getPropertyAsString(TEST));//TODO improve this LdapClient ldap = new LdapClient(); try { ld...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getName()); res.setSamplerData(getPropertyAsString(TEST));//TODO improve this LdapClient ldap = new LdapClient(); try { lda...
public IRemoteServiceContainer selectConsumerContainer( EndpointDescription endpointDescription) { trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$ // Get the endpointID ID endpointContainerID = endpointDescription.getContainerID(); String[] remoteSupportedCon...
public IRemoteServiceContainer selectConsumerContainer( EndpointDescription endpointDescription) { trace("selectConsumerContainers", "endpointDescription=" + endpointDescription); //$NON-NLS-1$ //$NON-NLS-2$ // Get the endpointID ID endpointContainerID = endpointDescription.getContainerID(); String[] remo...
protected String cleanGroupName(String n) { String res = ((n.startsWith("/"))?n:"/"+n); return res; }
protected String cleanGroupName(String n) { String res = ((n.startsWith("/"))?n:"/"+n); //$NON-NLS-1$ //$NON-NLS-2$ return res; }
public String toString() { StringBuffer buf = new StringBuffer("PingMessage"); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer("PingMessage"); //$NON-NLS-1$ return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer("PingResponseMessage"); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer("PingResponseMessage[]"); //$NON-NLS-1$ return buf.toString(); }
protected ID getIDFromArg(Object arg) throws IDCreateException { if (arg == null) throw new IDCreateException("id cannot be null"); if (arg instanceof ID) return (ID) arg; if (arg instanceof String) { String val = (String) arg; if (val.equals("")) { //$NON-NLS-1$ return IDFactory.getDefault().cre...
protected ID getIDFromArg(Object arg) throws IDCreateException { if (arg == null) throw new IDCreateException(Messages.getString("GenericContainerInstantiator.ID_Cannot_Be_Null")); //$NON-NLS-1$ if (arg instanceof ID) return (ID) arg; if (arg instanceof String) { String val = (String) arg; if (val.eq...
protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionCreateException { debug("createClientConnection:" + remoteSpace + ":" + data); ISynchAsynchConnection conn = new Client(receiver,keepAlive); return conn; }
protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionCreateException { debug("createClientConnection:" + remoteSpace + ":" + data); //$NON-NLS-1$ //$NON-NLS-2$ ISynchAsynchConnection conn = new Client(receiver,keepAlive); return conn; ...
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("GMM").append(mySet); return sb.toString(); }
public String toString() { StringBuffer sb = new StringBuffer(); sb.append("GMM").append(mySet); //$NON-NLS-1$ return sb.toString(); }
public final String getBeanName() { if (beanName == null) { beanName = getBeanNameOfClass(getSpringContext(), getBeanType()); } return beanName; }
public final String getBeanName() { if (beanName == null || "".equals(beanName)) { beanName = getBeanNameOfClass(getSpringContext(), getBeanType()); } return beanName; }
public static void clearIncrementalStates() { for (Iterator iter = incrementalStates.values().iterator(); iter.hasNext();) { AjState element = (AjState) iter.next(); element.wipeAllKnowledge(); } incrementalStates.clear(); AsmManager.getDefault().createNewASM(null); // forget what you know... }
public static void clearIncrementalStates() { for (Iterator iter = incrementalStates.values().iterator(); iter.hasNext();) { AjState element = (AjState) iter.next(); element.wipeAllKnowledge(); } incrementalStates.clear(); AsmManager.getDefault().createNewASM(); // forget what you know... }
public void configureId(Object element, Attributes attr) { String id = attr.getValue("id"); if (id != null) { project.addReference(id, element); } }
public void configureId(Object element, Attributes attr) { String id = attr.getValue("id"); if (id != null) { project.addIdReference(id, element); } }
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public void setVisible (boolean visible) { checkWidget(); if ((OS.GTK_WIDGET_MAPPED (shellHandle) == visible)) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; /* * In order to ensure that the shell is visible * and fully painted, dispatch events such as * GDK_MAP and GDK_CONFIGUR...
public Component remove(final IBehavior behavior) { if (behavior == null) { throw new IllegalArgumentException("Argument `behavior` cannot be null"); } if (behaviors == null || !behaviors.contains(behavior)) { throw new IllegalStateException( "Tried to remove a behavior that was not added to the ...
public Component remove(final IBehavior behavior) { if (behavior == null) { throw new IllegalArgumentException("Argument `behavior` cannot be null"); } if (!behaviors.contains(behavior)) { throw new IllegalStateException( "Tried to remove a behavior that was not added to the component. Behavior: ...
public IContainer createContainer() throws ContainerCreateException { try { IContainer container = ContainerFactory.getDefault().createContainer(getFactoryName(), getContainerID()); IStorableContainerAdapter containerAdapter = (IStorableContainerAdapter) container.getAdapter(IStorableContainerAdapter.class); ...
public IContainer createContainer() throws ContainerCreateException { try { IContainer container = ContainerFactory.getDefault().createContainer(getFactoryName(), getContainerID()); IStorableContainerAdapter containerAdapter = (IStorableContainerAdapter) container.getAdapter(IStorableContainerAdapter.class); ...
public static CharSequence escapeMarkup(final String s, final boolean escapeSpaces, final boolean convertToHtmlUnicodeEscapes) { if (s == null) { return null; } else { int len = s.length(); final AppendingStringBuffer buffer = new AppendingStringBuffer((int)(len * 1.1)); for (int i = 0; i < l...
public static CharSequence escapeMarkup(final String s, final boolean escapeSpaces, final boolean convertToHtmlUnicodeEscapes) { if (s == null) { return null; } else { int len = s.length(); final AppendingStringBuffer buffer = new AppendingStringBuffer((int)(len * 1.1)); for (int i = 0; i < l...
protected Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps) { super.flush(rowMgr, psMgr, exceps); BatchingPreparedStatementManagerImpl bPsMgr = (BatchingPreparedStatementManagerImpl) psMgr; try { bPsMgr.flushBatch(); ...
protected Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps) { exceps = super.flush(rowMgr, psMgr, exceps); BatchingPreparedStatementManagerImpl bPsMgr = (BatchingPreparedStatementManagerImpl) psMgr; try { bPsMgr.flushBatch(...
protected Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps) { super.flush(rowMgr, psMgr, exceps); BatchingPreparedStatementManagerImpl bPsMgr = (BatchingPreparedStatementManagerImpl) psMgr; try { bPsMgr.flushBatch(); ...
protected Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps) { exceps = super.flush(rowMgr, psMgr, exceps); BatchingPreparedStatementManagerImpl bPsMgr = (BatchingPreparedStatementManagerImpl) psMgr; try { bPsMgr.flushBatch...
public void createAndConnectClient(final String containerType, String uri, String nickname, final Object connectData, final IResource resource) throws Exception { // First create the new container instance final IContainer newClient = ContainerFactory.getDefault() .createContainer(containerType); // G...
public void createAndConnectClient(final String containerType, String uri, String nickname, final Object connectData, final IResource resource) throws Exception { // First create the new container instance final IContainer newClient = ContainerFactory.getDefault() .createContainer(containerType); // G...
public Object getReferencedObject(Project project) throws BuildException { if (refid == null) { throw new BuildException("No reference specified"); } Object o = project.getReferences().get(refid); if (o == null) { throw new BuildException("Refernce "+...
public Object getReferencedObject(Project project) throws BuildException { if (refid == null) { throw new BuildException("No reference specified"); } Object o = project.getReferences().get(refid); if (o == null) { throw new BuildException("Reference "...
public ComponentReferenceApplication() { getPages().setHomePage(Index.class); getSettings().setThrowExceptionOnMissingResource(false); }
public ComponentReferenceApplication() { getRequiredPageSettings().setHomePage(Index.class); getSettings().setThrowExceptionOnMissingResource(false); }
public DisplaytagApplication() { getPages().setHomePage(DisplaytagIndex.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public DisplaytagApplication() { getRequiredPageSettings().setHomePage(DisplaytagIndex.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public EncodingsApplication() { getPages().setHomePage(Home.class); }
public EncodingsApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public GuestBookApplication() { getPages().setHomePage(GuestBook.class); }
public GuestBookApplication() { getRequiredPageSettings().setHomePage(GuestBook.class); }
public HangmanApplication() { getPages().setHomePage(Home.class); }
public HangmanApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public HelloBrowserApplication() { getPages().setHomePage(HelloBrowser.class); }
public HelloBrowserApplication() { getRequiredPageSettings().setHomePage(HelloBrowser.class); }
public HelloWorldApplication() { getPages().setHomePage(HelloWorld.class); }
public HelloWorldApplication() { getRequiredPageSettings().setHomePage(HelloWorld.class); }
public ImagesApplication() { getPages().setHomePage(Home.class); }
public ImagesApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public LinkomaticApplication() { getPages().setHomePage(Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); }
public LinkomaticApplication() { getRequiredPageSettings().setHomePage(Home.class); getSharedResources().add("cancelButton", new DefaultButtonImageResource("Cancel")); }
public NavomaticApplication() { getPages().setHomePage(Page1.class); }
public NavomaticApplication() { getRequiredPageSettings().setHomePage(Page1.class); }
public NestedApplication() { getPages().setHomePage(Home.class); }
public NestedApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public NiceUrlApplication() { super(); getPages().setHomePage(Home.class); // mount single bookmarkable pages mountBookmarkablePage("/the/homepage/path", Home.class); mountBookmarkablePage("/a/nice/path/to/the/first/page", Page1.class); mountBookmarkablePage("/path/to/page2", Page2.class); // mount a ...
public NiceUrlApplication() { super(); getRequiredPageSettings().setHomePage(Home.class); // mount single bookmarkable pages mountBookmarkablePage("/the/homepage/path", Home.class); mountBookmarkablePage("/a/nice/path/to/the/first/page", Page1.class); mountBookmarkablePage("/path/to/page2", Page2.class);...
public final void onSubmit() { if (signIn(getUsername(), getPassword())) { // If login has been called because the user was not yet // logged in, than continue to the original destination, // otherwise to the Home page if (!getPage().continueToOriginalDestination()) { setResponsePage(...
public final void onSubmit() { if (signIn(getUsername(), getPassword())) { // If login has been called because the user was not yet // logged in, than continue to the original destination, // otherwise to the Home page if (!getPage().continueToOriginalDestination()) { setResponsePage(...
public PubApplication() { getPages().setHomePage(Home.class); }
public PubApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public RepeaterApplication() { getPages().setHomePage(Index.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public RepeaterApplication() { getRequiredPageSettings().setHomePage(Index.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public SignInApplication() { getPages().setHomePage(Home.class); }
public SignInApplication() { getRequiredPageSettings().setHomePage(Home.class); }
public SignIn2Application() { getPages().setHomePage(Home.class); }
public SignIn2Application() { getRequiredPageSettings().setHomePage(Home.class); }
public StockQuoteApplication() { getPages().setHomePage(StockQuotePage.class); }
public StockQuoteApplication() { getRequiredPageSettings().setHomePage(StockQuotePage.class); }
public TemplateApplication() { getPages().setHomePage(Page1.class); }
public TemplateApplication() { getRequiredPageSettings().setHomePage(Page1.class); }
public UploadApplication() { getPages().setHomePage(UploadPage.class); getSettings().setThrowExceptionOnMissingResource(false); }
public UploadApplication() { getRequiredPageSettings().setHomePage(UploadPage.class); getSettings().setThrowExceptionOnMissingResource(false); }
protected void onComponentTag(final ComponentTag tag) { // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup group = (CheckGroup)findParent(CheckGroup.class); String path = getPath(); if (group == null) ...
protected void onComponentTag(final ComponentTag tag) { // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup group = (CheckGroup)findParent(CheckGroup.class); String path = getPath(); if (group == null) ...
CharSequence pathForTarget(IRequestTarget requestTarget); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may ...
CharSequence pathForTarget(IRequestTarget requestTarget); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may ...
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 homePageClass = application.getHomePage(...
CharSequence encode(IRequestTarget requestTarget); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain ...
CharSequence encode(IRequestTarget requestTarget); /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain ...
protected void handleMessage(String message) { // XXX this should call the view back to display the message/do other things, etc System.out.println("GOT MESSAGE: " + message); }
protected void handleMessage(String message) { // XXX this should call the view back to display the message/do other things, etc System.out.println("RosterSharedObject.handleMessage(" + message + ")"); }
protected void parseMemberMappingAnnotations(FieldMetaData fmd) { FieldMapping fm = (FieldMapping) fmd; AnnotatedElement el = (AnnotatedElement) getRepository(). getMetaDataFactory().getDefaults().getBackingMember(fmd); MappingTag tag; for (Annotation anno : el.getDeclar...
protected void parseMemberMappingAnnotations(FieldMetaData fmd) { FieldMapping fm = (FieldMapping) fmd; AnnotatedElement el = (AnnotatedElement) getRepository(). getMetaDataFactory().getDefaults().getBackingMember(fmd); MappingTag tag; for (Annotation anno : el.getDeclar...
private void checkWeaveAccess(TypeX typeX, AstNode location) { World world = inAspect.world; Lint.Kind check = world.getLint().typeNotExposedToWeaver; if (check.isEnabled()) { if (!world.resolve(typeX).isExposedToWeaver()) { ISourceLocation loc = null; if (location != null) { loc = new EclipseSou...
private void checkWeaveAccess(TypeX typeX, AstNode location) { World world = inAspect.world.getWorld(); Lint.Kind check = world.getLint().typeNotExposedToWeaver; if (check.isEnabled()) { if (!world.resolve(typeX).isExposedToWeaver()) { ISourceLocation loc = null; if (location != null) { loc = new...
public static String makeClosureClassName( BcelObjectType enclosingType, int index)
public static String makeClosureClassName( TypeX enclosingType, int index)
private boolean canInline(Shadow s) { if (attribute.isProceedInInners()) return false; //XXX this guard seems to only be needed for bad test cases if (concreteAspect == null || concreteAspect == ResolvedTypeX.MISSING) return false; if (concreteAspect.getWorld().isXnoInline()) return false; //...
private boolean canInline(Shadow s) { if (attribute.isProceedInInners()) return false; //XXX this guard seems to only be needed for bad test cases if (concreteAspect == null || concreteAspect == ResolvedTypeX.MISSING) return false; if (concreteAspect.getWorld().isXnoInline()) return false; //...
public ISourceLocation makeSourceLocation(IHasPosition position) { String fileName = sourceFileName; if (fileName == null) inObject.getJavaClass().getFileName(); if (fileName == null) fileName = inObject.getName() + ".class"; if (lineBreaks != null) { int line = Arrays.binarySearch(lineBreaks, position.g...
public ISourceLocation makeSourceLocation(IHasPosition position) { String fileName = sourceFileName; if (fileName == null) inObject.getJavaClass().getFileName(); if (fileName == null) fileName = inObject.getResolvedTypeX().getName() + ".class"; if (lineBreaks != null) { int line = Arrays.binarySearch(lin...
public LazyMethodGen(Method m, LazyClassGen enclosingClass) { this.enclosingClass = enclosingClass; if (!(m.isAbstract() || m.isNative()) && m.getCode() == null) { throw new RuntimeException("bad non-abstract method with no code: " + m + " on " + enclosingClass); } if ((m.is...
public LazyMethodGen(Method m, LazyClassGen enclosingClass) { this.enclosingClass = enclosingClass; if (!(m.isAbstract() || m.isNative()) && m.getCode() == null) { throw new RuntimeException("bad non-abstract method with no code: " + m + " on " + enclosingClass); } if ((m.is...
protected void weaveTestInner( BcelWeaver weaver, UnwovenClassFile classFile, String name, String outName) throws IOException { //int preErrors = currentResult.errorCount(); BcelObjectType classType = (BcelObjectType) world.resolve(classFile.getClassName()); LazyClassGen gen = weaver.weave(classFi...
protected void weaveTestInner( BcelWeaver weaver, UnwovenClassFile classFile, String name, String outName) throws IOException { //int preErrors = currentResult.errorCount(); BcelObjectType classType = BcelWorld.getBcelObjectType(world.resolve(classFile.getClassName())); LazyClassGen gen = weaver.w...
private void createServersFromExtensionRegistry(IExtensionRegistry registry) throws Exception { final IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT); if (extensionPoint == null) return; final IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); final Li...
private void createServersFromExtensionRegistry(IExtensionRegistry registry) throws Exception { final IExtensionPoint extensionPoint = registry.getExtensionPoint(EXTENSION_POINT); if (extensionPoint == null) return; final IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); final Li...
public static URL getFileURL(File file) { LangUtil.throwIaxIfNull(file, "file"); URL result = null; try { result = file.toURI().toURL(); if (null != result) { return result; } String url = "file:" + file.getAbsolutePath().replace('\...
public static URL getFileURL(File file) { LangUtil.throwIaxIfNull(file, "file"); URL result = null; try { result = file.toURL();//TODO AV - was toURI.toURL that does not works on Java 1.3 if (null != result) { return result; } String...
public PerClause concretize(ResolvedTypeX inAspect) { PerObject ret = new PerObject(entry, isThis); ret.inAspect = inAspect; if (inAspect.isAbstract()) return ret; World world = inAspect.getWorld(); Pointcut concreteEntry = entry.concretize(inAspect, 0, null); //concreteEntry = new AndPointcut(...
public PerClause concretize(ResolvedTypeX inAspect) { PerObject ret = new PerObject(entry, isThis); ret.inAspect = inAspect; if (inAspect.isAbstract()) return ret; World world = inAspect.getWorld(); Pointcut concreteEntry = entry.concretize(inAspect, 0, null); //concreteEntry = new AndPointcut(...
protected void runProject(Server s, com.starbase.starteam.Project p) { View[] views = p.getViews(); for (int i = 0; i < views.length; i++) { View v = views[i]; if (v.getName().equals(getViewName())) { if (getVerbose()) {...
protected void runProject(Server s, com.starbase.starteam.Project p) { View[] views = p.getViews(); for (int i = 0; i < views.length; i++) { View v = views[i]; if (v.getName().equals(getViewName())) { if (getVerbose()) {...
public void addSchema(ClassMapping mapping, SchemaGroup group) { // Since the table is created by openjpa internally // we can create the table for each schema within the PU // in here. Schema[] schemas = group.getSchemas(); for (int i = 0; i < schemas.length; i++) {...
public void addSchema(ClassMapping mapping, SchemaGroup group) { // Since the table is created by openjpa internally // we can create the table for each schema within the PU // in here. Schema[] schemas = group.getSchemas(); for (int i = 0; i < schemas.length; i++) {...
protected void internalDestroy() { // Clear caches of Class keys so the classloader can be garbage // collected (WICKET-625) PropertyResolver.destroy(this); getMarkupSettings().getMarkupCache().clear(); onDestroy(); callDestroyers(); applicationKeyToApplication.remove(getApplicationKey()); }
protected void internalDestroy() { // Clear caches of Class keys so the classloader can be garbage // collected (WICKET-625) PropertyResolver.destroy(this); getMarkupSettings().getMarkupCache().shutdown(); onDestroy(); callDestroyers(); applicationKeyToApplication.remove(getApplicationKey()); }
public static Set<String> getSupportedQueryHints() { Set<String> result = new TreeSet<String>(); // most specific to least for (int i = _derivations.length - 1; i >= 0; i--) { Set<String> members = _derivations[i].getSupportedQueryHints(); if (members != null || !memb...
public static Set<String> getSupportedQueryHints() { Set<String> result = new TreeSet<String>(); // most specific to least for (int i = _derivations.length - 1; i >= 0; i--) { Set<String> members = _derivations[i].getSupportedQueryHints(); if (members != null && !memb...
protected boolean handleSharedObjectMsgEvent(ISharedObjectMessageEvent event) { traceEntering("handleSharedObjectMsgEvent", event); //$NON-NLS-1$ boolean result = false; if (event instanceof ISharedObjectCreateResponseEvent) result = handleSharedObjectCreateResponseEvent((ISharedObjectCreateResponseEvent) eve...
protected boolean handleSharedObjectMsgEvent(ISharedObjectMessageEvent event) { traceEntering("handleSharedObjectMsgEvent", event); //$NON-NLS-1$ boolean result = false; if (event instanceof ISharedObjectCreateResponseEvent) result = handleSharedObjectCreateResponseEvent((ISharedObjectCreateResponseEvent) eve...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterContext jmctx = JMeterContextService.getContext(); JMeterVariables vars = jmctx.getVariables(); String script = ((CompoundVariable) values[0]).execute...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { JMeterContext jmctx = JMeterContextService.getContext(); JMeterVariables vars = jmctx.getVariables(); String script = ((CompoundVariable) values[0]).execute...
protected void writeCentralFileHeader(ZipEntry ze) throws IOException { out.write(CFH_SIG.getBytes()); written += 4; // version made by out.write((new ZipShort(20)).getBytes()); written += 2; // version needed to extract // general purpose bit flag i...
protected void writeCentralFileHeader(ZipEntry ze) throws IOException { out.write(CFH_SIG.getBytes()); written += 4; // version made by out.write((new ZipShort((ze.getPlatform() << 8) | 20)).getBytes()); written += 2; // version needed to extract // general ...
public void displayStatusInformation(String message) { System.out.println("> status message: " + message); }
public void displayStatusInformation(String message) { System.out.println("> NullIdeUIAdapter status : " + message); }
public boolean matches(ResolvedMember rm,World world) { return sigPattern.matches(rm,world); }
public boolean matches(ResolvedMember rm,World world) { return sigPattern.matches(rm,world,false); }
protected FuzzyBoolean matchInternal(Shadow shadow) { //This will not match code in local or anonymous classes as if //they were withincode of the outer signature return FuzzyBoolean.fromBoolean( signature.matches(shadow.getEnclosingCodeSignature(), shadow.getIWorld())); }
protected FuzzyBoolean matchInternal(Shadow shadow) { //This will not match code in local or anonymous classes as if //they were withincode of the outer signature return FuzzyBoolean.fromBoolean( signature.matches(shadow.getEnclosingCodeSignature(), shadow.getIWorld(), false)); }
private void checkMatch(SignaturePattern p, Member member, boolean b) { boolean matches = p.matches(member, world); assertEquals(p.toString() + " matches " + member.toString(), b, matches); }
private void checkMatch(SignaturePattern p, Member member, boolean b) { boolean matches = p.matches(member, world,false); assertEquals(p.toString() + " matches " + member.toString(), b, matches); }
protected boolean resolveComponent(final RequestCycle cycle, final MarkupStream markupStream, final ComponentTag tag) { // If it's a [body] tag if (!tag.getComponentName().equals("[body]") && !(markupStream.atOpenTag("region") && "body".equalsIgnoreCase(((ComponentWicketTag)tag).getNa...
protected boolean resolveComponent(final RequestCycle cycle, final MarkupStream markupStream, final ComponentTag tag) { // If it's a [body] tag if (!tag.getComponentName().equals("[body]") && !(markupStream.atOpenCloseTag("region") && "body".equalsIgnoreCase(((ComponentWicketTag)tag).g...
public void setAlpha (int alpha) { if (window == null) return; checkWidget (); alpha &= 0xFF; window.setAlphaValue (alpha / 255f); } void setBounds (int x, int y, int width, int height, boolean move, boolean resize) { // Embedded Shells are not resizable. if (window == null) return; if (fullScreen) setFullScre...
public void setAlpha (int alpha) { if (window == null) return; checkWidget (); alpha &= 0xFF; window.setAlphaValue (alpha / 255f); } void setBounds (int x, int y, int width, int height, boolean move, boolean resize) { // Embedded Shells are not resizable. if (window == null) return; if (fullScreen) setFullScre...
private static final String[] N2A_CLASSNAMES = new String[] { "gnu.classpath.tools.native2ascii.Native2Ascii", // pre Kaffe 1.1.5 "kaffe.tools.native2ascii.Native2Ascii", };
private static final String[] N2A_CLASSNAMES = new String[] { "gnu.classpath.tools.native2ascii.Native2ASCII", // pre Kaffe 1.1.5 "kaffe.tools.native2ascii.Native2Ascii", };
public <E, C extends Collection<E>> Predicate isMember(Expression<E> e, Expression<C> c) { return new Expressions.IsMember<E>(e.getJavaType(), e, c); }
public <E, C extends Collection<E>> Predicate isMember(Expression<E> e, Expression<C> c) { return new Expressions.IsMember<E>((Class<E>)e.getJavaType(), e, c); }
public static void addMarker(final IFile file, final AnalysationIssue issue) { try { final IMarker marker = file.createMarker(getMARKER_TYPE()); final int severity = IMarker.SEVERITY_ERROR; int start = -1, end = -1; if (issue.getElement() != null) { ...
public static void addMarker(final IFile file, final AnalysationIssue issue) { try { final IMarker marker = file.createMarker(getMARKER_TYPE()); final int severity = issue.isError() ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING; int start = -1, end = -1; ...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); Text text = new Text (shell, SWT.BORDER | SWT.V_SCROLL); text.setBounds (10, 10, 100, 100); for (int i=0; i<16; i++) { text.append ("Line " + i + "\n"); } shell.open (); text.setSelection (30, 32); ...
public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); Text text = new Text (shell, SWT.BORDER | SWT.V_SCROLL); text.setBounds (10, 10, 100, 100); for (int i=0; i<16; i++) { text.append ("Line " + i + "\n"); } shell.open (); text.setSelection (30, 38); ...
public void buildFinished(BuildEvent event) { Throwable error = event.getException(); if (error == null) { out.println(lSep + "BUILD SUCCESSFUL"); } else { err.println(lSep + "BUILD FAILED" + lSep); if (Project.MSG_VERBOSE <= msgOutputLevel || ...
public void buildFinished(BuildEvent event) { Throwable error = event.getException(); if (error == null) { out.println(lSep + "BUILD SUCCESSFUL"); } else { err.println(lSep + "BUILD FAILED" + lSep); if (Project.MSG_VERBOSE <= msgOutputLevel || ...
protected void onRender(final MarkupStream markupStream) { // Set page's associated markup stream final MarkupStream associatedMarkupStream = new MarkupStream(getAssociatedMarkup(true)); setMarkupStream(associatedMarkupStream); // Configure response object with locale and content type configureResponse(); ...
protected void onRender(final MarkupStream markupStream) { // Set page's associated markup stream final MarkupStream associatedMarkupStream = new MarkupStream(getMarkupFragment()); setMarkupStream(associatedMarkupStream); // Configure response object with locale and content type configureResponse(); // ...
public final void testBalancing() throws IOException, ResourceStreamNotFoundException { // Note: <img> is one of these none-balanced HTML tags MarkupFragment markup = parse("<span wicket:id=\"span\"><img wicket:id=\"img\"><span wicket:id=\"span2\"></span></span>"); ComponentTag t = markup.getTag(0); assert...
public final void testBalancing() throws IOException, ResourceStreamNotFoundException { // Note: <img> is one of these none-balanced HTML tags MarkupFragment markup = parse("<span wicket:id=\"span\"><img wicket:id=\"img\"><span wicket:id=\"span2\"></span></span>"); ComponentTag t = markup.getTag(); assertE...
public void testRenderHomePage_1() throws Exception { boolean hit = false; try { executeTest(PanelPage_1.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().indexOf("did not have a close tag") != -1); assertTru...
public void testRenderHomePage_1() throws Exception { boolean hit = false; try { executeTest(PanelPage_1.class, "Dummy.html"); } catch (MarkupException mex) { hit = true; assertNotNull(mex.getMarkupStream()); assertTrue(mex.getMessage().indexOf("does not have a close tag") != -1); assertTr...
public Class< ? extends Page< ? >> getHomePage() { return Index.class; } }
public Class< ? extends Page> getHomePage() { return Index.class; } }
protected void onUpdate(AjaxRequestTarget target) { label.setModelObject(getValue(field.getModelObjectAsString())); target.addComponent(label); } }; field.add(onChangeAjaxBehavior); }
protected void onUpdate(AjaxRequestTarget target) { label.setDefaultModelObject(getValue(field.getDefaultModelObjectAsString())); target.addComponent(label); } }; field.add(onChangeAjaxBehavior); }
protected void populateItem(ListItem item) { item.add(new Label("name", item.getModelObjectAsString())); } }; datacontainer.add(listview); datacontainer.add(new AjaxPagingNavigator("navigator", listview)); datacontainer.setVersioned(false); }
protected void populateItem(ListItem item) { item.add(new Label("name", item.getDefaultModelObjectAsString())); } }; datacontainer.add(listview); datacontainer.add(new AjaxPagingNavigator("navigator", listview)); datacontainer.setVersioned(false); }
public void onClick() { RatingModel rating = (RatingModel)getModelObject(); rating.nrOfVotes = 0; rating.rating = 0; rating.sumOfRatings = 0; } }
public void onClick() { RatingModel rating = (RatingModel)getDefaultModelObject(); rating.nrOfVotes = 0; rating.rating = 0; rating.sumOfRatings = 0; } }
public class BasePage extends WicketExamplePage /* * 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 ...
public class BasePage extends WicketExamplePage /* * 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 ...
public class HomePage extends BasePage /* * 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 License, ...
public class HomePage extends BasePage /* * 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 License, ...
public class BasePage extends WicketExamplePage /* * 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 ...
public class BasePage extends WicketExamplePage /* * 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 ...