rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
public List selectAll(int startFrom, int count) throws Exception | public List selectAll(int startFrom, int count) | public List selectAll(int startFrom, int count) throws Exception { return super.selectAll(startFrom, (count > 0 ? startFrom + count : 0)); } |
private static void prepareForDynamicDeployment(CjClassDeclaration cd, KjcEnvironment environment) throws PositionedError { boolean bNewInners = false; CContext ownerCtx = (CContext)cd.getContext(); for (JTypeDeclaration inner : cd.getInners()) { if (inner instanceof CjVirtualClassDeclaration) { CjVirtualClassDeclar... | public static void prepareForDynamicDeployment(JCompilationUnit cu) throws PositionedError { boolean bNewDelarations = false; CContext ownerCtx = cu.getContext(); for (JTypeDeclaration typeDecl : cu.getInners()) { if (typeDecl instanceof CjVirtualClassDeclaration) { CjVirtualClassDeclaration caesarClass = (CjVirtua... | private static void prepareForDynamicDeployment(CjClassDeclaration cd, KjcEnvironment environment) throws PositionedError { boolean bNewInners = false; CContext ownerCtx = (CContext)cd.getContext(); for (JTypeDeclaration inner : cd.getInners()) { if (inner instanceof CjVirtualClassDeclaration) {... |
cd.addInners(new JTypeDeclaration[] { aspectIfc, registryCls }); bNewInners = true; | CjInterfaceDeclaration aspectIfc = caesarClass.getAspectInterface(); CjClassDeclaration registryCls = caesarClass.getRegistryClass(); cu.addInners(new JTypeDeclaration[] { aspectIfc, registryCls}); bNewDelarations = true; | private static void prepareForDynamicDeployment(CjClassDeclaration cd, KjcEnvironment environment) throws PositionedError { boolean bNewInners = false; CContext ownerCtx = (CContext)cd.getContext(); for (JTypeDeclaration inner : cd.getInners()) { if (inner instanceof CjVirtualClassDeclaration) {... |
JTypeDeclaration[] innersInners = innerCaesarClass.getInners(); for (int j = 0; j < innersInners.length; j++) { if (innersInners[j] instanceof CjClassDeclaration) { CjClassDeclaration currentInnerInner = (CjClassDeclaration) innersInners[j]; JoinDeploymentSupport.prepareForDynamicDeployment(currentInnerInner, environme... | if (caesarClass.getInners().length > 0) { JoinDeploymentSupport.prepareForDynamicDeployment(caesarClass, cu.getEnvironment()); | private static void prepareForDynamicDeployment(CjClassDeclaration cd, KjcEnvironment environment) throws PositionedError { boolean bNewInners = false; CContext ownerCtx = (CContext)cd.getContext(); for (JTypeDeclaration inner : cd.getInners()) { if (inner instanceof CjVirtualClassDeclaration) {... |
if (bNewInners) { rejoinMixinInterfaces(cd.getInners(), ownerCtx); | if (bNewDelarations) { rejoinMixinInterfaces(cu.getInners(), ownerCtx); | private static void prepareForDynamicDeployment(CjClassDeclaration cd, KjcEnvironment environment) throws PositionedError { boolean bNewInners = false; CContext ownerCtx = (CContext)cd.getContext(); for (JTypeDeclaration inner : cd.getInners()) { if (inner instanceof CjVirtualClassDeclaration) {... |
if (caesarClass.isCrosscutting()) { | if (caesarClass.getRegistryClass() != null) { | private static void rejoinMixinInterfaces(JTypeDeclaration[] decl, CContext ownerCtx) throws PositionedError { for (int i = 0; i < decl.length; i++) { if (decl[i] instanceof CjVirtualClassDeclaration) { CjVirtualClassDeclaration caesarClass = (CjVirtualClassDeclaration)decl[i]; if (caesarClass.isCrosscutting(... |
&& autoLoginCookie != null && !"1".equals(autoLoginCookie.getValue())) { | && autoLoginCookie != null && "1".equals(autoLoginCookie.getValue())) { | private void checkAutoLogin(UserSession userSession) throws Exception { String cookieName = SystemGlobals.getValue(ConfigKeys.COOKIE_NAME_DATA); Cookie cookie = ControllerUtils.getCookie(cookieName); Cookie hashCookie = ControllerUtils.getCookie(SystemGlobals.getValue(ConfigKeys.COOKIE_USER_HASH)); Cookie autoLogi... |
public boolean userExists(String username) throws Exception | public boolean userExists(String username) | public boolean userExists(String username) throws Exception { this.username = username; this.dao = DataAccessDriver.getInstance().newUserDAO(); this.user = this.dao.selectByName(username); this.exists = this.user != null; return this.exists; } |
public void register(String password, String email) throws Exception | public void register(String password, String email) | public void register(String password, String email) throws Exception { if (this.exists) { return; } // Is a new user for us. Register him this.user = new User(); user.setUsername(this.username); user.setPassword(password); user.setEmail(email); user.setActive(1); this.dao.addNew(user); } |
public UserSession selectById(UserSession us, Connection conn) throws Exception; | public UserSession selectById(UserSession us, Connection conn) ; | public UserSession selectById(UserSession us, Connection conn) throws Exception; |
if (f.getName()==null || f.getName().equals("")) f.setName(rs.getAccession()+"#"+f.getRank()); | public Sequence makeSequence() throws BioException { this.endSequence(); // Check our input. // deal with extra accessions by ignoring them. String accession = (String)this.accessions.get(0); // make our basic object SymbolList syms = this.symbols==null?SymbolList.EMPTY_LIST:this.... | |
if (symList==null) this.symList = SymbolList.EMPTY_LIST; else this.symList = symList; | this.symList = symList; | public SimpleRichSequence(Namespace ns, String name, String accession, int version, SymbolList symList, Double seqversion) { super(ns,name,accession,version,symList.getAlphabet(),seqversion); if (symList==null) this.symList = SymbolList.EMPTY_LIST; else this.symList = symList; } |
if (this.location!=them.getLocation()) return this.location.compareTo(them.getLocation()); | if (!this.location.equals(them.getLocation())) return this.location.compareTo(them.getLocation()); | public int compareTo(Object o) { // Hibernate comparison - we haven't been populated yet if (this.docref==null) return -1; // Normal comparison RankedDocRef them = (RankedDocRef)o; if (this.rank!=them.getRank()) return this.rank - them.getRank(); if (this.location!=them.get... |
String rel = dm.group(4); String type = dm.group(5); | String rel = dm.group(3); String type = dm.group(4); | public boolean readRichSequence(BufferedReader reader, SymbolTokenization symParser, RichSeqIOListener rlistener, Namespace ns) throws IllegalSymbolException, IOException, ParseException { String line; boolean hasAnotherSequence = true; //bool... |
mConsole.addLink(new FileLink(file, null, -1, -1, lineno), linkOffset, linkLength); | mConsole.addLink((IHyperlink) new FileLink(file, null, -1, -1, lineno), linkOffset, linkLength); | public void lineAppended(IRegion line) { if (!isPatternSetup()) return; try { IDocument document = mConsole.getDocument(); String text = document.get(line.getOffset(), line.getLength()); Matcher matcher = mErrorPattern.matcher(text); ... |
public BlastAggregator() | public BlastAggregator(StAXFeatureHandler staxenv) | public BlastAggregator() { // delegate handling of <BlastOutput> super.addHandler(new ElementRecognizer.ByLocalName("BlastOutput"), new StAXHandlerFactory() { public StAXContentHandler getHandler(StAXFeatureHandler staxenv) { return new BlastOutputHandle... |
return new BlastOutputHandler(staxenv) { public void startElementHandler( String nsURI, String localName, String qName, Attributes attrs) throws SAXException { wrap = false; } }; | return new BlastOutputHandler(staxenv); | public BlastAggregator() { // delegate handling of <BlastOutput> super.addHandler(new ElementRecognizer.ByLocalName("BlastOutput"), new StAXHandlerFactory() { public StAXContentHandler getHandler(StAXFeatureHandler staxenv) { return new BlastOutputHandle... |
return new BlastOutputHandler(staxenv) { public void startElementHandler( String nsURI, String localName, String qName, Attributes attrs) throws SAXException { wrap = false; } }; | return new BlastOutputHandler(staxenv); | public StAXContentHandler getHandler(StAXFeatureHandler staxenv) { return new BlastOutputHandler(staxenv) { public void startElementHandler( String nsURI, String localName, String q... |
String type = parameters[i].getType().getSignature(); parameterSignatures.add(type); | ResolvedTypeX typeX = CaesarBcelWorld.getInstance().resolve(parameters[i].getType()); parameterSignatures.add(typeX); | public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ... |
type, | typeX, | public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ... |
context.getCClass().getQualifiedName(), | CaesarBcelWorld.getInstance().resolve(context.getCClass()), | public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ... |
(String[]) parameterSignatures.toArray(new String[0]), | (ResolvedTypeX[]) parameterSignatures.toArray(new ResolvedTypeX[0]), | public CaesarMember resolve( CClassContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference) { List parameterSignatures = new ArrayList(); List formalBindings = new ArrayList(); for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { ... |
String declaringName, | ResolvedTypeX declaringType, | public static CaesarMember ResolvedPointcutDefinition( String declaringName, int modifiers, String name, String[] parameterSignatures, CaesarPointcut pointcut) { // convert the signatures to types TypeX parameterTypes[] = TypeX.forSignatures(parameterSignatures), declaringType = TypeX.forName(declaringNa... |
String[] parameterSignatures, | ResolvedTypeX[] parameterTypes, | public static CaesarMember ResolvedPointcutDefinition( String declaringName, int modifiers, String name, String[] parameterSignatures, CaesarPointcut pointcut) { // convert the signatures to types TypeX parameterTypes[] = TypeX.forSignatures(parameterSignatures), declaringType = TypeX.forName(declaringNa... |
TypeX parameterTypes[] = TypeX.forSignatures(parameterSignatures), declaringType = TypeX.forName(declaringName); | public static CaesarMember ResolvedPointcutDefinition( String declaringName, int modifiers, String name, String[] parameterSignatures, CaesarPointcut pointcut) { // convert the signatures to types TypeX parameterTypes[] = TypeX.forSignatures(parameterSignatures), declaringType = TypeX.forName(declaringNa... | |
return ("250 <" + recipientAddress + "> Recipient ok."); | return ("250 Ok"); | public String execute(String commandString, Session session) { String args = getArgPredicate(commandString); if (session.getSender() == null) { return "503 Need MAIL before RCPT."; } else if (!args.toUpperCase().startsWith("TO:")) { return "501 Syntax: RCPT TO: <address> Error in parameters: \"" + getAr... |
if (endPartition.getType() == SchemePartitionScanner.SCHEME_STRING) | if (endPartition.getType() == SchemePartitionScanner.SCHEME_STRING && end > endPartition.getOffset()) | public void customizeDocumentCommand(IDocument document, DocumentCommand command) { try { if (command.length == 1 && command.text.length() == 0) { ITypedRegion partition = document.getPartition(command.offset); if (partition.getType() == SchemePartitionScanner.SCHEME_... |
filenameField.setMaximumSize(filenameField.getPreferredSize()); | public JTextField getFilenameField() { if (filenameField == null) { filenameField = new JTextField("(none selected)", 60); filenameField.setMaximumSize(filenameField.getPreferredSize()); filenameField.getDocument().addDocumentListener(eventHandler); } return filenameField; } | |
public void denied(String message) | public void denied() | public void denied(String message) { JForum.getContext().put("moduleAction", "message.htm"); JForum.getContext().put("message", message); } |
JForum.getContext().put("moduleAction", "message.htm"); JForum.getContext().put("message", message); | this.denied(I18n.getMessage("Moderation.Denied")); | public void denied(String message) { JForum.getContext().put("moduleAction", "message.htm"); JForum.getContext().put("message", message); } |
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 { return super.selectAllByForumByLimit(forumId, count, startFrom); } |
public List selectByUserByLimit(int userId, int startFrom, int count) throws Exception | public List selectByUserByLimit(int userId, int startFrom, int count) | public List selectByUserByLimit(int userId, int startFrom, int count) throws Exception { return super.selectByUserByLimit(userId, count, startFrom); } |
if (file == null || file.length() == 0) | StringTokenizer toke = new StringTokenizer(file, "/"); if (toke.countTokens() == 0) | public AceSet fetch(AceURL url) throws AceException { AceSet resultSet = null; String file = url.getFile(); if (file == null || file.length() == 0) return allClasses(); StringTokenizer toke = new StringTokenizer(file, "/"); if (toke.countTokens() == 1) { String clazz = toke.nextToken(); resultSet = allC... |
StringTokenizer toke = new StringTokenizer(file, "/"); | public AceSet fetch(AceURL url) throws AceException { AceSet resultSet = null; String file = url.getFile(); if (file == null || file.length() == 0) return allClasses(); StringTokenizer toke = new StringTokenizer(file, "/"); if (toke.countTokens() == 1) { String clazz = toke.nextToken(); resultSet = allC... | |
sp.addSequenceViewerListener(new SequenceViewerListener() { public void mouseClicked(SequenceViewerEvent sve) { System.out.println("clicked: " + sve); } public void mousePressed(SequenceViewerEvent sve) { System.out.println("pressed: " + sve); } public void mouseReleased(SequenceViewerEvent sve) { System.out.println(... | public static void main(String[] args) throws Exception { String seqFile = null; try { seqFile = args[0]; } catch (IndexOutOfBoundsException ex) { throw new Exception("usage: java seqviewer.EmblViewer acc.embl"); } final BasicFeatureRenderer fr; final FeatureRenderer split; SequenceFo... | |
sp.setDirection(SequencePanel.HORIZONTAL); | sp.setDirection(SequencePanel.VERTICAL); | public void actionPerformed(ActionEvent ae) { sp.setDirection(SequencePanel.HORIZONTAL); } |
try { fr.setFill(Color.blue); } catch (ChangeVetoException cve) { throw new BioError(cve, "oops"); } } | sp.setDirection(SequencePanel.HORIZONTAL); } | public void actionPerformed(ActionEvent ae) { try { fr.setFill(Color.blue); } catch (ChangeVetoException cve) { throw new BioError(cve, "oops"); } } |
fr.setFill(Color.red); | fr.setFill(Color.blue); | public void actionPerformed(ActionEvent ae) { try { fr.setFill(Color.red); } catch (ChangeVetoException cve) { throw new BioError(cve, "oops"); } } |
sp.setLines(e.getValue()); | int val = e.getValue(); double s = Math.exp(-val / 7.0) * 20.0; System.out.println("Scale now at " + s); sp.setScale(s); | public void adjustmentValueChanged(AdjustmentEvent e) { sp.setLines(e.getValue()); } |
c.removeChangeListener(rendForwarder); | c.addChangeListener(rendForwarder); | public void setRenderer(SequenceRenderer renderer) throws ChangeVetoException { if(hasListeners()) { ChangeEvent ce = new ChangeEvent( this, RENDERER, renderer, this.renderer ); ChangeSupport cs = getChangeSupport(RENDERER); synchronized(cs) { cs.firePreChangeEvent(ce); ... |
setFault(e); | recordFault(e); | public void execute() { assertNotCompleted(); try { getTheConnection().deleteSession(getSessionIndex()); } catch (RuntimeException e) { setFault(e); } completed(); } |
final String remoteHost = args[1]; | String remoteHost = args[1]; remoteHost = remoteHost.replace("[", ""); remoteHost = remoteHost.replace("]", ""); | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: HELO <hostname>"; } final String remoteHost = args[1]; if (session.getDeclaredRemoteHostname() == null) { final SMTPServerContext SMTPServerContext = commandDispa... |
return new StringBuilder().append("250 ").append( SMTPServerContext.getHostname()).append(" Hello ") .append(fullyQualifiedRemoteHost).toString(); | return new StringBuilder().append("250 ") .append(SMTPServerContext.getHostname()).toString(); | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: HELO <hostname>"; } final String remoteHost = args[1]; if (session.getDeclaredRemoteHostname() == null) { final SMTPServerContext SMTPServerContext = commandDispa... |
return "221 test.subethamail.org closing connection. " | return "221 " + remoteHost + " closing connection. " | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: HELO <hostname>"; } final String remoteHost = args[1]; if (session.getDeclaredRemoteHostname() == null) { final SMTPServerContext SMTPServerContext = commandDispa... |
return "503 " + remoteHost + " Duplicate HELO/EHLO"; | return "503 " + remoteHost + " Duplicate HELO"; | public String execute(String commandString, Session session) { String[] args = getArgs(commandString); if (args.length < 2) { return "501 Syntax: HELO <hostname>"; } final String remoteHost = args[1]; if (session.getDeclaredRemoteHostname() == null) { final SMTPServerContext SMTPServerContext = commandDispa... |
double aStart = scanArc.getAngleStart(); double aExtent = scanArc.getAngleExtent(); | private Rectangle drawScanArc(Graphics2D g, RobotPeer robot) { g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) .2)); Arc2D.Double scanArc = (Arc2D.Double) robot.getScanArc().clone(); double aStart = scanArc.getAngleStart(); double aExtent = scanArc.getAngleExtent(); aStart = 360 - aStar... | |
aStart = 360 - aStart; aStart -= aExtent; if (aStart < 0) { aStart += 360; } scanArc.setAngleStart(aStart); | scanArc.setAngleStart((360 - scanArc.getAngleStart() - scanArc.getAngleExtent()) % 360); | private Rectangle drawScanArc(Graphics2D g, RobotPeer robot) { g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) .2)); Arc2D.Double scanArc = (Arc2D.Double) robot.getScanArc().clone(); double aStart = scanArc.getAngleStart(); double aExtent = scanArc.getAngleExtent(); aStart = 360 - aStar... |
if (aExtent >= .5) { | if (Math.abs(scanArc.getAngleExtent()) >= .5) { | private Rectangle drawScanArc(Graphics2D g, RobotPeer robot) { g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, (float) .2)); Arc2D.Double scanArc = (Arc2D.Double) robot.getScanArc().clone(); double aStart = scanArc.getAngleStart(); double aExtent = scanArc.getAngleExtent(); aStart = 360 - aStar... |
paintBattle(offscreenGfx); | drawBattle(offscreenGfx); | 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); pain... |
return active; | return isActive; | public boolean isActive() { return active; } |
this.installationConfig = getVariableValue(ConfigKeys.INSTALLATION_CONFIG); | private SystemGlobals(String appPath, String defaultConfig, String installKey) throws IOException { if (defaultConfig == null) { throw new InvalidParameterException("defaultConfig could not be null"); } expander = new VariableExpander(this, "${", "}"); if (installKey == null) { installKey = System.getPrope... | |
if (value instanceof List) { Vector v = new Vector(); v.addAll((List) value); js.setArguments(v); | try { js.setArguments(TypeUtil.toList(value)); | public void submitTask(VariableStack stack) throws ExecutionException { try { JobSpecificationImpl js = new JobSpecificationImpl(); Task task = new TaskImpl(); NamedArguments named = ArgUtil.getNamedArguments(stack); Iterator i = named.getNames(); Object host = null; String provider = null; while (i.has... |
else { | catch (Exception e) { | public void submitTask(VariableStack stack) throws ExecutionException { try { JobSpecificationImpl js = new JobSpecificationImpl(); Task task = new TaskImpl(); NamedArguments named = ArgUtil.getNamedArguments(stack); Iterator i = named.getNames(); Object host = null; String provider = null; while (i.has... |
PreparedStatement get_sequence = conn.prepareStatement("select bioentry.bioentry_id " + "from bioentry " + "where bioentry.accession = ?" ); get_sequence.setString(1, id); ResultSet rs = get_sequence.executeQuery(); boolean exists; if ((exists = rs.next())) { int bioentry_id = rs.getInt(1); | PreparedStatement get_sequence = conn.prepareStatement("select bioentry.bioentry_id " + "from bioentry, biodatabase " + "where bioentry.accession = ? and biodatabase.biodatabase_id = ?" ); get_sequence.setString(1, id); get_sequence.setInt(2, dbid); ResultSet rs = get_sequence.executeQuery(); boolean exists; if ((exist... | private void _removeSequence(String id) throws BioException, ChangeVetoException { Sequence seq = (Sequence) sequencesByName.get(id); if (seq != null) { seq = null; // Don't want to be holding the reference ourselves! try { Thread.sleep(100L); ... |
DBHelper.DeleteStyle dstyle = getDBHelper().getDeleteStyle(); | private void _removeSequence(String id) throws BioException, ChangeVetoException { Sequence seq = (Sequence) sequencesByName.get(id); if (seq != null) { seq = null; // Don't want to be holding the reference ourselves! try { Thread.sleep(100L); ... | |
delete_biosequence.setInt(1, bioentry_id); delete_biosequence.executeUpdate(); delete_biosequence.close(); PreparedStatement delete_entry = conn.prepareStatement("delete from bioentry where bioentry_id = ?"); delete_entry.setInt(1, bioentry_id); delete_entry.executeUpdate(); delete_entry.close(); } | delete_biosequence.setInt(1, bioentry_id); delete_biosequence.executeUpdate(); delete_biosequence.close(); } PreparedStatement delete_entry = conn.prepareStatement("delete from bioentry where bioentry_id = ?"); delete_entry.setInt(1, bioentry_id); int status = delete_entry.executeUpdate(); if (status < 1) { System.out... | private void _removeSequence(String id) throws BioException, ChangeVetoException { Sequence seq = (Sequence) sequencesByName.get(id); if (seq != null) { seq = null; // Don't want to be holding the reference ourselves! try { Thread.sleep(100L); ... |
} else if (legacy.containsTerm(ts.toLowerCase())) { return ontologySQL.termID(legacy.getTerm(ts.toLowerCase())); } else if (legacy.containsTerm(ts.toUpperCase())) { return ontologySQL.termID(legacy.getTerm(ts.toUpperCase())); | int intern_ontology_term(Connection conn, String s) throws SQLException { Ontology legacy = ontologySQL.getLegacyOntology(); String ts = s.trim(); // Hack for schema change if (legacy.containsTerm(ts)) { return ontologySQL.termID(legacy.getTerm(ts)); // Same ter... | |
" (seqfeature left outer join seqfeature_relationship " + " on seqfeature.seqfeature_id = seqfeature_relationship.parent_seqfeature_id) " + | " seqfeature left outer join seqfeature_relationship " + " on seqfeature.seqfeature_id = seqfeature_relationship.parent_seqfeature_id " + | public void retrieveFeatures(int bioentry_id, SeqIOListener listener, Location topLevelOverlappingRegion, int immediateChildrenOfParent, int featureID) throws SQLException, BioException { Connection conn = seqDB.getPool().takeConnection(); Map fmap = new HashMap(); Map qmap = new HashMap... |
private BioSQLSequence(BioSQLSequenceDB seqDB, String name, int bioentry_id, String alphaName) | BioSQLSequence(BioSQLSequenceDB seqDB, String name, int bioentry_id, int biosequence_id, String alphaName, int length) | private BioSQLSequence(BioSQLSequenceDB seqDB, String name, int bioentry_id, String alphaName) throws BioException { this.seqDB = seqDB; this.name = name; this.bioentry_id = bioentry_id; this.biosequence_id = biosequence_id; try { this.alphabet = AlphabetManager.alphabetForName(alphaName.toUpp... |
this.length = length; | private BioSQLSequence(BioSQLSequenceDB seqDB, String name, int bioentry_id, String alphaName) throws BioException { this.seqDB = seqDB; this.name = name; this.bioentry_id = bioentry_id; this.biosequence_id = biosequence_id; try { this.alphabet = AlphabetManager.alphabetForName(alphaName.toUpp... | |
String message = strings().getString(HJBStrings.PROVIDER_ALREADY_REGISTERED, provider.getName()); LOG.warn(message); | if (LOG.isDebugEnabled()) { String message = strings().getString(HJBStrings.PROVIDER_ALREADY_REGISTERED, provider.getName()); LOG.debug(message); } | public void addProvider(Hashtable environment) { synchronized (providers) { HJBProvider provider = new ProviderBuilder(environment).createProvider(); if (isTheSameProviderAlreadyRegistered(provider)) { String message = strings().getString(HJBStrings.PROVIDER_ALREADY_REGIS... |
KarmaStatus karma = new KarmaStatus(); karma.setKarmaPoints(rs.getInt("user_karma")); u.setKarma( karma ); | protected List processSelectAll(ResultSet rs) throws Exception { List list = new ArrayList(); while (rs.next()) { User u = new User(); u.setEmail(rs.getString("user_email")); u.setId(rs.getInt("user_id")); u.setTotalPosts(rs.getInt("user_posts")); u.setRegistrationDate(rs.getTimestamp("user_regdate")); ... | |
public static int findCommand(String input, String command, int fromIndex) { return findCommand (new StringLatexText(input), command, fromIndex); | private static int findCommand(ILatexText input, String command, int fromIndex) { int pos = input.indexOf(command, fromIndex); while (pos != -1) { try { if (testForCommand(input, command.length(), pos)) return pos; } catch (BadLocationException e) { TexlipsePlugin.log("Error", e); } pos = input.indexOf(command, pos + ... | public static int findCommand(String input, String command, int fromIndex) { return findCommand (new StringLatexText(input), command, fromIndex); } |
DoubleQuoteInserter() { | public DoubleQuoteInserter() { | DoubleQuoteInserter() { } |
testConnection = new HJBConnection(aConnection); | testConnection = new HJBConnection(aConnection, 0); | protected void updateConnectionMock(Session aSession) { mockConnection = connectionBuilder.createMockConnection(aSession); mockConnection.stubs().method("setExceptionListener"); Connection aConnection = (Connection) mockConnection.proxy(); testConnection = new HJBConnection(aConnection);... |
public Mock createMockConnection(Session testSession) { Mock result = new Mock(Connection.class); result.stubs().method("setExceptionListener"); result.stubs().method("getClientID").will(new ReturnStub(null)); result.stubs() .method("createSession") .will(new ReturnStub(testSession)); return result; | public Mock createMockConnection() { return createMockConnection((Session) sessionBuilder.createMockSession() .proxy()); | public Mock createMockConnection(Session testSession) { Mock result = new Mock(Connection.class); result.stubs().method("setExceptionListener"); result.stubs().method("getClientID").will(new ReturnStub(null)); result.stubs() .method("createSession") .will(new Return... |
public HJBConnection(Connection theConnection) { | public HJBConnection(Connection theConnection, int connectionIndex) { | public HJBConnection(Connection theConnection) { if (null == theConnection) { throw new IllegalArgumentException(strings().needsANonNull(Connection.class.getName())); } this.theConnection = theConnection; this.queueBrowsers = new HJBSessionQueueBrowsers(this); this.sess... |
this.connectionIndex = connectionIndex; | public HJBConnection(Connection theConnection) { if (null == theConnection) { throw new IllegalArgumentException(strings().needsANonNull(Connection.class.getName())); } this.theConnection = theConnection; this.queueBrowsers = new HJBSessionQueueBrowsers(this); this.sess... | |
word |= (int) p << ((int) wordLength * packing.wordSize() - 1); | word |= (int) p << ((int) (wordLength - 1) * packing.wordSize()); | public static int nextWord( SymbolList symList, int word, int offset, int wordLength, Packing packing ) throws IllegalSymbolException { word = word >> (int) packing.wordSize(); int p = packing.pack(symList.symbolAt(offset)); word |= (int) p << ((int) wordLength * packing.wordSize() - 1); r... |
rootLabel.replaceAll("/", "."), IProgramElement.Kind.FILE_JAVA, | rootLabel, IProgramElement.Kind.PROJECT, | public static void preBuild(CaesarJAsmManager asmManager) { String rootLabel = "<root>"; //$NON-NLS-1$ IHierarchy hierarchy = asmManager.getHierarchy(); hierarchy.setRoot( new ProgramElement( rootLabel.replaceAll("/", "."), IProgramElement.Kind.FILE_JAVA, ... |
if (self.getPackageName() != null) { | if (self.getPackageName() == null) { Iterator it = asmManager.getHierarchy().getRoot().getChildren().iterator(); while(it.hasNext()) { CaesarProgramElement child = (CaesarProgramElement) it.next(); if (child.getSourceLocation().getSourceFile().equals(file)) { ((ProgramElement) asmManager.getHierarchy().getRoot()).rem... | 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, 0, ... |
}else{ Iterator it = asmManager.getHierarchy().getRoot().getChildren().iterator(); while(it.hasNext()) { CaesarProgramElement child = (CaesarProgramElement) it.next(); if (child.getSourceLocation().getSourceFile().equals(file)) { ((ProgramElement) asmManager.getHierarchy().getRoot()).removeChild(child); } } getCurre... | 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, 0, ... | |
pkgName.replaceAll("/", "."), | 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, 0, ... |
public CaesarProgramElement( String signature, Kind kind, int modifiers, ISourceLocation sourceLocation, List children, List parameters, String returnType, String type) { super ( signature, convertKind(kind), children); this.sourceLocation = sourceLocation; this.kind = kind; this.setAccessibility(genAccessibility(mod... | public CaesarProgramElement() { super(); } | public CaesarProgramElement( String signature, Kind kind, int modifiers, ISourceLocation sourceLocation, List children, List parameters, String returnType, String type) {/* super( signature, convertKind(kind), sourceLocation, modifiers, "", // fo... |
if (!(loc instanceof Location)) loc = RichLocation.Tools.enrich(loc); | if (!(loc instanceof RichLocation)) loc = RichLocation.Tools.enrich(loc); | public void setLocation(Location loc) throws ChangeVetoException { if (loc==null) throw new IllegalArgumentException("Location cannot be null"); if (!(loc instanceof Location)) loc = RichLocation.Tools.enrich(loc); if(!this.hasListeners(RichFeature.LOCATION)) { this.location = (RichL... |
String name = ((File) i.next()).getName(); | String name = (String) i.next(); | public void testGetFiles() { Set files = emblCDIndexStore.getFiles(); Set names = new HashSet(); names.add("protDB1.aa"); names.add("protDB2.aa"); names.add("protDB3.aa"); for (Iterator i = files.iterator(); i.hasNext();) { String name = ((File) i.next(... |
pathPrefix = new File(""); | public EmblCDROMIndexStore(File divisionLkp, File entryNamIdx, SequenceFormat format, SequenceBuilderFactory factory, SymbolParser parser) ... | |
return indx; | if(symbols[indx] == s) { return indx; } for( int i = indx; i < symbols.length && hashes[i] == hashes[indx]; i++ ) { if(symbols[i].equals(s)) { return i; } } for( int i = indx-1; i >= 0 && hashes[i] == hashes[indx]; i-- ) { if(symbols[i].equals(s)) { return i; } } getAlphabet().validate(s); if(s instanceof Atomic... | public int indexForSymbol(Symbol s) throws IllegalSymbolException { int indx = Arrays.binarySearch(hashes, s.hashCode()); if(indx < 0) { getAlphabet().validate(s); if(s instanceof AtomicSymbol) { throw new BioError( "Assertion Failure: " + "Symbol " + s.getName() + " was not ... |
if(r instanceof MagicalState) | if(r == MagicalState.MAGICAL_RESIDUE) | public double getWeight(Residue r) throws IllegalResidueException { if(r instanceof MagicalState) return Double.NEGATIVE_INFINITY; alphabet().validate(r); return score[calcIndex(r)]; } |
if(r instanceof MagicalState) | if(r == MagicalState.MAGICAL_RESIDUE) | public void setWeight(Residue r, double score) throws IllegalResidueException { if(r instanceof MagicalState) return; alphabet().validate(r); this.score[calcIndex(r)] = score; } |
final static public Residue forIndex(int index) throws IllegalResidueException { | final static public Residue forIndex(int index) throws IndexOutOfBoundsException { | final static public Residue forIndex(int index) throws IllegalResidueException { if(index == 0) return a; else if(index == 1) return g; else if(index == 2) return c; else if(index == 3) return t; else throw new IllegalResidueException("No residue for index " + index); } |
else throw new IllegalResidueException("No residue for index " + index); | else throw new IndexOutOfBoundsException("No residue for index " + index); | final static public Residue forIndex(int index) throws IllegalResidueException { if(index == 0) return a; else if(index == 1) return g; else if(index == 2) return c; else if(index == 3) return t; else throw new IllegalResidueException("No residue for index " + index); } |
if (Enum.class.isAssignableFrom(filtParam.getClass())) { Enum[] values = EnumUtils.getValues(filtParam.getClass()); | Enum[] values = (Enum[])filtParam.getType().getEnumConstants(); if (values != null) | void initEnumValues() { this.enumValues = new HashMap<String, Enum[]>(); for (FilterParameter filtParam: this.filter.getParameters()) { if (Enum.class.isAssignableFrom(filtParam.getClass())) { Enum[] values = EnumUtils.getValues(filtParam.getClass()); this.enumValues.put(filtParam.getName... |
} | void initEnumValues() { this.enumValues = new HashMap<String, Enum[]>(); for (FilterParameter filtParam: this.filter.getParameters()) { if (Enum.class.isAssignableFrom(filtParam.getClass())) { Enum[] values = EnumUtils.getValues(filtParam.getClass()); this.enumValues.put(filtParam.getName... | |
model.setError(param.getName(), ex.getMessage()); | model.setError(param.getName(), ex.toString()); | public void execute() throws Exception { Model model = (Model)this.getCtx().getModel(); // This is specially required because BeanUtils doesn't have an escaping mechanism this.populateFormMap(model.form); // We need to convert each of the form data fields to the natural type. // To do that, we need to know th... |
} else { if (param.getType().equals(Boolean.class) || param.getType().equals(Boolean.TYPE)) args.put(param.getName(), Boolean.FALSE); | public void execute() throws Exception { Model model = (Model)this.getCtx().getModel(); // This is specially required because BeanUtils doesn't have an escaping mechanism this.populateFormMap(model.form); // We need to convert each of the form data fields to the natural type. // To do that, we need to know th... | |
setText(subsection ? "Insert section" : "Insert chapter"); | setText(subsection ? "Insert section comment" : "Insert chapter comment"); | protected SectioningCommentAction(SchemeEditor editor, boolean subsection) { mEditor = editor; mSubsection = subsection; setText(subsection ? "Insert section" : "Insert chapter"); setToolTipText(subsection ? "Insert section comment" : "Insert chapter comment"); } |
protected void addPm(PrivateMessage pm, PreparedStatement p) throws Exception | protected void addPm(PrivateMessage pm, PreparedStatement p) throws SQLException | protected void addPm(PrivateMessage pm, PreparedStatement p) throws Exception { p.setInt(1, PrivateMessageType.SENT); p.setString(2, pm.getPost().getSubject()); p.setInt(3, pm.getFromUser().getId()); p.setInt(4, pm.getToUser().getId()); p.setTimestamp(5, new Timestamp(pm.getPost().getTime().getTime())); p.setInt... |
protected void addPmText(PrivateMessage pm) throws Exception | protected void addPmText(PrivateMessage pm) throws SQLException | protected void addPmText(PrivateMessage pm) throws Exception { PreparedStatement text = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("PrivateMessagesModel.addText")); text.setInt(1, pm.getId()); text.setString(2, pm.getPost().getText()); text.executeUpdate(); text.close(); ... |
public void delete(PrivateMessage[] pm) throws Exception | public void delete(PrivateMessage[] pm) | public void delete(PrivateMessage[] pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.delete")); p.setInt(2, pm[0].getFromUser().getId()); p.setInt(3, pm[0].getFromUser().getId()); PreparedStatement deleteText = JForumEx... |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.delete")); p.setInt(2, pm[0].getFromUser().getId()); p.setInt(3, pm[0].getFromUser().getId()); PreparedStatement deleteText = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.get... | PreparedStatement p=null; PreparedStatement deleteText=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.delete")); p.setInt(2, pm[0].getFromUser().getId()); p.setInt(3, pm[0].getFromUser().getId()); deleteText = JForumExecutionContext.getConnection().pre... | public void delete(PrivateMessage[] pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.delete")); p.setInt(2, pm[0].getFromUser().getId()); p.setInt(3, pm[0].getFromUser().getId()); PreparedStatement deleteText = JForumEx... |
protected PrivateMessage getPm(ResultSet rs) throws Exception | protected PrivateMessage getPm(ResultSet rs) throws SQLException | protected PrivateMessage getPm(ResultSet rs) throws Exception { return this.getPm(rs, true); } |
protected String getPmText(ResultSet rs) throws Exception | protected String getPmText(ResultSet rs) throws SQLException | protected String getPmText(ResultSet rs) throws Exception { return rs.getString("privmsgs_text"); } |
public PrivateMessage selectById(PrivateMessage pm) throws Exception | public PrivateMessage selectById(PrivateMessage pm) | public PrivateMessage selectById(PrivateMessage pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.selectById")); p.setInt(1, pm.getId()); ResultSet rs = p.executeQuery(); if (rs.next()) { pm = this.getPm(rs); } rs.... |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.selectById")); p.setInt(1, pm.getId()); ResultSet rs = p.executeQuery(); if (rs.next()) { pm = this.getPm(rs); } rs.close(); p.close(); return pm; } | PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.selectById")); p.setInt(1, pm.getId()); rs = p.executeQuery(); if (rs.next()) { pm = this.getPm(rs); } return pm; } catch (SQLException e) { String es = "Erorr selec... | public PrivateMessage selectById(PrivateMessage pm) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("PrivateMessageModel.selectById")); p.setInt(1, pm.getId()); ResultSet rs = p.executeQuery(); if (rs.next()) { pm = this.getPm(rs); } rs.... |
public List selectFromInbox(User user) throws Exception | public List selectFromInbox(User user) | public List selectFromInbox(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.inbox")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt... |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, user.getId()); List pmList = new ArrayList(); | PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, user.getId()); | public List selectFromInbox(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.inbox")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt... |
ResultSet rs = p.executeQuery(); while (rs.next()) { PrivateMessage pm = this.getPm(rs, false); User fromUser = new User(); fromUser.setId(rs.getInt("user_id")); fromUser.setUsername(rs.getString("username")); pm.setFromUser(fromUser); pmList.add(pm); } rs.close(); p.close(); return pmList; } | List pmList = new ArrayList(); rs = p.executeQuery(); while (rs.next()) { PrivateMessage pm = this.getPm(rs, false); User fromUser = new User(); fromUser.setId(rs.getInt("user_id")); fromUser.setUsername(rs.getString("username")); pm.setFromUser(fromUser); pmList.add(pm); } return pmList; } catch (SQLException e) ... | public List selectFromInbox(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.inbox")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt... |
public List selectFromSent(User user) throws Exception | public List selectFromSent(User user) | public List selectFromSent(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.sent")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1... |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, user.getId()); List pmList = new ArrayList(); | PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, user.getId()); | public List selectFromSent(User user) throws Exception { String query = SystemGlobals.getSql("PrivateMessageModel.baseListing"); query = query.replaceAll("#FILTER#", SystemGlobals.getSql("PrivateMessageModel.sent")); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.