buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.ENGLISH, new Locale("nl"), Locale.GERMAN, Locale.SIMPLIFIED_CHINESE });
private static final List LOCALES = Arrays.asList(new Locale[] { Locale.ENGLISH, new Locale("nl"), Locale.GERMAN, Locale.SIMPLIFIED_CHINESE, Locale.JAPANESE });
public void parse(Project project, Object source, RootHandler handler) throws BuildException { AntXMLContext context = handler.context; File buildFile = null; URL url = null; String buildFileName = null; if (source instanceof File) { buildFile = (File) source;...
public void parse(Project project, Object source, RootHandler handler) throws BuildException { AntXMLContext context = handler.context; File buildFile = null; URL url = null; String buildFileName = null; if (source instanceof File) { buildFile = (File) source;...
public static String fromJarURI(String uri) { int pling = uri.indexOf('!'); String jarName = uri.substring("jar:".length(), pling);
public static String fromJarURI(String uri) { int pling = uri.indexOf("!/"); String jarName = uri.substring("jar:".length(), pling);
public void mousePressed(MouseEvent e) { // Get the Main Frame. ReportMainFrame mainFrame = ReportGuiPackage.getInstance().getMainFrame(); // Close any Main Menu that is open mainFrame.closeMenu(); int selRow = tree.getRowForLocation(e.getX(), e.getY()); if (tree.getP...
public void mousePressed(MouseEvent e) { // Get the Main Frame. ReportMainFrame mainFrame = ReportGuiPackage.getInstance().getMainFrame(); // Close any Main Menu that is open mainFrame.closeMenu(); int selRow = tree.getRowForLocation(e.getX(), e.getY()); if (tree.getP...
private String getSessionAttributePrefix(final WebRequest request) { return application.getSessionAttributePrefix(request); }
private String getSessionAttributePrefix(final WebRequest request) { return application.getSessionAttributePrefix(request, null); }
public void setWidth (int value) { checkWidget (); if (width < 0) return; if (width == value) return; /* same value */ parent.updateColumnWidth (this, value); }
public void setWidth (int value) { checkWidget (); if (value < 0) return; if (width == value) return; /* same value */ parent.updateColumnWidth (this, value); }
public SampleResult sample(Entry e) { XMLBuffer xmlBuffer = new XMLBuffer(); xmlBuffer.openTag("ldapanswer"); // $NON-NLS-1$ SampleResult res = new SampleResult(); res.setResponseData("successfull", null); res.setResponseMessage("Success"); // $NON-NLS-1$ res.setRespo...
public SampleResult sample(Entry e) { XMLBuffer xmlBuffer = new XMLBuffer(); xmlBuffer.openTag("ldapanswer"); // $NON-NLS-1$ SampleResult res = new SampleResult(); res.setResponseData("successfull", null); res.setResponseMessage("Success"); // $NON-NLS-1$ res.setRespo...
private void parseNodes(final NodeIterator e, final URLPointer baseUrl, final URLCollection urls) throws HTMLParseException, ParserException { while(e.hasMoreNodes()) { Node node = e.nextNode(); // a url is always in a Tag. if (!(node instanceof Tag)) ...
private void parseNodes(final NodeIterator e, final URLPointer baseUrl, final URLCollection urls) throws HTMLParseException, ParserException { while(e.hasMoreNodes()) { Node node = e.nextNode(); // a url is always in a Tag. if (!(node instanceof Tag)) ...
private static final String TESTRESULTS_START_V1_1 = "<testResults version=\"" // $NON-NLS-1$ + SaveService.version + "\">"; // $NON-NLS-1$
private static final String TESTRESULTS_START_V1_1 = "<testResults version=\"" // $NON-NLS-1$ + SaveService.getVERSION() + "\">"; // $NON-NLS-1$
private void printEvent(DragSourceEvent e) { if (!dragEventDetail) return; StringBuffer sb = new StringBuffer(); sb.append("widget: "); sb.append(e.widget); sb.append(", time: "); sb.append(e.time); sb.append(", operation: "); sb.append(e.detail); sb.append(", type: "); sb.append(e.dataType != null ? e.dataType.t...
private void printEvent(DragSourceEvent e) { if (!dragEventDetail) return; StringBuffer sb = new StringBuffer(); sb.append("widget: "); sb.append(e.widget); sb.append(", time: "); sb.append(e.time); sb.append(", operation: "); sb.append(e.detail); sb.append(", type: "); sb.append(e.dataType != null ? e.dataType.t...
public IHeaderResponse getHeaderResponse() { if (headerResponse == null) { headerResponse = newHeaderResponse(); } return headerResponse; }
public IHeaderResponse getHeaderResponse() { if (headerResponse == null) { headerResponse = getApplication().decorateHeaderResponse(newHeaderResponse()); } return headerResponse; }
public void setVisibleItemCount (int count) { checkWidget (); if (count < 0) return; visibleCount = count; if ((style & SWT.DROP_DOWN) != 0) { forceResize (); RECT rect = new RECT (); OS.GetWindowRect (handle, rect); int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; setBo...
public void setVisibleItemCount (int count) { checkWidget (); if (count < 0) return; visibleCount = count; if ((style & SWT.DROP_DOWN) != 0) { forceResize (); RECT rect = new RECT (); OS.GetWindowRect (handle, rect); int flags = OS.SWP_NOMOVE | OS.SWP_NOZORDER | OS.SWP_DRAWFRAME | OS.SWP_NOACTIVATE; setBo...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; int border = getBorderWidth (); int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + (border * 2); int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + (border * 2); int count = (int)/*64*/OS.SendMes...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0; int border = getBorderWidth (); int newWidth = wHint == SWT.DEFAULT ? 0x3FFF : wHint + (border * 2); int newHeight = hHint == SWT.DEFAULT ? 0x3FFF : hHint + (border * 2); int count = (int)/*64*/OS.SendMes...
public void setSelection (int value) { checkWidget (); OS.SendMessage (handle, OS.TBM_SETPOS, 1, value); } int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP | OS.TBS_BOTH | OS.TBS_AUTOTICKS; if ((style & SWT.HORIZONTAL) != 0) return bits | OS.TBS_HORZ | OS.TBS_DOWNISLEFT; return bits | OS.TBS_V...
public void setSelection (int value) { checkWidget (); OS.SendMessage (handle, OS.TBM_SETPOS, 1, value); } int widgetStyle () { int bits = super.widgetStyle () | OS.WS_TABSTOP | OS.TBS_BOTH | OS.TBS_AUTOTICKS; if ((style & SWT.HORIZONTAL) != 0) return bits | OS.TBS_HORZ | OS.TBS_DOWNISLEFT; return bits | OS.TBS_V...
private static final List<String> replaceForTags = Arrays.asList(new String[] { "a", "q", "sub", "sup", "abbr", "acronym", "cite", "code", "del", "dfn", "em", "ins", "kbd", "samp", "var", "label", "textarea", "tr", "td", "th", "caption", "thead", "tbody", "tfoot", "dl", "dt", "dd", "li", "ol", "ul", "h1", "h2...
private static final List<String> replaceForTags = Arrays.asList(new String[] { "a", "q", "sub", "sup", "abbr", "acronym", "cite", "code", "del", "dfn", "em", "ins", "kbd", "samp", "var", "label", "textarea", "tr", "td", "th", "caption", "thead", "tbody", "tfoot", "dl", "dt", "dd", "li", "ol", "ul", "h1", "h2...
package org.apache.wicket.devutils.stateless; /* * 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 Li...
package org.apache.wicket.devutils.stateless; /* * 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 Li...
void onException(Component component, RuntimeException exception); /* * 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 Yo...
void onException(Component component, RuntimeException exception); /* * 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 Yo...
public void addValue(Field field, String value) throws Exception; } // interface ValueStore
public void addValue(Field field, IDValue value) throws Exception; } // interface ValueStore
public static final RequestListenerInterface INTERFACE = new RequestListenerInterface( IResourceListener.class);
public static final RequestListenerInterface INTERFACE = new RequestListenerInterface( IResourceListener.class).setIncludeRenderCount(false).setRenderPageAfterInvocation(false);
protected void onSubmit() { info("input: " + listChoicePageInput); } }; // Add a list choice component that uses Input's 'site' property to // designate the // current selection, and that uses the SITES list for the available // options. ListChoice listChoice = new ListChoice(form, "site", Lis...
protected void onSubmit() { info("input: " + listChoicePageInput); } }; // Add a list choice component that uses Input's 'site' property to // designate the // current selection, and that uses the SITES list for the available // options. ListChoice<String> listChoice = new ListChoice<String>(f...
public boolean isSelected (int index) { checkWidget(); //TODO - range check return ((NSTableView)view).isRowSelected(index); }
public boolean isSelected (int index) { checkWidget(); if (!(0 <= index && index < itemCount)) return false; return ((NSTableView)view).isRowSelected(index); }
public boolean isSelected (int index) { checkWidget (); //TODO - range check return ((NSTableView)view).isRowSelected(index); }
public boolean isSelected (int index) { checkWidget (); if (!(0 <= index && index < itemCount)) return false; return ((NSTableView)view).isRowSelected(index); }
public void checkGuiSet() throws Exception { guiTitles.remove("Example Sampler");// We don't mind if this is left over guiTitles.remove("Sample_Result_Save_Configuration");// Ditto, not a sampler assertEquals("Should not have any names left over", 0, scanprintMap(guiTitles, "GUI")); }
public void checkGuiSet() throws Exception { guiTitles.remove("Example Sampler");// We don't mind if this is left over guiTitles.remove("Sample_Result_Save_Configuration");// Ditto, not a sampler assertEquals("Should not have any names left over, check name of components in EN (default) Loca...
public Message[] expunge() throws MessagingException { return null; }
public Message[] expunge() throws MessagingException { return new Message[0]; }
public void configure(TestElement el) { setName(el.getPropertyAsString(TestElement.NAME)); argsPanel.configure((TestElement) el.getProperty(HTTPSampler.ARGUMENTS).getObjectValue()); domain.setText(el.getPropertyAsString(HTTPSampler.DOMAIN)); String portString = (String) ...
public void configure(TestElement el) { setName(el.getPropertyAsString(TestElement.NAME)); argsPanel.configure((TestElement) el.getProperty(HTTPSampler.ARGUMENTS).getObjectValue()); domain.setText(el.getPropertyAsString(HTTPSampler.DOMAIN)); String portString = (String) ...
public String getTypeName(Column col) { if (col.getType() == Types.BLOB) { if (col.getSize() == 0) // unknown size return blobTypeName; // return old default of 64KB else if (col.getSize() <= 255) return tinyBlobTypeName; else if (col.ge...
public String getTypeName(Column col) { if (col.getType() == Types.BLOB) { if (col.getSize() <= 0) // unknown size return blobTypeName; // return old default of 64KB else if (col.getSize() <= 255) return tinyBlobTypeName; else if (col.ge...
protected Resource newResource() { return PackageResource.get(getScope().getPackage(), getName(), getLocale(), getStyle()); }
protected Resource newResource() { return PackageResource.get(getScope(), getName(), getLocale(), getStyle()); }
protected Resource newResource() { return PackageResource.get(getScope().getPackage(), getName(), locale, style); } }; resourceReference.setLocale(locale); resourceReference.setStyle(style); bind(); }
protected Resource newResource() { return PackageResource.get(getScope(), getName(), locale, style); } }; resourceReference.setLocale(locale); resourceReference.setStyle(style); bind(); }
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); NSString str = NSString.stringWith(string); NSTextStorage textStorage = ((...
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); NSString str = NSString.stringWith(string); NSTextStorage textStorage = ((...
public void setSelection (int index) { checkWidget(); if ((style & SWT.MULTI) != 0) deselectAll (); select (index); showSelection (); if ((style & SWT.MULTI) != 0) { if (0 <= index) setFocusIndex (index); } }
public void setSelection (int index) { checkWidget(); deselectAll (); select (index); showSelection (); if ((style & SWT.MULTI) != 0) { if (0 <= index) setFocusIndex (index); } }
protected void onRender() { // TODO optimize this... // Remove any former children removeAll(); // Ask parents for markup stream to use final MarkupStream markupStream = findMarkupStream(); // Save position in markup stream final int markupStart = markupStream.getCurrentIndex(); // Get number ...
protected void onRender() { // TODO optimize this... // Remove any former children removeAll(); // Ask parents for markup stream to use final MarkupStream markupStream = findMarkupStream(); // Save position in markup stream final int markupStart = markupStream.getCurrentIndex(); // Get number ...
protected byte[] loadBinary(URL url, SampleResult res,HTTPSampler sampler) throws Exception { log.debug("Start : loadBinary"); byte[] ret = new byte[0]; res.setSamplerData(new HTTPSampler(url).toString()); HttpURLConnection conn; try { conn = sampler.s...
protected byte[] loadBinary(URL url, SampleResult res,HTTPSampler sampler) throws Exception { log.debug("Start : loadBinary"); byte[] ret = new byte[0]; res.setSamplerData(new HTTPSampler(url).toString()); HttpURLConnection conn; try { conn = sampler.s...
package org.apache.myrmidon.components.configurer.test; /* * 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.txt file. */ pack...
package org.apache.myrmidon.components.configurer.test; /* * 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.txt file. */ pack...
package org.apache.myrmidon.components.configurer.test; /* * 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.txt file. */ pack...
package org.apache.myrmidon.components.configurer.test; /* * 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.txt file. */ pack...
package org.apache.myrmidon.components.configurer.test.data; /* * 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.txt file. */...
package org.apache.myrmidon.components.configurer.test.data; /* * 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.txt file. */...
package org.apache.myrmidon.components.deployer.test; /* * 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.txt file. */ packag...
package org.apache.myrmidon.components.deployer.test; /* * 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.txt file. */ packag...
package org.apache.myrmidon.components.service.test; /* * 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.txt file. */ package...
package org.apache.myrmidon.components.service.test; /* * 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.txt file. */ package...
public void addTestElement(TestElement tg) { super.addTestElement(tg); if (tg instanceof ThreadGroup) { addThreadGroup((ThreadGroup) tg); } }
public void addTestElement(TestElement tg) { super.addTestElement(tg); if (tg instanceof ThreadGroup && !isRunningVersion()) { addThreadGroup((ThreadGroup) tg); } }
public void setUp() { // testFile1 = // Old-style format; no longer used // new File(System.getProperty("user.dir") + "/testfiles", "Test Plan.jmx"); testFile2 = // TODO: not used - why? new File(System.getProperty("user.dir") + "/testfiles", "Modification Manager.jmx"); testFile3 = new File(System.getProperty...
public void setUp() { // testFile1 = // Old-style format; no longer used // new File(System.getProperty("user.dir") + "/testfiles", "Test Plan.jmx"); testFile2 = new File(System.getProperty("user.dir") + "/testfiles", "Modification Manager.jmx"); testFile3 = new File(System.getProperty("user.dir") + "/testfile...
public void joinGroup(ID groupID, IJoinContext joinContext) throws SharedObjectContainerJoinException;
public void joinGroup(ID groupID, IJoinContext joinContext) throws ContainerJoinException;
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException { // Get the encoding to use for the request String contentEncoding = sampler.getContentEncoding(); if(contentEncoding == null || contentEncoding.length() == 0) { contentEncoding = ENCODING; ...
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException { // Get the encoding to use for the request String contentEncoding = sampler.getContentEncoding(); if(contentEncoding == null || contentEncoding.length() == 0) { contentEncoding = ENCODING; ...
public boolean isFatalException(int subtype, SQLException ex) { String errorState = ex.getSQLState(); if ((subtype == StoreException.LOCK || subtype == StoreException.QUERY) &&("1222".equals(errorState) || "HY008".equals(errorState))) return false; return super.isFatalEx...
public boolean isFatalException(int subtype, SQLException ex) { String errorState = ex.getSQLState(); if ((subtype == StoreException.LOCK || subtype == StoreException.QUERY) &&("1222".equals(errorState) || "HY008".equals(errorState) || "HYT00".equals(errorState))) return false; ...
public final void remove() { parent.remove(getId()); }
public final void remove() { parent.remove(this); }
protected void onEndRequest() { final Component header = get(HtmlHeaderSectionHandler.HEADER_ID); if (header != null) { this.remove(header.getId()); } super.onEndRequest(); }
protected void onEndRequest() { final Component header = get(HtmlHeaderSectionHandler.HEADER_ID); if (header != null) { this.remove(header); } super.onEndRequest(); }
public Object createDataType(String typeName) throws BuildException { Class c = (Class) dataClassDefinitions.get(typeName); if (c == null) { return null; } try { java.lang.reflect.Constructor ctor = null; boolean noArg = false; // Dat...
public Object createDataType(String typeName) throws BuildException { Class c = (Class) dataClassDefinitions.get(typeName); if (c == null) { return null; } try { java.lang.reflect.Constructor ctor = null; boolean noArg = false; // Dat...
protected boolean startNamedQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-query", name)); QueryMet...
protected boolean startNamedQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-query", name)); QueryMet...
interface ConfigurationState /* * 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.txt file. */ package org.apache.myrmidon.com...
interface ConfigurationState /* * 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.txt file. */ package org.apache.myrmidon.com...
interface ObjectConfigurer /* * 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.txt file. */ package org.apache.myrmidon.compon...
interface ObjectConfigurer /* * 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.txt file. */ package org.apache.myrmidon.compon...
interface PropertyConfigurer /* * 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.txt file. */ package org.apache.myrmidon.comp...
interface PropertyConfigurer /* * 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.txt file. */ package org.apache.myrmidon.comp...
public FilteredAbstractColumn(Model displayModel) { super(displayModel); } }
public FilteredAbstractColumn(IModel displayModel) { super(displayModel); } }
protected AttrImpl(DocumentImpl ownerDocument, String name) { super(ownerDocument, null); this.name = name; syncData = true; }
protected AttrImpl(DocumentImpl ownerDocument, String name) { super(ownerDocument); this.name = name; syncData = true; }
protected void synchronizeData() { // no need to sync in the future syncData = false; // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) this.ownerDocument; target = ownerDocument.getNodeNameString(fNodeIndex); value = ownerDocume...
protected void synchronizeData() { // no need to sync in the future syncData = false; // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) this.ownerDocument; target = ownerDocument.getNodeNameString(fNodeIndex); data = ownerDocumen...
public ElementDefinitionImpl(DocumentImpl ownerDocument, String name) { super(ownerDocument, null); this.name = name; attributes = new NamedNodeMapImpl(ownerDocument, null); }
public ElementDefinitionImpl(DocumentImpl ownerDocument, String name) { super(ownerDocument); this.name = name; attributes = new NamedNodeMapImpl(ownerDocument, null); }
public static synchronized TopicConnectionFactory getTopicConnectionFactory( Context ctx, String fac){ while (factory == null){ try { Object objfac = ctx.lookup(fac); if (objfac instanceof TopicConnectionFactory){ factory = (TopicConnectionFactory)objfac; } } catch (NamingException e){ lo...
public static synchronized TopicConnectionFactory getTopicConnectionFactory( Context ctx, String fac){ while (factory == null){ try { Object objfac = ctx.lookup(fac); if (objfac instanceof TopicConnectionFactory){ factory = (TopicConnectionFactory)objfac; } } catch (NamingException e){ lo...
public int getSubtype() { return StoreException.OPTIMISTIC; }
public int getSubtype() { return StoreException.LOCK; }
public interface ICoverterLocatorFactory /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of ...
public interface ICoverterLocatorFactory /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of ...
public void handleEvent (Event event) { log (event); } }; for (int i = 0; i < EVENT_NAMES.length; i++) { if (eventsFilter [i]) widget.addListener (i, listener); } } } /** * Logs an untyped event to the event console. */ void log(Event event) { String toString = EVENT_NAMES[event.t...
public void handleEvent (Event event) { log (event); } }; for (int i = 0; i < EVENT_NAMES.length; i++) { if (eventsFilter [i]) widget.addListener (i, listener); } } } /** * Logs an untyped event to the event console. */ void log(Event event) { String toString = EVENT_NAMES[event.t...
public synchronized ClassMetaData getMetaData(Class cls, ClassLoader envLoader, boolean mustExist) { if (cls != null && DynamicPersistenceCapable.class.isAssignableFrom(cls)) cls = cls.getSuperclass(); ClassMetaData meta = getMetaDataInternal(cls, envLoader); ...
public synchronized ClassMetaData getMetaData(Class cls, ClassLoader envLoader, boolean mustExist) { if (cls != null && DynamicPersistenceCapable.class.isAssignableFrom(cls)) cls = cls.getSuperclass(); ClassMetaData meta = getMetaDataInternal(cls, envLoader); ...
private void setIdentity(Object val) { if (val == null || _identity != null) return; if (ImplHelper.isManagedType(val.getClass())) _identity = Boolean.TRUE; else _identity = Boolean.FALSE; add = switchStructure(add, _identity.booleanValue()); ...
private void setIdentity(Object val) { if (val == null || _identity != null) return; if (ImplHelper.isManagedType(null, val.getClass())) _identity = Boolean.TRUE; else _identity = Boolean.FALSE; add = switchStructure(add, _identity.booleanValue()...
protected BCClass generateProxyBeanBytecode(Class type, boolean runtime) { if (Modifier.isFinal(type.getModifiers())) return null; if (ImplHelper.isManagedType(type)) return null; // we can only generate a valid proxy if there is a copy constructor // or a de...
protected BCClass generateProxyBeanBytecode(Class type, boolean runtime) { if (Modifier.isFinal(type.getModifiers())) return null; if (ImplHelper.isManagedType(null, type)) return null; // we can only generate a valid proxy if there is a copy constructor // o...
public void testImplHelperCalls() { assertTrue(ImplHelper.isManagedType(getUnenhancedClass())); UnenhancedType un = newUnenhancedInstance(); assertFalse(un instanceof PersistenceCapable); PersistenceCapable pc = ImplHelper.toPersistenceCapable(un, emf.getConfiguration())...
public void testImplHelperCalls() { assertTrue(ImplHelper.isManagedType(null, getUnenhancedClass())); UnenhancedType un = newUnenhancedInstance(); assertFalse(un instanceof PersistenceCapable); PersistenceCapable pc = ImplHelper.toPersistenceCapable(un, emf.getConfigurat...
private void parseNamedNativeQueries(AnnotatedElement el, NamedNativeQuery... queries) { QueryMetaData meta; for (NamedNativeQuery query : queries) { if (StringUtils.isEmpty(query.name())) throw new MetaDataException(_loc.get("no-native-query-name", ...
private void parseNamedNativeQueries(AnnotatedElement el, NamedNativeQuery... queries) { QueryMetaData meta; for (NamedNativeQuery query : queries) { if (StringUtils.isEmpty(query.name())) throw new MetaDataException(_loc.get("no-native-query-name", ...
protected boolean startNamedNativeQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-native-query", name)); ...
protected boolean startNamedNativeQuery(Attributes attrs) throws SAXException { if (!isQueryMode()) return false; String name = attrs.getValue("name"); Log log = getLog(); if (log.isTraceEnabled()) log.trace(_loc.get("parse-native-query", name)); ...
public static void main (String [] args) { Display display = new Display (); final Shell shell = new Shell (display); final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER); for (int i=0; i<6; i++) { TabItem item = new TabItem (tabFolder, SWT.NONE); item.setText ("TabItem " + i); Button button = new Bu...
public static void main (String [] args) { Display display = new Display (); final Shell shell = new Shell (display); final TabFolder tabFolder = new TabFolder (shell, SWT.BORDER); for (int i=0; i<6; i++) { TabItem item = new TabItem (tabFolder, SWT.NONE); item.setText ("TabItem " + i); Button button = new Bu...
public Sampler next() { Sampler returnValue = null; if (isFirst()) // must be the start of the subtree { log_debug("+++++++++++++++++++++++++++++"); calls = 0; res = new SampleResult(); res.sampleStart(); } calls++; returnValue = super.next(); if (returnValue == null) // Must be the end of...
public Sampler next() { Sampler returnValue = null; if (isFirst()) // must be the start of the subtree { log_debug("+++++++++++++++++++++++++++++"); calls = 0; res = new SampleResult(); res.sampleStart(); } calls++; returnValue = super.next(); if (returnValue == null) // Must be the end of...
public SampleResult sample() { SampleResult result = new SampleResult(); try { result.setURL(this.getUrl()); result.setSampleLabel(getName()); org.w3c.dom.Element rdoc = createDocument(); if (rdoc == null) throw new SOAPException("Could not create document", null); Envelope msgEnv = Envelope.unm...
public SampleResult sample() { SampleResult result = new SampleResult(); try { result.setURL(this.getUrl()); result.setSampleLabel(getName()); org.w3c.dom.Element rdoc = createDocument(); if (rdoc == null) throw new SOAPException("Could not create document", null); Envelope msgEnv = Envelope.unm...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { log.debug(getLabel() + " " + getFilename() + " " + getUsername() + " " + getPassword()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getName());// Use the test element name for the // la...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { log.debug(getLabel() + " " + getFilename() + " " + getUsername() + " " + getPassword()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getName());// Use the test element name for the // la...
public boolean isPlanar() { return OS.objc_msgSend(this.id, OS.sel_isPlanar) != 0; }
public boolean isPlanar() { return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar); }
public static boolean loadNibFile(NSString fileName, NSDictionary context, int /*long*/ zone) { return OS.objc_msgSend(OS.class_NSBundle, OS.sel_loadNibFile_externalNameTable_withZone_, fileName != null ? fileName.id : 0, context != null ? context.id : 0, zone) != 0; }
public static boolean loadNibFile(NSString fileName, NSDictionary context, int /*long*/ zone) { return OS.objc_msgSend_bool(OS.class_NSBundle, OS.sel_loadNibFile_externalNameTable_withZone_, fileName != null ? fileName.id : 0, context != null ? context.id : 0, zone); }
public boolean wraps() { return OS.objc_msgSend(this.id, OS.sel_wraps) != 0; }
public boolean wraps() { return OS.objc_msgSend_bool(this.id, OS.sel_wraps); }
public boolean sendAction(int /*long*/ theAction, id theTarget) { return OS.objc_msgSend(this.id, OS.sel_sendAction_to_, theAction, theTarget != null ? theTarget.id : 0) != 0; }
public boolean sendAction(int /*long*/ theAction, id theTarget) { return OS.objc_msgSend_bool(this.id, OS.sel_sendAction_to_, theAction, theTarget != null ? theTarget.id : 0); }
public boolean isSessionOnly() { return OS.objc_msgSend(this.id, OS.sel_isSessionOnly) != 0; }
public boolean isSessionOnly() { return OS.objc_msgSend_bool(this.id, OS.sel_isSessionOnly); }
public boolean hasAlpha() { return OS.objc_msgSend(this.id, OS.sel_hasAlpha) != 0; }
public boolean hasAlpha() { return OS.objc_msgSend_bool(this.id, OS.sel_hasAlpha); }
public boolean worksWhenModal() { return OS.objc_msgSend(this.id, OS.sel_worksWhenModal) != 0; }
public boolean worksWhenModal() { return OS.objc_msgSend_bool(this.id, OS.sel_worksWhenModal); }
public boolean runMode(NSString mode, NSDate limitDate) { return OS.objc_msgSend(this.id, OS.sel_runMode_beforeDate_, mode != null ? mode.id : 0, limitDate != null ? limitDate.id : 0) != 0; }
public boolean runMode(NSString mode, NSDate limitDate) { return OS.objc_msgSend_bool(this.id, OS.sel_runMode_beforeDate_, mode != null ? mode.id : 0, limitDate != null ? limitDate.id : 0); }
public boolean documentViewShouldHandlePrint() { return OS.objc_msgSend(this.id, OS.sel_documentViewShouldHandlePrint) != 0; }
public boolean documentViewShouldHandlePrint() { return OS.objc_msgSend_bool(this.id, OS.sel_documentViewShouldHandlePrint); }
private void lookForPackageInfos(File srcDir, File[] newFiles) { for (int i = 0; i < newFiles.length; i++) { File f = newFiles[i]; if (!f.getName().equals("package-info.java")) { continue; } String path = FILE_UTILS.removeLeadingPath(srcDir, f)...
private void lookForPackageInfos(File srcDir, File[] newFiles) { for (int i = 0; i < newFiles.length; i++) { File f = newFiles[i]; if (!f.getName().equals("package-info.java")) { continue; } String path = FILE_UTILS.removeLeadingPath(srcDir, f)...
public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index >= 0) showIndex (index); } void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; postEvent (SWT.Selection); } boolean tableView_shouldEditTableColumn_ro...
public void showSelection () { checkWidget(); int index = getSelectionIndex (); if (index >= 0) showIndex (index); } void tableViewSelectionDidChange (int /*long*/ id, int /*long*/ sel, int /*long*/ aNotification) { if (ignoreSelect) return; postEvent (SWT.Selection); } boolean tableView_shouldEditTableColumn_ro...
public void run() { running = true; ServerSocket mainSocket = null; try { log.info("Creating Daemon Socket... on port " + daemonPort); mainSocket = new ServerSocket(daemonPort); mainSocket.setSoTimeout(ACCEPT_TIMEOUT); log.info("Pr...
public void run() { running = true; ServerSocket mainSocket = null; try { log.info("Creating Daemon Socket... on port " + daemonPort); mainSocket = new ServerSocket(daemonPort); mainSocket.setSoTimeout(ACCEPT_TIMEOUT); log.info("Pr...
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); if (count == itemCount) return; boolean isVirtual = (style & SWT.VIRTUAL) != 0; if (!isVirtual) setRedraw (false); remove (count, itemCount - 1); int length = Math.max (4, (count + 3) / 4 * 4); TableItem [] newItems = new TableI...
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); if (count == itemCount) return; boolean isVirtual = (style & SWT.VIRTUAL) != 0; if (!isVirtual) setRedraw (false); remove (count, itemCount - 1); int length = Math.max (4, (count + 3) / 4 * 4); TableItem [] newItems = new TableI...
public File getRandomFile(String basedir){ File input = null; if (basedir != null) { File src = new File(basedir); if (src.isDirectory() && src.list() != null) { File[] files = src.listFiles( new JMeterFileFilter(new String[] { ".txt,.obj" })); int count = files.length; inpu...
public File getRandomFile(String basedir){ File input = null; if (basedir != null) { File src = new File(basedir); if (src.isDirectory() && src.list() != null) { File[] files = src.listFiles( new JMeterFileFilter(new String[] { ".txt",".obj" })); int count = files.length; in...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); CGRect oldBounds = new CGRect (), bounds = oldBounds; OS.HIViewGetFrame (handle, oldBounds); int MIN_SIZE = 100; if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) { OS.HIViewSetDrawingEnabled (handle, false); boun...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); CGRect oldBounds = new CGRect (), bounds = oldBounds; OS.HIViewGetFrame (handle, oldBounds); int MIN_SIZE = 100; if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) { OS.HIViewSetDrawingEnabled (handle, false); boun...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); CGRect oldBounds = new CGRect (), bounds = oldBounds; OS.HIViewGetFrame (handle, oldBounds); int MIN_SIZE = 100; if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) { OS.HIViewSetDrawingEnabled (handle, false); boun...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); CGRect oldBounds = new CGRect (), bounds = oldBounds; OS.HIViewGetFrame (handle, oldBounds); int MIN_SIZE = 100; if (oldBounds.width < MIN_SIZE || oldBounds.height < MIN_SIZE) { OS.HIViewSetDrawingEnabled (handle, false); boun...
public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); parent.checkItems (true); if (index != 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); Rect rect = new Rect(); int itemIndex = parent.indexOf (th...
public Rectangle getTextBounds (int index) { checkWidget (); if (!parent.checkData (this, true)) error (SWT.ERROR_WIDGET_DISPOSED); parent.checkItems (true); if (index != 0 && !(0 <= index && index < parent.columnCount)) return new Rectangle (0, 0, 0, 0); Rect rect = new Rect(); int itemIndex = parent.indexOf (th...
public int indexOf (ToolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<itemCount; i++) { if (items [i] == item) return i; } return -1; } void invalidateChildrenVisibleRegion (int control) { super.invalida...
public int indexOf (ToolItem item) { checkWidget(); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed()) error(SWT.ERROR_INVALID_ARGUMENT); for (int i=0; i<itemCount; i++) { if (items [i] == item) return i; } return -1; } void invalidateChildrenVisibleRegion (int control) { super.invalida...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; return parent._indexOf (this, item); } void redraw (int propertyID) { if (parent.ignoreRedraw) return; if (p...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != this) return -1; return parent._indexOf (this, item); } void redraw (int propertyID) { if (parent.ignoreRedraw) return; if (!...
public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<presence"); if (getPacketID() != null) { buf.append(" id=\"").append(getPacketID()).append("\""); } if (getTo() != null) { buf.append(" to=\"").append(StringUtils.escapeForXML(...
public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<presence"); if (getPacketID() != null) { buf.append(" id=\"").append(getPacketID()).append("\""); } if (getTo() != null) { buf.append(" to=\"").append(StringUtils.escapeForXML(...
public static PacketExtension parsePacketExtension(String elementName, String namespace, XmlPullParser parser) throws Exception { // See if a provider is registered to handle the extension. Object provider = ProviderManager.getDefault().getExtensionProvider(elementName, namespace); ...
public static PacketExtension parsePacketExtension(String elementName, String namespace, XmlPullParser parser) throws Exception { // See if a provider is registered to handle the extension. Object provider = ProviderManager.getExtensionProvider(elementName, namespace); if (pr...
private static final String REGEXP = "<(?:" + "!--.*?-->" + "|BASE" + SEP + "HREF" + VALUE + "|(?:IMG|SCRIPT|FRAME|IFRAME|BGSOUND|FRAME)" + SEP + "SRC" + VALUE + "|APPLET" + SEP + "CODE(?:BASE)?" + VALUE
private static final String REGEXP = "<(?:" + "!--.*?-->" + "|BASE" + SEP + "HREF" + VALUE + "|(?:IMG|SCRIPT|FRAME|IFRAME|BGSOUND)" + SEP + "SRC" + VALUE + "|APPLET" + SEP + "CODE(?:BASE)?" + VALUE
public void setParameters(final Map parameters) { parameters.putAll(parameters); }
public void setParameters(final Map parameters) { this.parameters.putAll(parameters); }
public void flush() throws IOException { if (out == null) { out.flush(); } }
public void flush() throws IOException { if (out != null) { out.flush(); } }
private int checkEffect(int effect) { // Some effects are mutually exclusive. Make sure that only one of the mutually exclusive effects has been specified. if ((effect & DND.FEEDBACK_SELECT) != 0) effect = effect & ~DND.FEEDBACK_INSERT_AFTER & ~DND.FEEDBACK_INSERT_BEFORE; if ((effect & DND.FEEDBACK_INSERT_BEFORE) !...
private int checkEffect(int effect) { // Some effects are mutually exclusive. Make sure that only one of the mutually exclusive effects has been specified. if ((effect & DND.FEEDBACK_SELECT) != 0) effect = effect & ~DND.FEEDBACK_INSERT_AFTER & ~DND.FEEDBACK_INSERT_BEFORE; if ((effect & DND.FEEDBACK_INSERT_BEFORE) !...
public static void main(String[] args) { // 1) compile-time error here without // {unneeded} subaspect declare-parent // Tag as INode<Tag, Tag> from PC extends NodeImpl<Tag, Tag> ((TaggedTexts.Tag) null).getParent(); } } class TaggedTexts { public static class Te...
public static void main(String[] args) { // 1) compile-time error here without // {unneeded} subaspect declare-parent // Tag as INode<Tag, Tag> from PC extends NodeImpl<Tag, Tag> ((TaggedTexts.Tag) null).getParent(); } } class TaggedTexts { public static class Te...
public DirectoryScanner getDirectoryScanner(Project p) { if (isReference()) { return getRef(p).getDirectoryScanner(p); } if (srcFile != null) { ZipScanner zs = new ZipScanner(); zs.setSrc(srcFile); super.setDir(new File(".")); setup...
public DirectoryScanner getDirectoryScanner(Project p) { if (isReference()) { return getRef(p).getDirectoryScanner(p); } if (srcFile != null) { ZipScanner zs = new ZipScanner(); zs.setSrc(srcFile); super.setDir(p.getBaseDir()); setu...
protected int convertContentSpecTree(int contentSpecIndex) { // We may want to consider trying to combine this with buildSyntaxTree at some // point (if possible) if ((!deferContentSpecExpansion) || (contentSpecIndex<0)) { return contentSpecIndex; } getContentSp...
protected int convertContentSpecTree(int contentSpecIndex) { // We may want to consider trying to combine this with buildSyntaxTree at some // point (if possible) if ((!deferContentSpecExpansion) || (contentSpecIndex<0)) { return contentSpecIndex; } getContentSp...
private void initSystemLoader(Path path) { try { if( project.getReference( SYSTEM_LOADER_REF ) != null ) return; // already done that. // reverse loader AntClassLoader acl=new AntClassLoader( this.getClass().getClassLoader(), true ); ...
private void initSystemLoader(Path path) { try { if( project.getReference( SYSTEM_LOADER_REF ) != null ) return; // already done that. // reverse loader AntClassLoader acl=new AntClassLoader( this.getClass().getClassLoader(), true ); ...
public void testVoidInSignature() throws Exception { final ExtensionFile file = parse( "foo(String str) : 'String';" + "foo(Integer int) : 'Int';" + "foo(Void void) : 'void';"); ec = (ExecutionContextImpl) ec.cloneWithResource(file); XtendFacade facade = new XtendFacade(ec); assertEquals("String",f...
public void testVoidInSignature() throws Exception { final ExtensionFile file = parse( "foo(String str) : 'String';" + "foo(Integer int) : 'Int';" + "foo(Void void) : 'void';"); ec = (ExecutionContextImpl) ec.cloneWithResource(file); XtendFacade facade = XtendFacade.create(ec); assertEquals("String...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection()) return; setExampleWidgetAlignment (); } }; upButton.addSelectionListener(selectionListener); downButton.addSelectionListener(selectionListener); } /** * Creates the "Example" group. */ void creat...
public void widgetSelected(SelectionEvent event) { if (!((Button) event.widget).getSelection()) return; setExampleWidgetAlignment (); } }; upButton.addSelectionListener(selectionListener); downButton.addSelectionListener(selectionListener); } /** * Creates the "Example" group. */ void creat...
private boolean walkUpStatic(Collection acc, ResolvedTypeX curr) { if (curr.lookupMemberNoSupers(this) != null) { acc.add(curr); return true; } else { boolean b = false; for (Iterator i = curr.getDirectSupertypes(); i.hasNext(); ) { b |= walkUp(acc, (ResolvedTypeX)i.next()); } if (b) acc.add(...
private boolean walkUpStatic(Collection acc, ResolvedTypeX curr) { if (curr.lookupMemberNoSupers(this) != null) { acc.add(curr); return true; } else { boolean b = false; for (Iterator i = curr.getDirectSupertypes(); i.hasNext(); ) { b |= walkUpStatic(acc, (ResolvedTypeX)i.next()); } if (b) ac...
public boolean forceFocus () { checkWidget(); if (display.focusEvent == SWT.FocusOut) return false; Shell shell = getShell (); shell.setSavedFocus (this); if (!isEnabled () || !isVisible ()) return false; shell.bringToTop (false); return forceFocus (focusHandle ()); } boolean forceFocus (int /*long*/ focusHandl...
public boolean forceFocus () { checkWidget(); if (display.focusEvent == SWT.FocusOut) return false; Shell shell = getShell (); shell.setSavedFocus (this); if (!isEnabled () || !isVisible ()) return false; shell.bringToTop (false); return forceFocus (focusHandle ()); } boolean forceFocus (int /*long*/ focusHandl...