rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (newTopic && request.getParameter("poll_label") != null) { Poll poll = PollCommon.fillPollFromRequest(); | Poll poll = PollCommon.fillPollFromRequest(); if (poll != null && newTopic) { | public void insertSave() throws Exception { int forumId = this.request.getIntParameter("forum_id"); boolean firstPost = false; if (!this.anonymousPost(forumId)) { SessionFacade.setAttribute(ConfigKeys.REQUEST_DUMP, this.request.dumpRequest()); return; } Topic t = new Topic(-1); t.setForumId(forumId); boo... |
System.out.println( "---------------------------------------------------------------------------------------------------------" ); | private void message( String message ) { System.out.println( "---------------------------------------------------------------------------------------------------------" ); System.out.println( message ); System.out.println( "----------------------------------------------... | |
throw new NestedError("couldn't train distribution"); | throw new AssertionFailure("couldn't train distribution"); | public static void main(String [] args) { try { // verify arguments if (args.length != 2) { System.out.println("Usage: java dist/TestOrderNDistribution <test seq length> <order>"); System.exit(1); } SymbolList res = Tools.createSymbolList(Integer.parseInt(args[0]))... |
if (start < 1 || end > length()) { throw new IndexOutOfBoundsException( "Sublist index out of bounds " + length() + ":" + start + "," + end ); } if (end < start) { throw new IllegalArgumentException( "end must not be lower than start: start=" + start + ", end=" + end ); } | public SymbolList subList(int start, int end){ SimpleSymbolList sl = new SimpleSymbolList(this,viewOffset+start,viewOffset+end); if (isView){ referenceSymbolList.addChangeListener(sl); }else{ this.addChangeListener(sl); } return sl; } | |
public RobotOutputStream getOut() { | public synchronized RobotOutputStream getOut() { | public RobotOutputStream getOut() { if (out == null) { if (battle != null) { synchronized (out) { out = new RobotOutputStream(battle.getBattleThread()); } } } return out; } |
synchronized (out) { out = new RobotOutputStream(battle.getBattleThread()); } | out = new RobotOutputStream(battle.getBattleThread()); | public RobotOutputStream getOut() { if (out == null) { if (battle != null) { synchronized (out) { out = new RobotOutputStream(battle.getBattleThread()); } } } return out; } |
protected void writeConnectionListings(PrintWriter aWriter, String prefixEndingInSlash) { | protected void writeConnectionListings(PrintWriter aWriter, String prefix) { | protected void writeConnectionListings(PrintWriter aWriter, String prefixEndingInSlash) { Map activeConnections = getTheConnectionFactory().getActiveConnections(); for (Iterator i = activeConnections.keySet().iterator(); i.hasNext();) { HJBConnectio... |
aWriter.println(prefixEndingInSlash + aConnection); | protected void writeConnectionListings(PrintWriter aWriter, String prefixEndingInSlash) { Map activeConnections = getTheConnectionFactory().getActiveConnections(); for (Iterator i = activeConnections.keySet().iterator(); i.hasNext();) { HJBConnectio... | |
prefixEndingInSlash + PathNaming.CONNECTION + "-" + aConnection.getConnectionIndex(), | prefix, | protected void writeConnectionListings(PrintWriter aWriter, String prefixEndingInSlash) { Map activeConnections = getTheConnectionFactory().getActiveConnections(); for (Iterator i = activeConnections.keySet().iterator(); i.hasNext();) { HJBConnectio... |
protected void writeConnections(PrintWriter aWriter, String prefixEndingInSlash) { | protected void writeConnections(PrintWriter aWriter) { | protected void writeConnections(PrintWriter aWriter, String prefixEndingInSlash) { Map activeConnections = getTheConnectionFactory().getActiveConnections(); for (Iterator i = activeConnections.keySet().iterator(); i.hasNext();) { HJBConnection aConnection ... |
aWriter.print(prefixEndingInSlash + aConnection); aWriter.println(); | aWriter.println(new ConnectionDescription(aConnection).longDescription()); | protected void writeConnections(PrintWriter aWriter, String prefixEndingInSlash) { Map activeConnections = getTheConnectionFactory().getActiveConnections(); for (Iterator i = activeConnections.keySet().iterator(); i.hasNext();) { HJBConnection aConnection ... |
writeConnections(pw, prefixEndingInSlash); | String prefixWithoutFinalSlash = prefixEndingInSlash.substring(0, (prefixEndingInSlash.length() - 1)); pw.println(prefixWithoutFinalSlash + ':'); String totalLine = strings().getString(HJBStrings.LISTING_TOTAL, new Integer(getListingTotal())); pw.println(totalLine); writeConnections(pw); | public void writeListing(Writer aWriter, String prefix, boolean recurse) { PrintWriter pw = new PrintWriter(aWriter); String prefixEndingInSlash = prefix.endsWith("/") ? prefix : prefix + "/"; writeConnections(pw, prefixEndingInSlash); if (getTheConnectionFactory().getActi... |
throw new UnpositionedError(CaesarMessages.CCLASS_SUPER_NOT_FOUND); | throw new UnpositionedError(CaesarMessages.CCLASS_SUPER_NOT_FOUND, this); | public CType checkType(CTypeContext context) throws UnpositionedError { CClassContext classContext = context.getClassContext(); if(classContext != null && classContext.getCClass().isNested()) { if (qualifiedName.indexOf('/') >= 0) throw new UnpositionedError(CaesarMessages.CCLASS_... |
Rectangle2D clip = g.getClipBounds(); | Rectangle2D oldClip = g.getClipBounds(); AffineTransform oldTrans = g.getTransform(); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
leading = sp.graphicsToSequence(clip.getMinX()); trailing = sp.graphicsToSequence(clip.getMaxX()); | leading = sp.graphicsToSequence(oldClip.getMinX()); trailing = sp.graphicsToSequence(oldClip.getMaxX()); g.translate(-graphOffset, 0.0); g.setClip(AffineTransform.getTranslateInstance(-graphOffset, 0.0) .createTransformedShape(oldClip)); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
leading = sp.graphicsToSequence(clip.getMinY()); trailing = sp.graphicsToSequence(clip.getMaxY()); | leading = sp.graphicsToSequence(oldClip.getMinY()); trailing = sp.graphicsToSequence(oldClip.getMaxY()); g.translate(0.0, -graphOffset); g.setClip(AffineTransform.getTranslateInstance(0.0, -graphOffset) .createTransformedShape(oldClip)); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
double gPos = sp.sequenceToGraphics(sPos); | double gPos = sp.sequenceToGraphics(sPos - symOffset); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
g.drawString("" + c, (int) (gPos + fudgeAcross), (int) fudgeDown); | g.drawString( String.valueOf(sPos).substring(0, 1), (int) (gPos + fudgeAcross), (int) fudgeDown ); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
g.drawString("" + c, (int) fudgeAcross, (int) (gPos + fudgeDown)); | g.drawString( String.valueOf(c), (int) fudgeAcross, (int) (gPos + fudgeDown) ); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... |
g.setTransform(oldTrans); g.setClip(oldClip); | public void paint( Graphics2D g, SequenceRenderContext sp, RangeLocation pos ) { SymbolList seq = sp.getSequence(); int direction = sp.getDirection(); g.setFont(sp.getFont()); Rectangle2D clip = g.getClipBounds(); g.setColor(Color.black); double scale = s... | |
return getMin() + ", " + getMax(); | return "[" + getMin() + ", " + getMax() + "]"; | public String toString() { return getMin() + ", " + getMax(); } |
setFault(e); | recordFault(e); | public void execute() { assertNotCompleted(); try { createDurableSubscriberAndSaveItsIndex(); } catch (RuntimeException e) { setFault(e); } completed(); } |
g.drawImage(offscreenImage, 0, 0, null); g.dispose(); if (getGraphics() != null) { | if (g != null) { g.drawImage(offscreenImage, 0, 0, null); | public void update() { try { if (robocodeFrame.isIconified() || (getWidth() <= 0) || (getHeight() <= 0)) { return; } if (!initialized) { initialize(); } if (offscreenImage != null) { offscreenGfx = (Graphics2D) offscreenImage.getGraphics(); offscreenGfx.setRenderingHints(renderingHints); ... |
g.dispose(); | public void update() { try { if (robocodeFrame.isIconified() || (getWidth() <= 0) || (getHeight() <= 0)) { return; } if (!initialized) { initialize(); } if (offscreenImage != null) { offscreenGfx = (Graphics2D) offscreenImage.getGraphics(); offscreenGfx.setRenderingHints(renderingHints); ... | |
if (LOG.isDebugEnabled()) { LOG.debug("Using selector: " + messageSelector); } LOG.info("Using selector: " + messageSelector); | protected String getMessageSelector() { return messageSelector; } | |
public boolean inject(String fromAddress, String toAddress, byte[] mailData) throws MessagingException; | public boolean inject(String fromAddress, String toAddress, InputStream mailData) throws MessagingException, IOException; | public boolean inject(String fromAddress, String toAddress, byte[] mailData) throws MessagingException; |
public AConcat( PValOrSid _valOrSid_) | public AConcat() | public AConcat( PValOrSid _valOrSid_) { setValOrSid(_valOrSid_); } |
setValOrSid(_valOrSid_); | public AConcat( PValOrSid _valOrSid_) { setValOrSid(_valOrSid_); } | |
ResidueParser rParser = alpha.getParser("symbol"); | SymbolParser rParser = alpha.getParser("token"); | public static final void main(String [] args) throws Exception { if(args.length != 2) { throw new Exception("Use: CorbaDBServer sequences.fa type"); } // work out what to load File seqDBFile = new File(args[0]); Alphabet alpha = AlphabetManager.instance().alphabetForName(args[1]); if(alpha ... |
} catch (SeqException se) { | } catch (BioException se) { | public static final void main(String [] args) throws Exception { if(args.length != 2) { throw new Exception("Use: CorbaDBServer sequences.fa type"); } // work out what to load File seqDBFile = new File(args[0]); Alphabet alpha = AlphabetManager.instance().alphabetForName(args[1]); if(alpha ... |
return n.getQualifiedName().toString(); | res = n.getQualifiedName().toString(); | public String findInContextOf(String classQn, String contextClassQn) { CaesarTypeGraph g = getCaesarTypeGraph(); CaesarTypeNode prefixN = caesarTypeGraph.getType(new JavaQualifiedName(classQn)); CaesarTypeNode contextN = caesarTypeGraph.getType(new JavaQualifiedName(contextClassQn)); C... |
return null; | System.out.println(classQn+" in context of "+contextClassQn+"\n\t-> "+res); return res; | public String findInContextOf(String classQn, String contextClassQn) { CaesarTypeGraph g = getCaesarTypeGraph(); CaesarTypeNode prefixN = caesarTypeGraph.getType(new JavaQualifiedName(classQn)); CaesarTypeNode contextN = caesarTypeGraph.getType(new JavaQualifiedName(contextClassQn)); C... |
int j; CaesarTypeNode currentOuter = null; for(j=0; j<thisOuterChain.length-1 && j<contextOuterChain.length; j++) { currentOuter = contextOuterChain[j]; if(!contextOuterChain[j].isSubtypeOf(thisOuterChain[j])) return null; | int s = thisOuterChain.length - 2; if(s > contextOuterChain.length - 1) s = contextOuterChain.length - 1; for(int j=s; j>=0; j--) { CaesarTypeNode t = contextOuterChain[j]; for(int i=j+1; i<thisOuterChain.length; i++) { t = t.lookupInner(thisOuterChain[i].getQualifiedName().getIdent()); if(t == null) break; } if(t !... | public CaesarTypeNode getTypeInContextOf(CaesarTypeNode n) { // top level class, no redefinition possible if(enclosedBy.size() == 0 || n == null) return this; List l1 = new LinkedList(); List l2 = new LinkedList(); // generated lists genOuterList(l1); n.genOuterList(l... |
if(currentOuter == null) return null; for (int i = j; i < thisOuterChain.length; i++) { currentOuter = currentOuter.lookupInner(thisOuterChain[i].getQualifiedName().getIdent()); } return currentOuter; | return null; | public CaesarTypeNode getTypeInContextOf(CaesarTypeNode n) { // top level class, no redefinition possible if(enclosedBy.size() == 0 || n == null) return this; List l1 = new LinkedList(); List l2 = new LinkedList(); // generated lists genOuterList(l1); n.genOuterList(l... |
Set<Permission> perms = role.getPermissions(); if (rawPerson != null && rawPerson.isSiteAdmin()) perms = Permission.ALL; | Set<Permission> perms = rawList.getPermissionsFor(rawPerson); | public static MySubscription mySubscription(Person rawPerson, MailingList rawList) { ListData listData = mailingList(rawList); Role role = rawList.getRoleFor(rawPerson); Set<Permission> perms = role.getPermissions(); // If we're the site admin, override with all. if (rawPerson != null && rawPerson.isSiteAdm... |
Session session = new Session(serverContext, aSocket); PrintWriter out = new PrintWriter(aSocket.getOutputStream()); BufferedReader in = new BufferedReader(new InputStreamReader(aSocket.getInputStream())); try { out.println("220-" + serverContext.getHostname() + " SubEthaMail SMTP Server " + serverContext.getServerVer... | this.socket = aSocket; session = new Session(serverContext, socket); out = new PrintWriter(socket.getOutputStream()); in = new BufferedReader(new InputStreamReader(socket.getInputStream())); new Thread(this).start(); | public SocketHandler(SMTPServerContext serverContext, Socket aSocket) throws IOException { this.serverContext = serverContext; Session session = new Session(serverContext, aSocket); PrintWriter out = new PrintWriter(aSocket.getOutputStream()); BufferedReader in = new BufferedReader(new InputStreamReader(... |
javaTypeGraph.debug(); | public void generate() { DumpTypesVisitor dumpTypesVisitor = new DumpTypesVisitor(caesarTypeGraph); //dumpTypesVisitor.run(); new AddImplicitTypesAndRelationsVisitor(caesarTypeGraph).run(); new FurtherbindingVisitor(caesarTypeGraph).run(); new MixinListVisitor(caesarTypeGraph).run(); dumpTypesVisitor.run()... | |
List ccLst = getCrosscuttingMixinList(node); for (Iterator it2 = ccLst.iterator(); it2.hasNext();) { | List mixinLst = node.getMixinList(); for (Iterator it2 = mixinLst.iterator(); it2.hasNext();) { | private void determineToBeGenerated() { Collection allTypes = caesarTypeSystem.getJavaTypeGraph().getAllTypes(); for (Iterator it = allTypes.iterator(); it.hasNext();) { JavaTypeNode item = (JavaTypeNode)it.next(); CaesarTypeNode node = item.getType(); if (node == null) { continue; } if... |
setFault(e); | recordFault(e); | public void execute() { assertNotCompleted(); try { getProvider().registerConnectionFactory(getName()); } catch (RuntimeException e) { setFault(e); } completed(); } |
log.info("SMTP Server socket started."); | log.info("SMTP Server socket started on port " + serverContext.getPort()); | public void run() { log.info("SMTP Server socket started."); while (go) { try { new SocketHandler(serverContext, serverSocket.accept()); } catch (IOException ioe) { if (go) { log.error("IOException accepting connection in SMTPServiceCore", ioe); } // Otherwise this i... |
assertEquals(2, this.smtp.size()); | assertEquals(4, this.smtp.size()); | public void testSubscribeExistingPerson() throws Exception { // From the list creation assertEquals(1, this.smtp.size()); PersonMixin someone = new PersonMixin(this.admin); SubscribeResult result = someone.getAccountMgr().subscribeMe(ml.getId(), someone.getEmail()); assertEquals(SubscribeResult.OK, result);... |
assertEquals(2, this.smtp.count(MailType.PERSON_SUBSCRIBED)); | public void testSubscribeExistingPerson() throws Exception { // From the list creation assertEquals(1, this.smtp.size()); PersonMixin someone = new PersonMixin(this.admin); SubscribeResult result = someone.getAccountMgr().subscribeMe(ml.getId(), someone.getEmail()); assertEquals(SubscribeResult.OK, result);... | |
assertEquals(3, this.smtp.size()); | assertEquals(5, this.smtp.size()); | public void testSubscribeNewPerson() throws Exception { // From the list creation assertEquals(1, this.smtp.size()); PersonInfoMixin info = new PersonInfoMixin(); this.nobody.getAccountMgr().subscribeAnonymousRequest(ml.getId(), info.getEmail(), info.getName()); // Should contain a "Confirm subscription" em... |
assertEquals(2, this.smtp.count(MailType.PERSON_SUBSCRIBED)); | public void testSubscribeNewPerson() throws Exception { // From the list creation assertEquals(1, this.smtp.size()); PersonInfoMixin info = new PersonInfoMixin(); this.nobody.getAccountMgr().subscribeAnonymousRequest(ml.getId(), info.getEmail(), info.getName()); // Should contain a "Confirm subscription" em... | |
String objectId = this.toString(); objectId = objectId.substring(objectId.lastIndexOf('@') + 1); | String uniqueString = Utils.uniqueString(); | public PersonInfoMixin() throws Exception { String objectId = this.toString(); // looks like: com.similarity.rtest.PersonInfoMixin@bb0d0d objectId = objectId.substring(objectId.lastIndexOf('@') + 1); String baseName = Long.toString(System.currentTimeMillis(), 36); String name = baseName + "-" + objectId; ... |
String baseName = Long.toString(System.currentTimeMillis(), 36); String name = baseName + "-" + objectId; this.password = "asdf" + objectId; this.email = "subetha-" + name + "@localhost"; | this.password = "asdf" + uniqueString; this.email = "subetha-" + uniqueString + "@localhost"; | public PersonInfoMixin() throws Exception { String objectId = this.toString(); // looks like: com.similarity.rtest.PersonInfoMixin@bb0d0d objectId = objectId.substring(objectId.lastIndexOf('@') + 1); String baseName = Long.toString(System.currentTimeMillis(), 36); String name = baseName + "-" + objectId; ... |
seq.createFeature(framed); | public SequenceAnnotator getAnnotator() { return new SequenceAnnotator() { public Sequence annotate(Sequence seq) throws BioException, ChangeVetoException { Feature.Template plain = new Feature.Template(); StrandedFeature.Template stranded = new StrandedFeature.Template(); FramedFeature.T... | |
seq.createFeature(framed); | public Sequence annotate(Sequence seq) throws BioException, ChangeVetoException { Feature.Template plain = new Feature.Template(); StrandedFeature.Template stranded = new StrandedFeature.Template(); FramedFeature.Template framed = new FramedFeature.Template(); plain.annotation = Annota... | |
new FeatureFilter.OverlapsLocation(src.getRange()); | FilterUtils.overlapsLocation(src.getRange()); | public double getDepth(SequenceRenderContext src) { FeatureHolder features = src.getFeatures(); FeatureFilter filter = new FeatureFilter.OverlapsLocation(src.getRange()); FeatureHolder fh = features.filter(filter, false); if (!isCollapsing || fh.countFeatures() > 0) { ... |
FeatureFilter filt = FilterUtils.overlapsLocation( | FeatureFilter filt = FilterUtils.overlapsExtent( | public void paint(Graphics2D g, SequenceRenderContext src) { FeatureFilter filt = FilterUtils.overlapsLocation( GUITools.getVisibleRange(src, g) ); FeatureHolder feats = src.getFeatures().filter(filt, false); for (Iterator i =feats.features(); i.hasNext();) { Shape clip = g.getClip(); ... |
public void testLoadRecipients() throws Exception{ this.init(); TestCaseUtils.loadEnvironment(); TestCaseUtils.initDatabaseImplementation(); | public void testLoadRecipients() throws Exception{ | public void testLoadRecipients() throws Exception{ this.init(); TestCaseUtils.loadEnvironment(); TestCaseUtils.initDatabaseImplementation(); SummaryModel model = new SummaryModel(); Iterator iter = model.listRecipients().iterator(); while (iter.hasNext()) { ... |
while (iter.hasNext()) { User user = (User) iter.next(); System.out.println(user.getUsername()); | while (iter.hasNext()) { System.out.println(iter.next()); | public void testLoadRecipients() throws Exception{ this.init(); TestCaseUtils.loadEnvironment(); TestCaseUtils.initDatabaseImplementation(); SummaryModel model = new SummaryModel(); Iterator iter = model.listRecipients().iterator(); while (iter.hasNext()) { ... |
this.init(); | public void testScheduler() throws Exception{ this.init(); try { SummaryScheduler.startJob(); } catch (SchedulerException e) { e.printStackTrace(); } } | |
this.init(); | public void testSendMails() throws Exception{ this.init(); SummaryModel model = new SummaryModel(); //List recipients = model.listRecipients()// Do not use this at least you want to send e-mails to all users. List recipients = new ArrayList(1); recipients.add("fulano@detal... | |
List recipients = new ArrayList(1); recipients.add("fulano@detal.com"); | List recipients = model.listRecipients(); | public void testSendMails() throws Exception{ this.init(); SummaryModel model = new SummaryModel(); //List recipients = model.listRecipients()// Do not use this at least you want to send e-mails to all users. List recipients = new ArrayList(1); recipients.add("fulano@detal... |
DBConnection.createInstance(); | public static void initDatabaseImplementation() throws Exception { SystemGlobals.loadAdditionalDefaults( SystemGlobals.getValue(ConfigKeys.DATABASE_DRIVER_CONFIG)); SystemGlobals.loadQueries(SystemGlobals.getValue(ConfigKeys.SQL_QUERIES_GENERIC)); SystemGlobals.loadQueries(SystemGlobals.getValue(ConfigKe... | |
public List listPosts(Date firstDate, Date lastDate) throws Exception | public List listPosts(Date firstDate, Date lastDate) | public List listPosts(Date firstDate, Date lastDate) throws Exception { return this.dao.selectLastPosts(firstDate, lastDate); } |
public List listRecipients() throws Exception | public List listRecipients() | public List listRecipients() throws Exception { return this.dao.listRecipients(); } |
public void sendPostsSummary(List recipients) throws Exception | public void sendPostsSummary(List recipients) | public void sendPostsSummary(List recipients) throws Exception { logger.info("Sending Weekly summary..."); // Gets a Date seven days before now int daysBefore = Integer.parseInt(SystemGlobals.getValue(ConfigKeys.SUMMARY_DAYS_BEFORE)); // New date "X" days before now, where "X" is the number set on the variable day... |
KawaProxy.runInSchemeThread(new Runnable() { public void run() { Language interp = Language.getDefaultLanguage(); interp.defineFunction("define-form-processor", new FormProcessorDefiner(currentDictionary)); } }); | KawaProxy.set("define-form-processor", new FormProcessorDefiner(currentDictionary)); | private void loadFormProcessors(final URL userFile) { final UserDictionary currentDictionary = this; KawaProxy.runInSchemeThread(new Runnable() { public void run() { Language interp = Language.getDefaultLanguage(); interp.defineFunction("define-form-processor", new FormProcessor... |
public void run() { Language interp = Language.getDefaultLanguage(); interp.defineFunction("define-form-processor", new FormProcessorDefiner(currentDictionary)); } | public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { scanPendingChangedFiles(files, monitor); } | public void run() { Language interp = Language.getDefaultLanguage(); interp.defineFunction("define-form-processor", new FormProcessorDefiner(currentDictionary)); } |
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { scanPendingChangedFiles(files, monitor); } | public void run () { try { formProcessor.applyN(new Object[] {dictionary, object, resource, new Integer(position)}); } catch (Throwable exception) { SchemeScriptPlugin.logException("Unable to process form", exception); } } | public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { scanPendingChangedFiles(files, monitor); } |
CTypeContext typeContext = null; if (this.originalClass != null) { typeContext = originalClass.getContext(); } else { typeContext = new CBinaryTypeContext( context.getClassReader(), context.getTypeFactory(), context, | CClassContext pointcutContext = getPointcutContext(context); CTypeContext typeContext = new CBinaryTypeContext( pointcutContext.getClassReader(), pointcutContext.getTypeFactory(), pointcutContext, | public CSourceMethod checkInterface(CClassContext context) throws PositionedError { // If there's an original class, use it to resolve the parameter types CTypeContext typeContext = null; if (this.originalClass != null) { typeContext = originalClass.getContext(); } else { typeContext = new CBinaryTypeCo... |
} | public CSourceMethod checkInterface(CClassContext context) throws PositionedError { // If there's an original class, use it to resolve the parameter types CTypeContext typeContext = null; if (this.originalClass != null) { typeContext = originalClass.getContext(); } else { typeContext = new CBinaryTypeCo... | |
CBinaryTypeContext typeContext = null; CClassContext c = null; if (this.originalClass != null) { c = originalClass.constructContext( originalClass.getContext().getCompilationUnitContext()); typeContext = new CBinaryTypeContext( c.getClassReader(), c.getTypeFactory(), c, (modifiers & ACC_STATIC) == 0); } else { typeCon... | CClassContext c = getAdviceContext(context); CBinaryTypeContext typeContext = new CBinaryTypeContext( c.getClassReader(), c.getTypeFactory(), c, (modifiers & ACC_STATIC) == 0); | public CSourceMethod checkInterface(CClassContext context) throws PositionedError { try { if (returnType.isReference()) { returnType = returnType.checkType(context); } } catch (UnpositionedError e) { // FJTODO what to do with exception ... |
CClassContext adviceContext = context; if (this.originalClass != null) { adviceContext = originalClass.constructContext( originalClass.getContext().getCompilationUnitContext()); } | CClassContext adviceContext = getAdviceContext(context); | public void checkBody1(CClassContext context) throws PositionedError { // Create an advice context, using the class where the advice was declared. CClassContext adviceContext = context; if (this.originalClass != null) { adviceContext = originalClas... |
JTypeDeclaration decl, CaesarPointcut perClause) | JTypeDeclaration decl) | public CCjSourceClass( CClass owner, TokenReference where, int modifiers, String ident, String qualifiedName, boolean deprecated, boolean synthetic, JTypeDeclaration decl, CaesarPointcut perClause) { super( owner, where, modifiers, ident, qualifiedName, deprecated, synthetic, decl); this.per... |
super( | this( | public CCjSourceClass( CClass owner, TokenReference where, int modifiers, String ident, String qualifiedName, boolean deprecated, boolean synthetic, JTypeDeclaration decl, CaesarPointcut perClause) { super( owner, where, modifiers, ident, qualifiedName, deprecated, synthetic, decl); this.per... |
decl); this.perClause = perClause; if (isPrivileged()) { privilegedAccessHandler = new PrivilegedAccessHandler(); privilegedAccessHandler.setAspect(this); } | decl, null); | public CCjSourceClass( CClass owner, TokenReference where, int modifiers, String ident, String qualifiedName, boolean deprecated, boolean synthetic, JTypeDeclaration decl, CaesarPointcut perClause) { super( owner, where, modifiers, ident, qualifiedName, deprecated, synthetic, decl); this.per... |
InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http: | public void testChangeListAddresses() throws Exception { MailingListMixin ml = new MailingListMixin(this.admin, this.pers.getAddress()); InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http://www.whichever.com/se/list/foo"); // First just the url this.admin.getAdmin().se... | |
this.admin.getAdmin().setListAddresses(ml.getId(), ml.getAddress(), nextUrl); | this.admin.getAdmin().setListAddresses(ml.getId(), ml.getAddress(), next.getUrl()); | public void testChangeListAddresses() throws Exception { MailingListMixin ml = new MailingListMixin(this.admin, this.pers.getAddress()); InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http://www.whichever.com/se/list/foo"); // First just the url this.admin.getAdmin().se... |
assertEquals(nextUrl.toString(), data.getUrl()); | assertEquals(next.getUrl().toString(), data.getUrl()); | public void testChangeListAddresses() throws Exception { MailingListMixin ml = new MailingListMixin(this.admin, this.pers.getAddress()); InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http://www.whichever.com/se/list/foo"); // First just the url this.admin.getAdmin().se... |
this.admin.getAdmin().setListAddresses(ml.getId(), nextAddress, nextUrl); | this.admin.getAdmin().setListAddresses(ml.getId(), next.getAddress(), next.getUrl()); | public void testChangeListAddresses() throws Exception { MailingListMixin ml = new MailingListMixin(this.admin, this.pers.getAddress()); InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http://www.whichever.com/se/list/foo"); // First just the url this.admin.getAdmin().se... |
assertEquals(nextAddress.getAddress(), data.getEmail()); assertEquals(nextUrl.toString(), data.getUrl()); | assertEquals(next.getEmail(), data.getEmail()); assertEquals(next.getUrl().toString(), data.getUrl()); | public void testChangeListAddresses() throws Exception { MailingListMixin ml = new MailingListMixin(this.admin, this.pers.getAddress()); InternetAddress nextAddress = new InternetAddress("foo@bar.com"); URL nextUrl = new URL("http://www.whichever.com/se/list/foo"); // First just the url this.admin.getAdmin().se... |
if (JComponent.class.isInstance(context)) { Rectangle visible = ((JComponent) context).getVisibleRect(); AffineTransform t = g.getTransform(); t.translate(visible.getX(), visible.getY()); try { if (! t.createInverse().createTransformedShape(visible) .intersects(posXW, posYN, width, height)) return; } catch (Non... | protected void renderBead(final Graphics2D g, final Feature f, final SequenceRenderContext context) { Location loc = f.getLocation(); int min = loc.getMin(); int max = loc.getMax(); int dif = max - min; Shape shape; if (context.getDirection() == context.HORIZONTAL) { ... | |
subjectMsg = subjectMsg.replace(expandedSubjectArg, ""); | public void onInject(SubEthaMessage msg, FilterContext ctx) throws IgnoreException, HoldException, MessagingException { log.debug("SubjectFilter: onInject()"); // get the parameter arguments String shortListName = (String) ctx.getArgument(ARG_SHORTLISTNAME); String subjectArg = (String) ctx.getArgument(ARG_SUB... | |
if (this.defaultValue != null && !this.defaultValue.getClass().equals(type)) throw new IllegalArgumentException("Type mismatch for parameter " + name + "; type is " + type.getName() + " but default value has type " + defaultValue.getClass().getName()); | public FilterParameterImpl(String name, String description, Class type, Object defaultValue) { this.name = name; this.description = description; this.type = type; this.defaultValue = defaultValue; } | |
+ HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + CR + "message-selector=testSelector"; | + '\t' + HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + ", message-selector=testSelector"; | public void testLongDescriptionOutputsAllValues() { Mock mockBrowser = mock(QueueBrowser.class); Mock mockQueue = mock(Queue.class); mockBrowser.stubs() .method("getQueue") .will(returnValue((Queue) mockQueue.proxy())); mockBrowser.stubs() .method("getMes... |
if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { | if (x > getBattleFieldWidth() - HALF_WIDTH_OFFSET) { | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; | fixx = getBattleFieldWidth() - HALF_WIDTH_OFFSET - x; | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
if (boundingBox.x < 0) { | if (x < HALF_WIDTH_OFFSET) { | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
fixx = -boundingBox.x; | fixx = HALF_WIDTH_OFFSET - x; | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
if (boundingBox.y + boundingBox.height > battleField.getBoundingBox().getHeight()) { | if (y > getBattleFieldHeight() - HALF_HEIGHT_OFFSET) { | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
fixy = battleField.getBoundingBox().getHeight() - boundingBox.height - getBoundingBox().y; | fixy = getBattleFieldHeight() - HALF_HEIGHT_OFFSET - y; | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
if (boundingBox.y < 0) { | if (y < HALF_HEIGHT_OFFSET) { | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
fixy = -boundingBox.y; | fixy = HALF_HEIGHT_OFFSET - y; | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
double fixv = hypot(fixx, fixy); double dx = fixv * sin(heading); double dy = fixv * cos(heading); if (abs(dx) < abs(fixx)) { dx = fixx; | if ((heading % (Math.PI / 2)) != 0) { double tanHeading = tan(heading); if (fixx == 0) { fixx = fixy * tanHeading; } else if (fixy == 0) { fixy = fixx / tanHeading; } else if (abs(fixx / tanHeading) > abs(fixy)) { fixy = fixx / tanHeading; } else if (abs(fixy * tanHeading) > abs(fixx)) { fixx = fixy * tanHeading; } | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
if (abs(dy) < abs(fixy)) { dy = fixy; } x += dx; y += dy; | x += fixx; y += fixy; | public void checkWallCollision() { boolean hitWall = false; double fixx = 0, fixy = 0; double angle = 0; if (boundingBox.x + boundingBox.width > battleField.getBoundingBox().getWidth()) { hitWall = true; fixx = battleField.getBoundingBox().getWidth() - boundingBox.width - boundingBox.x; angle = normalRelativ... |
public RAFile(String name, String mode) throws FileNotFoundException { raf = new RandomAccessFile(name, mode); | public RAFile(File file, String mode) throws FileNotFoundException { raf = new RandomAccessFile(file, mode); | public RAFile(String name, String mode) throws FileNotFoundException { raf = new RandomAccessFile(name, mode); } |
public static List parse(String filename) throws IOException | public static List parse(String filename) | public static List parse(String filename) throws IOException { List statements = new ArrayList(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(filename)); StringBuffer sb = new StringBuffer(512); String line = null; boolean processing = false; char delimiter = ';';... |
String line = null; | public static List parse(String filename) throws IOException { List statements = new ArrayList(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(filename)); StringBuffer sb = new StringBuffer(512); String line = null; boolean processing = false; char delimiter = ';';... | |
finally { | catch (Exception e) { String es = "Erorr add()"; log.error(es, e); throw new RuntimeException(es, e); } finally { | public static List parse(String filename) throws IOException { List statements = new ArrayList(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(filename)); StringBuffer sb = new StringBuffer(512); String line = null; boolean processing = false; char delimiter = ';';... |
public void deleteUserRoleValuesByGroup(int groupId, String roleName, String roleValue) throws Exception; | public void deleteUserRoleValuesByGroup(int groupId, String roleName, String[] roleValues) throws Exception; | public void deleteUserRoleValuesByGroup(int groupId, String roleName, String roleValue) throws Exception; |
if (!closed) { | while (!closed) { | protected synchronized int read() throws IOException { if (readIndex == writeIndex) { waiting = true; try { if (!closed) { wait(10000); } if (closed) { return -1; } } catch (InterruptedException e) { throw new IOException("read interrupted"); } } int result = (int) buf[readIndex++]; ... |
TokenReference where = getTokenReference(); | private JStatement createTryFinallyBlock(CBodyContext context) { JStatement[] tryBody = { createDeployStatement(context), body }; JStatement[] finallyBody = { createUndeployStatement()}; return new JTryFinallyStatement( getTokenReference(), new JBlock(getTokenReference(), tryBody, null), new JBlock(getTokenRe... | |
getTokenReference(), new JBlock(getTokenReference(), tryBody, null), new JBlock(getTokenReference(), finallyBody, null), | where, new JBlock(where, tryBody, null), new JBlock(TokenReference.NO_REF, finallyBody, null), | private JStatement createTryFinallyBlock(CBodyContext context) { JStatement[] tryBody = { createDeployStatement(context), body }; JStatement[] finallyBody = { createUndeployStatement()}; return new JTryFinallyStatement( getTokenReference(), new JBlock(getTokenReference(), tryBody, null), new JBlock(getTokenRe... |
TokenReference where = getTokenReference(); | TokenReference where = TokenReference.NO_REF; | private JStatement createUndeployStatement() { //not needed, but should faster if (aspectExpression instanceof JNullLiteral) { return new JEmptyStatement(getTokenReference(), null); } TokenReference where = getTokenReference(); JExpression prefix = new JTypeNameExpression( w... |
new JExpression[] {new JNameExpression(getTokenReference(), deployVariableName)}); | new JExpression[] {new JNameExpression(where, deployVariableName)}); | private JStatement createUndeployStatement() { //not needed, but should faster if (aspectExpression instanceof JNullLiteral) { return new JEmptyStatement(getTokenReference(), null); } TokenReference where = getTokenReference(); JExpression prefix = new JTypeNameExpression( w... |
Map dbConfig = (Map) conf.get("databank_0"); | List dbConfigs = (List) conf.get("databank_0"); assertEquals(1, dbConfigs.size()); Map dbConfig = (Map) dbConfigs.get(0); | public void testParseRegistry() throws Exception { RegistryConfiguration regConf = null; BufferedReader br = null; String locator = "<locator>"; try { br = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("seqdatabase.ini"))); regCon... |
dbConfig = (Map) conf.get("databank_1"); | dbConfigs = (List) conf.get("databank_1"); assertEquals(2, dbConfigs.size()); dbConfig = (Map) dbConfigs.get(0); assertEquals("<protocol-type 1a>", dbConfig.get("protocol")); assertEquals("<location-string 1a>", dbConfig.get("location")); dbConfig = (Map) dbConfigs.get(1); | public void testParseRegistry() throws Exception { RegistryConfiguration regConf = null; BufferedReader br = null; String locator = "<locator>"; try { br = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("seqdatabase.ini"))); regCon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.