buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
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 run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin.getActiveWorkbenchWindow...
public void run(final IProgressMonitor monitor) { editorPart.doSave(monitor); } }; try { PlatformUI.getWorkbench().getProgressService().runInUI(XSTUIPlugin.getActiveWorkbenchWindow...
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
public void showSelection () { checkWidget (); int index = OS.SendMessage (handle, OS.LVM_GETNEXTITEM, -1, OS.LVNI_SELECTED); if (index != -1) showItem (index); } String toolTipText (NMTTDISPINFO hdr) { int hwndToolTip = OS.SendMessage (handle, OS.LVM_GETTOOLTIPS, 0, 0); if (hwndToolTip == hdr.hwndFrom && toolTi...
public final boolean isVisibleInHierarchy() { Component component = this; while (component != null) { if (renderAllowed && component.isVisible()) { component = component.getParent(); } else { return false; } } return true; }
public final boolean isVisibleInHierarchy() { Component component = this; while (component != null) { if (component.renderAllowed && component.isVisible()) { component = component.getParent(); } else { return false; } } return true; }
public void addShellListener (ShellListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Close,typedListener); addListener (SWT.Iconify,typedListener); addListener (SWT.Deiconify,typedListener); addL...
public void addShellListener (ShellListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Close,typedListener); addListener (SWT.Iconify,typedListener); addListener (SWT.Deiconify,typedListener); addL...
public static void main( String[] argv) { try { boolean namespaces = true; System.out.println("Running dom.dom3.Test..."); System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMImplementationSourceImpl org.apache.xerces.dom.DOMXSImplementationSou...
public static void main( String[] argv) { try { boolean namespaces = true; System.out.println("Running dom.dom3.Test..."); System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMImplementationSourceImpl org.apache.xerces.dom.DOMXSImplementationSou...
public boolean isFinished(final int lastOptionCode) { return (lastOptionCode == CLEAR1_OPT); } }; final CLArgsParser parser1 = new CLArgsParser(ARGLIST1, options1, control1); assertNull(parser1.getErrorString(), parser1.getErrorString()); final ...
public boolean isFinished(final int lastOptionCode) { return (lastOptionCode == CLEAR1_OPT); } }; final CLArgsParser parser1 = new CLArgsParser(ARGLIST1, options1, control1); assertNull(parser1.getErrorString(), parser1.getErrorString()); final ...
public void testPause2() throws Exception { divertLog(); SampleResult res = new SampleResult(); res.sampleStart(); res.samplePause(); assertTrue(wr.toString().length() == 0); res.samplePause(); assertFalse(wr.toString().length()...
public void testPause2() throws Exception { divertLog(); SampleResult res = new SampleResult(); res.sampleStart(); res.samplePause(); assertEquals(0, wr.toString().length()); res.samplePause(); assertFalse(wr.toString().length()...
public final MarkupStream getMarkupStream(final MarkupContainer container, final Class clazz) { // Look for associated markup final Markup markup = getMarkup(container, clazz); // If we found markup for this container if (markup != Markup.NO_MARKUP) { // return a MarkupStream for the markup return ne...
public final MarkupStream getMarkupStream(final MarkupContainer container, final Class clazz) { // Look for associated markup final Markup markup = getMarkup(container, clazz); // If we found markup for this container if (markup != Markup.NO_MARKUP) { // return a MarkupStream for the markup return ne...
int startOffset = text.getOffsetAtLocation(new Point(0, pt.y)); /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclip...
int startOffset = text.getOffsetAtLocation(new Point(0, pt.y)); /******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclip...
public Component<String> getHeader(MarkupContainer parent, String componentId) { return new Label(parent, componentId, getDisplayModel()); }
public Component<String> getHeader(MarkupContainer parent, String componentId) { return (Component) new Label(parent, componentId, getDisplayModel()); }
protected Point computeSize(Composite composite, int wHint, int hHint, boolean changed) { Control[] children = composite.getChildren(); if (changed || iExtent == null || tExtent == null) { iExtent = children[0].computeSize(SWT.DEFAULT, SWT.DEFAULT, false);...
protected Point computeSize(Composite composite, int wHint, int hHint, boolean changed) { Control[] children = composite.getChildren(); if (changed || iExtent == null || tExtent == null) { iExtent = children[0].computeSize(SWT.DEFAULT, SWT.DEFAULT, false);...
public static int[] RYTable, GYTable, BYTable, RCbTable, GCbTable, BCbTable, RCrTable, GCrTable, BCrTable, NBitsTable; static { initialize(); } void compress(ImageData image, byte[] dataYComp, byte[] dataCbComp, byte[] dataCrComp) { int srcWidth = image.width; int srcHeight = image.height; int vhFactor = maxV...
public static int[] RYTable, GYTable, BYTable, RCbTable, GCbTable, BCbTable, RCrTable, GCrTable, BCrTable, NBitsTable; static { initialize(); } void compress(ImageData image, byte[] dataYComp, byte[] dataCbComp, byte[] dataCrComp) { int srcWidth = image.width; int srcHeight = image.height; int vhFactor = maxV...
public static int round(int p, int q) { return (int)Math.round((float)p / q); }
public static int round(int p, int q) { return Math.round((float)p / q); }
public void reset() { rootClasses.clear(); determined = false; fileDependencies = new Vector(); classDependencies = new Vector(); }
public void reset() { rootClasses.removeAllElements(); determined = false; fileDependencies = new Vector(); classDependencies = new Vector(); }
public void resolveBindings(IScope scope, Bindings bindings) { if (onTypeSymbolic != null) { onType = onTypeSymbolic.resolveExactType(scope, bindings); } ResolvedTypeX searchType; if (onType != null) { searchType = scope.getWorld().resolve(onType); } else { searchType = scope.getEnclosingType(); ...
public void resolveBindings(IScope scope, Bindings bindings) { if (onTypeSymbolic != null) { onType = onTypeSymbolic.resolveExactType(scope, bindings); } ResolvedTypeX searchType; if (onType != null) { searchType = scope.getWorld().resolve(onType); } else { searchType = scope.getEnclosingType(); ...
public ResultSet getGeneratedKeys() throws SQLException { throw new UnsupportedOperationException(); }
public ResultSet getGeneratedKeys() throws SQLException { return _stmnt.getGeneratedKeys(); }
public void connect() throws IOException { // start listening Thread thread = new Thread(fEventListener, "Engine Event Listener"); thread.setDaemon(true); thread.start(); int trials = 4; while (true) { try { fRequestConnection.connect(); ...
public void connect() throws IOException { // start listening Thread thread = new Thread(fEventListener, "Engine Event Listener"); thread.setDaemon(true); thread.start(); int trials = 40; while (true) { try { fRequestConnection.connect(); ...
public Object evaluateInternal(final Object[] parameters, final ExecutionContext ctx) { final HashSet<AnalysationIssue> issues = new HashSet<AnalysationIssue>(); try { final Method method = getJavaMethod(ctx, issues); if (method == null) { final StringBuilder ...
public Object evaluateInternal(final Object[] parameters, final ExecutionContext ctx) { final HashSet<AnalysationIssue> issues = new HashSet<AnalysationIssue>(); try { final Method method = getJavaMethod(ctx, issues); if (method == null) { final StringBuilder ...
String ROLE = FileSystemManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = FileSystemManager.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org....
String ROLE = AspectHandler.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apac...
String ROLE = AspectHandler.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apac...
String ROLE = Converter.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.m...
String ROLE = Converter.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.m...
String ROLE = DataType.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
String ROLE = DataType.class.getName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.my...
public IRequestTarget decode(RequestParameters requestParameters) { String parametersFragment = requestParameters.getPath().substring(getMountPath().length()); // try to extract page info PageInfoExtraction extraction = extractPageInfo(parametersFragment); PageInfo pageInfo = extraction.getPageInfo(); Str...
public IRequestTarget decode(RequestParameters requestParameters) { String parametersFragment = requestParameters.getPath().substring(getMountPath().length()); // try to extract page info PageInfoExtraction extraction = extractPageInfo(parametersFragment); PageInfo pageInfo = extraction.getPageInfo(); Str...
public IRequestTarget decode(RequestParameters requestParameters) { String remainder = requestParameters.getPath().substring(getMountPath().length()); final String parametersFragment; int ix = remainder.indexOf('/', 1); if (ix == -1) { ix = remainder.length(); parametersFragment = ""; } else { ...
public IRequestTarget decode(RequestParameters requestParameters) { String remainder = requestParameters.getPath().substring(getMountPath().length()); final String parametersFragment; int ix = remainder.indexOf('/', 1); if (ix == -1) { ix = remainder.length(); parametersFragment = ""; } else { ...
protected Hashtable getFiles(){ if (files == null){ return files; } files = new Hashtable(); DirectoryScanner ds = getDirectoryScanner(viewpath); String[] includes = ds.getIncludedDirectories(); addElements(files, ds.getBasedir(), includes); includ...
protected Hashtable getFiles(){ if (files != null){ return files; } files = new Hashtable(); DirectoryScanner ds = getDirectoryScanner(viewpath); String[] includes = ds.getIncludedDirectories(); addElements(files, ds.getBasedir(), includes); includ...
public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException { if (overwrite || destFile.lastModified() < sourceFile.lastModified()) { log("Copy: " + sourceFile.ge...
public void copyFile(File sourceFile, File destFile, boolean filtering, boolean overwrite, boolean preserveLastModified) throws IOException { if (overwrite || destFile.lastModified() < sourceFile.lastModified()) { log("Copy: " + sourceFile.ge...
public void testGetInputStream() throws Exception { FileItem fileItem = new DiskFileItemFactory().createItem("dummyFieldName", "text/java", false, "FileUploadTest.java"); // Initialize the upload fileItem.getOutputStream(); // Get the internal list out Field inputStreamsField = FileUpload.class.getDeclar...
public void testGetInputStream() throws Exception { FileItem fileItem = new DiskFileItemFactory().createItem("dummyFieldName", "text/java", false, "FileUploadTest.java"); // Initialize the upload fileItem.getOutputStream(); // Get the internal list out Field inputStreamsField = FileUpload.class.getDeclar...
public TypeDeployer createDeployer( final ClassLoader loader ) throws DeploymentException { try { return createDeployment( loader, null ); } catch( Exception e ) { final String message = REZ.getString( "deploy-from-classloader.error" ); ...
public TypeDeployer createDeployer( final ClassLoader loader ) throws DeploymentException { try { return createDeployment( loader, null ); } catch( Exception e ) { final String message = REZ.getString( "deploy-from-classloader.error", loade...
private void execute( final String[] args ) throws Exception { setupDefaultParameters(); if( !parseCommandLineOptions( args ) ) { return; } //handle logging... final String logLevel = m_parameters.getParameter( "log.level", null ); en...
private void execute( final String[] args ) throws Exception { setupDefaultParameters(); if( !parseCommandLineOptions( args ) ) { return; } //handle logging... final String logLevel = m_parameters.getParameter( "log.level", null ); en...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // make sure nested borders are resolved properly if (rendering == false) { // We are only interested in border body tags. The tag ID actually is irrelevant since // always preset with the ...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // make sure nested borders are resolved properly if (rendering == false) { // We are only interested in border body tags. The tag ID actually is irrelevant since // always preset with the ...
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Draw anything before the body? if (!isLinkEnabled() && getBeforeDisabledLink() != null) { getResponse().write(getBeforeDisabledLink()); } // Render the body of the link renderComponentTagBody(markupStre...
protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) { // Draw anything before the body? if (!isLinkEnabled() && getBeforeDisabledLink() != null) { getResponse().write(getBeforeDisabledLink()); } // Render the body of the link super.onComponentTagBody(markupSt...
protected void renderItem(final ListItem<?> item) { item.render(getMarkupStream()); }
protected void renderItem(final ListItem<?> item) { item.render(); }
protected void renderItem(final LoopItem item) { item.render(getMarkupStream()); }
protected void renderItem(final LoopItem item) { item.render(); }
public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // It must be <wicket:...> if (tag instanceof WicketTag) { // It must be <wicket:component...> final WicketTag wicketTag = (WicketTag)tag; if (wicketTag.isComponentTag()) { ...
public final boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // It must be <wicket:...> if (tag instanceof WicketTag) { // It must be <wicket:component...> final WicketTag wicketTag = (WicketTag)tag; if (wicketTag.isComponentTag()) { ...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Ignore special tags like _panel, _border, _extend etc. if ((tag instanceof WicketTag) || tag.isAutoComponentTag()) { return false; } MarkupContainer parent = container; while ((paren...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Ignore special tags like _panel, _border, _extend etc. if ((tag instanceof WicketTag) || tag.isAutoComponentTag()) { return false; } MarkupContainer parent = container; while ((paren...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Try to find the component with the parent component. final String id = tag.getId(); MarkupContainer parent = container; while (!(parent instanceof Page) && !(parent instanceof Panel) && (pa...
public boolean resolve(final MarkupContainer container, final MarkupStream markupStream, final ComponentTag tag) { // Try to find the component with the parent component. final String id = tag.getId(); MarkupContainer parent = container; while (!(parent instanceof Page) && !(parent instanceof Panel) && (pa...
private static final String DEFAULT_DELIMITER = ","; /** * Read in the properties having to do with saving from a properties file. */ static { // TODO - get from properties? _subresults = _encoding = _assertions= _latency = _samplerData = true; _responseHeaders = _requestHeaders = true;...
private static final String DEFAULT_DELIMITER = ","; /** * Read in the properties having to do with saving from a properties file. */ static { // TODO - get from properties? _subresults = _encoding = _assertions= _latency = _samplerData = true; _responseHeaders = _requestHeaders = true;...
public void initialize(BSFManager mgr, String lang, @SuppressWarnings("unchecked") // superclass does not support types Vector declaredBeans)
public void initialize(BSFManager mgr, String lang, @SuppressWarnings("rawtypes") // superclass does not support types Vector declaredBeans)
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = 0, height = 0; if ((style & SWT.HORIZONTAL) != 0) { width += DEFAULT_WIDTH; height += 5; } else { width += 5; height += DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget(); int width = 0, height = 0; if ((style & SWT.HORIZONTAL) != 0) { width += DEFAULT_WIDTH; height += 5; } else { width += 5; height += DEFAULT_HEIGHT; } if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = ...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getRequest().getUrl(); Url targetUrl = requestCycle.urlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies // and 3 rendering strategies // // try to get an alr...
public void respond(RequestCycle requestCycle) { Url currentUrl = requestCycle.getRequest().getUrl(); Url targetUrl = requestCycle.urlFor(getRenderPageRequestHandler()); // // the code below is little hairy but we have to handle 3 redirect policies // and 3 rendering strategies // // try to get an alr...
private int executeInVM(JUnitTest test) throws BuildException { test.setProperties(project.getProperties()); if (dir != null) { log("dir attribute ignored if running in the same VM", Project.MSG_WARN); } CommandlineJava.SysProperties sysProperties = commandline.getSystem...
private int executeInVM(JUnitTest test) throws BuildException { test.setProperties(project.getProperties()); if (dir != null) { log("dir attribute ignored if running in the same VM", Project.MSG_WARN); } CommandlineJava.SysProperties sysProperties = commandline.getSystem...
public short getXSType (){ return XSType.DATATYPE_TYPE; }
public short getXSType (){ return XSType.SIMPLE_TYPE; }
private void checkContent( String content, Object state, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any if ( this.fBaseValidator != null ) { // validate content as a base type ((AbstractStringValidator)fBaseValidator).checkC...
private void checkContent( String content, Object state, boolean asBase ) throws InvalidDatatypeValueException { // validate against parent type if any if ( fBaseValidator instanceof AbstractStringValidator ) { // validate content as a base type ((AbstractStringValidator)...
protected static void setNCNameValidator (DatatypeValidator dv) { // make a string validator for NCName if ( fgStrValidator == null) { fgStrValidator = dv; } } }
public static void setNCNameValidator (DatatypeValidator dv) { // make a string validator for NCName if ( fgStrValidator == null) { fgStrValidator = dv; } } }
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); return computeSize (handle, wHint, hHint, changed); } void createHandle () { parentingHandle = OS.gcnew_Canvas (); if (parentingHandle == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gcnew_ToolBarTray (); if (handle == 0) error (S...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); return computeSize (handle, wHint, hHint, changed); } void createHandle () { parentingHandle = OS.gcnew_Canvas (); if (parentingHandle == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gcnew_ToolBarTray (); if (handle == 0) error (S...
public static void main(String []argv) { new Bean(); } }
public static void main(String []argv) { Bean b = new Bean(); } }
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled()) { checkComponentTag(tag, "a"); tag.put("href", "#"); } else { disableLink(tag); } }
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled()) { if (tag.getName().toLowerCase().equals("a")) tag.put("href", "#"); } else { disableLink(tag); } }
public RGB open () { byte [] buffer = Converter.wcsToMbcs (null, title, true); int /*long*/ handle = OS.gtk_color_selection_dialog_new (buffer); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); if (parent != null) { int /*long*/ shellHandle = parent.topHandle (); OS.gtk_window_set...
public RGB open () { byte [] buffer = Converter.wcsToMbcs (null, title, true); int /*long*/ handle = OS.gtk_color_selection_dialog_new (buffer); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); if (parent != null) { int /*long*/ shellHandle = parent.topHandle (); OS.gtk_window_set...
public FontData open () { int /*long*/ handle; byte [] titleBytes; titleBytes = Converter.wcsToMbcs (null, title, true); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); handle = OS.gtk_font_selection_dialog_new (titleBytes); if (parent!=null) { int /*long*/ shellHandle = parent.t...
public FontData open () { int /*long*/ handle; byte [] titleBytes; titleBytes = Converter.wcsToMbcs (null, title, true); Display display = parent != null ? parent.getDisplay (): Display.getCurrent (); handle = OS.gtk_font_selection_dialog_new (titleBytes); if (parent!=null) { int /*long*/ shellHandle = parent.t...
public int open () { int /*long*/ parentHandle = (parent != null) ? parent.topHandle() : 0; int dialogFlags = OS.GTK_DIALOG_DESTROY_WITH_PARENT; if ((style & (SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) { dialogFlags |= OS.GTK_DIALOG_MODAL; } int messageType = OS.GTK_MESSAGE_INFO; if ((...
public int open () { int /*long*/ parentHandle = (parent != null) ? parent.topHandle() : 0; int dialogFlags = OS.GTK_DIALOG_DESTROY_WITH_PARENT; if ((style & (SWT.PRIMARY_MODAL | SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL)) != 0) { dialogFlags |= OS.GTK_DIALOG_MODAL; } int messageType = OS.GTK_MESSAGE_INFO; if ((...
public boolean getVisible () { checkWidget(); return (state & HIDDEN) == 0; } int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { Shell shell = _getShell (); GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.type == OS.G...
public boolean getVisible () { checkWidget(); return (state & HIDDEN) == 0; } int /*long*/ gtk_button_press_event (int /*long*/ widget, int /*long*/ event) { Shell shell = _getShell (); GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (gdkEvent.type == OS.G...
public void update () { checkWidget(); update (false); } void update (boolean all) { // checkWidget(); if (all) { display.update (); } else { int display = OS.XtDisplay (handle); if (display == 0) return; int window = OS.XtWindow (handle); if (window == 0) return; int event = OS.XtMalloc (XEvent.sizeo...
public void update () { checkWidget(); update (false); } void update (boolean all) { // checkWidget(); if (all) { display.update (); } else { int display = OS.XtDisplay (handle); if (display == 0) return; int window = OS.XtWindow (handle); if (window == 0) return; int event = OS.XtMalloc (XEvent.sizeo...
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != null && selectionF...
public void draw(GC gc, int x, int y, int selectionStart, int selectionEnd, Color selectionForeground, Color selectionBackground, int flags) { checkLayout (); if (gc == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (selectionForeground != null && selectionF...
public void setUp() { setUp(Customer.class, Customer.CustomerKey.class, Order.class, OrderItem.class, Magazine.class, Publisher.class, Employee.class, Dependent.class, DependentId.class, CLEAR_TABLES); }
public void setUp() { setUp(Customer.class, Customer.CustomerKey.class, Order.class, OrderItem.class, Magazine.class, Publisher.class, Employee.class, Dependent.class, DependentId.class, DROP_TABLES); }
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); data.lineWidth = width; OS.CGContextSetLineWidth(handle, width); }
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); data.lineWidth = width; OS.CGContextSetLineWidth(handle, Math.max(1, width)); }
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); int line_style = data.lineStyle == SWT.LINE_SOLID ? OS.GDK_LINE_SOLID : OS.GDK_LINE_ON_OFF_DASH; OS.gdk_gc_set_line_attributes(handle, width, l...
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); GdkGCValues values = new GdkGCValues(); OS.gdk_gc_get_values(handle, values); int line_style = data.lineStyle == SWT.LINE_SOLID ? OS.GDK_LINE_SOLID : OS.GDK_LINE_ON_OFF_DASH; OS.gdk_gc_set_line_attributes(handle, width, l...
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); int xDisplay = data.display; XGCValues values = new XGCValues(); OS.XGetGCValues(xDisplay, handle, OS.GCLineWidth | OS.GCCapStyle | OS.GCJoinStyle, values); int line_style = data.lineStyle == SWT.LINE_SOLID ? OS.LineSolid...
public void setLineWidth(int width) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); int xDisplay = data.display; XGCValues values = new XGCValues(); OS.XGetGCValues(xDisplay, handle, OS.GCLineWidth | OS.GCCapStyle | OS.GCJoinStyle, values); int line_style = data.lineStyle == SWT.LINE_SOLID ? OS.LineSolid...
public void onSubmit() { try { Page page = new SuccessPage(); page.info(getString("book.save.success", new Model(book))); setResponsePage(page); } finally { getPage().getPageMap().remove(getPage()); } } }
public void onSubmit() { try { Page page = new SuccessPage(); page.info(getString("book.save.success", new Model(book))); setResponsePage(page); } finally { getPage().getPageMap().removePage(getPage()); } } }
public FeedbackMessagesModel(Component component) { if (component == null) { throw new IllegalArgumentException("Argument [[page]] cannot be null"); } }
public FeedbackMessagesModel(Component component) { if (component == null) { throw new IllegalArgumentException("Argument 'component' cannot be null"); } }
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup<T> group = (CheckGroup<T>)find...
protected void onComponentTag(final ComponentTag tag) { // Default handling for component tag super.onComponentTag(tag); // must be attached to <input type="checkbox" .../> tag checkComponentTag(tag, "input"); checkComponentTagAttribute(tag, "type", "checkbox"); CheckGroup<T> group = (CheckGroup<T>)find...
public void testManifestOnlyJar() { executeTarget("testManifestOnlyJar"); File manifestFile = getProject().resolveFile(tempDir + "META-INF" + File.separator + "MANIFEST.MF"); assertTrue(manifestFile.exists()); }
public void testManifestOnlyJar() { expectLogContaining("testManifestOnlyJar", "Building MANIFEST-only jar: "); File manifestFile = getProject().resolveFile(tempDir + "META-INF" + File.separator + "MANIFEST.MF"); assertTrue(manifestFile.exists()); }
public void testZipEmptyCreate() { executeTarget("zipEmptyCreate"); assertTrue("archive should be created", getProject().resolveFile("test3.zip").exists()); }
public void testZipEmptyCreate() { expectLogContaining("zipEmptyCreate", "Note: creating empty"); assertTrue("archive should be created", getProject().resolveFile("test3.zip").exists()); }
protected void initializeTableModel(ObjectTableModel model) { if(tableModel == null) { tableModel = new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_RESOURCE_NAMES_0, ArgumentsPanel.COLUMN_RESOURCE_NAMES_1, ENCODE_OR_NOT, INCLUDE_EQUALS }, HTTPArg...
protected void initializeTableModel(ObjectTableModel model) { if(model == null) { tableModel = new ObjectTableModel(new String[] { ArgumentsPanel.COLUMN_RESOURCE_NAMES_0, ArgumentsPanel.COLUMN_RESOURCE_NAMES_1, ENCODE_OR_NOT, INCLUDE_EQUALS }, HTTPArgument...
protected boolean createEmptyZip(File zipFile) { // Jar files always contain a manifest and can never be empty return false; }
protected boolean createEmptyZip(File zipFile) { // Jar files always contain a manifest and can never be empty return true; }
public final String getTextFormat() { return ((DateConverter)converter).getDatePattern(); } }
public final String getTextFormat() { return converter.getDatePattern(); } }
public void run () { if (browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); } });
public void run () { if (browser == null || browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); } });
public void run () { if (browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); }
public void run () { if (browser == null || browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); }
private static void handle(String message, Throwable thrown, boolean fail) { final boolean failed = fail || (null != thrown); IMessage.Kind kind = (failed ? IMessage.FAIL : IMessage.INFO); IMessage m = new Message(message, kind, thrown, null); final boolean handled = messageHandler.h...
private static void handle(String message, Throwable thrown, boolean fail) { final boolean failed = fail || (null != thrown); IMessage.Kind kind = (failed ? IMessage.FAIL : IMessage.INFO); IMessage m = new Message(message, kind, thrown, null); /*final boolean handled = */messageHandl...
public String read(String context, boolean required) throws IOException { final boolean skipEmpties = false; String result = reader.nextLine(skipEmpties); if ((null != result) && (0 == result.length())) { result = null; } if ((null == result) && required) { String s = "expecting " +...
public String read(String context, boolean required) throws IOException { final boolean skipEmpties = false; String result = reader.nextLine(skipEmpties); if ((null != result) && (0 == result.length())) { result = null; } if ((null == result) && required) { String s = "expecting " +...
public static final boolean globalsValid; static { J2SE13_RTJAR = getRtJarFor(J2SE13_RTJAR_NAME, "c:/home/apps/jdk13"); J2SE14_RTJAR = getRtJarFor(J2SE14_RTJAR_NAME, "c:/home/apps/jdk14"); String forkSpec = getSystemProperty(FORK_NAME, null); globalsVali...
public static final boolean globalsValid; static { J2SE13_RTJAR = getRtJarFor(J2SE13_RTJAR_NAME, "c:/home/apps/jdk13"); J2SE14_RTJAR = getRtJarFor(J2SE14_RTJAR_NAME, "c:/home/apps/jdk14"); // String forkSpec = getSystemProperty(FORK_NAME, null); g...
public File getWritableDir(File dir, String name, boolean deleteContents, boolean register, String failMessage) { // check dir if (null == dir) { if (null == name) { name = "Validator"; } dir = FileUtil.getTempDir(name); ...
public File getWritableDir(File dir, String name, boolean deleteContents, boolean register, String failMessage) { // check dir if (null == dir) { if (null == name) { name = "Validator"; } dir = FileUtil.getTempDir(name); ...
public static int numFailures(IRunStatus status, boolean recurse) { int numFails = 0; IRunStatus[] children = status.getChildren(); int numChildren = (null == children? 0 : children.length); if (0 == numChildren) { if (!RunValidator.NORMAL.runPassed(status)) { ...
public static int numFailures(IRunStatus status, boolean recurse) { int numFails = 0; IRunStatus[] children = status.getChildren(); int numChildren = (null == children? 0 : children.length); if (0 == numChildren) { if (!RunValidator.NORMAL.runPassed(status)) { ...
public StreamsHandler( boolean listen, boolean logToOut) { this.err = System.err; this.out = System.out; outDelegate = new ProxyPrintStream(System.out); errDelegate = new ProxyPrintStream(System.err); this.listening = listen; final PrintStream HIDE = N...
public StreamsHandler( boolean listen, boolean logToOut) { this.err = System.err; this.out = System.out; outDelegate = new ProxyPrintStream(System.out); errDelegate = new ProxyPrintStream(System.err); this.listening = listen; // final PrintStrea...
private static void print(PrintStream out, List list, String label) { if ((null == out) || LangUtil.isEmpty(list)) { return; } int i = 0; final String suffix = " " + label; final String LABEL = list.size() + suffix; out.println("## START " + LABEL); ...
private static void print(PrintStream out, List list, String label) { if ((null == out) || LangUtil.isEmpty(list)) { return; } // int i = 0; final String suffix = " " + label; final String LABEL = list.size() + suffix; out.println("## START " + LABE...
private static String resolve(Option.Value[] input, int[] matches) { String err = null; // seek force-off Option.Value forceOff = null; Option option = null; // find and remove any force-off for (int i = 0;(null == err) && (i < matches.length); i++) { Opti...
private static String resolve(Option.Value[] input, int[] matches) { String err = null; // seek force-off // Option.Value forceOff = null; Option option = null; // find and remove any force-off for (int i = 0;(null == err) && (i < matches.length); i++) { ...
public void endElement(String name) { int level = stack.size(); String err = null; StackElement element = null; if (0 == stack.size()) { err = "empty stack"; } else { element = (StackElement) stack.pop(); if (!element.name.equals(name)) { ...
public void endElement(String name) { // int level = stack.size(); String err = null; StackElement element = null; if (0 == stack.size()) { err = "empty stack"; } else { element = (StackElement) stack.pop(); if (!element.name.equals(...
public static void sameIAjcRun(IAjcRun lhs, IAjcRun rhs, Assert reporter) { Assert a = reporter; assertTrue(lhs != null); assertTrue(rhs != null); Class c = lhs.getClass(); assertTrue(c == rhs.getClass()); AbstractRunSpec lhsSpec; AbstractRunSpec rhsSpec; ...
public static void sameIAjcRun(IAjcRun lhs, IAjcRun rhs, Assert reporter) { // Assert a = reporter; assertTrue(lhs != null); assertTrue(rhs != null); Class c = lhs.getClass(); assertTrue(c == rhs.getClass()); AbstractRunSpec lhsSpec; AbstractRunSpec rhsSpe...
public void run() { final long waitBetweenAdds = interval * 1000l; long curTime = System.currentTimeMillis(); final long timeout = curTime + MAX_MILLIS; final Thread thread = Thread.currentThread(); int numAdded = 0; while (!stop && (timeout > curTime) &&...
public void run() { final long waitBetweenAdds = interval * 1000l; long curTime = System.currentTimeMillis(); final long timeout = curTime + MAX_MILLIS; // final Thread thread = Thread.currentThread(); int numAdded = 0; while (!stop && (timeout > curTime) ...
public void skiptestUnflatten() { LangUtil.FlattenSpec COMMA = LangUtil.FlattenSpec.COMMA; LangUtil.FlattenSpec LIST = LangUtil.FlattenSpec.LIST; FTest[] tests = new FTest[] { new FTest("[]", new String[0], LIST) , new FTest("[1]", new String[] {"1"}, LIST) ...
public void skiptestUnflatten() { // LangUtil.FlattenSpec COMMA = LangUtil.FlattenSpec.COMMA; LangUtil.FlattenSpec LIST = LangUtil.FlattenSpec.LIST; FTest[] tests = new FTest[] { new FTest("[]", new String[0], LIST) , new FTest("[1]", new String[] {"1"}, LIST...
private synchronized static void populateElementTypes() { // This class looks like it is due to some strange // (read: inconsistent) JVM bugs. // Initially all this code was placed in the static constructor, // but that caused some early JVMs (1.1) to go mad, and if a // ...
private synchronized static void populateElementTypes() { // This class looks like it is due to some strange // (read: inconsistent) JVM bugs. // Initially all this code was placed in the static constructor, // but that caused some early JVMs (1.1) to go mad, and if a // ...
protected final IBreadCrumbParticipant getParticipant(String componentId) { return breadCrumbPanelFactory.create(componentId, breadCrumbModel); }
protected final IBreadCrumbParticipant getParticipant(String componentId) { return breadCrumbPanelFactory.create(getParent(), componentId, breadCrumbModel); }
public void selectionChanged(IWorkbenchPart part, ISelection selection) { IWorkbenchPage workbenchPage = getViewSite().getWorkbenchWindow().getActivePage(); IWorkbenchPartReference workbenchPartReference = workbenchPage.getActivePartReference(); if ( workbenchPartReference.getId().eq...
public void selectionChanged(IWorkbenchPart part, ISelection selection) { IWorkbenchPage workbenchPage = getViewSite().getWorkbenchWindow().getActivePage(); IWorkbenchPartReference workbenchPartReference = workbenchPage.getActivePartReference(); if (workbenchPartReference == null || ...
public void fatalError(TransformerException e) { logError(e, "Fatal Error"); throw new BuildException("Fatal error during transformation using " + stylesheet, e); }
public void fatalError(TransformerException e) { logError(e, "Fatal Error"); throw new BuildException("Fatal error during transformation using " + stylesheet + ": " + e.getMessageAndLocation(), e); }
if (text != null && text.length() > offset) return text.charAt ((int)/*64*/offset); /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under th...
if (text != null && text.length() > offset) return text.charAt ((int)/*64*/offset); /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under th...
public static RGB borderOutsideRGB = new RGB (171, 168, 165); /* sizing, positioning */ int xClient, yClient; boolean onBottom = false; boolean single = false; boolean simple = true; int fixedTabHeight = SWT.DEFAULT; int tabHeight; int minChars = 20; /* item management */ CTabItem items[] = new CTabItem[...
public static RGB borderOutsideRGB = new RGB (171, 168, 165); /* sizing, positioning */ int xClient, yClient; boolean onBottom = false; boolean single = false; boolean simple = true; int fixedTabHeight = SWT.DEFAULT; int tabHeight; int minChars = 20; /* item management */ CTabItem items[] = new CTabItem[...
public static final String CHATROOM_SHOW_USER_PRESENCE = "chatroom.user.presence.visible"; }
public static final String CHATROOM_SHOW_USER_PRESENCE = "chatroom.user.presence.visible"; //$NON-NLS-1$ }
private static final long serialVersionUID = 1L; }; }; static boolean continueToOriginalDestination() { InterceptData data = InterceptData.get(); if (data != null) { data.continueOk = true; String url = RequestCycle.get().getUrlRenderer().renderUrl(data.originalUrl); RequestCycle.get().replaceCu...
private static final long serialVersionUID = 1L; }; }; static boolean continueToOriginalDestination() { InterceptData data = InterceptData.get(); if (data != null) { data.continueOk = true; String url = RequestCycle.get().getUrlRenderer().renderUrl(data.originalUrl); RequestCycle.get().replaceAl...
private Map<String, Object> createExportEndpointDescriptionProperties( ServiceReference serviceReference, Map<String, Object> overridingProperties, String[] exportedInterfaces, String[] serviceIntents, IRemoteServiceContainer rsContainer) { IContainer container = rsContainer.getContainer(); ID containe...
private Map<String, Object> createExportEndpointDescriptionProperties( ServiceReference serviceReference, Map<String, Object> overridingProperties, String[] exportedInterfaces, String[] serviceIntents, IRemoteServiceContainer rsContainer) { IContainer container = rsContainer.getContainer(); ID containe...
public ResourceBundle getResourceBundle() { try { if (resourceBundle == null) resourceBundle = ResourceBundle .getBundle("org.eclipse.ecf.example.collab.ClientPluginResources"); } catch (MissingResourceException x) { resourceBundle = null; } return resourceBundle; }
public ResourceBundle getResourceBundle() { try { if (resourceBundle == null) resourceBundle = ResourceBundle .getBundle("org.eclipse.ecf.example.collab.ClientPlugin"); } catch (MissingResourceException x) { resourceBundle = null; } return resourceBundle; }
public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; if (data.lineDashes != null) { dashes = new float[data.lineDashes.length]; System.arraycopy(data.lineDashes, 0, dashes, 0, dashes.length); } return new LineAttributes(data.lineWidth, data....
public LineAttributes getLineAttributes() { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); float[] dashes = null; if (data.lineDashes != null) { dashes = new float[data.lineDashes.length]; System.arraycopy(data.lineDashes, 0, dashes, 0, dashes.length); } return new LineAttributes(data.lineWidth, data....
private void renderAutocompleteHead(IHeaderResponse response) { response.renderJavascriptReference(AUTOCOMPLETE_JS); final String id = getComponent().getMarkupId(); String indicatorId = findIndicatorId(); if (Strings.isEmpty(indicatorId)) { indicatorId = "null"; } else { indicatorId = "'" + ind...
private void renderAutocompleteHead(IHeaderResponse response) { response.renderJavascriptReference(AUTOCOMPLETE_JS); final String id = getComponent().getMarkupId(); String indicatorId = findIndicatorId(); if (Strings.isEmpty(indicatorId)) { indicatorId = "null"; } else { indicatorId = "'" + ind...
protected final CharSequence getEventHandler() { return generateCallbackScript(new AppendingStringBuffer("wicketAjaxPost('").append( getCallbackUrl()).append( "', wicketSerializeForm(document.getElementById('" + getComponent().getMarkupId() + "',false))")); }
protected final CharSequence getEventHandler() { return generateCallbackScript(new AppendingStringBuffer("wicketAjaxPost('").append( getCallbackUrl(true)).append( "', wicketSerializeForm(document.getElementById('" + getComponent().getMarkupId() + "',false))")); }
protected CharSequence getEventHandler() { final String formId = getForm().getMarkupId(); final CharSequence url = getCallbackUrl(); AppendingStringBuffer call = new AppendingStringBuffer("wicketSubmitFormById('").append( formId).append("', '").append(url).append("', "); if (getComponent() instanceof IFo...
protected CharSequence getEventHandler() { final String formId = getForm().getMarkupId(); final CharSequence url = getCallbackUrl(true); AppendingStringBuffer call = new AppendingStringBuffer("wicketSubmitFormById('").append( formId).append("', '").append(url).append("', "); if (getComponent() instanceof...
public void testExpirePage() { tester.startPage(TestExpirePage.class); String document = tester.getServletResponse().getDocument(); assertTrue(document.contains("Click me to get an error")); AjaxLink link = (AjaxLink)tester.getComponentFromLastRenderedPage("link"); // Clear the session to remove the pages...
public void testExpirePage() { tester.startPage(TestExpirePage.class); String document = tester.getServletResponse().getDocument(); assertTrue(document.contains("Click me to get an error")); AjaxLink link = (AjaxLink)tester.getComponentFromLastRenderedPage("link"); // Clear the session to remove the pages...
private void checkWebMethods(Messager messager) { AnnotationTypeDeclaration webMethodDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.WebMethod"); //$NON-NLS-1$ Collection<Declaration> webMethodAnnotatedTypes = environment .getDeclarations...
private void checkWebMethods(Messager messager) { AnnotationTypeDeclaration webMethodDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.WebMethod"); //$NON-NLS-1$ Collection<Declaration> webMethodAnnotatedTypes = environment .getDeclarations...
public void testWebServiceSEIPresentNoWebMethodRule() { try { assertNotNull(annotation); assertEquals("WebMethod", AnnotationUtils.getAnnotationName(annotation)); IMethod method = source.findPrimaryType().getMethod("myMethod", new String[0]); assertNotNull(me...
public void testWebServiceSEIPresentNoWebMethodRule() { try { assertNotNull(annotation); assertEquals("WebMethod", AnnotationUtils.getAnnotationName(annotation)); IMethod method = source.findPrimaryType().getMethod("myMethod", new String[0]); assertNotNull(me...
package wicket.markup.resolver; /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the Li...
package wicket.markup.resolver; /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the Li...
public void modifyTestElement(TestElement element) { boolean useRaw = postContentTabbedPane.getSelectedIndex()==TAB_RAW_BODY; Arguments args; if(useRaw) { args = new Arguments(); String text = postBodyContent.getText(); /* * Textfield uses \n ...
public void modifyTestElement(TestElement element) { boolean useRaw = postContentTabbedPane.getSelectedIndex()==TAB_RAW_BODY; Arguments args; if(useRaw) { args = new Arguments(); String text = postBodyContent.getText(); /* * Textfield uses \n ...