rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
if (countChar(featureBuf, '"') % 2 == 0) { | int eq = featureBuf.indexOf("="); if (featureBuf.charAt(eq + 1) != '"' || featureBuf.charAt(featureBuf.length() - 1) == '"' ) { | public void featureData(String line) throws BioException { switch (featureStatus) { case LOCATION: featureBuf.append(line); if (countChar(featureBuf, '(') == countChar(featureBuf, ')')) { featureTemplate = locParser.parseLocation(featureBuf.substrin... |
if (enemiesRemaining == 0) { | if (enemiesRemaining == 0 && !robotPeer.isWinner()) { | public void scoreDeath(int enemiesRemaining) { if (enemiesRemaining == 0) { totalFirsts++; } if (enemiesRemaining == 1) { totalSeconds++; } else if (enemiesRemaining == 2) { totalThirds++; } } |
connection = DriverManager.getConnection(SystemGlobals.getValue(CONF_CONNECTION)); | connection = DriverManager.getConnection(SystemGlobals.getValue(ConfigKeys.EXTERNAL_CONNECTION)); | public JdbcLoginServer() throws SQLException { connection = DriverManager.getConnection(SystemGlobals.getValue(CONF_CONNECTION)); validateLoginStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_QUERY_VALIDATE_LOGIN)); selectNameStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_Q... |
validateLoginStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_QUERY_VALIDATE_LOGIN)); selectNameStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_QUERY_SELECT_NAME)); selectGroupsStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_QUERY_SELECT_GROUPS)); | validateLoginStatement = connection.prepareStatement(SystemGlobals.getValue(ConfigKeys.EXTERNAL_QUERY_VALIDATE_LOGIN)); selectNameStatement = connection.prepareStatement(SystemGlobals.getValue(ConfigKeys.EXTERNAL_QUERY_SELECT_NAME)); selectGroupsStatement = connection.prepareStatement(SystemGlobals.getValue(ConfigKeys.... | public JdbcLoginServer() throws SQLException { connection = DriverManager.getConnection(SystemGlobals.getValue(CONF_CONNECTION)); validateLoginStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_QUERY_VALIDATE_LOGIN)); selectNameStatement = connection.prepareStatement(SystemGlobals.getValue(CONF_Q... |
public boolean inject(String fromAddress, String toAddress, InputStream mailData) throws MessagingException, IOException | public boolean inject(String fromAddress, String toAddress, byte[] mailData) throws MessagingException, IOException | public boolean inject(String fromAddress, String toAddress, InputStream mailData) throws MessagingException, IOException { if (log.isDebugEnabled()) log.debug("Injecting message sent to " + toAddress); InternetAddress fromAddy = new InternetAddress(fromAddress); InternetAddress toAddy = new InternetAddress(toAd... |
if (log.isDebugEnabled()) log.debug("Injecting message sent to " + toAddress); InternetAddress fromAddy = new InternetAddress(fromAddress); InternetAddress toAddy = new InternetAddress(toAddress); VERPAddress verp = VERPAddress.getVERPBounce(toAddy); if (verp != null) { this.handleBounce(verp); return true; } Maili... | return this.inject(fromAddress, toAddress, new ByteArrayInputStream(mailData)); | public boolean inject(String fromAddress, String toAddress, InputStream mailData) throws MessagingException, IOException { if (log.isDebugEnabled()) log.debug("Injecting message sent to " + toAddress); InternetAddress fromAddy = new InternetAddress(fromAddress); InternetAddress toAddy = new InternetAddress(toAd... |
DebugUtil.DEBUG = false; | private void testWithLinkedBlockingQueue(int index) throws Exception { long startTime = System.currentTimeMillis(); if (index == 0) { for (int i = 0; i < NUM_OF_ITEMS; i++) { System.err.println("Putting task " + i); FutureTask task = new MyFutureTask(new MyCallable(i)); workerQueue.put... | |
dm.delegate(b.handlerFactory.getHandler(this)); | dm.delegate(b.handlerFactory.getHandler(staxenv)); | public void startElement( String nsURI, String localName, String qName, Attributes attrs, DelegationManager dm) throws SAXException { level++; // perform delegation // we must delegate only on features that are directly attached... |
try { logger.info("Reloading "+ filename); SystemGlobals.loadQueries(filename); | logger.info("Reloading "+ filename); SystemGlobals.loadQueries(filename); | public void fileChanged(String filename) { try { logger.info("Reloading "+ filename); SystemGlobals.loadQueries(filename); String driverQueries = SystemGlobals.getValue(ConfigKeys.SQL_QUERIES_DRIVER); // Force reload of driver specific queries if (!filename.equals(driverQueries)) { SystemGlobals.lo... |
if (!filename.equals(driverQueries)) { SystemGlobals.loadQueries(driverQueries); } } catch (IOException e) { logger.info(e); } | if (!filename.equals(driverQueries)) { SystemGlobals.loadQueries(driverQueries); } | public void fileChanged(String filename) { try { logger.info("Reloading "+ filename); SystemGlobals.loadQueries(filename); String driverQueries = SystemGlobals.getValue(ConfigKeys.SQL_QUERIES_DRIVER); // Force reload of driver specific queries if (!filename.equals(driverQueries)) { SystemGlobals.lo... |
return outerPrefix.replaceAll("\\$", "_")+ident; | return ident; | public String convertToMixinClassName() { return outerPrefix.replaceAll("\\$", "_")+ident; } |
setFault(e); | recordFault(e); | public void execute() { assertNotCompleted(); try { createConnectionAndReturnItsIndex(); } catch (RuntimeException e) { setFault(e); } completed(); } |
public static Object createRoot(String xml) { if (R == null) return null; try { if (xml == null) return R.exec("new OMENode()"); else { R.setVar("xml", xml); return R.exec("new OMENode(xml)"); } } catch (ReflectException exc) { } return null; } | public static Object createRoot() { return createRoot(null); } | public static Object createRoot(String xml) { if (R == null) return null; try { if (xml == null) return R.exec("new OMENode()"); else { R.setVar("xml", xml); return R.exec("new OMENode(xml)"); } } catch (ReflectException exc) { } return null; } |
new RegexSplitter(Pattern.compile("(\\(-?\\d/-?\\d+\\)|[A-Za-z^]+)"), 1); | new RegexSplitter(Pattern.compile("(\\(-?\\d+/-?\\d+\\)|[A-Za-z^]+)"), 1); | private static void loadData(InputStream is) { nameToEnzyme = new HashMap(); nameToIsoschizomers = new HashMap(); sizeToCutters = new HashMap(); enzymeToPattern = new HashMap(); enzymeToAnnotation = new HashMap(); try { BufferedReader ... |
if ( parts.length >= 8 ) | if ( parts.length >= 7 ) | public List getFileList( String destinationDirectory ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { try { String path = getPath( getRepository().getBasedir(), destinationDirectory ); Streams streams = executeCommand( "ls -la " ... |
ret.add( parts[8] ); | ret.add( parts[7] ); | public List getFileList( String destinationDirectory ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { try { String path = getPath( getRepository().getBasedir(), destinationDirectory ); Streams streams = executeCommand( "ls -la " ... |
assertEquals(1, this.smtp.size()); | assertEquals(1, this.smtp.count(MailType.YOU_SUBSCRIBED)); | public void testHasVERP() throws Exception { this.admin.getAdmin().log("############### Starting testHasVERP()"); // Two "you are subscribed" msg assertEquals(1, this.smtp.size()); byte[] rawMsg = this.createMessage(this.person1.getAddress(), this.ml.getAddress()); this.injector.inject(this.person1.getAddre... |
assertEquals(2, this.smtp.size()); WiserMessage msg = this.smtp.get(1); | assertEquals(1, this.smtp.countSubject(TEST_SUBJECT)); WiserMessage msg = this.smtp.getSubject(TEST_SUBJECT, 0); | public void testHasVERP() throws Exception { this.admin.getAdmin().log("############### Starting testHasVERP()"); // Two "you are subscribed" msg assertEquals(1, this.smtp.size()); byte[] rawMsg = this.createMessage(this.person1.getAddress(), this.ml.getAddress()); this.injector.inject(this.person1.getAddre... |
String envelopeSender = msg.getEnvelopeSender(); assertTrue(envelopeSender.contains("-verp-")); | public void testHasVERP() throws Exception { this.admin.getAdmin().log("############### Starting testHasVERP()"); // Two "you are subscribed" msg assertEquals(1, this.smtp.size()); byte[] rawMsg = this.createMessage(this.person1.getAddress(), this.ml.getAddress()); this.injector.inject(this.person1.getAddre... | |
assertEquals(2, this.smtp.size()); | assertEquals(2, this.smtp.count(MailType.YOU_SUBSCRIBED)); | public void testTrivialInjection() throws Exception { // Create a second subscriber to make it more interesting PersonMixin person2 = new PersonMixin(this.admin); person2.getAccountMgr().subscribeMe(this.ml.getId(), person2.getEmail()); this.admin.getAdmin().log("############### Starting testTrivialInjection()")... |
public EmailAddress(Person person, String email) { if (log.isDebugEnabled()) log.debug("Creating new EmailAddress"); this.setId(email); this.setPerson(person); } | public EmailAddress() {} | public EmailAddress(Person person, String email) { if (log.isDebugEnabled()) log.debug("Creating new EmailAddress"); this.setId(email); this.setPerson(person); } |
public Person(String password, String name) { if (log.isDebugEnabled()) log.debug("Creating new person"); this.setPassword(password); this.setName(name); this.emailAddresses = new HashMap<String, EmailAddress>(); this.subscriptions = new HashMap<Long, Subscription>(); this.heldSubscriptions = new HashMap<Long, Subsc... | public Person() {} | public Person(String password, String name) { if (log.isDebugEnabled()) log.debug("Creating new person"); // These are validated normally. this.setPassword(password); this.setName(name); this.emailAddresses = new HashMap<String, EmailAddress>(); this.subscriptions = new HashMap<Long, Subscription>(); this... |
protected static void dropSchema(Connection connection) throws IOException, SQLException { | protected void dropSchema(Connection connection) throws IOException, SQLException { | protected static void dropSchema(Connection connection) throws IOException, SQLException { if (DROP_SQL == null) { BufferedReader br = new BufferedReader(new InputStreamReader(ClassLoader.getSystemClassLoader().getResourceAsStream("files/drop-biosqldb-hsqldb.sql"))); DROP_SQL = readAll(... |
protected static Connection getConnection() throws SQLException { | protected Connection getConnection() throws SQLException { | protected static Connection getConnection() throws SQLException { return DriverManager.getConnection(DB_URL, DB_USER, DB_PW); } |
protected static void loadSchema(Connection connection) throws IOException, SQLException { | protected void loadSchema(Connection connection) throws IOException, SQLException { | protected static void loadSchema(Connection connection) throws IOException, SQLException { if (CREATE_SQL == null) { BufferedReader br = new BufferedReader(new InputStreamReader(ClassLoader.getSystemClassLoader().getResourceAsStream(DB_CREATE_RESOURCE))); CREATE_SQL = readAll(br); ... |
setTitle( getTitle() + " - "+res.getString("VERSION")+" " + PACKAGE.getImplementationVersion() ); | String version = JavaImageAlbumFrame.class.getPackage().getImplementationVersion(); setTitle( getTitle() + " - "+res.getString("VERSION")+" " + version ); | public JavaImageAlbumFrame( ) { initComponents(); setIconImage( new javax.swing.ImageIcon( getClass().getResource( "/com/javaimagealbum/images/icon.png") ).getImage()); pack(); setTitle( getTitle() + " - "+res.getString("VERSIO... |
PACKAGE.getImplementationVersion() ); | version ); | public JavaImageAlbumFrame( ) { initComponents(); setIconImage( new javax.swing.ImageIcon( getClass().getResource( "/com/javaimagealbum/images/icon.png") ).getImage()); pack(); setTitle( getTitle() + " - "+res.getString("VERSIO... |
Settings.getInstance().setProperty( Constants.LICENSE_AGREED, PACKAGE.getImplementationVersion() ); | Settings.getInstance().setProperty( Constants.LICENSE_AGREED, version ); | public JavaImageAlbumFrame( ) { initComponents(); setIconImage( new javax.swing.ImageIcon( getClass().getResource( "/com/javaimagealbum/images/icon.png") ).getImage()); pack(); setTitle( getTitle() + " - "+res.getString("VERSIO... |
case SeqIOConstants.FASTA: | public static void biojavaToFile(int fileType, OutputStream os, Object biojava) throws BioException, IOException, IllegalSymbolException { switch (fileType) { case AlignIOConstants.MSF_DNA: case AlignIOConstants.MSF_AA: case AlignIOC... | |
case SeqIOConstants.EMBL: case SeqIOConstants.GENBANK: | case SeqIOConstants.EMBL_DNA: case SeqIOConstants.GENBANK_DNA: | public static void biojavaToFile(int fileType, OutputStream os, Object biojava) throws BioException, IOException, IllegalSymbolException { switch (fileType) { case AlignIOConstants.MSF_DNA: case AlignIOConstants.MSF_AA: case AlignIOC... |
case AlignIOConstants.MSF: | private static Alignment fileToAlign(int fileType, BufferedReader br) throws BioException { switch(fileType) { case AlignIOConstants.MSF: case AlignIOConstants.MSF_DNA: case AlignIOConstants.MSF_AA: return (new MSFAlignmentFormat()).read(br); ... | |
case AlignIOConstants.MSF: | public static Object fileToBiojava(int fileType, BufferedReader br) throws BioException { switch (fileType) { case AlignIOConstants.MSF: case AlignIOConstants.MSF_DNA: case AlignIOConstants.MSF_AA: case AlignIOConstants.FASTA_DNA: case AlignIOCons... | |
case SeqIOConstants.EMBL: case SeqIOConstants.GENBANK: | case SeqIOConstants.EMBL_DNA: case SeqIOConstants.GENBANK_DNA: | public static Object fileToBiojava(int fileType, BufferedReader br) throws BioException { switch (fileType) { case AlignIOConstants.MSF: case AlignIOConstants.MSF_DNA: case AlignIOConstants.MSF_AA: case AlignIOConstants.FASTA_DNA: case AlignIOCons... |
case SeqIOConstants.EMBL: | case SeqIOConstants.EMBL_DNA: | private static SequenceIterator fileToSeq(int fileType, BufferedReader br) throws BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: return SeqIOTools.readFastaDNA(br); case SeqIOConstants.FASTA_AA: ... |
case SeqIOConstants.GENBANK: | case SeqIOConstants.GENBANK_DNA: | private static SequenceIterator fileToSeq(int fileType, BufferedReader br) throws BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: return SeqIOTools.readFastaDNA(br); case SeqIOConstants.FASTA_AA: ... |
throw new BioException("Unknown file type '" | throw new BioException("No FiniteAlphabet available for " + "alphabet identifier '" | public static FiniteAlphabet getAlphabet(int identifier) throws BioException { // Mask the sequence format bytes int alphaType = identifier & (~ 0xffff); switch (alphaType) { case SeqIOConstants.DNA: return DNATools.getDNA(); case SeqIOConstants.RNA: ... |
+ "' which indicates alphabet type '" + alphaType | public static FiniteAlphabet getAlphabet(int identifier) throws BioException { // Mask the sequence format bytes int alphaType = identifier & (~ 0xffff); switch (alphaType) { case SeqIOConstants.DNA: return DNATools.getDNA(); case SeqIOConstants.RNA: ... | |
case SeqIOConstants.EMBL: | public static SequenceBuilderFactory getBuilderFactory(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return getFastaBuilderFactory(); cas... | |
case SeqIOConstants.GENBANK: | public static SequenceBuilderFactory getBuilderFactory(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return getFastaBuilderFactory(); cas... | |
throw new BioException("Unknown file type '" | throw new BioException("No SequenceBuilderFactory available for " + "format/alphabet identifier '" | public static SequenceBuilderFactory getBuilderFactory(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return getFastaBuilderFactory(); cas... |
case SeqIOConstants.EMBL: | public static SequenceFormat getSequenceFormat(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return new FastaFormat(); case SeqIOConstant... | |
case SeqIOConstants.GENBANK: | public static SequenceFormat getSequenceFormat(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return new FastaFormat(); case SeqIOConstant... | |
throw new BioException("Unknown file type '" | throw new BioException("No SequenceFormat available for " + "format/alphabet identifier '" | public static SequenceFormat getSequenceFormat(int identifier) throws BioException { switch (identifier) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_RNA: case SeqIOConstants.FASTA_AA: return new FastaFormat(); case SeqIOConstant... |
return SeqIOConstants.EMBL; | return SeqIOConstants.EMBL_DNA; | public static int guessFileType(File seqFile) throws IOException, FileNotFoundException { //First tries by matching an extension String fileName = seqFile.getName(); try { if ((new RE(".*\\u002eem.*")).match(fileName)) { return SeqIOConstants.EMBL; } ... |
return SeqIOConstants.GENBANK; | return SeqIOConstants.GENBANK_DNA; | public static int guessFileType(File seqFile) throws IOException, FileNotFoundException { //First tries by matching an extension String fileName = seqFile.getName(); try { if ((new RE(".*\\u002eem.*")).match(fileName)) { return SeqIOConstants.EMBL; } ... |
if (formatName.equalsIgnoreCase("raw")) | if (formatName.equalsIgnoreCase("raw")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("fasta")) | } else if (formatName.equalsIgnoreCase("fasta")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("nbrf")) | } else if (formatName.equalsIgnoreCase("nbrf")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("ig")) | } else if (formatName.equalsIgnoreCase("ig")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("embl")) | } else if (formatName.equalsIgnoreCase("embl")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
formatName.equalsIgnoreCase("swiss")) return SeqIOConstants.SWISSPROT; else if (formatName.equalsIgnoreCase("genbank")) | formatName.equalsIgnoreCase("swiss")) { if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) { return SeqIOConstants.SWISSPROT; } else { throw new IllegalArgumentException("Illegal format and alphabet " + "combination " + formatName + " + " + alphabetName); } } else if (formatName.equals... | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("genpept")) return SeqIOConstants.GENPEPT; else if (formatName.equalsIgnoreCase("refseq")) | } else if (formatName.equalsIgnoreCase("genpept")) { if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) { return SeqIOConstants.GENPEPT; } else { throw new IllegalArgumentException("Illegal format and alphabet " + "combination " + formatName + " + " + alphabetName); } } else if (format... | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("gcg")) | } else if (formatName.equalsIgnoreCase("gcg")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("gff")) | } else if (formatName.equalsIgnoreCase("gff")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (formatName.equalsIgnoreCase("pdb")) return SeqIOConstants.PDB; else if (formatName.equalsIgnoreCase("phred")) return SeqIOConstants.PHRED; else | } else if (formatName.equalsIgnoreCase("pdb")) { if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) { return SeqIOConstants.PDB; } else { throw new IllegalArgumentException("Illegal format and alphabet " + "combination " + formatName + " + " + alphabetName); } } else if (formatName.equ... | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
if (alphabetName.equalsIgnoreCase("dna")) | if (alphabetName.equalsIgnoreCase("dna")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (alphabetName.equalsIgnoreCase("rna")) | } else if (alphabetName.equalsIgnoreCase("rna")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) | } else if (alphabetName.equalsIgnoreCase("aa") || alphabetName.equalsIgnoreCase("protein")) { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
else | } else { | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... |
} | public static int identifyFormat(String formatName, String alphabetName) { int format, alpha; if (formatName.equalsIgnoreCase("raw")) format = SeqIOConstants.RAW; else if (formatName.equalsIgnoreCase("fasta")) format = SeqIOConstants.FASTA; else if (formatName.equal... | |
case SeqIOConstants.FASTA: | private static void seqToFile(int fileType, OutputStream os, SequenceIterator seq) throws IOException, BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_AA: case SeqIOConstants.FASTA: ... | |
case SeqIOConstants.EMBL: | case SeqIOConstants.EMBL_DNA: | private static void seqToFile(int fileType, OutputStream os, SequenceIterator seq) throws IOException, BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_AA: case SeqIOConstants.FASTA: ... |
case SeqIOConstants.GENBANK: | case SeqIOConstants.GENBANK_DNA: | private static void seqToFile(int fileType, OutputStream os, SequenceIterator seq) throws IOException, BioException { switch (fileType) { case SeqIOConstants.FASTA_DNA: case SeqIOConstants.FASTA_AA: case SeqIOConstants.FASTA: ... |
if (outline != null) { | if ( (outline != null) && ( (max - min) > 4.0) ) { | public void renderFeature( Graphics2D g, Feature f, SequenceRenderContext src ) { Shape s = null; Location loc = f.getLocation(); float min = (float) src.sequenceToGraphics(loc.getMin()); float max = (float) src.sequenceToGraphics(loc.getMax()); float depth = (float) (arrowSize + 2.0 * arrow... |
public ChangeType(String name, String className, String fieldName) { | public ChangeType(String name, Field ourField, ChangeType superType) { | public ChangeType(String name, String className, String fieldName) { this.name = name; try { Class clazz = Class.forName(className); this.ourField = clazz.getField(fieldName); } catch (Exception ex) { throw new NestedError(ex, "Couldn't find class or field " + className + "->" + ... |
try { Class clazz = Class.forName(className); this.ourField = clazz.getField(fieldName); } catch (Exception ex) { throw new NestedError(ex, "Couldn't find class or field " + className + "->" + fieldName ); } | this.ourField = ourField; this.superType = superType; | public ChangeType(String name, String className, String fieldName) { this.name = name; try { Class clazz = Class.forName(className); this.ourField = clazz.getField(fieldName); } catch (Exception ex) { throw new NestedError(ex, "Couldn't find class or field " + className + "->" + ... |
public SimpleSymbolList(Alphabet alpha, List rList) throws IllegalSymbolException { | public SimpleSymbolList(Alphabet alpha) { | public SimpleSymbolList(Alphabet alpha, List rList) throws IllegalSymbolException { this.alphabet = alpha; this.length = rList.size(); symbols = new Symbol[length]; int pos = 0; for (Iterator i = rList.iterator(); i.hasNext(); ) { symbols[pos] = (Symbol) i.ne... |
this.length = rList.size(); symbols = new Symbol[length]; int pos = 0; for (Iterator i = rList.iterator(); i.hasNext(); ) { symbols[pos] = (Symbol) i.next(); alphabet.validate(symbols[pos]); pos++; } | this.length = 0; this.symbols = new Symbol[INCREMENT]; | public SimpleSymbolList(Alphabet alpha, List rList) throws IllegalSymbolException { this.alphabet = alpha; this.length = rList.size(); symbols = new Symbol[length]; int pos = 0; for (Iterator i = rList.iterator(); i.hasNext(); ) { symbols[pos] = (Symbol) i.ne... |
Alphabet alpha = alphabetFromXML(child, nameToSymbol); | FiniteAlphabet alpha = alphabetFromXML(child, nameToSymbol); | protected AlphabetManager() { try { URL alphabetURL = getClass().getClassLoader().getResource("org/biojava/bio/symbol/AlphabetManager.xml"); InputSource is = Resolver.createInputSource(alphabetURL, true); Document doc = XmlDocument.createXmlDocument(is, true); NodeList children = doc.get... |
System.out.println(spe.toString() + | throw new BioError(spe, spe.toString() + | protected AlphabetManager() { try { URL alphabetURL = getClass().getClassLoader().getResource("org/biojava/bio/symbol/AlphabetManager.xml"); InputSource is = Resolver.createInputSource(alphabetURL, true); Document doc = XmlDocument.createXmlDocument(is, true); NodeList children = doc.get... |
spe.getColumnNumber()); System.exit(1); } catch (Exception e) { e.printStackTrace(); System.exit(1); | spe.getColumnNumber() ); } catch (Throwable t) { throw new BioError(t, "Unable to intialize AlphabetManager"); | protected AlphabetManager() { try { URL alphabetURL = getClass().getClassLoader().getResource("org/biojava/bio/symbol/AlphabetManager.xml"); InputSource is = Resolver.createInputSource(alphabetURL, true); Document doc = XmlDocument.createXmlDocument(is, true); NodeList children = doc.get... |
protected Alphabet alphabetFromXML(Element alph, Map nameToRes) { | protected FiniteAlphabet alphabetFromXML(Element alph, Map nameToRes) throws BioException { | protected Alphabet alphabetFromXML(Element alph, Map nameToRes) { SimpleAlphabet alphabet = new WellKnownAlphabet(); NodeList children = alph.getChildNodes(); for(int i = 0; i < children.getLength(); i++) { Element el = (Element) children.item(i); try { String name = el.getNodeName(); ... |
System.err.println(e.toString() + el.toString()); | throw new BioException("Couldn't parse " + alph); | protected Alphabet alphabetFromXML(Element alph, Map nameToRes) { SimpleAlphabet alphabet = new WellKnownAlphabet(); NodeList children = alph.getChildNodes(); for(int i = 0; i < children.getLength(); i++) { Element el = (Element) children.item(i); try { String name = el.getNodeName(); ... |
throws IllegalSymbolException { if(r == null) | throws IllegalSymbolException { if(r == null) { | public void addSymbol(Symbol r) throws IllegalSymbolException { if(r == null) throw new IllegalSymbolException("You can not add null as a symbol"); symbols.add(r); } |
} | public void addSymbol(Symbol r) throws IllegalSymbolException { if(r == null) throw new IllegalSymbolException("You can not add null as a symbol"); symbols.add(r); } | |
if(item.getType() == mixin) | if(item.getMixin() == mixin) | public Collection findMixinCopies(CaesarTypeNode mixin) { Collection res = new LinkedList(); // check first that passed node is not a mixin copy itself Collection typesToGen = getTypesToGenerate(); for (Iterator it = typesToGen.iterator(); it.hasNext();) {... |
qualifiedName.append(genHashCode); */ qualifiedName.append(getMixin().getQualifiedName().convertToMixinClassName()); qualifiedName.append("_Impl_Mixin_"); | public void genOuterAndQNForGeneratedTypes(Set visited) { if(visited.contains(this)) return; if(isToBeGeneratedInBytecode()) { /* * calc outer */ if(mixin.getOuter() != null) { setOuter(compilationGraph.getJava... | |
if(resList.size() != 0) { sb.append(getResidue((ResidueList) resList.get(0), col).getName()); for(int i = 1; i < resList.size(); i++) { sb.append(" " + getResidue((ResidueList) resList.get(i), col).getName()); | if(labels.size() != 0) { sb.append(residueAt(labels.get(0), col).getName()); for(int i = 1; i < labels.size(); i++) { sb.append(" " + residueAt(labels.get(i), col).getName()); | public String getName() { StringBuffer sb = new StringBuffer("("); if(resList.size() != 0) { sb.append(getResidue((ResidueList) resList.get(0), col).getName()); for(int i = 1; i < resList.size(); i++) { sb.append(" " + getResidue((ResidueList) resList.get(i), col).getName()); ... |
return getResidue((ResidueList) resList.get(indx), col); | return residueAt(getLabels().get(indx), col); | public List getResidues() { return new AbstractList() { public Object get(int indx) { return getResidue((ResidueList) resList.get(indx), col); } public int size() { return resList.size(); } }; } |
return resList.size(); | return getLabels().size(); | public List getResidues() { return new AbstractList() { public Object get(int indx) { return getResidue((ResidueList) resList.get(indx), col); } public int size() { return resList.size(); } }; } |
return getResidue((ResidueList) resList.get(indx), col); | return residueAt(getLabels().get(indx), col); | public Object get(int indx) { return getResidue((ResidueList) resList.get(indx), col); } |
return resList.size(); | return getLabels().size(); | public int size() { return resList.size(); } |
public SimpleAlignment(List resLists) throws IllegalArgumentException { this.resList = Collections.unmodifiableList(resLists); | public SimpleAlignment(Map labelToResList) throws IllegalArgumentException { this.labels = Collections.unmodifiableList(new ArrayList(labelToResList.keySet())); this.labelToResidueList = labelToResList; | public SimpleAlignment(List resLists) throws IllegalArgumentException { this.resList = Collections.unmodifiableList(resLists); length = 0; List alphaList = new ArrayList(); for(Iterator ri = resLists.iterator(); ri.hasNext(); ) { ResidueList rl = (ResidueList) ri.next(); alphaList.add(rl.alp... |
length = 0; | length = -1; | public SimpleAlignment(List resLists) throws IllegalArgumentException { this.resList = Collections.unmodifiableList(resLists); length = 0; List alphaList = new ArrayList(); for(Iterator ri = resLists.iterator(); ri.hasNext(); ) { ResidueList rl = (ResidueList) ri.next(); alphaList.add(rl.alp... |
for(Iterator ri = resLists.iterator(); ri.hasNext(); ) { ResidueList rl = (ResidueList) ri.next(); | for(Iterator li = labels.iterator(); li.hasNext(); ) { Object label = li.next(); ResidueList rl = residueListForLabel(label); | public SimpleAlignment(List resLists) throws IllegalArgumentException { this.resList = Collections.unmodifiableList(resLists); length = 0; List alphaList = new ArrayList(); for(Iterator ri = resLists.iterator(); ri.hasNext(); ) { ResidueList rl = (ResidueList) ri.next(); alphaList.add(rl.alp... |
public Alignment subAlignment(List residueLists, Location loc) { List ress = new ArrayList(); for(Iterator i = residueLists.iterator(); i.hasNext(); ) { ResidueList res = (ResidueList) i.next(); ress.add(loc.residues(res)); | public Alignment subAlignment(List residueLists, Location loc) throws NoSuchElementException { Map labelsToResList = new HashMap(); for(Iterator i = getLabels().iterator(); i.hasNext(); ) { Object label = i.next(); ResidueList res = residueListForLabel(label); labelsToResList.put(label, res); | public Alignment subAlignment(List residueLists, Location loc) { List ress = new ArrayList(); for(Iterator i = residueLists.iterator(); i.hasNext(); ) { ResidueList res = (ResidueList) i.next(); ress.add(loc.residues(res)); } return new SimpleAlignment(ress); } |
return new SimpleAlignment(ress); | return new SimpleAlignment(labelsToResList); | public Alignment subAlignment(List residueLists, Location loc) { List ress = new ArrayList(); for(Iterator i = residueLists.iterator(); i.hasNext(); ) { ResidueList res = (ResidueList) i.next(); ress.add(loc.residues(res)); } return new SimpleAlignment(ress); } |
Alignment subAlignment(List residueLists, Location loc); | Alignment subAlignment(List labels, Location loc) throws NoSuchElementException; | Alignment subAlignment(List residueLists, Location loc); |
public User validateLogin(String username, String password, Map extraParams) throws Exception | public User validateLogin(String username, String password, Map extraParams) | public User validateLogin(String username, String password, Map extraParams) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.login")); p.setString(1, username); p.setString(2, MD5.crypt(password)); User user = null; ResultSet... |
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.login")); p.setString(1, username); p.setString(2, MD5.crypt(password)); User user = null; ResultSet rs = p.executeQuery(); if (rs.next() && rs.getInt("user_id") > 0) { user = this.userModel.selectById(rs.ge... | User user = null; ResultSet rs=null; PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.login")); p.setString(1, username); p.setString(2, MD5.crypt(password)); | public User validateLogin(String username, String password, Map extraParams) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.login")); p.setString(1, username); p.setString(2, MD5.crypt(password)); User user = null; ResultSet... |
rs.close(); p.close(); if (user != null && !user.isDeleted() && (user.getActivationKey() == null || user.isActive())) { | rs = p.executeQuery(); if (rs.next() && rs.getInt("user_id") > 0) { user = this.userModel.selectById(rs.getInt("user_id")); } } catch (SQLException e) { String es = "Erorr update()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(rs, p); } if (user != null && !user.isDeleted() && (user.... | public User validateLogin(String username, String password, Map extraParams) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement( SystemGlobals.getSql("UserModel.login")); p.setString(1, username); p.setString(2, MD5.crypt(password)); User user = null; ResultSet... |
public Object execute() throws Exception; | public Object execute() ; | public Object execute() throws Exception; |
structure = struc ; | structure = struc ; printConnections = true; | public FileConvert(Structure struc) { structure = struc ; } |
HashMap con = (HashMap)cons.get(cnr); Integer as = (Integer)con.get("atomserial"); int atomserial = as.intValue(); ArrayList atomids = new ArrayList() ; if (con.containsKey("salt1")) atomids.add(con.get("salt1")); if (con.containsKey("salt2")) atomids.add(con.get("salt2")); if (atomids.size()!=0){ addConnection(xw... | HashMap con = (HashMap)cons.get(cnr); Integer as = (Integer)con.get("atomserial"); int atomserial = as.intValue(); ArrayList atomids = new ArrayList() ; if (con.containsKey("salt1")) atomids.add(con.get("salt1")); if (con.containsKey("salt2")) atomids.add(con.get("salt2")); if (atomids.size()!=0){ addConnection(xw... | public void toDASStructure(XMLWriter xw) throws IOException { /*xmlns="http://www.sanger.ac.uk/xml/das/2004/06/17/dasalignment.xsd" xmlns:align="http://www.sanger.ac.uk/xml/das/2004/06/17/alignment.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:schemaLocation="http://www.sanger.ac.uk/xml/das/200... |
StringBuffer str = new StringBuffer(); DecimalFormat d3 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d3.setMaximumIntegerDigits(3); d3.setMinimumFractionDigits(3); d3.setMaximumFractionDigits(3); DecimalFormat d2 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d2.setMaximumInteger... | StringBuffer str = new StringBuffer(); DecimalFormat d3 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d3.setMaximumIntegerDigits(3); d3.setMinimumFractionDigits(3); d3.setMaximumFractionDigits(3); DecimalFormat d2 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d2.setMaximumInteger... | public String toPDB() { StringBuffer str = new StringBuffer(); //int i = 0 ; // Locale should be english, e.g. in DE separator is "," -> PDB files have "." ! DecimalFormat d3 = (DecimalFormat)NumberFormat.getInstance(java.util.Locale.UK); d3.setMaximumIntegerDigits(3); d3.setMinimumFractionDigits(3); d3.setMaxim... |
public int size(int modelnr); | public int size() ; | public int size(int modelnr); |
public Chain getChain(int pos, int modelnr); | public Chain getChain(int pos); | public Chain getChain(int pos, int modelnr); |
addChangeListener(cl, null); | addChangeListener(cl, ChangeType.UNKNOWN); | public void addChangeListener(ChangeListener cl) { addChangeListener(cl, null); } |
if( (lt == null) || (lt == ct) ) { | if( ct.isMatchingType(lt) ) { | public void firePostChangeEvent(ChangeEvent ce) { boolean needToReap = false; ChangeType ct = ce.getType(); for(int i = 0; i < listenerCount; i++) { ChangeType lt = types[i]; if( (lt == null) || (lt == ct) ) { ChangeListener cl = (ChangeListener) listeners[i].get(); if (cl != null) { c... |
if( (lt == null) || (lt == ct) ) { | if( ct.isMatchingType(lt)) { | public void firePreChangeEvent(ChangeEvent ce) throws ChangeVetoException { boolean needToReap = false; ChangeType ct = ce.getType(); for(int i = 0; i < listenerCount; i++) { ChangeType lt = types[i]; if( (lt == null) || (lt == ct) ) { ChangeListener cl = (ChangeListener) listeners[i].get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.