buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public Bytes length() { if (file != null) { return Bytes.bytes(file.length()); } return Bytes.bytes(0); }
public Bytes length() { if (file != null) { return Bytes.bytes(file.length()); } return null; }
public int getDefaultAccessType() { return ClassMetaData.ACCESS_UNKNOWN; }
public int getDefaultAccessType() { return AccessCode.UNKNOWN; }
public final String getValue() { if (value < 0) { value = getPage().getAutoIndex(); } return "check" + value; }
public final String getValue() { if (value < 0) { value = getPage().getAutoIndex(); } return "radio" + value; }
public void setPrefix(String prefix) throws DOMException { if (syncData) { synchronizeData(); } if (!DocumentImpl.isXMLName(prefix)) { throw new DOMExceptionImpl(DOMException.INVALID_CHARACTER_ERR, "INVALID_CHARACTER_ERR"); ...
public void setPrefix(String prefix) throws DOMException { if (syncData) { synchronizeData(); } if (ownerDocument.errorChecking && !DocumentImpl.isXMLName(prefix)) { throw new DOMExceptionImpl(DOMException.INVALID_CHARACTER_ERR, ...
public static Time getLastModified(final URL url) throws IOException { // check if url points to a local file final File file = Files.getLocalFileFromUrl(url); if(file != null) { // in that case we can get the timestamp faster return IOUtils.getLastModified(file); } // otherwise open the url and...
public static Time getLastModified(final URL url) throws IOException { // check if url points to a local file final File file = Files.getLocalFileFromUrl(url); if(file != null) { // in that case we can get the timestamp faster return Files.getLastModified(file); } // otherwise open the url and p...
public String encodeURL(String url) { return currentResponse.encodeURL(url); } }; redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding()); // redirect the response to the buffer setResponse(redirectResponse); // render the page into the buffer page.do...
public String encodeURL(String url) { return currentResponse.encodeURL(url); } }; redirectResponse.setCharacterEncoding(currentResponse.getCharacterEncoding()); // redirect the response to the buffer setResponse(redirectResponse); // render the page into the buffer page.do...
public void testLazyTjp() throws IOException { checkCompile("src1/LazyTjp.aj", new String[] {"-XlazyTjp","-Xlint:error"}, new int[] {96}); TestUtil.runMain("out", "LazyTjp"); }
public void testLazyTjp() throws IOException { checkCompile("src1/LazyTjp.aj", new String[] {"-XlazyTjp","-Xlint:error"}, new int[] {96}); // TestUtil.runMain("out", "LazyTjp"); }
protected void executeJava() throws TaskException { try { getLogger().info( "mode : java" ); org.apache.tools.ant.taskdefs.Java execTask = null; execTask = null;//(Java)getProject().createTask( "java" ); execTask.setDir( new File( "." ) )...
protected void executeJava() throws TaskException { try { getLogger().info( "mode : java" ); org.apache.tools.ant.taskdefs.Java execTask = null; execTask = null;//(Java)getProject().createTask( "java" ); execTask.setDir( new File( "." ) )...
public void execute() throws TaskException { if( !destinationDirectory.isDirectory() ) { throw new TaskException( "destination directory " + destinationDirectory.getPath() + " is not valid" ); } if( !sourceDirectory.isDire...
public void execute() throws TaskException { if( !destinationDirectory.isDirectory() ) { throw new TaskException( "destination directory " + destinationDirectory.getPath() + " is not valid" ); } if( !sourceDirectory.isDire...
public boolean execute() throws TaskException { getLogger().debug( "Using jasper compiler" ); Commandline cmd = setupJasperCommand(); try { // Create an instance of the compiler, redirecting output to // the project log //FIXME ...
public boolean execute() throws TaskException { getLogger().debug( "Using jasper compiler" ); Commandline cmd = setupJasperCommand(); try { // Create an instance of the compiler, redirecting output to // the project log //FIXME ...
public static String replaceAll(String string, String target, String replace) { final int index = string.indexOf(target); if (index == -1) return string; return string.substring(0, index) + replace + replaceAll(string.substring(index + replace.length()), target, replace); }
public static String replaceAll(String string, String target, String replace) { final int index = string.indexOf(target); if (index == -1) return string; return string.substring(0, index) + replace + replaceAll(string.substring(index + target.length()), target, replace); }
protected MarkupElement onSpecialTag(final HtmlSpecialTag tag) throws ParseException { log.error(tag.toString()); return tag; }
protected MarkupElement onSpecialTag(final HtmlSpecialTag tag) throws ParseException { // log.error(tag.toString()); return tag; }
public void connect(ID connectID, IConnectContext connectContext) throws ContainerConnectException { // Actually do join here if (connectID == null) throw new ContainerConnectException(Messages.IRCChannelContainer_Exception_TargetID_Null); if (connectWaiting) throw new ContainerConnectException(Messages.IR...
public void connect(ID connectID, IConnectContext connectContext) throws ContainerConnectException { // Actually do join here if (connectID == null) throw new ContainerConnectException(Messages.IRCChannelContainer_Exception_TargetID_Null); if (connectWaiting) throw new ContainerConnectException(Messages.IR...
private boolean copyLtwFile (File sandboxDirectory) { boolean useLtw = false; if (ltwFile != null) { // TODO maw use flag rather than empty file name if (ltwFile.trim().length() == 0) return true; File from = new File(baseDir,ltwFile); File to = new File(sandboxDirectory,"META-INF" + Fi...
private boolean copyLtwFile (File sandboxDirectory) { boolean useLtw = false; if (ltwFile != null) { // TODO maw use flag rather than empty file name if (ltwFile.trim().length() == 0) return true; File from = new File(baseDir,ltwFile); File to = new File(sandboxDirectory,"META-INF" + Fi...
public IRemoteServiceContainer[] getConsumerRemoteServiceContainers(EndpointDescription endpointDescription); }
public IRemoteServiceContainer[] selectConsumerContainers(EndpointDescription endpointDescription); }
public static HTTPSamplerBase newInstance(String alias) { if (alias ==null || alias.length() == 0) { alias = DEFAULT_CLASSNAME; } if (alias.equals(HTTP_SAMPLER_JAVA) || alias.equals(IMPL_JAVA)) { return new HTTPSamplerProxy(IMPL_JAVA); } if (alias.equa...
public static HTTPSamplerBase newInstance(String alias) { if (alias ==null || alias.length() == 0) { return new HTTPSamplerProxy(); } if (alias.equals(HTTP_SAMPLER_JAVA) || alias.equals(IMPL_JAVA)) { return new HTTPSamplerProxy(IMPL_JAVA); } if (alias....
private byte[] getBodySent(byte[] responseData) throws IOException { // Find the data sent to the mirror server, which the mirror server is sending back to us // We assume the headers are in ISO_8859_1, and the body can be in any content encoding. // Therefore we get the data sent in ISO_885...
private byte[] getBodySent(byte[] responseData) throws IOException { // Find the data sent to the mirror server, which the mirror server is sending back to us // We assume the headers are in ISO_8859_1, and the body can be in any content encoding. // Therefore we get the data sent in ISO_885...
public TestBeanGUI(Class testBeanClass) { super(); log.warn("testing class: " + testBeanClass.getName()); // A quick verification, just in case: if (!TestBean.class.isAssignableFrom(testBeanClass)) { Error e = new Error(); log.error("This should never happen!", e); ...
public TestBeanGUI(Class testBeanClass) { super(); log.debug("testing class: " + testBeanClass.getName()); // A quick verification, just in case: if (!TestBean.class.isAssignableFrom(testBeanClass)) { Error e = new Error(); log.error("This should never happen!", e);...
public InlinePanelPage_2() { InlinePanel panel1 = new InlinePanel("myPanel1", "frag1"); add(panel1); panel1.add(new Label("label1", "my label text")); }
public InlinePanelPage_2() { Fragment panel1 = new Fragment("myPanel1", "frag1"); add(panel1); panel1.add(new Label("label1", "my label text")); }
public void testPr117882_2() { // AjdeInteractionTestbed.VERBOSE=true; // AjdeInteractionTestbed.configureBuildStructureModel(true); initialiseProject("PR117882_2"); build("PR117882_2"); checkWasFullBuild(); alter("PR117882_2","inc1"); build("PR117882_2"); checkWasntFullBuild(); checkCompileWeaveCount(...
public void testPr117882_2() { // AjdeInteractionTestbed.VERBOSE=true; // AjdeInteractionTestbed.configureBuildStructureModel(true); initialiseProject("PR117882_2"); build("PR117882_2"); checkWasFullBuild(); alter("PR117882_2","inc1"); build("PR117882_2"); checkWasntFullBuild(); //checkCompileWeaveCoun...
private boolean parseTagText(final XmlTag tag, final String tagText) throws ParseException { // Get the length of the tagtext final int tagTextLength = tagText.length(); // If we match tagname pattern final TagNameParser tagnameParser = new TagNameParser(tagText); if (tagnameParser.matcher().lookingAt()) ...
private boolean parseTagText(final XmlTag tag, final String tagText) throws ParseException { // Get the length of the tagtext final int tagTextLength = tagText.length(); // If we match tagname pattern final TagNameParser tagnameParser = new TagNameParser(tagText); if (tagnameParser.matcher().lookingAt()) ...
public void configure( final Configuration configuration ) throws ConfigurationException { getTask().setTaskName( configuration.getName() ); //do configuration configure( getTask(), configuration ); }
public void configure( final Configuration configuration ) throws ConfigurationException { //getTask().setTaskName( configuration.getName() ); //do configuration configure( getTask(), configuration ); }
public void populateCell(final Cell cell) { final Book book = (Book) cell.getModelObject(); cell.add(BookDetails.link("details", book, getLocalizedString("noBookTitle"))); cell.add(new Label("author"...
public void populateCell(final Cell cell) { final Book book = (Book) cell.getModelObject(); cell.add(BookDetails.link("details", book, getLocalizer().getString("noBookTitle", this))); cell.add(new La...
protected String signIn(final RequestCycle cycle, final String username, final String password) { // Sign the user in final User user = Authenticator.forSession(cycle.getSession()) ...
protected String signIn(final RequestCycle cycle, final String username, final String password) { // Sign the user in final User user = Authenticator.forSession(cycle.getSession()) ...
public void setOnType(MethodDeclaration interTypeDecl, TypeReference onType) { ((InterTypeDeclaration)interTypeDecl).onType = onType; }
public void setOnType(MethodDeclaration interTypeDecl, TypeReference onType) { ((InterTypeDeclaration)interTypeDecl).setOnType(onType); }
public int getSelection () { checkWidget (); return OS.GetControl32BitValue (buttonHandle); } int getSelectionText () { int [] actualSize = new int [1]; int [] ptr = new int [1]; if (OS.GetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextCFStringTag, 4, ptr, actualSize) == OS.noErr) {...
public int getSelection () { checkWidget (); return OS.GetControl32BitValue (buttonHandle); } int getSelectionText () { int [] actualSize = new int [1]; int [] ptr = new int [1]; if (OS.GetControlData (textHandle, (short)OS.kControlEntireControl, OS.kControlEditTextCFStringTag, 4, ptr, actualSize) == OS.noErr) {...
public boolean getEditable () { checkWidget(); return (style & SWT.READ_ONLY) == 0; } Rect getInset () { if (txnObject != 0) return super.getInset (); return display.spinnerInset; }
public boolean getEditable () { checkWidget(); return (style & SWT.READ_ONLY) == 0; } Rect getInset () { if (txnObject != 0) return super.getInset (); return display.editTextInset; }
private ReportFilePanel outputDirectory = new ReportFilePanel( JMeterUtils.getResString("report_output_directory"), "*");
private ReportFilePanel outputDirectory = new ReportFilePanel( JMeterUtils.getResString("report_output_directory"), "*"); // $NON-NLS-1$ // $NON-NLS-2$
protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, "select"); super.onComponentTag(tag); IValueMap attrs = tag.getAttributes(); attrs.put("multiple", null); attrs.put("size", getPalette().getRows()); if (!palette.isPaletteEnabled()) { attrs.put("disabled", "disabled"); } ...
protected void onComponentTag(ComponentTag tag) { checkComponentTag(tag, "select"); super.onComponentTag(tag); IValueMap attrs = tag.getAttributes(); attrs.put("multiple", "multiple"); attrs.put("size", getPalette().getRows()); if (!palette.isPaletteEnabled()) { attrs.put("disabled", "disabled"); ...
public synchronized void add(SampleResult sampleResult) { long sample = sampleResult.getTime(); this.n++; this.sum += sample; this.average = this.sum / this.n; if (SHOW_INCOMING_SAMPLES) { incoming = sample; } if (sample > maximum) ...
public synchronized void add(SampleResult sampleResult) { long sample = sampleResult.getTime(); this.n++; this.sum += sample; this.average = this.sum / this.n; if (SHOW_INCOMING_SAMPLES) { incoming = sample; } if (sample > maximum) ...
public static void main(String[] args) { try { RemoteJMeterEngine engine = new RemoteJMeterEngineImpl(); while (true) { Thread.sleep(Long.MAX_VALUE); } } catch (Exception ex) { log.error("", ex); ...
public static void main(String[] args) { try { new RemoteJMeterEngineImpl(); while (true) { Thread.sleep(Long.MAX_VALUE); } } catch (Exception ex) { log.error("", ex); } }
+ " is private and cannot be invoked."); } catch (InvocationTargetException ex) { lowlevel = true; Throwable t = ex.getTargetException(); out.println("Cause: The constructor threw the exception"); ...
+ " is private and cannot be invoked."); } catch (InvocationTargetException ex) { lowlevel = true; Throwable t = ex.getTargetException(); out.println("Cause: The constructor threw the exception"); ...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } int callWindowProc (int ...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection,typedListener); addListener (SWT.DefaultSelection,typedListener); } int callWindowProc (int ...
public final Class getAliasClass(String alias) { return (Class)aliasClassMap.get(alias); }
public final Class getAliasClass(String alias) { return aliasClassMap.get(alias); }
private final ConcurrentReaderHashMap classes = new ConcurrentReaderHashMap(); /* * 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 thi...
private final ConcurrentReaderHashMap classes = new ConcurrentReaderHashMap(); /* * 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 thi...
public static byte[] decodeBase64(byte[] base64Data) { // RFC 2045 requires that we discard ALL non-Base64 characters base64Data = discardNonBase64(base64Data); // handle the edge case, so we don't have to worry about it later if (base64Data.length == 0) { re...
public static byte[] decodeBase64(byte[] base64Data) { // RFC 2045 requires that we discard ALL non-Base64 characters base64Data = discardNonBase64(base64Data); // handle the edge case, so we don't have to worry about it later if (base64Data.length == 0) { re...
protected Map normalizeMap(Map coll) { Iterator iter = coll.keySet().iterator(); Map newColl = null; while (iter.hasNext()) { Object item = iter.next(); Object prop = coll.get(item); if (newColl == null) { try ...
protected Map normalizeMap(Map coll) { Iterator iter = coll.keySet().iterator(); Map newColl = null; while (iter.hasNext()) { Object item = iter.next(); Object prop = coll.get(item); if (newColl == null) { try ...
public String toString() { StringBuffer sb = new StringBuffer(); if (null != context) { sb.append(context); sb.append(LangUtil.EOL); } if (sourceFile != ISourceLocation.NO_FILE) { sb.append(sourceFile.getPath()); sb.append(":"); ...
public String toString() { StringBuffer sb = new StringBuffer(); if (null != context) { sb.append(context); sb.append(LangUtil.EOL); } if (sourceFile != ISourceLocation.NO_FILE) { sb.append(sourceFile.getPath()); sb.append(":"); ...
public String toString() { //Thread.currentThread().dumpStack(); return "ExactTypePattern(" + type.toString() + (includeSubtypes ? "+" : "") + ")"; }
public String toString() { //Thread.currentThread().dumpStack(); return type.toString() + (includeSubtypes ? "+" : ""); }
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) { return new NotPointcut(body.concretize1(inAspect, bindings)); }
public Pointcut concretize1(ResolvedTypeX inAspect, IntMap bindings) { return new NotPointcut(body.concretize(inAspect, bindings)); }
public void executeNonForked( final TaskContext context ) throws TaskException { if( m_className == null ) { final String message = REZ.getString( "executejava.no-classname.error" ); throw new TaskException( message ); } if( m_jar != null ) ...
public void executeNonForked( final TaskContext context ) throws TaskException { if( m_className == null ) { final String message = REZ.getString( "executejava.no-classname.error" ); throw new TaskException( message ); } if( m_jar != null ) ...
public synchronized Object next(StoreContext ctx, ClassMetaData meta) { _last = UUIDGenerator.nextHex(); return _last; }
public synchronized Object next(StoreContext ctx, ClassMetaData meta) { _last = UUIDGenerator.nextHex(UUIDGenerator.TYPE1); return _last; }
public synchronized Object next(StoreContext ctx, ClassMetaData meta) { _last = UUIDGenerator.nextString(); return _last; }
public synchronized Object next(StoreContext ctx, ClassMetaData meta) { _last = UUIDGenerator.nextString(UUIDGenerator.TYPE1); return _last; }
protected void openStreams() throws IncomingFileTransferException { try { setupAuthentication(); connect(); setRequestHeaderValues(); // Make actual GET request setInputStream(urlConnection.getInputStream()); getResponseHeaderValues(); fireReceiveStartEvent(); } catch (final Exception e) { ...
protected void openStreams() throws IncomingFileTransferException { try { setupAuthentication(); connect(); setRequestHeaderValues(); // Make actual GET request setInputStream(urlConnection.getInputStream()); getResponseHeaderValues(); fireReceiveStartEvent(); } catch (final Exception e) { ...
public void addSubResult(SampleResult subResult) { String tn = getThreadName(); if (tn.length()==0) { tn=Thread.currentThread().getName();//TODO do this more efficiently this.setThreadName(tn); } subResult.setThreadName(tn); if (subResults == null) { subResults = new...
public void addSubResult(SampleResult subResult) { String tn = getThreadName(); if (tn.length()==0) { tn=Thread.currentThread().getName();//TODO do this more efficiently this.setThreadName(tn); } subResult.setThreadName(tn); if (subResults == null) { subResults = new...
public void testBulkUpdateOnTimestampedVersion() { TimestampedEntity pc = new TimestampedEntity(); pc.setName("Original"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(pc); em.getTransaction().commit(); try { ...
public void testBulkUpdateOnTimestampedVersion() { TimestampedEntity pc = new TimestampedEntity(); pc.setName("Original"); EntityManager em = emf.createEntityManager(); em.getTransaction().begin(); em.persist(pc); em.getTransaction().commit(); try { ...
private static void generateSignedCert(File keystore, String password, int validity, String alias, String subject) throws IOException { String dname = "cn=" + subject + ", o=JMeter Proxy (TEMPORARY TRUST ONLY"; KeyToolUtils.genkeypair(keystore, alias, password, validity, dname, null); ...
private static void generateSignedCert(File keystore, String password, int validity, String alias, String subject) throws IOException { String dname = "cn=" + subject + ", o=JMeter Proxy (TEMPORARY TRUST ONLY)"; KeyToolUtils.genkeypair(keystore, alias, password, validity, dname, null); ...
private final String[] COLUMNS = { JMeterUtils.getResString("url"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_count"), //$NON-NLS-1$ JMeterUtils.getResString("average"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_median"), //$NON-NLS-1$ JMeter...
private final String[] COLUMNS = { JMeterUtils.getResString("sampler_label"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_count"), //$NON-NLS-1$ JMeterUtils.getResString("average"), //$NON-NLS-1$ JMeterUtils.getResString("aggregate_report_median"), //$NON-NLS-1$ ...
private List getComponentStack(final Component component) { if (component == null) { return null; } if (component.getPage() == null) { throw new IllegalArgumentException("Component without associated Page: " + component.toString(true)); } // Build search stack List searchStack = new Array...
private List getComponentStack(final Component component) { if (component == null) { return null; } if (component.getPage() == null) { throw new IllegalArgumentException("Component without associated Page: " + component.toString(true)); } // Build search stack List searchStack = new Array...
private IModel originalModel; /** * Construct. * * @param component * subject of the change */ ModelChange(final Component<?> component) { if (component == null) { throw new IllegalArgumentException("argument component must be not null"); } // Save component this.component = com...
private IModel originalModel; /** * Construct. * * @param component * subject of the change */ ModelChange(final Component<?> component) { if (component == null) { throw new IllegalArgumentException("argument component must be not null"); } // Save component this.component = com...
protected void setUp() throws Exception { super.setUp(); assertNotNull(containerUnderTest); assertTrue(containerUnderTest.startsWith("ecf.discovery.")); container = ContainerFactory.getDefault().createContainer(containerUnderTest); discoveryContainer = getAdapter(IDiscoveryContainerAdapter.class); assert...
protected void setUp() throws Exception { super.setUp(); assertNotNull(containerUnderTest); assertTrue(containerUnderTest.startsWith("ecf.discovery.")); container = ContainerFactory.getDefault().createContainer(containerUnderTest); discoveryContainer = getAdapter(IDiscoveryContainerAdapter.class); assert...
public void run(){ } } aspect A1 { pointcut TargetRunFlow () // ok if no cflow: within(Target) && execution(* *(..)) && !within(A1+); : !within(A1+) //cflow(within(Target) && execution(* *(..))) && !within(A1+) ;
public void run(){ } } aspect A1 { pointcut TargetRunFlow () // ok if no cflow: within(Target) && execution(* *(..)) && !within(A1+); : !within(A1+) && !preinitialization(new(..)) //cflow(within(Target) && execution(* *(..))) && !within(A1+) ;
public boolean isVisible() { return true; }
public boolean isVisible() { return delegate.isVisible(); }
public void execute() throws TaskException { if( countConditions() > 1 ) { throw new TaskException( "You must not nest more than one condition into <condition>" ); } if( countConditions() < 1 ) { throw new TaskException( "You must nest a co...
public void execute() throws TaskException { if( countConditions() > 1 ) { throw new TaskException( "You must not nest more than one condition into <condition>" ); } if( countConditions() < 1 ) { throw new TaskException( "You must nest a co...
public void execute() throws TaskException { // If we are a reference, the create a Path from the reference if( isReference() ) { path = new Path( getProject() ).createPath(); Object obj = refid.getReferencedObject( getProject() ); if( obj in...
public void execute() throws TaskException { // If we are a reference, the create a Path from the reference if( isReference() ) { path = new Path( getProject() ).createPath(); Object obj = refid.getReferencedObject( getProject() ); if( obj in...
public void execute() throws TaskException { if( countConditions() > 1 ) { throw new TaskException( "You must not nest more than one condition into <waitfor>" ); } if( countConditions() < 1 ) { throw new TaskException( "You must nest a cond...
public void execute() throws TaskException { if( countConditions() > 1 ) { throw new TaskException( "You must not nest more than one condition into <waitfor>" ); } if( countConditions() < 1 ) { throw new TaskException( "You must nest a cond...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } boolean textView_click...
public void addSelectionListener (SelectionListener listener) { checkWidget (); if (listener == null) error (SWT.ERROR_NULL_ARGUMENT); TypedListener typedListener = new TypedListener (listener); addListener (SWT.Selection, typedListener); addListener (SWT.DefaultSelection, typedListener); } boolean textView_click...
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); } void sendSelection () { NSEvent currEvent = NSApp...
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); } void sendSelection () { NSEvent currEvent = NSApp...
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); } void register () { super.register (); display.ad...
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); } void register () { super.register (); display.ad...
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); } void sendSelection () { Event event = new Event()...
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); } void sendSelection () { Event event = new Event()...
public void setVisible (boolean visible) { checkWidget (); if (this.visible == visible) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; } this.visible = visible; float /*double*/ width = image != null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); if (!vi...
public void setVisible (boolean visible) { checkWidget (); if (this.visible == visible) return; if (visible) { sendEvent (SWT.Show); if (isDisposed ()) return; } this.visible = visible; float /*double*/ width = image != null && visible ? image.handle.size().width + BORDER : 0; item.setLength(width); if (!vi...
public boolean isVisible () { checkWidget (); return getVisible (); } void onDispose (Event event) { Control parent = getParent (); parent.removeListener (SWT.Dispose, parentListener); removeListener (SWT.Dispose, listener); notifyListeners (SWT.Dispose, event); event.type = SWT.None; if (runnable != null) { ...
public boolean isVisible () { checkWidget (); return getVisible (); } void onDispose (Event event) { Control parent = getParent (); parent.removeListener (SWT.Dispose, parentListener); removeListener (SWT.Dispose, listener); notifyListeners (SWT.Dispose, event); event.type = SWT.None; if (runnable != null) { ...
protected void handleKeyPressed(KeyEvent evt) { if (evt.keyCode == SWT.CR) { handleEnter(); } }
protected void handleKeyPressed(KeyEvent evt) { if (evt.character == SWT.CR) { handleEnter(); } }
public Class getReturnType() { if (returnType == null) returnType = extractType(6); return returnType; } String toString(StringMaker sm) { //XXX this signature needs a lot of work StringBuffer buf = new StringBuffer("ADVICE: "); buf.append(sm.makeModifiersStr...
protected String createToString(StringMaker sm) { //XXX this signature needs a lot of work StringBuffer buf = new StringBuffer("ADVICE: "); buf.append(sm.makeModifiersString(getModifiers())); if (sm.includeArgs) buf.append(sm.makeTypeName(getReturnType())); if (sm.inc...
public String getParameterName() { if (parameterName == null) parameterName = extractString(4); return parameterName; } String toString(StringMaker sm) { return "catch(" + sm.makeTypeName(getParameterType()) + ")"; } }
protected String createToString(StringMaker sm) { return "catch(" + sm.makeTypeName(getParameterType()) + ")"; } }
public String getName() { return "<init>"; } String toString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); buf.append(sm.makePrimaryTypeName(getDeclaringType(),getDeclaringTypeName())); sm.addSignature(buf, getPa...
protected String createToString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); buf.append(sm.makePrimaryTypeName(getDeclaringType(),getDeclaringTypeName())); sm.addSignature(buf, getParameterTypes()); sm.addThrows(...
public SourceLocation makeSourceLoc(int line, int col) { return new SourceLocationImpl(lexicalClass, this.filename, line, col); }
public SourceLocation makeSourceLoc(int line, int col) { return new SourceLocationImpl(lexicalClass, this.filename, line); }
public Class getFieldType() { if (fieldType == null) fieldType = extractType(3); return fieldType; } String toString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); if (sm.includeArgs) buf.append(sm.mak...
protected String createToString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); if (sm.includeArgs) buf.append(sm.makeTypeName(getFieldType())); if (sm.includeArgs) buf.append(" "); buf.append(sm.makePrimary...
public String getName() { return Modifier.isStatic(getModifiers()) ? "<clinit>": "<init>"; } String toString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); buf.append(sm.makePrimaryTypeName(getDeclaringType(),get...
protected String createToString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); buf.append(sm.makePrimaryTypeName(getDeclaringType(),getDeclaringTypeName())); buf.append("."); buf.append(getName()); ...
public Class getReturnType() { if (returnType == null) returnType = extractType(6); return returnType; } String toString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); if (sm.includeArgs) buf.append(sm...
protected String createToString(StringMaker sm) { StringBuffer buf = new StringBuffer(); buf.append(sm.makeModifiersString(getModifiers())); if (sm.includeArgs) buf.append(sm.makeTypeName(getReturnType())); if (sm.includeArgs) buf.append(" "); buf.append(sm.makePrimar...
public NativeCommand(File directory, Map<String, String> env, String stdin, String stdout, String stderr) { super(directory, env, stdin, stdout, stderr); }
public NativeCommand(File directory, Map<String, String> env, String stdin, String stdout, String stderr) { super(directory, 0L, env, stdin, stdout, stderr); }
public static void main (String [] args) { File sourceDir = new File("src/org/eclipse/swt/snippets"); boolean hasSource = sourceDir.exists(); int count = 500; if (hasSource) { File [] files = sourceDir.listFiles(); if (files.length > 0) count = files.length; } for (int i = 1; i < count; i++) { if ...
public static void main (String [] args) { File sourceDir = new File("src/org/eclipse/swt/snippets"); boolean hasSource = sourceDir.exists(); int count = 500; if (hasSource) { File [] files = sourceDir.listFiles(); if (files.length > 0) count = files.length; } for (int i = 1; i < count; i++) { if ...
if (strNameAttr != null) { /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:...
if (strNameAttr != null) { /* * The Apache Software License, Version 1.1 * * * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met:...
public void setDigits (int value) { checkWidget (); if (value < 0) return; if (value == this.digits) return; this.digits = value; int pos = OS.GetControl32BitValue (buttonHandle); setSelection (pos, false); }
public void setDigits (int value) { checkWidget (); if (value < 0) error (SWT.ERROR_INVALID_ARGUMENT); if (value == this.digits) return; this.digits = value; int pos = OS.GetControl32BitValue (buttonHandle); setSelection (pos, false); }
public void setDigits (int digits) { checkWidget (); if (digits < 0) return; int oldDigits = OS.gtk_spin_button_get_digits (handle); if (digits == oldDigits) return; int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, hAd...
public void setDigits (int digits) { checkWidget (); if (digits < 0) error (SWT.ERROR_INVALID_ARGUMENT); int oldDigits = OS.gtk_spin_button_get_digits (handle); if (digits == oldDigits) return; int /*long*/ hAdjustment = OS.gtk_spin_button_get_adjustment (handle); GtkAdjustment adjustment = new GtkAdjustment (); ...
public void setDigits (int digits) { checkWidget (); if (digits < 0) return; int [] argList1 = {OS.XmNposition, 0}; OS.XtGetValues (handle, argList1, argList1.length / 2); int [] argList2 = {OS.XmNdecimalPoints, digits, OS.XmNposition, argList1 [1]}; OS.XtSetValues (handle, argList2, argList2.length / 2); }
public void setDigits (int digits) { checkWidget (); if (digits < 0) error (SWT.ERROR_INVALID_ARGUMENT); int [] argList1 = {OS.XmNposition, 0}; OS.XtGetValues (handle, argList1, argList1.length / 2); int [] argList2 = {OS.XmNdecimalPoints, digits, OS.XmNposition, argList1 [1]}; OS.XtSetValues (handle, argList2, a...
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled() == false) { disableLink(tag); } else if (getModel() != null) { Object hrefValue = getModelObject(); if (hrefValue != null) { String url = hrefValue.toString(); if (contextRelative) { ...
protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled() == false) { disableLink(tag); } else if (getModel() != null) { Object hrefValue = getModelObject(); if (hrefValue != null) { String url = hrefValue.toString(); if (contextRelative) { ...
private HTTPSampleResult fileSample(URI uri) throws IOException { String urlStr = uri.toString(); HTTPSampleResult res = new HTTPSampleResult(); res.setMonitor(isMonitor()); res.setHTTPMethod(GET); // Dummy res.setURL(new URL(urlStr)); res.setSampleLabel(urlStr); FileReader reader = null; res.samp...
private HTTPSampleResult fileSample(URI uri) throws IOException { String urlStr = uri.toString(); HTTPSampleResult res = new HTTPSampleResult(); res.setMonitor(isMonitor()); res.setHTTPMethod(GET); // Dummy res.setURL(new URL(urlStr)); res.setSampleLabel(urlStr); FileReader reader = null; res.samp...
private static char[] gHexChs = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; // initialize the above 3 arrays static { for (int i = 0; i <= 0x1f; i++) { gNeedEscaping[i] = true; gAfterEscaping1[i] = gHe...
private static char[] gHexChs = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; // initialize the above 3 arrays static { for (int i = 0; i <= 0x1f; i++) { gNeedEscaping[i] = true; gAfterEscaping1[i] = gHe...
protected Class<? extends JMeterProperty> getPropertyType() { if (value.size() > 0) { return value.iterator().next().getClass(); } return NullProperty.class; }
protected Class<? extends JMeterProperty> getPropertyType() { if (value != null && value.size() > 0) { return value.iterator().next().getClass(); } return NullProperty.class; }
private ImportEndpoint createAndRegisterProxy( EndpointDescription endpointDescription, IRemoteServiceContainer rsContainer, IRemoteServiceReference selectedRsReference) throws Exception { IRemoteServiceContainerAdapter containerAdapter = rsContainer .getContainerAdapter(); ID rsContainerID = rsConta...
private ImportEndpoint createAndRegisterProxy( EndpointDescription endpointDescription, IRemoteServiceContainer rsContainer, IRemoteServiceReference selectedRsReference) throws Exception { IRemoteServiceContainerAdapter containerAdapter = rsContainer .getContainerAdapter(); ID rsContainerID = rsConta...
if ((state & ACC.STATE_DISABLED) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ENABLED); /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made avail...
if ((state & ACC.STATE_DISABLED) == 0) ATK.atk_state_set_add_state (set, ATK.ATK_STATE_ENABLED); /******************************************************************************* * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made avail...
public MyPanel(String id) { super(id); add(new Label("label", "text")); addOrReplace(new Label("label", "text")); }
public MyPanel(String id) { super(id); add(new Label("label", "text")); addOrReplace(new Label("label", "Hello, World!")); }
private static final String PORTAL_URL = "http://28msec.dyndns.org:8080/";
private static final String PORTAL_URL = "http://portal.28msec.com/";
public Object getAttribute(String name) throws IllegalArgumentException { DOMParser domParser = null; try { // We create a dummy DocumentBuilderImpl in case the attribute // name is not one that is in the attributes hashtable. domParser = ...
public Object getAttribute(String name) throws IllegalArgumentException { DOMParser domParser = null; try { // We create a dummy DocumentBuilderImpl in case the attribute // name is not one that is in the attributes hashtable. domParser = ...
public Class getDestinationIdentity() { return page.getClass(); } })); } }
public Class getIdentity() { return page.getClass(); } })); } }
Iterator<IWizardStep> stepIterator(); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
Iterator<IWizardStep> stepIterator(); /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, V...
public ServerManager() { final IExtensionRegistry reg = Activator.getDefault().getExtensionRegistry(); try { if (reg != null) { createServersFromExtensionRegistry(reg); } else { createServersFromConfigurationFile(Activator.getDefault().getBundle().getEntry("server.xml").openStream()); //$NON-NLS-1$ ...
public ServerManager() { final IExtensionRegistry reg = Activator.getDefault().getExtensionRegistry(); try { if (reg != null && reg.getExtensionPoint(EXTENSION_POINT) != null) { createServersFromExtensionRegistry(reg); } else { createServersFromConfigurationFile(Activator.getDefault().getBundle().get...
public int getThumb () { checkWidget (); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, handle); return (int) adjustment.page_size; }
public int getThumb () { checkWidget (); GtkAdjustment adjustment = new GtkAdjustment (); OS.memmove (adjustment, adjustmentHandle); return (int) adjustment.page_size; }
public Object getObject(Component component) { ResourceReference ref = new ResourceReference(RESOURCE_NAME); return "var def=new wupb.Def('" + form.getMarkupId() + "', '" + statusDiv.getMarkupId() + "', '" + barDiv.getMarkupId() + "', '" + getPage().urlFor(ref) + "'); wupb.start(def); return ...
public Object getObject() { ResourceReference ref = new ResourceReference(RESOURCE_NAME); return "var def=new wupb.Def('" + form.getMarkupId() + "', '" + statusDiv.getMarkupId() + "', '" + barDiv.getMarkupId() + "', '" + getPage().urlFor(ref) + "'); wupb.start(def); return false;"; } }))...
public void create (Composite parent, int style) { /* * Note. Loading the webkit bundle on Jaguar causes a crash. * The workaround is to detect any OS prior to 10.30 and fail * without crashing. */ if (OS.VERSION < 0x1030) { browser.dispose(); SWT.error(SWT.ERROR_NO_HANDLES); } /* * Bug in Safari. For ...
public void create (Composite parent, int style) { /* * Note. Loading the webkit bundle on Jaguar causes a crash. * The workaround is to detect any OS prior to 10.30 and fail * without crashing. */ if (OS.VERSION < 0x1030) { browser.dispose(); SWT.error(SWT.ERROR_NO_HANDLES); } /* * Bug in Safari. For ...
public void run() { // Check which HTTPSampler class we should use String httpSamplerName = target.getSamplerTypeName(); // Instantiate the sampler HTTPSamplerBase sampler = HTTPSamplerFactory.newInstance(httpSamplerName); HttpRequestHdr request = new HttpRequestHdr(sampler)...
public void run() { // Check which HTTPSampler class we should use String httpSamplerName = target.getSamplerTypeName(); // Instantiate the sampler HTTPSamplerBase sampler = HTTPSamplerFactory.newInstance(httpSamplerName); HttpRequestHdr request = new HttpRequestHdr(sampler)...
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { editor = new J...
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) { editor = new J...
public void maybeConfigure(Project p, boolean configureChildren) throws BuildException { String id = null; if (proxyConfigured) { return; } // Configure the object Object target=(wrappedObject instanceof TaskAdapter) ? ((TaskAdapter)w...
public void maybeConfigure(Project p, boolean configureChildren) throws BuildException { String id = null; if (proxyConfigured) { return; } // Configure the object Object target=(wrappedObject instanceof TaskAdapter) ? ((TaskAdapter)w...
public Home() { add(new Applet("sprocket", new Model("foo"), Sprocket.class)); }
public Home() { add(new Applet("sprocket", new Model("foo"), SimpleApplet.class)); }
protected BSFBeanInfoSupport(Class beanClass) { super(beanClass); PropertyDescriptor p; p = property("scriptLanguage"); // $NON-NLS-1$ p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); // $NON-NLS-1$ createPropertyGroup("scriptingLanguage", // $NON-N...
protected BSFBeanInfoSupport(Class<?> beanClass) { super(beanClass); PropertyDescriptor p; p = property("scriptLanguage"); // $NON-NLS-1$ p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, ""); // $NON-NLS-1$ createPropertyGroup("scriptingLanguage", // $NO...
protected BeanShellBeanInfoSupport(Class beanClass) { super(beanClass); PropertyDescriptor p; p = property("resetInterpreter"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, Boolean.FALSE); p.setValue(NOT_EXPRESSION, Boolean.TRUE); p.setValue(N...
protected BeanShellBeanInfoSupport(Class<?> beanClass) { super(beanClass); PropertyDescriptor p; p = property("resetInterpreter"); p.setValue(NOT_UNDEFINED, Boolean.TRUE); p.setValue(DEFAULT, Boolean.FALSE); p.setValue(NOT_EXPRESSION, Boolean.TRUE); p.setValu...
public void process(String line) throws BuildException { if (parent.util.match("/^exit/", line)) { return; } //Throw exception on errors (except up-to-date) //p4 -s is unpredicatable. For example a server down //does not return error: markup // //...
public void process(String line) throws BuildException { if (parent.util.match("/^exit/", line)) { return; } //Throw exception on errors (except up-to-date) //p4 -s is unpredicatable. For example a server down //does not return error: markup // //...
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
public void drawImage(Image image, int srcX, int srcY, int srcWidth, int srcHeight, int destX, int destY, int destWidth, int destHeight) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (srcWidth == 0 || srcHeight == 0 || destWidth == 0 || destHeight == 0) return; if (srcX < 0 || srcY < 0 || srcWidth < 0...
public void setImage (Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error (SWT.ERROR_INVALID_ARGUMENT); } super.setImage (image); if (parent.sortColumn != this && parent.sortDirection != SWT.NULL) { setImage (image, false, false); } }
public void setImage (Image image) { checkWidget(); if (image != null && image.isDisposed ()) { error (SWT.ERROR_INVALID_ARGUMENT); } super.setImage (image); if (parent.sortColumn != this || parent.sortDirection != SWT.NULL) { setImage (image, false, false); } }