buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
protected void loadResource( String name ) { Properties props = new Properties(); log("Resource Loading " + name, Project.MSG_VERBOSE); try { ClassLoader cL = null; InputStream is = null; if (classpath != null) { cL = new AntClassLoader(...
protected void loadResource( String name ) { Properties props = new Properties(); log("Resource Loading " + name, Project.MSG_VERBOSE); try { ClassLoader cL = null; InputStream is = null; if (classpath != null) { cL = new AntClassLoader(...
public void execute() throws BuildException { sqlCommand = sqlCommand.trim(); if (srcFile == null && sqlCommand.length() == 0) { if (transactions.size() == 0) { throw new BuildException("Source file, transactions or sql statement must be set!", location); } ...
public void execute() throws BuildException { sqlCommand = sqlCommand.trim(); if (srcFile == null && sqlCommand.length() == 0) { if (transactions.size() == 0) { throw new BuildException("Source file, transactions or sql statement must be set!", location); } ...
public void run() { if (styledText == null) return; int i; long start = System.currentTimeMillis(); for (i = 0; i < lineCount; i++) { if (lineHeight[i] == -1 || lineWidth[i] == -1) { calculate(i, 1); if (System.currentTimeMillis() - start > IDLE_TIME) break; } } if (i < lineCount) ...
public void run() { if (styledText == null) return; int i; long start = System.currentTimeMillis(); for (i = 0; i < lineCount; i++) { if (lineHeight[i] == -1 || lineWidth[i] == -1) { calculate(i, 1); if (System.currentTimeMillis() - start > IDLE_TIME) break; } } if (i < lineCount) ...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; context = OS.gdk_pango_context_get(); if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES); layout = OS.pango_layout_new(context); if (layout == 0) SWT.e...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; context = OS.gdk_pango_context_get(); if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES); layout = OS.pango_layout_new(context); if (layout == 0) SWT.e...
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { if (childComponent == null) { childComponent = getChildComponent(childId); } if (childComponent == this) { throw new WicketRuntimeException( "Programming error: childComponent == enclose component; endless loop"...
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { if (childComponent == null) { childComponent = getChildComponent(childId); } if (childComponent == this) { throw new WicketRuntimeException( "Programming error: childComponent == enclose component; endless loop"...
import org.apache.jorphan.collections.HashTree; /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or witho...
import org.apache.jorphan.collections.HashTree; /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or witho...
import org.apache.jorphan.collections.HashTree; /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or witho...
import org.apache.jorphan.collections.HashTree; /* * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or witho...
public String getType(String qname) { int index = getIndex(qname); return index != -1 ? fAttributes[index].type : null; } // getType(String):String
public String getType(String qname) { int index = getIndex(qname); return index != -1 ? getType(index): null; } // getType(String):String
public void process(){ StringBuilder sb = new StringBuilder(100); JMeterContext threadContext = getThreadContext(); PropertyIterator i = threadContext.getCurrentSampler().propertyIterator(); while(i.hasNext()) { JMeterProperty prop = i.next(); sb.appen...
public void process(){ StringBuilder sb = new StringBuilder(100); JMeterContext threadContext = getThreadContext(); PropertyIterator i = threadContext.getCurrentSampler().propertyIterator(); while(i.hasNext()) { JMeterProperty prop = i.next(); sb.appen...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.sampleStart(); StringBuilder sb = new StringBuilder(100); StringBuilder rd = new StringBuilder(20); // for request Data if (isDisplayJMeterVariables()){ ...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.sampleStart(); StringBuilder sb = new StringBuilder(100); StringBuilder rd = new StringBuilder(20); // for request Data if (isDisplayJMeterVariables()){ ...
protected boolean retrieveItem(HierarchicalStreamReader reader, UnmarshallingContext context, SampleResult res, Object subItem) { String nodeName = reader.getNodeName(); if (subItem instanceof AssertionResult) { res.addAssertionResult((AssertionResult) subItem); } els...
protected boolean retrieveItem(HierarchicalStreamReader reader, UnmarshallingContext context, SampleResult res, Object subItem) { String nodeName = reader.getNodeName(); if (subItem instanceof AssertionResult) { res.addAssertionResult((AssertionResult) subItem); } els...
public SampleResult sample(Entry e) { trace("sample()"); SampleResult res = new SampleResult(); boolean isOK = false; // Did sample succeed? String data = getData(); // Sampler data String response = null; res.setSampleLabel(getTitle()); /* * Perform...
public SampleResult sample(Entry e) { trace("sample()"); SampleResult res = new SampleResult(); boolean isOK = false; // Did sample succeed? String data = getData(); // Sampler data String response = null; res.setSampleLabel(getTitle()); /* * Perform...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.setSamplerData(myStringProperty); res.sampleStart(); // Do something ... res.setResponseData(myStringProperty.toUpperCase().getBytes()); res.setData...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.setSamplerData(myStringProperty); res.sampleStart(); // Do something ... res.setResponseData(myStringProperty.toUpperCase(), null); res.setDataType(...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.setSamplerData(myStringProperty); res.sampleStart(); // Do something ... res.setResponseData(myStringProperty.toLowerCase().getBytes()); res.setData...
public SampleResult sample(Entry e) { SampleResult res = new SampleResult(); res.setSampleLabel(getName()); res.setSamplerData(myStringProperty); res.sampleStart(); // Do something ... res.setResponseData(myStringProperty.toLowerCase(), null); res.setDataType(...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSuccessful(false); // Assume it will fail result.setResponseCode("000"); // ditto $NON-NLS-1$ result.setSampleLabel(getName()); try { result.setURL(this.getUrl()); org.w...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSuccessful(false); // Assume it will fail result.setResponseCode("000"); // ditto $NON-NLS-1$ result.setSampleLabel(getName()); try { result.setURL(this.getUrl()); org.w...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { final String label = getLabel(); final String request = getScript(); final String fileName = getFilename(); log.debug(label + " " + fileName); SampleResult res = new SampleResult(); res.setSampl...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { final String label = getLabel(); final String request = getScript(); final String fileName = getFilename(); log.debug(label + " " + fileName); SampleResult res = new SampleResult(); res.setSampl...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { // log.info(getLabel()+" "+getFilename()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getLabel()); res.sampleStart(); final BeanShellInterpreter bshI...
public SampleResult runTest(JavaSamplerContext p_context) { log.debug(whoAmI() + "\trunTest"); Thread.yield(); SampleResult results = new SampleResult(); results.setSuccessful(false); results.setResponseData(("Class not found: " + getClassname()).getBy...
public SampleResult runTest(JavaSamplerContext p_context) { log.debug(whoAmI() + "\trunTest"); Thread.yield(); SampleResult results = new SampleResult(); results.setSuccessful(false); results.setResponseData(("Class not found: " + getClassname()), null...
public SampleResult runTest(JavaSamplerContext context) { setupValues(context); SampleResult results = new SampleResult(); results.setResponseCode(responseCode); results.setResponseMessage(responseMessage); results.setSampleLabel(label); if (samplerData != null && ...
public SampleResult runTest(JavaSamplerContext context) { setupValues(context); SampleResult results = new SampleResult(); results.setResponseCode(responseCode); results.setResponseMessage(responseMessage); results.setSampleLabel(label); if (samplerData != null && ...
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 elemen...
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 elemen...
public void setUp() { jmctx = JMeterContextService.getContext(); assertion = new SizeAssertion(); assertion.setThreadContext(jmctx); vars = new JMeterVariables(); jmctx.setVariables(vars); sample0 = new SampleResult(); sample1 = new SampleResult(...
public void setUp() { jmctx = JMeterContextService.getContext(); assertion = new SizeAssertion(); assertion.setThreadContext(jmctx); vars = new JMeterVariables(); jmctx.setVariables(vars); sample0 = new SampleResult(); sample1 = new SampleResult(...
public void setUp() { jmctx = JMeterContextService.getContext(); variables = new HashMap<String, String>(); variables.put("my_regex", ".*"); variables.put("server", "jakarta.apache.org"); result = new SampleResult(); result.setResponseData("<html>hello world</html> co...
public void setUp() { jmctx = JMeterContextService.getContext(); variables = new HashMap<String, String>(); variables.put("my_regex", ".*"); variables.put("server", "jakarta.apache.org"); result = new SampleResult(); result.setResponseData("<html>hello world</html> co...
public void setUp() { jmctx = JMeterContextService.getContext(); extractor = new RegexExtractor(); extractor.setThreadContext(jmctx);// This would be done by the run // command extractor.setRefName("regVal"); ...
public void setUp() { jmctx = JMeterContextService.getContext(); extractor = new RegexExtractor(); extractor.setThreadContext(jmctx);// This would be done by the run // command extractor.setRefName("regVal"); ...
public void testInvalidDocument() throws Exception { result.setResponseData("<z>".getBytes()); extractor.setXPathQuery("<"); extractor.process(); assertEquals("Default", vars.get(VAL_NAME)); assertEquals("0", vars.get(VAL_NAME_NR)); }
public void testInvalidDocument() throws Exception { result.setResponseData("<z>", null); extractor.setXPathQuery("<"); extractor.process(); assertEquals("Default", vars.get(VAL_NAME)); assertEquals("0", vars.get(VAL_NAME_NR)); }
public void setUp() { function = new JexlFunction(); result = new SampleResult(); jmctx = JMeterContextService.getContext(); String data = "The quick brown fox"; result.setResponseData(data.getBytes()); vars = new JMeterVariables(); jmctx.setVariables(vars); ...
public void setUp() { function = new JexlFunction(); result = new SampleResult(); jmctx = JMeterContextService.getContext(); String data = "The quick brown fox"; result.setResponseData(data, null); vars = new JMeterVariables(); jmctx.setVariables(vars); ...
public void setUp() { variable = new RegexFunction(); result = new SampleResult(); jmctx = JMeterContextService.getContext(); String data = "<company-xmlext-query-ret><row>" + "<value field=\"RetCode\">" + "LIS_OK</value><value" + " field=\"Ret...
public void setUp() { variable = new RegexFunction(); result = new SampleResult(); jmctx = JMeterContextService.getContext(); String data = "<company-xmlext-query-ret><row>" + "<value field=\"RetCode\">" + "LIS_OK</value><value" + " field=\"Ret...
private void delay(List timers) { long sum = 0; Iterator iter = timers.iterator(); while (iter.hasNext()) { Timer timer = (Timer) iter.next(); TestBeanHelper.prepare((TestElement) timer); sum += timer.delay(); } if (sum > 0) { t...
private void delay(List timers) { long sum = 0; Iterator iter = timers.iterator(); while (iter.hasNext()) { Timer timer = (Timer) iter.next(); TestBeanHelper.prepare((TestElement) timer); sum += timer.delay(); } if (sum > 0) { t...
public final MarkupStream getAssociatedMarkupStream(final boolean throwException) { try { return getApplication().getMarkupCache().getMarkupStream(this, throwException); } catch (MarkupException ex) { // re-throw it. The exception contains already all the information // required. throw ex; } ...
public final MarkupStream getAssociatedMarkupStream(final boolean throwException) { try { return getApplication().getMarkupCache().getMarkupStream(this, throwException); } catch (MarkupException ex) { // re-throw it. The exception contains already all the information // required. throw ex; } ...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0,...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; int hwndHeader = OS.SendMessage (hwnd, OS.LVM_GETHEADER, 0,...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int hwndHeader = parent.hwndHeader; if (hwndHeader != 0) { int index = parent.indexOf (this); if (index == -1) return; HDITEM hdItem = new H...
public void setResizable (boolean resizable) { checkWidget (); this.resizable = resizable; } void setSortDirection (int direction) { if (OS.COMCTL32_MAJOR >= 6) { int hwndHeader = parent.hwndHeader; if (hwndHeader != 0) { int index = parent.indexOf (this); if (index == -1) return; HDITEM hdItem = new H...
public IConverter getConverter(Class< ? > type); }
public<T> IConverter<T> getConverter(Class< T > type); }
public Home() { // Image as package resource add(new Image("image2", new PackageResourceReference(Home.class, "image2.gif")));
public Home() { // Image as package resource add(new Image("image2", new PackageResourceReference(Home.class, "Image2.gif")));
private void addParent(SourceTypeBinding sourceType, ResolvedTypeX parent) { ReferenceBinding parentBinding = (ReferenceBinding)factory.makeTypeBinding(parent); sourceType.rememberTypeHierarchy(); if (parentBinding.isClass()) { sourceType.superclass = parentBinding; // this used to be t...
private void addParent(SourceTypeBinding sourceType, ResolvedTypeX parent) { ReferenceBinding parentBinding = (ReferenceBinding)factory.makeTypeBinding(parent); sourceType.rememberTypeHierarchy(); if (parentBinding.isClass()) { sourceType.superclass = parentBinding; // this used to be t...
public ObjectEditApplication() { getPages().setHomePage(Home.class); ApplicationSettings settings = getSettings(); settings.configure("development", "src/eelco/java"); }
public ObjectEditApplication() { getPages().setHomePage(Home.class); ApplicationSettings settings = getSettings(); settings.configure("development"); }
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.set...
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.set...
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.setS...
public void setLayoutDeferred (boolean defer) { if (!defer) { if (--layoutCount == 0) { if ((state & LAYOUT_CHILD) != 0 || (state & LAYOUT_NEEDED) != 0) { updateLayout (true); } } } else { layoutCount++; } } boolean setScrollBarVisible (ScrollBar bar, boolean visible) { boolean changed = super.setS...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public void setTabList (Control [] tabList) { checkWidget (); if (tabList != null) { for (int i=0; i<tabList.length; i++) { Control control = tabList [i]; if (control == null) error (SWT.ERROR_INVALID_ARGUMENT); if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (control.parent != this) e...
public Class getPageClass() { return page.getClass(); } })); } }
public Class getDestinationIdentity() { return page.getClass(); } })); } }
public void setItems (String [] items) { checkWidget(); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); for (int i=0; i<items.length; i++) { if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT); } lockText = ignoreSelect = true; OS.gtk_list_clear_items (listHandle, 0, -1); int /*long*/ font = getFontD...
public void setItems (String [] items) { checkWidget(); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); for (int i=0; i<items.length; i++) { if (items [i] == null) error (SWT.ERROR_INVALID_ARGUMENT); } lockText = ignoreSelect = true; OS.gtk_list_clear_items (listHandle, 0, -1); int /*long*/ font = getFontD...
public void onClick(View v) { ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); // Should always be true, because we grey out the clipboard button in onResume() if it's empty if (clipboard.hasText()) { Intent intent = new Intent(Intents.Encode.ACTION); ...
public void onClick(View v) { ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); // Should always be true, because we grey out the clipboard button in onResume() if it's empty if (clipboard.hasText()) { Intent intent = new Intent(Intents.Encode.ACTION); ...
private void registerExistingServices(final EventHookImpl hook, final BundleContext bundleContext) { try { final ServiceReference[] refs = bundleContext.getServiceReferences( null, "(" + IDistributionConstants.SERVICE_EXPORTED_INTERFACES //$NON-NLS-1$ + "=*)"); //$NON-NLS-1$ if (refs != nul...
private void registerExistingServices(final EventHookImpl hook, final BundleContext bundleContext) { try { final ServiceReference[] refs = bundleContext.getServiceReferences( (String) null, "(" + IDistributionConstants.SERVICE_EXPORTED_INTERFACES //$NON-NLS-1$ + "=*)"); //$NON-NLS-1$ if (re...
protected URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) throws URISyntaxException { String path = "/" + serviceName; String str = endpointDescription.getContainerID().getName(); URI uri = null; while (true) { t...
protected URI createURI(EndpointDescription endpointDescription, IDiscoveryAdvertiser advertiser, IServiceTypeID serviceTypeID, String serviceName) throws URISyntaxException { String path = "/" + serviceName; String str = endpointDescription.getID().getName(); URI uri = null; while (true) { try { ...
private static String getChannelURI(final URI serviceURI) { return URI.create( serviceURI.getScheme() + "://" + serviceURI.getHost() + ":" //$NON-NLS-1$ //$NON-NLS-2$ + serviceURI.getPort()).toString(); } /** * the method is called when the R-OSGi bundle is about to be stopped. * removes all registe...
private static String getChannelURI(final URI serviceURI) { return URI.create( serviceURI.getScheme() + "://" + serviceURI.getHost() + ":" //$NON-NLS-1$ //$NON-NLS-2$ + serviceURI.getPort()).toString(); } /** * the method is called when the R-OSGi bundle is about to be stopped. * removes all registe...
protected ServiceRegistration registerService(String[] clazzes, Object service, Properties props) throws Exception { return getContext().registerService(clazzes, service, props); }
protected ServiceRegistration registerService(String[] clazzes, Object service, Properties props) throws Exception { return getContext().registerService(clazzes, service, (Dictionary) props); }
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } boolean checkData (Tab...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } boolean checkData (Tab...
public void addTreeListener (TreeListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Expand, typedListener); addListener (SWT.Collapse, typedListener); } boolean checkData (TreeItem item, boolean r...
public void addTreeListener (TreeListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Expand, typedListener); addListener (SWT.Collapse, typedListener); } boolean checkData (TreeItem item, boolean r...
public static void main(String[] args) throws Exception { long startTime = System.currentTimeMillis(); System.out.println("Starting Bootstrap2...."); // ------------------------------------------------------------ // first create dirs that we need for strapping // ...
public static void main(String[] args) throws Exception { long startTime = System.currentTimeMillis(); System.out.println("Starting Bootstrap2...."); // ------------------------------------------------------------ // first create dirs that we need for strapping // ...
public void handleEvent(Event event) { handleHorizontalScroll(event); } }); } } void internalRedrawRange(int start, int length) { if (length <= 0) return; int end = start + length; int startLine = content.getLineAtOffset(start); int endLine = content.getLineAtOffset(end); int partialBottomIndex = getP...
public void handleEvent(Event event) { handleHorizontalScroll(event); } }); } } void internalRedrawRange(int start, int length) { if (length <= 0) return; int end = start + length; int startLine = content.getLineAtOffset(start); int endLine = content.getLineAtOffset(end); int partialBottomIndex = getP...
public void run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin....
public void run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin....
public void run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin....
public void run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin....
public void setImage (Image image) { checkWidget(); if (image != null && image.isDisposed ()) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } Image oldImage = getImage(); if (image == null && oldImage == null) return; if (image != null && image.equals(oldImage)) return; super.setImage(image); if (!parent.updateTab...
public void setImage (Image image) { checkWidget(); if (image != null && image.isDisposed ()) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } Image oldImage = getImage(); if (image == null && oldImage == null) return; if (image != null && image.equals(oldImage)) return; super.setImage(image); if (!parent.updateTab...
* protected void onSubmit() { * System.out.println(&quot;Link2 was clicked, value1 is: &quot; * + mod.getValue1()); * }; * }); * * &lt;form wicket:id=&quot;linkForm&quot; &gt; *...
* protected void onSubmit() { * System.out.println(&quot;Link2 was clicked, value1 is: &quot; * + mod.getValue1()); * }; * }); * * &lt;form wicket:id=&quot;linkForm&quot; &gt; *...
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir") // $NON-NLS-1$ + File.separator + cookieFile); } BufferedReader reader = null; ...
public void addFile(String cookieFile) throws IOException { File file = new File(cookieFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir") // $NON-NLS-1$ + File.separator + cookieFile); } BufferedReader reader = null; ...
public void addFile(String headerFile) throws IOException { File file = new File(headerFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir")// $NON-NLS-1$ + File.separator + headerFile); } if (!file.canRead()) { th...
public void addFile(String headerFile) throws IOException { File file = new File(headerFile); if (!file.isAbsolute()) { file = new File(System.getProperty("user.dir")// $NON-NLS-1$ + File.separator + headerFile); } if (!file.canRead()) { th...
public String getQueryString(String contentEncoding) { // Check if the sampler has a specified content encoding if(contentEncoding == null || contentEncoding.trim().length() == 0) { // We use the encoding which should be used according to the HTTP spec, which is UTF-8 con...
public String getQueryString(String contentEncoding) { // Check if the sampler has a specified content encoding if(JOrphanUtils.isBlank(contentEncoding)) { // We use the encoding which should be used according to the HTTP spec, which is UTF-8 contentEncoding = EncoderCach...
public String loadStringResource(final Component component, final String key) { if (component == null) { return null; } // The return value String string = null; Locale locale = component.getLocale(); String style = component.getStyle(); // The key prefix is equal to the component path relativ to...
public String loadStringResource(final Component component, final String key) { if (component == null) { return null; } // The return value String string = null; Locale locale = component.getLocale(); String style = component.getStyle(); // The key prefix is equal to the component path relativ to...
public void endVersion(boolean mergeVersion) { if (mergeVersion) { if (changeListStack.size() > 0) { ChangeList previous = (ChangeList)changeListStack.peek(); previous.add(changeList); } else { // ignore this request.. mergeVersion shouldn generate a new // version.. log.info("a...
public void endVersion(boolean mergeVersion) { if (mergeVersion) { if (changeListStack.size() > 0) { ChangeList previous = changeListStack.peek(); previous.add(changeList); } else { // ignore this request.. mergeVersion shouldn generate a new // version.. log.info("an end versio...
public void setClasspath(Path s) { if (this.classpath == null) { this.classpath = s; } else { this.classpath.setPath(s.toString()); } }
public void setClasspath(Path s) { if (this.classpath == null) { this.classpath = s; } else { this.classpath.append(s); } }
protected IStatus run(IProgressMonitor monitor) { return start.startup(monitor); }
protected IStatus run(IProgressMonitor monitor) { return start.run(monitor); }
public static void main(String argv[]) { Arguments argopt = new Arguments(); argopt.setUsage( new String[] { "usage: java dom.DOMCount (options) uri ...", "", "options:", " -p name Specify DOM parser wrapper by name.", ...
public static void main(String argv[]) { Arguments argopt = new Arguments(); argopt.setUsage( new String[] { "usage: java dom.DOMCount (options) uri ...", "", "options:", " -p name Specify DOM parser wrapper by name.", ...
protected void handleComponentTag(RequestCycle cycle, ComponentTag tag) { if (href != null) { tag.put("href", href); } }
protected void handleComponentTag(RequestCycle cycle, ComponentTag tag) { if (href != null) { tag.put("href", href.replaceAll("&", "&amp;")); } }
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
private boolean validateDocument(String document, int expectedLinkClickCount) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addEx...
public boolean getNoHref() { return getBinary( "href" ); }
public boolean getNoHref() { return getBinary( "nohref" ); }
public void loadExistingFile() throws IOException { // inLoading = true; boolean parsedOK = false; if (new File(getFilename()).exists()) { clearVisualizer(); BufferedReader dataReader = null; try { readSamples(SaveService.loadTestResults(new BufferedInputStream(new FileInputStream(getFilename()))));...
public void loadExistingFile() throws IOException { // inLoading = true; boolean parsedOK = false; if (new File(getFilename()).exists()) { clearVisualizer(); BufferedReader dataReader = null; try { readSamples(SaveService.loadTestResults(new BufferedInputStream(new FileInputStream(getFilename()))));...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.5"); checkVersion(HashTreeConverter.class, "1.3"); checkVersion(IntegerPropertyConverter.class, "1.4"); checkVersion(LongPropertyConverter.class, "1.4"); checkVersion(MultiPropertyConverter.class, "1.4"...
private static void checkVersions() { versionsOK = true; checkVersion(BooleanPropertyConverter.class, "1.5"); checkVersion(HashTreeConverter.class, "1.3"); checkVersion(IntegerPropertyConverter.class, "1.4"); checkVersion(LongPropertyConverter.class, "1.4"); checkVersion(MultiPropertyConverter.class, "1.4"...
public void queryQualifiedId(boolean inMemory) throws Exception { EntityManager em = emf.createEntityManager(); String query = "select KEY(e) from Department d, " + " in (d.emps) e order by d.deptId, e.empId"; Query q = em.createQuery(query); if (inMemory) se...
public void queryQualifiedId(boolean inMemory) throws Exception { EntityManager em = emf.createEntityManager(); String query = "select KEY(e) from Department d, " + " in (d.emps) e order by d.deptId, e.empId"; Query q = em.createQuery(query); if (inMemory) se...
" -argfile <file> Build config file (wildcards not supported\n" + /* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accom...
" -argfile <file> Build config file (wildcards not supported\n" + /* ******************************************************************* * Copyright (c) 1999-2001 Xerox Corporation, * 2002 Palo Alto Research Center, Incorporated (PARC). * All rights reserved. * This program and the accom...
public Object start(IApplicationContext appContext) throws Exception { // Set bundle context (for use with service trackers) bundleContext = Activator.getContext(); processArgs(appContext); // Create ECF container of appropriate type. The container instance // can be created in a variety of ways...e.g. via ...
public Object start(IApplicationContext appContext) throws Exception { // Set bundle context (for use with service trackers) bundleContext = Activator.getContext(); processArgs(appContext); // Create ECF container of appropriate type. The container instance // can be created in a variety of ways...e.g. via ...
public void removedService(ServiceReference reference, Object service) { Trace.trace(Activator.PLUGIN_ID, "removedService=" + reference + ",svc=" + service); } }); st.open(true); return st; }
public void removedService(ServiceReference reference, Object service) { Trace.trace(Activator.PLUGIN_ID, "removedService=" + reference + ",svc=" + service); } }); st.open(); return st; }
protected StateManagerImpl persist(AttachManager manager, PersistenceCapable pc, ClassMetaData meta, Object appId, boolean explicit) { PersistenceCapable newInstance; if (!manager.getCopyNew()) newInstance = pc; else if (appId == null) // datastore id...
protected StateManagerImpl persist(AttachManager manager, PersistenceCapable pc, ClassMetaData meta, Object appId, boolean explicit) { PersistenceCapable newInstance; if (!manager.getCopyNew()) newInstance = pc; else if (appId == null) // datastore id...
public void run() { for (int i = 0; i < 50; i++) { event = new Event(); event.type = SWT.MouseWheel; event.detail = SWT.SCROLL_LINE; event.count = -2; display.post(event); try { Thread.sleep(100); } catch (InterruptedException e) {} } } }.start(); while (!shell.isDisposed()...
public void run() { for (int i = 0; i < 50; i++) { event = new Event(); event.type = SWT.MouseWheel; event.detail = SWT.SCROLL_LINE; event.count = -2; if (!display.isDisposed()) display.post(event); try { Thread.sleep(100); } catch (InterruptedException e) {} } } }.start(); ...
public void modifyText(ModifyEvent e) { if (!connectText.getText().equals("")) { //$NON-NLS-1$ updateStatus(null); } else { updateStatus("An connect ID must be specified."); } } }); label = new Label(parent, SWT.RIGHT); label.setText("xmpp://<user>@<xmppserver>[:port]"); label.setLa...
public void modifyText(ModifyEvent e) { if (!connectText.getText().equals("")) { //$NON-NLS-1$ updateStatus(null); } else { updateStatus("An connect ID must be specified."); } } }); label = new Label(parent, SWT.RIGHT); label.setText("<user>@<xmppserver>[:port]"); label.setLayoutDat...
public void modifyText(ModifyEvent e) { if (!connectText.getText().equals("")) { //$NON-NLS-1$ updateStatus(null); } else { updateStatus("An connect ID must be specified."); } } }); label = new Label(parent, SWT.RIGHT); label.setText("xmpps://<user>@<xmppserver>[:port]"); label.setL...
public void modifyText(ModifyEvent e) { if (!connectText.getText().equals("")) { //$NON-NLS-1$ updateStatus(null); } else { updateStatus("An connect ID must be specified."); } } }); label = new Label(parent, SWT.RIGHT); label.setText("<user>@<xmppserver>[:port]"); label.setLayoutDat...
public void bugTestWithSlash() throws Exception { beginAt("/filtertest/hello/message/Test%2FWith%20a%20Slash"); dumpHtml(); assertTitleEquals("Wicket Examples - helloworld"); assertTextInElement("message", "Message is: 'Test/With a Slash'"); } }
public void testWithSlash() throws Exception { beginAt("/filtertest/hello/message/Test%2FWith%20a%20Slash"); dumpHtml(); assertTitleEquals("Wicket Examples - helloworld"); assertTextInElement("message", "Message is: 'Test/With a Slash'"); } }
public void bugTestWithSlash() throws Exception { beginAt("/hello/message/Test%2FWith%20a%20Slash"); dumpHtml(); assertTitleEquals("Wicket Examples - helloworld"); assertTextInElement("message", "Message is: 'Test/With a Slash'"); } }
public void testWithSlash() throws Exception { beginAt("/hello/message/Test%2FWith%20a%20Slash"); dumpHtml(); assertTitleEquals("Wicket Examples - helloworld"); assertTextInElement("message", "Message is: 'Test/With a Slash'"); } }
public synchronized void complete() throws IOException { System.out.flush(); System.err.flush(); if (inputStream != null) { inputStream.close(); } outputStream.flush(); outputStream.close(); errorStream.flush(); errorStream.close(); ...
public synchronized void complete() throws IOException { System.out.flush(); System.err.flush(); if (inputStream != null) { inputStream.close(); } outputStream.flush(); outputStream.close(); errorStream.flush(); errorStream.close(); ...
protected void populateItem(final ListItem listItem) { ; // do nothing } }; assertEquals(0, lv.getStartIndex()); assertEquals(0, lv.getViewSize()); lv.setStartIndex(5); lv.setViewSize(10); assertEquals(0, lv.getStartIndex()); assertEquals(0, lv.getViewSize()); }
protected void populateItem(final ListItem listItem) { ; // do nothing } }; assertEquals(0, lv.getStartIndex()); assertEquals(0, lv.getViewSize()); lv.setStartIndex(5); lv.setViewSize(10); assertEquals(0, lv.getStartIndex()); assertEquals(10, lv.getViewSize()); }
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); if ((bits & OS.CCS_NODIVIDER) == 0) trim.height += 2; return trim; } void createHandle () { super.createHandle (); st...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget (); Rectangle trim = super.computeTrim (x, y, width, height); int bits = OS.GetWindowLong (handle, OS.GWL_STYLE); if ((bits & OS.CCS_NODIVIDER) == 0) trim.height += 2; return trim; } void createHandle () { super.createHandle (); st...
public void checkClass(LazyClassGen gen, String outDir, String expectedFile) throws IOException { if (regenerate) genClass(gen, outDir, expectedFile); else realCheckClass(gen, outDir, expectedFile); } static final File TESTDATA_DIR = new File(BcweaverTests.TESTDATA_PATH); void ge...
public void checkClass(LazyClassGen gen, String outDir, String expectedFile) throws IOException { if (regenerate) genClass(gen, outDir, expectedFile); else realCheckClass(gen, outDir, expectedFile); } static final File TESTDATA_DIR = new File(BcweaverTests.TESTDATA_PATH); void ge...
public boolean isDisposed () { return device == null; } /* * Itemize the receiver text */ StyleItem[] itemize () { segmentsText = getSegmentsText(); int length = segmentsText.length(); SCRIPT_CONTROL scriptControl = new SCRIPT_CONTROL(); SCRIPT_STATE scriptState = new SCRIPT_STATE(); final int MAX_ITEM = leng...
public boolean isDisposed () { return device == null; } /* * Itemize the receiver text */ StyleItem[] itemize () { segmentsText = getSegmentsText(); int length = segmentsText.length(); SCRIPT_CONTROL scriptControl = new SCRIPT_CONTROL(); SCRIPT_STATE scriptState = new SCRIPT_STATE(); final int MAX_ITEM = leng...
public void renderHeadSections(final HtmlHeaderContainer container); }
public void renderHeaderSections(final HtmlHeaderContainer container); }
public String toString() { if (!isMutable) { return text; } return toXmlString(null); }
public String toString() { if (!isMutable && (text != null)) { return text; } return toXmlString(null); }
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
public GC(Drawable drawable, int style) { if (drawable == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); GCData data = new GCData (); data.style = checkStyle(style); int hDC = drawable.internal_new_GC(data); Device device = data.device; if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SW...
public static String findProgramID (String extension) { if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (extension.length () == 0) return ""; //$NON-NLS-1$ if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$ /* Use the character encoding for the default locale */ TCHAR ext...
public static String findProgramID (String extension) { if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT); if (extension.length () == 0) return ""; //$NON-NLS-1$ if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$ /* Use the character encoding for the default locale */ TCHAR ext...
public static String [] getExtensions () { String [] extensions = new String [1024]; /* Use the character encoding for the default locale */ TCHAR lpName = new TCHAR (0, 1024); int [] lpcName = new int [] {lpName.length ()}; FILETIME ft = new FILETIME (); int dwIndex = 0, count = 0; while (OS.RegEnumKeyEx (OS.HK...
public static String [] getExtensions () { String [] extensions = new String [1024]; /* Use the character encoding for the default locale */ TCHAR lpName = new TCHAR (0, 1024); int [] lpcName = new int [] {lpName.length ()}; FILETIME ft = new FILETIME (); int dwIndex = 0, count = 0; while (OS.RegEnumKeyEx (OS.HK...
private int myPrivate_int=-1, myPackage_int=-1, myProtected_int=-1, myPublic_int=-1; after() returning(TheObject obj): execution(new()) { // CW 7 nonmatching target theObject = obj; }
private int myPrivate_int=-1, myPackage_int=-1, myProtected_int=-1, myPublic_int=-1; after() returning(TheObject obj): execution(new()) { theObject = obj; }
private String commKey; /** Log. */ private Log log = LogFactory.getLog(JettyMonitor.class);
private String commKey; /** Log. */ private static Log log = LogFactory.getLog(JettyMonitor.class);
private StringBuffer buffer = new StringBuffer(); /** logger. */ private Log log = LogFactory.getLog(LogConnector.class);
private StringBuffer buffer = new StringBuffer(); /** logger. */ private static Log log = LogFactory.getLog(LogConnector.class);
public static NSPoint mouseLocation() { NSPoint result = new NSPoint(); OS.objc_msgSend_stret(result, OS.class_NSEvent, OS.sel_mouseLocation); return result; }
public static NSPoint mouseLocation() { NSPoint result = new NSPoint(); OS.objc_msgSend_struct(result, OS.class_NSEvent, OS.sel_mouseLocation); return result; }
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = hItem; OS.SendMessage (handle, OS.TVM_G...
public void showSelection () { checkWidget (); int hItem = 0; if ((style & SWT.SINGLE) != 0) { hItem = OS.SendMessage (handle, OS.TVM_GETNEXTITEM, OS.TVGN_CARET, 0); if (hItem == 0) return; TVITEM tvItem = new TVITEM (); tvItem.mask = OS.TVIF_STATE; tvItem.hItem = hItem; OS.SendMessage (handle, OS.TVM_G...
public Object start(IApplicationContext context) throws Exception { Map bots = Activator.getDefault().getBots(); for(Iterator it = bots.values().iterator(); it.hasNext();) { IBotEntry entry = (IBotEntry) it.next(); Bot bot = new Bot(entry); } while (true) { try { Thread.sleep(100); } c...
public Object start(IApplicationContext context) throws Exception { Map bots = Activator.getDefault().getBots(); for(Iterator it = bots.values().iterator(); it.hasNext();) { IBotEntry entry = (IBotEntry) it.next(); new Bot(entry); } while (true) { try { Thread.sleep(100); } catch (Inte...
public Class[][] getSupportedParameterTypesForCreateInstance() { return new Class[][] { { URL.class }, { String.class } }; } }
public Class[][] getSupportedParameterTypes() { return new Class[][] { { URL.class }, { String.class } }; } }
private static final String THREAD_VALUES = "UserParameters.thread_values"; VariablesCollection vars = new VariablesCollection(); int counter = 0; Iterator threadValues; /**
private static final String THREAD_VALUES = "UserParameters.thread_values"; VariablesCollection vars = new VariablesCollection(); int counter = 0; transient Iterator threadValues; /**
protected IRequestTarget resolveListenerInterfaceTarget(RequestCycle requestCycle, final Page page, final String componentPath, final String interfaceName, RequestParameters requestParameters) { if (interfaceName.equals("IRedirectListener")) { return new RedirectPageRequestTarget(page); } else { ...
protected IRequestTarget resolveListenerInterfaceTarget(RequestCycle requestCycle, final Page page, final String componentPath, final String interfaceName, RequestParameters requestParameters) { if (interfaceName.equals(Page.REDIRECT_LISTENER_INTERFACE.getName())) { return new RedirectPageRequestTarget(p...
public RedirectPageRequestTarget(final Page page) { super(page, page, RequestCycle.requestListenerInterfaceForName("IRedirectListener")); }
public RedirectPageRequestTarget(final Page page) { super(page, page, Page.REDIRECT_LISTENER_INTERFACE); }
public String replaceProperties(String value) throws BuildException { return ProjectHelper.replaceProperties(this, value); }
public String replaceProperties(String value) throws BuildException { return ProjectHelper.replaceProperties(this, value, properties); }
public static String replaceProperties(Project project, String value) throws BuildException { return replaceProperties(project,value,project.getProperties()); }
public static String replaceProperties(Project project, String value) throws BuildException { return project.replaceProperties(value); }
public String getMarkupType() { return "html"; }
public String getMarkupType() { return getPage().getMarkupType(); }