buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void setObject(Serializable object) { this.object = object; } }
public void setObject(final Serializable object) { this.object = object; } }
protected Object handleGetObject(final String key) { return null; } }; // content assist IAction a = new TextOperationAction(rb, "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS); a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); setAction("Conte...
protected Object handleGetObject(final String key) { return null; } }; // content assist IAction a = new TextOperationAction(rb, "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS); a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); setAction("Conte...
public Object invoke() { try { return createMethod(types).invoke(invokee, getArgs()); } catch (Exception e) { throw new RuntimeException(e); } }
public Object invoke() { try { return createMethod(types).invoke(invokee, getArgs()); } catch (Exception e) { throw new org.apache.jorphan.util.JMeterError(e); //JDK1.4 } }
private JPanel createConditionPanel() { JPanel conditionPanel = new JPanel(new BorderLayout(5, 0)); // Condition LABEL JLabel conditionLabel = new JLabel(JMeterUtils.getResString( CONDITION_LABEL )); conditionPanel.add(conditionLabel, BorderLayout.WEST); // TEXT FIELD theCondition = new JTextField("N/...
private JPanel createConditionPanel() { JPanel conditionPanel = new JPanel(new BorderLayout(5, 0)); // Condition LABEL JLabel conditionLabel = new JLabel(JMeterUtils.getResString( CONDITION_LABEL )); conditionPanel.add(conditionLabel, BorderLayout.WEST); // TEXT FIELD theCondition = new JTextField("")...
public void doAction(ActionEvent e) { ActionRouter.getInstance().doActionNow( new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY)); GuiPackage guiPackage = GuiPackage.getInstance(); if (guiPackage.isDirty()) { if (JOptionPane .showC...
public void doAction(ActionEvent e) { ActionRouter.getInstance().doActionNow( new ActionEvent(e.getSource(), e.getID(), CheckDirty.CHECK_DIRTY)); GuiPackage guiPackage = GuiPackage.getInstance(); if (guiPackage.isDirty()) { if (JOptionPane .showC...
public void checkAllNecessaryKeysPresent() { // Check that all necessary keys are there: // displayName is always mandatory: String dn= defaultBundle.getString("displayName").toLowerCase(); // Skip the rest of this test for alpha/experimental beans: if (dn.indexOf("(ALPHA") != -1 || dn.indexOf("(EXPERI...
public void checkAllNecessaryKeysPresent() { // Check that all necessary keys are there: // displayName is always mandatory: String dn= defaultBundle.getString("displayName").toUpperCase(Locale.ENGLISH); // Skip the rest of this test for alpha/experimental beans: if (dn.indexOf("(ALPHA") != -1 || dn.in...
private static FileRowColContainer getFile(String file, String alias) throws FileNotFoundException, IOException { FileRowColContainer frcc; if ((frcc = (FileRowColContainer) fileContainers.get(alias)) == null) { frcc = new FileRowColContainer(file); fileContainers.put(alias,frcc);...
private static FileRowColContainer getFile(String file, String alias) throws FileNotFoundException, IOException { FileRowColContainer frcc; if ((frcc = (FileRowColContainer) fileContainers.get(alias)) == null) { frcc = new FileRowColContainer(file); fileContainers.put(alias,frcc);...
public String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { return Thread.currentThread().getName().substring( Thread.currentThread().getName().indexOf("-") + 1); }
public String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { return Thread.currentThread().getName().substring( Thread.currentThread().getName().lastIndexOf("-") + 1); }
public boolean isRedirect() { final String[] REDIRECT_CODES= { "301", "302", "303", "304" }; String code= getResponseCode(); for (int i= 0; i < REDIRECT_CODES.length; i++) { if (REDIRECT_CODES[i].equals(code)) return true; } return fals...
public boolean isRedirect() { final String[] REDIRECT_CODES= { "301", "302", "303" }; // NOT 304! String code= getResponseCode(); for (int i= 0; i < REDIRECT_CODES.length; i++) { if (REDIRECT_CODES[i].equals(code)) return true; } return...
protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { debug("getClientConnection:" + remoteSpace + ":" + data); Object[] args = { new Integer(keepAlive) }; ISynchAsynchConnection conn = null; conn = Connec...
protected ISynchAsynchConnection createConnection(ID remoteSpace, Object data) throws ConnectionInstantiationException { debug("createClientConnection:" + remoteSpace + ":" + data); Object[] args = { new Integer(keepAlive) }; ISynchAsynchConnection conn = null; conn = Con...
protected void saveEnclosingAttr(NodeImpl node) { savedEnclosingAttr = null; // MUTATION PREPROCESSING AND PRE-EVENTS: // If we're within the scope of an Attr and DOMAttrModified // was requested, we need to preserve its previous value for // that event. LCount lc = ...
protected void saveEnclosingAttr(NodeImpl node) { savedEnclosingAttr = null; // MUTATION PREPROCESSING AND PRE-EVENTS: // If we're within the scope of an Attr and DOMAttrModified // was requested, we need to preserve its previous value for // that event. LCount lc = ...
public void drawText (String string, int x, int y, int flags) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT); try { handle.saveGraphicsState(); boolean mode = true; switch (data....
public void drawText (String string, int x, int y, int flags) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (string == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); NSAutoreleasePool pool = checkGC(CLIPPING | TRANSFORM | FONT | FOREGROUND_FILL); try { handle.saveGraphicsState(); boolean mode = tru...
private String getConverterName( final Class originalClass, final Class destination ) throws ConverterException { Class clazz = destination; //TODO: Maybe we should search the source classes hierarchy aswell final Class terminator = Object.cl...
private String getConverterName( final Class originalClass, final Class destination ) throws ConverterException { Class clazz = destination; //TODO: Maybe we should search the source classes hierarchy aswell final Class terminator = Object.cl...
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
public <C extends Component> Result isComponent(String path, Class<C> expectedComponentClass) { Component component = getComponentFromLastRenderedPage(path); if (component == null) { Result.fail("Component not found: " + path); }
public <C extends Component> Result isComponent(String path, Class<C> expectedComponentClass) { Component component = getComponentFromLastRenderedPage(path); if (component == null) { return Result.fail("Component not found: " + path); }
public void testLongRoundTripping() throws IOException { TarEntry original = new TarEntry(LONG_NAME); assertEquals("over 100 chars", true, LONG_NAME.length() > 100); assertEquals("original name", LONG_NAME, original.getName()); ByteArrayOutputStream buff = new ByteArrayOutputStream...
public void testLongRoundTripping() throws IOException { TarEntry original = new TarEntry(LONG_NAME); assertTrue("over 100 chars", LONG_NAME.length() > 100); assertEquals("original name", LONG_NAME, original.getName()); ByteArrayOutputStream buff = new ByteArrayOutputStream(); ...
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().getRequiredPageSettings().getHomePage(); // TODO fix homepage class final PageParameters...
protected Page newPage(Class pageClass, RequestCycle requestCycle) { PageParameters params = pageParameters; // TODO ? the parameters should already have been resolved ? /* * if (isMounted()) { //decode page parameters from url Request request = * requestCycle.getRequest(); String urlFragment = * requ...
protected Page newPage(Class pageClass, RequestCycle requestCycle) { PageParameters params = pageParameters; // TODO ? the parameters should already have been resolved ? /* * if (isMounted()) { //decode page parameters from url Request request = * requestCycle.getRequest(); String urlFragment = * requ...
public void executeTest(final Class pageClass, final String filename) throws Exception { application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(pageClass); application.getSettings().setStripWicketTags(true); // Do the processing application.setupRequestAndResponse(); ...
public void executeTest(final Class pageClass, final String filename) throws Exception { application = new MockWebApplication(null); application.getRequiredPageSettings().setHomePage(pageClass); application.getMarkupSettings().setStripWicketTags(true); // Do the processing application.setupRequestAndRespon...
public void testRenderHomePage_8() throws Exception { application.getSettings().setStripWicketTags(true); executeTest(MarkupInheritanceExtension_8.class, "MarkupInheritanceExpectedResult_8.html"); }
public void testRenderHomePage_8() throws Exception { application.getMarkupSettings().setStripWicketTags(true); executeTest(MarkupInheritanceExtension_8.class, "MarkupInheritanceExpectedResult_8.html"); }
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.getSettings().addStringResourceLoader( new BundleStringResourceLoader("wicket.model.StringResourceModelTest")); page = new MockPage(null); ws = new WeatherStation(); wsModel = new Model(ws)...
protected void setUp() throws Exception { super.setUp(); application = new MockWebApplication(null); application.getResourceSettings().addStringResourceLoader( new BundleStringResourceLoader("wicket.model.StringResourceModelTest")); page = new MockPage(null); ws = new WeatherStation(); wsModel = new M...
public void testRenderHomePageWicketTagRemoved() throws Exception { // Remove wicket tags from output application.getSettings().setStripWicketTags(true); application.setupRequestAndResponse(); application.processRequestCycle(); // Validate the document String document = application.getServletResponse().g...
public void testRenderHomePageWicketTagRemoved() throws Exception { // Remove wicket tags from output application.getMarkupSettings().setStripWicketTags(true); application.setupRequestAndResponse(); application.processRequestCycle(); // Validate the document String document = application.getServletRespon...
public void connect(final ID targetID, final IConnectContext connectContext) throws ContainerConnectException { Assert.isNotNull(targetID); //Assert.isNotNull(connectContext); if (containerID != null) { throw new ContainerConnectException("Container is already connected to " + containerID); //$NON-NLS-1$ }...
public void connect(final ID targetID, final IConnectContext connectContext) throws ContainerConnectException { Assert.isNotNull(targetID); //Assert.isNotNull(connectContext); if (containerID != null) { throw new ContainerConnectException("Container is already connected to " + containerID); //$NON-NLS-1$ }...
private boolean sameDefinition( AntTypeDefinition def, AntTypeDefinition old) { boolean defValid = validDefinition(def); boolean sameValidity = !(defValid | validDefinition(old)); return sameValidity && (!defValid || def.sameDefinition(old, project)); }
private boolean sameDefinition( AntTypeDefinition def, AntTypeDefinition old) { boolean defValid = validDefinition(def); boolean sameValidity = !(defValid ^ validDefinition(old)); return sameValidity && (!defValid || def.sameDefinition(old, project)); }
public static String stripCommentsAndWhitespace(String original) { // let's be optimistic StringBuilder result = new StringBuilder(original.length() / 2); State state = State.REGULAR_TEXT; for (int i = 0; i < original.length(); ++i) { char c = original.charAt(i); char next = (i < original.length() - ...
public static String stripCommentsAndWhitespace(String original) { // let's be optimistic StringBuilder result = new StringBuilder(original.length() / 2); State state = State.REGULAR_TEXT; for (int i = 0; i < original.length(); ++i) { char c = original.charAt(i); char next = (i < original.length() - ...
private Sampler next2() { if (isFirst()) // must be the start of the subtree { calls = 0; noFailingSamples = 0; res = new SampleResult(); res.setSampleLabel(getName()); // Assume success res.setSuccessful(true); res.sampleStart(); } Sampler return...
private Sampler next2() { if (isFirst()) // must be the start of the subtree { calls = 0; noFailingSamples = 0; res = new SampleResult(); res.setSampleLabel(getName()); // Assume success res.setSuccessful(true); res.sampleStart(); } Sampler return...
public void scanQName(char fastcheck, QName qname) throws Exception { int ch = fMostRecentChar; if (ch == -1) { changeReaders().scanQName(fastcheck, qname); return; } if (!fCalledCharPropInit) { XMLCharacterProperties.initCharFlags(); f...
public void scanQName(char fastcheck, QName qname) throws Exception { int ch = fMostRecentChar; if (ch == -1) { changeReaders().scanQName(fastcheck, qname); return; } if (!fCalledCharPropInit) { XMLCharacterProperties.initCharFlags(); f...
public WordGenerator() { try { final IResourceStream resource = Application.get().getResourceSettings().getResourceStreamFactory().locate(this.getClass(), "wicket/examples/hangman/WordList", null, Locale.getDefault(), ".txt"); final String wordlist = Streams.readString(resource.getInputStream()); t...
public WordGenerator() { try { final IResourceStream resource = Application.get().getResourceSettings().getResourceStreamFactory().newResourceStream(this.getClass(), "wicket/examples/hangman/WordList", null, Locale.getDefault(), ".txt"); final String wordlist = Streams.readString(resource.getInputStrea...
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { return false; }
public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store, boolean updateVersion) throws SQLException { return !updateVersion; }
private boolean shouldWeaveName (String name) { return !((/*(name.startsWith("org.apache.bcel.")//FIXME AV why ? bcel is wrapped in org.aspectj. ||*/ name.startsWith("org.aspectj.") || name.startsWith("java.") || name.startsWith("javax.")) || name.start...
private boolean shouldWeaveName (String name) { return !((/*(name.startsWith("org.apache.bcel.")//FIXME AV why ? bcel is wrapped in org.aspectj. ||*/ name.startsWith("org.aspectj.") || name.startsWith("java.") || name.startsWith("javax.")) //|| name.sta...
public CommentImpl(final String text, final Location location) { super(COMMENT, location, null); fText = text; }
public CommentImpl(final String text, final Location location) { super(COMMENT, location); fText = text; }
public DTDImpl(final String dtd, final Location location) { super(XMLStreamConstants.DTD, location, null); fDtd = dtd; }
public DTDImpl(final String dtd, final Location location) { super(XMLStreamConstants.DTD, location); fDtd = dtd; }
public EndDocumentImpl(Location location) { super(XMLStreamConstants.END_DOCUMENT, location, null); }
public EndDocumentImpl(Location location) { super(XMLStreamConstants.END_DOCUMENT, location); }
public EndElementImpl(final QName name, final Location location) { super(XMLStreamConstants.END_ELEMENT, location, null); fName = name; }
public EndElementImpl(final QName name, final Location location) { super(XMLStreamConstants.END_ELEMENT, location); fName = name; }
public EntityReferenceImpl(final EntityDeclaration decl, final Location location) { super(ENTITY_REFERENCE, location, null); fDecl = decl;; }
public EntityReferenceImpl(final EntityDeclaration decl, final Location location) { super(ENTITY_REFERENCE, location); fDecl = decl;; }
public NamespaceImpl(final String prefix, final String namespaceURI, final Location location) { super(NAMESPACE, makeAttributeQName(prefix), namespaceURI, null, true, location, null); fPrefix = (prefix == null ? "" : prefix); fNamespaceURI = namespaceURI; }
public NamespaceImpl(final String prefix, final String namespaceURI, final Location location) { super(NAMESPACE, makeAttributeQName(prefix), namespaceURI, null, true, location); fPrefix = (prefix == null ? "" : prefix); fNamespaceURI = namespaceURI; }
public ProcessingInstructionImpl(final String target, final String data, final Location location) { super(PROCESSING_INSTRUCTION, location, null); fTarget = target; fData = data; }
public ProcessingInstructionImpl(final String target, final String data, final Location location) { super(PROCESSING_INSTRUCTION, location); fTarget = target; fData = data; }
public StartDocumentImpl(final String charEncoding, final boolean encodingSet, final boolean isStandalone, final boolean standaloneSet, final String version, final Location location) { super(START_DOCUMENT, location, null); fCharEncoding = charEncoding; fEncodingSet = encodingSet; fI...
public StartDocumentImpl(final String charEncoding, final boolean encodingSet, final boolean isStandalone, final boolean standaloneSet, final String version, final Location location) { super(START_DOCUMENT, location); fCharEncoding = charEncoding; fEncodingSet = encodingSet; fIsStand...
protected String getCallbackScript(String partialCall, String onSuccessScript, String onFailureScript) { String script = super.getCallbackScript(partialCall, onSuccessScript, onFailureScript); final ThrottlingSettings ts = throttlingSettings; if (ts != null) { script = AbstractAjaxTimerBehavior.throttl...
protected String getCallbackScript(String partialCall, String onSuccessScript, String onFailureScript) { String script = super.getCallbackScript(partialCall, onSuccessScript, onFailureScript); final ThrottlingSettings ts = throttlingSettings; if (ts != null) { script = AbstractDefaultAjaxBehavior.throt...
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance re...
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance re...
private final void respond(final Response response) { try { final OutputStream out = response.getOutputStream(); try { Streams.writeStream(resourceStream.getInputStream(), out); } finally { resourceStream.close(); out.flush(); } } catch (Exception e) { throw new WicketRun...
private final void respond(final Response response) { try { final OutputStream out = response.getOutputStream(); try { Streams.copy(resourceStream.getInputStream(), out); } finally { resourceStream.close(); out.flush(); } } catch (Exception e) { throw new WicketRuntimeExc...
private boolean renderStaticContent() { try { // Get the relative URL we need for loading the resource from // the servlet context final String url = getWebRequest().getRelativeURL(); // Get servlet context final ServletContext context = ((WebApplication)application).getWicketServlet() .getSe...
private boolean renderStaticContent() { try { // Get the relative URL we need for loading the resource from // the servlet context final String url = getWebRequest().getRelativeURL(); // Get servlet context final ServletContext context = ((WebApplication)application).getWicketServlet() .getSe...
public static final void writeTo(final java.io.File file, final InputStream input) throws IOException { Streams.writeStream(input, new FileOutputStream(file)); }
public static final void writeTo(final java.io.File file, final InputStream input) throws IOException { Streams.copy(input, new FileOutputStream(file)); }
private URLClassLoader createWeavingClassLoader (URL[] urls, ClassLoader parent) { URLClassLoader loader = null; try { Class loaderClazz = Class.forName("org.aspectj.weaver.loadtime.WeavingURLClassLoader",false,parent); Class[] parameterTypes = new Class[] { urls.getClass(), ClassLoader.class }; Object...
private URLClassLoader createWeavingClassLoader (URL[] urls, ClassLoader parent) { URLClassLoader loader = null; try { Class loaderClazz = Class.forName("org.aspectj.weaver.loadtime.WeavingURLClassLoader",false,parent); Class[] parameterTypes = new Class[] { urls.getClass(), ClassLoader.class }; Object...
public static boolean insertLoadedTree(int id, HashTree tree, boolean merging) throws Exception, IllegalUserActionException { // convertTree(tree); if (tree == null) { throw new Exception("Error in TestPlan - see log file"); } boolean isTestPlan = tree.getArray()[0] insta...
public static boolean insertLoadedTree(int id, HashTree tree, boolean merging) throws Exception, IllegalUserActionException { // convertTree(tree); if (tree == null) { throw new Exception("Error in TestPlan - see log file"); } boolean isTestPlan = tree.getArray()[0] insta...
public static JFileChooser promptToSaveFile(String filename, String[] extensions) { if (lastJFCDirectory == null) { String start = System.getProperty("user.dir", "");//$NON-NLS-1$//$NON-NLS-2$ if (start.length() > 0) { jfc = new JFileChooser(new File(start)); ...
public static JFileChooser promptToSaveFile(String filename, String[] extensions) { if (lastJFCDirectory == null) { String start = System.getProperty("user.dir", "");//$NON-NLS-1$//$NON-NLS-2$ if (start.length() > 0) { jfc = new JFileChooser(new File(start)); ...
public String getSampleLabel(boolean includeGroup) { if (includeGroup) { StringBuilder sb = new StringBuilder(threadName.substring(0,threadName.lastIndexOf(" "))); //$NON-NLS-1$ return sb.append(":").append(label).toString(); //$NON-NLS-1$ } return label; }
public String getSampleLabel(boolean includeGroup) { if (includeGroup) { StringBuilder sb = new StringBuilder(threadName.substring(0,threadName.lastIndexOf(' '))); //$NON-NLS-1$ return sb.append(":").append(label).toString(); //$NON-NLS-1$ } return label; }
public QRCodeBlackBox5TestCase() { super("test/data/blackbox/qrcode-5", new MultiFormatReader(), BarcodeFormat.QR_CODE); addTest(18, 18, 0.0f); addTest(19, 19, 90.0f); addTest(19, 19, 180.0f); addTest(19, 19, 270.0f); }
public QRCodeBlackBox5TestCase() { super("test/data/blackbox/qrcode-5", new MultiFormatReader(), BarcodeFormat.QR_CODE); addTest(18, 18, 0.0f); addTest(19, 19, 90.0f); addTest(19, 19, 180.0f); addTest(18, 18, 270.0f); }
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0;...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); if (wHint != SWT.DEFAULT && wHint < 0) wHint = 0; if (hHint != SWT.DEFAULT && hHint < 0) hHint = 0; Point size; if (layout != null) { if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) { changed |= (state & LAYOUT_CHANGED) != 0;...
public String[] list() throws TaskException { ArrayList result = new ArrayList( 2 * m_elements.size() ); for( int i = 0; i < m_elements.size(); i++ ) { Object o = m_elements.get( i ); if( o instanceof String ) { // obtained via ...
public String[] list() throws TaskException { ArrayList result = new ArrayList( 2 * m_elements.size() ); for( int i = 0; i < m_elements.size(); i++ ) { Object o = m_elements.get( i ); if( o instanceof String ) { // obtained via ...
public Component(MarkupContainer<?> parent, final String id, final IModel<T> model) { if (parent == null) { if (!(this instanceof Page)) { throw new WicketRuntimeException("component without a parent is not allowed."); } } this.parent = parent; setId(id); getApplication().notifyComponentInst...
public Component(MarkupContainer<?> parent, final String id, final IModel<T> model) { if (parent == null) { if (!(this instanceof Page)) { throw new WicketRuntimeException("component without a parent is not allowed."); } } this.parent = parent; setId(id); getApplication().notifyComponentInst...
public void addString(String string, float x, float y, Font font) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int length = string.length(); char[] buffer = new char[length]; string.ge...
public void addString(String string, float x, float y, Font font) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (font == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (font.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); int length = string.length(); char[] buffer = new char[length]; string.ge...
private void reportError( final Throwable throwable ) { // Build the message final String message; if( m_priority <= BasicLogger.LEVEL_INFO ) { // Verbose mode - include the stack traces message = ExceptionUtil.printStackTrace( throwable, 5, true, true ); ...
private void reportError( final Throwable throwable ) { // Build the message final String message; if( m_priority <= BasicLogger.LEVEL_INFO ) { // Verbose mode - include the stack traces message = ExceptionUtil.printStackTrace( throwable, 8, true, true ); ...
private void writeThrowable( final LogEvent event ) { // Write the exception, if any final Throwable throwable = event.getThrowable(); if( throwable != null ) { getWriter().println( ExceptionUtil.printStackTrace( throwable, 5, true ) ); } }
private void writeThrowable( final LogEvent event ) { // Write the exception, if any final Throwable throwable = event.getThrowable(); if( throwable != null ) { getWriter().println( ExceptionUtil.printStackTrace( throwable, 8, true ) ); } }
public static void populateServiceNameCombo(Combo serviceNameCombo, WSDL2JavaDataModel model) { serviceNameCombo.removeAll(); Definition definition = model.getWsdlDefinition(); if (definition != null) { Map servicesMap = definition.getServices(); if (servicesMap != nu...
public static void populateServiceNameCombo(Combo serviceNameCombo, WSDL2JavaDataModel model) { serviceNameCombo.removeAll(); Definition definition = model.getWsdlDefinition(); if (definition != null) { Map servicesMap = definition.getServices(); if (servicesMap != nu...
protected IModel getListItemModel(final IModel listViewModel, final int index) { return new ListItemModel(listViewModel, index); }
protected IModel getListItemModel(final IModel listViewModel, final int index) { return new ListItemModel(this, index); }
private CMNode expandContentModel(CMNode node, int minOccurs, int maxOccurs) { CMNode nodeRet = null; if (minOccurs==1 && maxOccurs==1) { nodeRet = node; } else if (minOccurs==0 && maxOccurs==1) { //zero or one ...
private CMNode expandContentModel(CMNode node, int minOccurs, int maxOccurs) { CMNode nodeRet = null; if (minOccurs==1 && maxOccurs==1) { nodeRet = node; } else if (minOccurs==0 && maxOccurs==1) { //zero or one ...
reportSchemaError("s4s-elt-must-match.1", new Object[]{"wildcard", "(annotation?)", DOMUtil.getLocalName(child)}, elmNode); /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, ...
reportSchemaError("s4s-elt-must-match.1", new Object[]{"wildcard", "(annotation?)", DOMUtil.getLocalName(child)}, elmNode); /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, ...
public NSSize sizeValue() { NSSize result = new NSSize(); OS.objc_msgSend_stret(result, this.id, OS.sel_sizeValue); return result; }
public NSSize sizeValue() { NSSize result = new NSSize(); OS.objc_msgSend_struct(result, this.id, OS.sel_sizeValue); return result; }
public static Map toOpenJPAProperties(PersistenceUnitInfo info) { Map map = new HashMap(); Set<String> added = new HashSet<String>(); if (info.getTransactionType() == PersistenceUnitTransactionType.JTA) put(map, added, "TransactionMode", "managed"); boolean hasJta = fals...
public static Map toOpenJPAProperties(PersistenceUnitInfo info) { Map map = new HashMap(); Set<String> added = new HashSet<String>(); if (info.getTransactionType() == PersistenceUnitTransactionType.JTA) put(map, added, "TransactionMode", "managed"); boolean hasJta = fals...
protected String fTargetNamespace;
protected short fFinalDefault; // targetNamespace String fTargetNamespace;
private void processComplexContent(int typeNameIndex, Element complexContentChild, ComplexTypeInfo typeInfo, QName baseName, boolean isMixed) throws Exception { Element attrNode = null; int index=-2; if (complexContentChild != null) { // --------------...
private void processComplexContent(int typeNameIndex, Element complexContentChild, ComplexTypeInfo typeInfo, QName baseName, boolean isMixed) throws Exception { Element attrNode = null; int index=-2; if (complexContentChild != null) { // --------------...
public static int deleteContents(File dir, FileFilter filter, boolean deleteEmptyDirs) { if (null == dir) { throw new IllegalArgumentException("null dir"); } if ((!dir.exists()) || (!dir.canWrite())) { return 0; } i...
public static int deleteContents(File dir, FileFilter filter, boolean deleteEmptyDirs) { if (null == dir) { throw new IllegalArgumentException("null dir"); } if ((!dir.exists()) || (!dir.canWrite())) { return 0; } i...
public void weave(BcelWeaver weaver, File outFile) throws IOException { int count = 0; long startTime = System.currentTimeMillis(); weaver.addJarFile(inFile, new File(".")); weaver.weave(outFile); long stopTime = System.currentTimeMillis(); System.out.println("handled " + count + " entries, in " + ...
public void weave(BcelWeaver weaver, File outFile) throws IOException { int count = 0; long startTime = System.currentTimeMillis(); weaver.addJarFile(inFile, new File("."),false); weaver.weave(outFile); long stopTime = System.currentTimeMillis(); System.out.println("handled " + count + " entries, in ...
public ControlExample(Composite parent) { initResources(); tabFolder = new TabFolder (parent, SWT.NONE); tabs = createTabs(); for (int i=0; i<tabs.length; i++) { TabItem item = new TabItem (tabFolder, SWT.NONE); item.setText (tabs [i].getTabText ()); item.setControl (tabs [i].createTabFolderPage...
public ControlExample(Composite parent) { initResources(); tabFolder = new TabFolder (parent, SWT.NONE); tabs = createTabs(); for (int i=0; i<tabs.length; i++) { TabItem item = new TabItem (tabFolder, SWT.NONE); item.setText (tabs [i].getTabText ()); item.setControl (tabs [i].createTabFolderPage...
public void testUnimplementedSyntax() { checkCompile("src1/UnimplementedSyntax.java", new int[] {5, 15, 16, 23}); }
public void testUnimplementedSyntax() { checkCompile("src1/UnimplementedSyntax.java", new int[] {5, 15, 16, 22, 25}); }
public static final int I1.c = 5; // introduce on class // should introduce into // C1 int C1.b; int C1.e = 2; // introduce on class with static modifier // should introduce into // C1 static int C1.f = 2; int C1.getF() { return 2; } } aspect A2 { declare dominates: A2, A1;
public static final int I1.c = 5; // introduce on class // should introduce into // C1 int C1.b; int C1.e = 2; // introduce on class with static modifier // should introduce into // C1 static int C1.f = 2; int C1.getF() { return 2; } } aspect A2 { declare precedence: A2, A1;
public void translate(int dx, int dy) { _p1.translate(dx, dy); _p2.translate(dx, dy); } Point getP1() { return _p1; } Point getP2() { return _p2; } void setP1(Point p1) { _p1 = p1; } void setP2(Point p2) { _p2 = p2; } //... } aspect JoinPointCounting { static int n = 0;...
public void translate(int dx, int dy) { _p1.translate(dx, dy); _p2.translate(dx, dy); } Point getP1() { return _p1; } Point getP2() { return _p2; } void setP1(Point p1) { _p1 = p1; } void setP2(Point p2) { _p2 = p2; } //... } aspect JoinPointCounting { static int n = 0;...
public static void main (String[] args) { C s = new C(); System.err.println("title: " + s.title()); } } class C {} // bug: dominates clause prevents collision error abstract aspect AA { declare dominates: AA, B; // same result if this line is uncommented
public static void main (String[] args) { C s = new C(); System.err.println("title: " + s.title()); } } class C {} // bug: dominates clause prevents collision error abstract aspect AA { declare precedence: AA, B; // same result if this line is uncommented
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("declare dominates: "); buf.append(patterns); buf.append(";"); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); buf.append("declare precedence: "); buf.append(patterns); buf.append(";"); return buf.toString(); }
public Caret getCaret () { checkWidget(); return caret; } Point getIMCaretPos () { if (caret == null) return super.getIMCaretPos (); return new Point (caret.x, caret.y); } int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { if ((state & OBSCURED) != 0) return 0; boolean isFocus = caret != ...
public Caret getCaret () { checkWidget(); return caret; } Point getIMCaretPos () { if (caret == null) return super.getIMCaretPos (); return new Point (caret.x, caret.y); } int /*long*/ gtk_expose_event (int /*long*/ widget, int /*long*/ event) { if ((state & OBSCURED) != 0) return 0; boolean isFocus = caret != ...
public Caret getCaret () { checkWidget(); return caret; } Caret getIMCaret () { return caret; } void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean allChildren) { boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus (); super.redrawWidget (x, y, wid...
public Caret getCaret () { checkWidget(); return caret; } Caret getIMCaret () { return caret; } void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boolean allChildren) { boolean isFocus = caret != null && caret.isFocusCaret (); if (isFocus) caret.killFocus (); super.redrawWidget (x, y, wid...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void addEncodedArgument(String name,String value) { Arguments args = getArguments(); HTTPArgument arg = new HTTPArgument(name,value,true); if(arg.getName().equals(arg.getEncodedName()) && arg.getValue().equals(arg.getEncodedValue())) { arg.setAlwaysEncoded(false); } args.addArgument(new HTTPArgu...
public void addEncodedArgument(String name,String value) { Arguments args = getArguments(); HTTPArgument arg = new HTTPArgument(name,value,true); if(arg.getName().equals(arg.getEncodedName()) && arg.getValue().equals(arg.getEncodedValue())) { arg.setAlwaysEncoded(false); } args.addArgument(arg); }
public String getConfigurationType() { return DEPLOYMENT; }
public String getConfigurationType() { return DEVELOPMENT; }
public void testRenderHomePage() throws Exception { // Validate the document String document = application.getServletResponse().getDocument(); DiffUtil.validatePage(document, getClass(), "MockPage_expectedResult.html", true); // Inspect the page & model MockPage p = (MockPage)application.getLastRenderedPag...
public void testRenderHomePage() throws Exception { // Validate the document String document = application.getLastResponseAsString(); DiffUtil.validatePage(document, getClass(), "MockPage_expectedResult.html", true); // Inspect the page & model MockPage p = (MockPage)application.getLastRenderedPage(); As...
public final synchronized Page getPage(final String pageMapName, final String path, final int versionNumber) { if (log.isDebugEnabled()) { log.debug("Getting page [path = " + path + ", versionNumber = " + versionNumber + "]"); } // Get page map by name, creating the default page map automatically Pag...
public final synchronized Page getPage(final String pageMapName, final String path, final int versionNumber) { if (log.isDebugEnabled()) { log.debug("Getting page [path = " + path + ", versionNumber = " + versionNumber + "]"); } // Get page map by name, creating the default page map automatically Pag...
public void run() { stackshare.sendShareStackRequest(entry.getRoster().getUser().getName(), entry.getUser().getID(), selection.getText()); } }; action.setText(Messages.ConsoleShare_RosterEntryMenu); action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Mess...
public void run() { stackshare.sendShareConsoleSelection(entry.getRoster().getUser().getName(), entry.getUser().getID(), selection.getText()); } }; action.setText(Messages.ConsoleShare_RosterEntryMenu); action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, ...
protected String getURL() { String pageMapName = PageMap.DEFAULT_NAME; if (getPopupSettings() != null) { pageMapName = "popup" + popupNumber; popupNumber++; } return getPage().urlFor(getSession().getPageMap(pageMapName), pageClass, parameters); }
protected String getURL() { String pageMapName = PageMap.DEFAULT_NAME; if (getPopupSettings() != null) { pageMapName = "popup" + popupNumber; popupNumber++; } return getPage().urlFor(PageMap.forName(pageMapName), pageClass, parameters); }
public Component getLoadingComponent(final String markupId) { IRequestHandler handler = new ResourceReferenceRequestHandler( AbstractDefaultAjaxBehavior.INDICATOR); return new Label(markupId, "<img src=\"" + RequestCycle.get().renderUrlFor(handler) + "\"/>").setEscapeModelStrings(false); }
public Component getLoadingComponent(final String markupId) { IRequestHandler handler = new ResourceReferenceRequestHandler( AbstractDefaultAjaxBehavior.INDICATOR); return new Label(markupId, "<img alt=\"Loading...\" src=\"" + RequestCycle.get().renderUrlFor(handler) + "\"/>").setEscapeModelStrings(false); ...
protected void serializeNode( Node node ) throws IOException { fCurrentNode = node; // Based on the node type call the suitable SAX handler. // Only comments entities and documents which are not // handled by SAX are serialized directly. switch ( node.getNodeType...
protected void serializeNode( Node node ) throws IOException { fCurrentNode = node; // Based on the node type call the suitable SAX handler. // Only comments entities and documents which are not // handled by SAX are serialized directly. switch ( node.getNodeType...
public void run() throws AntException { getLogger().info( m_message ); }
public void run() throws AntException { getLogger().warn( m_message ); }
public void addContent( final Integer value ) { getLogger().info( "Integer content: " + value ); }
public void addContent( final Integer value ) { getLogger().warn( "Integer content: " + value ); }
return "swt-xulrunner"; //$NON-NLS-1$ /******************************************************************************* * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * ...
return "swt-xulrunner"; //$NON-NLS-1$ /******************************************************************************* * Copyright (c) 2005, 2007 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * ...
public DefaultTreeTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses) { super(headers, readFunctors, writeFunctors, editorClasses); }
public DefaultTreeTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class<?>[] editorClasses) { super(headers, readFunctors, writeFunctors, editorClasses); }
public JTreeTable(Vector rowData, Vector columnNames) { super(rowData, columnNames); } }
public JTreeTable(Vector<?> rowData, Vector<?> columnNames) { super(rowData, columnNames); } }
public AccessLogSamplerBeanInfo() { super(AccessLogSampler.class); log.debug("Entered access log sampler bean info"); try { createPropertyGroup("defaults", // $NON-NLS-1$ new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON...
public AccessLogSamplerBeanInfo() { super(AccessLogSampler.class); log.debug("Entered access log sampler bean info"); try { createPropertyGroup("defaults", // $NON-NLS-1$ new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON...
JComponent renderChart(List<DataSet> data); /* * 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 Lice...
JComponent renderChart(List<DataSet> data); /* * 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 Lice...
public int parse(TestElement el,int parseCount) { if (this.SOURCE == null) { this.SOURCE = this.openFile(this.FILENAME); } try { if (this.READER == null) { this.READER = new BufferedReader(new FileReader(this.SOURCE)); ...
public int parse(TestElement el,int parseCount) { if (this.SOURCE == null) { this.SOURCE = this.openFile(this.FILENAME); } try { if (this.READER == null) { this.READER = new BufferedReader(new FileReader(this.SOURCE)); ...
public DeferredNode getNodeObject(int nodeIndex) { // is there anything to do? if (nodeIndex == -1) { return null; } // get node type int chunk = nodeIndex >> CHUNK_SHIFT; int index = nodeIndex & CHUNK_MASK; int type = clearChunkIndex(fNodeType, ...
public DeferredNode getNodeObject(int nodeIndex) { // is there anything to do? if (nodeIndex == -1) { return null; } // get node type int chunk = nodeIndex >> CHUNK_SHIFT; int index = nodeIndex & CHUNK_MASK; int type = clearChunkIndex(fNodeType, ...
package java.lang; // Fake class to keep 1.4 JVM (that will be running the tests) happy package java.lang; public class Enum { }
package java.lang; // Fake class to keep 1.4 JVM (that will be running the tests) happy package java.lang; // Fake class to keep 1.4 JVM (that will be running the tests) happy public class Enum { }
public void execute() throws TaskException { if( property == null ) { throw new TaskException( "property attribute is required" ); } if( eval() ) { String lSep = System.getProperty( "line.separator" ); if( null == project.getPr...
public void execute() throws TaskException { if( property == null ) { throw new TaskException( "property attribute is required" ); } if( eval() ) { String lSep = System.getProperty( "line.separator" ); if( null == project.getPr...
private boolean generateChecksums() throws TaskException { boolean checksumMatches = true; FileInputStream fis = null; FileOutputStream fos = null; try { for( Enumeration e = includeFileMap.keys(); e.hasMoreElements(); ) { m...
private boolean generateChecksums() throws TaskException { boolean checksumMatches = true; FileInputStream fis = null; FileOutputStream fos = null; try { for( Enumeration e = includeFileMap.keys(); e.hasMoreElements(); ) { m...
public void execute() throws TaskException { Vector accept = null; if( validargs != null ) { accept = new Vector(); StringTokenizer stok = new StringTokenizer( validargs, ",", false ); while( stok.hasMoreTokens() ) { ...
public void execute() throws TaskException { Vector accept = null; if( validargs != null ) { accept = new Vector(); StringTokenizer stok = new StringTokenizer( validargs, ",", false ); while( stok.hasMoreTokens() ) { ...
private int run( String[] command ) throws TaskException { FileOutputStream fos = null; try { Execute exe = null; if( out == null ) { exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, ...
private int run( String[] command ) throws TaskException { FileOutputStream fos = null; try { Execute exe = null; if( out == null ) { exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, ...
public void execute() throws TaskException { boolean upToDate = eval(); if( upToDate ) { this.project.setProperty( _property, this.getValue() ); if( mapperElement == null ) { log( "File \"" + _targetFile.getAbsolutePath() + "\" ...
public void execute() throws TaskException { boolean upToDate = eval(); if( upToDate ) { setProperty( _property, this.getValue() ); if( mapperElement == null ) { log( "File \"" + _targetFile.getAbsolutePath() + "\" is up to date...
public void execute() throws TaskException { Commandline baseCmd = null;// the common portion of our cmd line DirectoryScanner scanner = null;// Scanner to find our inputs String[] files;// list of files to process // default srcDir to basedir if( srcDir == null...
public void execute() throws TaskException { Commandline baseCmd = null;// the common portion of our cmd line DirectoryScanner scanner = null;// Scanner to find our inputs String[] files;// list of files to process // default srcDir to basedir if( srcDir == null...
protected int run( Commandline cmd, ExecuteStreamHandler handler ) throws TaskException { try { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); exe.setWorkingDirectory( getProject().getBaseDir() ); exe.setCommandline( c...
protected int run( Commandline cmd, ExecuteStreamHandler handler ) throws TaskException { try { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); exe.setWorkingDirectory( getBaseDirectory() ); exe.setCommandline( cmd.getC...
public void execute() throws TaskException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj....
public void execute() throws TaskException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( getBas...
public void execute() throws TaskException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj....
public void execute() throws TaskException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( getBas...