rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
this.envPrefix = envPrefix; this.account = account; | public void init(HttpServletRequest req, String envPrefix, String account, boolean debug) throws WebdavIntfException { try { this.envPrefix = envPrefix; this.account = account; this.debug = debug; trans = new IcalTrans(debug); } catch (Th... | |
trans = new IcalTrans(debug); | trans = new BwIcalTrans(envPrefix, debug); | public void init(HttpServletRequest req, String envPrefix, String account, boolean debug) throws WebdavIntfException { try { this.envPrefix = envPrefix; this.account = account; this.debug = debug; trans = new IcalTrans(debug); } catch (Th... |
return refreshEvent(fetchEvent(ev, form), request, form); | return "success"; | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { if (form.getGuest()) { return "notFound"; } CalSvcI svci = form.fetchSvci(); BwCalendar ca... |
if ((siblingPos < 0) || (siblingPos > (subCount - 1))) { if (!parentView.isRoot()) { return null; } | if ((diff == 0) || (siblingPos < 0) || (siblingPos > (subCount - 1))) { return null; | public IdeaView getSibling(int difference) { MapComponent parent = getParent(); if (!(parent instanceof IdeaView)) { return null; } IdeaView parentView = (IdeaView)parent; int pos = parentView.getSubViews().indexOf(this); int subCount = parentView.getSubViews().s... |
redo = true; repaint(); | public void removeAllFlags(){ flagPlotters = new HashMap(); } | |
super(name, maxSize); | super(name, 1); | public ExpandingThreadPool(String name, int maxSize){ super(name, maxSize); this.maxSize = maxSize; } |
form.getMsg().emit("org.bedework.client.message.sponsor.alreadyexists"); | form.getErr().emit("org.bedework.client.error.sponsor.alreadyexists"); | public String doAction(HttpServletRequest request, BwSession sess, PEActionForm form) throws Throwable { /** Check access */ if (!form.getAuthorisedUser()) { return "noAccess"; } String reqpar = request.getParameter("delete"); if (reqpar != null)... |
pkgNode.getChildren().add(clsNode); | pkgNode.addLeafSortedByDescription(clsNode); | private static void addClassNodes(Collection<UMLClassMetadata> umlClasses, LazyActionTreeNode pkgNode){ //build class nodes int bcIndex = pkgNode.getAction().indexOf("&treeBreadCrumbs="); String pkgBreadCrumb = pkgNode.getAction().subSequence(bcIndex, pkgNode.getAction().length()-3).toString(); ... |
projectNode.getChildren().add(subprojectNode); | projectNode.addLeafSortedByDescription(subprojectNode); | private static void addProject(Project project, LazyActionTreeNode pNode){ if (project == null) return; if (project.getClassificationScheme().getLatestVersionIndicator().equalsIgnoreCase("YES")) { Collection<SubProject> subProjects = project.getSubProjectCollection(); Collection<... |
public LazyActionTreeNode(String type, String description, String actionURL, String identifier, boolean leaf) { super(type, description, identifier, leaf); _action = actionURL; | public LazyActionTreeNode() { | public LazyActionTreeNode(String type, String description, String actionURL, String identifier, boolean leaf) { super(type, description, identifier, leaf); _action = actionURL; } |
if (basket != null && !basket.isEmpty()) { basket.clear(); } basket = null; } | if (basket != null && !basket.isEmpty()) { basket.clear(); } if (extraData != null && !extraData.isEmpty()) { extraData.clear(); } basket = null; extraData = null; } | public void emptyBasket() { if (basket != null && !basket.isEmpty()) { basket.clear(); } basket = null; } |
ReaderFactory factory = ReaderFactory.getInstance(); try { IdeaReader reader = factory.read(new File("etc/test.opml")); ideaMap.setIdea(reader.getIdea()); } catch(ReaderException re) { re.printStackTrace(); } | private void buildModel() {// ReaderFactory factory = ReaderFactory.getInstance();// try {// IdeaReader reader = factory.read(new File("etc/test.opml"));// ideaMap.setIdea(reader.getIdea());// } catch(ReaderException re) {// re.printStackTrace();// } ... | |
final int lines = 35; final Idea idea = new Idea("Test pattern"); ideaMap.setIdea(idea); (new Thread(){public void run() { for (int i = 0; i < lines; i++) { Idea fred2 = new Idea(" i = " + i); synchronized(idea) { idea.add(fred2); } } Idea sub = idea.getSubIdeas().get(0); Idea subIdea0 = null; for (int i = 0; i... | private void buildModel() {// ReaderFactory factory = ReaderFactory.getInstance();// try {// IdeaReader reader = factory.read(new File("etc/test.opml"));// ideaMap.setIdea(reader.getIdea());// } catch(ReaderException re) {// re.printStackTrace();// } ... | |
Main.getMainFrame().scoreSheet.resetUsedRowsHack(); | public void setMode(int mode) { if (mode <= Main.MODE_IN_LOBBY) { gameBoardData.init(); scoreSheetCaptionData.init(); scoreSheetHoteltypeData.init(); } if (mode < Main.MODE_IN_LOBBY) { userListPresenter.init(); } } | |
public int insertSubEntry(PreparedStatement stmt, LocalSeismogram localSeismogram, int index,int dbid,byte[] data) throws SQLException { | public int insertSubEntry(PreparedStatement stmt, MicroSecondDate begin, MicroSecondDate end, int index,int dbid,byte[] data) throws SQLException { | public int insertSubEntry(PreparedStatement stmt, LocalSeismogram localSeismogram, int index,int dbid,byte[] data) throws SQLException { stmt.setInt(index++, dbid); stmt.setBytes(index++, data); stmt.setTimestamp(index++, ((edu.iris.Fissures.seismogramDC.LocalSeismogramImpl)localSeismogram).get... |
stmt.setTimestamp(index++, ((edu.iris.Fissures.seismogramDC.LocalSeismogramImpl)localSeismogram).getBeginTime().getTimestamp()); stmt.setTimestamp(index++, ((edu.iris.Fissures.seismogramDC.LocalSeismogramImpl)localSeismogram).getEndTime().getTimestamp()); | stmt.setTimestamp(index++, begin.getTimestamp()); stmt.setTimestamp(index++, end.getTimestamp()); | public int insertSubEntry(PreparedStatement stmt, LocalSeismogram localSeismogram, int index,int dbid,byte[] data) throws SQLException { stmt.setInt(index++, dbid); stmt.setBytes(index++, data); stmt.setTimestamp(index++, ((edu.iris.Fissures.seismogramDC.LocalSeismogramImpl)localSeismogram).get... |
insertSubEntry(putSubEntryStmt, localSeismograms[counter], 1, dbid, data); | insertSubEntry(putSubEntryStmt, begin[counter], end[counter], 1, dbid, data); | public int put( edu.iris.Fissures.Plottable plottable[], edu.iris.Fissures.IfNetwork.ChannelId channel_id, edu.iris.Fissures.Dimension pixel_size, int year, int jday, String status) throws SQLException, IOException{ int dbid = 0; //first put the e... |
containers[i].addListener(this); | if (containers[i].isPanel()) { containers[i].addListener(this); } | public TabBar() { setTabPlacement(MainConfiguration.getInt("gui.tabs.placement", TOP)); //$NON-NLS-1$ addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mousePressed(MouseEv... |
FissuresNamingServiceImpl fissuresNamingService = new FissuresNamingServiceImpl(orb); | FissuresNamingService fissuresNamingService = new FissuresNamingService(orb); | public Channel[] retrieve_grouping(org.omg.CORBA_2_3.ORB orb, ChannelId channelId) { Channel[] group; try { FissuresNamingServiceImpl fissuresNamingService = new FissuresNamingServiceImpl(orb); NetworkDC[] networkReferences = fissuresNamingService.getNetworkDCObjects(); // ChannelId chan... |
SimplePlotUtil.flipArray(pixels[1], size.height); | public Shape draw(Dimension size){ if(visible){ try{ MicroSecondTimeRange overTimeRange = timeConfig.getTimeRange(seis). getOversizedTimeRange(BasicSeismogramDisplay.OVERSIZED_SCALE); int[][] pixels = SimplePlotUtil.compressYvalues(filteredSeis, overTimeRange, ampConfig.getAmpRange(seis), size); SimpleP... | |
this.ideaMap.requestFocusInWindow(); | public Mainframe() { setTitle(resBundle.getString("app.name")); Settings s = Settings.getInstance(); setBounds(s.getWindowLeft(), s.getWindowTop(), s.getWindowWidth(), s.getWindowHeight()); buildView(); buildModel(); } | |
jTextField.meta_invoke(jTextField, AGSymbol.alloc("new"), new NATTable(new ATObject[] { NATNumber.atValue(80) })); | jTextField.meta_invoke(jTextField, AGSymbol.jAlloc("new"), new NATTable(new ATObject[] { NATNumber.atValue(80) })); | public void testBugfixOverloadedConstructor() throws InterpreterException { // def jTextField := jLobby.javax.swing.JTextField; ATObject jTextField = JavaClass.wrapperFor(JTextField.class); // jTextField.new(80) jTextField.meta_invoke(jTextField, AGSymbol.alloc("new"), new NATTable(new ATObject[] { NATNumber.atVal... |
ATObject method = atTestObject.meta_select(atTestObject, AGSymbol.alloc("overloadedmatch2")); ATObject castedMethod = method.meta_invoke(method, AGSymbol.alloc("cast"), new NATTable(new ATObject[] { atTestClass })); | ATObject method = atTestObject.meta_select(atTestObject, AGSymbol.jAlloc("overloadedmatch2")); ATObject castedMethod = method.meta_invoke(method, AGSymbol.jAlloc("cast"), new NATTable(new ATObject[] { atTestClass })); | public void testCasting() { try { // invokes overloadedmatch2(SymbiosisTest) via explicit casting ATObject method = atTestObject.meta_select(atTestObject, AGSymbol.alloc("overloadedmatch2")); ATObject castedMethod = method.meta_invoke(method, AGSymbol.alloc("cast"), new NATTable(new ATObject[] { atTestClass }))... |
assertEquals(55, instance.meta_select(instance, AGSymbol.alloc("xtest")).asNativeNumber().javaValue); | assertEquals(55, instance.meta_select(instance, AGSymbol.jAlloc("xtest")).asNativeNumber().javaValue); | public void testCreationViaJavaObject() { try { // def instance := atTestObject.new(55) ATObject instance = atTestObject.meta_newInstance( new NATTable(new ATObject[] { NATNumber.atValue(55) })); assertEquals(55, instance.meta_select(instance, AGSymbol.alloc("xtest")).asNativeNumber().javaValue); asser... |
AGSymbol.alloc("xtest")).asNativeNumber().javaValue); | AGSymbol.jAlloc("xtest")).asNativeNumber().javaValue); | public void testCreationViaJavaObject() { try { // def instance := atTestObject.new(55) ATObject instance = atTestObject.meta_newInstance( new NATTable(new ATObject[] { NATNumber.atValue(55) })); assertEquals(55, instance.meta_select(instance, AGSymbol.alloc("xtest")).asNativeNumber().javaValue); asser... |
assertEquals(10, instance.meta_select(instance, AGSymbol.alloc("xtest")).asNativeNumber().javaValue); assertEquals(11, instance.meta_select(instance, AGSymbol.alloc("ytest")).asNativeNumber().javaValue); | assertEquals(10, instance.meta_select(instance, AGSymbol.jAlloc("xtest")).asNativeNumber().javaValue); assertEquals(11, instance.meta_select(instance, AGSymbol.jAlloc("ytest")).asNativeNumber().javaValue); | public void testCustomInstanceCreation() { try { // def atTestClass.init(x) { def o := super.init(x); def o.ytest := y; o } ATClosure init = evalAndReturn("def init(x,y) { def o := super.init(x); def o.ytest := y; o }; init").base_asClosure(); atTestClass.meta_addMethod(init.base_getMethod()); // def insta... |
atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), new NATTable(new ATObject[] { NATNil._INSTANCE_ })); | atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("gettertest"), new NATTable(new ATObject[] { NATNil._INSTANCE_ })); | public void testFaultyArity() { try { atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), new NATTable(new ATObject[] { NATNil._INSTANCE_ })); fail("Expected an arity mismatch exception"); } catch(XArityMismatch e) { // expected exception: success } catch(InterpreterException e) { fail(e.ge... |
ATField result = atTestObject.meta_grabField(AGSymbol.alloc("xtest")).base_asField(); | ATField result = atTestObject.meta_grabField(AGSymbol.jAlloc("xtest")).base_asField(); | public void testFirstClassFields() { try { // def result := (reflect: atTestObject).grabField("xtest") ATField result = atTestObject.meta_grabField(AGSymbol.alloc("xtest")).base_asField(); assertEquals("xtest", result.base_getName().toString()); assertEquals(TEST_OBJECT_INIT, result.base_getValue().asNativeNu... |
result = atTestClass.meta_grabField(AGSymbol.alloc("ytest")).base_asField(); | result = atTestClass.meta_grabField(AGSymbol.jAlloc("ytest")).base_asField(); | public void testFirstClassFields() { try { // def result := (reflect: atTestObject).grabField("xtest") ATField result = atTestObject.meta_grabField(AGSymbol.alloc("xtest")).base_asField(); assertEquals("xtest", result.base_getName().toString()); assertEquals(TEST_OBJECT_INIT, result.base_getValue().asNativeNu... |
ATMethod result = atTestObject.meta_grabMethod(AGSymbol.alloc("gettertest")).base_asMethod(); | ATMethod result = atTestObject.meta_grabMethod(AGSymbol.jAlloc("gettertest")).base_asMethod(); | public void testFirstClassMethods() { try { // def result := (reflect: atTestObject).grabMethod("gettertest") ATMethod result = atTestObject.meta_grabMethod(AGSymbol.alloc("gettertest")).base_asMethod(); assertEquals("gettertest", result.base_getName().toString()); // assert (42 == result()) assertEquals(TE... |
result = atTestClass.meta_grabMethod(AGSymbol.alloc("prefix")).base_asMethod(); | result = atTestClass.meta_grabMethod(AGSymbol.jAlloc("prefix")).base_asMethod(); | public void testFirstClassMethods() { try { // def result := (reflect: atTestObject).grabMethod("gettertest") ATMethod result = atTestObject.meta_grabMethod(AGSymbol.alloc("gettertest")).base_asMethod(); assertEquals("gettertest", result.base_getName().toString()); // assert (42 == result()) assertEquals(TE... |
atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("settertest"), new NATTable(new ATObject[] { NATFraction.atValue(0.1) })); | atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("settertest"), new NATTable(new ATObject[] { NATFraction.atValue(0.1) })); | public void testIllegalArgs() { try { atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("settertest"), new NATTable(new ATObject[] { NATFraction.atValue(0.1) })); fail("Expected an illegal argument exception"); } catch(XTypeMismatch e) { // Java expects an int, so AT expects a native number, but is given a... |
atTestClass.meta_assignField(atTestClass, AGSymbol.alloc("TEST_OBJECT_INIT"), NATNumber.atValue(0)); | atTestClass.meta_assignField(atTestClass, AGSymbol.jAlloc("TEST_OBJECT_INIT"), NATNumber.atValue(0)); | public void testIllegalAssignment() { try { atTestClass.meta_assignField(atTestClass, AGSymbol.alloc("TEST_OBJECT_INIT"), NATNumber.atValue(0)); fail("Expected an illegal assignment exception"); } catch(XUnassignableField e) { // expected exception: success } catch(InterpreterException e) { fail(e.getMessag... |
AGSymbol.alloc("class"), new NATTable(new ATObject[] { AGSymbol.alloc("lowercaseClassTest") })); | AGSymbol.jAlloc("class"), new NATTable(new ATObject[] { AGSymbol.jAlloc("lowercaseClassTest") })); | public void testJLobbyExplicitClassLoading() throws InterpreterException { ATObject eduVubAtObjectsSymbiosisPkg = new JavaPackage("edu.vub.at.objects.symbiosis."); // load the class manually: invoke pkg.class("lowercaseClassTest") ATObject cls = eduVubAtObjectsSymbiosisPkg.meta_invoke( eduVubAtObjectsSymbiosisPk... |
AGSymbol.alloc("lowercaseClassTest")).asNativeBoolean().javaValue); | AGSymbol.jAlloc("lowercaseClassTest")).asNativeBoolean().javaValue); | public void testJLobbyExplicitClassLoading() throws InterpreterException { ATObject eduVubAtObjectsSymbiosisPkg = new JavaPackage("edu.vub.at.objects.symbiosis."); // load the class manually: invoke pkg.class("lowercaseClassTest") ATObject cls = eduVubAtObjectsSymbiosisPkg.meta_invoke( eduVubAtObjectsSymbiosisPk... |
ATObject fooPkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("foo")); | ATObject fooPkg = jLobby_.meta_select(jLobby_, AGSymbol.jAlloc("foo")); | public void testJLobbyExplicitPackageLoading() throws InterpreterException { // def fooPkg := jLobby.foo; ATObject fooPkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("foo")); // def BarPkg := foo.package(`Bar); ATObject BarPkg = fooPkg.meta_invoke(fooPkg, AGSymbol.alloc("package"), new NA... |
AGSymbol.alloc("package"), new NATTable(new ATObject[] { AGSymbol.alloc("Bar") })); | AGSymbol.jAlloc("package"), new NATTable(new ATObject[] { AGSymbol.jAlloc("Bar") })); | public void testJLobbyExplicitPackageLoading() throws InterpreterException { // def fooPkg := jLobby.foo; ATObject fooPkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("foo")); // def BarPkg := foo.package(`Bar); ATObject BarPkg = fooPkg.meta_invoke(fooPkg, AGSymbol.alloc("package"), new NA... |
assertTrue(fooPkg.meta_respondsTo(AGSymbol.alloc("Bar")).asNativeBoolean().javaValue); | assertTrue(fooPkg.meta_respondsTo(AGSymbol.jAlloc("Bar")).asNativeBoolean().javaValue); | public void testJLobbyExplicitPackageLoading() throws InterpreterException { // def fooPkg := jLobby.foo; ATObject fooPkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("foo")); // def BarPkg := foo.package(`Bar); ATObject BarPkg = fooPkg.meta_invoke(fooPkg, AGSymbol.alloc("package"), new NA... |
jLobby_.meta_select(jLobby_, AGSymbol.alloc("Foo")); | jLobby_.meta_select(jLobby_, AGSymbol.jAlloc("Foo")); | public void testJLobbyNonexistentClassLoading() throws InterpreterException { try { jLobby_.meta_select(jLobby_, AGSymbol.alloc("Foo")); fail("expected a class not found exception"); } catch (XClassNotFound e) { // success: expected exception } } |
ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("java")); | ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.jAlloc("java")); | public void testJLobbyPackageLoading() throws InterpreterException { ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("java")); assertEquals(JavaPackage.class, jpkg.getClass()); assertTrue(jLobby_.meta_respondsTo(AGSymbol.alloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpk... |
assertTrue(jLobby_.meta_respondsTo(AGSymbol.alloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpkg, AGSymbol.alloc("lang")); | assertTrue(jLobby_.meta_respondsTo(AGSymbol.jAlloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpkg, AGSymbol.jAlloc("lang")); | public void testJLobbyPackageLoading() throws InterpreterException { ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("java")); assertEquals(JavaPackage.class, jpkg.getClass()); assertTrue(jLobby_.meta_respondsTo(AGSymbol.alloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpk... |
assertTrue(jpkg.meta_respondsTo(AGSymbol.alloc("lang")).asNativeBoolean().javaValue); ATObject jObject = jlpkg.meta_select(jlpkg, AGSymbol.alloc("Object")); | assertTrue(jpkg.meta_respondsTo(AGSymbol.jAlloc("lang")).asNativeBoolean().javaValue); ATObject jObject = jlpkg.meta_select(jlpkg, AGSymbol.jAlloc("Object")); | public void testJLobbyPackageLoading() throws InterpreterException { ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("java")); assertEquals(JavaPackage.class, jpkg.getClass()); assertTrue(jLobby_.meta_respondsTo(AGSymbol.alloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpk... |
assertTrue(jlpkg.meta_respondsTo(AGSymbol.alloc("Object")).asNativeBoolean().javaValue); | assertTrue(jlpkg.meta_respondsTo(AGSymbol.jAlloc("Object")).asNativeBoolean().javaValue); | public void testJLobbyPackageLoading() throws InterpreterException { ATObject jpkg = jLobby_.meta_select(jLobby_, AGSymbol.alloc("java")); assertEquals(JavaPackage.class, jpkg.getClass()); assertTrue(jLobby_.meta_respondsTo(AGSymbol.alloc("java")).asNativeBoolean().javaValue); ATObject jlpkg = jpkg.meta_select(jpk... |
atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("foo"), | atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("foo"), | public void testNonExistentMethod() { try { // invokes foo(1) => error atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("foo"), new NATTable(new ATObject[] { NATNumber.ONE })); fail("Expected a selector not found exception"); } catch (XSelectorNotFound e) { // success: expected exception ... |
atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedmatch2"), | atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("overloadedmatch2"), | public void testOverloadedInvWithMultipleMatches() { try { // invokes overloadedmatch2(Object|SymbiosisTest) => error atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedmatch2"), new NATTable(new ATObject[] { atTestObject })); fail("Expected a symbiosis exception"); } catch (XSymbi... |
atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedtest"), | atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("overloadedtest"), | public void testOverloadedInvWithNoMatch() { try { // invokes overloadedtest(NATObject) => error atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedtest"), new NATTable(new ATObject[] { new NATObject() })); fail("Expected a symbiosis exception"); } catch (XSymbiosisFailure e) { /... |
AGSymbol.alloc("overloadedtest"), | AGSymbol.jAlloc("overloadedtest"), | public void testOverloadedInvWithOneMatch() { try { // invokes overloadedtest(int) ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedtest"), new NATTable(new ATObject[] { NATNumber.ZERO })); assertEquals("(int)", result.asNativeText().javaValue); // inv... |
atTestClass.meta_defineField(AGSymbol.alloc("z"), NATNumber.ONE); | atTestClass.meta_defineField(AGSymbol.jAlloc("z"), NATNumber.ONE); | public void testSymbiontClassAdditions() { try { // (reflect: atTestClass).defineField("z", 1) atTestClass.meta_defineField(AGSymbol.alloc("z"), NATNumber.ONE); // assert(atTestClass.z == 1) assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.alloc("z"))); // assert(aTestObject.z == 1)... |
assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.alloc("z"))); | assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.jAlloc("z"))); | public void testSymbiontClassAdditions() { try { // (reflect: atTestClass).defineField("z", 1) atTestClass.meta_defineField(AGSymbol.alloc("z"), NATNumber.ONE); // assert(atTestClass.z == 1) assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.alloc("z"))); // assert(aTestObject.z == 1)... |
assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.alloc("z"))); | assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.jAlloc("z"))); | public void testSymbiontClassAdditions() { try { // (reflect: atTestClass).defineField("z", 1) atTestClass.meta_defineField(AGSymbol.alloc("z"), NATNumber.ONE); // assert(atTestClass.z == 1) assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.alloc("z"))); // assert(aTestObject.z == 1)... |
assertEquals(atTestObject.meta_select(atTestObject, AGSymbol.alloc("xtest")), atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("get"), NATTable.EMPTY)); | assertEquals(atTestObject.meta_select(atTestObject, AGSymbol.jAlloc("xtest")), atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("get"), NATTable.EMPTY)); | public void testSymbiontClassAdditions() { try { // (reflect: atTestClass).defineField("z", 1) atTestClass.meta_defineField(AGSymbol.alloc("z"), NATNumber.ONE); // assert(atTestClass.z == 1) assertEquals(NATNumber.ONE, atTestClass.meta_select(atTestClass, AGSymbol.alloc("z"))); // assert(aTestObject.z == 1)... |
atTestObject.meta_defineField(AGSymbol.alloc("xtest"), NATNumber.ONE); | atTestObject.meta_defineField(AGSymbol.jAlloc("xtest"), NATNumber.ONE); | public void testSymbiontDuplicates() { try { try { // def atTestObject.xtest := 1 atTestObject.meta_defineField(AGSymbol.alloc("xtest"), NATNumber.ONE); fail("expected a duplicate slot exception"); } catch (XDuplicateSlot e) { // expected exception: success } try { // def atTestObject.getter... |
atTestObject.meta_defineField(AGSymbol.alloc("x"), NATNumber.ONE); | atTestObject.meta_defineField(AGSymbol.jAlloc("x"), NATNumber.ONE); | public void testSymbiontInstanceAdditions() { try { // (reflect: atTestObject).defineField("x", 1) atTestObject.meta_defineField(AGSymbol.alloc("x"), NATNumber.ONE); // assert(atTestObject.x == 1) assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.alloc("x"))); // (reflect: atTes... |
assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.alloc("x"))); | assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.jAlloc("x"))); | public void testSymbiontInstanceAdditions() { try { // (reflect: atTestObject).defineField("x", 1) atTestObject.meta_defineField(AGSymbol.alloc("x"), NATNumber.ONE); // assert(atTestObject.x == 1) assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.alloc("x"))); // (reflect: atTes... |
assertEquals(NATNumber.ZERO, atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("foo"), | assertEquals(NATNumber.ZERO, atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("foo"), | public void testSymbiontInstanceAdditions() { try { // (reflect: atTestObject).defineField("x", 1) atTestObject.meta_defineField(AGSymbol.alloc("x"), NATNumber.ONE); // assert(atTestObject.x == 1) assertEquals(NATNumber.ONE, atTestObject.meta_select(atTestObject, AGSymbol.alloc("x"))); // (reflect: atTes... |
AGSymbol.alloc("overloadedvararg"), | AGSymbol.jAlloc("overloadedvararg"), | public void testVarArgInvocation() { try { ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("overloadedvararg"), new NATTable(new ATObject[] { NATNumber.ZERO, NATNumber.ONE })); assertEquals(NATNil._INSTANCE_, result); } catch (InterpreterException e) { fail(e.get... |
ATObject result = atTestClass.meta_invoke(atTestClass, AGSymbol.alloc("prefix"), new NATTable(new ATObject[] { prefix })); | ATObject result = atTestClass.meta_invoke(atTestClass, AGSymbol.jAlloc("prefix"), new NATTable(new ATObject[] { prefix })); | public void testWorkingClassInvocation() { try { // def result := atTestClass.prefix("Hello, "); assert("Hello, " + ytest == result) String txt = "Hello, "; NATText prefix = NATText.atValue(txt); ATObject result = atTestClass.meta_invoke(atTestClass, AGSymbol.alloc("prefix"), new NATTable(new ATObject[] { pre... |
result = atTestClass.meta_select(atTestClass, AGSymbol.alloc("ytest")); | result = atTestClass.meta_select(atTestClass, AGSymbol.jAlloc("ytest")); | public void testWorkingClassInvocation() { try { // def result := atTestClass.prefix("Hello, "); assert("Hello, " + ytest == result) String txt = "Hello, "; NATText prefix = NATText.atValue(txt); ATObject result = atTestClass.meta_invoke(atTestClass, AGSymbol.alloc("prefix"), new NATTable(new ATObject[] { pre... |
result = atTestClass.meta_assignField(atTestClass, AGSymbol.alloc("ytest"), prefix); | result = atTestClass.meta_assignField(atTestClass, AGSymbol.jAlloc("ytest"), prefix); | public void testWorkingClassInvocation() { try { // def result := atTestClass.prefix("Hello, "); assert("Hello, " + ytest == result) String txt = "Hello, "; NATText prefix = NATText.atValue(txt); ATObject result = atTestClass.meta_invoke(atTestClass, AGSymbol.alloc("prefix"), new NATTable(new ATObject[] { pre... |
assertEquals(NATNumber.ONE, instance.meta_select(instance, AGSymbol.alloc("xtest"))); | assertEquals(NATNumber.ONE, instance.meta_select(instance, AGSymbol.jAlloc("xtest"))); | public void testWorkingInstanceCreation() { try { // def instance := atTestClass.new(1) ATObject instance = atTestClass.meta_newInstance(new NATTable(new ATObject[] { NATNumber.ONE })); assertEquals(JavaObject.class, instance.getClass()); assertEquals(NATNumber.ONE, instance.meta_select(instance, AGSymbol.all... |
ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), NATTable.EMPTY); | ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("gettertest"), NATTable.EMPTY); | public void testWorkingInstanceInvocation() { try { // def result := atTestObject.gettertest(); assert(42 == result) ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), NATTable.EMPTY); assertEquals(TEST_OBJECT_INIT, result.asNativeNumber().javaValue); // result := atTest... |
result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("settertest"), new NATTable(new ATObject[] { NATNumber.ONE })); | result = atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("settertest"), new NATTable(new ATObject[] { NATNumber.ONE })); | public void testWorkingInstanceInvocation() { try { // def result := atTestObject.gettertest(); assert(42 == result) ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), NATTable.EMPTY); assertEquals(TEST_OBJECT_INIT, result.asNativeNumber().javaValue); // result := atTest... |
result = atTestObject.meta_select(atTestObject, AGSymbol.alloc("xtest")); | result = atTestObject.meta_select(atTestObject, AGSymbol.jAlloc("xtest")); | public void testWorkingInstanceInvocation() { try { // def result := atTestObject.gettertest(); assert(42 == result) ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), NATTable.EMPTY); assertEquals(TEST_OBJECT_INIT, result.asNativeNumber().javaValue); // result := atTest... |
assertTrue(atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("identitytest"), | assertTrue(atTestObject.meta_invoke(atTestObject, AGSymbol.jAlloc("identitytest"), | public void testWorkingInstanceInvocation() { try { // def result := atTestObject.gettertest(); assert(42 == result) ATObject result = atTestObject.meta_invoke(atTestObject, AGSymbol.alloc("gettertest"), NATTable.EMPTY); assertEquals(TEST_OBJECT_INIT, result.asNativeNumber().javaValue); // result := atTest... |
String queryToBeReplacedId = iwc.getParameter(KEY_CHOSEN_QUERY); | Object queryToBeReplacedId = iwc.getParameter(KEY_CHOSEN_QUERY); | private void parseAction(IWContext iwc) throws NumberFormatException, IDOStoreException, IOException, RemoteException { if (iwc.isParameterSet(ReportQueryBuilder.PARAM_LAYOUT_FOLDER_ID)) { layoutFolderId = iwc.getParameter(ReportQueryBuilder.PARAM_LAYOUT_FOLDER_ID); } else { return; } if (iwc.isParameterSet(K... |
UserQuery userQuery = queryService.storeQuery(name, icFile, isPrivate, new Integer(queryToBeReplacedId), iwc); | UserQuery userQuery = queryService.storeQuery(name, icFile, isPrivate, queryToBeReplacedId, iwc); | private void parseAction(IWContext iwc) throws NumberFormatException, IDOStoreException, IOException, RemoteException { if (iwc.isParameterSet(ReportQueryBuilder.PARAM_LAYOUT_FOLDER_ID)) { layoutFolderId = iwc.getParameter(ReportQueryBuilder.PARAM_LAYOUT_FOLDER_ID); } else { return; } if (iwc.isParameterSet(K... |
Graphics2D copy = (Graphics2D)g; | Graphics2D copy = (Graphics2D)g.create(); | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Graphics2D copy = (Graphics2D)g; if (copy != null) { try { Fon... |
String name = request.getParameter("name"); | String name = getReqPar(request, "name"); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); String name = request.getParameter("name"); if (name == null) { ... |
return "error"; | return "retry"; | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); String name = request.getParameter("name"); if (name == null) { ... |
String reqpar = request.getParameter("delete"); | String reqpar = getReqPar(request, "delete"); | public String doAction(HttpServletRequest request, HttpServletResponse response, BwSession sess, BwActionFormBase form) throws Throwable { CalSvcI svc = form.fetchSvci(); String name = request.getParameter("name"); if (name == null) { ... |
System.out.println("Location of Seismogram: " + header.getSensorLat() + " " + header.getSensorLong()); | public static Channel getChannel(PSNEventRecord evRec){ ChannelId channelId = getChannelId(evRec); PSNHeader header = evRec.getFixedHeader(); float stationElevation = (float)header.getSensorElevation(); if (stationElevation == -12345.0f){ stationElevation = 0; } ... | |
System.out.println("Location of Event: " + evInfo.getLat() + " " +evInfo.getLon()); | public static EventAccessOperations getEvent(PSNDataFile psnData){ PSNVariableHeader varHeader = psnData.getEventRecords()[0].getVariableHeader(); if (varHeader.hasEventInfo()){ PSNEventInfo evInfo = varHeader.getEventInfo()[0]; MicroSecondDate originTime = microSecondDateFromPSN... | |
getHow().setPrivilege(val); | public void addPriv(Privilege val) { getPrivs().add(val); } | |
if (notWho != that.notWho) { if (notWho) { return -1; } return 1; | int res = compareWho(that); if (res == 0) { res = getHow().compareTo(that.getHow()); | public int compareTo(Object o) { if (this == o) { return 0; } if (!(o instanceof Ace)) { return 1; } Ace that = (Ace)o; if (notWho != that.notWho) { if (notWho) { return -1; } return 1; } if (whoType < that.whoType) { return -1; } if (whoType > that.w... |
if (whoType < that.whoType) { return -1; } if (whoType > that.whoType) { return 1; } return compareWho(who, that.who); | return res; | public int compareTo(Object o) { if (this == o) { return 0; } if (!(o instanceof Ace)) { return 1; } Ace that = (Ace)o; if (notWho != that.notWho) { if (notWho) { return -1; } return 1; } if (whoType < that.whoType) { return -1; } if (whoType > that.w... |
private int compareWho(String who1, String who2) { if ((who1 == null) && (who2 == null)) { return 0; | public int compareWho(Ace whoMatch) { if (notWho != whoMatch.notWho) { if (notWho) { return -1; } return 1; | private int compareWho(String who1, String who2) { if ((who1 == null) && (who2 == null)) { return 0; } if (who1 == null) { return -1; } if (who2 == null) { return 1; } return who1.compareTo(who2); } |
if (who1 == null) { | if (whoType < whoMatch.whoType) { | private int compareWho(String who1, String who2) { if ((who1 == null) && (who2 == null)) { return 0; } if (who1 == null) { return -1; } if (who2 == null) { return 1; } return who1.compareTo(who2); } |
if (who2 == null) { | if (whoType > whoMatch.whoType) { | private int compareWho(String who1, String who2) { if ((who1 == null) && (who2 == null)) { return 0; } if (who1 == null) { return -1; } if (who2 == null) { return 1; } return who1.compareTo(who2); } |
return who1.compareTo(who2); | return compareWho(who, whoMatch.who); | private int compareWho(String who1, String who2) { if ((who1 == null) && (who2 == null)) { return 0; } if (who1 == null) { return -1; } if (who2 == null) { return 1; } return who1.compareTo(who2); } |
if (this == o) { return true; } if (!(o instanceof Ace)) { return false; } Ace that = (Ace)o; return sameWho(who, that.who) && (notWho == that.notWho) && (whoType == that.whoType); | return compareTo(o) == 0; | public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Ace)) { return false; } Ace that = (Ace)o; return sameWho(who, that.who) && (notWho == that.notWho) && (whoType == that.whoType); } |
if (how == null) { how = new PrivilegeSet(); } | public PrivilegeSet getHow() { return how; } | |
public void setPrivilege(Privilege priv) { | public void setPrivilege(int index, char val) { | public void setPrivilege(Privilege priv) { if (privileges == null) { privileges = (char[])defaultNonOwnerPrivileges.getPrivileges().clone(); } if (priv.getDenial()) { privileges[priv.getIndex()] = denied; } else { privileges[priv.getIndex()] = allowed; } } |
if (priv.getDenial()) { privileges[priv.getIndex()] = denied; } else { privileges[priv.getIndex()] = allowed; } | privileges[index] = val; | public void setPrivilege(Privilege priv) { if (privileges == null) { privileges = (char[])defaultNonOwnerPrivileges.getPrivileges().clone(); } if (priv.getDenial()) { privileges[priv.getIndex()] = denied; } else { privileges[priv.getIndex()] = allowed; } } |
public PrivilegeSet() { privileges = (char[])defaultNonOwnerPrivileges.getPrivileges().clone(); | public PrivilegeSet(char privAllState, char privReadState, char privReadAclState, char privReadCurrentUserPrivilegeSetState, char privReadFreeBusyState, char privWriteState, char privWriteAclState, char privWritePropertiesState, char privWriteContentState, char privBindState, char privUnbindState, char privUnlockState,... | public PrivilegeSet() { privileges = (char[])defaultNonOwnerPrivileges.getPrivileges().clone(); } |
dataSetIdCache = null; | public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwne... | |
logger.debug("dataset append "+config.getChildNodes().getLength()); | public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwne... | |
logger.debug("dataset import "+config.getChildNodes().getLength()); | public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwne... | |
dataSetCache.put(dataset.getId(), dataset); String[] ids = getDataSetIds(); dataSetIdCache = null; String[] tmp = new String[ids.length+1]; System.arraycopy(ids, 0, tmp, 0, ids.length); tmp[tmp.length-1] = dataset.getId(); dataSetIdCache = tmp; | public void addDataSet(edu.sc.seis.fissuresUtil.xml.DataSet dataset, AuditInfo[] audit) { dataSetIdCache = null; if (dataset instanceof XMLDataSet) { XMLDataSet xds = (XMLDataSet)dataset; Element element = xds.getElement(); if (element.getOwne... | |
addDataSet(dataset, audit); | public DataSet createChildDataSet(String id, String name, String owner, AuditInfo[] audit) { dataSetIdCache = null; name = XMLUtil.getUniqueName(getDataSetNames(), name); XMLDataSet dataset = new XMLDataSet(docBuilder, base, id, name, owner); //addDat... | |
openSess(); | openHibSess(); | public void restoreUserInfo(BwUserInfo o) throws Throwable { if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getUser().getAccount()) == null)) { return; } openSess(); save(o); closeSess(); } |
save(o); | hibSave(o); | public void restoreUserInfo(BwUserInfo o) throws Throwable { if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getUser().getAccount()) == null)) { return; } openSess(); save(o); closeSess(); } |
closeSess(); | closeHibSess(); | public void restoreUserInfo(BwUserInfo o) throws Throwable { if (globals.onlyUsers && (globals.onlyUsersMap.get(o.getUser().getAccount()) == null)) { return; } openSess(); save(o); closeSess(); } |
CalSvcI svci = form.fetchSvci(); String name = getReqPar(request, "viewName"); if (name == null) { name = svci.getUserPrefs().getPreferredView(); } if (name == null) { form.getErr().emit("org.bedework.client.error.nodefaultview"); | if (!setView(getReqPar(request, "viewName"), form)) { | private String doView(HttpServletRequest request, BwActionFormBase form) throws Throwable { CalSvcI svci = form.fetchSvci(); String name = getReqPar(request, "viewName"); if (name == null) { name = svci.getUserPrefs().getPreferredView(); } if (name == null) { form.getEr... |
if (!svci.setCurrentView(name)) { form.getErr().emit("org.bedework.client.error.unknownview"); return "noViewDef"; } form.setSelectionType(BedeworkDefs.selectionTypeView); form.refreshIsNeeded(); | private String doView(HttpServletRequest request, BwActionFormBase form) throws Throwable { CalSvcI svci = form.fetchSvci(); String name = getReqPar(request, "viewName"); if (name == null) { name = svci.getUserPrefs().getPreferredView(); } if (name == null) { form.getEr... | |
null, | public Synchml(String account, String deviceId, URIgen uriGen, boolean debug) throws CalFacadeException { svci = new CalSvc(); this.deviceId = deviceId; this.debug = debug; CalSvcIPars pars = new CalSvcIPars(account, account, ... | |
if (request.isUserInRole(roles[i])) | if (request.isUserInRole(roles[i].trim())) | public int doStartTag() throws JspException { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); String[] roles = role.split(","); for (int i = 0; i < roles.length; i++) { if (request.isUserInRole(roles[i])) return SKIP_BODY; } return EVAL_BODY_INCLUDE; } |
return ReduceTool.merge(request); | RequestFilter[] reduced = ReduceTool.merge(request); logger.debug("Reduced " + request.length + " to " + reduced.length); return reduced; | public RequestFilter[] findMatchingSeismograms(RequestFilter[] requestArray, boolean ignoreNetworkTimes) throws SQLException { List results = queryDatabaseForSeismograms(requestArray, false, ... |
throws IOException { | throws IOException, RT130FormatException { | private List getMatchingSeismogramsFromRefTek(String seismogramFile, ChannelId chanId, MicroSecondDate beginTime, MicroSecondDate endTime) throws IOException ... |
PacketType[] seismogramDataPacketArray; LocalSeismogramImpl[] seis; try { seismogramDataPacketArray = toSeismogramDataPacket.processRT130Data(); RT130ToLocalSeismogram toSeismogram = new RT130ToLocalSeismogram(); seis = toSeismogram.ConvertRT130ToLocalSeismogram(seismogramDataPacketArray); } catch(RT130FormatException ... | PacketType[] seismogramDataPacketArray = toSeismogramDataPacket.processRT130Data(); RT130ToLocalSeismogram toSeismogram = new RT130ToLocalSeismogram(); LocalSeismogramImpl[] seis = toSeismogram.ConvertRT130ToLocalSeismogram(seismogramDataPacketArray); logger.debug("Got " + seis.length + " seismograms out of " + seismog... | private List getMatchingSeismogramsFromRefTek(String seismogramFile, ChannelId chanId, MicroSecondDate beginTime, MicroSecondDate endTime) throws IOException ... |
logger.debug(matchingSeis.size() + " were of the right channel code"); | private List getMatchingSeismogramsFromRefTek(String seismogramFile, ChannelId chanId, MicroSecondDate beginTime, MicroSecondDate endTime) throws IOException ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.