buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void setText (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.ARROW) != 0) return; text = string; ((NSButton)view).setAttributedTitle(createString()); } int traversalCode (int key, int theEvent) { int code = super.traversalCode (key, theEvent); if ((s...
public void setText (String string) { checkWidget(); if (string == null) error (SWT.ERROR_NULL_ARGUMENT); if ((style & SWT.ARROW) != 0) return; text = string; ((NSButton)view).setAttributedTitle(createString()); } int traversalCode (int key, NSEvent theEvent) { int code = super.traversalCode (key, theEvent); if...
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 removeSelectionListener(SelectionListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook(SWT.Selection, listener); eventTable.unhook(SWT.DefaultSelection,listener); } int traversalCode (int key, int theEvent) { retur...
public void removeSelectionListener(SelectionListener listener) { checkWidget(); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook(SWT.Selection, listener); eventTable.unhook(SWT.DefaultSelection,listener); } int traversalCode (int key, NSEvent theEvent) { r...
public void showSelection () { checkWidget(); if ((style & SWT.SINGLE) != 0) { setSelection (getSelection()); } else { NSTextView widget = (NSTextView)view; widget.scrollRangeToVisible(widget.selectedRange()); } } int traversalCode (int key, int theEvent) { int bits = super.traversalCode (key, theEvent); ...
public void showSelection () { checkWidget(); if ((style & SWT.SINGLE) != 0) { setSelection (getSelection()); } else { NSTextView widget = (NSTextView)view; widget.scrollRangeToVisible(widget.selectedRange()); } } int traversalCode (int key, NSEvent theEvent) { int bits = super.traversalCode (key, theEvent...
protected final void convert() { if (type == null) { try { convertedInput = convertValue(getInputAsArray()); } catch (ConversionException e) { ValidationError error = new ValidationError(); if (e.getResourceKey() != null) { error.addMessageKey(e.getResourceKey()); } if ...
protected final void convert() { if (type == null) { try { convertedInput = convertValue(getInputAsArray()); } catch (ConversionException e) { ValidationError error = new ValidationError(); if (e.getResourceKey() != null) { error.addMessageKey(e.getResourceKey()); } if ...
public void renderHead(IHeaderResponse response) { // add YUI contributions // NOTE JavascriptResourceReference takes care of stripping comments // when in deployment (production) mode response .renderJavascriptReference(new JavascriptResourceReference(YuiLib.class, "yahoo.js")); response .renderJav...
public void renderHead(IHeaderResponse response) { // add YUI contributions // NOTE JavascriptResourceReference takes care of stripping comments // when in deployment (production) mode response .renderJavascriptReference(new JavascriptResourceReference(YuiLib.class, "yahoo.js")); response .renderJav...
public StringList getRecognizedVersions() { StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1); return null; }
public StringList getRecognizedVersions() { StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1); return list; }
protected Boolean matchErrorState(int subtype, Set<String> errorStates, SQLException ex) { Boolean recoverable = null; String errorState = ex.getSQLState(); int errorCode = ex.getErrorCode(); if (errorStates.contains(errorState)) { recoverable = Boolean.FALSE; ...
protected Boolean matchErrorState(int subtype, Set<String> errorStates, SQLException ex) { Boolean recoverable = null; String errorState = ex.getSQLState(); int errorCode = ex.getErrorCode(); if (errorStates.contains(errorState)) { recoverable = Boolean.FALSE; ...
public void showSelection () { checkWidget (); if (selectedIndex != -1) { showItem(getSelection()); } } void hideToolTip() { if(toolTipShell == null) return; for (int i = 0; i < toolTipEvents.length; i++) { removeListener(toolTipEvents[i], toolTipListener); } toolTipShell.dispose(); toolTipShell = null; ...
public void showSelection () { checkWidget (); if (selectedIndex != -1) { showItem(getSelection()); } } void hideToolTip() { if(toolTipShell == null) return; for (int i = 0; i < toolTipEvents.length; i++) { removeListener(toolTipEvents[i], toolTipListener); } toolTipShell.dispose(); toolTipShell = null; ...
public void handleEvent (Event event) { switch (event.type) { case SWT.Dispose: case SWT.KeyDown: case SWT.MouseMove: { if (tip == null) break; tip.dispose (); tip = null; label = null; break; } case SWT.MouseHover: { TableItem item = table.getItem (new Point (even...
public void handleEvent (Event event) { switch (event.type) { case SWT.Dispose: case SWT.KeyDown: case SWT.MouseMove: { if (tip == null) break; tip.dispose (); tip = null; label = null; break; } case SWT.MouseHover: { TableItem item = table.getItem (new Point (even...
public boolean isSelected (int index) { checkWidget(); return OS.IsDataBrowserItemSelected (handle, getId (index)); } int itemDataProc (int browser, int id, int property, int itemData, int setValue) { int index = getIndex (id); if (!(0 <= index && index < items.length)) return OS.noErr; switch (property) { case...
public boolean isSelected (int index) { checkWidget(); return OS.IsDataBrowserItemSelected (handle, getId (index)); } int itemDataProc (int browser, int id, int property, int itemData, int setValue) { int index = getIndex (id); if (!(0 <= index && index < items.length)) return OS.noErr; switch (property) { case...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != null) return -1; return _indexOf (null, item); } int _indexOf (TreeItem parentItem, TreeItem item) { int [] ids = parentItem =...
public int indexOf (TreeItem item) { checkWidget (); if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); if (item.parentItem != null) return -1; return _indexOf (null, item); } int _indexOf (TreeItem parentItem, TreeItem item) { int [] ids = parentItem =...
public int getTopPixel () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 0; byte [] position = new byte [ITER_SIZEOF]; GdkRectangle rect = new GdkRectangle (); OS.gtk_text_view_get_visible_rect (handle, rect); int [] lineTop = new int[1]; OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop...
public int getTopPixel () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 0; byte [] position = new byte [ITER_SIZEOF]; GdkRectangle rect = new GdkRectangle (); OS.gtk_text_view_get_visible_rect (handle, rect); int [] lineTop = new int[1]; OS.gtk_text_view_get_line_at_y (handle, position, rect.y, lineTop...
private void checkAttribute(Manifest.Attribute attribute) throws BuildException { String name = attribute.getName(); char ch = name.charAt(0); if (ch == '-' || ch == '_') { throw new BuildException("Manifest attribute names must not contain '" + ch + "' at the begin."); ...
private void checkAttribute(Manifest.Attribute attribute) throws BuildException { String name = attribute.getName(); char ch = name.charAt(0); if (ch == '-' || ch == '_') { throw new BuildException("Manifest attribute names must not start with '" + ch + "'."); } ...
public void testIllegalNameBegin() { expectBuildException("testIllegalNameInSection", "Manifest attribute names must not contain '-' at the begin."); }
public void testIllegalNameBegin() { expectBuildException("testIllegalNameInSection", "Manifest attribute names must not start with '-' at the begin."); }
private CameraManager(Context context) { this.context = context; this.configManager = new CameraConfigurationManager(context); // Camera.setOneShotPreviewCallback() has a race condition in Cupcake, so we use the older // Camera.setPreviewCallback() on 1.5 and earlier. For Donut and later, we need to...
private CameraManager(Context context) { this.context = context; this.configManager = new CameraConfigurationManager(context); // Camera.setOneShotPreviewCallback() has a race condition in Cupcake, so we use the older // Camera.setPreviewCallback() on 1.5 and earlier. For Donut and later, we need to...
private void executeChange(IProgressMonitor monitor, Change change) { if (change == null) { return; } IUndoManager manager= RefactoringCore.getUndoManager(); boolean successful = false; Change undoChange = null; try { change.initializeValidati...
private void executeChange(IProgressMonitor monitor, Change change) { if (change == null) { return; } IUndoManager manager= RefactoringCore.getUndoManager(); boolean successful = false; Change undoChange = null; try { change.initializeValidati...
private void executeChange(IProgressMonitor monitor, Change change) { if (change == null) { return; } IUndoManager manager= RefactoringCore.getUndoManager(); boolean successful = false; Change undoChange = null; try { change.initializeValidati...
private void executeChange(IProgressMonitor monitor, Change change) { if (change == null) { return; } IUndoManager manager= RefactoringCore.getUndoManager(); boolean successful = false; Change undoChange = null; try { change.initializeValidati...
public DisplaytagApplication() { getSettings().setHomePage(DisplaytagIndex.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public DisplaytagApplication() { getPages().setHomePage(DisplaytagIndex.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public EncodingsApplication() { getSettings().setHomePage(Home.class); Duration pollFreq = Duration.ONE_SECOND; getSettings().setResourcePollFrequency(pollFreq); }
public EncodingsApplication() { getPages().setHomePage(Home.class); Duration pollFreq = Duration.ONE_SECOND; getSettings().setResourcePollFrequency(pollFreq); }
public FormInputApplication() { ApplicationSettings settings = getSettings(); settings.setHomePage(FormInput.class); settings.setResourcePollFrequency(Duration.ONE_SECOND); // show ?? markers when a message resource is not found settings.setExceptionOnMissingResource(fal...
public FormInputApplication() { ApplicationSettings settings = getSettings(); getPages().setHomePage(FormInput.class); settings.setResourcePollFrequency(Duration.ONE_SECOND); // show ?? markers when a message resource is not found settings.setExceptionOnMissingResource(f...
public GuestBookApplication() { getSettings().setHomePage(Home.class); }
public GuestBookApplication() { getPages().setHomePage(Home.class); }
public GuestBook2Application() { getSettings().setHomePage(Home.class); }
public GuestBook2Application() { getPages().setHomePage(Home.class); }
public HelloWorldApplication() { getSettings().setHomePage(HelloWorld.class); }
public HelloWorldApplication() { getPages().setHomePage(HelloWorld.class); }
public ImagesApplication() { getSettings().setHomePage(Home.class); Duration pollFreq = Duration.ONE_SECOND; getSettings().setResourcePollFrequency(pollFreq); }
public ImagesApplication() { getPages().setHomePage(Home.class); Duration pollFreq = Duration.ONE_SECOND; getSettings().setResourcePollFrequency(pollFreq); }
public final void handleSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(cycle.getPageFactory().newPage(BookDetails.class, parameters)); ...
public final void handleSubmit() { final RequestCycle cycle = getRequestCycle(); PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(getPageFactory().newPage(BookDetails.class, parameters)); ...
public LibraryApplication() { getSettings().setHomePage(Home.class); getSettings().setExceptionOnMissingResource(false); }
public LibraryApplication() { getPages().setHomePage(Home.class); getSettings().setExceptionOnMissingResource(false); }
public LinkomaticApplication() { getSettings().setHomePage(Home.class); }
public LinkomaticApplication() { getPages().setHomePage(Home.class); }
public PubApplication() { getSettings().setHomePage(Home.class); }
public PubApplication() { getPages().setHomePage(Home.class); }
public SignInApplication() { getSettings().setHomePage(Home.class); }
public SignInApplication() { getPages().setHomePage(Home.class); }
public void initSettings() { getSettings().setHomePage(SpringHtmlPage.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public void initSettings() { getPages().setHomePage(SpringHtmlPage.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
protected final BookmarkablePageLink homePageLink(final String componentName) { return new BookmarkablePageLink(componentName, getApplicationSettings().getHomePage()); }
protected final BookmarkablePageLink homePageLink(final String componentName) { return new BookmarkablePageLink(componentName, getApplicationPages().getHomePage()); }
public final void handleSubmit() { // Sign the user in final String error = signIn(getUsername(), getPassword()); if (error == null) { // Get active request cycle final RequestCycle cycle = getRequestCycle(); ...
public final void handleSubmit() { // Sign the user in final String error = signIn(getUsername(), getPassword()); if (error == null) { // Get active request cycle final RequestCycle cycle = getRequestCycle(); ...
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getSettings().setHomePage(AttributeModifierComponentPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getPages().setHomePage(AttributeModifierComponentPage.class); }
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getSettings().setHomePage(IncrementalTableNavigationPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); Incremen...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getPages().setHomePage(IncrementalTableNavigationPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); Incremental...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getSettings().setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavig...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getPages().setHomePage(PagedTableNavigatorPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTableNavigato...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getSettings().setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (P...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getPages().setHomePage(PagedTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); PagedTablePage page = (Page...
public void testSimpleTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getSettings().setHomePage(SimpleTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SimpleTablePage page =...
public void testSimpleTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getPages().setHomePage(SimpleTablePage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SimpleTablePage page = (S...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getSettings().setHomePage(SortableTableHeadersPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SortableTableH...
public void testPagedTable() throws Exception { MockHttpApplication application = new MockHttpApplication(null); application.getPages().setHomePage(SortableTableHeadersPage.class); application.setupRequestAndResponse(); application.processRequestCycle(); SortableTableHead...
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getSettings().setHomePage(MockPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getPages().setHomePage(MockPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getSettings().setHomePage(WicketPanelPage.class); }
protected void setUp() throws Exception { super.setUp(); application = new MockHttpApplication(null); application.getPages().setHomePage(WicketPanelPage.class); }
protected void onSubmit() { fileUpload = fileUploadField.getFileUpload(); } }; add(form); form.setMultiPart(true); form.setMaxSize(Bytes.kilobytes(100)); form.add(new TextField<String>("text")); fileUploadField = new FileUploadField("file", new Model<FileUpload>()); fileUploadField.setRequire...
protected void onSubmit() { fileUpload = fileUploadField.getFileUpload(); } }; add(form); form.setMultiPart(true); form.setMaxSize(Bytes.kilobytes(100)); form.add(new TextField<String>("text")); fileUploadField = new FileUploadField("file", new Model<FileUpload>()); fileUploadField.setRequire...
protected RecorderEntry getRecorder(String name, Project proj) throws BuildException { Object o = recorderEntries.get(name); RecorderEntry entry; if (o == null) { // create a recorder entry try { entry = new RecorderEntry(name); ...
protected RecorderEntry getRecorder(String name, Project proj) throws BuildException { Object o = recorderEntries.get(name); RecorderEntry entry; if (o == null) { // create a recorder entry try { entry = new RecorderEntry(name); ...
public Control getCursorControl () { checkDevice(); int[] x = new int[1], y = new int[1]; int /*long*/ handle = 0; int /*long*/ [] user_data = new int /*long*/ [1]; int /*long*/ window = OS.gdk_window_at_pointer (x,y); if (window != 0) { OS.gdk_window_get_user_data (window, user_data); handle = user_data [0];...
public Control getCursorControl () { checkDevice(); int[] x = new int[1], y = new int[1]; int /*long*/ handle = 0; int /*long*/ [] user_data = new int /*long*/ [1]; int /*long*/ window = OS.gdk_window_at_pointer (x,y); if (window != 0) { OS.gdk_window_get_user_data (window, user_data); handle = user_data [0];...
protected int compareDates(int[] date1, int[] date2) { if ( date1[utc]==date2[utc] ) { return (date1[M]>=date2[M])?(date1[M]>date2[M])?-1:0:1; } if ( date1[utc]=='Z' || date2[utc]=='Z' ) { if ( date1[M]==date2[M] ) { //--05--Z and --05-- ...
protected int compareDates(int[] date1, int[] date2) { if ( date1[utc]==date2[utc] ) { return (date1[M]>=date2[M])?(date1[M]>date2[M])?1:0:-1; } if ( date1[utc]=='Z' || date2[utc]=='Z' ) { if ( date1[M]==date2[M] ) { //--05--Z and --05-- ...
public void testOutjarDeletedOnError () { String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName}; Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,"jar1.Parent")); MessageSpec spec = new MessageSpec(null,newMessageList(error)); Co...
public void xtestOutjarDeletedOnError () { String[] args = new String[] {"-aspectpath", aspectjarName, "-injars", injarName, "-outjar", outjarName}; Message error = new Message(WeaverMessages.format(WeaverMessages.CANT_FIND_TYPE,"jar1.Parent")); MessageSpec spec = new MessageSpec(null,newMessageList(error)); C...
protected boolean handleMultiPart() { if (isMultiPart() && !((WebRequest)getRequest()).isAjax()) { // Change the request to a multipart web request so parameters are // parsed out correctly try { final WebRequest multipartWebRequest = ((WebRequest)getRequest()).newMultipartWebRequest(getMaxSize())...
protected boolean handleMultiPart() { if (isMultiPart()) { // Change the request to a multipart web request so parameters are // parsed out correctly try { final WebRequest multipartWebRequest = ((WebRequest)getRequest()).newMultipartWebRequest(getMaxSize()); getRequestCycle().setRequest(multi...
public void execute(Project project) throws BuildException { final String classname = javaCommand.getExecutable(); AntClassLoader loader = null; try { if (sysProperties != null) { sysProperties.setSystem(); } Class target = null; ...
public void execute(Project project) throws BuildException { final String classname = javaCommand.getExecutable(); AntClassLoader loader = null; try { if (sysProperties != null) { sysProperties.setSystem(); } Class<?> target = null; ...
public void execute () throws BuildException { if (addproperty != null && getProject().getProperty(addproperty) != null) { log("skipping " + getTaskName() + " as property " + addproperty + " has already been set."); return; } InputRequest ...
public void execute () throws BuildException { if (addproperty != null && getProject().getProperty(addproperty) != null) { log("skipping " + getTaskName() + " as property " + addproperty + " has already been set."); return; } InputRequest ...
public void execute() { Message savedMessage = message; try { Mailer mailer = null; // prepare for the auto select mechanism boolean autoFound = false; // try MIME format if (encoding.equals(MIME) || (encoding.equals(AUTO...
public void execute() { Message savedMessage = message; try { Mailer mailer = null; // prepare for the auto select mechanism boolean autoFound = false; // try MIME format if (encoding.equals(MIME) || (encoding.equals(AUTO...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { log.info(getLabel()+" "+getFilename()+" "+getUsername()+" "+getPassword()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getName());//Use the test element name for the la...
public SampleResult sample(Entry e)// Entry tends to be ignored ... { log.debug(getLabel()+" "+getFilename()+" "+getUsername()+" "+getPassword()); SampleResult res = new SampleResult(); boolean isSuccessful = false; res.setSampleLabel(getName());//Use the test element name for the l...
public boolean signIn(final String username, final String password) { return true; } }; this.panel.setPersistent(true); this.form = (Form)panel.get("signInForm"); final ICrypt crypt = application.getSecuritySettings().getCryptFactory().newCrypt(); final String encryptedPassword = crypt.encrypt(...
public boolean signIn(final String username, final String password) { return true; } }; this.panel.setPersistent(true); this.form = (Form)panel.get("signInForm"); final ICrypt crypt = application.getSecuritySettings().getCryptFactory().newCrypt(); final String encryptedPassword = crypt.encryptU...
public CharSequence encodeURL(CharSequence url) { // Get the crypt implementation from the application ICrypt urlCrypt = Application.get().getSecuritySettings().getCryptFactory().newCrypt(); if (urlCrypt != null) { // The url must have a query string, otherwise keep the url unchanged final int ...
public CharSequence encodeURL(CharSequence url) { // Get the crypt implementation from the application ICrypt urlCrypt = Application.get().getSecuritySettings().getCryptFactory().newCrypt(); if (urlCrypt != null) { // The url must have a query string, otherwise keep the url unchanged final int ...
private static Vector jrePackages; static { // Determine the Java version by looking at available classes // java.net.Proxy was introduced in JDK 1.5 // java.lang.CharSequence was introduced in JDK 1.4 // java.lang.StrictMath was introduced in JDK 1.3 // java.lang.Thre...
private static Vector jrePackages; static { // Determine the Java version by looking at available classes // java.net.Proxy was introduced in JDK 1.5 // java.lang.CharSequence was introduced in JDK 1.4 // java.lang.StrictMath was introduced in JDK 1.3 // java.lang.Thre...
public FileEditor(PropertyDescriptor descriptor) { if (descriptor == null) { throw new NullPointerException("Descriptor must not be null"); } // Create a button to trigger the file chooser: JButton button = new JButton("Browse..."); button.addActionListener(this)...
public FileEditor(PropertyDescriptor descriptor) { if (descriptor == null) { throw new IllegalArgumentException("Descriptor must not be null"); } // Create a button to trigger the file chooser: JButton button = new JButton("Browse..."); button.addActionListener(t...
private void checkMessagesForLanguage(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageBundle = bundlePath+"_"+l...
private void checkMessagesForLanguage(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageBundle = bundlePath+"_"+l...
public static Program [] getPrograms () { NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { Vector vector = new Vector(); NSWorkspace workspace = NSWorkspace.sharedWorkspace(); NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirecto...
public static Program [] getPrograms () { NSAutoreleasePool pool = (NSAutoreleasePool) new NSAutoreleasePool().alloc().init(); try { Vector vector = new Vector(); NSWorkspace workspace = NSWorkspace.sharedWorkspace(); NSArray array = new NSArray(OS.NSSearchPathForDirectoriesInDomains(OS.NSAllApplicationsDirecto...
public static final String DEFAULT_COMM_NAME = "tcpclient";
public static final void main(String[] args) throws Exception { ISharedObjectContainerConfig config = new SOContainerConfig(IDFactory .makeGUID()); TCPClientSOContainer container = new TCPClientSOContainer(config); // now join group ID serverID = IDFactory.makeStringI...
class AppletModel implements Serializable /* * $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...
class AppletModel implements Serializable /* * $Id$ * $Revision$ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of...
public Number call() throws Exception { return executor.executeDelete(query, params); } }
public Number call() throws Exception { return executor.executeUpdate(query, params); } }
public static void setPage(final RequestCycle cycle, final Book book) { PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(BookDetails.class, parameters); cycle.setRedirect(true); }
public static void setPage(final RequestCycle cycle, final Book book) { PageParameters parameters = new PageParameters(); parameters.put("id", new Long(book.getId())); cycle.setPage(cycle.getPageFactory().newPage(BookDetails.class, parameters)); cycle.setRedirect(true); }
public void handleEvent(Event e) { ballRotSpeed = ballRotSlider.getSelection(); } }); } /** * Draws the mirror */ void createMirror() { GL.glNewList(LIST_INDEX_MIRROR, GL.GL_COMPILE); GL.glDisable(GL.GL_TEXTURE_2D); GL.glColor4f(1.0f, 1.0f, 1.0f, 0.4f); GL.glNormal3f(0.0f, 0.0f, 1.0f); GL...
public void handleEvent(Event e) { ballRotSpeed = ballRotSlider.getSelection(); } }); } /** * Draws the mirror */ void createMirror() { GL.glNewList(LIST_INDEX_MIRROR, GL.GL_COMPILE); GL.glDisable(GL.GL_TEXTURE_2D); GL.glColor4f(1.0f, 1.0f, 1.0f, 0.4f); GL.glNormal3f(0.0f, 0.0f, 1.0f); GL...
public void handleEvent(Event e) { size = ((float) sizeSlider.getSelection()) / 100; } }); } /** * @see OpenGLTab#dispose() */ void dispose() { super.dispose(); GLU.gluDeleteQuadric(quadratic); } /** * @see OpenGLTab#getSleepLength() */ int getSleepLength() { return SLEEP_LENGTH; } ...
public void handleEvent(Event e) { size = ((float) sizeSlider.getSelection()) / 100; } }); } /** * @see OpenGLTab#dispose() */ void dispose() { super.dispose(); GLU.gluDeleteQuadric(quadratic); } /** * @see OpenGLTab#getSleepLength() */ int getSleepLength() { return SLEEP_LENGTH; } ...
public void handleEvent(Event e) { zPos = zMove.getSelection() - 30; } }); } /** * @see OpenGLTab#getSleepLength() */ int getSleepLength() { return SLEEP_LENGTH; } /** * @see OpenGLTab#getTabText() */ String getTabText() { return "Texture"; } /** * @see OpenGLTab#init() */ void ...
public void handleEvent(Event e) { zPos = zMove.getSelection() - 30; } }); } /** * @see OpenGLTab#getSleepLength() */ int getSleepLength() { return SLEEP_LENGTH; } /** * @see OpenGLTab#getTabText() */ String getTabText() { return "Texture"; } /** * @see OpenGLTab#init() */ void ...
protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException { // If no webxml file is specified, it's an error. if (deploymentDescriptor == null) { throw new BuildException("appxml attribute is required", location); } s...
protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException { // If no webxml file is specified, it's an error. if (deploymentDescriptor == null && !isInUpdateMode()) { throw new BuildException("appxml attribute is required", location); ...
protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException { // If no webxml file is specified, it's an error. if (deploymentDescriptor == null) { throw new BuildException("webxml attribute is required", location); } s...
protected void initZipOutputStream(ZipOutputStream zOut) throws IOException, BuildException { // If no webxml file is specified, it's an error. if (deploymentDescriptor == null && !isInUpdateMode()) { throw new BuildException("webxml attribute is required", location); ...
protected void loadFile (File file) throws BuildException { Properties props = new Properties(); log("Loading " + file.getAbsolutePath(), Project.MSG_VERBOSE); try { if (file.exists()) { FileInputStream fis = new FileInputStream(file); try { ...
protected void loadFile (File file) throws BuildException { Properties props = new Properties(); log("Loading " + file.getAbsolutePath(), Project.MSG_VERBOSE); try { if (file.exists()) { FileInputStream fis = new FileInputStream(file); try { ...
public void testSetGetAsText() throws Exception { ComboStringEditor e = new ComboStringEditor(); testSetGetAsText(e, "any string"); testSetGetAsText(e, ""); testSetGetAsText(e, null); testSetGetAsText(e, "${var}"); // Check "Undefined" do...
public void testSetGetAsText() throws Exception { ComboStringEditor e = new ComboStringEditor(); testSetGetAsText(e, "any string"); testSetGetAsText(e, ""); testSetGetAsText(e, null); testSetGetAsText(e, "${var}"); // Check "Undefined" do...
public static final int /*long*/ g_file_info_get_content_type (int /*long*/ info) { lock.lock(); try { return g_file_info_get_content_type (info); } finally { lock.unlock(); } }
public static final int /*long*/ g_file_info_get_content_type (int /*long*/ info) { lock.lock(); try { return _g_file_info_get_content_type (info); } finally { lock.unlock(); } }
public static final int JAVA_VERSION, SWT_VERSION; static final String SEPARATOR; /* 64-bit support */ static final boolean IS_64 = 0x1FFFFFFFFL == (int /*long*/)0x1FFFFFFFFL; static final String SUFFIX_64 = "-64"; //$NON-NLS-1$
public static final int JAVA_VERSION, SWT_VERSION; static final String SEPARATOR; /* 64-bit support */ static /*final*/ boolean IS_64 = 0x1FFFFFFFFL == (int /*long*/)0x1FFFFFFFFL; static final String SUFFIX_64 = "-64"; //$NON-NLS-1$
public void testJPQLLock() { EntityManager em = currentEntityManager(); Query q = em.createQuery("SELECT o FROM Entity1 o " + "WHERE o.stringField = 'testSimple'"); try { q.setLockMode(LockModeType.NONE); assertEquals("Verify NONE after set", LockModeType.NONE, q.get...
public void testJPQLLock() { EntityManager em = currentEntityManager(); Query q = em.createQuery("SELECT o FROM Entity1 o WHERE o.stringField = 'testSimple'"); try { q.setLockMode(LockModeType.NONE); assertEquals("Verify NONE after set", LockModeType.NONE, q.getLockM...
public IProgramElement findElementForLabel( IProgramElement parent, IProgramElement.Kind kind, String label) { for (Iterator it = parent.getChildren().iterator(); it.hasNext(); ) { IProgramElement node = (IProgramElement)it.next(); if (node.getKind() == kind && label.equals(node.toLabelString())) { ...
public IProgramElement findElementForLabel( IProgramElement parent, IProgramElement.Kind kind, String label) { for (Iterator it = parent.getChildren().iterator(); it.hasNext(); ) { IProgramElement node = (IProgramElement)it.next(); if (node.getKind() == kind && label.equals(node.toLabelString())) { ...
public void maybeConfigure(Project p, boolean configureChildren) throws BuildException { String id = null; if (proxyConfigured) { return; } // Configure the object Object target = (wrappedObject instanceof TaskAdapter) ? ((TaskAdapter) wr...
public void maybeConfigure(Project p, boolean configureChildren) throws BuildException { String id = null; if (proxyConfigured) { return; } // Configure the object Object target = (wrappedObject instanceof TaskAdapter) ? ((TaskAdapter) wr...
public String getText() { return text.toString(); }
public String getText() { return text.substring(0); }
private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog) throws BuildException { CommandlineJava cmd = (CommandlineJava) commandline.clone(); cmd.setClassname("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"); cmd.createArgument().setValue(test.getName())...
private int executeAsForked(JUnitTest test, ExecuteWatchdog watchdog) throws BuildException { CommandlineJava cmd = (CommandlineJava) commandline.clone(); cmd.setClassname("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"); cmd.createArgument().setValue(test.getName())...
public void setImage (Image image) { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return; super.setImage (image); if (OS.IsWinCE) { if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) { int /*long*/ hwndCB = parent.hwndCB; TBBUTTONINFO info = new TBBUTTONINFO (); info.cbSize = TBBUTTONINFO.sizeof; i...
public void setImage (Image image) { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return; super.setImage (image); if (OS.IsWinCE) { if ((OS.IsPPC || OS.IsSP) && parent.hwndCB != 0) { int /*long*/ hwndCB = parent.hwndCB; TBBUTTONINFO info = new TBBUTTONINFO (); info.cbSize = TBBUTTONINFO.sizeof; i...
public void add(SampleResult res) { if (childSamples.isSelected()) { SampleResult[] subResults = res.getSubResults(); if (subResults.length > 0) { for (SampleResult sr : subResults) { add(sr); } return; }...
public void add(SampleResult res) { if (childSamples.isSelected()) { SampleResult[] subResults = res.getSubResults(); if (subResults.length > 0) { for (SampleResult sr : subResults) { add(sr); } return; }...
public WebFrame webFrame() { int result = OS.objc_msgSend(this.id, OS.sel_webFrame); return result != 0 ? new WebFrame(result) : null; }
public WebFrame webFrame() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_webFrame); return result != 0 ? new WebFrame(result) : null; }
public int detail() { return OS.objc_msgSend(this.id, OS.sel_detail); }
public int detail() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_detail); }
public NSAppleEventDescriptor initListDescriptor() { int result = OS.objc_msgSend(this.id, OS.sel_initListDescriptor); return result == this.id ? this : (result != 0 ? new NSAppleEventDescriptor(result) : null); }
public NSAppleEventDescriptor initListDescriptor() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initListDescriptor); return result == this.id ? this : (result != 0 ? new NSAppleEventDescriptor(result) : null); }
public NSString title() { int result = OS.objc_msgSend(this.id, OS.sel_title); return result != 0 ? new NSString(result) : null; }
public NSString title() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_title); return result != 0 ? new NSString(result) : null; }
public int systemVersion() { return OS.objc_msgSend(this.id, OS.sel_systemVersion); }
public int systemVersion() { return (int)/*64*/OS.objc_msgSend(this.id, OS.sel_systemVersion); }
public static NSColorSpace deviceRGBColorSpace() { int result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceRGBColorSpace); return result != 0 ? new NSColorSpace(result) : null; }
public static NSColorSpace deviceRGBColorSpace() { int /*long*/ result = OS.objc_msgSend(OS.class_NSColorSpace, OS.sel_deviceRGBColorSpace); return result != 0 ? new NSColorSpace(result) : null; }
public id nextObject() { int result = OS.objc_msgSend(this.id, OS.sel_nextObject); return result != 0 ? new id(result) : null; }
public id nextObject() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_nextObject); return result != 0 ? new id(result) : null; }
public static NSInputManager currentInputManager() { int result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager); return result != 0 ? new NSInputManager(result) : null; }
public static NSInputManager currentInputManager() { int /*long*/ result = OS.objc_msgSend(OS.class_NSInputManager, OS.sel_currentInputManager); return result != 0 ? new NSInputManager(result) : null; }
public static NSData archivedDataWithRootObject(id rootObject) { int result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_, rootObject != null ? rootObject.id : 0); return result != 0 ? new NSData(result) : null; }
public static NSData archivedDataWithRootObject(id rootObject) { int /*long*/ result = OS.objc_msgSend(OS.class_NSKeyedArchiver, OS.sel_archivedDataWithRootObject_, rootObject != null ? rootObject.id : 0); return result != 0 ? new NSData(result) : null; }
public static id unarchiveObjectWithData(NSData data) { int result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_, data != null ? data.id : 0); return result != 0 ? new id(result) : null; }
public static id unarchiveObjectWithData(NSData data) { int /*long*/ result = OS.objc_msgSend(OS.class_NSKeyedUnarchiver, OS.sel_unarchiveObjectWithData_, data != null ? data.id : 0); return result != 0 ? new id(result) : null; }
public NSMutableString mutableString() { int result = OS.objc_msgSend(this.id, OS.sel_mutableString); return result != 0 ? new NSMutableString(result) : null; }
public NSMutableString mutableString() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_mutableString); return result != 0 ? new NSMutableString(result) : null; }
public void addIndex(int value) { OS.objc_msgSend(this.id, OS.sel_addIndex_, value); } }
public void addIndex(int /*long*/ value) { OS.objc_msgSend(this.id, OS.sel_addIndex_, value); } }
public static NSSet set() { int result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_set); return result != 0 ? new NSMutableSet(result) : null; }
public static NSSet set() { int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableSet, OS.sel_set); return result != 0 ? new NSMutableSet(result) : null; }
public static NSURLRequest requestWithURL(NSURL URL) { int result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0); return result != 0 ? new NSMutableURLRequest(result) : null; }
public static NSURLRequest requestWithURL(NSURL URL) { int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableURLRequest, OS.sel_requestWithURL_, URL != null ? URL.id : 0); return result != 0 ? new NSMutableURLRequest(result) : null; }
public id object() { int result = OS.objc_msgSend(this.id, OS.sel_object); return result != 0 ? new id(result) : null; }
public id object() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_object); return result != 0 ? new id(result) : null; }
public static NSOpenGLContext currentContext() { int result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext); return result != 0 ? new NSOpenGLContext(result) : null; }
public static NSOpenGLContext currentContext() { int /*long*/ result = OS.objc_msgSend(OS.class_NSOpenGLContext, OS.sel_currentContext); return result != 0 ? new NSOpenGLContext(result) : null; }
public id initWithAttributes(int[] attribs) { int result = OS.objc_msgSend(this.id, OS.sel_initWithAttributes_, attribs); return result != 0 ? new id(result) : null; }
public id initWithAttributes(int[] attribs) { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initWithAttributes_, attribs); return result != 0 ? new id(result) : null; }
public NSArray recentSearches() { int result = OS.objc_msgSend(this.id, OS.sel_recentSearches); return result != 0 ? new NSArray(result) : null; }
public NSArray recentSearches() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_recentSearches); return result != 0 ? new NSArray(result) : null; }
public id initWithIdentifier(id identifier) { int result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0); return result != 0 ? new id(result) : null; }
public id initWithIdentifier(id identifier) { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_initWithIdentifier_, identifier != null ? identifier.id : 0); return result != 0 ? new id(result) : null; }
public NSColor textColor() { int result = OS.objc_msgSend(this.id, OS.sel_textColor); return result != 0 ? new NSColor(result) : null; }
public NSColor textColor() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_textColor); return result != 0 ? new NSColor(result) : null; }
public NSArray paragraphs() { int result = OS.objc_msgSend(this.id, OS.sel_paragraphs); return result != 0 ? new NSArray(result) : null; }
public NSArray paragraphs() { int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_paragraphs); return result != 0 ? new NSArray(result) : null; }
public static NSTimeZone defaultTimeZone() { int result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone); return result != 0 ? new NSTimeZone(result) : null; }
public static NSTimeZone defaultTimeZone() { int /*long*/ result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone); return result != 0 ? new NSTimeZone(result) : null; }
public float baselineOffsetInLayoutManager(NSLayoutManager layoutMgr, int glyphIndex) { return (float)OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_glyphIndex_, layoutMgr != null ? layoutMgr.id : 0, glyphIndex); } }
public float /*double*/ baselineOffsetInLayoutManager(NSLayoutManager layoutMgr, int /*long*/ glyphIndex) { return (float)OS.objc_msgSend_fpret(this.id, OS.sel_baselineOffsetInLayoutManager_glyphIndex_, layoutMgr != null ? layoutMgr.id : 0, glyphIndex); } }