buggy_function
stringlengths
1
391k
fixed_function
stringlengths
0
392k
public Code128BlackBox2TestCase() { super("test/data/blackbox/code128-2", new MultiFormatReader(), BarcodeFormat.CODE_128); addTest(35, 39, 0.0f); addTest(36, 39, 180.0f); }
public Code128BlackBox2TestCase() { super("test/data/blackbox/code128-2", new MultiFormatReader(), BarcodeFormat.CODE_128); addTest(36, 39, 0.0f); addTest(36, 39, 180.0f); }
public UPCABlackBox3ReflectiveTestCase() { super("test/data/blackbox/upca-3", new MultiFormatReader(), BarcodeFormat.UPC_A); addTest(7, 8, 0.0f); addTest(7, 9, 180.0f); }
public UPCABlackBox3ReflectiveTestCase() { super("test/data/blackbox/upca-3", new MultiFormatReader(), BarcodeFormat.UPC_A); addTest(7, 8, 0.0f); addTest(8, 9, 180.0f); }
public UPCABlackBox4TestCase() { super("test/data/blackbox/upca-4", new MultiFormatReader(), BarcodeFormat.UPC_A); addTest(8, 11, 0.0f); addTest(9, 11, 180.0f); }
public UPCABlackBox4TestCase() { super("test/data/blackbox/upca-4", new MultiFormatReader(), BarcodeFormat.UPC_A); addTest(9, 11, 0.0f); addTest(9, 11, 180.0f); }
protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(new FilePageStore()); //return new HttpSessionStore(); }
protected ISessionStore newSessionStore() { return new SecondLevelCacheSessionStore(this, new FilePageStore()); //return new HttpSessionStore(); }
public void handleTransferEvent(IFileTransferEvent event) { if (event instanceof IIncomingFileTransferReceiveResumedEvent) { try { IIncomingFileTransferReceiveResumedEvent rse = (IIncomingFileTransferReceiveResumedEvent) event; session = rse.receive(outs); } catch (Exception e) { fail...
public void handleTransferEvent(IFileTransferEvent event) { if (event instanceof IIncomingFileTransferReceiveResumedEvent) { try { IIncomingFileTransferReceiveResumedEvent rse = (IIncomingFileTransferReceiveResumedEvent) event; session = rse.receive(outs); } catch (Exception e) { fail...
public void testFindBookByTitle() { String title = "Gone Sailing"; String qTitle = "\"" + title + "\""; String bName = "Dick"; try { // find the book Book book = service.findBookByTitle(title); assertNotNull("could not find the book " + qTitle, bo...
public void testFindBookByTitle() { String title = "Gone Sailing"; String qTitle = "\"" + title + "\""; String bName = "Dick"; try { // find the book Book book = service.findBookByTitle(title); assertNotNull("could not find the book " + qTitle, bo...
private void runNonGui(String testFile, String logFile, boolean remoteStart, String remote_hosts_string) { FileInputStream reader = null; try { File f = new File(testFile); if (!f.exists() || !f.isFile()) { println("Could not open " + testFile); ...
private void runNonGui(String testFile, String logFile, boolean remoteStart, String remote_hosts_string) { FileInputStream reader = null; try { File f = new File(testFile); if (!f.exists() || !f.isFile()) { println("Could not open " + testFile); ...
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { this.monitor = monitor; threadVars = new JMeterVariables(); testTree = test; compiler = new TestCompiler(testTree, threadVars); controller = (Controller) testTree.getArray()[0]; S...
public JMeterThread(HashTree test, JMeterThreadMonitor monitor, ListenerNotifier note) { this.monitor = monitor; threadVars = new JMeterVariables(); testTree = test; compiler = new TestCompiler(testTree, threadVars); controller = (Controller) testTree.getArray()[0]; S...
public void testSearch() throws Exception { ListedHashTree tree = new ListedHashTree(); SearchByClass searcher = new SearchByClass(Integer.class); String one = "one"; String two = "two"; Integer o = new Integer(1); tree.add(one, o); ...
public void testSearch() throws Exception { ListedHashTree tree = new ListedHashTree(); SearchByClass<Integer> searcher = new SearchByClass<Integer>(Integer.class); String one = "one"; String two = "two"; Integer o = new Integer(1); tree.ad...
public StatGraphVisualizer() { super(); model = new ObjectTableModel(COLUMNS, SamplingStatCalculator.class, new Functor[] { new Functor("getLabel"), //$NON-NLS-1$ new Functor("getCount"), //$NON-NLS-1$ new Functor("getMeanAsNumber"), //$NON-NLS-1$ new Functor("getMedian"), //...
public StatGraphVisualizer() { super(); model = new ObjectTableModel(COLUMNS, SamplingStatCalculator.class, new Functor[] { new Functor("getLabel"), //$NON-NLS-1$ new Functor("getCount"), //$NON-NLS-1$ new Functor("getMeanAsNumber"), //$NON-NLS-1$ new Functor("getMedian"), //...
public PostgresDictionary() { platform = "PostgreSQL"; validationSQL = "SELECT NOW()"; datePrecision = CENTI; supportsAlterTableWithDropColumn = false; supportsDeferredConstraints = true; supportsSelectStartIndex = true; supportsSelectEndIndex = true; ...
public PostgresDictionary() { platform = "PostgreSQL"; validationSQL = "SELECT NOW()"; datePrecision = CENTI; supportsAlterTableWithDropColumn = false; supportsDeferredConstraints = true; supportsSelectStartIndex = true; supportsSelectEndIndex = true; ...
public void setSelection (TreeItem [] items) { checkWidget (); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); deselectAll (); int length = items.length; if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return; int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handler...
public void setSelection (TreeItem [] items) { checkWidget (); if (items == null) error (SWT.ERROR_NULL_ARGUMENT); deselectAll (); int length = items.length; if (length == 0 || ((style & SWT.SINGLE) != 0 && length > 1)) return; int /*long*/ selection = OS.gtk_tree_view_get_selection (handle); OS.g_signal_handler...
public void testDetachPageAjaxRequest() throws Exception { executeTest(TestDetachPage.class, "TestDetachPageExpectedResult.html"); TestDetachPage page = (TestDetachPage)tester.getLastRenderedPage(); assertTrue(page.getNrComponentDetachModelCalls() > 0); assertTrue(page.getNrComponentDetachModelsCalls() > 0);...
public void testDetachPageAjaxRequest() throws Exception { executeTest(TestDetachPage.class, "TestDetachPageExpectedResult.html"); TestDetachPage page = (TestDetachPage)tester.getLastRenderedPage(); assertTrue(page.getNrComponentDetachModelCalls() > 0); assertTrue(page.getNrComponentDetachModelsCalls() > 0);...
public void test_1() throws Exception { executeTest(TestPage.class, "TestPage_ExpectedResult-1.html"); TestPage page = (TestPage)tester.getLastRenderedPage(); executedListener(TestPage.class, page.get("link"), "TestPage_ExpectedResult-2.html"); }
public void test_1() throws Exception { executeTest(TestPage.class, "TestPage_ExpectedResult-1.html"); TestPage page = (TestPage)tester.getLastRenderedPage(); executeListener(page.get("link"), "TestPage_ExpectedResult-2.html"); }
public ConcatExpression(ArrayExpression op) { super(op, UnaryFunctionalOperator.CONCAT); } }
public ConcatExpression(VarArgsExpression op) { super(op, UnaryFunctionalOperator.CONCAT); } }
public String asExpression(AliasContext ctx) { return ((Visitable)_e).asExpression(ctx) + " " + _op; }
public String asExpression(AliasContext ctx) { return ((Visitable)_e).asExpression(ctx) + SPACE + _op; }
private static final String SINGLE_QUOTE = "'"; static String toJPQL(AliasContext ctx, Object o) { if (o == null) return "NULL"; if (o instanceof Visitable) return ((Visitable)o).asExpression(ctx); if (o instanceof Class) return ctx.getEntityName((Class)o); if (o instanceof String) return SINGLE...
private static final StringBuffer SINGLE_QUOTE = new StringBuffer("'"); static String toJPQL(AliasContext ctx, Object o) { if (o == null) return "NULL"; if (o instanceof Visitable) return ((Visitable)o).asExpression(ctx); if (o instanceof Class) return ctx.getEntityName((Class)o); if (o instanceof ...
public String asExpression(AliasContext ctx) { return super.asExpression(ctx) + (_escaped ? "ESCAPE " + JPQLHelper.toJPQL(ctx, _echar) : ""); }
public String asExpression(AliasContext ctx) { return super.asExpression(ctx) + (_escaped ? "ESCAPE " + JPQLHelper.toJPQL(ctx, _echar) : EMPTY); }
public void doAction(ActionEvent e) throws IllegalUserActionException { HashTree subTree = null; if (!commands.contains(e.getActionCommand())) { throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand()); } if (e.getActionCommand().eq...
public void doAction(ActionEvent e) throws IllegalUserActionException { HashTree subTree = null; if (!commands.contains(e.getActionCommand())) { throw new IllegalUserActionException("Invalid user command:" + e.getActionCommand()); } if (e.getActionCommand().eq...
protected void specialTagHandling(String tagText, final int openBracketIndex, int closeBracketIndex) throws ParseException { // Handle comments if (tagText.startsWith("!--")) { // downlevel-revealed conditional comments e.g.: <!--[if (gt IE9)|!(IE)]><!--> if (tagText.contains("![endif]--")) { las...
protected void specialTagHandling(String tagText, final int openBracketIndex, int closeBracketIndex) throws ParseException { // Handle comments if (tagText.startsWith("!--")) { // downlevel-revealed conditional comments e.g.: <!--[if (gt IE9)|!(IE)]><!--> if (tagText.contains("![endif]--")) { las...
public final void testConditionalComments2() throws Exception { final XmlPullParser parser = new XmlPullParser(); parser.parse("<!--[if IE]><a href='test.html'>my link</a><![endif]-->"); HttpTagType type = parser.next(); assertEquals(type, HttpTagType.CONDITIONAL_COMMENT); type = parser.next(); assertEqua...
public final void testConditionalComments2() throws Exception { final XmlPullParser parser = new XmlPullParser(); parser.parse("<!--[if IE]><a href='test.html'>my link</a><![endif]-->"); HttpTagType type = parser.next(); assertEquals(type, HttpTagType.CONDITIONAL_COMMENT); type = parser.next(); assertEqua...
private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, String name) { if (beanFactory.containsBeanDefinition(name)) { return beanFactory.getBeanDefinition(name); } else { BeanFactory parent = beanFactory.getParentBeanFactory(); if (parent != null && parent instance...
private BeanDefinition getBeanDefinition(ConfigurableListableBeanFactory beanFactory, String name) { if (beanFactory.containsBeanDefinition(name)) { return beanFactory.getBeanDefinition(name); } else { BeanFactory parent = beanFactory.getParentBeanFactory(); if (parent != null && parent instance...
private void buildWeblogicJar(File sourceJar, File destJar) { org.apache.tools.ant.taskdefs.Java javaTask = null; try { String args = "-noexit " + sourceJar.getPath().replace('\\', '/') + " " + destJar.getPath().replace('\\', '/'); javaTask = (Java) getT...
private void buildWeblogicJar(File sourceJar, File destJar) { org.apache.tools.ant.taskdefs.Java javaTask = null; try { String args = "-noexit " + sourceJar.getPath() + " " + destJar.getPath(); javaTask = (Java) getTask().getProject().createTask("java");...
protected void fireSetRosterEntry(boolean remove, IRosterEntry entry) { for (Iterator i = presenceListeners.iterator(); i.hasNext();) { IPresenceListener l = (IPresenceListener) i.next(); if (remove) l.handleRosterEntryRemove(entry); else l.handleRosterEntryUpdate(entry); } }
protected void fireSetRosterEntry(boolean remove, IRosterEntry entry) { for (Iterator i = presenceListeners.iterator(); i.hasNext();) { IPresenceListener l = (IPresenceListener) i.next(); if (remove) l.handleRosterEntryRemove(entry); else l.handleRosterEntryAdd(entry); } }
public void process() { Messager messager = environment.getMessager(); AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.Oneway"); //$NON-NLS-1$ Collection<Declaration> annotatedTypes = environment ...
public void process() { Messager messager = environment.getMessager(); AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.Oneway"); //$NON-NLS-1$ Collection<Declaration> annotatedTypes = environment ...
public void process() { Messager messager = environment.getMessager(); AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration(WEB_METHOD); //$NON-NLS-1$ Collection<Declaration> annotatedTypes = environment ...
public void process() { Messager messager = environment.getMessager(); AnnotationTypeDeclaration annotationDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration(WEB_METHOD); //$NON-NLS-1$ Collection<Declaration> annotatedTypes = environment ...
private void checkWebMethods(Messager messager) { AnnotationTypeDeclaration webMethodDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.WebMethod"); //$NON-NLS-1$ Collection<Declaration> webMethodAnnotatedTypes = environment .getDeclarations...
private void checkWebMethods(Messager messager) { AnnotationTypeDeclaration webMethodDeclaration = (AnnotationTypeDeclaration) environment .getTypeDeclaration("javax.jws.WebMethod"); //$NON-NLS-1$ Collection<Declaration> webMethodAnnotatedTypes = environment .getDeclarations...
private void checkWebServiceProvider(AnnotationMirror mirror, Messager messager) { if (mirror.getAnnotationType().toString().equals("javax.xml.ws.WebServiceProvider")) { //$NON-NLS-1$ messager.printError(mirror.getPosition(), JAXWSCoreMessages .WEBSERVICE_ANNOTATION_PROCESSOR...
private void checkWebServiceProvider(AnnotationMirror mirror, Messager messager) { if (mirror.getAnnotationType().toString().equals("javax.xml.ws.WebServiceProvider")) { //$NON-NLS-1$ messager.printError(mirror.getPosition(), JAXWSCoreMessages .WEBSERVICE_WEBSERVICEPROVIDER_C...
public void setMenu (Menu menu) { checkWidget (); if (menu != null) { if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if ((menu.style & SWT.POP_UP) == 0) { error (SWT.ERROR_MENU_NOT_POP_UP); } if (menu.parent != menuShell ()) { error (SWT.ERROR_INVALID_PARENT); } } this.menu = menu; } ...
public void setMenu (Menu menu) { checkWidget (); if (menu != null) { if (menu.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); if ((menu.style & SWT.POP_UP) == 0) { error (SWT.ERROR_MENU_NOT_POP_UP); } if (menu.parent != menuShell ()) { error (SWT.ERROR_INVALID_PARENT); } } this.menu = menu; } ...
public ToolItem (ToolBar parent, int style, int index) { super (parent, checkStyle (style)); this.parent = parent; int count = parent.getItemCount (); if (!(0 <= index && index <= count)) { error (SWT.ERROR_ITEM_NOT_ADDED); } createWidget (index); }
public ToolItem (ToolBar parent, int style, int index) { super (parent, checkStyle (style)); this.parent = parent; int count = parent.getItemCount (); if (!(0 <= index && index <= count)) { error (SWT.ERROR_INVALID_RANGE); } createWidget (index); }
public void simplePropertyValue(JMeterProperty value) { try { Object parent = stack.getLast(); if (!(parent instanceof Configuration)) { DefaultConfiguration config = new DefaultConfiguration("property", "property"); config.setValue(value != null ? val...
public void simplePropertyValue(JMeterProperty value) { try { Object parent = stack.getLast(); if (!(parent instanceof Configuration)) { DefaultConfiguration config = new DefaultConfiguration("property", "property"); config.setValue(value != null ? val...
private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch, int eager) { if (mapping == null || eager == JDBCFetchConfiguration.EAGER_NONE) return null; FieldMapping eagerToMany = createEa...
private FieldMapping createEagerSelects(Select sel, ClassMapping mapping, OpenJPAStateManager sm, BitSet fields, JDBCFetchConfiguration fetch, int eager) { if (mapping == null || eager == JDBCFetchConfiguration.EAGER_NONE) return null; FieldMapping eagerToMany = createEa...
public String toString() { String ret = _owner.getFullName(); if (this == _owner.getKey()) return ret + "<key:" + _decType + ">"; if (this == _owner.getElement()) { if (_owner.getTypeCode() == JavaTypes.MAP) return ret + "<value:" + _decType + ">"; ...
public String toString() { String ret = _owner.getFullName(true); if (this == _owner.getKey()) return ret + "<key:" + _decType + ">"; if (this == _owner.getElement()) { if (_owner.getTypeCode() == JavaTypes.MAP) return ret + "<value:" + _decType + ">";...
public void run() { if (table.isDisposed()) return; table.setItemCount(data.length); table.clearAll(); } }); try {Thread.sleep(500);} catch (Throwable t) {} } } }; thread.start(); shell.open (); while (!shell.isDisposed() || thread.isAlive()) { if (!display.readAndDispatch...
public void run() { if (table.isDisposed()) return; table.setItemCount(data.length); table.clearAll(); } }); try {Thread.sleep(500);} catch (Throwable t) {} } } }; thread.start(); shell.open (); while (!shell.isDisposed()) { if (!display.readAndDispatch ()) display.sleep (...
public void configure(TestElement element) { super.configure(element); servername.setText(element.getPropertyAsString(LDAPExtSampler.SERVERNAME)); port.setText(element.getPropertyAsString(LDAPExtSampler.PORT)); rootdn.setText(element.getPropertyAsString(LDAPExtSampler.ROOTDN)); ...
public void configure(TestElement element) { super.configure(element); servername.setText(element.getPropertyAsString(LDAPExtSampler.SERVERNAME)); port.setText(element.getPropertyAsString(LDAPExtSampler.PORT)); rootdn.setText(element.getPropertyAsString(LDAPExtSampler.ROOTDN)); ...
private static final String[] simpleTypes = { "ENTITIES", "ENTITY", "ID", "IDREF", "IDREFS", "NCName", "NMTOKEN", "NMTOKENS", "NOTATION", "Name", "QName", "anyAtomicType", "anySimpleType", "anyType", "anyURI", "base64Binary", "boolean", "byte", "date", "dateTime", "dayTimeDuration", "decimal...
private static final String[] simpleTypes = { "ENTITIES", "ENTITY", "ID", "IDREF", "IDREFS", "NCName", "NMTOKEN", "NMTOKENS", "NOTATION", "Name", "QName", "anyAtomicType", "anySimpleType", "anyType", "anyURI", "base64Binary", "boolean", "byte", "date", "dateTime", "dayTimeDuration", "decimal...
private void dispatchEvent(final Page page, final String url) { RequestCycle requestCycle = RequestCycle.get(); String decodedUrl = requestCycle.getRequest().decodeURL(url); int indexOfPath = decodedUrl.indexOf("path="); int indexOfInterface = decodedUrl.indexOf("interface="); if (indexOfPath != -1 && index...
private void dispatchEvent(final Page page, final String url) { RequestCycle requestCycle = RequestCycle.get(); String decodedUrl = requestCycle.getRequest().decodeURL(url); int indexOfPath = decodedUrl.indexOf("path="); int indexOfInterface = decodedUrl.indexOf("interface="); if (indexOfPath != -1 && index...
public boolean handleMessage(IMessage message) throws AbortException { if (! (message.isError() || message.isWarning()) ) return sink.handleMessage(message); // we only care about warnings and errors here... ISourceLocation sLoc = message.getSourceLocation(); CompilationResult problemSource = currentlyWeaving;...
public boolean handleMessage(IMessage message) throws AbortException { if (! (message.isError() || message.isWarning()) ) return sink.handleMessage(message); // we only care about warnings and errors here... ISourceLocation sLoc = message.getSourceLocation(); CompilationResult problemSource = currentlyWeaving;...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; int[] buffer = new int[1]; OS.ATSUCreateTextLayout(buffer); if (buffer[0] == 0) SWT.error(SWT.ERROR_NO_HANDLES); layout = buffer[0]; setLayoutContro...
public TextLayout (Device device) { if (device == null) device = Device.getDevice(); if (device == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); this.device = device; int[] buffer = new int[1]; OS.ATSUCreateTextLayout(buffer); if (buffer[0] == 0) SWT.error(SWT.ERROR_NO_HANDLES); layout = buffer[0]; setLayoutContro...
public abstract Message sendAndReceive(Message request) throws JMSException;
Message sendAndReceive(Message request) throws JMSException; /* * 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 unde...
public boolean munge(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); if (!gen.getType().equals(cflowStackField.getDeclaringType())) return false; Field f = new FieldGen(cflowStackField.getModifiers(), BcelWorld.makeBcelType(cflowStackField.getReturnType()), cflowStackField.get...
public boolean munge(BcelClassWeaver weaver) { LazyClassGen gen = weaver.getLazyClassGen(); if (!gen.getType().equals(cflowStackField.getDeclaringType())) return false; Field f = new FieldGen(cflowStackField.getModifiers(), BcelWorld.makeBcelType(cflowStackField.getReturnType()), cflowStackField.get...
public void setTopIndex (int index) { checkWidget(); int itemHeight = getItemHeight (); int [] top = new int [1], left = new int [1]; OS.GetDataBrowserScrollPosition (handle, top, left); top [0] = Math.min (itemHeight * itemCount - getClientArea ().height, index * itemHeight); OS.SetDataBrowserScrollP...
public void setTopIndex (int index) { checkWidget(); int itemHeight = getItemHeight (); int [] top = new int [1], left = new int [1]; OS.GetDataBrowserScrollPosition (handle, top, left); top [0] = Math.max (0, Math.min (itemHeight * itemCount - getClientArea ().height, index * itemHeight)); OS.SetData...
public void setTopIndex (int index) { checkWidget(); checkItems (false); int itemHeight = getItemHeight (); int [] top = new int [1], left = new int [1]; OS.GetDataBrowserScrollPosition (handle, top, left); top [0] = Math.min (itemHeight * itemCount - getClientArea ().height, index * itemHeight); OS....
public void setTopIndex (int index) { checkWidget(); checkItems (false); int itemHeight = getItemHeight (); int [] top = new int [1], left = new int [1]; OS.GetDataBrowserScrollPosition (handle, top, left); top [0] = Math.max (0, Math.min (itemHeight * itemCount - getClientArea ().height, index * itemHei...
private void performAction(final ActionEvent e) { try { GuiPackage.getInstance().updateCurrentNode(); Set commandObjects = (Set) commands.get(e.getActionCommand()); Iterator iter = commandObjects.iterator(); while (iter.hasNext()) { ...
private void performAction(final ActionEvent e) { try { GuiPackage.getInstance().updateCurrentNode(); Set commandObjects = (Set) commands.get(e.getActionCommand()); Iterator iter = commandObjects.iterator(); while (iter.hasNext()) { ...
public void valueUnbound(final HttpSessionBindingEvent evt) { if (log.isDebugEnabled()) { log.debug("Session unbound: " + sessionId); } Application application = Application.get(applicationKey); if (application == null) { log.error("Wicket application with name '" + applicationKey + "' no...
public void valueUnbound(final HttpSessionBindingEvent evt) { if (log.isDebugEnabled()) { log.debug("Session unbound: " + sessionId); } Application application = Application.get(applicationKey); if (application == null) { log.debug("Wicket application with name '" + applicationKey + "' no...
public void weaveAroundClosure(BcelAdvice munger, boolean hasDynamicTest) { InstructionFactory fact = getFactory(); enclosingMethod.setCanInline(false); int linenumber = getSourceLine(); // MOVE OUT ALL THE INSTRUCTIONS IN MY SHADOW INTO ANOTHER METHOD! LazyMethodGen callbackMethod = ...
public void weaveAroundClosure(BcelAdvice munger, boolean hasDynamicTest) { InstructionFactory fact = getFactory(); enclosingMethod.setCanInline(false); int linenumber = getSourceLine(); // MOVE OUT ALL THE INSTRUCTIONS IN MY SHADOW INTO ANOTHER METHOD! LazyMethodGen callbackMethod = ...
public static boolean isTrue(final String s) throws StringValueConversionException { if (s != null) { if (s.equalsIgnoreCase("true")) { return true; } if (s.equalsIgnoreCase("false")) { return false; } if (s.equalsIgnoreCase("on") || s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("...
public static boolean isTrue(final String s) throws StringValueConversionException { if (s != null) { if (s.equalsIgnoreCase("true")) { return true; } if (s.equalsIgnoreCase("false")) { return false; } if (s.equalsIgnoreCase("on") || s.equalsIgnoreCase("yes") || s.equalsIgnoreCase("...
public final String getModelValue() { // Get the list of selected values Object modelObject = getModelObject(); if (!(modelObject instanceof Collection)) { throw new WicketRuntimeException( "Model object for a ListMultipleChoice must be a Collection (found " + modelObject.getClass() + ")"); }...
public final String getModelValue() { // Get the list of selected values Object modelObject = getModelObject(); if (modelObject != null && !(modelObject instanceof Collection)) { throw new WicketRuntimeException( "Model object for a ListMultipleChoice must be a Collection (found " + modelObject...
public void drawBackground (GC gc, int x, int y, int width, int height) { checkWidget (); if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); Control control = findBackgroundControl (); if (control != null) { NSRect rect = new NSRect(); rect.x = x; rect....
public void drawBackground (GC gc, int x, int y, int width, int height) { checkWidget (); if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); Control control = findBackgroundControl (); if (control != null) { NSRect rect = new NSRect(); rect.x = x; rect....
public ChatMessage(ID fromID, ID threadID, IChatMessage.Type type, String subject, String body) { super(fromID); this.threadID = threadID; this.type = type; this.subject = subject; this.body = body; }
public ChatMessage(ID fromID, ID threadID, IChatMessage.Type type, String subject, String body) { super(fromID); this.threadID = threadID; this.type = type; this.subject = subject; this.body = (body == null)?"":body; }
private Object[] extractSelectExecutor(Object result) { if (result instanceof ResultList == false) return new Object[]{null, _loc.get("exclude-not-result", _id)}; Object userObject = ((ResultList<?>)result).getUserObject(); if (userObject == null || !userObject.getClass().isArray...
private Object[] extractSelectExecutor(Object result) { if (result instanceof ResultList == false) return new Object[]{null, _loc.get("exclude-not-result", _id)}; Object userObject = ((ResultList<?>)result).getUserObject(); if (userObject == null || !userObject.getClass().isArray...
protected String currentQuery() { return ctx().parsed == null || root().parser == null ? null : root().parser.jpql; } QueryExpressions getQueryExpressions() { QueryExpressions exps = new QueryExpressions(); exps.setContexts(contexts); evalQueryOperation(exps); ...
protected String currentQuery() { return ctx().parsed == null || root().parser == null ? null : root().parser.jpql; } QueryExpressions getQueryExpressions() { QueryExpressions exps = new QueryExpressions(); exps.setContexts(contexts); evalQueryOperation(exps); ...
public void actionPerformed(ActionEvent event) { if (event.getSource() == displayButton) { makeGraph(); } else if (event.getSource() == saveGraph) { saveGraphToFile = true; try { ActionRouter.getInstance().getAction( ActionN...
public void actionPerformed(ActionEvent event) { if (event.getSource() == displayButton) { makeGraph(); } else if (event.getSource() == saveGraph) { saveGraphToFile = true; try { ActionRouter.getInstance().getAction( ActionN...
public void actionPerformed(ActionEvent ev) { if (ev.getSource() == saveTable) { JFileChooser chooser = FileDialoger.promptToSaveFile("aggregate.csv");//$NON-NLS-1$ if (chooser == null) { return; } FileWriter writer = null; try { ...
public void actionPerformed(ActionEvent ev) { if (ev.getSource() == saveTable) { JFileChooser chooser = FileDialoger.promptToSaveFile("aggregate.csv");//$NON-NLS-1$ if (chooser == null) { return; } FileWriter writer = null; try { ...
public VEXCoreTestSuite() { super("VEX Core Tests"); addTestSuite(CssTest.class); addTestSuite(PropertyTest.class); addTestSuite(RuleTest.class); addTestSuite(SerializationTest.class); addTestSuite(BlockElementBoxTest.class); addTestSuite(DFABuilderTest.class); addTestSuite(DocumentWriterTest.class); ...
public VEXCoreTestSuite() { super("VEX Core Tests"); addTestSuite(CssTest.class); addTestSuite(PropertyTest.class); addTestSuite(RuleTest.class); addTestSuite(SerializationTest.class); addTestSuite(BlockElementBoxTest.class); addTestSuite(DFABuilderTest.class); addTestSuite(DocumentWriterTest.class); ...
private void addStaticInitializer() { Code code = getOrCreateClassInitCode(true); if (_meta.getPCSuperclass() != null) { if (getCreateSubclass()) { code.constant().setValue(0); code.putstatic().setField(INHERIT, int.class); } else { ...
private void addStaticInitializer() { Code code = getOrCreateClassInitCode(true); if (_meta.getPCSuperclass() != null) { if (getCreateSubclass()) { code.constant().setValue(0); code.putstatic().setField(INHERIT, int.class); } else { ...
public static AssertionResult getAssertionResult(Configuration config) { AssertionResult result = new AssertionResult(); result.setError(config.getAttributeAsBoolean(ERROR, false)); result.setFailure(config.getAttributeAsBoolean(FAILURE, false)); result.setFailureMessage(config.getAttribute(FAILURE_MESSAGE, ""...
public static AssertionResult getAssertionResult(Configuration config) { AssertionResult result = new AssertionResult(""); //TODO provide proper name? result.setError(config.getAttributeAsBoolean(ERROR, false)); result.setFailure(config.getAttributeAsBoolean(FAILURE, false)); result.setFailureMessage(config.ge...
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Pointcut pc = getPointcut().parameterizeWith(typeVariableMap); BcelAdvice ret = null; Member adviceSignature = signature; // allows for around advice where the return value is a type variable (see pr115250) if (signat...
public ShadowMunger parameterizeWith(ResolvedType declaringType,Map typeVariableMap) { Pointcut pc = getPointcut().parameterizeWith(typeVariableMap); BcelAdvice ret = null; Member adviceSignature = signature; // allows for around advice where the return value is a type variable (see pr115250) if (signat...
private void setRollbackOnlyInternal(Throwable cause) { try { javax.transaction.Transaction trans = _runtime.getTransactionManager().getTransaction(); if (trans == null) throw new InvalidStateException(_loc.get("null-trans")); // ensure tra...
private void setRollbackOnlyInternal(Throwable cause) { try { javax.transaction.Transaction trans = _runtime.getTransactionManager().getTransaction(); if (trans == null) throw new InvalidStateException(_loc.get("null-trans")); // ensure tra...
private Object transform(String val, int typeCode) { if ("null".equals(val)) return null; switch (typeCode) { case JavaTypes.BOOLEAN: case JavaTypes.BOOLEAN_OBJ: return Boolean.valueOf(val); case JavaTypes.BYTE: case JavaTy...
private Object transform(String val, int typeCode) { if ("null".equals(val)) return null; switch (typeCode) { case JavaTypes.BOOLEAN: case JavaTypes.BOOLEAN_OBJ: return Boolean.valueOf(val); case JavaTypes.BYTE: case JavaTy...
public Object getIdObject() { return new Byte(key); }
public Object getIdObject() { return Byte.valueOf(key); }
public Object getIdObject() { return new Character(key); }
public Object getIdObject() { return Character.valueOf(key); }
public int hashCode() { if (_typeHash == 0) { Integer typeHashInt = (Integer) _typeCache.get(type); if (typeHashInt == null) { Class base = type; Class superclass = base.getSuperclass(); while (superclass != null && superclass != Object...
public int hashCode() { if (_typeHash == 0) { Integer typeHashInt = (Integer) _typeCache.get(type); if (typeHashInt == null) { Class base = type; Class superclass = base.getSuperclass(); while (superclass != null && superclass != Object...
public Object getIdObject() { return new Short(key); }
public Object getIdObject() { return Short.valueOf(key); }
private static Message initMessage(Token currentToken, int[][]expectedTokenSequences, String[]tokenImage) { TreeSet expected = new TreeSet(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) ...
private static Message initMessage(Token currentToken, int[][]expectedTokenSequences, String[]tokenImage) { TreeSet expected = new TreeSet(); int maxSize = 0; for (int i = 0; i < expectedTokenSequences.length; i++) { if (maxSize < expectedTokenSequences[i].length) ...
private void exclude(IResource resource) { try { URI nullURI= new URI(EFS.SCHEME_NULL, null, resource.getFullPath().toString(), null, null); if (resource.getType() == IResource.FILE) { IFile link = (IFile)resource; link.createLink(nullURI, IResource.REPLACE | IResource.ALLOW_MISSING_LOCAL, null); } ...
private void exclude(IResource resource) { try { URI nullURI= new URI(EFS.SCHEME_NULL, null, "/", null, null); if (resource.getType() == IResource.FILE) { IFile link = (IFile)resource; link.createLink(nullURI, IResource.REPLACE | IResource.ALLOW_MISSING_LOCAL, null); } else { IFolder link = (IFo...
public void doAction(ActionEvent e) { HashTree subTree = null; if(e.getActionCommand().equals(SAVE)) { subTree = GuiPackage.getInstance().getCurrentSubTree(); } else if(e.getActionCommand().equals(SAVE_ALL) || e.getActionCommand().equals(SAVE_TO_PREVIOUS)) { subTree = GuiPackage.getInstance().getTre...
public void doAction(ActionEvent e) { HashTree subTree = null; if(e.getActionCommand().equals(SAVE)) { subTree = GuiPackage.getInstance().getCurrentSubTree(); } else if(e.getActionCommand().equals(SAVE_ALL) || e.getActionCommand().equals(SAVE_TO_PREVIOUS)) { subTree = GuiPackage.getInstance().getTre...
public static String getUpgradePropertyName(String name, UnmarshallingContext context) { String testClass = (String) context.get(SaveService.TEST_CLASS_NAME); final String newName = NameUpdater.getCurrentName(name, testClass); // Delete any properties whose name converts to the empty string ...
public static String getUpgradePropertyName(String name, UnmarshallingContext context) { String testClass = (String) context.get(SaveService.TEST_CLASS_NAME); final String newName = NameUpdater.getCurrentName(name, testClass); // Delete any properties whose name converts to the empty string ...
<T> T Parse1.m(T timeFor) { return null;} // Simple non-static ITDM public class Parse1 { } aspect X { <T> T Parse1.m(T) {} }
<T> T Parse1.m(T timeFor) { return null;} // Simple non-static ITDM public class Parse1 { } aspect X { <T> T Parse1.m(T timeFor) { return null;} }
static <T> T Parse2.m(T timeFor) { return null; } // Simple static ITDM public class Parse2 { } aspect X { static <T> T Parse2.m(T) {} }
static <T> T Parse2.m(T timeFor) { return null; } // Simple static ITDM public class Parse2 { } aspect X { static <T> T Parse2.m(T timeFor) { return null; } }
public ICompilerAdapter getAdapter(Compiler forCompiler) { Map javaOptions = forCompiler.options.getMap(); // TODO get aspectj options from project and add into map before... AjCompilerOptions ajOptions = new AjCompilerOptions(javaOptions); forCompiler.options = ajOptions; if (isBatchBuild || myBcelWorld ...
public ICompilerAdapter getAdapter(Compiler forCompiler) { Map javaOptions = forCompiler.options.getMap(); // TODO get aspectj options from project and add into map before... AjCompilerOptions ajOptions = new AjCompilerOptions(javaOptions); forCompiler.options = ajOptions; if (isBatchBuild || myBcelWorld ...
protected static String getRuntimeClasspath() { return "../runtime/bin" + File.pathSeparator + System.getProperty("aspectjrt.path"); }
protected static String getRuntimeClasspath() { return "../runtime/bin" + File.pathSeparator + "../aspectj5rt/bin" + File.pathSeparator + System.getProperty("aspectjrt.path"); }
private void checkMatch(String[] patterns) { for (int i=0, len=patterns.length; i < len; i++) { String pattern = patterns[i]; ITokenSource tokenSource = BasicTokenSource.makeTokenSource(pattern); NamePattern p1 = new PatternParser(tokenSource).parseNamePattern(); NamePattern p2 = new NamePattern(pattern)...
private void checkMatch(String[] patterns) { for (int i=0, len=patterns.length; i < len; i++) { String pattern = patterns[i]; ITokenSource tokenSource = BasicTokenSource.makeTokenSource(pattern,null); NamePattern p1 = new PatternParser(tokenSource).parseNamePattern(); NamePattern p2 = new NamePattern(pat...
private int scanMatchingName(int ch, int b0, int fastcheck) throws Exception { SymbolCache cache = fStringPool.getSymbolCache(); int[][] cacheLines = cache.fCacheLines; char[] symbolChars = cache.fSymbolChars; boolean lengthOfOne = fastcheck == fMostRecentByte; int startOffse...
private int scanMatchingName(int ch, int b0, int fastcheck) throws Exception { SymbolCache cache = fStringPool.getSymbolCache(); int[][] cacheLines = cache.fCacheLines; char[] symbolChars = cache.fSymbolChars; boolean lengthOfOne = fastcheck == fMostRecentByte; int startOffse...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int /*long*/ hwnd = parent.handle; int oldWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0); TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = (int)/*64*/OS.Send...
public void pack () { checkWidget (); int index = parent.indexOf (this); if (index == -1) return; int /*long*/ hwnd = parent.handle; int oldWidth = (int)/*64*/OS.SendMessage (hwnd, OS.LVM_GETCOLUMNWIDTH, index, 0); TCHAR buffer = new TCHAR (parent.getCodePage (), text, true); int headerWidth = (int)/*64*/OS.Send...
public final IPageManager getPageManager() { IPageManager pageManager = Application.get().getPageManager(); return pageAccessSynchronizer.get().adapt(pageManager); }
public final IPageManager getPageManager() { IPageManager pageManager = Application.get().internalGetPageManager(); return pageAccessSynchronizer.get().adapt(pageManager); }
private void initCamera(SurfaceHolder surfaceHolder) { try { CameraManager.get().openDriver(surfaceHolder); } catch (IOException ioe) { Log.w(TAG, ioe); displayFrameworkBugMessageAndExit(); return; } catch (RuntimeException e) { // Barcode Scanner has seen crashes in the wild...
private void initCamera(SurfaceHolder surfaceHolder) { try { CameraManager.get().openDriver(surfaceHolder); } catch (IOException ioe) { Log.w(TAG, ioe); displayFrameworkBugMessageAndExit(); return; } catch (RuntimeException e) { // Barcode Scanner has seen crashes in the wild...
public void onPreviewFrame(byte[] data, Camera camera) { Point cameraResolution = configManager.getCameraResolution(); if (!useOneShotPreviewCallback) { camera.setPreviewCallback(null); } if (previewHandler != null) { Message message = previewHandler.obtainMessage(previewMessage, cameraRes...
public void onPreviewFrame(byte[] data, Camera camera) { Point cameraResolution = configManager.getCameraResolution(); if (!useOneShotPreviewCallback) { camera.setPreviewCallback(null); } if (previewHandler != null) { Message message = previewHandler.obtainMessage(previewMessage, cameraRes...
public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH | DRAW_OFFSET; } int lineStyle =...
public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH | DRAW_OFFSET; } int lineStyle =...
public void setLineAttributes(LineAttributes attributes) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH | DRAW_OFFSET; } int lineStyl...
public void setLineAttributes(LineAttributes attributes) { if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH | DRAW_OFFSET; } int lineStyl...
public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH; } int lineStyle = attributes.st...
public void setLineAttributes(LineAttributes attributes) { if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (attributes == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); int mask = 0; float lineWidth = attributes.width; if (lineWidth != data.lineWidth) { mask |= LINE_WIDTH; } int lineStyle = attributes.st...
public final ValidationErrorMessage errorMessage( final String resourceKey, final IModel resourceModel, final String input, final FormComponent component) { // Return formatted error message Localizer localizer = component.getLocalizer(); String message = localizer.getString(...
public final ValidationErrorMessage errorMessage( final String resourceKey, final IModel resourceModel, final String input, final FormComponent component) { // Return formatted error message Localizer localizer = component.getLocalizer(); String message = localizer.getString(...
public final void handleSubmit(final RequestCycle cycle) { // Sign the user in final String error = signIn(cycle, getUsername(), getPassword()); if (error == null) { // If login has been called because the user was not yet // log...
public final void handleSubmit(final RequestCycle cycle) { // Sign the user in final String error = signIn(cycle, getUsername(), getPassword()); if (error == null) { // If login has been called because the user was not yet // log...
public CFlow peekTopCFlow() { Stack stack = getThreadStack(); if (stack.isEmpty()) return null; return (CFlow)stack.get(0); }
public CFlow peekTopCFlow() { Stack stack = getThreadStack(); if (stack.isEmpty()) return null; return (CFlow)stack.elementAt(0); }
public static String baToHexString(byte ba[]) { StrBuilder sb = new StrBuilder(ba.length); for (int i = 0; i < ba.length; i++) { int j = ba[i] & 0xff; if (j < 16) { sb.append("0"); // $NON-NLS-1$ add zero padding } sb.append(Integer.toH...
public static String baToHexString(byte ba[]) { StrBuilder sb = new StrBuilder(ba.length*2); for (int i = 0; i < ba.length; i++) { int j = ba[i] & 0xff; if (j < 16) { sb.append("0"); // $NON-NLS-1$ add zero padding } sb.append(Integer.t...
protected int parseLine(String line, TestElement el) { int count = 0; // we clean the line to get // rid of extra stuff String cleanedLine = this.cleanURL(line); log.debug("parsing line: " + line); // now we set request method el.setProperty(HTTPSamplerBase.METHOD, RMETHOD); if (FILTER != null) { lo...
protected int parseLine(String line, TestElement el) { int count = 0; // we clean the line to get // rid of extra stuff String cleanedLine = this.cleanURL(line); log.debug("parsing line: " + line); // now we set request method el.setProperty(HTTPSamplerBase.METHOD, RMETHOD); if (FILTER != null) { lo...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); if (this.PUB == null) { this.initClient(); } int loop = this.getIterationCount(); if (this.PUB != null) { result.sampleStart(); for (int idx = 0; idx < loop; idx++) { String tmsg = this.g...
public SampleResult sample() { SampleResult result = new SampleResult(); result.setSampleLabel(getName()); if (this.PUB == null) { this.initClient(); } int loop = this.getIterationCount(); if (this.PUB != null) { result.sampleStart(); for (int idx = 0; idx < loop; idx++) { String tmsg = this.g...
private void renderFragment(final MarkupStream providerMarkupStream, final ComponentTag openTag) { // remember the current position in the markup. Will have to come back // to it. int currentIndex = providerMarkupStream.getCurrentIndex(); // Find the markup fragment int index = providerMarkupStream.findCom...
private void renderFragment(final MarkupStream providerMarkupStream, final ComponentTag openTag) { // remember the current position in the markup. Will have to come back // to it. int currentIndex = providerMarkupStream.getCurrentIndex(); // Find the markup fragment int index = providerMarkupStream.findCom...
public void reportError(XMLLocator location, String domain, String key, Object[] arguments, short severity) throws XNIException { reportError(fLocator, domain, key, arguments, severity, null); } // reportError(XMLLocator,String,String,Object[],short)
public void reportError(XMLLocator location, String domain, String key, Object[] arguments, short severity) throws XNIException { reportError(location, domain, key, arguments, severity, null); } // reportError(XMLLocator,String,String,Object[],short)
public String toString() { return fTargetNamespace+":"+fName; }
public String toString() { return fTargetNamespace+","+fName; }
+ ": public ".length(), declaration.indexOf(" {")); } // parse methods and constants declarations starting at the current index // out: // .String body - contains the corresponding java content // .n - set to the end of the interface body declaration ( line with the enclosing "};" ) // .nMethods - set to ...
+ ": public ".length(), declaration.indexOf(" {")); } // parse methods and constants declarations starting at the current index // out: // .String body - contains the corresponding java content // .n - set to the end of the interface body declaration ( line with the enclosing "};" ) // .nMethods - set to ...
public void modifyTestElement(TestElement config) { configureTestElement(config); ((JavaConfig) config).setArguments((Arguments) argsPanel.createTestElement()); ((JavaConfig) config).setClassname(classnameCombo.getSelectedItem().toString()); }
public void modifyTestElement(TestElement config) { configureTestElement(config); ((JavaConfig) config).setArguments((Arguments) argsPanel.createTestElement()); ((JavaConfig) config).setClassname(String.valueOf(classnameCombo.getSelectedItem())); }
public Object next() { Object next = newModels.next(); if (! (next instanceof IModel)) throw new WicketRuntimeException("Expecting an instance of " + IModel.class.getName() + ", got " + next.getClass().getName()); final IModel model = (IModel)next; Item item = factory.newItem(index, model); ...
public Object next() { Object next = newModels.next(); if (next != null && ! (next instanceof IModel)) throw new WicketRuntimeException("Expecting an instance of " + IModel.class.getName() + ", got " + next.getClass().getName()); final IModel model = (IModel)next; Item item = factory.newItem...
public Object newInstance(String clsName, Class type, Configuration conf, boolean fatal) { // since the MappingRepository takes a JDBConfiguration constructor, // we need to manually perform the instantiation try { Class cls = Strings.toClass(clsName, (Cla...
public Object newInstance(String clsName, Class type, Configuration conf, boolean fatal) { // since the MappingRepository takes a JDBConfiguration constructor, // we need to manually perform the instantiation try { Class cls = Strings.toClass(clsName, Acce...
public static DataSource newDataSource(JDBCConfiguration conf, boolean factory2) { String driver = (factory2) ? conf.getConnection2DriverName() : conf.getConnectionDriverName(); if (StringUtils.isEmpty(driver)) throw new UserException(_loc.get("no-driver", driver)). ...
public static DataSource newDataSource(JDBCConfiguration conf, boolean factory2) { String driver = (factory2) ? conf.getConnection2DriverName() : conf.getConnectionDriverName(); if (StringUtils.isEmpty(driver)) throw new UserException(_loc.get("no-driver", driver)). ...
public SchemaGroup readSchema() { URL url = (URL) AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(_loader, _fileName)); if (url == null) return new SchemaGroup(); XMLSchemaParser parser = new XMLSchemaParser(_conf); try { parser.p...
public SchemaGroup readSchema() { URL url = AccessController.doPrivileged( J2DoPrivHelper.getResourceAction(_loader, _fileName)); if (url == null) return new SchemaGroup(); XMLSchemaParser parser = new XMLSchemaParser(_conf); try { parser.parse(u...
private static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props, Connection conn) { DBDictionary dict = null; try { Class c = Class.forName(dclass, true, (ClassLoader) AccessController.doPrivileged( J2DoPrivHelpe...
private static DBDictionary newDBDictionary(JDBCConfiguration conf, String dclass, String props, Connection conn) { DBDictionary dict = null; try { Class c = Class.forName(dclass, true, AccessController.doPrivileged( J2DoPrivHelper.getClassLoad...
private static Field getDeclaredField(Class cls, String name) { Field[] fields = (Field[]) AccessController.doPrivileged( J2DoPrivHelper.getDeclaredFieldsAction(cls)); for (int i = 0 ; i < fields.length; i++) { if (name.equals(fields[i].getName())) return fields[i]; ...
private static Field getDeclaredField(Class cls, String name) { Field[] fields = AccessController.doPrivileged( J2DoPrivHelper.getDeclaredFieldsAction(cls)); for (int i = 0 ; i < fields.length; i++) { if (name.equals(fields[i].getName())) return fields[i]; } ...
public void unlock() { if (_lock != null && _lock.isLocked()) _lock.unlock(); } ///////// // Utils ///////// public Class classForName(String name, String[] imports) { // full class name or primitive type? Class type = toClass(name); if (type != null...
public void unlock() { if (_lock != null && _lock.isLocked()) _lock.unlock(); } ///////// // Utils ///////// public Class classForName(String name, String[] imports) { // full class name or primitive type? Class type = toClass(name); if (type != null...
private static Map _expressionParsers = new HashMap(); static { // Load and cache all the query languages available in the system. Class[] classes = Services.getImplementorClasses( ExpressionParser.class, (ClassLoader) AccessController.doPrivileged( J2DoPr...
private static Map _expressionParsers = new HashMap(); static { // Load and cache all the query languages available in the system. Class[] classes = Services.getImplementorClasses( ExpressionParser.class, AccessController.doPrivileged( J2DoPrivHelper.getCl...