rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
return source.getObject(order[indx]); | try { return source.getObject(order[indx]); } catch (IndexOutOfBoundsException iobe) { throw new IndexOutOfBoundsException( "index " + indx + " not in array length " + order.length ); } | public Object getObject(int indx) { return source.getObject(order[indx]); } |
StringBuffer sb = new StringBuffer(getObject(0).toString()); | StringBuffer sb = new StringBuffer("("); sb.append(order[0] + ":" + getObject(0).toString()); | public String toString() { StringBuffer sb = new StringBuffer(getObject(0).toString()); for(int i = 1; i < getClassList().size(); i++) { sb.append(","); sb.append(getObject(i).toString()); } return sb.toString(); } |
sb.append(","); | sb.append("," + order[i] + ":"); | public String toString() { StringBuffer sb = new StringBuffer(getObject(0).toString()); for(int i = 1; i < getClassList().size(); i++) { sb.append(","); sb.append(getObject(i).toString()); } return sb.toString(); } |
this.format = new GenbankFormat(); | public GenbankSequenceDB() { this.format = new GenbankFormat(); } | |
SequenceFormat sFormat = getSequenceFormat(); SequenceBuilder sbuilder = new SimpleSequenceBuilder(); SequenceBuilderFactory sFact = new GenbankProcessor.Factory( SimpleSequenceBuilder.FACTORY); Alphabet alpha = getAlphabet(); SymbolTokenization rParser = alpha.getTokenization("token"); | public Sequence getSequence(String id) throws Exception { try { IOExceptionFound = false; ExceptionFound = false; URL queryURL = getAddress(id); //get URL based on ID // System.err.println("query is "+ queryURL.toString()); SequenceFormat sFormat = getSequenceFormat(); //get incoming sequ... | |
if(endOfRecord != null && line.startsWith(endOfRecord)) { return null; | if (endOfRecord != null) { if (endOfRecord == TagValueParser.BLANK_LINE_EOR) { if (line.equals(TagValueParser.BLANK_LINE_EOR)) { return null; } } else { if (line.startsWith(endOfRecord)) { return null; } } | public TagValue parse(Object o) { String line = o.toString(); if(endOfRecord != null && line.startsWith(endOfRecord)) { return null; } int length = line.length(); String tag; if(length > splitOffset) { tag = line.substring(0, splitOffset); } else { tag = line; } i... |
context.setProgram(attr.getValue("program")); | public void startElement(String uri, String localName, String qName, Attributes attr) throws SAXException { context.scHandler.addSearchProperty("program", attr.getValue("program")); context.scHand... | |
Feature noTS = seq.createFeature(template); | seq.createFeature(template); | public void testAddFeature() throws Exception { String name = "dna_1"; assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(DNATools.createDNASequence("atgctgatgatgatg", name)); assertTrue(mSequenceDB.ids().contains(name)); Sequence seq = mSequenceDB.getSequence(... |
seq = null; | seq = seq==null?null:seq; | public void testAddRemoveSequence() throws Exception { String name = "dna_1"; assertTrue(!mSequenceDB.ids().contains(name)); mSequenceDB.addSequence(DNATools.createDNASequence("atgctgatgatgatg", name)); assertTrue(mSequenceDB.ids().contains(name)); Sequence seq = mSequenceDB.getSe... |
return this.isNull.invoke(null,new Object[]{"parent"}); | return this.isNotNull.invoke(null,new Object[]{"parent"}); | public Object asCriterion() { try { // All feature have parents, so checking for not-null means all will be returned. return this.isNull.invoke(null,new Object[]{"parent"}); } catch (InvocationTargetException e) { throw new RuntimeException(e); } catch (IllegalA... |
public void addSequence(Sequence seq) throws ChangeVetoException { throw new ChangeVetoException("Can't add sequences to XEMBL"); | public void addSequence(Sequence seq) throws ChangeVetoException { throw new ChangeVetoException("Failed to add sequence." + " Sequences may not be added" + " to a biofetch database"); | public void addSequence(Sequence seq) throws ChangeVetoException { throw new ChangeVetoException("Can't add sequences to XEMBL"); } |
return db; | return dbName; | public String getName() { return db; } |
StringBuffer uri = new StringBuffer(prefix); uri.append('?'); uri.append("style=raw;"); uri.append("format="); uri.append(type); uri.append(";db="); uri.append(db); uri.append(";id="); uri.append(id); | String format = ""; | public Sequence getSequence(String id) throws BioException, IllegalIDException { StringBuffer uri = new StringBuffer(prefix); uri.append('?'); uri.append("style=raw;"); uri.append("format="); uri.append(type); uri.append(";db="); uri.append(db); uri.append(";id="); uri.append(id); try { HttpURLConnect... |
try { HttpURLConnection huc = (HttpURLConnection) new URL(uri.substring(0)).openConnection(); huc.connect(); BufferedReader data = new BufferedReader(new InputStreamReader(huc.getInputStream())); data.mark(1000); String firstLine = data.readLine(); if (firstLine.startsWith("Content-")) { data.readLine(); firstLine = da... | if (dbName.equals("embl")) format = "embl"; if (dbName.equals("genbank")) format = "genbank"; else if (dbName.equals("swiss")) format = "swissprot"; else if (dbName.equals("refseq")) throw new BioException("Sequence database " + dbName + " is not supported"); | public Sequence getSequence(String id) throws BioException, IllegalIDException { StringBuffer uri = new StringBuffer(prefix); uri.append('?'); uri.append("style=raw;"); uri.append("format="); uri.append(type); uri.append(";db="); uri.append(db); uri.append(";id="); uri.append(id); try { HttpURLConnect... |
data.reset(); if ("embl".equals(type)) { SequenceIterator si = SeqIOTools.readEmbl(data); return si.nextSequence(); } else { throw new BioException("Unknown format " + type); } } catch (IOException ex) { throw new BioException(ex, "Error reading data from BioFetch"); } | StringBuffer uri = new StringBuffer(location); uri.append('?'); uri.append("style=raw;"); uri.append("format="); uri.append(format); uri.append(";db="); uri.append(dbName); uri.append(";id="); uri.append(id); try { HttpURLConnection huc = (HttpURLConnection) new URL(uri.substring(0)).openConnection(); huc.connect(); B... | public Sequence getSequence(String id) throws BioException, IllegalIDException { StringBuffer uri = new StringBuffer(prefix); uri.append('?'); uri.append("style=raw;"); uri.append("format="); uri.append(type); uri.append(";db="); uri.append(db); uri.append(";id="); uri.append(id); try { HttpURLConnect... |
public void removeSequence(String id) throws ChangeVetoException { throw new ChangeVetoException("Can't remove sequences from XEMBL"); | public void removeSequence(String id) throws ChangeVetoException { throw new ChangeVetoException("Failed to add sequence." + " Sequences may not be removed" + " from a biofetch database"); | public void removeSequence(String id) throws ChangeVetoException { throw new ChangeVetoException("Can't remove sequences from XEMBL"); } |
if (comp.compare(state, oldState) == comp.LESS_THAN) { | if (comp.compare(state, oldState) == HMMOrderByTransition.LESS_THAN) { | public State[] stateList(MarkovModel mm) throws IllegalSymbolException, IllegalTransitionException, BioException { FiniteAlphabet alpha = mm.stateAlphabet(); List emissionStates = new ArrayList(); HMMOrderByTransition comp = new HMMOrderByTransition(mm); List dotStates = new LinkedList(); for (Itera... |
if (changeSupport == null) allocChangeSupport(); changeSupport.addChangeListener(cl); | if (changeSupport == null) { allocChangeSupport(); } changeSupport.addChangeListener(cl); | public void addChangeListener(ChangeListener cl) { if (changeSupport == null) allocChangeSupport(); changeSupport.addChangeListener(cl); } |
changeSupport = new ChangeSupport(); | protected void allocChangeSupport() { forwarder = new ChangeListener() { public void preChange(ChangeEvent ev) throws ChangeVetoException { if (changeSupport != null) { changeSupport.firePreChangeEvent(new ChangeEvent(this, ev.getType(), ev.getChange(), ev.getPrevious(), ... | |
in.read( buf, 0, 5 ); | if ( in.read( buf, 0, 5 ) != 5 ) { throw new TransferFailedException( "Unexpected end of data." ); } | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); ChannelExec channel = null; //I/O stream... |
in.read( buf, 0, 1 ); | if ( in.read( buf, 0, 1 ) != 1 ) { throw new TransferFailedException( "Unexpected end of data." ); } | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); ChannelExec channel = null; //I/O stream... |
in.read( buf, i, 1 ); | if ( in.read( buf, i, 1 ) != 1 ) { throw new TransferFailedException( "Unexpected end of data." ); } | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); ChannelExec channel = null; //I/O stream... |
in.read( buf, 0, len ); | if ( in.read( buf, 0, len ) != len ) { throw new TransferFailedException( "Unexpected end of data." ); } | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { Resource resource = new Resource( resourceName ); fireGetInitiated( resource, destination ); ChannelExec channel = null; //I/O stream... |
throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException | public boolean getIfNewer( String resourceName, File destination, long timestamp ) { throw new UnsupportedOperationException( "getIfNewer is scp wagon must be still implemented" ); } | |
public CoreMock( Class mockedType, String name, InvocationDispatcher invocationDispatcher ) { super(mockedType, name, invocationDispatcher); this.proxy = Proxy.newProxyInstance(mockedType.getClassLoader(), new Class[]{mockedType}, this); | public CoreMock( Class mockedType, String name ) { this(mockedType, name, new LIFOInvocationDispatcher()); | public CoreMock( Class mockedType, String name, InvocationDispatcher invocationDispatcher ) { super(mockedType, name, invocationDispatcher); this.proxy = Proxy.newProxyInstance(mockedType.getClassLoader(), new Class[... |
this(listing, prefix, prefix, recursive); | validateArguments(listing, prefix, rawDescription); this.listing = listing; this.rawDescription = rawDescription; this.prefix = (null == prefix) ? "" : prefix; this.recursive = recursive; | public RetrieveListing(JMSObjectListing listing, String prefix, boolean recursive) { this(listing, prefix, prefix, recursive); } |
return new JFormalParameter(where, 0, factory .createReferenceType(TypeFactory.RFT_OBJECT), "_$outer", true); | return new JFormalParameter(where, JLocalVariable.DES_GENERATED, factory .createReferenceType(TypeFactory.RFT_OBJECT), "_$outer", true); | private static JFormalParameter genFormalParameter( TokenReference where, TypeFactory factory) { return new JFormalParameter(where, 0, factory .createReferenceType(TypeFactory.RFT_OBJECT), "_$outer", true); } |
command[0] = "/usr/opt/java122/bin/javac"; | command[0] = "javac"; | public static int compile(List filenames) throws IOException { String[] command = new String[7 + filenames.size()]; command[0] = "/usr/opt/java122/bin/javac"; command[1] = "-classpath"; command[2] = makePath(new String[] {"class", "xml.jar"}); command[3] = "-sourcepath"; command[4] = "src"; command[5] = "-d"; comma... |
if (field.getOwner().isMixin()) { | if (context.getClassContext().getCClass().isMixin()) { | public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } JExpression origPrefix = prefix; CClass local = context.getClassContext().getCClass(); //findPrefix(local, new CExpressionContex... |
new JThisExpression(getTokenReference()), | new JThisExpression(getTokenReference()).analyse(context), | public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } //Walter: this method is called now //rather than analise the args directly CType[] argTypes = getArgumentTypes(context, args, factory); CClass local ... |
args = argsTmp; | public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } //Walter: this method is called now //rather than analise the args directly CType[] argTypes = getArgumentTypes(context, args, factory); CClass local ... | |
determineImplicitTarget(context, local); | public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } //Walter: this method is called now //rather than analise the args directly CType[] argTypes = getArgumentTypes(context, args, factory); CClass local ... | |
CType type = t; | CType type = t.isArrayType()? ((CArrayType)t).getBaseType() : t; | public CType castFrom(CContext context, CType t, CClass contextClass) { CType res = null; //CArrayType arrayType = t.isArrayType() ? (CArrayType)t : null; //CType type = arrayType != null ? arrayType.getBaseType() : t; CType type = t; if(type.isClassType())... |
public Object buildObject(Class clazz, Object[] params) { | public Object buildObject(Class clazz, List paramsList) { | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
if (contents.containsKey(params)) return contents.get(params); | if (contents.containsKey(paramsList)) return contents.get(paramsList); | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
Class[] types = new Class[params.length]; | Class[] types = new Class[paramsList.size()]; | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
for (int i = 0; i < params.length; i++) types[i] = params[i].getClass(); | for (int i = 0; i < paramsList.size(); i++) types[i] = paramsList.get(i).getClass(); | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
Object o = c.newInstance(params); | Object o = c.newInstance(paramsList.toArray()); | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
contents.put(params, o); | contents.put(paramsList, o); | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
for (int i = 0; i < params.length; i++) { if (params[i]==null) paramsstuff.append("null"); else paramsstuff.append(params[i].toString()); if (i<(params.length-1)) paramsstuff.append(","); | for (int i = 0; i < paramsList.size(); i++) { if (paramsList.get(i)==null) paramsstuff.append("null"); else paramsstuff.append(paramsList.get(i).toString()); if (i<(paramsList.size()-1)) paramsstuff.append(","); | public Object buildObject(Class clazz, Object[] params) { // put the class into the hashmap if not there already if (!objects.containsKey(clazz)) objects.put(clazz,new HashMap()); Map contents = (Map)objects.get(clazz); // put the constructed object into the hashmap if not there already ... |
public void setList(Long listId, String name, String description, boolean holdSubs) throws NotFoundException, PermissionException; | public void setList(Long listId, String name, String description, String url, String email, boolean holdSubs) throws NotFoundException, PermissionException; | public void setList(Long listId, String name, String description, boolean holdSubs) throws NotFoundException, PermissionException; |
public int addNew(User user) throws Exception; | public int addNew(User user) ; | public int addNew(User user) throws Exception; |
public void addNewWithId(User user) throws Exception ; | public void addNewWithId(User user) ; | public void addNewWithId(User user) throws Exception ; |
public void addToGroup(int userId, int[] groupId) throws Exception; | public void addToGroup(int userId, int[] groupId) ; | public void addToGroup(int userId, int[] groupId) throws Exception; |
public void decrementPosts(int userId) throws Exception; | public void decrementPosts(int userId) ; | public void decrementPosts(int userId) throws Exception; |
public void delete(int userId) throws Exception; | public void delete(int userId) ; | public void delete(int userId) throws Exception; |
public List findByName(String input, boolean exactMath) throws Exception; | public List findByName(String input, boolean exactMath) ; | public List findByName(String input, boolean exactMath) throws Exception; |
public User getLastUserInfo() throws Exception; | public User getLastUserInfo() ; | public User getLastUserInfo() throws Exception; |
public int getTotalUsers() throws Exception; | public int getTotalUsers() ; | public int getTotalUsers() throws Exception; |
public int getTotalUsersByGroup(int groupId) throws Exception; | public int getTotalUsersByGroup(int groupId) ; | public int getTotalUsersByGroup(int groupId) throws Exception; |
public String getUserAuthHash(int userId) throws Exception; | public String getUserAuthHash(int userId) ; | public String getUserAuthHash(int userId) throws Exception; |
public String getUsernameByEmail(String email) throws Exception; | public String getUsernameByEmail(String email) ; | public String getUsernameByEmail(String email) throws Exception; |
public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception; | public boolean hasUsernameChanged(int userId, String usernameToCheck) ; | public boolean hasUsernameChanged(int userId, String usernameToCheck) throws Exception; |
public void incrementPosts(int userId) throws Exception; | public void incrementPosts(int userId) ; | public void incrementPosts(int userId) throws Exception; |
public boolean isDeleted(int user_id) throws Exception; | public boolean isDeleted(int user_id) ; | public boolean isDeleted(int user_id) throws Exception; |
public boolean isUsernameRegistered(String username) throws Exception; | public boolean isUsernameRegistered(String username) ; | public boolean isUsernameRegistered(String username) throws Exception; |
public void removeFromGroup(int userId, int[] groupId) throws Exception; | public void removeFromGroup(int userId, int[] groupId) ; | public void removeFromGroup(int userId, int[] groupId) throws Exception; |
public void saveNewPassword(String password, String email) throws Exception; | public void saveNewPassword(String password, String email) ; | public void saveNewPassword(String password, String email) throws Exception; |
public void saveUserAuthHash(int userId, String hash) throws Exception; | public void saveUserAuthHash(int userId, String hash) ; | public void saveUserAuthHash(int userId, String hash) throws Exception; |
public List selectAll() throws Exception; | public List selectAll() ; | public List selectAll() throws Exception; |
public List selectAllByGroup(int groupId, int start, int count) throws Exception; | public List selectAllByGroup(int groupId, int start, int count) ; | public List selectAllByGroup(int groupId, int start, int count) throws Exception; |
public List selectAllWithKarma() throws Exception; | public List selectAllWithKarma() ; | public List selectAllWithKarma() throws Exception; |
public User selectById(int userId) throws Exception; | public User selectById(int userId) ; | public User selectById(int userId) throws Exception; |
public User selectByName(String username) throws Exception; | public User selectByName(String username) ; | public User selectByName(String username) throws Exception; |
public void setActive(int userId, boolean active) throws Exception; | public void setActive(int userId, boolean active) ; | public void setActive(int userId, boolean active) throws Exception; |
public void setRanking(int userId, int rankingId) throws Exception; | public void setRanking(int userId, int rankingId) ; | public void setRanking(int userId, int rankingId) throws Exception; |
public void undelete(int userId) throws Exception; | public void undelete(int userId) ; | public void undelete(int userId) throws Exception; |
public void update(User user) throws Exception; | public void update(User user) ; | public void update(User user) throws Exception; |
public void updateUsername(int userId, String username) throws Exception; | public void updateUsername(int userId, String username) ; | public void updateUsername(int userId, String username) throws Exception; |
public boolean validateActivationKeyHash(int userId , String hash) throws Exception; | public boolean validateActivationKeyHash(int userId , String hash) ; | public boolean validateActivationKeyHash(int userId , String hash) throws Exception; |
public User validateLogin(String username, String password) throws NoSuchAlgorithmException, Exception; | public User validateLogin(String username, String password) ; | public User validateLogin(String username, String password) throws NoSuchAlgorithmException, Exception; |
public boolean validateLostPasswordHash(String email, String hash) throws Exception; | public boolean validateLostPasswordHash(String email, String hash) ; | public boolean validateLostPasswordHash(String email, String hash) throws Exception; |
public void writeLostPasswordHash(String email, String hash) throws Exception; | public void writeLostPasswordHash(String email, String hash) ; | public void writeLostPasswordHash(String email, String hash) throws Exception; |
public void writeUserActive(int userId) throws Exception; | public void writeUserActive(int userId) ; | public void writeUserActive(int userId) throws Exception; |
msg.addHeader("X-Loop", mail.getList().getEmail()); | msg.addXLoop(mail.getList().getEmail()); | protected void deliverTo(Mail mail, EmailAddress emailAddress) throws NotFoundException { if (log.isDebugEnabled()) log.debug("Delivering mailId " + mail.getId() + " to email " + emailAddress.getId()); try { Address destination = new InternetAddress(emailAddress.getId()); SubEthaMessage msg = new SubEthaMes... |
public SubEthaMessage(Session session, byte[] mail) throws MessagingException | public SubEthaMessage(Session session) throws MessagingException | public SubEthaMessage(Session session, byte[] mail) throws MessagingException { this(session, new ByteArrayInputStream(mail)); } |
this(session, new ByteArrayInputStream(mail)); | super(session); | public SubEthaMessage(Session session, byte[] mail) throws MessagingException { this(session, new ByteArrayInputStream(mail)); } |
return Collections.singletonList(l.get(0)); | return Collections.nCopies(1, l.get(0)); | public static List createList(List l) { switch (l.size()) { case 0: return Collections.EMPTY_LIST; case 1: return Collections.singletonList(l.get(0)); case 2: Doublet d = new Doublet(l.get(0), l.get(1)); return d; case 3: Triplet t = new Triplet(l.get(0), l.ge... |
public Role(MailingList list) { if (log.isDebugEnabled()) log.debug("Creating new owner Role"); this.list = list; this.setName(OWNER_NAME); this.owner = true; } | public Role() {} | public Role(MailingList list) { if (log.isDebugEnabled()) log.debug("Creating new owner Role"); this.list = list; this.setName(OWNER_NAME); this.owner = true; } |
} else { if(getIdent().equals("n1")) { boolean stop = true; } | } else { | public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } JExpression origPrefix = prefix; CClass local = context.getClassContext().getCClass(); findPrefix(local, new CExpressionContext(... |
public void error(String msg, Throwable e) { if ( getErrorListener()!=null ) { getErrorListener().error(msg,e); } else { if ( e!=null ) { System.err.println("StringTemplate: error: "+msg+": "+e.toString()); } else { System.err.println("StringTemplate: error: "+msg); } } | public void error(String msg) { error(msg, null); | public void error(String msg, Throwable e) { if ( getErrorListener()!=null ) { getErrorListener().error(msg,e); } else { if ( e!=null ) { System.err.println("StringTemplate: error: "+msg+": "+e.toString()); } else { System.err.println("StringTemplate: error: "... |
intersect.setDefaultConstraints( intersection(ann1.getDefaultPropertyConstraint(), ann2.getDefaultPropertyConstraint()), LocationTools.intersection(ann1.getDefaultCardinalityConstraint(), ann2.getDefaultCardinalityConstraint()) ); | public static AnnotationType intersection( AnnotationType ann1, AnnotationType ann2 ) { if(ann1.subTypeOf(ann2)) { return ann2; } else if(ann2.subTypeOf(ann1)) { return ann1; } else { Set props = new HashSet(); props.addAll(ann1.getProperties()); props.... | |
System.err.println("Finding union of: " + ann1 + ", " + ann2); | public static AnnotationType union( AnnotationType ann1, AnnotationType ann2 ) { if(ann1.subTypeOf(ann2)) { return ann1; } else if(ann2.subTypeOf(ann1)) { return ann2; } else { Set props = new HashSet(); props.addAll(ann1.getProperties()); props.addAll(... | |
public BioError(Throwable ex, String message) { super(message); this.subException = ex; | public BioError(String message) { this(null, message); | public BioError(Throwable ex, String message) { super(message); this.subException = ex; } |
String url = (String)this.dao.getConfigValue(Config.ID_SITE_URL); vctx.put("url", url); | URL url = (URL)this.dao.getConfigValue(Config.ID_SITE_URL); vctx.put("url", url.toString()); | public void sendAddEmailToken(Person me, String email, String token) { if (log.isDebugEnabled()) log.debug("Sending add email token to " + email); VelocityContext vctx = new VelocityContext(); vctx.put("token", this.token(token)); vctx.put("email", email); vctx.put("person", me); if (me.getSubscriptions().... |
String postmaster = (String)this.dao.getConfigValue(Config.ID_SITE_POSTMASTER); builder.setFrom(postmaster); | InternetAddress postmaster = (InternetAddress)this.dao.getConfigValue(Config.ID_SITE_POSTMASTER); builder.setFrom(postmaster.toString()); | public void sendAddEmailToken(Person me, String email, String token) { if (log.isDebugEnabled()) log.debug("Sending add email token to " + email); VelocityContext vctx = new VelocityContext(); vctx.put("token", this.token(token)); vctx.put("email", email); vctx.put("person", me); if (me.getSubscriptions().... |
public String getString(String key, Object arg1) { return getString(key, new Object[] { arg1 }); | public String getString(String key) { try { if (null == key) return ""; return getResources().getString(key); } catch (MissingResourceException e) { return handleMissingResource(key); } | public String getString(String key, Object arg1) { return getString(key, new Object[] { arg1 }); } |
public StringTemplate(String template) { this(null, template); if ( debugMode ) debug("new StringTemplate(template):"+getTemplateID()); | public StringTemplate() { group = defaultGroup; if ( debugMode ) debug("new StringTemplate():"+getTemplateID()); | public StringTemplate(String template) { this(null, template); if ( debugMode ) debug("new StringTemplate(template):"+getTemplateID()); } |
public boolean setOMEXML(File file) { try { DataInputStream in = new DataInputStream(new FileInputStream(file)); byte[] header = new byte[8]; in.readFully(header); if (TiffTools.isValidHeader(header)) { in.close(); RandomAccessFile raf = new RandomAccessFile(file, "r"); Hashtable[] ifds = TiffTools.getIFDs(raf); raf.c... | public void setOMEXML(String xml) { OMENode ome = null; try { ome = new OMENode(xml); } catch (Exception exc) { } raw = ome == null; if (raw) rawText.setText(xml); else setOMEXML(ome); SwingUtilities.invokeLater(this); | public boolean setOMEXML(File file) { try { DataInputStream in = new DataInputStream(new FileInputStream(file)); byte[] header = new byte[8]; in.readFully(header); if (TiffTools.isValidHeader(header)) { // TIFF file in.close(); RandomAccessFile raf = new RandomAccessFile(fi... |
public static short bytesToShort(byte[] bytes, int off, boolean little) { return bytesToShort(bytes, off, 2, little); | public static short bytesToShort(byte[] bytes, int off, int len, boolean little) { if (bytes.length - off < len) len = bytes.length - off; short total = 0; for (int i=0, ndx=off; i<len; i++, ndx++) { total |= (bytes[ndx] < 0 ? 256 + bytes[ndx] : (int) bytes[ndx]) << ((little ? i : len - i - 1) * 8); } return total; | public static short bytesToShort(byte[] bytes, int off, boolean little) { return bytesToShort(bytes, off, 2, little); } |
CjAdviceDeclaration advCopy = new CjAdviceDeclaration(declAdv[i1]); | CjAdviceDeclaration advCopy = new CjAdviceDeclaration(declAdv[i1], classDecl); | private void collectAllCrosscuts(CaesarTypeNode node, List pointcuts, List advices, List declares) { List ccLst = getCrosscuttingMixinList(node); HashSet pctSet = new HashSet(); /* counter for advice name generation */ int counter = 0; int mixinCount = ccLst.size(); for (Iterator it = ccLst.iterator(); it.... |
public CjAdviceDeclaration(CjAdviceDeclaration decl, CjVirtualClassDeclaration originalClass) { super(decl.getTokenReference(), decl.modifiers, decl.returnType, decl.getIdent(), decl.parameters, decl.exceptions, decl.body, decl.javadoc, decl.comments); this.pointcut = decl.pointcut; this.kind = decl.kind; this.extraArg... | public CjAdviceDeclaration( TokenReference where, int modifiers, CType returnType, JFormalParameter[] parameters, CReferenceType[] exceptions, JBlock body, JavadocComment javadoc, JavaStyleComment[] comments, CaesarPointcut pointcut, CaesarAdviceKind kind, boolean hasExtraParameter) { super( where, modifiers, returnTyp... | public CjAdviceDeclaration(CjAdviceDeclaration decl, CjVirtualClassDeclaration originalClass) { super(decl.getTokenReference(), decl.modifiers, decl.returnType, decl.getIdent(), decl.parameters, decl.exceptions, decl.body, decl.javadoc, decl.comments); this.pointcut = decl.pointcut;... |
this.originalClass = originalClass; | public CjAdviceDeclaration(CjAdviceDeclaration decl, CjVirtualClassDeclaration originalClass) { super(decl.getTokenReference(), decl.modifiers, decl.returnType, decl.getIdent(), decl.parameters, decl.exceptions, decl.body, decl.javadoc, decl.comments); this.pointcut = decl.pointcut;... | |
JLocalVariable.DES_GENERATED, | public CjClassDeclaration createSingletonAspect(CjPointcutDeclaration[] pointcuts, CjAdviceDeclaration[] advices, CaesarDeclare[] declares) { List fields = new ArrayList(); List inners = new ArrayList(); List singletonAspectMethods = new ArrayList(); List aspectClassMethods = new ArrayList(); CjAdviceDeclarat... | |
private boolean anonymousPost(int forumId) throws Exception { | private boolean anonymousPost(int forumId) { | private boolean anonymousPost(int forumId) throws Exception { // Check if anonymous posts are allowed if (!SessionFacade.isLogged() && !SecurityRepository.canAccess(SecurityConstants.PERM_ANONYMOUS_POST, Integer.toString(forumId))) { this.setTemplateName(ViewCommon.contextToLogin()); return false; } return ... |
public void delete() throws Exception | public void delete() | public void delete() throws Exception { if (!SecurityRepository.canAccess(SecurityConstants.PERM_MODERATION_POST_REMOVE)) { this.setTemplateName(TemplateKeys.POSTS_CANNOT_DELETE); this.context.put("message", I18n.getMessage("CannotRemovePost")); return; } // Post PostDAO pm = DataAccessDriver.getInstance().... |
public void downloadAttach() throws Exception | public void downloadAttach() | public void downloadAttach() throws Exception { if ((SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_ENABLED) && !SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_DOWNLOAD)) || (!SessionFacade.isLogged() && !SystemGlobals.getBoolValue(ConfigKeys.ATTACHMENTS_ANONYMOUS))) { this.... |
if ((SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_ENABLED) && !SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_DOWNLOAD)) || (!SessionFacade.isLogged() && !SystemGlobals.getBoolValue(ConfigKeys.ATTACHMENTS_ANONYMOUS))) { this.setTemplateName(TemplateKeys.POSTS_CANNOT_DOWNLOAD); this.c... | try { if ((SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_ENABLED) && !SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_DOWNLOAD)) || (!SessionFacade.isLogged() && !SystemGlobals.getBoolValue(ConfigKeys.ATTACHMENTS_ANONYMOUS))) { this.setTemplateName(TemplateKeys.POSTS_CANNOT_DOWNLOAD); ... | public void downloadAttach() throws Exception { if ((SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_ENABLED) && !SecurityRepository.canAccess(SecurityConstants.PERM_ATTACHMENTS_DOWNLOAD)) || (!SessionFacade.isLogged() && !SystemGlobals.getBoolValue(ConfigKeys.ATTACHMENTS_ANONYMOUS))) { this.... |
public void edit() throws Exception { | public void edit() { | public void edit() throws Exception { this.edit(false, null); } |
public void editSave() throws Exception | public void editSave() | public void editSave() throws Exception { PostDAO postDao = DataAccessDriver.getInstance().newPostDAO(); PollDAO pollDao = DataAccessDriver.getInstance().newPollDAO(); TopicDAO topicDao = DataAccessDriver.getInstance().newTopicDAO(); Post p = postDao.selectById(this.request.getIntParameter("post_id")); p = PostC... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.