rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
IConsole console = DebugUITools.getConsole(getProcess()); | IProcess process = getProcess(); if (process == null || process.getLaunch() == null) return; IConsole console = DebugUITools.getConsole(process); | public void showConsole() { IConsole console = DebugUITools.getConsole(getProcess()); ConsolePlugin.getDefault().getConsoleManager().showConsoleView(console); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IViewPart view = page.findView("org.e... |
} | public void start() { IInterpreterProcess instance = getProcess(); if (instance != null && instance.getLaunch() == null) { try { ILaunchConfigurationType configType = DebugPlugin.getDefault() .getLaunchManager()... | |
this.server = new SMTPServer("localhost", null, 2525, listeners); | this.server = new SMTPServer(listeners); this.server.setPort(2525); this.server.setHostName("localhost"); | public LoadTester() throws Exception { Collection<MessageListener> listeners = new ArrayList<MessageListener>(1); listeners.add(this.listener); this.server = new SMTPServer("localhost", null, 2525, listeners); } |
if (document.getPartition(mouseOffset).getType() == SchemePartitionScanner.SCHEME_COMMENT) | if (SchemeTextUtilities.getPartition(document, mouseOffset).getType() == SchemePartitionScanner.SCHEME_COMMENT) | public void run() { SchemeEditor editor = getSchemeEditor(); if (editor == null) return; Region selection = editor.getSelection(); SexpNavigator explorer = editor.getExplorer(); IDocument document = editor.getDocument(); try { int mouseOffset = editor.... |
lsParser.setEndOfRecord(TagValueParser.BLANK_LINE_EOR); | lsParser.setEndOfRecord(TagValueParser.EMPTY_LINE_EOR); | private static void loadData(InputStream is) { nameToEnzyme = new HashMap(); nameToIsoschizomers = new HashMap(); sizeToCutters = new HashMap(); enzymeToPattern = new HashMap(); try { BufferedReader br = new BufferedReader(new InputStreamReade... |
rs.next(); Date firstTime = new Date(rs.getTimestamp(1).getTime()); rs.close(); rs=null; s.close(); s=null; | if (rs.next()) { | public ForumStats getBoardStatus() { ForumStats fs = new ForumStats(); fs.setPosts(this.getTotalMessages()); Connection c = JForumExecutionContext.getConnection(); // Total Users Statement s=null; ResultSet rs=null; try { s = c.createStatement(); rs = s.executeQuery(Sy... |
Date today = new Date(); | Date firstTime = new Date(rs.getTimestamp(1).getTime()); rs.close(); rs=null; s.close(); s=null; | public ForumStats getBoardStatus() { ForumStats fs = new ForumStats(); fs.setPosts(this.getTotalMessages()); Connection c = JForumExecutionContext.getConnection(); // Total Users Statement s=null; ResultSet rs=null; try { s = c.createStatement(); rs = s.executeQuery(Sy... |
double perDay = firstTime != null ? fs.getPosts() / this.daysUntilToday(today, firstTime) : 0; | Date today = new Date(); | public ForumStats getBoardStatus() { ForumStats fs = new ForumStats(); fs.setPosts(this.getTotalMessages()); Connection c = JForumExecutionContext.getConnection(); // Total Users Statement s=null; ResultSet rs=null; try { s = c.createStatement(); rs = s.executeQuery(Sy... |
if (fs.getPosts() > 0 && perDay < 1) { perDay = 1; | postPerDay = firstTime != null ? fs.getPosts() / this.daysUntilToday(today, firstTime) : 0; if (fs.getPosts() > 0 && postPerDay < 1) { postPerDay = 1; } topicPerDay = firstTime != null ? fs.getTopics() / this.daysUntilToday(today, firstTime) : 0; s = c.createStatement(); rs = s.executeQuery(SystemGlobals.getSql("F... | public ForumStats getBoardStatus() { ForumStats fs = new ForumStats(); fs.setPosts(this.getTotalMessages()); Connection c = JForumExecutionContext.getConnection(); // Total Users Statement s=null; ResultSet rs=null; try { s = c.createStatement(); rs = s.executeQuery(Sy... |
fs.setPostsPerDay(perDay); perDay = firstTime != null ? fs.getTopics() / this.daysUntilToday(today, firstTime) : 0; fs.setTopicsPerDay(perDay); s = c.createStatement(); rs = s.executeQuery(SystemGlobals.getSql("ForumModel.statsFirstRegisteredUserTime")); rs.next(); firstTime = new Date(rs.getTimestamp(1).getTime()... | fs.setPostsPerDay(postPerDay); fs.setTopicsPerDay(topicPerDay); fs.setUsersPerDay(userPerDay); | public ForumStats getBoardStatus() { ForumStats fs = new ForumStats(); fs.setPosts(this.getTotalMessages()); Connection c = JForumExecutionContext.getConnection(); // Total Users Statement s=null; ResultSet rs=null; try { s = c.createStatement(); rs = s.executeQuery(Sy... |
public static void changeBoardDefault(String newDefaultLanguage) throws Exception | public static void changeBoardDefault(String newDefaultLanguage) | public static void changeBoardDefault(String newDefaultLanguage) throws Exception { load(newDefaultLanguage, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT_ADMIN)); defaultName = newDefaultLanguage; } |
public static synchronized void load() throws IOException | public static synchronized void load() | public static synchronized void load() throws IOException { baseDir = SystemGlobals.getApplicationResourceDir() + "/" + SystemGlobals.getValue(ConfigKeys.LOCALES_DIR); loadLocales(); defaultName = SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT_ADMIN); load(defaultName, null); String custom = SystemGlobals.getValu... |
private static void loadLocales() throws IOException | private static void loadLocales() | private static void loadLocales() throws IOException { localeNames.load(new FileInputStream(baseDir + SystemGlobals.getValue(ConfigKeys.LOCALES_NAMES))); } |
localeNames.load(new FileInputStream(baseDir + SystemGlobals.getValue(ConfigKeys.LOCALES_NAMES))); } | try { localeNames.load(new FileInputStream(baseDir + SystemGlobals.getValue(ConfigKeys.LOCALES_NAMES))); } catch (IOException e) { String es = "Erorr loadLocales()"; logger.error(es, e); throw new RuntimeException(es, e); } } | private static void loadLocales() throws IOException { localeNames.load(new FileInputStream(baseDir + SystemGlobals.getValue(ConfigKeys.LOCALES_NAMES))); } |
logger.info("Reloading i18n for " + localeName); | if (logger.isDebugEnabled()) { logger.info("Reloading i18n for " + localeName); } | private static void watchForChanges(final String localeName) { if (!watching.contains(localeName)) { watching.add(localeName); int fileChangesDelay = SystemGlobals.getIntValue(ConfigKeys.FILECHANGES_DELAY); if (fileChangesDelay > 0) { FileMonitor.getInstance().addFileChangeListener(new FileChangeListener() {... |
try { I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); } catch (IOException e) { logger.warn(e); e.printStackTrace(); } | I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); | private static void watchForChanges(final String localeName) { if (!watching.contains(localeName)) { watching.add(localeName); int fileChangesDelay = SystemGlobals.getIntValue(ConfigKeys.FILECHANGES_DELAY); if (fileChangesDelay > 0) { FileMonitor.getInstance().addFileChangeListener(new FileChangeListener() {... |
logger.info("Reloading i18n for " + localeName); | if (logger.isDebugEnabled()) { logger.info("Reloading i18n for " + localeName); } | public void fileChanged(String filename) { logger.info("Reloading i18n for " + localeName); try { I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); } catch (IOException e) { logger.warn(e); e.printStackTrace(); } } |
try { I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); } catch (IOException e) { logger.warn(e); e.printStackTrace(); } | I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); | public void fileChanged(String filename) { logger.info("Reloading i18n for " + localeName); try { I18n.load(localeName, SystemGlobals.getValue(ConfigKeys.I18N_DEFAULT), true); } catch (IOException e) { logger.warn(e); e.printStackTrace(); } } |
public void addAttachment(Attachment a) throws Exception; | public void addAttachment(Attachment a); | public void addAttachment(Attachment a) throws Exception; |
public Map extensionsForSecurity() throws Exception; | public Map extensionsForSecurity(); | public Map extensionsForSecurity() throws Exception; |
public void removeAttachment(int id, int postId) throws Exception; | public void removeAttachment(int id, int postId); | public void removeAttachment(int id, int postId) throws Exception; |
public AttachmentExtension selectExtension(String extension) throws Exception; | public AttachmentExtension selectExtension(String extension); | public AttachmentExtension selectExtension(String extension) throws Exception; |
public QuotaLimit selectQuotaLimitByGroup(int groupId) throws Exception; | public QuotaLimit selectQuotaLimitByGroup(int groupId) ; | public QuotaLimit selectQuotaLimitByGroup(int groupId) throws Exception; |
assertFalse(listingCommand.isRecursive()); | public void testJMSCommandAndItsRunnerAreGeneratedCorrectly() { Mock mockRequest = generateMockRequest(); mockRequest.expects(atLeastOnce()) .method("getPathInfo") .will(returnValue("/testProvider/testFactory/with/slash/connection-0/session-0/list")); HttpServletRequest te... | |
assertTrue(generator.matches("/foo/baz/multiple/slashes/connection-5/session-3/list?recurse=bling")); | public void testMatchWorksCorrectly() { assertFalse(generator.matches("/")); assertFalse(generator.matches("//")); assertFalse(generator.matches("///")); assertFalse(generator.matches("/foo/")); assertFalse(generator.matches("/foo/bar/connection-1/sesssion0")); assertTrue(g... | |
InternetAddress[] addresses = InternetAddress.parse(model.emails); | InternetAddress[] addresses = null; if (model.emails.indexOf(',') <= 0) { StringTokenizer st = new StringTokenizer(model.emails); addresses = new InternetAddress[st.countTokens()]; int i = 0; while (st.hasMoreTokens()) { String token = (String)st.nextToken(); addresses[i] = new InternetAddress(token); i++; } } else ... | public void execute() throws Exception { Model model = (Model)this.getCtx().getModel(); MassSubscribeType how = MassSubscribeType.valueOf(model.how); try { InternetAddress[] addresses = InternetAddress.parse(model.emails); Backend.instance().getListMgr().massSubscribe(model.listId, how, addresses); } ... |
model.addedEmails = new HashSet<String>(addresses.length); for (InternetAddress address : addresses) { model.addedEmails.add(address.getAddress()); } | public void execute() throws Exception { Model model = (Model)this.getCtx().getModel(); MassSubscribeType how = MassSubscribeType.valueOf(model.how); try { InternetAddress[] addresses = InternetAddress.parse(model.emails); Backend.instance().getListMgr().massSubscribe(model.listId, how, addresses); } ... | |
"No output has been generated yet.\n\n" + "Are you sure you want to exit?", "Nothing Generated", | res.getString("NO_OUTPUT_GENERATED") + res.getString("ARE_YOU_SURE_EXIT"), res.getString("NOTHING_GENERATED"), | private boolean checkDontExitUnsavedPhotos() { boolean dontExit = false; if( publishManager.isUnsavedPhotos() ) { Toolkit.getDefaultToolkit().beep(); int result = JOptionPane.showConfirmDialog( this, "No output has been generated yet.\n\n" + ... |
char [] cbuf = new char [1]; | while (true) { reader.mark(1); int c = reader.read(); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); ctx.addParseErrorListener(this); String line; boolean hasAnotherSequence = true... |
while (true) { reader.mark(1); | if (c == -1) { hasAnotherSequence = false; break; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); ctx.addParseErrorListener(this); String line; boolean hasAnotherSequence = true... |
if (reader.read() == -1) { hasAnotherSequence = false; break; } | if (Character.isWhitespace((char) c)) { hasInternalWhitespace = true; continue; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); ctx.addParseErrorListener(this); String line; boolean hasAnotherSequence = true... |
reader.read(cbuf, 0, 1); | if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); ctx.addParseErrorListener(this); String line; boolean hasAnotherSequence = true... |
if (Character.isWhitespace(cbuf[0])) { hasInternalWhitespace = true; continue; } else { if (hasInternalWhitespace) System.err.println("Warning: whitespace found between sequence entries"); reader.reset(); break; } } | reader.reset(); break; } | public boolean readSequence(BufferedReader reader, SymbolParser symParser, SeqIOListener listener) throws IllegalSymbolException, IOException, ParseException { GenbankContext ctx = new GenbankContext(symParser, listener); ctx.addParseErrorListener(this); String line; boolean hasAnotherSequence = true... |
if ("href".equals(name) && a.getValue() != null && a.getValue().toLowerCase().indexOf("javascript") > -1) { | if (("href".equals(name) || "src".equals(name)) && a.getValue() != null && a.getValue().toLowerCase().indexOf("javascript:") > -1) { | private void checkAndValidateAttributes(Tag tag) { Vector newAttributes = new Vector(); for (Iterator iter = tag.getAttributesEx().iterator(); iter.hasNext(); ) { Attribute a = (Attribute)iter.next(); String name = a.getName(); if (name != null) { name = name.toLowerCase(); if ("href".equals(name) && a.g... |
double scale = bullet.getPower() * 1.5; | double scale = 2 * Math.sqrt(2.5 * bullet.getPower()); | private void drawBullets(Graphics2D g) { BulletPeer bullet; double x, y; for (int i = 0; i < battle.getBullets().size(); i++) { bullet = (BulletPeer) battle.getBullets().elementAt(i); if (!bullet.isActive() && !bullet.hitVictim && !bullet.hitBullet) { continue; } x = bullet.getX(); y = battle.getBatt... |
"DeploymentTest.java", | protected void setUp() throws Exception { super.setUp(); if (doSetUp) { try { removeClassFiles(); allUnits = new Vector(); // these files should not raise errors String[] args = new String[] { "NestedAspectTest.java", "JoinPointReflectionTest.java",// "DeploymentTest.java", "Sim... | |
stderr.append(e.toString()); | stderr.append(e.getException().toString()); | protected void printFailure(FailureNotificationEvent e) { stderr.append("\nExecution failed:\n"); stderr.append(e.toString()); stderr.append("\n"); } |
if (JComponent.class.isInstance(context)) { Rectangle visible = ((JComponent) context).getVisibleRect(); AffineTransform t = g.getTransform(); t.translate(visible.getX(), visible.getY()); try { if (! t.createInverse().createTransformedShape(visible) .intersects(posXW, posYN, width, height)) return; } catch (Non... | protected void renderBead(final Graphics2D g, final Feature f, final SequenceRenderContext context) { Location loc = f.getLocation(); int min = loc.getMin(); int max = loc.getMax(); int dif = max - min; Shape shape; if (context.getDirection() == context.HORIZONTAL) { ... | |
shape = new Rectangle2D.Double(posXW, posYN, width, height); | shape = new Rectangle2D.Double(posXW, posYN, Math.floor(width), Math.floor(height)); | protected void renderBead(final Graphics2D g, final Feature f, final SequenceRenderContext context) { Location loc = f.getLocation(); int min = loc.getMin(); int max = loc.getMax(); int dif = max - min; Shape shape; if (context.getDirection() == context.HORIZONTAL) { ... |
public Object buildObject(Class clazz, Object[] params) { | public Object buildObject(Class clazz, List paramsList) { | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
for (int i = 0; i < params.length; i++) { query = this.setParameter.invoke(query, new Object[]{new Integer(i), params[i]}); | for (int i = 0; i < paramsList.size(); i++) { query = this.setParameter.invoke(query, new Object[]{new Integer(i), paramsList.get(i)}); | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
Class[] types = new Class[params.length]; | Class[] types = new Class[paramsList.size()]; | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
for (int i = 0; i < params.length; i++) types[i] = params[i].getClass(); | for (int i = 0; i < paramsList.size(); i++) types[i] = paramsList.get(i).getClass(); | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
Object o = c.newInstance(params); | Object o = c.newInstance(paramsList.toArray()); | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
for (int i = 0; i < params.length; i++) { if (params[i]==null) paramsstuff.append("null"); else paramsstuff.append(params[i].toString()); if (i<(params.length-1)) paramsstuff.append(","); | for (int i = 0; i < paramsList.size(); i++) { if (paramsList.get(i)==null) paramsstuff.append("null"); else paramsstuff.append(paramsList.get(i).toString()); if (i<(paramsList.size()-1)) paramsstuff.append(","); | public Object buildObject(Class clazz, Object[] params) { // Create the Hibernate query to look it up with String queryText; String queryType; if (clazz==SimpleNamespace.class) { queryText = "from Namespace as ns where ns.name = ?"; queryType = "Namespace"; }... |
asAMapMessage(message).getBoolean(name); return true; | return isReallyABoolean(asAMapMessage(message).getString(name)); | public boolean canBeEncoded(String name, Message message) throws HJBException { try { asAMapMessage(message).getBoolean(name); return true; } catch (JMSException e) { return false; } catch (NumberFormatException e) { return false; } ... |
return encode(new Boolean(asAMapMessage(message).getBoolean(name))); | String asString = asAMapMessage(message).getString(name); if (isReallyABoolean(asString)) { return encode(new Boolean(asAMapMessage(message).getBoolean(name))); } else { return handleInvalidBooleanFailure(name, asString); } | public String getAsEncodedValue(String name, Message message) throws HJBException { try { return encode(new Boolean(asAMapMessage(message).getBoolean(name))); } catch (JMSException e) { return handleValueReadFailure(name, e, message); } catch (NumberFormatExcept... |
methods[i].getParameters(), | public void completeCClassInterfaces(CCompilationUnitContext context) throws PositionedError { CjVirtualClassDeclaration implDecl = getCorrespondingClassDeclaration(); JMethodDeclaration methods[] = implDecl.getMethods(); List interfaceMethodDecls = new LinkedList(); List interfa... | |
String subjectID = (String) subHitData.get("HitId"); | String subjectID = (String) hitData.get("subjectId"); | private void makeSimilarity() throws BioException { subHitData.putAll(resultData); subHitData.putAll(hitData); // Try to get a valid TokenParser if (tokenParser == null) { String identifier; // Try explicit sequence type first if (subHitData.con... |
qf.addChangeListener(ChangeListener.ALWAYS_VETO); sf.addChangeListener(ChangeListener.ALWAYS_VETO); | qf.addChangeListener(ChangeListener.ALWAYS_VETO, ChangeType.UNKNOWN); sf.addChangeListener(ChangeListener.ALWAYS_VETO, ChangeType.UNKNOWN); | private void makeSimilarity() throws BioException { subHitData.putAll(resultData); subHitData.putAll(hitData); // Try to get a valid TokenParser if (tokenParser == null) { String identifier; // Try explicit sequence type first if (subHitData.con... |
throw new BioError("Assertion failure creating SimilarityPairFeature. Template modification vetoed",cve); | throw new BioError("Assertion failure creating " + "SimilarityPairFeature. Template " + "modification vetoed",cve); | private void makeSimilarity() throws BioException { subHitData.putAll(resultData); subHitData.putAll(hitData); // Try to get a valid TokenParser if (tokenParser == null) { String identifier; // Try explicit sequence type first if (subHitData.con... |
+ HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + CR + "delivery-mode=(int 1)" + CR + "disable-message-ids=(boolean false)" + CR + "disable-timestamps=(boolean true)" + CR + "priority=(int -3)" + CR + "time-to-live=(long 10002000)"; | + '\t' + HJBConstants.CREATION_TIME + "=" + defaultClockTimeAsHJBEncodedLong() + ", delivery-mode=(int 1)" + ", disable-message-ids=(boolean false)" + ", disable-timestamps=(boolean true)" + ", priority=(int -3), time-to-live=(long 10002000)"; | public void testLongDescriptionOutputsAllValues() { Mock mockProducer = mock(MessageProducer.class); Mock mockDestination = mock(Destination.class); mockProducer.stubs() .method("getDeliveryMode") .will(returnValue(DeliveryMode.NON_PERSISTENT)); mockProducer.stubs()... |
index = new SimpleIndex((File) seqFiles.get((Integer) enRecord[3]), | index = new SimpleIndex(new File(pathPrefix, (String) seqFiles.get((Integer) enRecord[3])), | public Index fetch(String id) throws IllegalIDException, BioException { Index index = null; try { Object [] enRecord = entryRandomAccess.findRecord(id); if (enRecord.length == 0) throw new IllegalIDException("Failed to find id: " + id); index =... |
seqFiles.put(fileNumber, new File(fileName)); | seqFiles.put(fileNumber, fileName); | 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 ... |
SeqIOTools.fileToFormat( SeqIOTools.guessFileType((File) seqFiles.get(0)) | SeqIOTools.getBuilderFactory( SeqIOTools.identifyFormat((File) seqFiles.get(0)) | public static void main(String[] args) throws Exception { File dataStoreFile = null; int wordSize = 10; int stepSize = 1; int threshold = 20000; List seqFiles = new ArrayList(); for(int i = 0; i < args.length; i++) { if (args[i].charAt(0) == '-') { if ("-threshold".equals(args[i])) { threshold = Intege... |
ChangeEvent ce = new ChangeEvent(this, SequenceRenderContext.REPAINT); | ChangeEvent ce = new ChangeEvent( this, SequenceRenderContext.REPAINT, p, this.fill ); | public void setFill(Paint p) throws ChangeVetoException { if(hasListeners()) { ChangeSupport cs = getChangeSupport(SequenceRenderContext.REPAINT); synchronized(cs) { ChangeEvent ce = new ChangeEvent(this, SequenceRenderContext.REPAINT); cs.firePreChangeEvent(ce); this.fill = p; ... |
assertEquals(this.pers2.getEmail(), msg.getFrom()); | assertEquals(this.pers2.getAddress().toString(), msg.getFrom()); | public void testDiscard() throws Exception { this.injector.inject(this.pers2.getAddress().getAddress(), this.ml.getEmail(), rawMsg); Thread.sleep(1000); assertEquals(1, this.smtp.count(MailType.MAIL_HELD)); Collection<MailHold> msgs = this.admin.getListMgr().getHeldMessages(this.ml.getId()); assertEquals(1, msg... |
return parseLocString(featureNS,featureAccession,crossRef,strand,subLocStr); | List resultBlocks = new ArrayList(RichLocation.Tools.flatten(parseLocString(featureNS,featureAccession,crossRef,strand,subLocStr))); Collections.reverse(resultBlocks); return RichLocation.Tools.construct(resultBlocks); | 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... |
public SimpleRichLocation(Position min, Position max, int rank, Strand strand, CrossRef crossRef) { this.min = min; this.max = max; this.rank = rank; this.strand = strand; this.crossRef = crossRef; this.feature = null; | public SimpleRichLocation(Position pos, int rank) { this(pos,pos,rank,Strand.POSITIVE_STRAND); | public SimpleRichLocation(Position min, Position max, int rank, Strand strand, CrossRef crossRef) { this.min = min; this.max = max; this.rank = rank; this.strand = strand; this.crossRef = crossRef; this.feature = null; } |
public SimplePosition(boolean fs, boolean fe, int s, int e, String t) { this.fs = fs; this.fe = fe; this.s = s; this.e = e; this.t = t; | public SimplePosition(int p) { this(false,false,p); | public SimplePosition(boolean fs, boolean fe, int s, int e, String t) { this.fs = fs; this.fe = fe; this.s = s; this.e = e; this.t = t; } |
return DNATools.getDNA().getParser("token"); | return ProteinTools.getTAlphabet().getParser("token"); | private static SymbolParser getProteinParser() { try { return DNATools.getDNA().getParser("token"); } catch (BioException ex) { throw new BioError(ex, "Assertion failing: Couldn't get PROTEIN token parser"); } } |
if (result == false) { return false; } | public boolean evaluate(Object item) { boolean result = false; try { for (Filter filter : filterSet.getFilters()) { String property = filter.getProperty(); Object value = PropertyUtils.getProperty(item, property); if (value != null) { FilterMatch match = matches.get(filter); result = match.evaluat... | |
gunCoolingRateField.setPreferredSize(new Dimension(50, 16)); | private JTextField getGunCoolingRateField() { if (gunCoolingRateField == null) { gunCoolingRateField = new JTextField(); gunCoolingRateField.setPreferredSize(new Dimension(50, 16)); } return gunCoolingRateField; } | |
if( strand.equalsIgnoreCase("true") ) | if( "true".equalsIgnoreCase(strand) ) | public void endElementHandler( String nsURI, String localName, String qName, StAXContentHandler handler) throws SAXException { int currLevel = staxenv.getLevel(); if (currLevel >=1) { ListIterator li = staxenv... |
else if( strand.equalsIgnoreCase("false") ) | else if( "false".equalsIgnoreCase(strand) ) | public void endElementHandler( String nsURI, String localName, String qName, StAXContentHandler handler) throws SAXException { int currLevel = staxenv.getLevel(); if (currLevel >=1) { ListIterator li = staxenv... |
.will(returnValue("/testProvider/testFactory/with/slash/connection-0/list")); | .will(returnValue("/testProvider/testFactory/with/slash/connection-0/list?recurse")); | public void testJMSCommandAndItsRunnerAreGeneratedCorrectly() { Mock mockRequest = generateMockRequest(); mockRequest.expects(atLeastOnce()) .method("getPathInfo") .will(returnValue("/testProvider/testFactory/with/slash/connection-0/list")); HttpServletRequest testRequest ... |
assertTrue(listingCommand.isRecursive()); | public void testJMSCommandAndItsRunnerAreGeneratedCorrectly() { Mock mockRequest = generateMockRequest(); mockRequest.expects(atLeastOnce()) .method("getPathInfo") .will(returnValue("/testProvider/testFactory/with/slash/connection-0/list")); HttpServletRequest testRequest ... | |
assertTrue(generator.matches("/foo/bar/connection-1/list")); | assertTrue(generator.matches("/foo/bar/connection-1/list?recurse")); | public void testMatchWorksCorrectly() { assertFalse(generator.matches("/")); assertFalse(generator.matches("//")); assertFalse(generator.matches("///")); assertFalse(generator.matches("/foo/")); assertFalse(generator.matches("/foo/bar/connection-1/sesssion0")); assertTrue(g... |
assertTrue(generator.matches("/foo/baz/multiple/slashes/connection-5/list?recurse=AnyTing")); | public void testMatchWorksCorrectly() { assertFalse(generator.matches("/")); assertFalse(generator.matches("//")); assertFalse(generator.matches("///")); assertFalse(generator.matches("/foo/")); assertFalse(generator.matches("/foo/bar/connection-1/sesssion0")); assertTrue(g... | |
return poLine;; | return poLine; | private String hmmerDomainSummaryReached(String poLine) throws SAXException { //To be implemented - parse Contents stream up to end of //domain summary via delegation (analagous to hits parsing oAtts.clear(); this.startElement(new QName(this,this.prefix("DomainSummary")), (Attributes)oAtts); int iProgram =... |
tagNames.put(new Integer(0x010e), "Image Description "); tagNames.put(new Integer(0x010f), "Manufacture Make "); tagNames.put(new Integer(0x0110), "Manufacture Model "); tagNames.put(new Integer(0x0112), "Camera Orientation "); tagNames.put(new Integer(0x011a), "X Resolution ... | tagNames.put(new Integer(IMAGE_DESCRIPTION), "Image Description "); tagNames.put(new Integer(CAMERA_MAKE), "Manufacture Make "); tagNames.put(new Integer(CAMERA_MODEL), "Manufacture Model "); tagNames.put(new Integer(IMAGE_ORIENTATION), "Camera Orientation "); tagNames.put(new In... | public ExifConstants() { tagNames = new HashMap(); tagNames.put(new Integer(0x010e), "Image Description "); tagNames.put(new Integer(0x010f), "Manufacture Make "); tagNames.put(new Integer(0x0110), "Manufacture Model "); tagNames.put(new Integer(0x01... |
tagNames.put(new Integer(0x0128), "Resolution Unit "); tagNames.put(new Integer(0x0131), "Firmware Version "); tagNames.put(new Integer(0x0132), "Last Modified "); tagNames.put(new Integer(0x013e), "White Point "); tagNames.put(new Integer(0x013f), "Primary Chromatic... | tagNames.put(new Integer(RESOLUTION_UNIT), "Resolution Unit "); tagNames.put(new Integer(FIRMWARE_VERSION), "Firmware Version "); tagNames.put(new Integer(MODIFIED_DATE), "Last Modified "); tagNames.put(new Integer(WHITE_POINT), "White Point "); tagNames.put(new Inte... | public ExifConstants() { tagNames = new HashMap(); tagNames.put(new Integer(0x010e), "Image Description "); tagNames.put(new Integer(0x010f), "Manufacture Make "); tagNames.put(new Integer(0x0110), "Manufacture Model "); tagNames.put(new Integer(0x01... |
tagNames.put(new Integer(0x0213), "YCbCr Positioning "); tagNames.put(new Integer(0x0214), "Black/White Reference "); tagNames.put(new Integer(0x8298), "Copyright "); | tagNames.put(new Integer(YCBCR_POSITIONING), "YCbCr Positioning "); tagNames.put(new Integer(REFERENCE_BLACK_WHITE), "Black/White Reference "); tagNames.put(new Integer(COPYRIGHT), "Copyright "); | public ExifConstants() { tagNames = new HashMap(); tagNames.put(new Integer(0x010e), "Image Description "); tagNames.put(new Integer(0x010f), "Manufacture Make "); tagNames.put(new Integer(0x0110), "Manufacture Model "); tagNames.put(new Integer(0x01... |
tagNames.put(new Integer(0x829a), "Exposure Time "); tagNames.put(new Integer(0x829d), "F Number "); tagNames.put(new Integer(0x8822), "Exposure Program "); tagNames.put(new Integer(0x8827), "ISO Rating "); tagNames.put(new Integer(0x9000), "EXIF Version ... | tagNames.put(new Integer(SHUTTER_SPEED), "Exposure Time "); tagNames.put(new Integer(F_NUMBER), "F Number "); tagNames.put(new Integer(EXPOSURE_PROGRAM), "Exposure Program "); tagNames.put(new Integer(ISO_RATING), "ISO Rating "); tagNames.put(new Integer(EXIF... | public ExifConstants() { tagNames = new HashMap(); tagNames.put(new Integer(0x010e), "Image Description "); tagNames.put(new Integer(0x010f), "Manufacture Make "); tagNames.put(new Integer(0x0110), "Manufacture Model "); tagNames.put(new Integer(0x01... |
public static String getName(int i) { | public static String getName( final int i ) { | public static String getName(int i) { return (String) tagNames.get(new Integer(i)); } |
{ | synchronized (hs) { | public String handleHTTPGet(String path) throws PluginHTTPException { StringBuffer out = new StringBuffer(); String[] pathelements = path.split("\\?"); /* String[] getelements = getArrayElement(pathelements, 1).split("\\?"); for (int i = 0; i < getelements.length ; i++) { if (getelements[i].startsWith("page="))... |
for (int i = 0 ; i < searchWords.length ; i++) { HashSet keyuris = (HashSet)index.get(searchWords[i].toLowerCase().trim()); Iterator it = hs.iterator(); while (it.hasNext()) { Object o = it.next(); if (!keyuris.contains(o)) hs.remove(o); | synchronized (hs) { for (int i = 0 ; i < searchWords.length ; i++) { HashSet keyuris = (HashSet)index.get(searchWords[i].toLowerCase().trim()); Iterator it = hs.iterator(); while (it.hasNext()) { Object o = it.next(); if (!keyuris.contains(o)) hs.remove(o); } | public String handleHTTPGet(String path) throws PluginHTTPException { StringBuffer out = new StringBuffer(); String[] pathelements = path.split("\\?"); /* String[] getelements = getArrayElement(pathelements, 1).split("\\?"); for (int i = 0; i < getelements.length ; i++) { if (getelements[i].startsWith("page="))... |
out.append(" <A HREF=\"/" + o.URI + "\" title=\""+o.URI+"\">" + showurl + "</A>\n"); | out.append(" <A HREF=\"" + (o.URI.startsWith("/")?"":"/") + o.URI + "\" title=\""+o.URI+"\">" + showurl + "</A>\n"); | public String handleHTTPGet(String path) throws PluginHTTPException { StringBuffer out = new StringBuffer(); String[] pathelements = path.split("\\?"); /* String[] getelements = getArrayElement(pathelements, 1).split("\\?"); for (int i = 0; i < getelements.length ; i++) { if (getelements[i].startsWith("page="))... |
SeqIOTools.getBuilderFactory( SeqIOTools.identifyFormat((File) seqFiles.get(0)) | SeqIOTools.getSequenceFormat( SeqIOTools.guessFileType((File) seqFiles.get(0)) | public static void main(String[] args) throws Exception { File dataStoreFile = null; int wordSize = 10; int stepSize = 1; int threshold = 20000; List seqFiles = new ArrayList(); for(int i = 0; i < args.length; i++) { if (args[i].charAt(0) == '-') { if ("-threshold".equals(args[i])) { threshold = Intege... |
} while (turnRemaining != 0); | } while (gunTurnRemaining != 0); | public final void turnGun(double radians) { setTurnGun(radians); do { tick(); // Always tick at least once } while (turnRemaining != 0); } |
CaesarTypeNode topMost = inner.getMixin().getTopmostNode(); | CaesarTypeNode topMost = caesarTypeSystem.getCompleteGraph().getType( inner.getMixin().getQualifiedName() ).getTopmostNode(); | public void generateFactoryMethods( CompilerBase compilerBase, KjcEnvironment environment ) throws UnpositionedError { try { CaesarTypeSystem caesarTypeSystem = environment.getCaesarTypeSystem(); TypeFactory typeFactory = environment.getTypeFactory(); Class... |
throw new UnpositionedError(CaesarMessages.CANNOT_CREATE); | e.printStackTrace(); System.exit(0); throw new UnpositionedError(CaesarMessages.FATAL_ERROR); | public void generateFactoryMethods( CompilerBase compilerBase, KjcEnvironment environment ) throws UnpositionedError { try { CaesarTypeSystem caesarTypeSystem = environment.getCaesarTypeSystem(); TypeFactory typeFactory = environment.getTypeFactory(); Class... |
Log.verbose("normalize: "+tail); | protected Path _normalize(Path pred, Path tail) throws UnpositionedError { Log.verbose("normalize: "+tail); if(prefix == null) { return tail; } else { if(k == 0) { if(pred == null) { // this one covers the case where... | |
public Path normalize2() { return normalize(); | public Path normalize2() throws UnpositionedError { return _normalize(null, this); | public Path normalize2() { return normalize(); } |
body.genCode(context); | code.openNewScope(); body.genCode(context); | private CodeInfo genByteCode(TypeFactory factory) { CodeSequence code = CodeSequence.getCodeSequence(); GenerationContext context = new GenerationContext(factory, code); body.genCode(context); if (getReturnType().getTypeID() == TID_VOID) { code.plantNoArgInstruction(opc_return); } CodeInfo ... |
null); | code.getLocalVariableInfos()); | private CodeInfo genByteCode(TypeFactory factory) { CodeSequence code = CodeSequence.getCodeSequence(); GenerationContext context = new GenerationContext(factory, code); body.genCode(context); if (getReturnType().getTypeID() == TID_VOID) { code.plantNoArgInstruction(opc_return); } CodeInfo ... |
code.openNewScope(); | public void genCode(GenerationContext context) { CodeSequence code = context.getCodeSequence(); setLineNumber(code); for (int i = 0; i < body.length; i++) { body[i].genCode(context); } } | |
code.closeScope(); | public void genCode(GenerationContext context) { CodeSequence code = context.getCodeSequence(); setLineNumber(code); for (int i = 0; i < body.length; i++) { body[i].genCode(context); } } | |
this.locals.clear(); this.scopes.clear(); | public void release() { if (org.caesarj.compiler.constants.Constants.ENV_USE_CACHE) { stack.push(this); handlers.clear(); lines.clear(); /* LOCAL VARIABLES NOT USED seq.locals.clear(); LOCAL VARIABLES NOT USED */ } } | |
createParentDirectories( destination ); | public void get( String resourceName, File destination ) throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException { InputData inputData = new InputData( ); Resource resource = new Resource( resourceName ); inputData.setResource( resource ); fillInpu... | |
String sourceText = ((Text) source.getFirstChild()).getData(); URL mapURL = new URL(((Text) mapmaster.getFirstChild()).getData()); String descrText = ((Text) description.getFirstChild()).getData(); | String sourceText = ((Text) source.getFirstChild()).getData().trim(); URL mapURL = new URL(((Text) mapmaster.getFirstChild()).getData().trim()); String descrText = ((Text) description.getFirstChild()).getData().trim(); | private void addDasURLImpl(URL dasURL) throws BioException, ChangeVetoException { try { URL dsnURL = new URL(dasURL, "dsn"); HttpURLConnection huc = (HttpURLConnection) dsnURL.openConnection(); huc.connect(); int status = huc.getHeaderFieldInt("X-DAS-Status", 0); if(status == 0) { ... |
protected HJBMessage handleReceiptFailure() throws HJBException { | protected HJBMessage handleReceiptFailure(Exception e) throws HJBException { | protected HJBMessage handleReceiptFailure() throws HJBException { String message = strings().getString(HJBStrings.RECEIVE_OF_MESSAGE_FAILED, new Integer(getSessionIndex())); LOG.error(message); throw new HJBException(message); } |
LOG.error(message); throw new HJBException(message); | LOG.error(message); throw new HJBException(message, e); | protected HJBMessage handleReceiptFailure() throws HJBException { String message = strings().getString(HJBStrings.RECEIVE_OF_MESSAGE_FAILED, new Integer(getSessionIndex())); LOG.error(message); throw new HJBException(message); } |
LOG.warn(message); throw new HJBClientException(message); | throw new HJBNotFoundException(message); | protected HJBMessage processReceivedMessage(Message asJMS) throws HJBException { try { if (null == asJMS) { String message = strings().getString(HJBStrings.NO_MESSAGE_AVAILABLE, new Integer(getSessionIndex())); ... |
if (LOG.isDebugEnabled()) { LOG.debug(message); | if (MESSAGE_LOG.isDebugEnabled()) { MESSAGE_LOG.debug(message); | protected HJBMessage processReceivedMessage(Message asJMS) throws HJBException { try { if (null == asJMS) { String message = strings().getString(HJBStrings.NO_MESSAGE_AVAILABLE, new Integer(getSessionIndex())); ... |
return handleReceiptFailure(); | return handleReceiptFailure(e); | protected HJBMessage processReceivedMessage(Message asJMS) throws HJBException { try { if (null == asJMS) { String message = strings().getString(HJBStrings.NO_MESSAGE_AVAILABLE, new Integer(getSessionIndex())); ... |
commandLog.info(commandString + "\t=> " + response); | commandLog.debug(commandString + "\t=> " + response); | public String execute(String commandString, Session session) { String response = command.execute(commandString, session); commandLog.info(commandString + "\t=> " + response); return response; } |
document.setDocumentPartitioner(partitioner); } | } | public void setup(IDocument document) { String[] partitions = new String[] { SchemePartitionScanner.SCHEME_STRING, SchemePartitionScanner.SCHEME_COMMENT, SchemePartitionScanner.SCHEME_HERESTRING }; IDocumentPartitioner partitioner = new FastPartitioner(new BrlPartitionScanner(... |
public void addAttachment(Attachment a) throws Exception | public void addAttachment(Attachment a) | public void addAttachment(Attachment a) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("AttachmentModel.addAttachment"); p.setInt(1, a.getPostId()); p.setInt(2, a.getPrivmsgsId()); p.setInt(3, a.getUserId()); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("AttachmentModel.lastGenerat... |
PreparedStatement p = this.getStatementForAutoKeys("AttachmentModel.addAttachment"); p.setInt(1, a.getPostId()); p.setInt(2, a.getPrivmsgsId()); p.setInt(3, a.getUserId()); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("AttachmentModel.lastGeneratedAttachmentId")); int id = this.executeAutoKeysQuery(p); p.close(... | PreparedStatement p=null; try { p = this.getStatementForAutoKeys("AttachmentModel.addAttachment"); p.setInt(1, a.getPostId()); p.setInt(2, a.getPrivmsgsId()); p.setInt(3, a.getUserId()); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("AttachmentModel.lastGeneratedAttachmentId")); int id = this.executeAutoKeysQuer... | public void addAttachment(Attachment a) throws Exception { PreparedStatement p = this.getStatementForAutoKeys("AttachmentModel.addAttachment"); p.setInt(1, a.getPostId()); p.setInt(2, a.getPrivmsgsId()); p.setInt(3, a.getUserId()); this.setAutoGeneratedKeysQuery(SystemGlobals.getSql("AttachmentModel.lastGenerat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.