rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
boolean readable = headerLine.matcher(firstLine).matches() && lp.matcher(firstLine.substring(3).trim()).matches(); | boolean readable = headerLine.matcher(firstLine).matches() && (lp.matcher(firstLine.substring(3).trim()).matches() || lpPre87.matcher(firstLine.substring(3).trim()).matches() ); | public boolean canRead(File file) throws IOException { if (readableFileNames.matcher(file.getName()).matches()) return true; BufferedReader br = new BufferedReader(new FileReader(file)); String firstLine = br.readLine(); boolean readable = headerLine.matcher(firstLine).matches() && lp.ma... |
Message msg = realChannel.receiveFromRDBMS(client); | Message msg = realChannel.receiveFromRDBMS(clientWrapper.getRealClient()); | public Message receiveFromRDBMS(Client client) throws CommunicationException { /* * Why this evil endless loop instead of an elegant recursion? This * block runs for reentratnt SQL. There may be milions, and that may * easily cause a StackOverflowError. */ while (true) { Message msg = realChannel.receive... |
msg.setClient(clientWrapper); | public Message receiveFromRDBMS(Client client) throws CommunicationException { /* * Why this evil endless loop instead of an elegant recursion? This * block runs for reentratnt SQL. There may be milions, and that may * easily cause a StackOverflowError. */ while (true) { Message msg = realChannel.receive... | |
msg.setClient(clientWrapper.getRealClient()); | public void sendToRDBMS(Message msg) throws CommunicationException { realChannel.sendToRDBMS(msg); } | |
setDoubleValue(Double.parseDouble(data.toString())); | setDoubleValue(Double.parseDouble((data.toString()).trim())); | public void endElement( String nsURI, String localName, String qName, StAXContentHandler handler ) throws SAXException { level--; if (level == 0) { try { setDoubleValue(Double.parseDouble(data.toString())); } catch (NumberFormatException nfe) { throw new SAXException(nfe); ... |
RemoteTerm remoteTerm = onto.importTerm(term, null); | Term remoteTerm = onto.importTerm(term, null); | public void outANameValue(ANameValue aNameValue) { //System.err.println("Value name: " + aNameValue); PFullName fullName = aNameValue.getFullName(); if(depth == 1) { return; } try { if(fullName instanceof ACompoundFullName) { ACompoundFullName cfn = (ACompoundFullName... |
public Atom getAtom(int position) throws StructureException; | public Atom getAtom(String name) throws StructureException; | public Atom getAtom(int position) throws StructureException; |
System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); | public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi... | |
if (a.keys[ai] < b.keys[bi] && a.keys[ai] < s.keys[si]) { | if ( (a.keys[ai] < b.keys[bi]) || (a.keys[ai] < s.keys[si])) { | public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi... |
} else if (b.keys[bi] < a.keys[ai] && b.keys[ai] < s.keys[si]) { | } else if ((b.keys[bi] < a.keys[ai]) || (b.keys[bi] < s.keys[si])) { | public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi... |
} else if (s.keys[si] < a.keys[ai] && s.keys[si] < b.keys[bi]) { | } else if ((s.keys[si] < a.keys[ai]) || (s.keys[si] < b.keys[bi])) { | public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi... |
total += a.values[ai++] * b.values[bi++] * s.values[si++]; | System.out.println("ai = " + ai); System.out.println("bi = " + bi); System.out.println("si = " + si); System.exit(1); | public double evaluate(Object o1, Object o2) { SparseVector a = (SparseVector) o1; SparseVector b = (SparseVector) o2; System.out.println("o1 = " + o1); System.out.println("o2 = " + o2); int ai=0, bi=0, si=0; double total = 0.0; while (ai < a.size && bi... |
if(indx >= size) { throw new ArrayIndexOutOfBoundsException( "Attempted to read item " + indx + " of an array with " + size + "elements" ); } | public int getDimAtIndex(int indx) { return keys[indx]; } | |
if(indx >= size) { throw new ArrayIndexOutOfBoundsException( "Attempted to read item " + indx + " of an array with " + size + "elements" ); } | public double getValueAtIndex(int indx) { return values[indx]; } | |
Arrays.fill(nKeys, 0, nKeys.length, Integer.MAX_VALUE); | Arrays.fill(nKeys, size, nKeys.length, Integer.MAX_VALUE); | public void put(int dim, double value) { // find index of key nearest dim int indx = Arrays.binarySearch(keys, dim); if(indx >= 0) { // found entry for dim values[indx] = value; } else { // need to create entry for dim indx = -(indx + 1);/* if(indx < size) { S... |
System.arraycopy(keys, indx, keys, indx+1, size-indx); System.arraycopy(values, indx, values, indx+1, size-indx); | try { System.arraycopy(keys, indx, keys, indx+1, size-indx); System.arraycopy(values, indx, values, indx+1, size-indx); } catch (ArrayIndexOutOfBoundsException ae) { System.out.println("dim = " + dim); System.out.println("value = " + value); System.out.println("keys.length = " + keys.length); System.out... | public void put(int dim, double value) { // find index of key nearest dim int indx = Arrays.binarySearch(keys, dim); if(indx >= 0) { // found entry for dim values[indx] = value; } else { // need to create entry for dim indx = -(indx + 1);/* if(indx < size) { S... |
for(int pos = 1; pos <= seq.length() + 1; pos += lineWidth) { | for(int pos = 1; pos <= seq.length(); pos += lineWidth) { | public void writeSequence(Sequence seq, PrintStream os) throws IOException { os.print(">"); os.println(describeSequence(seq)); // int length = seq.length();// for(int i = 1; i <= length; i++) {// os.write(seq.symbolAt(i).getToken());// if( (i % lineWidth) == 0)// os.println();// }//... |
return STRING_CASE_SENSITIVE_ORDER.compare(a, b); | return STRING_CASE_SENSITIVE_ORDER.compare(as, bs); | public int compare(Object a, Object b) { String as; String bs; if(a instanceof Index) { as = ((Index) a).getID(); } else { as = (String) a; } if(b instanceof Index) { bs = ((Index) b).getID(); } else { bs = (String) b; } ... |
rl.setRank(newRank++); | rl.setRank(++newRank); | private static RichLocation parseLocString(Namespace featureNS, String featureAccession, CrossRef parentXref, Strand parentStrand, String locStr) throws ParseException { // First attempt to find the group enclosing everything we've been passed Matcher gm = gp.matcher(locStr); if (!gm.ma... |
return new SimpleRichLocation(startPos,startPos,rank++,strand,crossRef); | return new SimpleRichLocation(startPos,startPos,++rank,strand,crossRef); | private static RichLocation parseLocString(Namespace featureNS, String featureAccession, CrossRef parentXref, Strand parentStrand, String locStr) throws ParseException { // First attempt to find the group enclosing everything we've been passed Matcher gm = gp.matcher(locStr); if (!gm.ma... |
return new SimpleRichLocation(startPos,endPos,rank++,strand,crossRef); | return new SimpleRichLocation(startPos,endPos,++rank,strand,crossRef); | private static RichLocation parseLocString(Namespace featureNS, String featureAccession, CrossRef parentXref, Strand parentStrand, String locStr) throws ParseException { // First attempt to find the group enclosing everything we've been passed Matcher gm = gp.matcher(locStr); if (!gm.ma... |
DASSequence _getSequence(String id, Set annoURLs) | DASSequence _getSequence(String id) | DASSequence _getSequence(String id, Set annoURLs) throws BioException, IllegalIDException { DASSequence seq = (DASSequence) sequences.get(id); if (seq == null) { seq = new DASSequence(this, dataSourceURL, id, annoURLs); sequences.put(id, seq); } return seq; } |
DASSequence seq = (DASSequence) sequences.get(id); if (seq == null) { seq = new DASSequence(this, dataSourceURL, id, annoURLs); sequences.put(id, seq); } return seq; | return _getSequence(id, Collections.singleton(dataSourceURL)); | DASSequence _getSequence(String id, Set annoURLs) throws BioException, IllegalIDException { DASSequence seq = (DASSequence) sequences.get(id); if (seq == null) { seq = new DASSequence(this, dataSourceURL, id, annoURLs); sequences.put(id, seq); } return seq; } |
lastEnd = end; | private GreedyInstance(int start, int end, int statePointer) { this.start = start; lastEnd = end; this.statePointer = statePointer; } | |
lastEnd = end; | public boolean transit(int symIdx) { byte dest = transitions[entryPoints[statePointer] + symIdx]; if (dest == ERROR_STATE) { if (gotTerminationState) { listener.notifyHit(name, start, end, true); } ... | |
if (context.getDirection() == context.HORIZONTAL) | if (context.getDirection() == SequenceRenderContext.HORIZONTAL) | public void renderImageMap(Graphics2D g2, Feature f, SequenceRenderContext context) { Rectangle bounds = g2.getDeviceConfiguration().getBounds(); // Safe to cast as bounds come from raster int ma... |
if(propogate) { | if(propagate) { | public void endTag() throws ParserException { if(propogate) { super.endTag(); } } |
if(propogate) { | if(propagate) { | public void value(TagValueContext ctxt, Object value) throws ParserException { if(propogate) { super.value(ctxt, value); } } |
System.err.println("Wheeee, using XFF parser on: " + fUrl.toString()); | public void parseURL(URL fUrl, SeqIOListener siol) throws BioException, ParseException, IOException { try { System.err.println("Wheeee, using XFF parser on: " + fUrl.toString()); HttpURLConnection huc = (HttpURLConnection) fUrl.openConnection(); huc.connect(); int status = huc.getHeaderFie... | |
name = s.trim(); | seqName = s.trim(); | protected void setStringValue(String s) { name = s.trim(); } |
throws SAXException { | throws SAXException { seqId = attrs.getValue("id").trim(); String length = attrs.getValue("length").trim(); try { listener.setName(seqId); listener.addSequenceProperty("length", length); } catch (ParseException pe) { throw new SAXException("could not set sequence properties."); } | public void startElementHandler( String nsURI, String localName, String qName, Attributes attrs) throws SAXException { } |
return DNATools.complement(parent.symbolAt(parent.length() - pos + 1)); | return DNATools.complement(parent.symbolAt(pos)); | public Symbol symbolAt(int pos) { try { return DNATools.complement(parent.symbolAt(parent.length() - pos + 1)); } catch (IllegalSymbolException ex) { throw new BioError(ex); } } |
divRecordLength = div.readRecordLength(); | private void initialise() throws IOException { BufferedInputStream bis = null; // First try to get details of file names and numbers from // master index file. try { bis = new BufferedInputStream(new FileInputStream(divisionLkp)); EmblCDROMIndexReader div ... | |
throw fnfe; } catch (IOException ioe) { | private void initialise() throws IOException { BufferedInputStream bis = null; // First try to get details of file names and numbers from // master index file. try { bis = new BufferedInputStream(new FileInputStream(divisionLkp)); EmblCDROMIndexReader div ... | |
System.err.println("Failed to read random access file " + entryNamIdx.getName()); | private void initialise() throws IOException { BufferedInputStream bis = null; // First try to get details of file names and numbers from // master index file. try { bis = new BufferedInputStream(new FileInputStream(divisionLkp)); EmblCDROMIndexReader div ... | |
throw ioe; | throw fnfe; | private void initialise() throws IOException { BufferedInputStream bis = null; // First try to get details of file names and numbers from // master index file. try { bis = new BufferedInputStream(new FileInputStream(divisionLkp)); EmblCDROMIndexReader div ... |
String recordKey = getRecordKey(record).trim();; | String recordKey = getRecordKey(record).trim(); | public Object [] findRecord(final String identifier) throws IOException { long startRecord = 0; long endRecord = recordCount - 1; while (startRecord <= endRecord) { long midPoint = (startRecord + endRecord) / 2; raIndexFile.seek(headerLength + (midPoint ... |
cigar = "" ; | private void CIGARhandler(Attributes atts) { current_position = "cigar" ; } | |
current_position = "start"; | current_position = "start" ; cigar = "" ; | public DASAlignmentXMLResponseParser() { super() ; //System.out.println("in init DASAlignmentXMLResponseParser"); current_position = "start"; alignment = new Alignment() ; alignments = new ArrayList() ; segments = new ArrayList() ; vectors = new ArrayList() ; matrices = new ArrayList() ; } |
current_segment.put("cigar",txt); | cigar += txt ; | public void characters (char ch[], int start, int length){ String txt = ""; for (int i = start; i < start + length; i++) { txt += ch[i] ; } if ( current_position == "cigar"){ current_segment.put("cigar",txt); } if (current_position == "sequence"){ //System.out.println(txt); current_object.put("seque... |
if (qName.equals("cigar")) { cigar = cigar.trim(); current_segment.put("cigar",cigar); cigar = "" ; } | public void endElement (String uri, String name, String qName){ //System.out.println("endElement >" + qName + "< >" + name + "<") ; if (qName.equals("geo3D")) { intObjectId = null ; } if (qName.equals("alignObject")) { try { Annotation oba = annf.makeAnnotation(current_object) ; alignment.addObject(oba);... | |
String blocks = (formatTokenBlock(sb, sa, 10, dnaTokenization)).toString(); | String blocks = (formatTokenBlock(sb, sa, 10, alpha.getTokenization("token"))).toString(); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int end = start + length - 1; for (int i = start; i <= end; i... |
catch (IllegalSymbolException ex) | catch (BioException ex) | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int end = start + length - 1; for (int i = start; i <= end; i... |
throw new IllegalAlphabetException(ex, "DNA not tokenizing"); | throw new IllegalAlphabetException(ex, "Alphabet not tokenizing"); | public void addSymbols(Alphabet alpha, Symbol [] syms, int start, int length) throws IllegalAlphabetException { try { int end = start + length - 1; for (int i = start; i <= end; i... |
if (dir == src.HORIZONTAL) { | if (dir == SequenceRenderContext.HORIZONTAL) { | public void paint(Graphics2D g, List srcL, List renderers) { if (srcL.size() != renderers.size()) { throw new IllegalArgumentException("srcL and renderers must be the same size: " + srcL.size() + ":" + renderers.size()); } // Offset perpe... |
if (src.getDirection() == src.HORIZONTAL) { | if (src.getDirection() == SequenceRenderContext.HORIZONTAL) { | public SequenceViewerEvent processMouseEvent(List srcL, MouseEvent me, List path, List renderers) { if (srcL.size() != renderers.size()) { throw new IllegalArgumentException("srcL and renderers must be the same size: " + ... |
System.out.println("gzip encoding!"); | public void runFetch() throws BioException, ParseException { // get time long startFetch = (new Date()).getTime(); DAS.startedActivity(this); URL fURL = null; try { String fetchEncoding = "dasgff"; if (DASCapabilities.checkCapable(new URL(dataSource, "../"), DASCapabilities... | |
addDetailHandler(new ElementRecognizer.ByLocalName("prop"), PropDetailHandler.PROPDETAIL_HANDLER_FACTORY); | public XFFFeatureSetHandler() { addFeatureHandler(ElementRecognizer.ALL, FeatureHandler.FEATURE_HANDLER_FACTORY); addFeatureHandler(new ElementRecognizer.HasAttribute("strand"), StrandedFeatureHandler.STRANDEDFEATURE_HANDLER_FACTORY); } | |
seq = new DASSequence(dataSourceURL, id); | seq = new DASSequence(this, dataSourceURL, id); | public Sequence getSequence(String id) { if (! sequences.containsKey(id)) throw new NoSuchElementException("Couldn't find sequence " + id); Sequence seq = (Sequence) sequences.get(id); if (seq == null) { try { seq = new DASSequence(dataSourceURL, id); } catch (Exception ex) { throw new BioError(ex); ... |
getXFFEnvironment().getFeatureListener().startFeature(getFeatureTemplate()); | Feature.Template templ = getFeatureTemplate(); if (templ.annotation == null) { templ.annotation = Annotation.EMPTY_ANNOTATION; } getXFFEnvironment().getFeatureListener().startFeature(templ); | protected void fireStartFeature() throws ParseException { if (startFired) { throw new ParseException("startFeature event has already been fired for this feature"); } getXFFEnvironment().getFeatureListener().startFeature(getFeatureTemplate()); startFired = true; } |
ps = conn.prepareStatement("select top 0 * from " + tablename); | ps = conn.prepareStatement("select top 1 * from " + tablename); | public boolean containsTable(DataSource ds, String tablename) { if (ds == null) { throw new NullPointerException("Require a datasource."); } if ((tablename == null) || (tablename.length() == 0)) { throw new IllegalArgumentException("Invalid table name given"); } ... |
this.list = hibernateQuery.getMethod("list", new Class[]{}); | this.uniqueResult = hibernateQuery.getMethod("uniqueResult", new Class[]{}); | public HibernateRichObjectBuilder(Object session) { try { // Lazy load the Session class from Hibernate. Class hibernateSession = Class.forName("org.hibernate.Session"); // Test to see if our parameter is really a Session if (!hibernateSession.isInstance(session)) ... |
List results = (List)this.list.invoke(query, null); | Object result = this.uniqueResult.invoke(query, null); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where n... |
if (results.size()>0) return results.get(0); | if (result!=null) return result; | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where n... |
if (a == null) { throw new NullPointerException("Null FeatureFilter: a"); } if (b == null) { throw new NullPointerException("Null FeatureFilter: b"); } if(a.equals(b)) { return false; } if (a instanceof FeatureFilter.AcceptAllFilter || b instanceof FeatureFilter.AcceptAllFilter) { return false; } else if (a instanc... | if (a == null) { throw new NullPointerException("Null FeatureFilter: a"); } if (b == null) { throw new NullPointerException("Null FeatureFilter: b"); } if(a.equals(b)) { | public static boolean areDisjoint(FeatureFilter a, FeatureFilter b) { // Preconditions if (a == null) { throw new NullPointerException("Null FeatureFilter: a"); } if (b == null) { throw new NullPointerException("Null FeatureFilter: b"); } ... |
} if (a instanceof FeatureFilter.AcceptAllFilter) { return areProperSubset(b, FeatureFilter.none); } else if(b instanceof FeatureFilter.AcceptAllFilter) { return areProperSubset(a, FeatureFilter.none); } else if (a instanceof FeatureFilter.AcceptNoneFilter || b instanceof FeatureFilter.AcceptNoneFilter) { return true;... | public static boolean areDisjoint(FeatureFilter a, FeatureFilter b) { // Preconditions if (a == null) { throw new NullPointerException("Null FeatureFilter: a"); } if (b == null) { throw new NullPointerException("Null FeatureFilter: b"); } ... | |
if (sub == null) { throw new NullPointerException("Null FeatureFilter: sub"); } if (sup == null) { throw new NullPointerException("Null FeatureFilter: sup"); } if(sub.equals(sup)) { return true; } if (sup instanceof FeatureFilter.AcceptAllFilter) { return true; } else if (sub instanceof FeatureFilter.AcceptAllFilte... | if (sub == null) { throw new NullPointerException("Null FeatureFilter: sub"); } if (sup == null) { throw new NullPointerException("Null FeatureFilter: sup"); } if(sub.equals(sup)) { return true; } if (sup instanceof FeatureFilter.AcceptAllFilter) { return true; } else if (sub instanceof FeatureFilter.AcceptNoneFilt... | public static boolean areProperSubset(FeatureFilter sub, FeatureFilter sup) { // Preconditions if (sub == null) { throw new NullPointerException("Null FeatureFilter: sub"); } if (sup == null) { throw new NullPointerException("Null FeatureFilter: sup"); ... |
ConnectionFactory connectionFactory = new DataSourceConnectionFactory(ds); PoolableObjectFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true); | public static DataSource getDataSource(final String driver, final String url, final String user, final String pass) throws Exception { BasicDataSource ds = new BasicDataSource(); ds.se... | |
public DASAlignmentCall(String url){ serverurl = url; | public DASAlignmentCall() { serverurl = "" ; | public DASAlignmentCall(String url){ serverurl = url; } |
public Alignment[] getAlignments(String query) | public Alignment[] getAlignments() | public Alignment[] getAlignments(String query) throws IOException { /* now connect to DAS server */ String connstr = serverurl + query ; URL dasUrl = null ; try { dasUrl = new URL(connstr); } catch (Exception e) { throw new IOException("error during creation of URL " + e.getMessage()); } System.out.print... |
String connstr = serverurl + query ; | public Alignment[] getAlignments(String query) throws IOException { /* now connect to DAS server */ String connstr = serverurl + query ; URL dasUrl = null ; try { dasUrl = new URL(connstr); } catch (Exception e) { throw new IOException("error during creation of URL " + e.getMessage()); } System.out.print... | |
dasUrl = new URL(connstr); | dasUrl = new URL(serverurl); | public Alignment[] getAlignments(String query) throws IOException { /* now connect to DAS server */ String connstr = serverurl + query ; URL dasUrl = null ; try { dasUrl = new URL(connstr); } catch (Exception e) { throw new IOException("error during creation of URL " + e.getMessage()); } System.out.print... |
System.out.println("connecting to "+connstr); | System.out.println("connecting to "+serverurl); | public Alignment[] getAlignments(String query) throws IOException { /* now connect to DAS server */ String connstr = serverurl + query ; URL dasUrl = null ; try { dasUrl = new URL(connstr); } catch (Exception e) { throw new IOException("error during creation of URL " + e.getMessage()); } System.out.print... |
if (! (ao.getProtocol().equals(protocol))) | if (! streq(ao.getProtocol(), protocol)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getHost().equals(host))) | if (! streq(ao.getHost(), host)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getFile().equals(file))) | if (! streq(ao.getFile(), file)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getQuery().equals(query))) | if (! streq(ao.getQuery(), query)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getRef().equals(ref))) | if (! streq(ao.getRef(), ref)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getUserInfo().equals(userInfo))) | if (! streq(ao.getUserInfo(), userInfo)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
if (! (ao.getAuthority().equals(authority))) | if (! streq(ao.getAuthority(), authority)) | public boolean equals(Object o) { if (! (o instanceof AceURL)) return false; AceURL ao = (AceURL) o; if (! (ao.getProtocol().equals(protocol))) return false; if (! (ao.getHost().equals(host))) return false; if (ao.getPort() != port) return false; if (! (ao.getFile().equals(file))) return false; ... |
BioStore bStore = new BioStore(storeLoc, true); | BioStore bStore = new BioStore(storeLoc, true, true); | public BioStore createBioStore() throws BioException { try { if (storeLoc.exists()) { throw new BioException("Store location already exists. Delete first: " + storeLoc); } if (!keys.containsKey(primaryKey)) { throw new BioException("Primar... |
public PackedSymbolList(Packing packing, Symbol [] symbols, int length, Alphabet alfa) throws IllegalAlphabetException,IllegalArgumentException { if(packing.getAlphabet() != alfa) { throw new IllegalAlphabetException( "Can't pack with alphabet " + packing.getAlphabet() + " and symbol list " + alfa ); } if (symbols.... | public PackedSymbolList(Packing packing, long[] syms, int length) { this.symsPerElement = (byte) (bitsPerElement / packing.wordSize()); this.packing = packing; this.syms = syms; this.length = length; this.mask = calcMask(packing); | public PackedSymbolList(Packing packing, Symbol [] symbols, int length, Alphabet alfa) throws IllegalAlphabetException,IllegalArgumentException { // verify that the alphabet is one I can deal with. if(packing.getAlphabet() != alfa) { throw new IllegalAlphabetException( "Can't pack with alphabet " +... |
return new SimpleAtomicSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST); | return new SimpleAtomicSymbol(ann, new ListTools.Doublet(DNATools.c(), DNATools.t())); | protected Symbol createSymbol(Annotation ann) throws Exception { return new SimpleAtomicSymbol(Annotation.EMPTY_ANNOTATION, Collections.EMPTY_LIST); } |
char token, Annotation annotation, List syms | Annotation annotation, List syms | protected SimpleAtomicSymbol( char token, Annotation annotation, List syms ) throws IllegalSymbolException { super(token, annotation, syms); } |
super(token, annotation, syms); | super(annotation, syms); | protected SimpleAtomicSymbol( char token, Annotation annotation, List syms ) throws IllegalSymbolException { super(token, annotation, syms); } |
char token, Annotation annotation, List symbols | Annotation annotation, List symbols | protected SimpleBasisSymbol( char token, Annotation annotation, List symbols ) throws IllegalSymbolException { this(token, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolException( "Can't c... |
this(token, annotation); | this(annotation); | protected SimpleBasisSymbol( char token, Annotation annotation, List symbols ) throws IllegalSymbolException { this(token, annotation); if(symbols == null) { throw new NullPointerException("symbols can't be null"); } if(symbols.size() == 0) { throw new IllegalSymbolException( "Can't c... |
"\n\ttoken: " + getToken() + | public final List getSymbols() { if(symbols == null) { symbols = createSymbols(); } if(symbols.size() == 0) { throw new BioError( "Assertion Failure: symbols array is of length 0 in " + this + "\n\ttoken: " + getToken() + "\n\tname: " + getName() + "\n\tsymbols: " + this... | |
return DNATools.getDNA().getAmbiguity(syms); | if (b != 0) return DNATools.getDNA().getAmbiguity(syms); else return DNATools.getDNA().getGapSymbol(); | private Symbol _unpack(byte b) { Set syms = new SmallSet(); if(0 != (b & 1)) { syms.add(DNATools.a()); } if(0 != (b & 2)) { syms.add(DNATools.g()); } if(0 != (b & 4)) { syms.add(DNATools.c()); } if(0 != (b & 8)) { syms.add(DNATools.t()); } try { return DNATools.g... |
public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException{ | public static MergeLocation mergeLocations(List componentLocations) throws BioException{ | public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException{ int min = Math.min(locA.getMin(), locB.getMin()); int max = Math.max(locA.getMax(), locB.getMax()); List l = new ArrayList(2); l.add(locA); l.add(locB); return new MergeLocation(min, max, l); } |
int min = Math.min(locA.getMin(), locB.getMin()); int max = Math.max(locA.getMax(), locB.getMax()); | Collections.sort(componentLocations, Location.naturalOrder); | public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException{ int min = Math.min(locA.getMin(), locB.getMin()); int max = Math.max(locA.getMax(), locB.getMax()); List l = new ArrayList(2); l.add(locA); l.add(locB); return new MergeLocation(min, max, l); } |
List l = new ArrayList(2); l.add(locA); l.add(locB); | int lastMax = -1; int lastMin = -1; | public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException{ int min = Math.min(locA.getMin(), locB.getMin()); int max = Math.max(locA.getMax(), locB.getMax()); List l = new ArrayList(2); l.add(locA); l.add(locB); return new MergeLocation(min, max, l); } |
return new MergeLocation(min, max, l); | int min = Integer.MAX_VALUE; int max = 0; for (Iterator i = componentLocations.iterator(); i.hasNext(); ) { Object item = i.next(); if(!( item instanceof Location)){ throw new BioException( "All members of the component locations list must be Location objects"); } Location loc = (Location)item; if(lastMin != -1 &&... | public static MergeLocation mergeLocations(Location locA, Location locB) throws BioException{ int min = Math.min(locA.getMin(), locB.getMin()); int max = Math.max(locA.getMax(), locB.getMax()); List l = new ArrayList(2); l.add(locA); l.add(locB); return new MergeLocation(min, max, l); } |
String id = (String) temp.annotation.getProperty("sequence.id"); | public void startFeature(Feature.Template temp) throws ParseException { if (temp instanceof ComponentFeature.Template) { String id = (String) temp.annotation.getProperty("sequence.id"); try { ComponentFeature.Template ctemp = (Compone... | |
public SimpleSVMClassifierModel(SVMKernel kernel, SVMTarget target) { this(kernel, target.items()); | public SimpleSVMClassifierModel(SVMKernel kernel) { this.kernel = kernel; itemAlphaSet = new HashSet(); itemToItemAlpha = new HashMap(); | public SimpleSVMClassifierModel(SVMKernel kernel, SVMTarget target) { this(kernel, target.items()); } |
protected SimpleTaxon(String scientificName, String commonName) { super(scientificName, commonName); } | protected SimpleTaxon() { super(); } | protected SimpleTaxon(String scientificName, String commonName) { super(scientificName, commonName); } |
public XFFWriter(XFFHelper h) { helper = h; | public XFFWriter() { helper = new BasicXFFHelper(); | public XFFWriter(XFFHelper h) { helper = h; } |
List queryParamsList = new ArrayList(paramsList); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... | |
queryParamsList.set(0, DocRefAuthor.Tools.generateAuthorString((List)queryParamsList.get(0))); if (queryParamsList.size()<3 || queryParamsList.get(2)==null) { | ourParamsList.set(0, DocRefAuthor.Tools.generateAuthorString((List)ourParamsList.get(0))); if (ourParamsList.size()<3) { | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
if (queryParamsList.size()>=3) { queryParamsList.remove(2); paramsList=new ArrayList(paramsList); paramsList.remove(2); } | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... | |
for (int i = 0; i < queryParamsList.size(); i++) { query = this.setParameter.invoke(query, new Object[]{new Integer(i), queryParamsList.get(i)}); | for (int i = 0; i < ourParamsList.size(); i++) { query = this.setParameter.invoke(query, new Object[]{new Integer(i), ourParamsList.get(i)}); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
Class[] types = new Class[paramsList.size()]; | Class[] types = new Class[ourParamsList.size()]; | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
for (int i = 0; i < paramsList.size(); i++) { if (paramsList.get(i) instanceof Set) types[i] = Set.class; else if (paramsList.get(i) instanceof Map) types[i] = Map.class; else if (paramsList.get(i) instanceof List) types[i] = List.class; else types[i] = paramsList.get(i).getClass(); | for (int i = 0; i < ourParamsList.size(); i++) { if (ourParamsList.get(i) instanceof Set) types[i] = Set.class; else if (ourParamsList.get(i) instanceof Map) types[i] = Map.class; else if (ourParamsList.get(i) instanceof List) types[i] = List.class; else types[i] = ourParamsList.get(i).getClass(); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
Object o = c.newInstance(paramsList.toArray()); | Object o = c.newInstance(ourParamsList.toArray()); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
for (int i = 0; i < paramsList.size(); i++) { if (paramsList.get(i)==null) paramsstuff.append("null"); else paramsstuff.append(paramsList.get(i).getClass()); if (i<(paramsList.size()-1)) paramsstuff.append(","); | for (int i = 0; i < ourParamsList.size(); i++) { if (i>0) paramsstuff.append(","); paramsstuff.append(ourParamsList.get(i).getClass()); | public Object buildObject(Class clazz, List paramsList) { // Create the Hibernate query to look it up with String queryText; String queryType; List queryParamsList = new ArrayList(paramsList); if (SimpleNamespace.class.isAssignableFrom(clazz)) { queryText = "from Namesp... |
features = new FeatureTableParser(this); | features = new FeatureTableParser(this, "GENBANK"); | public GenbankProcessor(SequenceBuilder theDelegate) { super(theDelegate); features = new FeatureTableParser(this); } |
clip.setFrame(minP, 0.0, maxP - minP, depth); | clip.setFrame(minP, 0.0, maxP - minP + 1, depth + 1); | public void paint(Graphics2D g, List srcL, List renderers) { if (srcL.size() != renderers.size()) { throw new IllegalArgumentException("srcL and renderers must be the same size: " + srcL.size() + ":" + renderers.size()); } // Offset perpe... |
clip.setFrame(0.0, minP, depth, maxP - minP); | clip.setFrame(0.0, minP, depth + 1, maxP - minP + 1); | public void paint(Graphics2D g, List srcL, List renderers) { if (srcL.size() != renderers.size()) { throw new IllegalArgumentException("srcL and renderers must be the same size: " + srcL.size() + ":" + renderers.size()); } // Offset perpe... |
for(Iterator i = ent.entrySet().iterator(); i.hasNext();){ | for(Iterator i = ent.values().iterator(); i.hasNext();){ | public static double bitsOfInformation(Distribution observed){ HashMap ent = shannonEntropy(observed, 2.0); double totalEntropy = 0.0; for(Iterator i = ent.entrySet().iterator(); i.hasNext();){ totalEntropy =+ ((Double)i.next()).doubleValue(); } return 2.0 - totalEntropy; } |
Symbol s = a.symbolAt(seqLabel,i); | Symbol s = a.symbolAt(seqLabel,i + 1); | public static Distribution[] distOverAlignment(Alignment a, boolean countGaps){ List seqs = a.getLabels(); Distribution[] pos = new Distribution[a.length()]; FiniteAlphabet dna = DNATools.getDNA(); try{ for(int i = 0; i < a.length(); i++){// For each position pos[i] = DistributionFactory.DEFAU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.