rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public void delete() throws Exception | public void delete() | public void delete() throws Exception { int id = this.request.getIntParameter("bookmark_id"); BookmarkDAO bm = DataAccessDriver.getInstance().newBookmarkDAO(); Bookmark b = bm.selectById(id); if (!this.sanityCheck(b)) { return; } bm.remove(id); JForumExecutionContext.setRedirect(this.request.getContextP... |
public void edit() throws Exception | public void edit() | public void edit() throws Exception { int id = this.request.getIntParameter("bookmark_id"); BookmarkDAO bm = DataAccessDriver.getInstance().newBookmarkDAO(); Bookmark b = bm.selectById(id); if (!this.sanityCheck(b)) { return; } this.setTemplateName(TemplateKeys.BOOKMARKS_EDIT); this.context.put("bookmark"... |
public void insert() throws Exception | public void insert() | public void insert() throws Exception { int type = this.request.getIntParameter("relation_type"); if (type == BookmarkType.FORUM) { this.addForum(); } else if (type == BookmarkType.TOPIC) { this.addTopic(); } else if (type == BookmarkType.USER) { this.addUser(); } else { this.error("Bookmarks.invalidTy... |
public void insertSave() throws Exception | public void insertSave() | public void insertSave() throws Exception { Bookmark b = new Bookmark(); b.setDescription(this.request.getParameter("description")); b.setTitle(this.request.getParameter("title")); String publicVisible = this.request.getParameter("visible"); b.setPublicVisible(publicVisible != null && publicVisible.length() > 0... |
public void list() throws Exception | public void list() | public void list() throws Exception { int userId = this.request.getIntParameter("user_id"); this.setTemplateName(TemplateKeys.BOOKMARKS_LIST); this.context.put("bookmarks", DataAccessDriver.getInstance().newBookmarkDAO().selectByUser(userId)); this.context.put("forumType", new Integer(BookmarkType.FORUM)); this... |
public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception | public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) | public Template process(ActionServletRequest request, HttpServletResponse response, SimpleHash context) throws Exception { if (SessionFacade.getUserSession().getUserId() == SystemGlobals.getIntValue(ConfigKeys.ANONYMOUS_USER_ID) && !request.getAction().equals("list")) { request.addParameter("action", "anonymousI... |
public void updateSave() throws Exception | public void updateSave() | public void updateSave() throws Exception { int id = this.request.getIntParameter("bookmark_id"); BookmarkDAO bm = DataAccessDriver.getInstance().newBookmarkDAO(); Bookmark b = bm.selectById(id); if (!this.sanityCheck(b)) { return; } b.setTitle(this.request.getParameter("title")); b.setDescription(this.re... |
b.setPublicVisible(visible != null && !"".equals(visible) ? true : false); | b.setPublicVisible(StringUtils.isNotBlank(visible)); | public void updateSave() throws Exception { int id = this.request.getIntParameter("bookmark_id"); BookmarkDAO bm = DataAccessDriver.getInstance().newBookmarkDAO(); Bookmark b = bm.selectById(id); if (!this.sanityCheck(b)) { return; } b.setTitle(this.request.getParameter("title")); b.setDescription(this.re... |
public Bookmark selectForUpdate(int relationId, int relationType, int userId) throws Exception; | public Bookmark selectForUpdate(int relationId, int relationType, int userId); | public Bookmark selectForUpdate(int relationId, int relationType, int userId) throws Exception; |
public Bookmark selectById(int bookmarkId) throws Exception; | public Bookmark selectById(int bookmarkId); | public Bookmark selectById(int bookmarkId) throws Exception; |
public void remove(int bookmarkId) throws Exception; | public void remove(int bookmarkId); | public void remove(int bookmarkId) throws Exception; |
public void add(Bookmark b) throws Exception; | public void add(Bookmark b); | public void add(Bookmark b) throws Exception; |
public List selectByUser(int userId) throws Exception; | public List selectByUser(int userId, int relationType); | public List selectByUser(int userId) throws Exception; |
public void update(Bookmark b) throws Exception; | public void update(Bookmark b); | public void update(Bookmark b) throws Exception; |
try { final String fullyQualifiedRemoteHost = SMTPServerContext .resolveHost(remoteHost); session.setDeclaredRemoteHostname(fullyQualifiedRemoteHost); | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: EHLO <hostname>"; } String remoteHost = args[1]; // http://cr.yp.to/smtp/helo.html#helo // "I recommend that they use bracketed IP addresses:" remoteHost = remot... | |
} catch (IOException e) { return "501 Unknown host: " + remoteHost; } catch (ServerRejectedException e) { session.quit(); return "221 " + remoteHost + " closing connection. " + e.getMessage(); } | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: EHLO <hostname>"; } String remoteHost = args[1]; // http://cr.yp.to/smtp/helo.html#helo // "I recommend that they use bracketed IP addresses:" remoteHost = remot... | |
mail.setParent(parent); parent.getReplies().add(mail); | if (parent != null) { mail.setParent(parent); parent.getReplies().add(mail); } | void threadMail(Mail mail, SubEthaMessage msg) throws MessagingException { if (log.isDebugEnabled()) log.debug("Threading mail " + mail); // // STEP ONE: Figure who we want to be our parent. // List<String> wantedReference = new ArrayList<String>(); // If there is an InReplyTo, that tops the list String ... |
new CCompilationUnitContext(compilerBase, environment, cu.getExport()); | new CCompilationUnitContext(compilerBase, environment, cu); | public void completeMixinCloneTypeInfo( CompilerBase compilerBase, KjcEnvironment environment, JCompilationUnit cu ) { CaesarTypeSystem caesarTypeSystem = environment.getCaesarTypeSystem(); TypeFactory typeFactory = environment.getTypeFactory(); ClassReader classReader... |
new CCompilationUnitContext(compilerBase, environment, cu.getExport()); | new CCompilationUnitContext(compilerBase, environment, cu); | public void createMixinCloneTypeInfo( CompilerBase compilerBase, KjcEnvironment environment, JCompilationUnit cu ) { CaesarTypeSystem caesarTypeSystem = environment.getCaesarTypeSystem(); TypeFactory typeFactory = environment.getTypeFactory(); ClassReader classReader =... |
CCompilationUnit cunit) { this(compiler, environment, cunit, null); | JCompilationUnit cunit, Vector classes) { super(null, environment); this.compiler = compiler; this.cunit = cunit; this.classes = classes; | public CCompilationUnitContext(CompilerBase compiler, KjcEnvironment environment, CCompilationUnit cunit) { this(compiler, environment, cunit, null); } |
if (! seqType.equalsIgnoreCase("aa") || ! seqType.equalsIgnoreCase("aa")) | if (! seqType.equalsIgnoreCase("aa") || ! seqType.equalsIgnoreCase("nt")) | public static void main (String [] args) throws Exception { Properties props; String seqType; String dbName; Alphabet alpha; SymbolTokenization parser; SequenceFormat seqFormat; IDMaker idMaker; SequenceBuilderFactory sbFactory;... |
throws IOException, BioException, ChangeVetoException { seqFile = seqFile.getAbsoluteFile(); HackedBufferedReader bReader = new HackedBufferedReader(seqFile); StreamReader.Context context = new StreamReader.Context(bReader); HashMap index = new HashMap(); long pos = bReader.getFilePointer(); while(!context.isStreamEmpt... | throws IOException, BioException, ChangeVetoException { seqFile = seqFile.getAbsoluteFile(); HackedBufferedReader bReader = new HackedBufferedReader(seqFile); HashMap index = new HashMap(); long pos = bReader.getFilePointer(); boolean hasNextSequence = true; while(hasNextSequence) { SequenceBuilder sb = sbFact.makeSequ... | public void addFile(File seqFile) throws IOException, BioException, ChangeVetoException { seqFile = seqFile.getAbsoluteFile(); HackedBufferedReader bReader = new HackedBufferedReader(seqFile); StreamReader.Context context = new StreamReader.Context(bReader); HashMap index = new HashMap(); long pos = ... |
if(changeSupport == null) { idToSource.putAll(index); } else { ChangeEvent ce = new ChangeEvent( this, SequenceDB.SEQUENCES, index, null ); changeSupport.firePreChangeEvent(ce); idToSource.putAll(index); changeSupport.firePostChangeEvent(ce); } commit(); } | public void addFile(File seqFile) throws IOException, BioException, ChangeVetoException { seqFile = seqFile.getAbsoluteFile(); HackedBufferedReader bReader = new HackedBufferedReader(seqFile); StreamReader.Context context = new StreamReader.Context(bReader); HashMap index = new HashMap(); long pos = ... | |
if(r == null) { throw new IllegalSymbolException("You can not add null as a symbol"); } | validate(r); | public void removeSymbol(Symbol r) throws IllegalSymbolException { if(r == null) { throw new IllegalSymbolException("You can not add null as a symbol"); } symbols.remove(r); } |
msg.save(); | if (didSomething) msg.save(); | public void onSend(SubEthaMessage msg, SendFilterContext ctx) throws MessagingException { try { for (Part part: msg.getParts()) { if (part.getContentType().startsWith(SubEthaMessage.DETACHMENT_MIME_TYPE)) { Long id = (Long)part.getContent(); String contentType = part.getHeader(SubEthaMessage.HDR_OR... |
ITypedRegion partition = document.getPartition(lineOffset); | ITypedRegion partition = SchemeTextUtilities.getPartition(document, lineOffset); | public static void indentLine(IDocument document, int lineNo, SchemeIndentationContext context) throws BadLocationException { IRegion lineInfo = document.getLineInformation(lineNo); int lineOffset = lineInfo.getOffset(); int lineEnd = lineInfo.getLength() + lineOffset; ... |
partition = document.getPartition(index); | partition = SchemeTextUtilities.getPartition(document, index); | private static void removeExtraWhitespace(IDocument document, int lineLastChar) throws BadLocationException { ITypedRegion partition; int index = lineLastChar; partition = document.getPartition(index); if (partition.getType() == IDocument.DEFAULT_CONTENT_TYPE) { char c... |
char ch = document.getChar(outerStart); while (!SchemeScannerUtilities.isOpeningParenthesis(ch)) { outerStart++; ch = document.getChar(outerStart); } | public static int findIndentation(SchemeIndentationContext context) throws BadLocationException { int indentation = 0; SexpExplorer explorer = context.getExplorer(); IDocument document = explorer.getDocument(); if (explorer.backwardSexpression(context.getOffset())) { // There ... | |
if (this.rank!=rfo.getRank()) return this.rank-rfo.getRank(); | return this.rank-rfo.getRank(); | public int compareTo(Object o) { // Hibernate comparison - we haven't been populated yet if (this.parent==null) return -1; // Normal comparison Feature them = (Feature)o; if (them instanceof RichFeature) { RichFeature rfo = (RichFeature)them; if (this.rank!=r... |
public void flush(SMTPServerContext SMTPServerContext) | public void flush(SMTPServerContext smtpServerContext) throws TooMuchDataException, IOException | public void flush(SMTPServerContext SMTPServerContext) { for (String recipient : recipients) { try { SMTPServerContext.deliver(sender, recipient, new ByteArrayInputStream(getMessage().getBytes())); } catch (Exception ex) { // TODO ? } } reset(); } |
try { SMTPServerContext.deliver(sender, recipient, new ByteArrayInputStream(getMessage().getBytes())); } catch (Exception ex) { } | smtpServerContext.deliver(sender, recipient, new ByteArrayInputStream(getMessage().getBytes())); | public void flush(SMTPServerContext SMTPServerContext) { for (String recipient : recipients) { try { SMTPServerContext.deliver(sender, recipient, new ByteArrayInputStream(getMessage().getBytes())); } catch (Exception ex) { // TODO ? } } reset(); } |
this.comments.add(comment); | this.comments.add(new SimpleComment(comment,commentRank++)); | public void setComment(String comment) throws ParseException { if (comment==null) throw new ParseException("Comment cannot be null"); this.comments.add(comment); } |
System.out.println("Retrieving database for URL " + url); | static Database getDatabase(AceURL url) throws AceException { url = AceUtils.rootURL(url); System.out.println("Retrieving database for URL " + url); Database db = (Database) databases.get(url); LOAD_DRIVER: if(db == null) { for(Iterator i = drivers.iterator(); i.hasNext(); ) { ... | |
public Structure getStructure(String filename) throws IOException ; | public Structure getStructure() throws IOException; | public Structure getStructure(String filename) throws IOException ; |
sb.append(rs.getInt("user_id")).append(","); | sb.append(rs.getInt("user_id")).append(','); | public Map topicPosters(int topicId) throws Exception { Map m = new HashMap(); PreparedStatement p; StringBuffer sql = new StringBuffer(SystemGlobals.getSql("TopicModel.topicPosters")); if (SystemGlobals.getBoolValue(ConfigKeys.DATABASE_SUPPORT_SUBQUERIES)) { int index = sql.indexOf(":ids:"); sql.replace(i... |
public int countUserTopics(int userId) throws Exception; | public int countUserTopics(int userId) ; | public int countUserTopics(int userId) throws Exception; |
public void delete(Topic topic) throws Exception; | public void delete(Topic topic) ; | public void delete(Topic topic) throws Exception; |
public void deleteTopics(List topics) throws Exception; | public void deleteTopics(List topics) ; | public void deleteTopics(List topics) throws Exception; |
public void fixFirstLastPostId(int topicId) throws Exception; | public void fixFirstLastPostId(int topicId) ; | public void fixFirstLastPostId(int topicId) throws Exception; |
public void incrementTotalReplies(int topicId) throws Exception; | public void incrementTotalReplies(int topicId) ; | public void incrementTotalReplies(int topicId) throws Exception; |
public void lockUnlock(int[] topicId, int status) throws Exception; | public void lockUnlock(int[] topicId, int status) ; | public void lockUnlock(int[] topicId, int status) throws Exception; |
public List notifyUsers(Topic topic) throws Exception; | public List notifyUsers(Topic topic) ; | public List notifyUsers(Topic topic) throws Exception; |
public void removeSubscriptionByTopic(int topicId) throws Exception; | public void removeSubscriptionByTopic(int topicId) ; | public void removeSubscriptionByTopic(int topicId) throws Exception; |
public List selectAllByForum(int forumId) throws Exception; | public List selectAllByForum(int forumId) ; | public List selectAllByForum(int forumId) throws Exception; |
public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception; | public List selectAllByForumByLimit(int forumId, int startFrom, int count) ; | public List selectAllByForumByLimit(int forumId, int startFrom, int count) throws Exception; |
public List selectRecentTopics (int limit) throws Exception; | public List selectRecentTopics (int limit) ; | public List selectRecentTopics (int limit) throws Exception; |
public List selectTopicTitlesByIds(Collection idList) throws Exception; | public List selectTopicTitlesByIds(Collection idList) ; | public List selectTopicTitlesByIds(Collection idList) throws Exception; |
public void setModerationStatus(int forumId, boolean status) throws Exception; | public void setModerationStatus(int forumId, boolean status) ; | public void setModerationStatus(int forumId, boolean status) throws Exception; |
public void setModerationStatusByTopic(int topicId, boolean status) throws Exception; | public void setModerationStatusByTopic(int topicId, boolean status) ; | public void setModerationStatusByTopic(int topicId, boolean status) throws Exception; |
if(alphabet instanceof AbstractAlphabet){ ((AbstractAlphabet)alphabet).setRegistered(true); } | static public void registerAlphabet(String name, Alphabet alphabet) { nameToAlphabet.put(name, alphabet); } | |
String[] parts = line.split("\\t\\|\\t"); | String[] parts = line.split("\\|"); | public void parseTaxonomyFile() throws IOException, ParseException { if (this.parsed) return; else { String line; // parse nodes first while ((line=nodes.readLine())!=null) { /* separated by '\t|\t' tax_id -- node id in GenBank taxonomy databa... |
public static int[] make24Bits(Object pixels, int w, int h, boolean interleaved) | public static byte[][] make24Bits(Object pixels, int w, int h, boolean interleaved, boolean reverse) | public static int[] make24Bits(Object pixels, int w, int h, boolean interleaved) { int[] rtn = new int[w * h]; int stride = interleaved ? w * h : 1; byte[] b = null; // adapted from ImageJ's TypeConverter methods if (pixels instanceof byte[]) b = (byte[]) pixels; else if (pixels instanceof sho... |
int[] rtn = new int[w * h]; int stride = interleaved ? w * h : 1; byte[] b = null; if (pixels instanceof byte[]) b = (byte[]) pixels; else if (pixels instanceof short[]) { short[] s = (short[]) pixels; b = new byte[s.length]; for (int i=0; i<s.length; i++) { int v = s[i] & 0xffff; b[i] = (byte) v; } | int[] pix = make24Bits(pixels, w, h, interleaved); byte[][] rtn = new byte[3][pix.length]; for (int i=0; i<pix.length; i++) { byte r = (byte) ((pix[i] >> 16) & 0xff); rtn[1][i] = (byte) ((pix[i] >> 8) & 0xff); byte b = (byte) (pix[i] & 0xff); rtn[0][i] = reverse ? b : r; rtn[2][i] = reverse ? r : b; | public static int[] make24Bits(Object pixels, int w, int h, boolean interleaved) { int[] rtn = new int[w * h]; int stride = interleaved ? w * h : 1; byte[] b = null; // adapted from ImageJ's TypeConverter methods if (pixels instanceof byte[]) b = (byte[]) pixels; else if (pixels instanceof sho... |
else if (pixels instanceof int[]) { int[] s = (int[]) pixels; b = new byte[s.length]; for (int i=0; i<s.length; i++) { int value = s[i] & 0xffffffff; b[i] = (byte) value; } } else if (pixels instanceof float[]) { float[] s = (float[]) pixels; b = new byte[s.length]; for (int i=0; i<s.length; i++) { float value = s[i]; ... | public static int[] make24Bits(Object pixels, int w, int h, boolean interleaved) { int[] rtn = new int[w * h]; int stride = interleaved ? w * h : 1; byte[] b = null; // adapted from ImageJ's TypeConverter methods if (pixels instanceof byte[]) b = (byte[]) pixels; else if (pixels instanceof sho... | |
strBuf.append(tok.nextToken() + "_Impl_Mixin*"); | strBuf.append(tok.nextToken() + "_Impl*"); | protected String getMixinPattern(CClass cclass) { StringBuffer strBuf = new StringBuffer(); String qualifiedName = cclass.getQualifiedName(); String packagePrefix = ""; String type = qualifiedName; int i = qualifiedName.lastIndexOf('/'); if(i >= 0) { ... |
return strBuf.toString(); | strBuf.append("_Mixin*"); return strBuf.toString(); | protected String getMixinPattern(CClass cclass) { StringBuffer strBuf = new StringBuffer(); String qualifiedName = cclass.getQualifiedName(); String packagePrefix = ""; String type = qualifiedName; int i = qualifiedName.lastIndexOf('/'); if(i >= 0) { ... |
this.prefix = null; | public LoggingListener(PrintStream out) { this.out = out; } | |
if(prefix != null) { out.print(prefix); } | public void postChange(ChangeEvent cev) { out.println("postChange for event " + cev); } | |
if(prefix != null) { out.print(prefix); } | public void preChange(ChangeEvent cev) throws ChangeVetoException { out.println("preChange for event " + cev); } | |
InputStream is = ClassTools.getClassLoader(Resolver.class).getResourceAsStream(resourceName); | InputSource is = new InputSource(this.getClass().getClassLoader().getResourceAsStream(resourceName)); is.setSystemId(baseURI); | public InputSource resolveEntity(String publicID, String systemID) throws SAXException {// try { // resolve the NCBI URN// System.out.println("resolve " + publicID + ":" + systemID); String resourceName = "org/biojava/bio/program/sax/blas... |
return new InputSource(is); | return is; | public InputSource resolveEntity(String publicID, String systemID) throws SAXException {// try { // resolve the NCBI URN// System.out.println("resolve " + publicID + ":" + systemID); String resourceName = "org/biojava/bio/program/sax/blas... |
baseURI = this.getClass().getClassLoader().getResource("org/biojava/bio/program/sax/blastxml/").toString(); | public BlastXMLParserFacade() throws BioException { // just initialise content handler // to avoid fubar if undefined DefaultHandler handler = new DefaultHandler(); contentHandler = handler; try { // create the parser parser = SAXParserFactory.newIn... | |
if (is.getSystemId() == null) is.setSystemId(baseURI); | public void parse(InputSource is) throws IOException, SAXException { parser.parse(is); } | |
createParentDirectories( destination ); ChannelSftp channel; resourceName = StringUtils.replace( resourceName, "\\", "/" ); String dir = PathUtils.dirname( resourceName ); dir = StringUtils.replace( dir, "\\", "/" ); Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); Strin... | getIfNewer( resourceName, destination, 0 ); | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { createParentDirectories( destination ); ChannelSftp channel; resourceName = StringUtils.replace( resourceName, "\\", "/" ); String di... |
throw new UnsupportedOperationException( "getIfNewer is scp wagon must be still implemented" ); | boolean bDownloaded = true; createParentDirectories( destination ); ChannelSftp channel; resourceName = StringUtils.replace( resourceName, "\\", "/" ); String dir = PathUtils.dirname( resourceName ); dir = StringUtils.replace( dir, "\\", "/" ); if ( dir.length() > 0 && dir.charAt( 0 ) == '/' ) { dir = dir.substring... | public boolean getIfNewer( String resourceName, File destination, long timestamp ) { throw new UnsupportedOperationException( "getIfNewer is scp wagon must be still implemented" ); } |
String mkdirCmd = umaskCmd + "mkdir -p -m " + basedir + "/" + dir + "\n"; | String mkdirCmd = umaskCmd + "mkdir -p " + basedir + "/" + dir + "\n"; | public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String basedir = getRepository().getBasedir(); resourceName = StringUtils.replace( resourceName, "\\", "/" ); String dir = PathUtils.dirname( res... |
if (!( (child.contains(r) || r == gapResidue) )) { throw new IllegalResidueException("Residue " + r.getName() + " is not found in Alphabet " + getName()); | if(r == gapResidue) { return; } try { child.validate(r); } catch (IllegalResidueException ire) { throw new IllegalResidueException( ire, "Residue not found in underlying alphabet and is not gap in " + getName() ); | public void validate(Residue r) throws IllegalResidueException { if (!( (child.contains(r) || r == gapResidue) )) { throw new IllegalResidueException("Residue " + r.getName() + " is not found in Alphabet " + getName()); } } |
cpa = new SimpleCrossProductAlphabet(aList); | if(size > 0 && size < 1000) { cpa = new SimpleCrossProductAlphabet(aList); } else { cpa = new SparseCrossProductAlphabet(aList); } | public CrossProductAlphabet getCrossProductAlphabet(List aList) { if(crossProductAlphabets == null) { crossProductAlphabets = new HashMap(); } ListWrapper aw = new ListWrapper(aList); CrossProductAlphabet cpa = (CrossProductAlphabet) crossProductAlphabets.get(aw); if(cpa == null) ... |
ctc.addObjectsAndAppliedTxns(grouping.getTxnIDs(), objects.values(), grouping.getNewRoots()); | txncount += txnIDs.size(); ctc.addObjectsAndAppliedTxns(txnIDs, objects.values(), grouping.getNewRoots()); | public synchronized void addTransactionsToCommit(CommitTransactionContext ctc) { int count = 0; for (Iterator i = commitPendingTxns.values().iterator(); i.hasNext();) { TxnObjectGrouping grouping = (TxnObjectGrouping) i.next(); i.remove(); Assert.assertTrue(grouping.getApplyPendingTxns().isEmpty(... |
if (count > 0) { | if (txncount > 0) { | public synchronized void addTransactionsToCommit(CommitTransactionContext ctc) { int count = 0; for (Iterator i = commitPendingTxns.values().iterator(); i.hasNext();) { TxnObjectGrouping grouping = (TxnObjectGrouping) i.next(); i.remove(); Assert.assertTrue(grouping.getApplyPendingTxns().isEmpty(... |
continue; | public void put( File source, String resourceName ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { String url = getRepository().getUrl() + "/" + resourceName; Resource resource = new Resource( resourceName ); firePutInitiated( resource, source ... | |
if (elementText.indexOf("}") >= 0) { tabCount--; } | public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { if (!editing) { super.insertString(offs, str, a); return; } if (str.equals("}")) { if (getText(offs - 1, 1).equals("\t")) { super.remove(offs - 1, 1); super.insertString(offs - 1, str, a); } else { super.i... | |
public void setBool(String key, boolean value) { setBool(DEFAULT_SESSION_ID, key, value); | public void setBool(SessionID sessionID, String key, boolean value) { getOrCreateSessionProperties(sessionID).setProperty(key, BooleanConverter.convert(value)); | public void setBool(String key, boolean value) { setBool(DEFAULT_SESSION_ID, key, value); } |
public void setDouble(String key, double value) { setDouble(DEFAULT_SESSION_ID, key, value); | public void setDouble(SessionID sessionID, String key, double value) { getOrCreateSessionProperties(sessionID).setProperty(key, Double.toString(value)); | public void setDouble(String key, double value) { setDouble(DEFAULT_SESSION_ID, key, value); } |
public void setLong(String key, long value) { setLong(DEFAULT_SESSION_ID, key, value); | public void setLong(SessionID sessionID, String key, long value) { getOrCreateSessionProperties(sessionID).setProperty(key, Long.toString(value)); | public void setLong(String key, long value) { setLong(DEFAULT_SESSION_ID, key, value); } |
new NodeLinker(asmManager).process(asmManager.hierarchy.getRoot()); | public static void postBuild(CaesarJAsmManager asmManager) { asmManager.deattach(); } | |
fileListNode = findChildByName(asmManager.getHierarchy().getRoot().getChildren(), packageName.getName()); | fileListNode = findChildByName(asmManager.getHierarchy().getRoot().getChildren(), pkgName); | public boolean visit(JCompilationUnit self) { TokenReference ref = self.getTokenReference(); File file = new File(new String(ref.getFile())); // create node for file CaesarProgramElement node = new CaesarProgramElement( file.getName().replaceAll("/", "."), CaesarProgramElement.Kind.FILE_JAVA, ... |
mixinIfc.addMethod(new JMethodDeclaration( methods[i].getTokenReference(), methods[i].getModifiers(), selfType, methIdent, methods[i].getParameters(), methods[i].getExceptions(), null, null, null)); | public void transformConstructors(CjVirtualClassDeclaration cd) { // add outer variable CType outerType = null; CjMixinInterfaceDeclaration mixinIfc = cd.getMixinIfcDeclaration(); // create a type reference representing the class declaration CReferenceType selfType = new CClassNameT... | |
else if (ch == '\\') { if (mState == STATE_DEFAULT) { mState = STATE_ESCAPE; } else { mState = STATE_DEFAULT; } | else if (ch == '\\') { if (mState == STATE_DEFAULT) { mState = STATE_ESCAPE; | private Token scanString() { char ch; mState = STATE_DEFAULT; while (mPosition < mEnd) { ch = lookahead(); if (ch == '"') { if (mState == STATE_ESCAPE) { mState = STATE_DEFAULT; } else { mSt... |
else { mState = STATE_DEFAULT; } } else { mState = STATE_DEFAULT; } | private Token scanString() { char ch; mState = STATE_DEFAULT; while (mPosition < mEnd) { ch = lookahead(); if (ch == '"') { if (mState == STATE_ESCAPE) { mState = STATE_DEFAULT; } else { mSt... | |
Map aMap = new HashMap(); | Map aMap = new SmallMap(); | public StatePath viterbi(SymbolList[] seqs, ScoreType scoreType) throws IllegalSymbolException, IllegalAlphabetException, IllegalTransitionException { if (seqs.length != 2) { throw new IllegalArgumentException("This DP object only runs on pairs."); } lockModel(); SymbolList seq0 = seqs[0]... |
parent.getQualifiedName())); | parentIdent)); | public List<JoinedTypeNode> getDeclParents() { if (declParents == null) { declParents = new ArrayList<JoinedTypeNode>(); if (isDeclared()) { /* get parents from the input node and import to the current context */ for (String parentIdent : getInputNode().getDeclaredParents()) { JoinedTypeNode parent = lo... |
this.getAuthors().equals(them.getLocation())); | this.getLocation().equals(them.getLocation())); | public boolean equals(Object obj) { if(this == obj) return true; if (obj==null || !(obj instanceof DocRef)) return false; // Hibernate comparison - we haven't been populated yet if (this.authors==null) return false; // Normal comparison DocRef them = (DocRef)obj; ret... |
System.out.println("Starting to parse PDB file " + getTimeStamp()); | public Structure getStructure() throws IOException { FileInputStream inStream = getInputStream(); try{ //System.out.println("Starting to parse PDB file " + getTimeStamp()); parsePDBFile(inStream) ; //System.out.println("Done parsing PDB file " + getTimeStamp()); } catch(Exception ex){ ex.printS... | |
System.out.println("Done parsing PDB file " + getTimeStamp()); | public Structure getStructure() throws IOException { FileInputStream inStream = getInputStream(); try{ //System.out.println("Starting to parse PDB file " + getTimeStamp()); parsePDBFile(inStream) ; //System.out.println("Done parsing PDB file " + getTimeStamp()); } catch(Exception ex){ ex.printS... | |
public Structure parsePDBFile(FileInputStream inStream) | public Structure parsePDBFile(InputStream inStream) | public Structure parsePDBFile(FileInputStream inStream) throws IOException, PDBParseException { // (re)set structure structure = new StructureImpl() ; current_model = new ArrayList(); current_chain = null ; current_group = null ; header = init_header(); connects = new... |
structure = new StructureImpl() ; current_model = new ArrayList(); current_chain = null ; current_group = null ; header = init_header(); connects = new ArrayList(); | System.out.println("preparing buffer"); BufferedReader buf ; | public Structure parsePDBFile(FileInputStream inStream) throws IOException, PDBParseException { // (re)set structure structure = new StructureImpl() ; current_model = new ArrayList(); current_chain = null ; current_group = null ; header = init_header(); connects = new... |
BufferedReader buf = new BufferedReader (new InputStreamReader (inStream)); String line = buf.readLine (); String recordName = ""; while (line != null) { recordName = line.substring (0, 6).trim (); if ( recordName.equals("ATOM") ) pdb_ATOM_Handler(line) ; else if ( recordName.equals("HETATM")) pdb_ATOM_Han... | return parsePDBFile(buf); | public Structure parsePDBFile(FileInputStream inStream) throws IOException, PDBParseException { // (re)set structure structure = new StructureImpl() ; current_model = new ArrayList(); current_chain = null ; current_group = null ; header = init_header(); connects = new... |
public PermissionProcessHelper(PermissionControl pc, int id) throws Exception | public PermissionProcessHelper(PermissionControl pc, int id) | public PermissionProcessHelper(PermissionControl pc, int id) throws Exception { this.id = id; this.pc = pc; this.init(); } |
private void init() throws Exception | private void init() | private void init() throws Exception { this.pc.deleteAllRoles(this.id); } |
public void processData() throws Exception | public void processData() | public void processData() throws Exception { ActionServletRequest request = JForumExecutionContext.getRequest(); Enumeration e = request.getParameterNames(); while (e.hasMoreElements()) { String paramName = (String)e.nextElement(); if (paramName.startsWith("perm_")) { if (paramName.endsWith("$single")) ... |
return (o instanceof StrandFilter); | return (o instanceof FrameFilter && ((FrameFilter) o).getFrame() == getFrame()); | public boolean equals(Object o) { return (o instanceof StrandFilter); } |
public void delete() throws Exception | public void delete() | public void delete() throws Exception { String ids[] = this.request.getParameterValues("categories_id"); List errors = new ArrayList(); if (ids != null) { for (int i = 0; i < ids.length; i++){ if (this.cm.canDelete(Integer.parseInt(ids[i]))) { int id = Integer.parseInt(ids[i]); Category c = thi... |
public void edit() throws Exception | public void edit() | public void edit() throws Exception { this.context.put("category", this.cm.selectById(this.request.getIntParameter("category_id"))); this.setTemplateName(TemplateKeys.CATEGORY_EDIT); this.context.put("action", "editSave"); } |
public void editSave() throws Exception | public void editSave() | public void editSave() throws Exception { Category c = new Category(ForumRepository.getCategory( this.request.getIntParameter("categories_id"))); c.setName(this.request.getParameter("category_name")); c.setModerated("1".equals(this.request.getParameter("moderate"))); this.cm.update(c); ForumRepository.reloa... |
public void insert() throws Exception | public void insert() | public void insert() throws Exception { this.context.put("groups", new TreeGroup().getNodes()); this.context.put("selectedList", new ArrayList()); this.setTemplateName(TemplateKeys.CATEGORY_INSERT); this.context.put("action", "insertSave"); } |
public void insertSave() throws Exception | public void insertSave() | public void insertSave() throws Exception { Category c = new Category(); c.setName(this.request.getParameter("category_name")); c.setModerated("1".equals(this.request.getParameter("moderated"))); int categoryId = this.cm.addNew(c); c.setId(categoryId); ForumRepository.addCategory(c); String[] groups = this... |
public void list() throws Exception | public void list() | public void list() throws Exception { this.context.put("categories", DataAccessDriver.getInstance().newCategoryDAO().selectAll()); this.context.put("repository", new ForumRepository()); this.setTemplateName(TemplateKeys.CATEGORY_LIST); } |
private void processOrdering(boolean up) throws Exception | private void processOrdering(boolean up) | private void processOrdering(boolean up) throws Exception { Category toChange = new Category(ForumRepository.getCategory(Integer.parseInt( this.request.getParameter("category_id")))); List categories = ForumRepository.getAllCategories(); int index = categories.indexOf(toChange); if (index == -1 || (up && in... |
public boolean canDelete(int categoryId) throws Exception; | public boolean canDelete(int categoryId); | public boolean canDelete(int categoryId) throws Exception; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.