buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void executeTask(Task task) throws ExecutionException { AntContext context = task.getAntContext(); if (!(context instanceof ExecutionContext)) { throw new ExecutionException("The Task was not configured with an" + " appropriate context"); } Executi...
public void executeTask(Task task) throws ExecutionException { AntContext context = task.getAntContext(); if (!(context instanceof ExecutionContext)) { throw new ExecutionException("The Task was not configured with an" + " appropriate context"); } Executi...
public boolean shouldDrawInsertionPoint(int id, int sel) { return false; }
public String getText () { checkWidget (); return text; } boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) { return false; }
public boolean shouldDrawInsertionPoint(int /*long*/ id, int /*long*/ sel) { return callSuperBoolean(id, sel); }
public String toString () { String string = "*Disposed*"; if (!isDisposed ()) { string = "*Wrong Thread*"; if (isValidThread ()) string = getNameText (); } return getName () + " {" + string + "}"; } void resetCursorRects (int /*long*/ id, int /*long*/ sel) { callSuper (id, sel); } void updateTrackingAreas (i...
public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); Rectangle newRect = getClientArea (); if (!oldRect.equals (newRect)) resize (); }
public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); Rectangle newRect = getClientArea (); if (!oldRect.equals (newRect)) sendResize (); }
public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); Rectangle newRect = getClientArea (); if (!oldRect.equals (newRect)) { resize (); int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0); if (index != -1) { TabItem item = items [index]; C...
public void setFont (Font font) { checkWidget (); Rectangle oldRect = getClientArea (); super.setFont (font); Rectangle newRect = getClientArea (); if (!oldRect.equals (newRect)) { sendResize (); int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0); if (index != -1) { TabItem item = items [index]; ...
public void dispose() { if (obj != null) obj.destroySelf(); client.dispose(0); } }
public void dispose() { if (obj != null) obj.destroySelf(); client.dispose(); } }
protected synchronized void destroyServers() { for (Iterator i = servers.iterator(); i.hasNext();) { TCPServerSOContainer s = (TCPServerSOContainer) i.next(); DiscoveryStartup.unregisterServer(s); if (s != null) { try { s.dispose(5000); } catch (Exception e) { ClientPlugin.log("Exception d...
protected synchronized void destroyServers() { for (Iterator i = servers.iterator(); i.hasNext();) { TCPServerSOContainer s = (TCPServerSOContainer) i.next(); DiscoveryStartup.unregisterServer(s); if (s != null) { try { s.dispose(); } catch (Exception e) { ClientPlugin.log("Exception destr...
public ISharedObjectContainer makeSharedObjectContainer( ContainerDescription desc, String[] argTypes, Object[] args) throws ContainerInstantiationException { trace("makeSharedObjectContainer("+desc+","+Trace.convertStringAToString(argTypes)+","+Trace.convertObjectAToString(args)+")"...
public ISharedObjectContainer makeSharedObjectContainer( ContainerDescription desc, String[] argTypes, Object[] args) throws ContainerInstantiationException { trace("makeSharedObjectContainer("+desc+","+Trace.convertStringAToString(argTypes)+","+Trace.convertObjectAToString(args)+")"...
public void receiveDone(ID from, File aFile, Exception e) { User user = getUserForID(from); String nick = "<unknown>"; if (user != null) { nick = user.getNickname(); } showRawLine(from, "\t'" + aFile.getName(...
public void receiveDone(ID from, File aFile, Exception e) { User user = getUserForID(from); String nick = "<unknown>"; if (user != null) { nick = user.getNickname(); } showRawLine(from, "\t'" + aFile.getName(...
public IServiceTypeID[] getServiceTypes() { List result = new ArrayList(); try { ServiceLocationEnumeration slenum = Activator.getDefault().getLocator().findServiceTypes(null, null); for (; slenum.hasMoreElements();) { ServiceType st = new ServiceType((String) slenum.nextElement()); IServiceID sid = ...
public IServiceTypeID[] getServiceTypes() { List result = new ArrayList(); try { ServiceLocationEnumeration slenum = Activator.getDefault().getLocator().findServiceTypes(null, null); for (; slenum.hasMoreElements();) { ServiceType st = new ServiceType((String) slenum.nextElement()); IServiceID sid = ...
public AbstractDB2Dictionary() { numericTypeName = "DOUBLE"; bitTypeName = "SMALLINT"; smallintTypeName = "SMALLINT"; tinyintTypeName = "SMALLINT"; longVarbinaryTypeName = "BLOB"; varbinaryTypeName = "BLOB"; // DB2-based databases have restrictions on having ...
public AbstractDB2Dictionary() { numericTypeName = "DOUBLE"; bitTypeName = "SMALLINT"; smallintTypeName = "SMALLINT"; tinyintTypeName = "SMALLINT"; longVarbinaryTypeName = "BLOB"; varbinaryTypeName = "BLOB"; // DB2-based databases have restrictions on having ...
private void checkPageVersionsAreStored(Page versioningPage) { IPageManager pageManager = wicketTester.getApplication().getPageManager(); int lastPageId = versioningPage.getPageId(); while (lastPageId >= 0) { assertNotNull(pageManager.getPage(lastPageId)); lastPageId--; } }
private void checkPageVersionsAreStored(Page versioningPage) { IPageManager pageManager = wicketTester.getSession().getPageManager(); int lastPageId = versioningPage.getPageId(); while (lastPageId >= 0) { assertNotNull(pageManager.getPage(lastPageId)); lastPageId--; } }
public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) { checkWidget (); if (maximum < minimum) return; if (digits < 0) return; if (increment < 1) return; if (pageIncrement < 1) return; selection = Math.min (Math.max (minimum, selection), maximum); setIncrem...
public void setValues (int selection, int minimum, int maximum, int digits, int increment, int pageIncrement) { checkWidget (); if (maximum < minimum) return; if (digits < 0) return; if (increment < 1) return; if (pageIncrement < 1) return; selection = Math.min (Math.max (minimum, selection), maximum); setIncrem...
public static Resource[] selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets) { long now = ...
public static Resource[] selectOutOfDateSources(ProjectComponent logTo, Resource[] source, FileNameMapper mapper, ResourceFactory targets) { long now = ...
public void handleEvent(Event event) { Shell shell = ((Control)event.widget).getShell (); if (shell == CCombo.this.getShell ()) { handleFocus (SWT.FocusOut); } } }; int [] comboEvents = {SWT.Dispose, SWT.FocusIn, SWT.Move, SWT.Resize}; for (int i=0; i<comboEvents.length; i++) this.addListener (com...
public void handleEvent(Event event) { Shell shell = ((Control)event.widget).getShell (); if (shell == CCombo.this.getShell ()) { handleFocus (SWT.FocusOut); } } }; int [] comboEvents = {SWT.Dispose, SWT.FocusIn, SWT.Move, SWT.Resize}; for (int i=0; i<comboEvents.length; i++) this.addListener (com...
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled() == false) { disableLink(tag); } else if (getDefaultModel() != null) { Object hrefValue = getDefaultModelObject(); if (hrefValue != null) { String url = hrefValue.toString(); if (contextRe...
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled() == false) { disableLink(tag); } else if (getDefaultModel() != null) { Object hrefValue = getDefaultModelObject(); if (hrefValue != null) { String url = hrefValue.toString(); if (contextRe...
public List /* FileItem */parseRequest(HttpServletRequest request) throws FileUploadException { return parseRequest(new ServletRequestContext(request)); }
public List<FileItem> parseRequest(HttpServletRequest request) throws FileUploadException { return parseRequest(new ServletRequestContext(request)); }
String substitute(String string, Map<String, Object> vars) throws IllegalStateException; /* * 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 li...
String substitute(String string, Map<String, Object> vars) throws IllegalStateException; /* * 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 li...
void onAdded(Component<?> component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
void onAdded(Component<?> component); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
private synchronized static final void initialize(final WebApplication application) { if (charSetMap == null) { // Get servlet context final ServletContext context = application.getWicketServlet().getServletContext(); final InputStream inputStream = context.getResourceAsStream("/WEB-INF/" + CharSet...
private synchronized static final void initialize(final WebApplication application) { if (charSetMap == null) { // Get servlet context final ServletContext context = application.getServletContext(); final InputStream inputStream = context.getResourceAsStream("/WEB-INF/" + CharSetMap.CHARSET_RESOURC...
public void setCreateFile(boolean createFile) { this.createFile = deleteOnExit; }
public void setCreateFile(boolean createFile) { this.createFile = createFile; }
public void execute() { try { OutputStream os = null; if (file != null) { os = new FileOutputStream(file, append); } else { os = new LogOutputStream(this, Project.MSG_INFO); } Node n = getFragment().getFirstChild(); ...
public void execute() { try { OutputStream os = null; if (file != null) { os = new FileOutputStream(file.getAbsolutePath(), append); } else { os = new LogOutputStream(this, Project.MSG_INFO); } Node n = getFragment()...
protected void handleComponentTag(final ComponentTag tag) { checkTag(tag, "input"); checkAttribute(tag, "type", "checkbox"); super.handleComponentTag(tag); Object value = getModelObject(); if (value != null) { if (!(value instanceof Boolean)) ...
protected void handleComponentTag(final ComponentTag tag) { checkTag(tag, "input"); checkAttribute(tag, "type", "checkbox"); super.handleComponentTag(tag); Object value = getModelObject(); if (value != null) { if (!(value instanceof Boolean)) ...
protected void populateItem(ListItem listItem) { TreeNodeModel treeNodeModel = (TreeNodeModel)listItem.getModelObject(); // add spacers int level = treeNodeModel.getLevel(); List spacerList = new ArrayList(level); for(int i = 0; i < level; i++...
protected void populateItem(ListItem listItem) { TreeNodeModel treeNodeModel = (TreeNodeModel)listItem.getModelObject(); // add spacers int level = treeNodeModel.getLevel(); List spacerList = new ArrayList(level); for(int i = 0; i < level; i++...
public void setObject(Object object) { if (object != null) { if (!(object instanceof Serializable)) { throw new RuntimeException("object must be Serializable"); } } setObject((Serializable) object); }
public void setObject(Object object) { if (object != null) { if (!(object instanceof Serializable)) { throw new RuntimeException("Model object must be Serializable"); } } setObject((Serializable) object); }
private final void checkModelNotNull(final IModel model) { if (model == null) { throw new NullPointerException("Parameter 'model' must not be null"); } }
private final void checkModelNotNull(final IModel model) { if (model == null) { throw new IllegalArgumentException("Model parameter must not be null"); } }
public ApplicationStringResourceLoader(final IApplication application) { if (application == null) { throw new NullPointerException("Application cannot be null"); } this.application = application; this.resourceCache = new ConcurrentReaderHashMap(); }
public ApplicationStringResourceLoader(final IApplication application) { if (application == null) { throw new IllegalArgumentException("Application cannot be null"); } this.application = application; this.resourceCache = new ConcurrentReaderHashMap(); }
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 final void processEvents(final RequestCycle requestCycle) { // Preprocess like standard component request. Do all the initialization // necessary onProcessEvents(requestCycle); // Get the IBehavior for the component based on the request parameters final Component component = getTarget(); final Str...
public final void processEvents(final RequestCycle requestCycle) { // Preprocess like standard component request. Do all the initialization // necessary onProcessEvents(requestCycle); // Get the IBehavior for the component based on the request parameters final Component component = getTarget(); final Str...
public Object[] getArray(Collection treePath) { HashTree tree = getTreePath(treePath); return tree.getArray(); }
public Object[] getArray(Collection treePath) { HashTree tree = getTreePath(treePath); return (tree != null) ? tree.getArray() : null; }
public void resolveBindings(IScope scope, Bindings bindings) { if (onTypeSymbolic != null) { onType = onTypeSymbolic.resolveExactType(scope, bindings); // in this case we've already signalled an error if (onType == ResolvedTypeX.MISSING) return; } ResolvedTypeX searchType; if (onType != null) { ...
public void resolveBindings(IScope scope, Bindings bindings) { if (onTypeSymbolic != null) { onType = onTypeSymbolic.resolveExactType(scope, bindings); // in this case we've already signalled an error if (onType == ResolvedTypeX.MISSING) return; } ResolvedTypeX searchType; if (onType != null) { ...
private void setURI(ServiceURL aServiceURL) { StringBuffer buf = new StringBuffer(); String protocol = aServiceURL.getProtocol(); if (protocol == null) { protocol = "unknown"; //$NON-NLS-1$ } buf.append(protocol); buf.append("://"); //$NON-NLS-1$ buf.append(aServiceURL.getHost()); buf.append(":"); /...
private void setURI(ServiceURL aServiceURL) { StringBuffer buf = new StringBuffer(); String protocol = aServiceURL.getProtocol(); if (protocol == null) { protocol = "unknown"; //$NON-NLS-1$ } buf.append(protocol); buf.append("://"); //$NON-NLS-1$ buf.append(aServiceURL.getHost()); buf.append(":"); /...
package org.apache.ant.antcore.model.xmlparser; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
package org.apache.ant.antcore.model.xmlparser; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
package org.apache.ant.common.event; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met...
package org.apache.ant.common.event; /* * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met...
protected void notifyTestListenersOfEnd() { log.info("Notifying test listeners of end of test"); Iterator iter = testListeners.getSearchResults().iterator(); while (iter.hasNext()) { TestListener tl = (TestListener) iter.next(); if (tl instanceof TestBean) { TestBeanHelper.prepare((TestElement...
protected void notifyTestListenersOfEnd() { log.info("Notifying test listeners of end of test"); Iterator iter = testListeners.getSearchResults().iterator(); while (iter.hasNext()) { TestListener tl = (TestListener) iter.next(); if (tl instanceof TestBean) { TestBeanHelper.prepare((TestElement...
private final void addedComponent(final Component component) { // Check for degenerate case if (component == this) { throw new IllegalArgumentException("Component can't be added to itself"); } MarkupContainer parent = component.getParent(); if (parent != null) { parent.remove(component); } /...
private final void addedComponent(final Component component) { // Check for degenerate case if (component == this) { throw new IllegalArgumentException("Component can't be added to itself"); } MarkupContainer parent = component.getParent(); if (parent != null) { parent.remove(component); } /...
private JMeterVersion() // Not instantiable { super(); } static final String getVERSION() { return IMPLEMENTATION; }
private JMeterVersion() // Not instantiable { super(); } static String getVERSION() { return IMPLEMENTATION; }
protected final void namespaceFixUp (ElementImpl element, AttributeMap attributes){ if (DEBUG) { System.out.println("[ns-fixup] element:" +element.getNodeName()+ " uri: "+element.getNamespaceURI()); } // ------------------------------------ ...
protected final void namespaceFixUp (ElementImpl element, AttributeMap attributes){ if (DEBUG) { System.out.println("[ns-fixup] element:" +element.getNodeName()+ " uri: "+element.getNamespaceURI()); } // ------------------------------------ ...
public void configure(TestElement el) { super.configure(el); ResponseAssertion model = (ResponseAssertion) el; showScopeSettings(model); if (model.isContainsType()) { containsBox.setSelected(true); } else if (model.isEqualsType()) { equalsBox.setSele...
public void configure(TestElement el) { super.configure(el); ResponseAssertion model = (ResponseAssertion) el; showScopeSettings(model, true); if (model.isContainsType()) { containsBox.setSelected(true); } else if (model.isEqualsType()) { equalsBox.s...
public void configure(TestElement el) { super.configure(el); SizeAssertion assertion = (SizeAssertion) el; size.setText(assertion.getAllowedSize()); setState(assertion.getCompOper()); showScopeSettings(assertion); if (assertion.isTestFieldResponseHeaders()) {...
public void configure(TestElement el) { super.configure(el); SizeAssertion assertion = (SizeAssertion) el; size.setText(assertion.getAllowedSize()); setState(assertion.getCompOper()); showScopeSettings(assertion, true); if (assertion.isTestFieldResponseHeader...
public void configure(TestElement el) { super.configure(el); if (el instanceof RegexExtractor){ RegexExtractor re = (RegexExtractor) el; showScopeSettings(re); useHeaders.setSelected(re.useHeaders()); useBody.setSelected(re.useBody()); useU...
public void configure(TestElement el) { super.configure(el); if (el instanceof RegexExtractor){ RegexExtractor re = (RegexExtractor) el; showScopeSettings(re, true); useHeaders.setSelected(re.useHeaders()); useBody.setSelected(re.useBody()); ...
protected final Constructor getConstructor(final Class pageClass, final Class parameter) { // Constructor already in cache? // Note: the class name has been deliberately taken as map key, as // Groovy e.g. will create a new Class if the groovy file has been // changed ...
protected final Constructor getConstructor(final Class pageClass, final Class parameter) { // Constructor already in cache? // Note: the class name has been deliberately taken as map key, as // Groovy e.g. will create a new Class if the groovy file has been // changed ...
public void onComponentTag(Component component, ComponentTag tag) { Object node = component.getDefaultModelObject(); String klass = getItemClass(node); if (!Strings.isEmpty(klass)) { CharSequence oldClass = tag.getString("class"); if (Strings.isEmpty(oldClass)) { tag.put("clas...
public void onComponentTag(Component component, ComponentTag tag) { Object node = component.getDefaultModelObject(); String klass = getItemClass(node); if (!Strings.isEmpty(klass)) { CharSequence oldClass = tag.getAttribute("class"); if (Strings.isEmpty(oldClass)) { tag.put("c...
public void fromUserProperties(Map map) { if (map == null) return; Object key; Object val; for (Object o : map.entrySet()) { key = ((Map.Entry) o).getKey(); val = ((Map.Entry) o).getValue(); if (JPAProperties.PROVIDER.equals(key)) ...
public void fromUserProperties(Map map) { if (map == null) return; Object key; Object val; for (Object o : map.entrySet()) { key = ((Map.Entry) o).getKey(); val = ((Map.Entry) o).getValue(); if (JPAProperties.PROVIDER.equals(key)) ...
public String convertToString(Object value, Locale locale) { if (value == null || "".equals(value)) { return null; } return (String)Objects.convertValue(value, String.class); } };
public String convertToString(Object value, Locale locale) { if (value == null || "".equals(value)) { return ""; } return (String)Objects.convertValue(value, String.class); } };
public void init(String[] configFilesArgs, boolean visible) { try { UserPreferencesAdapter preferencesAdapter = new UserPreferencesStore(true); browserProjectProperties = new BrowserProperties(preferencesAdapter); TaskListManager taskListManager = new CompilerMessagesPanel(); BasicEditor ajdeEditor = new...
public void init(String[] configFilesArgs, boolean visible) { try { UserPreferencesAdapter preferencesAdapter = new UserPreferencesStore(true); browserProjectProperties = new BrowserProperties(preferencesAdapter); TaskListManager taskListManager = new CompilerMessagesPanel(); BasicEditor ajdeEditor = new...
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) file = new File( System.getProperty("user.dir") + File.separator + cookieFile); ...
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) file = new File( System.getProperty("user.dir") + File.separator + cookieFile); ...
private void addCookieToTable(Cookie cookie) { tableModel.addRow( new Object[] { cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(), new Boolean(cookie.getSecure()), new Lon...
private void addCookieToTable(Cookie cookie) { tableModel.addRow( new Object[] { cookie.getName(), cookie.getValue(), cookie.getDomain(), cookie.getPath(), Boolean.valueOf(cookie.getSecure()), new...
private void sortMungers() { List sorted = PartialOrder.sort(mungers); if (sorted == null) { // this means that we have circular dependencies for (Iterator i = mungers.iterator(); i.hasNext(); ) { ShadowMunger m = (ShadowMunger)i.next(); getIWorld().getMessageHandler().handleMessage( MessageUtil...
private void sortMungers() { List sorted = PartialOrder.sort(mungers); if (sorted == null) { // this means that we have circular dependencies for (Iterator i = mungers.iterator(); i.hasNext(); ) { ShadowMunger m = (ShadowMunger)i.next(); getIWorld().getMessageHandler().handleMessage( MessageUtil...
public NativeCommand(File directory, Map<String, String> env, String stdin, String stdout, String stderr) { super(directory, 0L, 100, env, stdin, stdout, stderr); }
public NativeCommand(File directory, Map<String, String> env, String stdin, String stdout, String stderr) { super(directory, 0L, POLL_INTERVAL, env, stdin, stdout, stderr); }
private boolean processResponse(boolean isAuthorized) { if (isAuthorized == false && !isUserSignedIn()) { throw new RestartResponseAtSignInPageException(); } return isAuthorized; }
private boolean processResponse(boolean isAuthorized) { if (isAuthorized == false && isUserSignedIn() == false) { throw new RestartResponseAtSignInPageException(); } return isAuthorized; }
protected final String getJsTimeoutCall(final Duration updateInterval) { return "setTimeout(function() { " + getCallbackScript() + " }, " + updateInterval.getMilliseconds() + ");"; }
protected final String getJsTimeoutCall(final Duration updateInterval) { return "setTimeout(function() { " + getCallbackScript(false) + " }, " + updateInterval.getMilliseconds() + ");"; }
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("StyledText: Variable tab stops"); Ruler ruler = new Ruler(shell, SWT.NONE); GridData data = new GridData(); data.heightHint = 10; data.horizon...
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("StyledText: Variable tab stops"); Ruler ruler = new Ruler(shell, SWT.NONE); GridData data = new GridData(); data.heightHint = 10; data.horizon...
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("StyledText: Variable tab stops"); Ruler ruler = new Ruler(shell, SWT.NONE); GridData data = new GridData(); data.heightHint = 10; data.horizon...
public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout()); shell.setText("StyledText: Variable tab stops"); Ruler ruler = new Ruler(shell, SWT.NONE); GridData data = new GridData(); data.heightHint = 10; data.horizon...
public void setUp() { setUp(Item.class,"openjpa.Compatibility", "default(flushBeforeDetach=false)"); persistSampleEntity(); }
public void setUp() { setUp(Item.class,"openjpa.Compatibility", "default(flushBeforeDetach=false,copyOnDetach=true)"); persistSampleEntity(); }
public DOMBuilderImpl(SymbolTable symbolTable) { this( (XMLParserConfiguration) ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration")); fConfiguration.setProperty( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PR...
public DOMBuilderImpl(SymbolTable symbolTable) { this( (XMLParserConfiguration) ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.IntegratedParserConfiguration")); fConfiguration.setProperty( Constants.XERCES_PROPERTY_PREFIX + Constants.SYMB...
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration" )); // set properties f...
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.IntegratedParserConfiguration" )); // set propertie...
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.XML11Configuration" )); // set features fCo...
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) { super((XMLParserConfiguration)ObjectFactory.createObject( "org.apache.xerces.xni.parser.XMLParserConfiguration", "org.apache.xerces.parsers.IntegratedParserConfiguration" )); // set features ...
protected void debug(String msg) { if (Trace.shouldTrace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG)) { Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, msg + ";container=" + container.getID() + ";members=" + groupManager); //$NON-NLS-1$ } }
protected void debug(String msg) { if (Trace.shouldTrace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG)) { Trace.trace(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.DEBUG, msg + ";container=" + container.getID() + ";existingmembers=" + groupManager); //$NON-NLS-1$ } }
protected XSDocumentInfo constructTrees(Document schemaRoot, String locationHint, XSDDescription desc) { if (schemaRoot == null) return null; String callerTNS = desc.getTargetNamespace(); short referType = desc.getContextType(); XSDocumentInfo currSchemaInfo = null; ...
protected XSDocumentInfo constructTrees(Document schemaRoot, String locationHint, XSDDescription desc) { if (schemaRoot == null) return null; String callerTNS = desc.getTargetNamespace(); short referType = desc.getContextType(); XSDocumentInfo currSchemaInfo = null; ...
public HTTPSampler2(){ hc = new HTTPJavaImpl(this); }
public HTTPSampler2(){ hc = new HTTPHC3Impl(this); }
protected void synchronizeData() { // no need to sync in the future needsSyncData(false); // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) ownerDocument(); name = ownerDocument.getNodeName(fNodeIndex); // extract prefix and local part ...
protected void synchronizeData() { // no need to sync in the future needsSyncData(false); // fluff data DeferredDocumentImpl ownerDocument = (DeferredDocumentImpl) ownerDocument(); name = ownerDocument.getNodeName(fNodeIndex); // extract prefix and local part ...
public void deselectAll () { checkWidget (); deselect (null, 0); } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } if (columnCount >= 1) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != nu...
public void deselectAll () { checkWidget (); deselect (null, 0); } void destroyItem (TableColumn column) { int index = 0; while (index < columnCount) { if (columns [index] == column) break; index++; } if (columnCount >= 1) { for (int i=0; i<itemCount; i++) { TableItem item = items [i]; if (item != nu...
private static final Map<Integer, String> levelStrings = new HashMap<Integer, String>(); static { levelStrings.put(UNDEFINED, "UNDEFINED"); levelStrings.put(DEBUG, "DEBUG"); levelStrings.put(INFO, "INFO"); levelStrings.put(SUCCESS, "INFO"); levelStrings.put(WARNING, "WARNING"); levelStrings.put(ERROR, "...
private static final Map<Integer, String> levelStrings = new HashMap<Integer, String>(); static { levelStrings.put(UNDEFINED, "UNDEFINED"); levelStrings.put(DEBUG, "DEBUG"); levelStrings.put(INFO, "INFO"); levelStrings.put(SUCCESS, "SUCCESS"); levelStrings.put(WARNING, "WARNING"); levelStrings.put(ERROR...
package org.apache.wicket.spring.common; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License...
package org.apache.wicket.spring.common; /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License...
public void addDragListener(DragSourceListener listener) { if (listener == null) DND.error (SWT.ERROR_NULL_ARGUMENT); DNDListener typedListener = new DNDListener (listener); addListener (DND.DragStart, typedListener); addListener (DND.DragSetData, typedListener); addListener (DND.DragEnd, typedListener); } protec...
public void addDragListener(DragSourceListener listener) { if (listener == null) DND.error (SWT.ERROR_NULL_ARGUMENT); DNDListener typedListener = new DNDListener (listener); addListener (DND.DragStart, typedListener); addListener (DND.DragSetData, typedListener); addListener (DND.DragEnd, typedListener); } protec...
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getId...
public static void getEmbeddedIdCols(FieldMapping fmd, List cols) { ClassMapping embed = fmd.getEmbeddedMapping(); FieldMapping[] fmds = embed.getFieldMappings(); for (int i = 0; i < fmds.length; i++) { if (fmds[i].getValue().getEmbeddedMetaData() == null) { getId...
public String open () { /* Compute the dialog title */ /* * Feature in Motif. It is not possible to set a shell * title to an empty string. The fix is to set the title * to be a single space. */ String string = title; if (string.length () == 0) string = " "; //$NON-NLS-1$ /* Use the character encoding for ...
public String open () { /* Compute the dialog title */ /* * Feature in Motif. It is not possible to set a shell * title to an empty string. The fix is to set the title * to be a single space. */ String string = title; if (string.length () == 0) string = " "; //$NON-NLS-1$ /* Use the character encoding for ...
private String getFilterPath(String filterName, InputStream is) throws ServletException { String prefix = servletMode ? "servlet" : "filter"; String mapping = prefix + "-mapping"; String name = prefix + "-name"; // Filter mappings look like this: // // <filter-mapping> <filter-name>WicketFilter</filt...
private String getFilterPath(String filterName, InputStream is) throws ServletException { String prefix = servletMode ? "servlet" : "filter"; String mapping = prefix + "-mapping"; String name = prefix + "-name"; // Filter mappings look like this: // // <filter-mapping> <filter-name>WicketFilter</filt...
public static void main(String[] args) { if (args.length != 1) { int objects = 10000; if (args[0] != null) { objects = Integer.parseInt(args[0]); } List objs = new LinkedList(); ObjectFactory of = ObjectFactory.getInstance(); ...
public static void main(String[] args) { if (args.length == 1) { int objects = 10000; if (args[0] != null) { objects = Integer.parseInt(args[0]); } List objs = new LinkedList(); ObjectFactory of = ObjectFactory.getInstance(); ...
public void XtestManifestStaysIntact() throws IOException, ManifestException { executeTarget("testManifestStaysIntact"); Manifest mf1 = new Manifest(new FileReader(getProject() .resolveFile("jartmp/manifest"))); Manifest mf2 = ...
public void testManifestStaysIntact() throws IOException, ManifestException { executeTarget("testManifestStaysIntact"); Manifest mf1 = new Manifest(new FileReader(getProject() .resolveFile("jartmp/manifest"))); Manifest mf2 = ...
@Retention({RetentionPolicy.RUNTIME}) import java.lang.annotation.*; public class MyClass { @Retention({RententionPolicy.RUNTIME}) private @interface MyAnnotation { } }
@Retention({RetentionPolicy.RUNTIME}) import java.lang.annotation.*; public class MyClass { @Retention({RetentionPolicy.RUNTIME}) private @interface MyAnnotation { } }
public static Manifest getDefaultManifest() throws BuildException { try { String s = "/org/apache/tools/ant/defaultManifest.mf"; InputStream in = Manifest.class.getResourceAsStream(s); if (in == null) { throw new BuildException("Could not find default mani...
public static Manifest getDefaultManifest() throws BuildException { try { String s = "/org/apache/tools/ant/defaultManifest.mf"; InputStream in = Manifest.class.getResourceAsStream(s); if (in == null) { throw new BuildException("Could not find default mani...
protected boolean handleMultiPart() { if (multiPart) { // Change the request to a multipart web request so parameters are // parsed out correctly try { final WebRequest multipartWebRequest = ((WebRequest)getRequest()) .newMultipartWebRequest(getMaxSize()); getRequestCycle().setRequest(mu...
protected boolean handleMultiPart() { if (multiPart) { // Change the request to a multipart web request so parameters are // parsed out correctly try { final WebRequest multipartWebRequest = ((WebRequest)getRequest()) .newMultipartWebRequest(getMaxSize()); getRequestCycle().setRequest(mu...
private static String fixPathEntry(String path){ if (path == null ) return null; if (path.equals(".")) { // $NON-NLS-1$ return System.getProperty("user.dir"); // $NON-NLS-1$ } path = path.trim().replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$ path = JOrphanUtils...
private static String fixPathEntry(String path){ if (path == null ) return null; if (path.equals(".")) { // $NON-NLS-1$ return System.getProperty("user.dir"); // $NON-NLS-1$ } path = path.trim().replace('\\', '/'); // $NON-NLS-1$ // $NON-NLS-2$ path = JOrphanUtils...
public short determineDocVersion(XMLInputSource inputSource) throws IOException { fEncoding = fEntityManager.setupCurrentEntity(fXMLSymbol, inputSource, false, true); // Must use XML 1.0 scanner to handle whitespace correctly // in the XML declaration. fEntityManager.setScannerVersi...
public short determineDocVersion(XMLInputSource inputSource) throws IOException { fEncoding = fEntityManager.setupCurrentEntity(fXMLSymbol, inputSource, false, true); // Must use XML 1.0 scanner to handle whitespace correctly // in the XML declaration. fEntityManager.setScannerVersi...
public void run() { if (autoScrollDirection == ST.COLUMN_PREVIOUS) { if (blockSelection) { int x = blockXLocation - horizontalScrollOffset; int pixels = Math.max(-autoScrollDistance, -horizontalScrollOffset); if (pixels != 0) { setBlockSelectionLocation(x + pixels, blockYLocation - ...
public void run() { if (autoScrollDirection == ST.COLUMN_PREVIOUS) { if (blockSelection) { int x = blockXLocation - horizontalScrollOffset; int pixels = Math.max(-autoScrollDistance, -horizontalScrollOffset); if (pixels != 0) { setBlockSelectionLocation(x + pixels, blockYLocation - ...
public Type getTypeForEClassifier(final EGenericType element) { EClassifier baseType = null; if (element.getEClassifier() != null) { baseType = element.getEClassifier();; } else { baseType = element.getERawType(); } if ((baseType == null) || !listTypes.contains(baseType)) return getTypeForEClassi...
public Type getTypeForEClassifier(final EGenericType element) { EClassifier baseType = null; if (element.getEClassifier() != null) { baseType = element.getEClassifier(); } else { baseType = element.getERawType(); } if ((baseType == null) || !listTypes.contains(baseType)) return getTypeForEClassif...
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree,value, sel,expanded,leaf,r...
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { super.getTreeCellRendererComponent(tree,value, sel,expanded,leaf,r...
private void internalUpdateFormComponentModels() { FormComponent.visitComponentsPostOrder(this, new FormModelUpdateVisitor(this)); MarkupContainer border = findParent(Border.class); if (border != null) { FormComponent.visitComponentsPostOrder(border, new FormModelUpdateVisitor(null)); }
private void internalUpdateFormComponentModels() { FormComponent.visitComponentsPostOrder(this, new FormModelUpdateVisitor(this)); MarkupContainer border = findParent(Border.class); if (border != null) { FormComponent.visitComponentsPostOrder(border, new FormModelUpdateVisitor(this)); }
private void breadth(final ComponentEvent<?> event) { IEventSink sink = event.getSink(); boolean targetsApplication = sink instanceof Application; boolean targetsSession = targetsApplication || sink instanceof Session; boolean targetsCycle = targetsSession || sink instanceof RequestCycle; boolean targetsCo...
private void breadth(final ComponentEvent<?> event) { IEventSink sink = event.getSink(); boolean targetsApplication = sink instanceof Application; boolean targetsSession = targetsApplication || sink instanceof Session; boolean targetsCycle = targetsSession || sink instanceof RequestCycle; boolean targetsCo...
public TypeX lookupType(String name, IHasPosition location) { TypeVariable typeVariableMatch = typeVariables.lookupTypeVariable(name); if (typeVariableMatch != null) { return typeVariableMatch.resolvedType(); } else { return delegateScope.lookupType(name, location); } }
public TypeX lookupType(String name, IHasPosition location) { TypeVariablePattern typeVariableMatch = typeVariables.lookupTypeVariable(name); if (typeVariableMatch != null) { return typeVariableMatch.resolvedType(); } else { return delegateScope.lookupType(name, location); } }
protected <T> List<T> nonNull(List<T> l) { if (l == null) return new ArrayList<T>(); for (Iterator<T> iter = l.iterator(); iter.hasNext();) { Object x = (Object) iter.next(); if (x==null) iter.remove(); } return l; }
protected <T> List<T> nonNull(List<T> l) { if (l == null) return new ArrayList<T>(); for (Iterator<T> iter = l.iterator(); iter.hasNext();) { Object x = iter.next(); if (x==null) iter.remove(); } return l; }
public void testBindGlobPackageResource() throws Exception { final SharedResources sharedResources = Application.get().getSharedResources(); PackageResource.bind(application, PackageResourceTest.class, Pattern.compile(".*\\.js")); assertNotNull("resource packaged3.js should be available as a packaged resource",...
public void testBindGlobPackageResource() throws Exception { final SharedResources sharedResources = Application.get().getSharedResources(); PackageResource.bind(application, PackageResourceTest.class, Pattern.compile(".*\\.js"), false); assertNotNull("resource packaged3.js should be available as a packaged res...
protected PropertyHelper() { add(TO_STRING); add(SKIP_DOUBLEDOLLAR); add(DEFAULT_EXPANDER);
protected PropertyHelper() { add(TO_STRING); add(SKIP_DOUBLE_DOLLAR); add(DEFAULT_EXPANDER);
public String getXmlVersion() { return version; }
public String getXmlVersion() { return (version == null)?"1.0":version; }
public void finishedCompilationUnit(CompilationUnitDeclaration unit) { if (buildManager.doGenerateModel()) { AsmHierarchyBuilder.build(unit, buildManager.getStructureModel()); } }
public void finishedCompilationUnit(CompilationUnitDeclaration unit) { if (buildManager.doGenerateModel()) { AsmHierarchyBuilder.build(unit, buildManager.getStructureModel(), buildManager.buildConfig); } }
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, "\n<param name=\"getModelUrl\" value=\"" + urlFor(Resource.RESOURCE_LISTENER_INTERFACE) + "\"/>" + "\n<param name=\"setModelUrl\" value=\"" + urlFor(IFormSubmitList...
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { replaceComponentTagBody(markupStream, openTag, "\n<param name=\"getModelUrl\" value=\"" + urlFor(IResourceListener.INTERFACE) + "\"/>" + "\n<param name=\"setModelUrl\" value=\"" + urlFor(IFormSubmitListener.INTE...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ( resourceKind == null && (!Objects.equal(locale, component.getLocale()) || !Objects.equal(style, compo...
public final void setSrcAttribute(final ComponentTag tag) { // If locale has changed from the initial locale used to attach image // resource, then we need to reload the resource in the new locale if ( resourceKind == null && (!Objects.equal(locale, component.getLocale()) || !Objects.equal(style, compo...
protected final String getURL() { if (resourceReference != null) { resourceReference.setLocale(getLocale()); resourceReference.setStyle(getStyle()); resourceReference.bind(getApplication()); return getRequestCycle().urlFor(resourceReference); } return urlFor(Resource.RESOURCE_LISTENER_INTERFACE); ...
protected final String getURL() { if (resourceReference != null) { resourceReference.setLocale(getLocale()); resourceReference.setStyle(getStyle()); resourceReference.bind(getApplication()); return getRequestCycle().urlFor(resourceReference); } return urlFor(IResourceListener.INTERFACE); }
/*public*/ void sort () { checkWidget (); if ((style & SWT.VIRTUAL) != 0) return; sort (OS.TVI_ROOT, false); } void sort (int /*long*/ hParent, boolean all) { int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0); if (itemCount == 0 || itemCount == 1) return; hFirstIndexOf = hLastIndexOf = 0;...
/*public*/ void sort () { checkWidget (); if ((style & SWT.VIRTUAL) != 0) return; sort (OS.TVI_ROOT, false); } void sort (int /*long*/ hParent, boolean all) { int itemCount = (int)/*64*/OS.SendMessage (handle, OS.TVM_GETCOUNT, 0, 0); if (itemCount == 0 || itemCount == 1) return; hFirstIndexOf = hLastIndexOf = 0;...
public synchronized Object connect(ID remote, Object data, int timeout) throws ECFException { debug("connect(" + remote + "," + data + "," + timeout + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ if (socket != null) throw new ECFException(Messages.Client_Already_Connected); // parse URI URI...
public synchronized Object connect(ID remote, Object data, int timeout) throws ECFException { debug("connect(" + remote + "," + data + "," + timeout + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ if (socket != null) throw new ECFException(Messages.Client_Already_Connected); // parse URI URI...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the table */ tableGroup = new Group (exampleGroup, SWT.NONE); tableGroup.setLayout (...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the table */ tableGroup = new Group (exampleGroup, SWT.NONE); tableGroup.setLayout (...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayout...
public void widgetSelected (SelectionEvent event) { setWidgetLinesVisible (); } }); } /** * Creates the "Example" group. */ void createExampleGroup () { super.createExampleGroup (); /* Create a group for the text tree */ treeGroup = new Group (exampleGroup, SWT.NONE); treeGroup.setLayout...
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = "org.eclipse.swt " + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, id, Dimension.CPU_TIME); return meter; }
protected PerformanceMeter createMeter(String id) { Performance performance = Performance.getDefault(); String scenarioId = "org.eclipse.swt.test." + id; PerformanceMeter meter = performance.createPerformanceMeter(scenarioId); performance.tagAsSummary(meter, id, Dimension.CPU_TIME); return meter; }
public void testFetchJoins() { String jpql = "SELECT d FROM Department LEFT JOIN FETCH d.employees " + "WHERE d.deptNo = 1"; CriteriaQuery q = cb.create(); Root<Department> d = q.from(Department.class); d.fetch(department_.getSet("employees", Employee.class), JoinType...
public void testFetchJoins() { String jpql = "SELECT d FROM Department d LEFT JOIN FETCH d.employees " + "WHERE d.deptNo = 1"; CriteriaQuery q = cb.create(); Root<Department> d = q.from(Department.class); d.fetch(department_.getSet("employees", Employee.class), JoinTy...
public void testFetchJoins() { String jpql = "SELECT d FROM Department LEFT JOIN FETCH d.employees " + "WHERE d.deptNo = 1"; CriteriaQuery q = cb.create(); Root<Department> d = q.from(Department.class); d.fetch(Department_.employees, JoinType.LEFT); q.where(cb.equ...
public void testFetchJoins() { String jpql = "SELECT d FROM Department d LEFT JOIN FETCH d.employees " + "WHERE d.deptNo = 1"; CriteriaQuery q = cb.create(); Root<Department> d = q.from(Department.class); d.fetch(Department_.employees, JoinType.LEFT); q.where(cb.e...
private int computedBlockCRC, computedCombinedCRC; int i2, count, chPrev, ch2; int global_i, tPos; int rNToGo = 0;
private int computedBlockCRC, computedCombinedCRC; int i2, count, chPrev, ch2; int tPos; int rNToGo = 0;
public List getMethodGens() { return Collections.unmodifiableList(methodGens); }
public List getMethodGens() { return methodGens; //???Collections.unmodifiableList(methodGens); }
private final DirectoryPanel baseDir = new DirectoryPanel(JMeterUtils.getResString("report_base_directory"), "", Color.white);
private final DirectoryPanel baseDir = new DirectoryPanel(JMeterUtils.getResString("report_base_directory"), Color.white);