buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public void setParameters(Collection parameters) throws InvalidVariableException { log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) values[i]).ex...
public synchronized void setParameters(Collection parameters) throws InvalidVariableException { log.debug("setParameter - Collection.size=" + parameters.size()); values = parameters.toArray(); if (log.isDebugEnabled()) { for (int i = 0; i < parameters.size(); i++) { log.debug("i:" + ((CompoundVariable) ...
public String prepareEndpoint(IRemoteCall call, IRemoteCallable callable) { String resourcePath = callable.getResourcePath(); if (resourcePath == null || "".equals(resourcePath)) //$NON-NLS-1$ return null; // if resourcePath startswith http then we use it unmodified if (resourcePath.startsWith("http://")) /...
public String prepareEndpointAddress(IRemoteCall call, IRemoteCallable callable) { String resourcePath = callable.getResourcePath(); if (resourcePath == null || "".equals(resourcePath)) //$NON-NLS-1$ return null; // if resourcePath startswith http then we use it unmodified if (resourcePath.startsWith("http:...
protected Object invokeRemoteCall(final IRemoteCall call, final IRemoteCallable callable) throws ECFException { String uri = prepareEndpoint(call, callable); HttpMethod httpMethod = createAndPrepareHttpMethod(uri, call, callable); // execute method String responseBody = null; int responseCode = -1; try { ...
protected Object invokeRemoteCall(final IRemoteCall call, final IRemoteCallable callable) throws ECFException { String uri = prepareEndpointAddress(call, callable); HttpMethod httpMethod = createAndPrepareHttpMethod(uri, call, callable); // execute method String responseBody = null; int responseCode = -1; ...
public Member getAdviceSignature() { if (enclosingAdvice instanceof Advice) return ((Advice)enclosingAdvice).signature; else return null; }
public Member getAdviceSignature() { if (enclosingAdvice instanceof Advice) return ((Advice)enclosingAdvice).getSignature(); else return null; }
public void write(DataOutputStream s) throws IOException { getDeclaringType().write(s); s.writeInt(getModifiers()); s.writeUTF(getName()); TypeX.write(getParameterTypes(), s); pointcut.write(s); }
public void write(DataOutputStream s) throws IOException { getDeclaringType().write(s); s.writeInt(getModifiers()); s.writeUTF(getName()); TypeX.writeArray(getParameterTypes(), s); pointcut.write(s); }
public void write(DataOutputStream s) throws IOException { s.writeByte(Pointcut.CFLOW); entry.write(s); s.writeBoolean(isBelow); FileUtil.writeIntArray(s, freeVars); writeLocation(s); }
public void write(DataOutputStream s) throws IOException { s.writeByte(Pointcut.CFLOW); entry.write(s); s.writeBoolean(isBelow); FileUtil.writeIntArray(freeVars, s); writeLocation(s); }
public ResourceReference get(Class<?> scope, String name, Locale locale, String style, String variation, boolean strict) { return registry.getResourceReference(scope, name, locale, style, variation, strict); }
public ResourceReference get(Class<?> scope, String name, Locale locale, String style, String variation, boolean strict) { return registry.getResourceReference(scope, name, locale, style, variation, strict, true); }
public IRequestHandler mapRequest(Request request) { Url url = request.getUrl(); if (url.getSegments().size() >= 4 && urlStartsWith(url, getContext().getNamespace(), getContext().getResourceIdentifier())) { String className = url.getSegments().get(2); StringBuilder name = new StringBuilder(); for (...
public IRequestHandler mapRequest(Request request) { Url url = request.getUrl(); if (url.getSegments().size() >= 4 && urlStartsWith(url, getContext().getNamespace(), getContext().getResourceIdentifier())) { String className = url.getSegments().get(2); StringBuilder name = new StringBuilder(); for (...
public int hashCode() { return Objects.hashCode(getLocale(), getStyle(), getVariation()); } };
public int hashCode() { return Objects.hashCode(getLocale(), getStyle(), getVariation()); } }
public Object getJoinValue(Object fieldVal, Column col, JDBCStore store) { Object o = field.getForeignKey().getConstant(col); if (o != null) return o; col = field.getForeignKey().getPrimaryKeyColumn(col); if (col == null) throw new InternalException(); ...
public Object getJoinValue(Object fieldVal, Column col, JDBCStore store) { Object o = field.getForeignKey().getConstant(col); if (o != null) return o; col = field.getForeignKey().getPrimaryKeyColumn(col); if (col == null) throw new InternalException(); ...
public void setRequestToComponent(final Component component) { final IPageMap pageMap = component.getPage().getPageMap(); final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName(); if (component instanceof BookmarkablePageLink) { final Class clazz = ((BookmarkablePageLink)component).getPageCl...
public void setRequestToComponent(final Component component) { final IPageMap pageMap = component.getPage().getPageMap(); final String pageMapName = pageMap.isDefault() ? "" : pageMap.getName(); if (component instanceof BookmarkablePageLink) { final Class clazz = ((BookmarkablePageLink)component).getPageCl...
public TreeItem getTopItem () { checkWidget (); if (availableItems.length == 0) return null; return availableItems [topIndex]; } Image getUncheckedImage () { return (Image) display.getData (ID_UNCHECKED); } void handleEvents (Event event) { switch (event.type) { case SWT.Paint: if (event.widget == header) { ...
public TreeItem getTopItem () { checkWidget (); if (availableItems.length == 0) return null; return availableItems [topIndex]; } Image getUncheckedImage () { return (Image) display.getData (ID_UNCHECKED); } void handleEvents (Event event) { switch (event.type) { case SWT.Paint: if (event.widget == header) { ...
protected final void checkValidators() { final int size = validators_size(); int i = 0; IValidator validator = null; try { for (i = 0; i < size; i++) { validator = validators_get(i); validator.validate(this); if (!isValid()) { break; } } } catch (Exception e) { th...
protected final void checkValidators() { final int size = validators_size(); int i = 0; IValidator validator = null; try { for (i = 0; i < size; i++) { validator = validators_get(i); validator.validate(this); if (!isValid()) { break; } } } catch (Exception e) { th...
public String toString() { StringBuffer sb = new StringBuffer(); if (sourceFile != ISourceLocation.NO_FILE) { sb.append(sourceFile.getPath()); sb.append(":"); } sb.append("" + startLine); if (!noColumn) { sb.append(":" + column); ...
public String toString() { StringBuffer sb = new StringBuffer(); if (sourceFile != ISourceLocation.NO_FILE) { sb.append(sourceFile.getPath()); sb.append(":"); } sb.append("" + startLine + "-" + endLine); if (!noColumn) { sb.append(...
private void addThemAll() { this.setJMenuBar(menuBar); all = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); { gbc.gridx = 0; gbc.gridy = 0; gbc.gridheight = 1; gbc.gridwidth = 1; gbc.fill = gbc.BOTH; gbc.weightx = 1; gbc.weighty = 0; all.add(toolPan...
private void addThemAll() { this.setJMenuBar(menuBar); all = new JPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); { gbc.gridx = 0; gbc.gridy = 0; gbc.gridheight = 1; gbc.gridwidth = 1; gbc.fill = GridBagConstraints.BOTH; gbc.weightx = 1; gbc.weighty = 0; ...
private HTTPSampler makeUrlConfig(String path) { HTTPSampler config = new HTTPSampler(); config.setDomain("www.apache.org"); config.setMethod(config.GET); config.setPath(path); config.setPort(80); config.setProtocol("http"); return config; }
private HTTPSampler makeUrlConfig(String path) { HTTPSampler config = new HTTPSampler(); config.setDomain("www.apache.org"); config.setMethod(HTTPSampler.GET); config.setPath(path); config.setPort(80); config.setProtocol("http"); return config; }
public Value toValue(ExpressionFactory factory, MetamodelImpl model, CriteriaQueryImpl q) { q.registerParameter(this); ClassMetaData meta = null; Class<?> clzz = getJavaType(); Object paramKey = getKey(); int index = getIndex(); boolean isCollectionV...
public Value toValue(ExpressionFactory factory, MetamodelImpl model, CriteriaQueryImpl<?> q) { q.registerParameter(this); ClassMetaData meta = null; Class<?> clzz = getJavaType(); Object paramKey = getKey(); int index = getIndex(); boolean isCollecti...
public PredicateImpl clone() { PredicateImpl clone = new PredicateImpl(_op); if (_exps != null) clone._exps = new ArrayList<Expression<Boolean>>(this._exps); return clone; } @Override org.apache.openjpa.kernel.exps.Expression toKernelExpression( ExpressionFac...
public PredicateImpl clone() { PredicateImpl clone = new PredicateImpl(_op); if (_exps != null) clone._exps = new ArrayList<Expression<Boolean>>(this._exps); return clone; } @Override org.apache.openjpa.kernel.exps.Expression toKernelExpression( ExpressionFac...
public BoxBorderTestPage_11() { Border border = new TogglePanel("border", new Model<String>("model")); add(border); border.addToBorderBody(new Label("label", "my test")); }
public BoxBorderTestPage_11() { Border border = new TogglePanel("border", new Model<String>("model")); add(border); border.addToBody(new Label("label", "my test")); }
public BoxBorderTestPage_9() { Border myBorder = new BorderComponent1("myBorder"); add(myBorder); Fragment panel1 = new Fragment("fragmentsWillBeRenderedHere", "fragmentSource", myBorder.getBodyContainer()); myBorder.addToBorderBody(panel1); }
public BoxBorderTestPage_9() { Border myBorder = new BorderComponent1("myBorder"); add(myBorder); Fragment panel1 = new Fragment("fragmentsWillBeRenderedHere", "fragmentSource", myBorder.getBodyContainer()); myBorder.addToBody(panel1); }
public HideableBorderPage() { border = new HideableBorder("hideable"); add(border); border.addToBorderBody(new Label("content", "label")); }
public HideableBorderPage() { border = new HideableBorder("hideable"); add(border); border.addToBody(new Label("content", "label")); }
protected void onSubmit() { super.onSubmit(); info("form submitted"); } }; LocalizedFeedbackBorder brdr = new LocalizedFeedbackBorder("fieldborder"); TextField<String> field = new TextField<String>("field", new Model<String>("")); field.info("info on field"); brdr.add(field.setRequired(true))...
protected void onSubmit() { super.onSubmit(); info("form submitted"); } }; LocalizedFeedbackBorder brdr = new LocalizedFeedbackBorder("fieldborder"); TextField<String> field = new TextField<String>("field", new Model<String>("")); field.info("info on field"); brdr.addToBody(field.setRequired(...
private void addToBorder(final Component child) { border.addToBorderBody(child); }
private void addToBorder(final Component child) { border.addToBody(child); }
public BookingForm(String s) { super(s); setDefaultModel(new CompoundPropertyModel<Booking>(booking)); TextField<String> name = new TextField<String>("partyDetails.name"); name.setRequired(Boolean.TRUE); name.add(new StringValidator.LengthBetweenValidator(1, 30)); FormComponentFeedbackBorder nam...
public BookingForm(String s) { super(s); setDefaultModel(new CompoundPropertyModel<Booking>(booking)); TextField<String> name = new TextField<String>("partyDetails.name"); name.setRequired(Boolean.TRUE); name.add(new StringValidator.LengthBetweenValidator(1, 30)); FormComponentFeedbackBorder nam...
private static BackendType[] superTypes(Class<?> javaCls, BackendTypesystem ts) { final List<Class<?>> resultRaw = new ArrayList<Class<?>>(Arrays.<Class<?>> asList(javaCls.getInterfaces())); Class<?> superClass = javaCls.getSuperclass(); if (superClass != null) resultRaw.add(superClass); final List<Backend...
private static BackendType[] superTypes(Class<?> javaCls, BackendTypesystem ts) { final List<Class<?>> resultRaw = new ArrayList<Class<?>>(Arrays.<Class<?>> asList(javaCls.getInterfaces())); Class<?> superClass = javaCls.getSuperclass(); if (superClass != null) resultRaw.add(superClass); final List<Backend...
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_ARROW: shape = OS.GDK_LEFT_PTR; break; case SWT.CURSOR_WAIT: shape = OS.GDK_WATCH; break; ...
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_ARROW: shape = OS.GDK_LEFT_PTR; break; case SWT.CURSOR_WAIT: shape = OS.GDK_WATCH; break; ...
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_ARROW: shape = OS.XC_left_ptr; break; case SWT.CURSOR_WAIT: shape = OS.XC_watch; break; cas...
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_ARROW: shape = OS.XC_left_ptr; break; case SWT.CURSOR_WAIT: shape = OS.XC_watch; break; cas...
public void onValidate() { onValidate(getStringValue()); }
public void onValidate() { onValidate(getInput()); }
public int getBatchUpdateCount(PreparedStatement ps) throws SQLException { int updateSuccessCnt = 0; if (batchLimit > 0 && ps != null) { updateSuccessCnt = ps.getUpdateCount(); if (log.isTraceEnabled()) log.trace(_loc.get("batch-update-success-count", ...
public int getBatchUpdateCount(PreparedStatement ps) throws SQLException { int updateSuccessCnt = 0; if (batchLimit != 0 && ps != null) { updateSuccessCnt = ps.getUpdateCount(); if (log.isTraceEnabled()) log.trace(_loc.get("batch-update-success-count", ...
public boolean isEnabled () { return getEnabled () && parent.isEnabled (); } void releaseChild () { super.releaseChild (); if (menu != null) menu.dispose (); menu = null; parent.destroyItem (this); } void releaseMenu () { if (!OS.IsSP) setMenu (null); menu = null; } void releaseWidget () { if (menu != null) ...
public boolean isEnabled () { return getEnabled () && parent.isEnabled (); } void releaseChild () { super.releaseChild (); if (menu != null) menu.dispose (); menu = null; parent.destroyItem (this); } void releaseMenu () { if (!OS.IsSP) setMenu (null); menu = null; } void releaseWidget () { if (menu != null) ...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; int oldWidth = OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0); TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = OS.SendMessage (hwnd, OS.LVM_GETSTRING...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int hwnd = parent.handle; int oldWidth = OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0); TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = OS.SendMessage (hwnd, OS.LVM_GETSTRING...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int columnWidth = 0; int hwnd = parent.handle; int hDC = OS.GetDC (hwnd); int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont); int cp =...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int columnWidth = 0; int hwnd = parent.handle; int hDC = OS.GetDC (hwnd); int oldFont = 0, newFont = OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0); if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont); int cp =...
protected String resourceKey(T object) { return object.getClass().getSimpleName() + "." + object.name(); }
protected String resourceKey(T object) { return object.getDeclaringClass().getSimpleName() + "." + object.name(); }
public Object getParent(); }
public IRosterItem getParent(); }
public void log(String msg, int msgLevel) { if (project != null) { project.log(msg, msgLevel); } else { // 'reasonable' default, if the component is used without // a Project ( for example as a standalone Bean ). // Most ant components can be used this...
public void log(String msg, int msgLevel) { if (project != null) { project.log(msg, msgLevel); } else { // 'reasonable' default, if the component is used without // a Project ( for example as a standalone Bean ). // Most ant components can be used this...
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); if (count == itemsCount) return; int redrawStart, redrawEnd; /* if the new item count is less than the current count then remove all excess items from the end */ if (count < itemsCount) { redrawStart = count; redrawEnd = ite...
public void setItemCount (int count) { checkWidget (); count = Math.max (0, count); if (count == itemsCount) return; int redrawStart, redrawEnd; /* if the new item count is less than the current count then remove all excess items from the end */ if (count < itemsCount) { redrawStart = count; redrawEnd = ite...
public final boolean isStateless() { if (!getStatelessHint()) { return false; } final Iterator behaviors = getBehaviors().iterator(); while (behaviors.hasNext()) { IBehavior behavior = (IBehavior)behaviors.next(); if (!behavior.getStatelessHint()) { return false; } }
public final boolean isStateless() { if (!getStatelessHint()) { return false; } final Iterator behaviors = getBehaviors().iterator(); while (behaviors.hasNext()) { IBehavior behavior = (IBehavior)behaviors.next(); if (!behavior.getStatelessHint(this)) { return false; } }
public ClassLoader getClassLoader() { if (myClassLoader == null) { myClassLoader = (classpath == null) // the usual classloader ? getClass().getClassLoader() // additional use the provided classpath ...
public ClassLoader getClassLoader() { if (myClassLoader == null) { myClassLoader = (classpath == null) // the usual classloader ? getClass().getClassLoader() // additional use the provided classpath ...
public void testCleanup() throws BuildException { Path path = new Path(p, "."); AntClassLoader loader = new AntClassLoader(p, path); try { // we don't expect to find this loader.findClass("fubar"); fail("Did not expect to find fubar class"); } catc...
public void testCleanup() throws BuildException { Path path = new Path(p, "."); AntClassLoader loader = p.createClassLoader(path); try { // we don't expect to find this loader.findClass("fubar"); fail("Did not expect to find fubar class"); } catch ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0, border = getBorderWidth (); if ((style & SWT.ARROW) != 0) { if ((style & (SWT.UP | SWT.DOWN)) != 0) { width += OS.GetSystemMetrics (OS.SM_CXVSCROLL); height += OS.GetSystemMetrics (OS.SM_CYVSCROLL); ...
public Point computeSize (int wHint, int hHint, boolean changed) { checkWidget (); int width = 0, height = 0, border = getBorderWidth (); if ((style & SWT.ARROW) != 0) { if ((style & (SWT.UP | SWT.DOWN)) != 0) { width += OS.GetSystemMetrics (OS.SM_CXVSCROLL); height += OS.GetSystemMetrics (OS.SM_CYVSCROLL); ...
private Integer propertyOrder(PropertyDescriptor d) { Integer order = (Integer) d.getValue(ORDER); if (order == null) { order = Integer.valueOf(0); } return order; } } /** * Save values from the GUI fields into the property ma...
private Integer propertyOrder(PropertyDescriptor d) { Integer order = (Integer) d.getValue(ORDER); if (order == null) { order = Integer.valueOf(0); } return order; } } /** * Save values from the GUI fields into the property ma...
public String toString() { return "RequestListenerInterface{name=" + name + ",method=" + method + "}"; }
public String toString() { return "[RequestListenerInterface name=" + name + ", method=" + method + "]"; }
public void copyFile(File sourceFile, File destFile, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, String inputEncoding, String outputEncoding, Project project) ...
public void copyFile(File sourceFile, File destFile, FilterSetCollection filters, Vector filterChains, boolean overwrite, boolean preserveLastModified, String inputEncoding, String outputEncoding, Project project) ...
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException { ((HttpURLConnection) connection).setRequestMethod("POST"); // If filename was specified then send the post using multipart syntax String filename = sampler.getFileField(); if ((filename != null) && (filename.trim().leng...
public void setHeaders(URLConnection connection, HTTPSampler sampler) throws IOException { ((HttpURLConnection) connection).setRequestMethod("POST"); // If filename was specified then send the post using multipart syntax String filename = sampler.getFilename(); if ((filename != null) && (filename.trim().lengt...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim(x, y, width, height); NSRect rect = new NSRect (); rect.x = trim.x; rect.y = trim.y; rect.width = trim.width; rect.height = trim.height; if (window != null) { if (!fixResize()) { rect = wi...
public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); Rectangle trim = super.computeTrim(x, y, width, height); NSRect rect = new NSRect (); rect.x = trim.x; rect.y = trim.y; rect.width = trim.width; rect.height = trim.height; if (window != null) { if (!fixResize()) { rect = wi...
private ServiceInfo createServiceInfoFromIServiceInfo(IServiceInfo serviceInfo) { if (serviceInfo == null) return null; final IServiceID sID = serviceInfo.getServiceID(); final Hashtable props = new Hashtable(); final IServiceProperties svcProps = serviceInfo.getServiceProperties(); if (svcProps != null) ...
private ServiceInfo createServiceInfoFromIServiceInfo(IServiceInfo serviceInfo) { if (serviceInfo == null) return null; final IServiceID sID = serviceInfo.getServiceID(); final Hashtable props = new Hashtable(); final IServiceProperties svcProps = serviceInfo.getServiceProperties(); if (svcProps != null) ...
public Object result() { return EXPECTED; } } aspect A { static { Tester.expectEvent("void C.run()"); Tester.expectEvent("Object C.result()"); } // no compile error expected (also note: message jp signatures are wrong?) void around() : target(C) && call(* r*(..)) { Tester.ev...
public Object result() { return EXPECTED; } } aspect A { static { Tester.expectEvent("void C.run()"); Tester.expectEvent("Object C.result()"); } // no compile error expected (also note: message jp signatures are wrong?) void around() : target(C) && call(* r*(..)) { // CE can't appl...
public final void inputChanged() { if (isVisibleInHierarchy() && isEnabled()) { // Get input as String array final String[] input = inputAsStringArray(); // If there is any input if (input != null) { // join the values together with ";", for example, "id1;id2;id3" rawInput = StringList.val...
public final void inputChanged() { if (isVisibleInHierarchy() && isEnabled()) { // Get input as String array final String[] input = inputAsStringArray(); // If there is any input if (input != null) { // join the values together with ";", for example, "id1;id2;id3" rawInput = StringList.val...
public void testExecution() throws Exception { File testPom = new File( getBasedir(), "target/test-classes/projects/project-01/plugin-config.xml" ); OpenJpaEnhancerMojo mojo = (OpenJpaEnhancerMojo) lookupMojo( "enhance", testPom ); assertNotNull( mojo ); mojo.classes = new File...
public void testExecution() throws Exception { File testPom = new File( getBasedir(), "target/test-classes/projects/project-01/plugin-config.xml" ); OpenJpaEnhancerMojo mojo = (OpenJpaEnhancerMojo) lookupMojo( "enhance", testPom ); assertNotNull( mojo ); mojo.classes = new File...
public void appendType(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) { Discriminator disc = null; ClassMapping sup = _class; while (sup.getMappedPCSuperclassMapping() != null) sup = sup.getMappedPCSuperclassMapping(); disc = sup.getDiscriminator(); ...
public void appendType(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql) { Discriminator disc = null; ClassMapping sup = _class; while (sup.getMappedPCSuperclassMapping() != null) sup = sup.getMappedPCSuperclassMapping(); disc = sup.getDiscriminator(); ...
public void modifyTestElement(TestElement c) { if (c instanceof CounterConfig) { CounterConfig config = (CounterConfig) c; config.setStart(startField.getText()); if (endField.getText().length() > 0) { config.setEnd(endField.getText(...
public void modifyTestElement(TestElement c) { if (c instanceof CounterConfig) { CounterConfig config = (CounterConfig) c; config.setStart(startField.getText()); //Bug 22820 if (endField.getText().length() > 0) { config.setEnd(endFi...
public void mouseClicked(MouseEvent e) { about.setVisible(false); } }); JLabel jmeter = new JLabel(JMeterUtils.getImage("jmeter.jpg")); JLabel copyright = new JLabel( "Copyright (...
public void mouseClicked(MouseEvent e) { about.setVisible(false); } }); JLabel jmeter = new JLabel(JMeterUtils.getImage("jmeter.jpg")); JLabel copyright = new JLabel( JMeterUtils....
public String getRateString() { double rate = getRate(); if (rate == Double.MAX_VALUE) { return "N/A"; } String unit = "sec"; if (rate < 1.0) { rate *= 60.0; unit = "min"; } if (rate < 1.0) { ...
public String getRateString() { double rate = getRate(); if (rate == Double.MAX_VALUE) { return "N/A"; } String unit = "sec"; if (rate < 1.0) { rate *= 60.0; unit = "min"; } if (rate < 1.0) { ...
protected String getSuffix() { return "<br>\n"; }
protected String getSuffix() { return "<br/>\n"; }
public Object evaluateInternal(final ExecutionContext ctx) { // evaluate from left to right // first the target Object targetObj = null; if (getTarget()!=null) { targetObj = getTarget().evaluate(ctx); } // then the parameters in the defined order final Object[] evaluatedParams = new Object[getParams()...
public Object evaluateInternal(final ExecutionContext ctx) { // evaluate from left to right // first the target Object targetObj = null; if (getTarget()!=null) { targetObj = getTarget().evaluate(ctx); } // then the parameters in the defined order final Object[] evaluatedParams = new Object[getParams()...
private WifiConfiguration changeNetworkCommon(NetworkSetting input){ statusView.setText("Creating settings..."); Log.d(TAG, "Adding new configuration: \nSSID: " + input.getSsid() + "\nType: " + input.getNetworkType()); WifiConfiguration config = new WifiConfiguration(); config.allowedAuthAlgorithms.c...
private WifiConfiguration changeNetworkCommon(NetworkSetting input){ statusView.setText(R.string.wifi_creating_network); Log.d(TAG, "Adding new configuration: \nSSID: " + input.getSsid() + "\nType: " + input.getNetworkType()); WifiConfiguration config = new WifiConfiguration(); config.allowedAuthAlgo...
public void targetStarted(BuildEvent event) { if (msgOutputLevel <= Project.MSG_INFO) { out.println(lSep + event.getTarget().getName() + ":"); } }
public void targetStarted(BuildEvent event) { if (Project.MSG_INFO <= msgOutputLevel) { out.println(lSep + event.getTarget().getName() + ":"); } }
private static final String VERSION = "2.1.1"; static final String COPYRIGHT = "Copyright (c) 1998-2005 The Apache Software Foundation";
private static final String VERSION = "2.1.1"; static final String COPYRIGHT = "Copyright (c) 1998-2006 The Apache Software Foundation";
public void execute() throws TaskException { if( defaultSetDefined || defaultSet.getDir( getProject() ) == null ) { super.execute(); } else if( isValidOs() ) { // we are chmodding the given directory createArg().setValue( defaul...
public void execute() throws TaskException { if( defaultSetDefined || defaultSet.getDir( getProject() ) == null ) { super.execute(); } else if( isValidOs() ) { // we are chmodding the given directory createArg().setValue( defaul...
public static void log(Throwable exception) { CXFConsumptionCorePlugin.log(new Status(IStatus.ERROR, CXFConsumptionCorePlugin.PLUGIN_ID, exception.getLocalizedMessage(), exception)); }
public static void log(Throwable exception) { CXFConsumptionCorePlugin.log(new Status(IStatus.ERROR, CXFConsumptionCorePlugin.PLUGIN_ID, exception.toString(), exception)); }
public static void log(Throwable exception) { CXFConsumptionUIPlugin.log(new Status(IStatus.ERROR, CXFConsumptionUIPlugin.PLUGIN_ID, exception.getLocalizedMessage(), exception)); }
public static void log(Throwable exception) { CXFConsumptionUIPlugin.log(new Status(IStatus.ERROR, CXFConsumptionUIPlugin.PLUGIN_ID, exception.toString(), exception)); }
public static void log(Throwable exception) { CXFCorePlugin.log(new Status(IStatus.ERROR, CXFCorePlugin.PLUGIN_ID, exception.getLocalizedMessage(), exception)); }
public static void log(Throwable exception) { CXFCorePlugin.log(new Status(IStatus.ERROR, CXFCorePlugin.PLUGIN_ID, exception.toString(), exception)); }
public static void log(Throwable exception) { CXFCreationUIPlugin.log(new Status(IStatus.ERROR, CXFCreationUIPlugin.PLUGIN_ID, exception.getLocalizedMessage(), exception)); }
public static void log(Throwable exception) { CXFCreationUIPlugin.log(new Status(IStatus.ERROR, CXFCreationUIPlugin.PLUGIN_ID, exception.toString(), exception)); }
public static void log(Throwable exception) { CXFUIPlugin.log(new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID, exception.getLocalizedMessage(), exception)); }
public static void log(Throwable exception) { CXFUIPlugin.log(new Status(IStatus.ERROR, CXFUIPlugin.PLUGIN_ID, exception.toString(), exception)); }
public MockServletContext(final Application application, final String path) { this.application = application; webappRoot = null; if (path != null) { webappRoot = new File(path); if (!webappRoot.exists() || !webappRoot.isDirectory()) { log.warn("WARNING: The webapp root directory is invalid: " + ...
public MockServletContext(final Application application, final String path) { this.application = application; webappRoot = null; if (path != null) { webappRoot = new File(path); if (!webappRoot.exists() || !webappRoot.isDirectory()) { log.warn("WARNING: The webapp root directory is invalid: " + ...
public void initSettings() { getPages().setHomePage(SpringHtmlPage.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
public void initSettings() { getPages().setHomePage(SpringWebPage.class); getSettings().setResourcePollFrequency(Duration.ONE_SECOND); }
protected String getMarkupType() { throw new IllegalStateException( exceptionMessage("You cannot directly subclass Page or Container. Instead, subclass a markup-specific class, such as HtmlPage or HtmlContainer")); }
protected String getMarkupType() { throw new IllegalStateException( exceptionMessage("You cannot directly subclass Page or Container. Instead, subclass a markup-specific class, such as WebPage or WebContainer")); }
public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException { if (!context.isEntityDeclared((String)value)) { throw new InvalidDatatypeValueException("UndeclaredEntity", new Object[]{value}); } }
public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException { if (!context.isEntityUnparsed((String)value)) { throw new InvalidDatatypeValueException("UndeclaredEntity", new Object[]{value}); } }
public OptionsFrame(IconRegistry icons) { try { jbInit(); this.setTitle("AJDE Settings"); this.setIconImage(((ImageIcon)icons.getBrowserOptionsIcon()).getImage()); this.setSize(500, 500); this.setLocation(200, 100); version_label.setText("Vers...
public OptionsFrame(IconRegistry icons) { try { jbInit(); this.setTitle("AJDE Settings"); this.setIconImage(((ImageIcon)icons.getBrowserOptionsIcon()).getImage()); this.setSize(500, 500); this.setLocation(200, 100); version_label.setText("Vers...
public void testVersion() { if (Version.time_text.equals("")) return; // dev build, we can only test this on the build server. Date date = new Date(Version.time); SimpleDateFormat format = new SimpleDateFormat(Version.SIMPLE_DATE_FORMAT, Locale.getDefault()); format.setTimeZone(TimeZon...
public void testVersion() { if (Version.time_text.equals("")) return; // dev build, we can only test this on the build server. Date date = new Date(Version.getTime()); SimpleDateFormat format = new SimpleDateFormat(Version.SIMPLE_DATE_FORMAT, Locale.getDefault()); format.setTimeZone(Ti...
public Object validate(String content, Object state) throws InvalidDatatypeValueException { if ( fDerivedByList == false ) { //derived by restriction if ( this.fBaseValidator != null ) {//validate against parent type if any //System.out.println( "validator = " + this.fBaseValid...
public Object validate(String content, Object state) throws InvalidDatatypeValueException { if ( fDerivedByList == false ) { //derived by restriction if ( this.fBaseValidator != null ) {//validate against parent type if any //System.out.println( "validator = " + this.fBaseValid...
public ServiceURL getServiceURL() throws ServiceLocationException { IServiceTypeID stid = getServiceID().getServiceTypeID(); return new ServiceURL(stid.getInternal() + "://" + getLocation().getScheme() + "://" + getLocation().getAuthority(), ServiceURL.LIFETIME_PERMANENT); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$...
public ServiceURL getServiceURL() throws ServiceLocationException { IServiceTypeID stid = getServiceID().getServiceTypeID(); return new ServiceURL(stid.getInternal() + "://" + getLocation().getScheme() + "://" + getLocation().getAuthority(), ServiceURL.LIFETIME_PERMANENT); //$NON-NLS-1$ //$NON-NLS-2$ }
protected void onComponentTag(final ComponentTag tag) { if (getFlag(FLAG_OUTPUT_MARKUP_ID)) { tag.put(MARKUP_ID_ATTR_NAME, getMarkupId()); }
protected void onComponentTag(final ComponentTag tag) { if (getFlag(FLAG_OUTPUT_MARKUP_ID) && !tag.getAttributes().containsKey(MARKUP_ID_ATTR_NAME)) { tag.put(MARKUP_ID_ATTR_NAME, getMarkupId()); }
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { if (childComponent == null) { childComponent = getChildComponent(childId); } if (childComponent == this) { throw new WicketRuntimeException( "Programming error: childComponent == enclose component; endless loop")...
protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) { if (childComponent == null) { childComponent = getChildComponent(childId); } if (childComponent == this) { throw new WicketRuntimeException( "Programming error: childComponent == enclose component; endless loop")...
protected void setEnumeration (Vector enumeration) throws InvalidDatatypeValueException{ if ( enumeration != null ) { fEnumeration = new Double[enumeration.size()]; Object baseEnum=null; try { for ( int i = 0; i < enumeration.size(); i++ ) { ...
protected void setEnumeration (Vector enumeration) throws InvalidDatatypeValueException{ if ( enumeration != null ) { fEnumeration = new Double[enumeration.size()]; Object baseEnum=null; try { for ( int i = 0; i < enumeration.size(); i++ ) { ...
public final Iterator iterator(Comparator comparator) { final List sorted; if (children == null) { sorted = Collections.EMPTY_LIST; } else { if (children instanceof Component) { sorted = new ArrayList(1); sorted.add(children); } else { sorted = Arrays.asList((Component[])chil...
public final Iterator iterator(Comparator comparator) { final List sorted; if (children == null) { sorted = Collections.EMPTY_LIST; } else { if (children instanceof Component) { sorted = new ArrayList(1); sorted.add(children); } else { sorted = Arrays.asList((Component[])chil...
private int traverseAttributeDecl( Element attrDecl, ComplexTypeInfo typeInfo, boolean referredTo ) throws Exception { // General Attribute Checking int scope = isTopLevel(attrDecl)? GeneralAttrCheck.ELE_CONTEXT_GLOBAL: GeneralAttrCheck.ELE_CONTEXT_LOCAL; ...
private int traverseAttributeDecl( Element attrDecl, ComplexTypeInfo typeInfo, boolean referredTo ) throws Exception { // General Attribute Checking int scope = isTopLevel(attrDecl)? GeneralAttrCheck.ELE_CONTEXT_GLOBAL: GeneralAttrCheck.ELE_CONTEXT_LOCAL; ...
public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; } Widget getItem(Table table, int x, int y) { Point coordinates = new Point(x, y); coordinates = ...
public Widget getItem(int x, int y) { if (control instanceof Table) { return getItem((Table) control, x, y); } if (control instanceof Tree) { return getItem((Tree) control, x, y); } return null; } Widget getItem(Table table, int x, int y) { Point coordinates = new Point(x, y); coordinates = ...
public static List getPackagesInModel() { List packages = new ArrayList(); StructureModel model = Ajde.getDefault().getStructureModelManager().getStructureModel(); if (model.equals(StructureModel.NO_STRUCTURE)) { return null; } else { return getPackagesHelper( (IProgramElement) model.getRoot(), ...
public static List getPackagesInModel() { List packages = new ArrayList(); StructureModel model = Ajde.getDefault().getStructureModelManager().getModel(); if (model.equals(StructureModel.NO_STRUCTURE)) { return null; } else { return getPackagesHelper( (IProgramElement) model.getRoot(), IProgra...
public List findMatches( String pattern, IProgramElement.Kind kind) { List matches = new ArrayList(); StructureModel model = Ajde.getDefault().getStructureModelManager().getStructureModel(); if (model.equals(StructureModel.NO_STRUCTURE)) { return null; } else { return findMatchesHelper((IProgramE...
public List findMatches( String pattern, IProgramElement.Kind kind) { List matches = new ArrayList(); StructureModel model = Ajde.getDefault().getStructureModelManager().getModel(); if (model.equals(StructureModel.NO_STRUCTURE)) { return null; } else { return findMatchesHelper((IProgramElement)mo...
public void actionPerformed(ActionEvent e) { Ajde.getDefault().getConfigurationManager().setActiveConfigFile(buildConfig); // ??? should we be able to do a build refresh if shift is down? // if (EditorManager.isShiftDown(e.getModifiers())) { // A...
public void actionPerformed(ActionEvent e) { Ajde.getDefault().getConfigurationManager().setActiveConfigFile(buildConfig); // ??? should we be able to do a build refresh if shift is down? // if (EditorManager.isShiftDown(e.getModifiers())) { // A...
public static Test suite() { TestSuite suite = new TestSuite(AjdeTests.class.getName()); //$JUnit-BEGIN$ suite.addTestSuite(BuildOptionsTest.class); suite.addTestSuite(BuildConfigurationTests.class); suite.addTestSuite(StructureModelRegressionTest.class); suite.add...
public static Test suite() { TestSuite suite = new TestSuite(AjdeTests.class.getName()); //$JUnit-BEGIN$ suite.addTestSuite(BuildOptionsTest.class); suite.addTestSuite(BuildConfigurationTests.class); suite.addTestSuite(StructureModelRegressionTest.class); suite.add...
public void setRootNode(StructureViewNode rootNode) { super.setRootNode(rootNode); notifyViewUpdated(); } }
public void setRootNode(IStructureViewNode rootNode) { super.setRootNode(rootNode); notifyViewUpdated(); } }
public void testSimpleStructure() throws IOException, CoreException { AjBuildManager manager = new AjBuildManager(messageWriter); BuildArgParser parser = new BuildArgParser(); String javaClassPath = System.getProperty("java.class.path"); AjBuildConfig buildConfig = parser.genBuildConfig(new String...
public void testSimpleStructure() throws IOException, CoreException { AjBuildManager manager = new AjBuildManager(messageWriter); BuildArgParser parser = new BuildArgParser(); String javaClassPath = System.getProperty("java.class.path"); AjBuildConfig buildConfig = parser.genBuildConfig(new String...
private final void init() { // All Pages are born dirty so they get clustered right away setDirty(true); // set the pagemap setPageMap(getRequestCycle() != null ? getRequestCycle().getRequest().getParameter( "pagemap") : null); setId(getPageMap().getNextId()); // Set versioning of page based on def...
private final void init() { // All Pages are born dirty so they get clustered right away setDirty(true); // set the pagemap setPageMap(getRequestCycle() != null ? getRequestCycle().getRequest().getParameter( "pagemap") : null); setId(getPageMap().nextId()); // Set versioning of page based on defaul...
public final void remove() { session.removePageMap(this); } /** * @return The next id for this pagemap */ final int getNextId() { session.dirty(); return this.pageId++; }
public final void remove() { session.removePageMap(this); } /** * @return The next id for this pagemap */ final int nextId() { session.dirty(); return this.pageId++; }
public org.osgi.service.remoteserviceadmin.EndpointDescription[] readEndpointDescriptions( InputStream input) throws IOException { // First create parser EndpointDescriptionParser parser = new EndpointDescriptionParser(); // Parse input stream parser.parse(input); // Get possible endpoint descriptions L...
public org.osgi.service.remoteserviceadmin.EndpointDescription[] readEndpointDescriptions( InputStream input) throws IOException { // First create parser EndpointDescriptionParser parser = new EndpointDescriptionParser(); // Parse input stream parser.parse(input); // Get possible endpoint descriptions L...
public void comparePackageVersions(String packageName, Version remoteVersion, Version localVersion) throws RuntimeException { LogUtility.trace("comparePackageVersions", DebugOptions.PACKAGEVERSIONCOMPARATOR, this.getClass(), "packageName=" + packageName + ",remoteVersion=" + remoteVersion + ",loc...
public void comparePackageVersions(String packageName, Version remoteVersion, Version localVersion) throws RuntimeException { LogUtility.trace("comparePackageVersions", DebugOptions.PACKAGE_VERSION_COMPARATOR, this.getClass(), "packageName=" + packageName + ",remoteVersion=" + remoteVersion + ",l...
private boolean includeRCSAForDescription(IContainer container, IRemoteServiceContainerAdapter adapter, ServiceEndpointDescription description) { String namespaceName = (String) description .getProperty(Constants.REMOTESERVICE_NAMESPACE_NAME); if (namespaceName != null) { Namespace namespace = adapter...
private boolean includeRCSAForDescription(IContainer container, IRemoteServiceContainerAdapter adapter, ServiceEndpointDescription description) { String namespaceName = (String) description .getProperty(Constants.SERVICE_NAMESPACE); if (namespaceName != null) { Namespace namespace = adapter.getRemoteS...
protected boolean includeContainer(IContainer container, IRemoteServiceContainerAdapter rsca, ServiceReference serviceReference, Map ecfConfiguration) { Object cID = serviceReference .getProperty(org.eclipse.ecf.remoteservice.Constants.REMOTE_SERVICE_CONTAINER_ID); if (cID == null || !(cID instanceof ID)...
protected boolean includeContainer(IContainer container, IRemoteServiceContainerAdapter rsca, ServiceReference serviceReference, Map ecfConfiguration) { Object cID = serviceReference .getProperty(org.eclipse.ecf.remoteservice.Constants.SERVICE_CONTAINER_ID); if (cID == null || !(cID instanceof ID)) { ...
private static ProcessDestroyer processDestroyer = new ProcessDestroyer(); /** * Builds a command launcher for the OS and JVM we are running under */ static { // Try using a JDK 1.3 launcher try { if (Os.isFamily("openvms")) { vmLauncher = new VmsComman...
private static ProcessDestroyer processDestroyer = new ProcessDestroyer(); /** * Builds a command launcher for the OS and JVM we are running under */ static { // Try using a JDK 1.3 launcher try { if (Os.isFamily("openvms")) { vmLauncher = new VmsComman...
package org.apache.myrmidon.listeners; /* * 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 file. */ package org.apache.ant.pro...
package org.apache.myrmidon.listeners; /* * 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 file. */ package org.apache.myrmido...
public void execute() throws BuildException { if (usedMatchingTask) { log("DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead."); } if (file == null && dir == null && filesets.size() == 0) { throw new BuildException("At leas...
public void execute() throws BuildException { if (usedMatchingTask) { log("DEPRECATED - Use of the implicit FileSet is deprecated. Use a nested fileset element instead."); } if (file == null && dir == null && filesets.size() == 0) { throw new BuildException("At leas...
public String getStringValue() { return JOrphanUtils.booleanToString(value); }
public String getStringValue() { return Boolean.toString(value); }
public String saveXML(Node node) throws DOMException { if ( node != null && getOwnerDocument() != node.getOwnerDocument() ) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new D...
public String saveXML(Node node) throws DOMException { if ( node != null && this != node.getOwnerDocument() ) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null); throw new DOMException(DO...
public IMarkupFragment getMarkup(Component child) { IMarkupFragment markup = getAssociatedMarkup(); if (markup == null) { return null; } if (child == null) { return markup; } return markup.find(child.getId(), 0); } }
public IMarkupFragment getMarkup(Component child) { IMarkupFragment markup = getAssociatedMarkup(); if (markup == null) { return null; } if (child == null) { return markup; } return markup.find(child.getId()); } }
protected String resolveExecutable(String exec, boolean mustSearchPath) { if (!resolveExecutable) { return exec; } // try to find the executable File executableFile = getProject().resolveFile(exec); if (executableFile.exists()) { return executableFile....
protected String resolveExecutable(String exec, boolean mustSearchPath) { if (!resolveExecutable) { return exec; } // try to find the executable File executableFile = FILE_UTILS.resolveFile(getProject().getBaseDir(), exec); if (executableFile.exists()) { ...
public void execute() throws BuildException { if (property == null || property.length() == 0) { throw new BuildException("no property specified"); } if (destDir == null) { destDir = getProject().resolveFile("."); } File tfile = FILE_UTILS.createTempFil...
public void execute() throws BuildException { if (property == null || property.length() == 0) { throw new BuildException("no property specified"); } if (destDir == null) { destDir = FILE_UTILS.resolveFile(getProject().getBaseDir(),"."); } File tfile = ...
private void touch(Resource r, long defaultTimestamp) { if (fileNameMapper == null) { if (r instanceof FileResource) { // use this to create file and deal with non-writable files touch(((FileResource) r).getFile(), defaultTimestamp); } else { ...
private void touch(Resource r, long defaultTimestamp) { if (fileNameMapper == null) { if (r instanceof FileResource) { // use this to create file and deal with non-writable files touch(((FileResource) r).getFile(), defaultTimestamp); } else { ...
public void execute() throws BuildException { if ("style".equals(getTaskType())) { log("Warning: the task name <style> is deprecated. Use <xslt> instead.", Project.MSG_WARN); } File savedBaseDir = baseDir; DirectoryScanner scanner; String[] ...
public void execute() throws BuildException { if ("style".equals(getTaskType())) { log("Warning: the task name <style> is deprecated. Use <xslt> instead.", Project.MSG_WARN); } File savedBaseDir = baseDir; DirectoryScanner scanner; String[] ...