buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void execute() throws BuildException { if( file == null ) { log( message, logLevel ); } else { FileWriter out = null; try { out = new FileWriter( file.getAbsolutePath(), append ); ...
public void execute() throws BuildException { if( file == null ) { log( message, logLevel ); } else { FileWriter out = null; try { out = new FileWriter( file.getAbsolutePath(), append ); ...
public void execute() throws BuildException { boolean isFiltersFromFile = filtersFile != null && token == null && value == null; boolean isSingleFilter = filtersFile == null && token != null && value != null; if( !isFiltersFromFile && !isSingleFilter ) { thro...
public void execute() throws BuildException { boolean isFiltersFromFile = filtersFile != null && token == null && value == null; boolean isSingleFilter = filtersFile == null && token != null && value != null; if( !isFiltersFromFile && !isSingleFilter ) { thro...
protected void extract() { if( source.lastModified() > dest.lastModified() ) { log( "Expanding " + source.getAbsolutePath() + " to " + dest.getAbsolutePath() ); FileOutputStream out = null; GZIPInputStream zIn = null; FileInputStr...
protected void extract() { if( source.lastModified() > dest.lastModified() ) { log( "Expanding " + source.getAbsolutePath() + " to " + dest.getAbsolutePath() ); FileOutputStream out = null; GZIPInputStream zIn = null; FileInputStr...
protected void pack() { GZIPOutputStream zOut = null; try { zOut = new GZIPOutputStream( new FileOutputStream( zipFile ) ); zipFile( source, zOut ); } catch( IOException ioe ) { String msg = "Problem creating gzip " + ioe.getMes...
protected void pack() { GZIPOutputStream zOut = null; try { zOut = new GZIPOutputStream( new FileOutputStream( zipFile ) ); zipFile( source, zOut ); } catch( IOException ioe ) { String msg = "Problem creating gzip " + ioe.getMes...
public void execute() throws BuildException { try { validate(); long sleepTime = getSleepTime(); log( "sleeping for " + sleepTime + " milliseconds", Project.MSG_VERBOSE ); doSleep( sleepTime ); } catch( Excep...
public void execute() throws BuildException { try { validate(); long sleepTime = getSleepTime(); log( "sleeping for " + sleepTime + " milliseconds", Project.MSG_VERBOSE ); doSleep( sleepTime ); } catch( Excep...
public boolean execute() throws BuildException { attributes.log( "Using modern compiler", Project.MSG_VERBOSE ); Commandline cmd = setupModernJavacCommand(); // Use reflection to be able to build on all JDKs >= 1.1: try { Class c = Class.forName( "com...
public boolean execute() throws BuildException { attributes.log( "Using modern compiler", Project.MSG_VERBOSE ); Commandline cmd = setupModernJavacCommand(); // Use reflection to be able to build on all JDKs >= 1.1: try { Class c = Class.forName( "com...
private void checkParameters() throws BuildException { if( !checkParam( manifestFile ) ) { throw new BuildException( "file token must not be null.", location ); } }
private void checkParameters() throws BuildException { if( !checkParam( manifestFile ) ) { throw new BuildException( "file token must not be null." ); } }
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // build the command line from what we got the format is // ccm co /t .. files // as specified in the CLEARTOOL.EXE he...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // build the command line from what we got the format is // ccm co /t .. files // as specified in the CLEARTOOL.EXE he...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // build the command line from what we got the format // as specified in the CCM.EXE help commandLine.setExecutable( g...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // build the command line from what we got the format // as specified in the CCM.EXE help commandLine.setExecutable( g...
protected int run( Commandline cmd, ExecuteStreamHandler handler ) { try { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); exe.setWorkingDirectory( getProject().getBaseDir() ); exe.setCommandline( cmd.getCommandline() ); ...
protected int run( Commandline cmd, ExecuteStreamHandler handler ) { try { Execute exe = new Execute( handler ); exe.setAntRun( getProject() ); exe.setWorkingDirectory( getProject().getBaseDir() ); exe.setCommandline( cmd.getCommandline() ); ...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
public void execute() throws BuildException { Commandline commandLine = new Commandline(); Project aProj = getProject(); int result = 0; // Default the viewpath to basedir if it is not specified if( getViewPath() == null ) { setViewPath( aProj...
protected int run( Commandline cmd ) { try { Project aProj = getProject(); Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); exe.setAntRun( aProj ); exe.setWorkingDirectory( aProj.getBaseDir() ); ...
protected int run( Commandline cmd ) { try { Project aProj = getProject(); Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); exe.setAntRun( aProj ); exe.setWorkingDirectory( aProj.getBaseDir() ); ...
public void execute() throws BuildException { if( _srcDir == null ) _srcDir = project.resolveFile( "." ); NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); command.setFailOnError( getFailFailOnError() ); //DEBUG helper command.setTrace...
public void execute() throws BuildException { if( _srcDir == null ) _srcDir = resolveFile( "." ); NetCommand command = new NetCommand( this, "CSC", csc_exe_name ); command.setFailOnError( getFailFailOnError() ); //DEBUG helper command.setTraceCommandL...
public void execute() throws BuildException { if( _srcDir == null ) _srcDir = project.resolveFile( "." ); //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); String[] dependencies = scanner.getIncludedFiles(); log...
public void execute() throws BuildException { if( _srcDir == null ) _srcDir = resolveFile( "." ); //get dependencies list. DirectoryScanner scanner = super.getDirectoryScanner( _srcDir ); String[] dependencies = scanner.getIncludedFiles(); log( "assem...
private void addFilesToImport( ImportCodeSpec spec, boolean doImport, Vector files, String fileType, StringBuffer summaryLog ) { if( doImport ) { String[] fileArr = new String[fi...
private void addFilesToImport( ImportCodeSpec spec, boolean doImport, Vector files, String fileType, StringBuffer summaryLog ) { if( doImport ) { String[] fileArr = new String[fi...
public void execute() throws BuildException { //Be sure everything has been set. if( outfile == null ) { throw new BuildException( "outfile attribute is required! Please set." ); } if( !haveAddFiles() && !haveMergeFiles() ) { throw ...
public void execute() throws BuildException { //Be sure everything has been set. if( outfile == null ) { throw new BuildException( "outfile attribute is required! Please set." ); } if( !haveAddFiles() && !haveMergeFiles() ) { throw ...
public void execute() throws BuildException { if( !destinationDirectory.isDirectory() ) { throw new BuildException( "destination directory " + destinationDirectory.getPath() + " is not valid" ); } if( !sourceDirectory.isDirectory() ) {...
public void execute() throws BuildException { if( !destinationDirectory.isDirectory() ) { throw new BuildException( "destination directory " + destinationDirectory.getPath() + " is not valid" ); } if( !sourceDirectory.isDirectory() ) {...
public boolean execute() throws BuildException { getJspc().log( "Using jasper compiler", Project.MSG_VERBOSE ); Commandline cmd = setupJasperCommand(); try { // Create an instance of the compiler, redirecting output to // the project log ...
public boolean execute() throws BuildException { getJspc().log( "Using jasper compiler", Project.MSG_VERBOSE ); Commandline cmd = setupJasperCommand(); try { // Create an instance of the compiler, redirecting output to // the project log ...
protected void checkOptions() throws BuildException { // do some validation first if( metamataHome == null || !metamataHome.exists() ) { throw new BuildException( "'metamatahome' must point to Metamata home directory." ); } metamataHome = project.resol...
protected void checkOptions() throws BuildException { // do some validation first if( metamataHome == null || !metamataHome.exists() ) { throw new BuildException( "'metamatahome' must point to Metamata home directory." ); } metamataHome = resolveFile( ...
protected ExecuteStreamHandler createStreamHandler() throws BuildException { ExecuteStreamHandler handler = null; // if we didn't specify a file, then use a screen report if( outFile == null ) { handler = new LogStreamHandler( this, Project.MSG_INFO, Project.M...
protected ExecuteStreamHandler createStreamHandler() throws BuildException { ExecuteStreamHandler handler = null; // if we didn't specify a file, then use a screen report if( outFile == null ) { handler = new LogStreamHandler( this, Project.MSG_INFO, Project.M...
protected void execP4Command( String command, P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline(); commandline.setExecutable( "p4" ); //Check API for these - it's how CVS does it... if( P4Port != ...
protected void execP4Command( String command, P4Handler handler ) throws BuildException { try { Commandline commandline = new Commandline(); commandline.setExecutable( "p4" ); //Check API for these - it's how CVS does it... if( P4Port != ...
public void start() throws BuildException { try { //First write any output to P4 if( p4input != null && p4input.length() > 0 && os != null ) { os.write( p4input.getBytes() ); os.flush(); os.close(); ...
public void start() throws BuildException { try { //First write any output to P4 if( p4input != null && p4input.length() > 0 && os != null ) { os.write( p4input.getBytes() ); os.flush(); os.close(); ...
protected int run( Commandline cmd ) { try { Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); // If location of ss.ini is specified we need to set the // environment-variable SSDIR ...
protected int run( Commandline cmd ) { try { Execute exe = new Execute( new LogStreamHandler( this, Project.MSG_INFO, Project.MSG_WARN ) ); // If location of ss.ini is specified we need to set the // environment-variable SSDIR ...
public FileNameMapper getImplementation() throws BuildException { if( isReference() ) { return getRef().getImplementation(); } if( type == null && classname == null ) { throw new BuildException( "one of the attributes type or classname is ...
public FileNameMapper getImplementation() throws BuildException { if( isReference() ) { return getRef().getImplementation(); } if( type == null && classname == null ) { throw new BuildException( "one of the attributes type or classname is ...
protected Pattern getCompiledPattern( int options ) throws BuildException { try { // compute the compiler options based on the input options first Pattern p = compiler.compile( pattern, getCompilerOptions( options ) ); return p; } catch...
protected Pattern getCompiledPattern( int options ) throws BuildException { try { // compute the compiler options based on the input options first Pattern p = compiler.compile( pattern, getCompilerOptions( options ) ); return p; } catch...
public boolean matches( String input, int options ) throws BuildException { try { Pattern p = getCompiledPattern( options ); return p.matcher( input ).find(); } catch( Exception e ) { throw new BuildException( e ); } ...
public boolean matches( String input, int options ) throws BuildException { try { Pattern p = getCompiledPattern( options ); return p.matcher( input ).find(); } catch( Exception e ) { throw new BuildException( "Error", e ); ...
public RegexpMatcher newRegexpMatcher( Project p ) throws BuildException { String systemDefault = null; if( p == null ) { systemDefault = System.getProperty( "ant.regexp.regexpimpl" ); } else { systemDefault = ( String )p.getPropert...
public RegexpMatcher newRegexpMatcher( Project p ) throws BuildException { String systemDefault = null; if( p == null ) { systemDefault = System.getProperty( "ant.regexp.regexpimpl" ); } else { systemDefault = ( String )p.getPropert...
public void reset(){ fName = null; fTargetNamespace = null; fBaseType = null; fDerivedBy = XSConstants.DERIVATION_RESTRICTION; fFinal = XSConstants.DERIVATION_NONE; fBlock = XSConstants.DERIVATION_NONE; fMiscFlags = 0; // reset attribute group ...
public void reset(){ fName = null; fTargetNamespace = null; fBaseType = null; fDerivedBy = XSConstants.DERIVATION_RESTRICTION; fFinal = XSConstants.DERIVATION_NONE; fBlock = XSConstants.DERIVATION_NONE; fMiscFlags = 0; // reset attribute group ...
public Component getLazyLoadComponent(String markupId) { return new Label(markupId, "lazy panel test").setRenderBodyOnly(true); } }; } }); tester.startPage(dummyPanelPage); tester.assertLabel( "panel:content", "<img alt=\"Loading...\" src=\"resource/org.apache.wicket.ajax.Abstra...
public Component getLazyLoadComponent(String markupId) { return new Label(markupId, "lazy panel test").setRenderBodyOnly(true); } }; } }); tester.startPage(dummyPanelPage); tester.assertLabel( "panel:content", "<img alt=\"Loading...\" src=\"./resource/org.apache.wicket.ajax.Abst...
public ValueMap(final Map map) { putAll(map); }
public ValueMap(final Map map) { super.putAll(map); }
public void update () { checkWidget(); update (false); } void update (boolean all) { // checkWidget(); if (display.inPaint) return; //TODO - not all view.displayIfNeeded (); }
public void update () { checkWidget(); update (false); } void update (boolean all) { // checkWidget(); if (display.isPainting.containsObject(view)) return; //TODO - not all view.displayIfNeeded (); }
public void testDeleteIsNotDetectedOnCleanRefreshWithoutLockWithDataCache() { verifyDeleteDetectionOnRefresh(WITH_DATACACHE, !DIRTY, NOLOCK, NO_ERROR); }
public void testDeleteIsNotDetectedOnCleanRefreshWithoutLockWithDataCache() { verifyDeleteDetectionOnRefresh(WITH_DATACACHE, !DIRTY, NOLOCK, ENTITY_NOT_FOUND_ERROR); }
public Cursor(Device device, int style) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; int shape = 0; switch (style) { case SWT.CURSOR_APPSTARTING: break; case SWT.CURSOR_ARROW: shape = OS.GDK_LEFT_PTR; break; case SWT.CURSOR...
public Cursor(Device device, int style) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; int shape = 0; switch (style) { case SWT.CURSOR_APPSTARTING: break; case SWT.CURSOR_ARROW: shape = OS.GDK_LEFT_PTR; break; case SWT.CURSOR...
public Pattern(Device device, float x1, float y1, float x2, float y2, Color color1, int alpha1, Color color2, int alpha2) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (color1 == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (color1.isDisposed()) SWT.er...
public Pattern(Device device, float x1, float y1, float x2, float y2, Color color1, int alpha1, Color color2, int alpha2) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (color1 == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (color1.isDisposed()) SWT.er...
public void testRenderHomePage_2() throws Exception { tester.setupRequestAndResponse(); executeTest(SimpleTestPage.class, "SimpleTestPageExpectedResult.html"); WebRequestCycle cycle = tester.createRequestCycle(); Page page = tester.getLastRenderedPage(); tester.executeBehavior(((SimpleTestPanel)page.get("t...
public void testRenderHomePage_2() throws Exception { tester.setupRequestAndResponse(true); executeTest(SimpleTestPage.class, "SimpleTestPageExpectedResult.html"); WebRequestCycle cycle = tester.createRequestCycle(); Page page = tester.getLastRenderedPage(); tester.executeBehavior(((SimpleTestPanel)page.ge...
public static void main(String[] args) { new ConstructorExecInit(); Tester.checkAllEvents(); } static { Tester.expectEvent("execution"); Tester.expectEvent("initialization"); } } /** @testcase after returning from initialization and after executing constructor */ aspect ...
public static void main(String[] args) { new ConstructorExecInit(); Tester.checkAllEvents(); } static { Tester.expectEvent("execution"); Tester.expectEvent("initialization"); } } /** @testcase after returning from initialization and after executing constructor */ aspect ...
public static void test() throws Exception { new OddConstructors().go(); Tester.check("advised default constructor"); Tester.checkEqual(B.aspectOf().count, 1, "new'd once"); } void go() throws Exception { // new C(); // use reflection instead of new to create this class ...
public static void test() throws Exception { new OddConstructors().go(); Tester.check("advised default constructor"); Tester.checkEqual(B.aspectOf().count, 1, "new'd once"); } void go() throws Exception { // new C(); // use reflection instead of new to create this class ...
public static <M extends IBehavior> List<IBehavior> getBehaviors(Component component, Class<M> type) { List<IBehavior> behaviors = component.getBehaviors(); if (behaviors == null) { return Collections.emptyList(); } List<IBehavior> subset = new ArrayList<IBehavior>(behaviors.size()); for (IBehavior ...
public static <M extends IBehavior> List<IBehavior> getBehaviors(Component component, Class<M> type) { List<? extends IBehavior> behaviors = component.getBehaviors(); if (behaviors == null) { return Collections.emptyList(); } List<IBehavior> subset = new ArrayList<IBehavior>(behaviors.size()); for (...
public List<IBehavior> getBehaviors(); /** * Detaches the component. * <p> * NOTE: this method is not inherited from {@link IDetachable} on purpose. in Wicket the * assumption for a long time has been that {@link Component}s do not implement * {@link IDetachable}; doing so may lead to some very nasty side-...
public List<? extends IBehavior> getBehaviors(); /** * Detaches the component. * <p> * NOTE: this method is not inherited from {@link IDetachable} on purpose. in Wicket the * assumption for a long time has been that {@link Component}s do not implement * {@link IDetachable}; doing so may lead to some very n...
public void testBehaviorDataArrayCleanup() { IBehavior border = new SimpleAttributeModifier("class", "border"); IBehavior border2 = new SimpleAttributeModifier("class2", "border"); IBehavior auto = new SimpleAttributeModifier("autocomplete", "off"); IBehavior auto2 = new SimpleAttributeModifier("autocomplete2...
public void testBehaviorDataArrayCleanup() { IBehavior border = new SimpleAttributeModifier("class", "border"); IBehavior border2 = new SimpleAttributeModifier("class2", "border"); IBehavior auto = new SimpleAttributeModifier("autocomplete", "off"); IBehavior auto2 = new SimpleAttributeModifier("autocomplete2...
private boolean validateDocument(String document) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addExpectedChild(title); ...
private boolean validateDocument(String document) { HtmlDocumentValidator validator = new HtmlDocumentValidator(); Tag html = new Tag("html"); Tag head = new Tag("head"); html.addExpectedChild(head); Tag title = new Tag("title"); head.addExpectedChild(title); ...
public final void setSsdir(String dir) { m_SSDir = project.translatePath(dir); }
public final void setSsdir(String dir) { m_SSDir = Project.translatePath(dir); }
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public void getLocalpathCommand(Commandline cmd) { if (m_LocalPath == null) { return; } else { // make sure m_LocalDir exists, create it if it doesn't File dir = project.resolveFile(m_LocalPath); if (!dir.exists()) { boolean done = dir....
public EAN13BlackBox2TestCase() { super("test/data/blackbox/ean13-2", new MultiFormatReader(), BarcodeFormat.EAN_13); addTest(10, 16, 0.0f); addTest(10, 16, 180.0f); }
public EAN13BlackBox2TestCase() { super("test/data/blackbox/ean13-2", new MultiFormatReader(), BarcodeFormat.EAN_13); addTest(11, 16, 0.0f); addTest(10, 16, 180.0f); }
public ITFBlackBox1TestCase() { super("test/data/blackbox/itf-1", new MultiFormatReader(), BarcodeFormat.ITF); addTest(9, 12, 0.0f); addTest(8, 12, 180.0f); }
public ITFBlackBox1TestCase() { super("test/data/blackbox/itf-1", new MultiFormatReader(), BarcodeFormat.ITF); addTest(9, 12, 0.0f); addTest(12, 12, 180.0f); }
public ITFBlackBox2TestCase() { super("test/data/blackbox/itf-2", new MultiFormatReader(), BarcodeFormat.ITF); addTest(8, 9, 0.0f); addTest(8, 9, 180.0f); }
public ITFBlackBox2TestCase() { super("test/data/blackbox/itf-2", new MultiFormatReader(), BarcodeFormat.ITF); addTest(8, 9, 0.0f); addTest(7, 9, 180.0f); }
public UPCEBlackBox2TestCase() { super("test/data/blackbox/upce-2", new MultiFormatReader(), BarcodeFormat.UPC_E); addTest(30, 35, 0.0f); addTest(29, 35, 180.0f); }
public UPCEBlackBox2TestCase() { super("test/data/blackbox/upce-2", new MultiFormatReader(), BarcodeFormat.UPC_E); addTest(30, 35, 0.0f); addTest(31, 35, 180.0f); }
protected static Date fromDosTime(ZipLong l) { long dosTime = l.getValue(); Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, (int) ((dosTime >> 25) & 0x7f) + 1980); cal.set(Calendar.MONTH, (int) ((dosTime >> 21) & 0x0f) - 1); cal.set(Calendar.DATE, (int) (dosTime...
protected static Date fromDosTime(ZipLong l) { long dosTime = l.getValue(); Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, (int) ((dosTime >> 25) & 0x7f) + 1980); cal.set(Calendar.MONTH, (int) ((dosTime >> 21) & 0x0f) - 1); cal.set(Calendar.DATE, (int) (dosTime...
public int getCaretLineNumber () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 1; byte [] position = new byte [ITER_SIZEOF]; int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); return OS.gtk_text_iter_get_line (position); ...
public int getCaretLineNumber () { checkWidget (); if ((style & SWT.SINGLE) != 0) return 0; byte [] position = new byte [ITER_SIZEOF]; int /*long*/ mark = OS.gtk_text_buffer_get_insert (bufferHandle); OS.gtk_text_buffer_get_iter_at_mark (bufferHandle, position, mark); return OS.gtk_text_iter_get_line (position); ...
private void setState(long secsCount) { seconds.setEnabled(true); seconds.setText("" + secsCount); // $NON-NLS-1$ }
private void setState(long secsCount) { seconds.setEnabled(true); seconds.setText(Long.toString(secsCount)); // $NON-NLS-1$ }
return new String[] {"Day", "Hours", "Minutes", "Month", "Seconds", "Year"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms...
return new String[] {"Day", "Hours", "Minutes", "Month", "Seconds", "Year"}; /******************************************************************************* * Copyright (c) 2000, 2005 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms...
public final class SignInPage extends wicket.authentication.pages.SignInPage /* * $Id$ $Revision: * 1.2 $ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance w...
public final class SignInPage extends wicket.authentication.pages.SignInPage /* * $Id$ $Revision: * 1.2 $ $Date$ * * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance w...
public class SignOutPage extends wicket.authentication.pages.SignOutPage package wicket.authentication.example; /** * Trivial sign out page * * @author Jonathan */ public class SignOutPage extends wicket.authentication.SignOutPage { }
public class SignOutPage extends wicket.authentication.pages.SignOutPage package wicket.authentication.example; /** * Trivial sign out page * * @author Jonathan */ public class SignOutPage extends wicket.authentication.pages.SignOutPage { }
public void sendRedirect(String url) { try { redirect = true; url = getAbsoluteURL(url); url = httpServletResponse.encodeRedirectURL(url); // wicket redirects should never be cached disableCaching(); if (webRequest.isAjax()) { httpServletResponse.addHeader("Ajax-Location", url); /*...
public void sendRedirect(String url) { try { redirect = true; url = getAbsoluteURL(url); url = httpServletResponse.encodeRedirectURL(url); // wicket redirects should never be cached disableCaching(); if (webRequest.isAjax()) { httpServletResponse.addHeader("Ajax-Location", url); /*...
public Text (Composite parent, int style) { super (parent, checkStyle (style)); } int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) { if (handle == 0) return 0; boolean redraw = false; switch (msg) { case OS.WM_ERASEBKGND: { if (findImageControl () != null) ret...
public Text (Composite parent, int style) { super (parent, checkStyle (style)); } int /*long*/ callWindowProc (int /*long*/ hwnd, int msg, int /*long*/ wParam, int /*long*/ lParam) { if (handle == 0) return 0; boolean redraw = false; switch (msg) { case OS.WM_ERASEBKGND: { if (findImageControl () != null) ret...
public static String join(String separator, String[] fragments) { if (fragments.length < 1) { // no elements return ""; } else if (fragments.length < 2) { // single element return fragments[0]; } else { // two or more elements StringBuilder buff = new StringBuilder(128); if (fragm...
public static String join(String separator, String[] fragments) { if (fragments.length < 1) { // no elements return ""; } else if (fragments.length < 2) { // single element return fragments[0]; } else { // two or more elements StringBuffer buff = new StringBuffer(128); if (fragmen...
public void parse(Project project, Object source, RootHandler handler) throws BuildException { AntXMLContext context = handler.context; File buildFile = null; URL url = null; String buildFileName = null; if (source instanceof File) { buildFile = (F...
public void parse(Project project, Object source, RootHandler handler) throws BuildException { AntXMLContext context = handler.context; File buildFile = null; URL url = null; String buildFileName = null; if (source instanceof File) { buildFile = (F...
public static final long NTFS_FILE_TIMESTAMP_GRANULARITY = 0; // stolen from FilePathToURI of the Xerces-J team static { for (int i = 0; i <= 0x20; i++) { isSpecial[i] = true; escapedChar1[i] = Character.forDigit(i >> 4, 16); escapedChar2[i] = Character.forDigit(...
public static final long NTFS_FILE_TIMESTAMP_GRANULARITY = 1; // stolen from FilePathToURI of the Xerces-J team static { for (int i = 0; i <= 0x20; i++) { isSpecial[i] = true; escapedChar1[i] = Character.forDigit(i >> 4, 16); escapedChar2[i] = Character.forDigit(...
private List getBinarySourcesFrom(Map binarySourceEntries) { // Map is fileName |-> List<UnwovenClassFile> List ret = new ArrayList(); for (Iterator binIter = binarySourceEntries.keySet().iterator(); binIter.hasNext();) { String sourceFileName = (String) binIter.next(); List unwovenClassFiles = (List) bina...
private List getBinarySourcesFrom(Map binarySourceEntries) { // Map is fileName |-> List<UnwovenClassFile> List ret = new ArrayList(); for (Iterator binIter = binarySourceEntries.keySet().iterator(); binIter.hasNext();) { String sourceFileName = (String) binIter.next(); List unwovenClassFiles = (List) bina...
public WicketExampleApplication() { // WARNING: DO NOT do this on a real world application unless // you really want your app's passwords all passed around and // stored in unencrypted browser cookies (BAD IDEA!)!!! // The NoCrypt class is being used here becau...
public WicketExampleApplication() { // WARNING: DO NOT do this on a real world application unless // you really want your app's passwords all passed around and // stored in unencrypted browser cookies (BAD IDEA!)!!! // The NoCrypt class is being used here becau...
public void setImage (int columnIndex, Image value) { checkWidget (); if (value != null && value.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); TableColumn[] columns = parent.columns; int validColumnCount = Math.max (1, columns.length); if (!(0 <= columnIndex && columnIndex < validColumnCount)) return; Image...
public void setImage (int columnIndex, Image value) { checkWidget (); if (value != null && value.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); TableColumn[] columns = parent.columns; int validColumnCount = Math.max (1, columns.length); if (!(0 <= columnIndex && columnIndex < validColumnCount)) return; Image...
public static WeaverOption parse(String options, ClassLoader laoder, IMessageHandler imh) { WeaverOption weaverOption = new WeaverOption(imh); if (LangUtil.isEmpty(options)) { return weaverOption; } // the first option wins List flags = LangUtil.anySplit(options,...
public static WeaverOption parse(String options, ClassLoader laoder, IMessageHandler imh) { WeaverOption weaverOption = new WeaverOption(imh); if (LangUtil.isEmpty(options)) { return weaverOption; } // the first option wins List flags = LangUtil.anySplit(options,...
public void removeListener (int eventType, Listener listener) { checkDevice (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (eventType, listener); } void removeMouseHoverTimeout (int /*long*/ handle) { if (handle != mouseHoverHandle) return; if (mouseH...
public void removeListener (int eventType, Listener listener) { checkDevice (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); if (eventTable == null) return; eventTable.unhook (eventType, listener); } void removeMouseHoverTimeout (int /*long*/ handle) { if (handle != mouseHoverHandle) return; if (mouseH...
protected boolean warn (String message, Throwable th) { return messageHandler.handleMessage(new Message("Register definition failed", IMessage.WARNING, th, null)); }
protected boolean warn (String message, Throwable th) { return messageHandler.handleMessage(new Message(message, IMessage.WARNING, th, null)); }
public void setImage (int index, Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error(SWT.ERROR_INVALID_ARGUMENT); } Image oldImage = null; if (index == 0) { if (image != null && image.type == SWT.ICON) { if (image.equals (this.image)) return; } oldImage = this.image; super....
public void setImage (int index, Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error(SWT.ERROR_INVALID_ARGUMENT); } Image oldImage = null; if (index == 0) { if (image != null && image.type == SWT.ICON) { if (image.equals (this.image)) return; } oldImage = this.image; super....
private void writeObject(ObjectOutputStream out) throws IOException { // synchronize chilren if (syncChildren()) { synchronizeChildren(); } // write object out.defaultWriteObject(); } // writeObject(ObjectOutputStream)
private void writeObject(ObjectOutputStream out) throws IOException { // synchronize chilren if (syncChildren() == false ) { synchronizeChildren(); } // write object out.defaultWriteObject(); } // writeObject(ObjectOutputStream)
public void testAspectjtools() { if (!shouldBuild("aspectjtools")) { return; } File baseDir = new File(".."); File tempBuildDir = new File(baseDir, "aj-build"); File distDir = new File(tempBuildDir, "dist"); File jarDir = new File(tempBuildDir, "jars"); ...
public void testAspectjtools() { if (!shouldBuild("aspectjtools")) { return; } File baseDir = new File(".."); File tempBuildDir = new File(baseDir, "aj-build"); File distDir = new File(tempBuildDir, "dist"); File jarDir = new File(tempBuildDir, "jars"); ...
private MarkupStream findMarkupStream(final Component owner) { final String markupType = getMarkupType(owner); // TODO we need to expose this functionality for any class not just for // markupcontainers in markupcache so we don't have to replicate this // logic here // Get locator to search for the resour...
private MarkupStream findMarkupStream(final Component owner) { final String markupType = getMarkupType(owner); // TODO we need to expose this functionality for any class not just for // markupcontainers in markupcache so we don't have to replicate this // logic here // Get locator to search for the resour...
protected final void validateMarkupStream(final MarkupStream markupStream) { // Allow the component to be re-rendered without a page. Partial // re-rendering is a requirement of AJAX. final Page page = getPage(); if (this.isAuto() || (page != null) && page.isRequiresFullRender()) { // Remember the positi...
protected final void validateMarkupStream(final MarkupStream markupStream) { // Allow the component to be re-rendered without a page. Partial // re-rendering is a requirement of AJAX. final Page page = getPage(); if (this.isAuto() || (page != null) && (page.isAllowReRender() == false)) { // Remember the ...
protected final void setMarkupStream(final MarkupStream markupStream) { if ((this instanceof Page) && (markupStream != null) && (markupStream.equalMarkup(this.markupStream) == false)) { // The Page requires at least on complete render cycle in order // to assign markup streams to all components. O...
protected final void setMarkupStream(final MarkupStream markupStream) { if ((this instanceof Page) && (markupStream != null) && (markupStream.equalMarkup(this.markupStream) == false)) { // The Page requires at least on complete render cycle in order // to assign markup streams to all components. O...
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.PC || field.isEmbeddedPC()) throw new MetaDataException(_loc.get("not-relation", field)); field.getKeyMapping().getValueInfo().assertNoSchemaComponents (field.getKey(), !adapt); if (!field.isBiMTo1...
public void map(boolean adapt) { if (field.getTypeCode() != JavaTypes.PC || field.isEmbeddedPC()) throw new MetaDataException(_loc.get("not-relation", field)); field.getKeyMapping().getValueInfo().assertNoSchemaComponents (field.getKey(), !adapt); if (!field.isNonDef...
Slice getMasterSlice(); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0...
Slice getMasterSlice(); /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0...
public Object clone() { TestElement clonedElement = null; try { clonedElement = (TestElement)this.getClass().newInstance(); } catch(Exception e){} PropertyIterator iter = propertyIterator(); while(iter.hasNext()) { ...
public Object clone() { TestElement clonedElement = null; try { clonedElement = (TestElement)this.getClass().newInstance(); } catch(Exception e){} PropertyIterator iter = propertyIterator(); while(iter.hasNext()) { ...
public FormPage() { // add feedback panel with a markup id setter so it can be updated via // ajax final FeedbackPanel feedback = new FeedbackPanel("feedback"); feedback.setOutputMarkupId(true); add(feedback); // add form with markup id setter so it can be updated via ajax Form form = new Form("form",...
public FormPage() { // add feedback panel with a markup id setter so it can be updated via // ajax final FeedbackPanel feedback = new FeedbackPanel("feedback"); feedback.setOutputMarkupId(true); add(feedback); // add form with markup id setter so it can be updated via ajax Form form = new Form("form",...
public Class getIdentity() { return Guess.class; } })); } }
public Class getPageIdentity() { return Guess.class; } })); } }
public Class getIdentity(); }
public Class getPageIdentity(); }
public Class getIdentity() { return page.getClass(); } })); } }
public Class getPageIdentity() { return page.getClass(); } })); } }
protected void populateItem(ListItem item) { RequestData rd = (RequestData)item.getModelObject(); new Label(item, "id", new Model<String>(rd.getSessionId())).setVisible(sessionData == null); new Label(item, "startDate", new Model<String>(sdf.format(rd.getStartDate()))); new Label(item, "timeTaken"...
protected void populateItem(ListItem item) { RequestData rd = (RequestData)item.getModelObject(); new Label(item, "id", new Model<String>(rd.getSessionId())).setVisible(sessionData == null); new Label(item, "startDate", new Model<String>(sdf.format(rd.getStartDate()))); new Label(item, "timeTaken"...
public String getProjectName(); }
String getProjectName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myrmidon.listene...
public String getTargetName(); }
String getTargetName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myrmidon.listener...
public String getTaskName(); }
String getTaskName(); /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myrmidon.listeners;...
public void open() { new JoinGroupWizardAction().run(null); }
public void open() { new JoinGroupWizardAction(getURI().toString()).run(null); }
public boolean setParent (Composite parent) { checkWidget (); if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (this.parent == parent) return true; if (!isReparentable ()) return false; releaseParent (); Shell newShell = parent.getShell (), o...
public boolean setParent (Composite parent) { checkWidget (); if (parent == null) error (SWT.ERROR_NULL_ARGUMENT); if (parent.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if (this.parent == parent) return true; if (!isReparentable ()) return false; releaseParent (); Shell newShell = parent.getShell (), o...
private static CheckboxMenuItem traceFireCollideDamage = new CheckboxMenuItem("trace fire, collide, damage", true); after() returning (SWFrame frame): call(SWFrame+.new(..)) { menu.add(traceConstructors); menu.add(traceInitializations); menu.add(traceMethods); menu.add(t...
private static CheckboxMenuItem traceFireCollideDamage = new CheckboxMenuItem("trace fire, collide, damage", true); after() returning (SWFrame frame): call(SWFrame+.new(..)) { menu.add(traceConstructors); menu.add(traceInitializations); menu.add(traceMethods); menu.add(t...
private int OnControlInfoChanged() { int /*long*/[] ppvObject = new int /*long*/[1]; if (objIUnknown.QueryInterface(COM.IIDIOleControl, ppvObject) == COM.S_OK) { IOleControl objIOleControl = new IOleControl(ppvObject[0]); // ask the control for its info in case users // need to act on it currentControlInfo = ...
private int OnControlInfoChanged() { int /*long*/[] ppvObject = new int /*long*/[1]; if (objIUnknown.QueryInterface(COM.IIDIOleControl, ppvObject) == COM.S_OK) { IOleControl objIOleControl = new IOleControl(ppvObject[0]); // ask the control for its info in case users // need to act on it currentControlInfo = ...
public Object start(IApplicationContext appContext) throws Exception { // Set bundle context (for use with service trackers) bundleContext = Activator.getContext(); processArgs(appContext); // Create ECF container of appropriate type. The container instance // can be created in a variety of ways...e.g. via ...
public Object start(IApplicationContext appContext) throws Exception { // Set bundle context (for use with service trackers) bundleContext = Activator.getContext(); processArgs(appContext); // Create ECF container of appropriate type. The container instance // can be created in a variety of ways...e.g. via ...
private static final void addResources(final Class scope, final Pattern pattern, final List resources, final StringBuffer relativePath, final File dir, boolean recurse) { File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { File file = files[i]; if (file.isDirectory()) { if (...
private static final void addResources(final Class scope, final Pattern pattern, final List resources, final StringBuffer relativePath, final File dir, boolean recurse) { File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { File file = files[i]; if (file.isDirectory()) { 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...
private void addAdviceLikeDeclares(ClassScope s) { TypeDeclaration dec = s.referenceContext; if (dec instanceof AspectDeclaration) { ResolvedTypeX typeX = factory.fromEclipse(dec.binding); factory.getWorld().getCrosscuttingMembersSet().addAdviceLikeDeclares(typeX); ...
private void addAdviceLikeDeclares(ClassScope s) { TypeDeclaration dec = s.referenceContext; if (dec instanceof AspectDeclaration) { ResolvedTypeX typeX = factory.fromEclipse(dec.binding); factory.getWorld().getCrosscuttingMembersSet().addAdviceLikeDeclares(typeX); ...
private static String dictionaryClassForString(String prod , JDBCConfiguration conf) { if (StringUtils.isEmpty(prod)) return null; prod = prod.toLowerCase(); PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf) .dbdictionaryPlugin; if (pro...
private static String dictionaryClassForString(String prod , JDBCConfiguration conf) { if (StringUtils.isEmpty(prod)) return null; prod = prod.toLowerCase(); PluginValue dbdictionaryPlugin = ((JDBCConfigurationImpl) conf) .dbdictionaryPlugin; if (pro...
public ClassMetaData getMetaData(Object oid, ClassLoader envLoader, boolean mustExist) { if (oid == null && mustExist) throw new MetaDataException(_loc.get("no-oid-meta", oid, "?", _oids.toString())); if (oid == null) return null; if (oid inst...
public ClassMetaData getMetaData(Object oid, ClassLoader envLoader, boolean mustExist) { if (oid == null && mustExist) throw new MetaDataException(_loc.get("no-oid-meta", oid, "?", _oids.toString())); if (oid == null) return null; if (oid inst...
public Class[][] getSupportedParamterTypes() { return new Class[][] { { String.class }, { File.class } }; } }
public Class[][] getSupportedParameterTypes() { return new Class[][] { { String.class }, { File.class } }; } }
public void GUIComponents1() throws Exception { String name = guiItem.getClass().getName(); assertEquals("Name should be same as static label for " + name, guiItem.getStaticLabel(), guiItem.getName()); if (name.startsWith("org.apache.jmeter.examples.")){ return; } ...
public void GUIComponents1() throws Exception { String name = guiItem.getClass().getName(); assertEquals("Name should be same as static label for " + name, guiItem.getStaticLabel(), guiItem.getName()); if (name.startsWith("org.apache.jmeter.examples.")){ return; } ...
public String open () { boolean useChooserDialog = OS.gtk_check_version (2, 4, 10) == 0; if (useChooserDialog) { return openChooserDialog (); } else { return openClassicDialog (); } }
public String open () { boolean useChooserDialog = OS.GTK_VERSION >= OS.VERSION (2, 4, 10); if (useChooserDialog) { return openChooserDialog (); } else { return openClassicDialog (); } }
protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ resetBuffer(str); //create structure to hold an object if ( date == null ) { date = new int[TOTAL_SIZE]; } resetDateObj(date); int end = indexOf (fStart, fEnd, 'T'); ...
protected int[] parse(String str, int[] date) throws SchemaDateTimeException{ resetBuffer(str); //create structure to hold an object if ( date == null ) { date = new int[TOTAL_SIZE]; } resetDateObj(date); int end = indexOf (fStart, fEnd, 'T'); ...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { int length = Integer.valueOf(values[0].execute()); String charsToUse = null;//means no restriction if (values.length >= CHARS) { charsToUse = (v...
public synchronized String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException { int length = Integer.parseInt(values[0].execute()); String charsToUse = null;//means no restriction if (values.length >= CHARS) { charsToUse = (...