rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testCreateSessionAddsANewCommandRunner() { Mock mockConnection = connectionBuilder.createMockConnection(); Connection testConnection = (Connection) mockConnection.proxy(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConn...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testCreateSessionInvokesDecorateeConnection() { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("createSession"); Connection t...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testCreateSessionThrowsHJBExceptionOnJMSException() { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("createSession").will(throwExce...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetClientIDInvokesDecorateeConnection() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("getClientID"); ...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetClientIDPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("getClientID").will(throwE...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetExceptionListenerInvokesDecorateeConnection() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("g...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetExceptionListenerPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("getEx...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetMetaDataInvokesDecorateeConnection() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("getMetaData"); ...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetMetaDataPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("getMetaData").will(throwE...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testGetSessions() { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(atLeastOnce()).method("createSession"); Connection testConnection = (Conn...
new HJBConnection(testConnection);
new HJBConnection(testConnection, 0);
public void testHJBConnectionSetsExceptionListenerOnConstruction() { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); Connection testConnection = (Connection) mockConnection.proxy(); ...
new HJBConnection(null);
new HJBConnection(null, 0);
public void testHJBConnectionThrowsIllegalArgumentExceptionOnNullConnection() { try { new HJBConnection(null); fail("An IllegalArgumentException should have been thrown"); } catch (IllegalArgumentException e) {} }
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testSetClientIDInvokesDecorateeInstance() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("setClientID"); C...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testSetClientIDPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("setClientID").will(throwE...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testSetExceptionListenerNeverInvokesDecorateeConnection() { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); Connection testConnection = (Connection) mockConnection.proxy()...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testStartInvokesDecorateeConnection() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("start"); Connection ...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testStartPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("start").will(throwException(new...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testStopInvokesDecorateeConnection() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("stop"); Connection te...
HJBConnection h = new HJBConnection(testConnection);
HJBConnection h = new HJBConnection(testConnection, 0);
public void testStopPropagatesJMSException() throws Exception { Mock mockConnection = connectionBuilder.createMockConnection(); registerToVerify(mockConnection); mockConnection.stubs().method("setExceptionListener"); mockConnection.expects(once()).method("stop").will(throwException(new J...
Double d = new Double(val); Reference ref = (Reference) doubleToSymRef.get(d); Symbol sym; if(ref == null || ref.get() == null) { ref = new SoftReference(sym = new DoubleSymbol(val)); doubleToSymRef.put(d, ref); } return (DoubleSymbol) ref.get();
KeyedWeakReference qref; while ((qref = (KeyedWeakReference) queue.poll()) != null) { doubleToSymRef.remove(qref.getKey()); qref.clear(); } Double d = new Double(val); Reference ref = (Reference) doubleToSymRef.get(d); DoubleSymbol sym; if(ref == null || ref.get() == null) { sym = new DoubleSymbol(val); ref = new Key...
public DoubleSymbol getSymbol(double val) { Double d = new Double(val); Reference ref = (Reference) doubleToSymRef.get(d); Symbol sym; // stop premature reference clearup if(ref == null || ref.get() == null) { ref = new SoftReference(sym = new DoubleSymbol(val)); doubleToSymRef.put(d, ref); ...
Object origAA = g2.getRenderingHint(RenderingHints.KEY_ANTIALIASING);
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
Rectangle2D clip = origClip.getBounds2D();
Rectangle2D clip; if (origClip != null) clip = origClip.getBounds2D(); else clip = new Rectangle(0, 0, getWidth(), getHeight());
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
int subpathLength = getIntOption(Option.SUBPATH_LENGTH);
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
loSubpath = (int)Math.floor((clip.getX() / shapeTx.getScaleX() + fromTraceSample) / subpathLength); hiSubpath = (int)Math.ceil(Math.min(clip.getMaxX() / shapeTx.getScaleX() + fromTraceSample, toTraceSample) / subpathLength);
loSubpath = getSubpathContaining((float) (clip.getX() / shapeTx.getScaleX() + fromTraceSample)); hiSubpath = getSubpathContaining((float) Math.min(clip.getMaxX() / shapeTx.getScaleX() + fromTraceSample, toTraceSample));
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
for (int j = loSubpath ; j < hiSubpath ; j++) {
for (int j = loSubpath ; j <= hiSubpath ; j++)
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
}
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
for (int j = loSubpath ; j < hiSubpath ; j++)
for (int j = loSubpath ; j <= hiSubpath ; j++)
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, origAA);
public void drawTo(Graphics2D g2) { //System.out.println("drawTo(" + g2 + ", " + fromTraceSample + ", " + toTraceSample + ")"); AffineTransform origTx = g2.getTransform(); //System.out.println("origTx: " + origTx); Color origC = g2.getColor(); Shape origClip = g2.getClip(); ...
float left = 0; float right = bcOffsets[0] + (bcOffsets[1] - bcOffsets[0]) / 2.0f; callboxes[0] = new Rectangle2D.Float(0, 0, right - left, max);
int leftIdx = 0; int rightIdx = bcOffsets[0] + (int) Math.floor( ((double) (bcOffsets[1] - bcOffsets[0])) / 2) + 1; float left = horizScaler.scale(chromat, leftIdx); float right = horizScaler.scale(chromat, rightIdx); callboxes[0] = new Rectangle2D.Float(left, 0, right - left, max);
protected synchronized void generateCallboxes() { if (chromat != null && !callboxesValid) { if (chromat.getSequenceLength() < 2) { callboxes = new Rectangle2D.Float[1]; callboxes[0] = new Rectangle2D.Float(0, 0, chromat.getTraceLength() - 1, chromat.getMax()); ...
right = bcOffsets[i] + (bcOffsets[i+1] - bcOffsets[i]) / 2.0f;
right = horizScaler.scale(chromat, rightIdx);
protected synchronized void generateCallboxes() { if (chromat != null && !callboxesValid) { if (chromat.getSequenceLength() < 2) { callboxes = new Rectangle2D.Float[1]; callboxes[0] = new Rectangle2D.Float(0, 0, chromat.getTraceLength() - 1, chromat.getMax()); ...
left = right - 1; right = (int) chromat.getTraceLength() - 1;
left = right; right = horizScaler.scale(chromat, chromat.getTraceLength() - 1);
protected synchronized void generateCallboxes() { if (chromat != null && !callboxesValid) { if (chromat.getSequenceLength() < 2) { callboxes = new Rectangle2D.Float[1]; callboxes[0] = new Rectangle2D.Float(0, 0, chromat.getTraceLength() - 1, chromat.getMax()); ...
float rescale = 1.0f;
protected synchronized void generateSubpaths() { if (chromat != null && !subpathsValid) { if (subpaths == null) subpaths = new GeneralPath[4][]; int[][] samples = new int[4][]; try { samples[A] = chromat.getTrace(DNATools.a()); sam...
int countSubpaths = (int)Math.ceil( ((float)samples[A].length) / subpathLength ); int offsetIdx;
int countSubpaths = (int)Math.ceil( horizScaler.scale(chromat, samples[A].length-1) / subpathLength ); int[] subpathTraceBounds = new int[countSubpaths+1]; { subpathTraceBounds[0] = 0; int bound = 1; float scaled; for (int i = 0 ; i < samples[A].length ; i++) { scaled = horizScaler.scale(chromat, i); if (scaled >= boun...
protected synchronized void generateSubpaths() { if (chromat != null && !subpathsValid) { if (subpaths == null) subpaths = new GeneralPath[4][]; int[][] samples = new int[4][]; try { samples[A] = chromat.getTrace(DNATools.a()); sam...
subpaths[i][j] = new GeneralPath(GeneralPath.WIND_EVEN_ODD, subpathLength); if (j == 0) offsetIdx = 0; else offsetIdx = j*subpathLength - 1; subpaths[i][j].moveTo(offsetIdx, rescale*(max - samples[i][offsetIdx])); for (int k = offsetIdx ; k < samples[i].length && k <= offsetIdx + subpathLength ; k++) { subpaths[i][j].l...
thisPathLen = subpathTraceBounds[j+1] - subpathTraceBounds[j]; subpaths[i][j] = new GeneralPath(GeneralPath.WIND_EVEN_ODD, thisPathLen); offsetIdx = subpathTraceBounds[j]; subpaths[i][j].moveTo(horizScaler.scale(chromat, offsetIdx), max - samples[i][offsetIdx]); for (int k = offsetIdx+1 ; k < samples[i].length && k <= ...
protected synchronized void generateSubpaths() { if (chromat != null && !subpathsValid) { if (subpaths == null) subpaths = new GeneralPath[4][]; int[][] samples = new int[4][]; try { samples[A] = chromat.getTrace(DNATools.a()); sam...
return callboxes.length;
if (callboxesValid) return callboxes.length; else return 0;
public int getCallboxCount() { if (!callboxesValid) generateCallboxes(); return callboxes.length; }
at.translate(getFloatOption(Option.FROM_TRACE_SAMPLE), -1.0);
at.translate(getFloatOption(Option.FROM_TRACE_SAMPLE), 0.0);
public AffineTransform getInvTransform() { AffineTransform at = new AffineTransform(); at.translate(getFloatOption(Option.FROM_TRACE_SAMPLE), -1.0); at.scale(1.0 / horizScale, 1.0 / vertScale); return at; }
target.translate(-1.0 * getFloatOption(Option.FROM_TRACE_SAMPLE), 1.0);
target.translate(-1.0 * getFloatOption(Option.FROM_TRACE_SAMPLE), 0.0);
public void getTransformAndConcat(AffineTransform target) { target.scale(horizScale, vertScale); // the y translation is a continuation of the rescale behavior found in // generatePaths target.translate(-1.0 * getFloatOption(Option.FROM_TRACE_SAMPLE), 1.0); }
drawableCallboxesValid = false;
public void setHeight(int h) { height = h; if (chromat != null) vertScale = ( (float) height ) / chromat.getMax(); else vertScale = -1.0f; drawableCallboxesValid = false; }
width = (int) (horizScale * chromat.getTraceLength());
width = (int) (horizScale * horizScaler.scale(chromat, chromat.getTraceLength()-1));
public void setHorizontalScale(float hs) { horizScale = hs; if (chromat != null) width = (int) (horizScale * chromat.getTraceLength()); else width = -1; drawableCallboxesValid = false; }
drawableCallboxesValid = false;
public void setHorizontalScale(float hs) { horizScale = hs; if (chromat != null) width = (int) (horizScale * chromat.getTraceLength()); else width = -1; drawableCallboxesValid = false; }
if (opt == Option.SUBPATH_LENGTH)
if (opt == Option.SUBPATH_LENGTH) {
public void setOption(Option opt, Object value) { options.put(opt, value); if (opt == Option.SUBPATH_LENGTH) subpathsValid = false; }
} if (opt == Option.HORIZONTAL_NONLINEAR_SCALER) { subpathsValid = false; callboxesValid = false; drawableCallboxesValid = false; if (optionIsTrue(Option.WIDTH_IS_AUTHORITATIVE)) setWidth(width); else setHorizontalScale(horizScale); }
public void setOption(Option opt, Object value) { options.put(opt, value); if (opt == Option.SUBPATH_LENGTH) subpathsValid = false; }
drawableCallboxesValid = false;
public void setVerticalScale(float vs) { vertScale = vs; if (chromat != null) height = (int) (vertScale * chromat.getMax()); else height = -1; drawableCallboxesValid = false; }
horizScale = ( (float) width ) / chromat.getTraceLength();
horizScale = ( (float) width ) / horizScaler.scale(chromat, chromat.getTraceLength()-1);
public void setWidth(int w) { width = w; if (chromat != null) horizScale = ( (float) width ) / chromat.getTraceLength(); else horizScale = -1.0f; drawableCallboxesValid = false; }
drawableCallboxesValid = false;
public void setWidth(int w) { width = w; if (chromat != null) horizScale = ( (float) width ) / chromat.getTraceLength(); else horizScale = -1.0f; drawableCallboxesValid = false; }
return alpha.getAlphabets();
return Collections.singletonList(this);
public List getAlphabets() { return alpha.getAlphabets(); }
return symbol.getSymbols();
return Collections.singletonList(this);
public List getSymbols() { return symbol.getSymbols(); }
AGAVEProperty[] set = new AGAVEProperty[ annot.keys().size() ] ; int index = 0 ; for (Iterator i = annot.keys().iterator(); i.hasNext();) { String key = (String) i.next(); set[ index++ ] = new AGAVEProperty(type, key, null, (String)annot.getProperty(key) ) ; } return set ;
List set = new ArrayList(); for (Iterator i = annot.keys().iterator(); i.hasNext();) { Object key = i.next(); Object value = annot.getProperty(key); if (key instanceof String && value instanceof String) { set.add(new AGAVEProperty(type, (String) key, null, (String) value )); } } return (AGAVEProperty[]) set.toArray(new...
public AGAVEProperty[] getProperty(Annotation annot, String type) { AGAVEProperty[] set = new AGAVEProperty[ annot.keys().size() ] ; int index = 0 ; for (Iterator i = annot.keys().iterator(); i.hasNext();) { String key = (String) i.next(); ...
RangeLocation visible = GUITools.getVisibleRange(context, g2);
Location visible = GUITools.getVisibleRange(context, g2); if( visible == Location.empty ) { return; }
public void paint(Graphics2D g2, SequenceRenderContext context) { AffineTransform prevTransform = g2.getTransform(); g2.setPaint(Color.black); RangeLocation visible = GUITools.getVisibleRange(context, g2); int min = visible.getMin(); int max = visible.getMax(); double mi...
if (log.isDebugEnabled())
if (isDeveloperMode())
public MessageBuilder(MailType kind, VelocityContext vctx) { StringWriter writer = new StringWriter(4096); try { Velocity.mergeTemplate(kind.getTemplate(), "UTF-8", vctx, writer); } catch (Exception ex) { log.fatal("Error merging " + kind.getTemplate(), ex); throw new EJBException(ex); } ...
if (log.isDebugEnabled())
if (isDeveloperMode())
protected String token(String tok) { if (log.isDebugEnabled()) return Constant.DEBUG_TOKEN_BEGIN + tok + Constant.DEBUG_TOKEN_END; else return tok; }
setFault(e);
recordFault(e);
public void execute() { assertNotCompleted(); try { getRoot().addProvider(getEnvironment()); } catch (RuntimeException e) { setFault(e); } completed(); }
alignment.addObject(object);
alignment.addObject(AnnotationFactory.makeAnnotation(object));
public void endElement (String uri, String name, String qName) { /* if ("".equals (uri)) System.out.println("End element: " + qName); else System.out.println("End element: {" + uri + "}" + name); */ //System.out.println("in endElement "+name+" "+qName+" "+uri); if (name.equals("residue")) { handl...
try{
private void handle_residue_end(String uri, String name, String qName){ try{ alignment.addBlock(current_block); } catch ( DASException e) { e.printStackTrace() ; } }
alignment.addBlock(current_block);
private void handle_residue_end(String uri, String name, String qName){ try{ alignment.addBlock(current_block); } catch ( DASException e) { e.printStackTrace() ; } }
} catch ( DASException e) { e.printStackTrace() ; }
private void handle_residue_end(String uri, String name, String qName){ try{ alignment.addBlock(current_block); } catch ( DASException e) { e.printStackTrace() ; } }
gap_extend[1] = (F[i][j] != scoreMatrix[i][j-1] + delete + gapExt);
gap_extend[1] = (F[i][j] != scoreMatrix[i-1][j] + delete + gapExt);
public double pairwiseAlignment(Sequence query, Sequence subject) throws BioRuntimeException { if (query.getAlphabet().equals(subject.getAlphabet()) && query.getAlphabet().equals(subMatrix.getAlphabet())) { long time = System.currentTimeMillis(); int i, j, maxI = 0, maxJ = 0, queryStar...
public void list() throws Exception
public void list()
public void list() throws Exception { JForumExecutionContext.setContentType("text/javascript"); String filename = this.request.getParameter("js"); this.templateName = "js/" + filename + ".js"; }
try { logger.info("Reloading "+ filename);
logger.info("Reloading "+ filename);
public void fileChanged(String filename) { try { logger.info("Reloading "+ filename); SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG)); ConfigLoader.listenForChanges(); } catch (IOException e) { logger.info(e); e.printStackTrace(); } ...
SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG)); ConfigLoader.listenForChanges(); } catch (IOException e) { logger.info(e); e.printStackTrace(); } }
SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG)); ConfigLoader.listenForChanges(); }
public void fileChanged(String filename) { try { logger.info("Reloading "+ filename); SystemGlobals.initGlobals(SystemGlobals.getApplicationPath(), SystemGlobals.getValue(ConfigKeys.DEFAULT_CONFIG)); ConfigLoader.listenForChanges(); } catch (IOException e) { logger.info(e); e.printStackTrace(); } ...
if (advice.getOriginalClass() != null) { closureDecl.setOriginalCompUnit(advice.getOriginalClass().getCompilationUnit()); }
private CjClassDeclaration createAroundClosure(CjAdviceDeclaration advice) { CReferenceType superClass = new CClassNameType(AROUND_CLOSURE_CLASS); /* create field for every advice parameter */ List fields = new ArrayList(); JFormalParameter[] params = advice.getParameters(); for (int i = 0; i < params.length;...
System.err.println("database.connection.string=" + this.connectionString);
private ConnectionPool() throws IOException, SQLException { SystemGlobals.loadAdditionalDefaults(SystemGlobals.getValue("database.driver.config")); String driver = SystemGlobals.getValue("database.connection.driver"); try { Class.forName(driver); this.minConnections = SystemGlobals.getIntValue("database.co...
if (isRunning()) showConsole();
public void start() { try { if (!isRunning()) { ILaunchConfigurationType configType = DebugPlugin.getDefault() .getLaunchManager() .getLaunchConfigurationT...
aSeqDB = new AnnotatedSequenceDB(seqDB, gffEntries.getAnnotator());
SequenceDB aSeqDB = new AnnotatedSequenceDB(seqDB, gffEntries.getAnnotator());
public static void main(String [] args) throws Exception { if(args.length != 2) { throw new Exception("Use: GFFToFeatures sequence.fa features.gff"); } try { // load in the sequences System.out.println("Loading sequences"); SequenceDB seqDB = loadSequences(new File(args[0])); Sys...
if (part.getContentType().startsWith(SubEthaMessage.DETACHMENT_MIME_TYPE))
String contentType = part.getContentType(); if (contentType.startsWith(SubEthaMessage.DETACHMENT_MIME_TYPE))
protected MailData makeMailData(Mail raw, boolean showEmail) throws NotFoundException { try { InternetAddress addy = raw.getFromAddress(); SubEthaMessage msg = new SubEthaMessage(this.mailSession, raw.getContent()); List<InlinePartData> inlineParts = new ArrayList<InlinePartData>(); List<AttachmentPartD...
String contentType = part.getHeader(SubEthaMessage.HDR_ORIGINAL_CONTENT_TYPE)[0];
contentType = part.getHeader(SubEthaMessage.HDR_ORIGINAL_CONTENT_TYPE)[0];
protected MailData makeMailData(Mail raw, boolean showEmail) throws NotFoundException { try { InternetAddress addy = raw.getFromAddress(); SubEthaMessage msg = new SubEthaMessage(this.mailSession, raw.getContent()); List<InlinePartData> inlineParts = new ArrayList<InlinePartData>(); List<AttachmentPartD...
Long id = (Long)part.getContent();
if (name == null || name.equals("")) name = MailUtils.getNameFromContentType(contentType);
protected MailData makeMailData(Mail raw, boolean showEmail) throws NotFoundException { try { InternetAddress addy = raw.getFromAddress(); SubEthaMessage msg = new SubEthaMessage(this.mailSession, raw.getContent()); List<InlinePartData> inlineParts = new ArrayList<InlinePartData>(); List<AttachmentPartD...
AttachmentPartData apd = new AttachmentPartData(id, contentType, name, part.getSize());
Long id = (Long) part.getContent(); AttachmentPartData apd = new AttachmentPartData(id, contentType, name, 0);
protected MailData makeMailData(Mail raw, boolean showEmail) throws NotFoundException { try { InternetAddress addy = raw.getFromAddress(); SubEthaMessage msg = new SubEthaMessage(this.mailSession, raw.getContent()); List<InlinePartData> inlineParts = new ArrayList<InlinePartData>(); List<AttachmentPartD...
if (!inUse.contains(resource)) { throw new RuntimeException("Attempted to release resource that is not in use");
if (inUse.remove(resource)) { order.addLast(resource); releaseTimes.put(resource, new Long(System.currentTimeMillis())); if (logger.isDebugEnabled()) { logger.debug("Resource successfully released"); lastRelease = new Throwable(); }
public void releaseResource(FileResource resource) { if (resource == null) { return; } synchronized (this) { logger.debug("Releasing resource for " + resource.getServiceContact()); if (!inUse.contains(resource)) { throw new RuntimeException("Attempted to release resource that is not in use"); } inUse.r...
inUse.remove(resource); order.addLast(resource); releaseTimes.put(resource, new Long(System.currentTimeMillis()));
else { if (logger.isDebugEnabled()) { logger.debug("Resource was previously released", new Throwable()); logger.debug("Previous release: ", lastRelease); } } checkIdleResourceCount();
public void releaseResource(FileResource resource) { if (resource == null) { return; } synchronized (this) { logger.debug("Releasing resource for " + resource.getServiceContact()); if (!inUse.contains(resource)) { throw new RuntimeException("Attempted to release resource that is not in use"); } inUse.r...
checkIdleResourceCount();
public void releaseResource(FileResource resource) { if (resource == null) { return; } synchronized (this) { logger.debug("Releasing resource for " + resource.getServiceContact()); if (!inUse.contains(resource)) { throw new RuntimeException("Attempted to release resource that is not in use"); } inUse.r...
for(int i = 0; i < alpha.size(); i++){ Symbol key = indexer.symbolForIndex(0); Double d = (Double)symbolIndices.get(key); if (d == null) { counts[i] = 0.0; } else { counts[i] = d.doubleValue(); }
SymbolWeightMemento[] swm = (SymbolWeightMemento[]) stream.readObject(); for (int m = 0; m < swm.length; ++m) { try { counts[indexer.indexForSymbol(swm[m].symbol)] = swm[m].weight; } catch (IllegalSymbolException ex) { throw new IOException("Symbol in serialized stream can't be found in the alphabet"); }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException{ stream.defaultReadObject(); indexer = AlphabetManager.getAlphabetIndex(alpha); counts = new double[alpha.size()]; for(int i = 0; i < alpha.size(); i++){ Symbol key = indexer.symbolForIndex(0); D...
symbolIndices = null;
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException{ stream.defaultReadObject(); indexer = AlphabetManager.getAlphabetIndex(alpha); counts = new double[alpha.size()]; for(int i = 0; i < alpha.size(); i++){ Symbol key = indexer.symbolForIndex(0); D...
private void writeObject(ObjectOutputStream stream)throws IOException{ symbolIndices = new HashMap(counts.length); for (int i = 0; i < counts.length; i++) { symbolIndices.put(indexer.symbolForIndex(i), new Double(counts[i])); } stream.defaultWriteObject();
private void writeObject(ObjectOutputStream oos) throws IOException { oos.defaultWriteObject(); SymbolWeightMemento[] swm = new SymbolWeightMemento[counts.length]; for (int w = 0; w < swm.length; ++w) { swm[w] = new SymbolWeightMemento(indexer.symbolForIndex(w), counts[w]); } oos.writeObject(swm);
private void writeObject(ObjectOutputStream stream)throws IOException{ symbolIndices = new HashMap(counts.length); for (int i = 0; i < counts.length; i++) { symbolIndices.put(indexer.symbolForIndex(i), new Double(counts[i])); } stream.defaultWriteObject(); }
setText("Comment lines");
setText("Toggle comment");
public CommentAction(SchemeEditor editor) { Assert.isNotNull(editor); setText("Comment lines"); setToolTipText("Comment/Uncomment the selected lines"); mEditor = editor; }
if(fam != null) {
if(fam != null && o2 != null) {
public static Object cast(Object fam, Object o2) { if(fam != null) { if(fam instanceof CaesarObject) { if( ((CaesarObject)o2).family() != fam ) { throw new ClassCastException("illegal family"); } } else if(!(fam instanceof Object)) { throw new ClassCastException("illegal family"); } } ret...
this.context.put("watching", fm.isUserSubscribed(forumId, SessionFacade.getUserSession().getUserId()));
public void show() throws Exception { int forumId = this.request.getIntParameter("forum_id"); // The user can access this forum? Forum forum = ForumRepository.getForum(forumId); if (forum == null || !ForumRepository.isCategoryAccessible(forum.getCategoryId())) { new ModerationHelper().denied(I18n.getMessage(...
if (complementing)
if (isComplement)
private Location parseLocation(String loc) throws SeqException { boolean joining = false; boolean complementing = false; boolean isComplement = false; boolean ranging = false; int start = -1; Location result = null; StringTokenizer toke = new StringTokenizer(loc, "(),. ><", true); int level = 0; while (toke.hasMo...
setWeightImpl(as, weight);
double symNullWeight = this.getNullModel().getWeight(as); setWeightImpl(as, weight * symNullWeight / totalNullWeight);
private void doSetWeight(Symbol sym, double weight) throws IllegalSymbolException, ChangeVetoException { if(sym instanceof AtomicSymbol) { setWeightImpl((AtomicSymbol) sym, weight); } else { FiniteAlphabet fa = (FiniteAlphabet) sym.getMatches(); for(Iterator si = fa.iterator(); si.hasNext(); ) {...
this.injector.inject(this.person1.getAddress().getAddress(), this.ml.getEmail(), new ByteArrayInputStream(rawMsg));
this.injector.inject(this.person1.getAddress().getAddress(), this.ml.getEmail(), rawMsg);
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...
this.injector.inject(this.person1.getAddress().getAddress(), this.ml.getEmail(), new ByteArrayInputStream(rawMsg));
this.injector.inject(this.person1.getAddress().getAddress(), this.ml.getEmail(), rawMsg);
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 List selectGroups(int parentId) throws Exception;
public List selectGroups(int parentId) ;
public List selectGroups(int parentId) throws Exception;
if (seq == null) {
if (seq != null) {
private void _removeAnnotationSource(URL dataSourceURL) throws ChangeVetoException { FeatureHolder fh = (FeatureHolder) featureSets.get(dataSourceURL); if (fh != null) { for (Iterator i = structure.features(); i.hasNext(); ) { DASComponentFeature dcf = (DASComponentFeature) i.next(); DASSequence se...
public void delete(Config config) throws Exception
public void delete(Config config)
public void delete(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.delete")); p.setInt(1, config.getId()); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.delete")); p.setInt(1, config.getId()); p.executeUpdate(); p.close();
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.delete")); p.setInt(1, config.getId()); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr delete()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close...
public void delete(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.delete")); p.setInt(1, config.getId()); p.executeUpdate(); p.close(); }
public void insert(Config config) throws Exception
public void insert(Config config)
public void insert(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.insert")); p.setString(1, config.getName()); p.setString(2, config.getValue()); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.insert")); p.setString(1, config.getName()); p.setString(2, config.getValue()); p.executeUpdate(); p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.insert")); p.setString(1, config.getName()); p.setString(2, config.getValue()); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr insert()"; log.error(es, e); throw new RuntimeExc...
public void insert(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.insert")); p.setString(1, config.getName()); p.setString(2, config.getValue()); p.executeUpdate(); p.close(); }
protected Config makeConfig(ResultSet rs) throws Exception
protected Config makeConfig(ResultSet rs) throws SQLException
protected Config makeConfig(ResultSet rs) throws Exception { Config c = new Config(); c.setId(rs.getInt("config_id")); c.setName(rs.getString("config_name")); c.setValue(rs.getString("config_value")); return c; }
public List selectAll() throws Exception
public List selectAll()
public List selectAll() throws Exception { List l = new ArrayList(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectAll")); ResultSet rs = p.executeQuery(); while (rs.next()) { l.add(this.makeConfig(rs)); } rs.close(); p.close(); re...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectAll")); ResultSet rs = p.executeQuery(); while (rs.next()) { l.add(this.makeConfig(rs)); } rs.close(); p.close(); return l; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectAll")); rs = p.executeQuery(); while (rs.next()) { l.add(this.makeConfig(rs)); } return l; } catch (SQLException e) { String es = "Erorr selectAll()"; log.error(es, e);...
public List selectAll() throws Exception { List l = new ArrayList(); PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectAll")); ResultSet rs = p.executeQuery(); while (rs.next()) { l.add(this.makeConfig(rs)); } rs.close(); p.close(); re...
public Config selectByName(String name) throws Exception
public Config selectByName(String name)
public Config selectByName(String name) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectByName")); p.setString(1, name); ResultSet rs = p.executeQuery(); Config c = null; if (rs.next()) { c = this.makeConfig(rs); } rs...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectByName")); p.setString(1, name); ResultSet rs = p.executeQuery(); Config c = null; if (rs.next()) { c = this.makeConfig(rs); } rs.close(); p.close(); return c; }
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectByName")); p.setString(1, name); rs = p.executeQuery(); Config c = null; if (rs.next()) { c = this.makeConfig(rs); } return c; } catch (SQLException e) { String es = "...
public Config selectByName(String name) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.selectByName")); p.setString(1, name); ResultSet rs = p.executeQuery(); Config c = null; if (rs.next()) { c = this.makeConfig(rs); } rs...
public void update(Config config) throws Exception
public void update(Config config)
public void update(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.update")); p.setString(1, config.getValue()); p.setString(2, config.getName()); p.executeUpdate(); p.close(); }
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.update")); p.setString(1, config.getValue()); p.setString(2, config.getName()); p.executeUpdate(); p.close(); }
PreparedStatement p=null; try { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.update")); p.setString(1, config.getValue()); p.setString(2, config.getName()); p.executeUpdate(); } catch (SQLException e) { String es = "Erorr update()"; log.error(es, e); throw new RuntimeExc...
public void update(Config config) throws Exception { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("ConfigModel.update")); p.setString(1, config.getValue()); p.setString(2, config.getName()); p.executeUpdate(); p.close(); }
rawSub == null,
rawSub != null,
public static MyListRelationship myListRelationship(Person rawPerson, MailingList rawList) { Set<Permission> perms = rawList.getPermissionsFor(rawPerson); perms.size(); // initialize if it's a proxy Subscription rawSub = (rawPerson == null) ? null : rawPerson.getSubscription(rawList.getId()); EmailAddress delive...
setFault(e);
recordFault(e);
public void execute() { assertNotCompleted(); try { getTheConnection().stop(); } catch (RuntimeException e) { setFault(e); } catch (JMSException e) { LOG.error(e); setFault(new HJBException(e)); } completed(); }
LOG.error(e); setFault(new HJBException(e));
recordFault(new HJBException(e));
public void execute() { assertNotCompleted(); try { getTheConnection().stop(); } catch (RuntimeException e) { setFault(e); } catch (JMSException e) { LOG.error(e); setFault(new HJBException(e)); } completed(); }
int pos; if(src.getDirection()==src.HORIZONTAL) { pos = src.graphicsToSequence(me.getX()); } else { pos = src.graphicsToSequence(me.getY()); }
int pos = src.graphicsToSequence(me.getPoint());
public SequenceViewerEvent processMouseEvent( SequenceRenderContext src, MouseEvent me, List path, int min, int max ) { path.add(this); int pos; if(src.getDirection()==src.HORIZONTAL) { pos = src.graphicsToSequence(me.getX()); } else { pos = src.graphicsToSequence(me.getY()); } ...
if(prefix instanceof JSuperExpression) {
if(!method.getOwner().isObjectClass()) { if(prefix instanceof JSuperExpression) { method.genCode( context, true, callerClass.getSuperClass().getQualifiedName()); } else { String prefixTarget = null; if(prefix == null || prefix instanceof JOwnerExpression) { prefixTarget = callerClass.getQualifiedName(); } else { prefix...
public void genCode(GenerationContext context, boolean discardValue) { if(prefix == null) { System.out.println(); } CodeSequence code = context.getCodeSequence(); TypeFactory factory = context.getTypeFactory(); setLineNumber(code); if (!method.isStatic()) { prefix.genCode(context, fals...