buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public IRequestableComponent getComponent(); }
IRequestableComponent getComponent(); /* * 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, V...
public IRequestablePage getPage(); }
IRequestablePage getPage(); /* * 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, Version 2.0...
public void doAction(ActionEvent e) throws IllegalUserActionException { HashTree subTree = null; if (!commands.contains(e.getActionCommand())) { throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand()); } if (e.getActionCommand().equals(SAVE_AS...
public void doAction(ActionEvent e) throws IllegalUserActionException { HashTree subTree = null; if (!commands.contains(e.getActionCommand())) { throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand()); } if (e.getActionCommand().equals(SAVE_AS...
private ClassMetaData getPersistenceCapableOwner(String fieldName, Class owner) { // find the actual ancestor class that declares the field, then // check if the class is persistent, and if the field is managed Field f = Reflection.findField(owner, fieldName, false); if (f ==...
private ClassMetaData getPersistenceCapableOwner(String fieldName, Class owner) { // find the actual ancestor class that declares the field, then // check if the class is persistent, and if the field is managed Field f = Reflection.findField(owner, fieldName, false); if (f ==...
* public = anyURI * system = anyURI * {any attributes with non-schema namespace . . .}> * Content: (annotation?) * </notation> * * @version $Id$ */ class XSDNotationTraverser extends XSDAbstractTraverser{ XSDNotationTraverser (XSDHandler handler, XMLErrorReporter errorRe...
* public = anyURI * system = anyURI * {any attributes with non-schema namespace . . .}> * Content: (annotation?) * </notation> * * @version $Id$ */ class XSDNotationTraverser extends XSDAbstractTraverser{ XSDNotationTraverser (XSDHandler handler, XMLErrorReporter errorRe...
String FILE_PROTOCOL_PREFIX = "file://"; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
String FILE_PROTOCOL_PREFIX = "file://"; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2000-2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
public void widgetSelected (SelectionEvent event) { recreateExampleWidgets (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayou...
public void widgetSelected (SelectionEvent event) { recreateExampleWidgets (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayou...
protected void configurePipeline() { // create appropriate scanner // and register it as one of the components. if (fFeatures.get(NAMESPACES) == Boolean.TRUE) { if (fNamespaceScanner == null) { fNamespaceScanner = new XMLNSDocumentScannerImpl(); ad...
protected void configurePipeline() { // create appropriate scanner // and register it as one of the components. if (fFeatures.get(NAMESPACES) == Boolean.TRUE) { if (fNamespaceScanner == null) { fNamespaceScanner = new XMLNSDocumentScannerImpl(); ad...
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = hItem; OS.SendMessage (handle, OS.TVM_G...
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = hItem; OS.SendMessage (handle, OS.TVM_G...
public TableItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); int index = (point.y - getHeaderHeight ()) / itemHeight - topIndex; if (!(0 <= index && index < itemsCount)) return null; /* below the last item */ TableItem result = items [index]; if (!result.getHitBoun...
public TableItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); int index = (point.y - getHeaderHeight ()) / itemHeight + topIndex; if (!(0 <= index && index < itemsCount)) return null; /* below the last item */ TableItem result = items [index]; if (!result.getHitBoun...
public TreeItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); int index = (point.y - getHeaderHeight ()) / itemHeight - topIndex; if (!(0 <= index && index < availableItemsCount)) return null; /* below the last item */ TreeItem result = availableItems [index]; if (!r...
public TreeItem getItem (Point point) { checkWidget (); if (point == null) error (SWT.ERROR_NULL_ARGUMENT); int index = (point.y - getHeaderHeight ()) / itemHeight + topIndex; if (!(0 <= index && index < availableItemsCount)) return null; /* below the last item */ TreeItem result = availableItems [index]; if (!r...
void setResourceStreamFactory(IResourceStreamFactory resourceStreamFactory); /* * 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 ...
void setResourceStreamFactory(IResourceStreamFactory resourceStreamFactory); /* * 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 ...
private void checkGetRequest_Parameters( HTTPSamplerBase sampler, HTTPSampleResult res, String contentEncoding, URL executedUrl, String titleField, String titleValue, String descriptionField, String descriptionValue, ...
private void checkGetRequest_Parameters( HTTPSamplerBase sampler, HTTPSampleResult res, String contentEncoding, URL executedUrl, String titleField, String titleValue, String descriptionField, String descriptionValue, ...
public void setUp() { setUp(EmbedOwner.class, EmbedValue.class, CLEAR_TABLES ,"openjpa.Log","SQL=trace" ); }
public void setUp() { setUp(EmbedOwner.class, EmbedValue.class, CLEAR_TABLES // ,"openjpa.Log","SQL=trace" ); }
private int scanMatchingName(int ch, int b0, int fastcheck) throws Exception { SymbolCache cache = fStringPool.getSymbolCache(); int[][] cacheLines = cache.fCacheLines; char[] symbolChars = cache.fSymbolChars; boolean lengthOfOne = fastcheck == fMostRecentByte; int startOffse...
private int scanMatchingName(int ch, int b0, int fastcheck) throws Exception { SymbolCache cache = fStringPool.getSymbolCache(); int[][] cacheLines = cache.fCacheLines; char[] symbolChars = cache.fSymbolChars; boolean lengthOfOne = fastcheck == fMostRecentByte; int startOffse...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); int /*long*/ newFont, oldFont = 0; int /*long*/ hDC = OS.GetDC (handle); newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObjec...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); int /*long*/ newFont, oldFont = 0; int /*long*/ hDC = OS.GetDC (handle); newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObjec...
public static void main(String argv[]) { // too fee parameters if (argv.length < 4) { printUsage(); System.exit(1); } // get DOM implementation DOMImplementationAS domImpl = (DOMImplementationAS)DOMImplementationImpl.getDOMImplementation(); //...
public static void main(String argv[]) { // too fee parameters if (argv.length < 2) { printUsage(); System.exit(1); } // get DOM implementation DOMImplementationAS domImpl = (DOMImplementationAS)DOMImplementationImpl.getDOMImplementation(); //...
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta, boolean explicit) { BrokerImpl broker = manager.getBroker(); StateManagerImpl sm; if (_embedded) { if (_di...
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta, boolean explicit) { BrokerImpl broker = manager.getBroker(); StateManagerImpl sm; if (_embedded) { if (_di...
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta, boolean explicit) { BrokerImpl broker = manager.getBroker(); PersistenceCapable pc = ImplHelper.toPersistenceCapable(toAttach,...
public Object attach(AttachManager manager, Object toAttach, ClassMetaData meta, PersistenceCapable into, OpenJPAStateManager owner, ValueMetaData ownerMeta, boolean explicit) { BrokerImpl broker = manager.getBroker(); PersistenceCapable pc = ImplHelper.toPersistenceCapable(toAttach,...
public void run() { if (!display.isDisposed() && !browser.isDisposed()) listener.changed(progress); } } ); } /* * Note. numberWithInt uses autorelease. The resulting object * does not need to be released. * identifier = [NSNumber numberWithInt: resourceCount++] */ int identifier = Coc...
public void run() { if (!display.isDisposed() && !browser.isDisposed()) listener.changed(progress); } } ); } /* * Note. numberWithInt uses autorelease. The resulting object * does not need to be released. * identifier = [NSNumber numberWithInt: resourceCount++] */ int identifier = Coc...
public String open () { String directoryPath = null; int titlePtr = 0; int messagePtr = 0; if (title != null) { char [] buffer = new char [title.length ()]; title.getChars (0, buffer.length, buffer, 0); titlePtr = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, buffer.length); } char [] bu...
public String open () { String directoryPath = null; int titlePtr = 0; int messagePtr = 0; if (title != null) { char [] buffer = new char [title.length ()]; title.getChars (0, buffer.length, buffer, 0); titlePtr = OS.CFStringCreateWithCharacters (OS.kCFAllocatorDefault, buffer, buffer.length); } char [] bu...
public void execute() throws BuildException { log("DEPRECATED - The copydir task is deprecated. Use copy instead."); if (srcDir == null) { throw new BuildException("src attribute must be set!", location); } if (!srcDir.exists()) { ...
public void execute() throws BuildException { log("DEPRECATED - The copydir task is deprecated. Use copy instead."); if (srcDir == null) { throw new BuildException("src attribute must be set!", location); } if (!srcDir.exists()) { ...
public void execute() throws BuildException { log("DEPRECATED - The copyfile task is deprecated. Use copy instead."); if (srcFile == null) { throw new BuildException("The src attribute must be present.", location); } if (!s...
public void execute() throws BuildException { log("DEPRECATED - The copyfile task is deprecated. Use copy instead."); if (srcFile == null) { throw new BuildException("The src attribute must be present.", location); } if (!s...
public void execute() throws BuildException { if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) { throw new BuildException("The genkey task is only available on JDK" + " versions 1.2 or greater"); } if (null == alias) { throw...
public void execute() throws BuildException { if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) { throw new BuildException("The genkey task is only available on JDK" + " versions 1.2 or greater"); } if (null == alias) { throw...
public void execute () throws BuildException { InputRequest request = null; if (validargs != null) { Vector accept = StringUtils.split(validargs, ','); request = new MultipleChoiceInputRequest(message, accept); } else { request = new InputRequest(message);...
public void execute () throws BuildException { InputRequest request = null; if (validargs != null) { Vector accept = StringUtils.split(validargs, ','); request = new MultipleChoiceInputRequest(message, accept); } else { request = new InputRequest(message);...
protected void addDefinition(String name, Class c) throws BuildException { project.addTaskDefinition(name, c); }
protected void addDefinition(String name, Class c) throws BuildException { getProject().addTaskDefinition(name, c); }
protected void addDefinition(String name, Class c) throws BuildException { project.addDataTypeDefinition(name, c); }
protected void addDefinition(String name, Class c) throws BuildException { getProject().addDataTypeDefinition(name, c); }
public void execute() throws BuildException { File savedDir = m_dir;// may be altered in validate try { validate(); final Properties userList = new Properties(); loadUserlist(userList); for (Enumeration e = m_cvsUsers.elements(); e...
public void execute() throws BuildException { File savedDir = m_dir;// may be altered in validate try { validate(); final Properties userList = new Properties(); loadUserlist(userList); for (Enumeration e = m_cvsUsers.elements(); e...
public void execute() throws BuildException { // first off, make sure that we've got a from and to extension if (fromExtension == null || toExtension == null || srcDir == null) { throw new BuildException("srcDir, fromExtension and toExtension " + "attributes must be set...
public void execute() throws BuildException { // first off, make sure that we've got a from and to extension if (fromExtension == null || toExtension == null || srcDir == null) { throw new BuildException("srcDir, fromExtension and toExtension " + "attributes must be set...
public final void setCcmDir(String dir) { ccmDir = project.translatePath(dir); }
public final void setCcmDir(String dir) { ccmDir = getProject().translatePath(dir); }
public final void setClearToolDir(String dir) { m_ClearToolDir = project.translatePath(dir); }
public final void setClearToolDir(String dir) { m_ClearToolDir = getProject().translatePath(dir); }
public void execute() throws BuildException { if (srcDir == null) { srcDir = project.resolveFile("."); } //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner(srcDir); String[] dependencies = scanner.getIncludedFiles(); ...
public void execute() throws BuildException { if (srcDir == null) { srcDir = getProject().resolveFile("."); } //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner(srcDir); String[] dependencies = scanner.getIncludedFiles(); ...
public Path createClasspath() { if (this.classpath == null) { this.classpath = new Path(project); } return this.classpath.createPath(); }
public Path createClasspath() { if (this.classpath == null) { this.classpath = new Path(getProject()); } return this.classpath.createPath(); }
public Path createClasspath() { if (config.classpath == null) { config.classpath = new Path(project); }
public Path createClasspath() { if (config.classpath == null) { config.classpath = new Path(getProject()); }
public Path createClasspath() { if (classpath == null) { classpath = new Path(project); } return classpath.createPath(); }
public Path createClasspath() { if (classpath == null) { classpath = new Path(getProject()); } return classpath.createPath(); }
protected void importFileset(FileSet fileset) { DirectoryScanner ds = fileset.getDirectoryScanner(this.project); if (ds.getIncludedFiles().length == 0) { return; } String[] includes = null; String[] excludes = null; // Hack to get includes and excludes. ...
protected void importFileset(FileSet fileset) { DirectoryScanner ds = fileset.getDirectoryScanner(this.getProject()); if (ds.getIncludedFiles().length == 0) { return; } String[] includes = null; String[] excludes = null; // Hack to get includes and exclu...
public void execute() throws BuildException { // load command line with optional attributes Enumeration iter = optionalAttrs.keys(); while (iter.hasMoreElements()) { String name = (String) iter.nextElement(); Object value = optionalAttrs.get(name); cmdl....
public void execute() throws BuildException { // load command line with optional attributes Enumeration iter = optionalAttrs.keys(); while (iter.hasMoreElements()) { String name = (String) iter.nextElement(); Object value = optionalAttrs.get(name); cmdl....
public Path createPath() { if (path == null) { path = new Path(project); } return path; }
public Path createPath() { if (path == null) { path = new Path(getProject()); } return path; }
public void setDynamicAttribute(String name, String value) { project.setNewProperty(name, value); }
public void setDynamicAttribute(String name, String value) { getProject().setNewProperty(name, value); }
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); setItemCount (null, count); } void setItemCount (TreeItem parentItem, int count) { int itemCount = getItemCount (parentItem); if (count == itemCount) return; TreeItem [] children = parentItem == null ? items : parentItem.items; ...
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); setItemCount (null, count); } void setItemCount (TreeItem parentItem, int count) { int itemCount = getItemCount (parentItem); if (count == itemCount) return; TreeItem [] children = parentItem == null ? items : parentItem.items; ...
public void print(PrintStream ps) throws IOException { // We need character encoding aware printing here. // So, using BufferedWriter over OutputStreamWriter instead of PrintStream BufferedWriter out = null; try { out = charset != null ? new Buffe...
public void print(PrintStream ps) throws IOException { // We need character encoding aware printing here. // So, using BufferedWriter over OutputStreamWriter instead of PrintStream BufferedWriter out = null; try { out = charset != null ? new Buffe...
protected void initializeCookie(final Cookie cookie) { final String comment = settings.getComment(); if (comment != null) { cookie.setComment(comment); } final String domain = settings.getDomain(); if (domain != null) { cookie.setDomain(domain); } ServletWebRequest request = (ServletWebReque...
protected void initializeCookie(final Cookie cookie) { final String comment = settings.getComment(); if (comment != null) { cookie.setComment(comment); } final String domain = settings.getDomain(); if (domain != null) { cookie.setDomain(domain); } ServletWebRequest request = (ServletWebReque...
public void sendRedirect(String url) { super.sendRedirect(url); try { getHttpServletResponse().sendRedirect(url); } catch (IOException e) { throw new RuntimeException(e); } }
public void sendRedirect(String url) { super.sendRedirect(url); try { getContainerResponse().sendRedirect(url); } catch (IOException e) { throw new RuntimeException(e); } }
public MultipartServletWebRequest newMultipartWebRequest(final Bytes maxsize) throws FileUploadException { return new MultipartRequest(getHttpServletRequest(), getFilterPrefix(), maxsize); } private static final String SESSION_KEY = UploadWebRequest.class.getName(); /** * Retrieves {@link UploadInfo} from ...
public MultipartServletWebRequest newMultipartWebRequest(final Bytes maxsize) throws FileUploadException { return new MultipartRequest(getContainerRequest(), getFilterPrefix(), maxsize); } private static final String SESSION_KEY = UploadWebRequest.class.getName(); /** * Retrieves {@link UploadInfo} from se...
/*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted, false); pumper.setAutoflush(true); retur...
/*protected*/ StreamPumper createInputPump(InputStream is, OutputStream os, boolean closeWhenExhausted) { StreamPumper pumper = new StreamPumper(is, os, closeWhenExhausted, true); pumper.setAutoflush(true); return...
import org.apache.myrmidon.api.DataType; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmi...
import org.apache.myrmidon.api.DataType; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmi...
import org.apache.myrmidon.api.DataType; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmi...
import org.apache.myrmidon.api.DataType; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package org.apache.myrmi...
private void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm, Object vals) throws SQLException { Collection coll; if (field.getTypeCode() == JavaTypes.ARRAY) coll = JavaTypes.toList(vals, field.getElement().getType(), false); else ...
private void insert(OpenJPAStateManager sm, JDBCStore store, RowManager rm, Object vals) throws SQLException { Collection coll; if (field.getTypeCode() == JavaTypes.ARRAY) coll = JavaTypes.toList(vals, field.getElement().getType(), false); else ...
private void insert(OpenJPAStateManager sm, RowManager rm, Object vals) throws SQLException { Collection coll = toCollection(vals); if (coll == null || coll.isEmpty()) return; Row row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); row.setForeignKey(fi...
private void insert(OpenJPAStateManager sm, RowManager rm, Object vals) throws SQLException { Collection coll = toCollection(vals); if (coll == null || coll.isEmpty()) return; Row row = rm.getSecondaryRow(field.getTable(), Row.ACTION_INSERT); row.setForeignKey(fi...
private void notifyListeners(List listeners, SampleResult result) { SampleEvent event = new SampleEvent(result, (String) controller.getProperty(TestElement.NAME)); compiler.sampleOccurred(event); notifier.addLast(event, listeners); }
private void notifyListeners(List listeners, SampleResult result) { SampleEvent event = new SampleEvent(result, (String) controller.getProperty(TestElement.NAME)); compiler.sampleOccurred(event); notifier.notifyListeners(event, listeners); }
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = wHint; int height = hHint; if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { int ptr = OS.XmTextGetString (handle); if (ptr == 0) return new Point (0, 0); int size = OS.strlen (ptr); if (size == 0) { if (hHint...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = wHint; int height = hHint; if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { int ptr = OS.XmTextGetString (handle); if (ptr == 0) return new Point (0, 0); int size = OS.strlen (ptr); if (size == 0) { if (hHint...
public boolean isEnabled () { checkWidget (); return getEnabled (); } void hookEvents () { super.hookEvents (); int handler = OS.gcnew_SizeChangedEventHandler (jniRef, "HandleSizeChanged"); OS.FrameworkElement_SizeChanged (shellHandle, handler); OS.GCHandle_Free (handler); if ((style & SWT.ON_TOP) != 0) { han...
public boolean isEnabled () { checkWidget (); return getEnabled (); } void hookEvents () { super.hookEvents (); int handler = OS.gcnew_SizeChangedEventHandler (jniRef, "HandleSizeChanged"); OS.FrameworkElement_SizeChanged (shellHandle, handler); OS.GCHandle_Free (handler); if ((style & SWT.ON_TOP) != 0) { han...
protected final BookmarkablePageLink homePageLink(final String id) { return new BookmarkablePageLink(id, getApplicationPages().getHomePage()); }
protected final BookmarkablePageLink homePageLink(final String id) { return new BookmarkablePageLink(id, getApplication().getHomePage()); }
protected final String encode(RequestCycle requestCycle, IBookmarkablePageRequestTarget requestTarget) { final Class pageClass = requestTarget.getPageClass(); final Class homePageClass = requestCycle.getApplication().getRequiredPageSettings().getHomePage(); // TODO fix homepage class final PageParameters...
protected final String encode(RequestCycle requestCycle, IBookmarkablePageRequestTarget requestTarget) { final Class pageClass = requestTarget.getPageClass(); final Class homePageClass = requestCycle.getApplication().getHomePage(); // TODO fix homepage class final PageParameters parameters = requestTarge...
protected IRequestTarget resolveHomePageTarget(RequestCycle requestCycle, RequestParameters requestParameters) { Session session = requestCycle.getSession(); Application application = session.getApplication(); try { // Get the home page class Class homePageClass = application.getRequiredPageSettings(...
protected IRequestTarget resolveHomePageTarget(RequestCycle requestCycle, RequestParameters requestParameters) { Session session = requestCycle.getSession(); Application application = session.getApplication(); try { // Get the home page class Class homePageClass = application.getHomePage(); // an...
protected void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application.getRequiredPageSettings().setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.processRequestCycle...
protected void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application.setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.processRequestCycle(); assertEquals(pageCl...
public void testRenderHomePage_4() throws Exception { System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ==="); application.getRequiredPageSettings().setHomePage(MarkupInheritanceExtension_4.class); // Do the processing application.setupRequestAndResponse(); application.process...
public void testRenderHomePage_4() throws Exception { System.out.println("=== " + MarkupInheritanceExtension_4.class.getName() + " ==="); application.setHomePage(MarkupInheritanceExtension_4.class); // Do the processing application.setupRequestAndResponse(); application.processRequestCycle(); // Vali...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(pageClass); // Do the processing application.setupRequestAndRe...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application = new MockWebApplication(null); application.setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.pr...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(pageClass); // Do the processing application.setupRequestAndRe...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application = new MockWebApplication(null); application.setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.pr...
public void testResponsePageClass() throws Exception { MockWebApplication mockWebApp = new MockWebApplication(null); mockWebApp.getRequiredPageSettings().setHomePage(SimpleResponsePageClass.class); mockWebApp.setupRequestAndResponse(); mockWebApp.processRequestCycle(); SimpleResp...
public void testResponsePageClass() throws Exception { MockWebApplication mockWebApp = new MockWebApplication(null); mockWebApp.setHomePage(SimpleResponsePageClass.class); mockWebApp.setupRequestAndResponse(); mockWebApp.processRequestCycle(); SimpleResponsePageClass manageBook =...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(IncrementalTableNavigationPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); IncrementalTableNavigationPage pag...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(IncrementalTableNavigationPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); IncrementalTableNavigationPage page = (IncrementalTableNavig...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorPage page = (PagedTabl...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorPage page = (PagedTableNavigatorPage)application...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(PagedTableNavigatorWithLabelProviderPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorWithL...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTableNavigatorWithLabelProviderPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorWithLabelProviderPage page = (P...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(PagedTableNavigatorWithMarginPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorWithMarginPa...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTableNavigatorWithMarginPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigatorWithMarginPage page = (PagedTableNavig...
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (PagedTablePage)application....
public void testPagedTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (PagedTablePage)application.getLastRenderedPage(); S...
public void testSimpleTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(SimpleTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SimpleTablePage page = (SimpleTablePage)applicat...
public void testSimpleTable() throws Exception { MockWebApplication application = new MockWebApplication(null); application.setHomePage(SimpleTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SimpleTablePage page = (SimpleTablePage)application.getLastRenderedPage();...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application.getRequiredPageSettings().setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.getWicketSession().set...
public void executeTest(final Class pageClass, final String filename) throws Exception { System.out.println("=== " + pageClass.getName() + " ==="); application.setHomePage(pageClass); // Do the processing application.setupRequestAndResponse(); application.getWicketSession().setLocale(null); applicatio...
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(MockPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.setHomePage(MockPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(WicketPanelPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.setHomePage(WicketPanelPage.class); }
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
String ROLE = "org.apache.myrmidon.framework.DataType"; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
String ROLE = "org.apache.myrmidon.framework.DataType"; /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */ package o...
* public static void prettyPrint(JoinPoint.StaticPart jp) { * ... * } * } * * aspect Logging { * before(): ... { LoggingUtils.prettyPrint(thisJoinPointStaticPart); } * } * </pre> * * @see JoinPoint#getStaticPart() */ public interface St...
* public static void prettyPrint(JoinPoint.StaticPart jp) { * ... * } * } * * aspect Logging { * before(): ... { LoggingUtils.prettyPrint(thisJoinPointStaticPart); } * } * </pre> * * @see JoinPoint#getStaticPart() */ public interface St...
protected void registerJavascriptNamespaces(IHeaderResponse response) { response.renderJavascript( "if (Wicket==undefined) { Wicket={}; } if (Wicket.Forms==undefined) { Wicket.Forms={}; }", Form.class.getName());
protected void registerJavascriptNamespaces(IHeaderResponse response) { response.renderJavascript( "if (typeof(Wicket)=='undefined') { Wicket={}; } if (typeof('Wicket.Forms')=='undefined') { Wicket.Forms={}; }", Form.class.getName());
public static String getMessageHeaders(Message message) { final StringBuffer response = new StringBuffer(256); try { response.append("JMS Message Header Attributes:"); response.append("\n Correlation ID: "); response.append(message.getJMSCorrelationID()); ...
public static String getMessageHeaders(Message message) { final StringBuilder response = new StringBuilder(256); try { response.append("JMS Message Header Attributes:"); response.append("\n Correlation ID: "); response.append(message.getJMSCorrelationID()); ...
public int indexOf (String string, int start) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if (!(0 <= start && start < items.length)) return -1; for (int i=start; i<items.length; i++) { if (string.equals(items [i])) return i; } return -1; } int /*long*/ paintWindow () { OS.gtk_widget_...
public int indexOf (String string, int start) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if (!(0 <= start && start < items.length)) return -1; for (int i=start; i<items.length; i++) { if (string.equals(items [i])) return i; } return -1; } int /*long*/ paintWindow () { OS.gtk_widget_...
public void run() { while (!channel.isEOF()) { if (thread == null) { return; } try { sleep(500); } c...
public void run() { while (!channel.isClosed()) { if (thread == null) { return; } try { sleep(500); ...
public void execute() throws TaskException { if( baseDir == null ) { throw new TaskException( "base attribute must be set!" ); } if( !baseDir.exists() ) { throw new TaskException( "base does not exist!" ); } if( verify ) ...
public void execute() throws TaskException { if( baseDir == null ) { throw new TaskException( "base attribute must be set!" ); } if( !baseDir.exists() ) { throw new TaskException( "base does not exist!" ); } if( verify ) ...
public void setBackgroundMode (int mode) { checkWidget (); backgroundMode = mode; Control [] children = _getChildren (); for (int i = 0; i < children.length; i++) { children [i].updateBackgroundMode (); } } void setBounds (int x, int y, int width, int height, int flags, boolean defer) { if (display.resizeCou...
public void setBackgroundMode (int mode) { checkWidget (); backgroundMode = mode; Control [] children = _getChildren (); for (int i = 0; i < children.length; i++) { children [i].updateBackgroundMode (); } } void setBounds (int x, int y, int width, int height, int flags, boolean defer) { if (display.resizeCou...
private void scanElementDecl() throws Exception { if (!checkForPEReference(true)) { abortMarkup(XMLMessages.MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL, XMLMessages.P45_SPACE_REQUIRED); return; } checkForElementTypeWithPERefe...
private void scanElementDecl() throws Exception { if (!checkForPEReference(true)) { abortMarkup(XMLMessages.MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL, XMLMessages.P45_SPACE_REQUIRED); return; } checkForElementTypeWithPERefe...
public static final URI sanitizeUrl(URL url) throws URISyntaxException, UnsupportedEncodingException { URIBuilder builder = new URIBuilder() .setScheme(url.getProtocol()) .setHost(url.getHost()) .setPort(url.getPort()) .setUserInfo(url.getUser...
public static final URI sanitizeUrl(URL url) throws URISyntaxException, UnsupportedEncodingException { URIBuilder builder = new URIBuilder() .setScheme(url.getProtocol()) .setHost(url.getHost()) .setPort(url.getPort()) .setUserInfo(url.getUser...
public Object invoke (ExecutionContext ctx, Object[] params) { return "#" + params[0] + "!"; } }.create(); final FunctionDefContextInternal fdc = new FunctionDefContextFactory (new CompositeTypesystem ()).create(); fdc.register (myToString); ...
public Object invoke (ExecutionContext ctx, Object[] params) { return "#" + params[0] + "!"; } }.create(); final FunctionDefContextInternal fdc = new FunctionDefContextFactory (new CompositeTypesystem ()).create(); fdc.register (myToString, true)...
public Object invoke (ExecutionContext ctx, Object[] params) { return true; } }.create(); final FunctionDefContextInternal fdc = new FunctionDefContextFactory (new CompositeTypesystem ()).create(); fdc.register (myStringEquals); ...
public Object invoke (ExecutionContext ctx, Object[] params) { return true; } }.create(); final FunctionDefContextInternal fdc = new FunctionDefContextFactory (new CompositeTypesystem ()).create(); fdc.register (myStringEquals, true); ...
public void showPanel() { JFrame f = new JFrame("Data File Report"); setLayout(new BorderLayout()); graphPanel gp = new graphPanel(data); add(gp, "Center"); add(gp.getStats(), BorderLayout.EAST); add(gp.getLegend(), BorderLayout.NORTH); f.setSize(500, 30...
public void showPanel() { JFrame f = new JFrame("Data File Report"); setLayout(new BorderLayout()); graphPanel gp = new graphPanel(data); add(gp, "Center"); add(gp.getStats(), BorderLayout.EAST); add(gp.getLegend(), BorderLayout.NORTH); f.setSize(500, 30...
public String getLevelAsString() { return levelStrings[getLevel()]; }
public String getLevelAsString() { return levelStrings[getLevel() / 100]; }
public XPath(String xpath, SymbolTable symbolTable, NamespaceContext context) throws XPathException { // NOTE: We have to prefix the selector XPath with "./" in // order to handle selectors such as "." that select // the element container bec...
public XPath(String xpath, SymbolTable symbolTable, NamespaceContext context) throws XPathException { // NOTE: We have to prefix the selector XPath with "./" in // order to handle selectors such as "." that select // the element container bec...
private void prepareLogging() throws Exception { //handle logging... final BasicLogger logger = new BasicLogger( "myrmidon", m_priority ); enableLogging( logger ); }
private void prepareLogging() throws Exception { //handle logging... final BasicLogger logger = new BasicLogger( "[myrmidon] ", m_priority ); enableLogging( logger ); }
public Object getAdapter(Class adapter) { if (adapter.isInstance(this)) { return this; } else { return Platform.getAdapterManager().getAdapter(this, adapter); }
public Object getAdapter(Class adapter) { if (adapter.isInstance(this)) { return this; } else { return Platform.getAdapterManager().loadAdapter(this, adapter.getName()); }
public static void main(String argv[]) { Arguments argopt = new Arguments(); argopt.setUsage( new String[] { "usage: java sax.SAX2Count (options) uri ...","", "options:", " -p name Specify SAX parser by name.", ...
public static void main(String argv[]) { Arguments argopt = new Arguments(); argopt.setUsage( new String[] { "usage: java sax.SAX2Count (options) uri ...","", "options:", " -p name Specify SAX parser by name.", ...
public ID createInstance(Object[] parameters) throws IDCreateException { // error case if (parameters == null || parameters.length < 1 || parameters.length > 3) { throw new IDCreateException(Messages.JSLPNamespace_2); // error case } else if (parameters[0] == null || parameters[0].equals("")) { //$NON-NLS...
public ID createInstance(Object[] parameters) throws IDCreateException { // error case if (parameters == null || parameters.length < 1 || parameters.length > 3) { throw new IDCreateException(Messages.JSLPNamespace_2); // error case } else if (parameters[0] == null || parameters[0].equals("")) { //$NON-NLS...
protected XSAttributeDecl traverseGlobal(Element attrDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, sc...
protected XSAttributeDecl traverseGlobal(Element attrDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { // General Attribute Checking Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, true, sc...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
protected void traverseLocal(XSParticleDecl particle, Element elmDecl, XSDocumentInfo schemaDoc, SchemaGrammar grammar, int allContextFlags) { // General Attribute Checking Object[] attrValues = fAttrChecke...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
private static void checkVersion(Class clazz, String expected) { String actual = "*NONE*"; // $NON-NLS-1$ try { actual = (String) clazz.getMethod("getVersion", null).invoke(null, null); actual = extractVersion(actual); } catch (Exception ignored) { // Not needed } if (0 != actual.compareTo(expected...
public void delete(final Contact contact) { Contact c = (Contact)map.remove(new Long(contact.getId())); fnameIdx.remove(contact); lnameIdx.remove(contact); fnameDescIdx.remove(contact); lnameDescIdx.remove(contact); contact.setId(0); }
public void delete(final Contact contact) { map.remove(new Long(contact.getId())); fnameIdx.remove(contact); lnameIdx.remove(contact); fnameDescIdx.remove(contact); lnameDescIdx.remove(contact); contact.setId(0); }
public void mouseClicked(MouseEvent e) { if (e.getClickCount() >= 1) { int index = list.locationToIndex(e.getPoint()); if (listModel.getSize() >= index && index != -1) { IMessage message = (IMessage)listModel.getElementAt(inde...
public void mouseClicked(MouseEvent e) { if (e.getClickCount() >= 1) { int index = list.locationToIndex(e.getPoint()); if (listModel.getSize() >= index && index != -1) { IMessage message = (IMessage)listModel.getElementAt(inde...
public void setFont (Font font) { checkWidget (); if (caret != null) caret.setFont (font); super.setFont (font); } int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) { if (msg == Display.SWT_RESTORECARET) { if ((state & CANVAS) != 0) { if (caret != null) { caret...
public void setFont (Font font) { checkWidget (); if (caret != null) caret.setFont (font); super.setFont (font); } int /*long*/ windowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) { if (msg == Display.SWT_RESTORECARET) { if ((state & CANVAS) != 0) { if (caret != null) { caret...
* public void modifyText(ModifyEvent e) { * Text text = (Text)editor.getEditor(); * editor.getItem().setText(EDITABLECOLUMN, text.getText()); * } * }); * newEditor.selectAll(); * newEditor.setFocus(); * editor.setEditor(newEditor, item, EDITABLECOLUMN); * } * }); * </pre></code> */ public class T...
* public void modifyText(ModifyEvent e) { * Text text = (Text)editor.getEditor(); * editor.getItem().setText(EDITABLECOLUMN, text.getText()); * } * }); * newEditor.selectAll(); * newEditor.setFocus(); * editor.setEditor(newEditor, item, EDITABLECOLUMN); * } * }); * </pre></code> */ public class T...
protected IRequestTarget resolveBookmarkablePage(final RequestCycle requestCycle, final RequestParameters requestParameters) { String bookmarkablePageClass = requestParameters.getBookmarkablePageClass(); Session session = requestCycle.getSession(); Application application = session.getApplication(); Class<...
protected IRequestTarget resolveBookmarkablePage(final RequestCycle requestCycle, final RequestParameters requestParameters) { String bookmarkablePageClass = requestParameters.getBookmarkablePageClass(); Session session = requestCycle.getSession(); Application application = session.getApplication(); Class<...
public Map<String, Object> getParameterMap() { return (Map<String, Object>)req.getParameterMap(); }
public Map<String, Object> getParameterMap() { return req.getParameterMap(); }
public void select (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); showItem (item, false); ignoreSelect = true; /* * Bug in the Macintosh. When the DataBroswer selection flags includes * both kDataBrowserNeverEmpty...
public void select (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); showItem (item, false); ignoreSelect = true; /* * Bug in the Macintosh. When the DataBroswer selection flags includes * both kDataBrowserNeverEmpty...
public void select (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item); NSOutlineView outlineView = (NSOutlineView) view; int /*long*/ row = outlineView.rowForItem (item.handle); NSIndexSe...
public void select (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); checkItems (); showItem (item); NSOutlineView outlineView = (NSOutlineView) view; int /*long*/ row = outlineView.rowForItem (item.handle); NSIndexSe...