rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
removeChangeListener(cl, null);
removeChangeListener(cl, ChangeType.UNKNOWN);
public void removeChangeListener(ChangeListener cl) { removeChangeListener(cl, null); }
IExtension[] extensions = SchemeScriptPlugin.getDefault() .getDescriptor() .getExtensionPoint("interpreters") .getExtensions();
IExtension[] extensions = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID).getExtensions();
public static InterpreterType[] getTypes() { if (mCachedTypes != null) { return mCachedTypes; } IExtension[] extensions = SchemeScriptPlugin.getDefault() .getDescriptor() .getExtensi...
parameters,
public CSourceMethod checkInterface(CClassContext context) throws PositionedError { try { if (returnType.isReference()) { returnType = returnType.checkType(context); } } catch (UnpositionedError e) { // FJTODO what to do with exception ...
parameters[i].getSignature(),
CaesarBcelWorld.getInstance().resolve(parameters[i]),
public void createAttribute( CContext context, CClass caller, JFormalParameter[] formalParameters, TokenReference tokenReference, int orderNr) { List formalBindings = new ArrayList(); //bind parameters for (int i = 0; i < parameters.length; i++) { if (!formalParameters[i].isGenerated()) { formalBind...
if (Vm.getMegaVersion() > 1 && Vm.getMajorVersion() > 4) {
if (Vm.getMegaVersion() >= 1 && Vm.getMajorVersion() > 4) {
private void addJDK15InstrumentedSpec() { if (Vm.getMegaVersion() > 1 && Vm.getMajorVersion() > 4) { TransparencyClassSpec spec = getOrCreateSpec("java.util.concurrent.locks.ReentrantLock$ConditionObject"); spec.setCallConstructorOnLoad(true); spec.setHonorTransient(true); } }
if (Vm.getMegaVersion() > 1 && Vm.getMajorVersion() > 4) {
if (Vm.getMegaVersion() >= 1 && Vm.getMajorVersion() > 4) {
private void addJDK15PreInstrumentedSpec() { if (Vm.getMegaVersion() > 1 && Vm.getMajorVersion() > 4) { TransparencyClassSpec spec = getOrCreateSpec("sun.misc.Unsafe"); addCustomAdapter("sun.misc.Unsafe", UnsafeAdapter.class); spec = getOrCreateSpec(DSOUnsafe.CLASS_DOTS); addCustomAdapter(DSOUn...
} else if ("-list".equals(sw)) {
} else if ("-xff".equals(sw)) { format = "xff"; }else if ("-list".equals(sw)) {
public static void main(String[] args) throws Exception { String format = "fasta"; boolean all = false; int startArgs = 0; while (startArgs < args.length && args[startArgs].startsWith("-")) { String sw = args[startArgs]; if ("-fasta".equals(sw)) { format = "fasta"; } else if ("-gff".equals(sw...
System.err.println("usage: rfetch [-fasta | -gff | -embl | -genbank | -agave] namespace id1 id2 ...");
System.err.println("usage: rfetch [-fasta | -gff | -embl | -genbank | -agave | -xff] namespace id1 id2 ...");
private static void printUsage() { System.err.println("usage: rfetch [-fasta | -gff | -embl | -genbank | -agave] namespace id1 id2 ..."); }
} else if ("agave".equals(format)) {
} else if ("xff".equals(format)) { XFFWriter xffw = new XFFWriter(); PrintWriter pw = new PrintWriter(new OutputStreamWriter(System.out)); XMLWriter xw = new PrettyXMLWriter(pw); xffw.writeFeatureSet(seq, xw); pw.flush(); } else if ("agave".equals(format)) {
private static void writeSequence(Sequence seq, String format) throws Exception { if ("embl".equals(format)) { new EmblLikeFormat().writeSequence(seq, System.out); } else if ("genbank".equals(format)) { new GenbankFormat().writeSequence(seq, System.out); } else if ("fasta".equals(format)) { ne...
public List selectAll(int startFrom, int count) throws Exception
public List selectAll(int startFrom, int count)
public List selectAll(int startFrom, int count) throws Exception { PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("GenericModel.selectByLimit") + " " + count + " " + SystemGlobals.getSql("UserModel.selectAllByLimit")); p....
PreparedStatement p;
PreparedStatement p=null; ResultSet rs=null;
public List selectAll(int startFrom, int count) throws Exception { PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("GenericModel.selectByLimit") + " " + count + " " + SystemGlobals.getSql("UserModel.selectAllByLimit")); p....
if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("GenericModel.selectByLimit") + " " + count + " " + SystemGlobals.getSql("UserModel.selectAllByLimit")); p.setInt(1, startFrom); p.setInt(2, count); } else { p = JForumExecutionContext.getConnection().prepareStatement(Syst...
try { if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("GenericModel.selectByLimit") + " " + count + " " + SystemGlobals.getSql("UserModel.selectAllByLimit")); p.setInt(1, startFrom); p.setInt(2, count); } else { p = JForumExecutionContext.getConnection().prepareStatemen...
public List selectAll(int startFrom, int count) throws Exception { PreparedStatement p; if (count > 0) { p = JForumExecutionContext.getConnection().prepareStatement(SystemGlobals.getSql("GenericModel.selectByLimit") + " " + count + " " + SystemGlobals.getSql("UserModel.selectAllByLimit")); p....
public List selectAllWithKarma(int startFrom, int count) throws Exception
public List selectAllWithKarma(int startFrom, int count)
public List selectAllWithKarma(int startFrom, int count) throws Exception { return super.loadKarma( this.selectAll(startFrom, count) ); }
return super.loadKarma( this.selectAll(startFrom, count) ); }
try { return super.loadKarma( this.selectAll(startFrom, count) ); } catch (SQLException e) { String es = "Erorr selectAllWithKarma()"; log.error(es, e); throw new RuntimeException(es, e); } }
public List selectAllWithKarma(int startFrom, int count) throws Exception { return super.loadKarma( this.selectAll(startFrom, count) ); }
public static String[] writeWordWrap(String input, String sepRegex, String separator, int width) { width--; if (input.length()<=width) return new String[]{input}; String[] parts = input.split(sepRegex); StringBuffer currentLine = new StringBuffer(); List lines = new ArrayList(); for (int i = 0; i < parts.length; i++) {...
public static String[] writeWordWrap(String input, String sepRegex, int width) { List lines = new ArrayList(); Pattern p = Pattern.compile(sepRegex); int start = 0; while (start < input.length()) { if (input.charAt(start)=='\n') start++; int splitPoint = start+width; if (splitPoint > input.length()) splitPoint=input....
public static String[] writeWordWrap(String input, String sepRegex, String separator, int width) { width--; // because of some weird start-at-zero thingy - if you pass 60, we must work with 59. if (input.length()<=width) return new String[]{input}; String...
currentLine.append(word);
public static String[] writeWordWrap(String input, String sepRegex, String separator, int width) { width--; // because of some weird start-at-zero thingy - if you pass 60, we must work with 59. if (input.length()<=width) return new String[]{input}; String...
if (currentLine.length()>0) lines.add(currentLine.toString());
public static String[] writeWordWrap(String input, String sepRegex, String separator, int width) { width--; // because of some weird start-at-zero thingy - if you pass 60, we must work with 59. if (input.length()<=width) return new String[]{input}; String...
public List getPosts(int start, int count, int minPostId, int maxPostId, Connection conn) throws Exception
public List getPosts(int start, int count, int minPostId, int maxPostId, Connection conn)
public List getPosts(int start, int count, int minPostId, int maxPostId, Connection conn) throws Exception { return dao.getPosts(minPostId, maxPostId, start, count, conn); }
boolean a = false; boolean b = false; int i = 1; if(super.isContiguous()) return true; if(getWrapped() instanceof CompoundLocation){ CompoundLocation l = (CompoundLocation)getWrapped(); for(Iterator iter = l.blockIterator(); iter.hasNext(); i++){ if(i > 2) return false; Location block = (Location)iter.next(); if(bloc...
return getWrapped().isContiguous();
public boolean isContiguous() { boolean a = false; boolean b = false; int i = 1; if(super.isContiguous()) return true; if(getWrapped() instanceof CompoundLocation){ CompoundLocation l = (CompoundLocation)getWrapped(); for(Iterator iter = l.blockIterator(); iter.hasNext(); i++){ if(i > ...
gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher);
CrossProductResidue r; synchronized(gopher) { gopher.l = l; r = (CrossProductResidue) ourResidues.get(gopher); }
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher); if (r == null) { throw new IllegalAlphabetException( "Unable to find CrossProduct residue for " + l + " in alphabet " + getNa...
l + " in alphabet " + getName()
new SimpleCrossProductResidue(l, '?').getName() + " in alphabet " + getName()
public CrossProductResidue getResidue(List l) throws IllegalAlphabetException { gopher.l = l; CrossProductResidue r = (CrossProductResidue) ourResidues.get(gopher); if (r == null) { throw new IllegalAlphabetException( "Unable to find CrossProduct residue for " + l + " in alphabet " + getNa...
public SimpleResidueList(Alphabet alpha, List rList) {
public SimpleResidueList(Alphabet alpha) {
public SimpleResidueList(Alphabet alpha, List rList) { this.alphabet = alpha; this.residues = rList; }
this.residues = rList;
residues = new ArrayList();
public SimpleResidueList(Alphabet alpha, List rList) { this.alphabet = alpha; this.residues = rList; }
protected Mail getMailFor(Long mailId, Permission check, Person me) throws NotFoundException, PermissionException
protected Mail getMailFor(Long mailId, Permission check) throws NotFoundException, PermissionException
protected Mail getMailFor(Long mailId, Permission check, Person me) throws NotFoundException, PermissionException { Mail mail = this.dao.findMail(mailId); Role role = mail.getList().getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return mail; }
Mail mail = this.dao.findMail(mailId); Role role = mail.getList().getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return mail;
return this.getMailFor(mailId, check, this.getMe());
protected Mail getMailFor(Long mailId, Permission check, Person me) throws NotFoundException, PermissionException { Mail mail = this.dao.findMail(mailId); Role role = mail.getList().getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return mail; }
protected MailingList getListFor(Long listId, Permission check, Person me) throws NotFoundException, PermissionException
protected MailingList getListFor(Long listId, Permission check) throws NotFoundException, PermissionException
protected MailingList getListFor(Long listId, Permission check, Person me) throws NotFoundException, PermissionException { MailingList list = this.dao.findMailingList(listId); Role role = list.getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return list; }
MailingList list = this.dao.findMailingList(listId); Role role = list.getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return list;
return this.getListFor(listId, check, this.getMe());
protected MailingList getListFor(Long listId, Permission check, Person me) throws NotFoundException, PermissionException { MailingList list = this.dao.findMailingList(listId); Role role = list.getRoleFor(me); if (! role.getPermissions().contains(check)) throw new PermissionException(check); return list; }
params,
public CCjAdvice( CClass owner, int modifiers, String ident, CType returnType, CType[] paramTypes, CReferenceType[] exceptions, JBlock body, CaesarPointcut pointcut, CaesarAdviceKind kind, int extraArgumentFlags) { super( owner, modifiers | ACC_FINAL, ident, returnType, paramTypes, exceptions, ...
public CaesarFormalBinding(String signature, String name, int index, int start, int end, String fileName)
public CaesarFormalBinding(ResolvedTypeX type, String name, int index, int start, int end, String fileName)
public CaesarFormalBinding(String signature, String name, int index, int start, int end, String fileName) { binding = new FormalBinding( TypeX.forSignature(signature), name, index, start, end, fileName); }
TypeX.forSignature(signature),
type,
public CaesarFormalBinding(String signature, String name, int index, int start, int end, String fileName) { binding = new FormalBinding( TypeX.forSignature(signature), name, index, start, end, fileName); }
prepareForDynamicDeployment(environment);
new DeploymentPreparation(currentInnerInner).prepareForDynamicDeployment(environment);
public void prepareForDynamicDeployment(KjcEnvironment environment) { List newInners = new ArrayList(); for (int i = 0; i < cd.getInners().length; i++) { newInners.add(cd.getInners()[i]); if (cd.getInners()[i] instanceof FjClassDeclaration) { //create support classes for each crosscutting inner class Fj...
if(found.length == 0) fail("No errors found : "+getId()+" : "+getDescription()); if(expected.length != found.length) fail("More ("+errors.size()+") errors found than expected: "+getId()+" : "+getDescription()); for (int i = 0; i < found.length; i++) { if(!(expected[i] == found[i].getFormattedMessage().getDescription(...
else { if(found.length == 0) fail("No errors found : "+getId()+" : "+getDescription()); if(expected.length != found.length) fail("More ("+errors.size()+") errors found than expected: "+getId()+" : "+getDescription()); for (int i = 0; i < found.length; i++) { if(!(expected[i] == found[i].getFormattedMessage().getDescr...
private void checkErrors(MessageDescription[] expected){ List errors = new LinkedList(); for (Iterator iter = positionedErrorList.iterator(); iter.hasNext();) { Object o = iter.next(); // ignore warnings which are a subtype of PositionedError if (!(o instanceof CWarnin...
setFault(e);
recordFault(e);
public void execute() { assertNotCompleted(); try { createConsumerAndSaveItsIndex(); } catch (RuntimeException e) { setFault(e); } completed(); }
numRoundsTextField.setPreferredSize(new Dimension(50, 16)); numRoundsTextField.setMaximumSize(new Dimension(50, 16)); numRoundsTextField.setMinimumSize(new Dimension(50, 16));
private JTextField getNumRoundsTextField() { if (numRoundsTextField == null) { numRoundsTextField = new JTextField(); numRoundsTextField.setAutoscrolls(false); numRoundsTextField.setPreferredSize(new Dimension(50, 16)); numRoundsTextField.setMaximumSize(new Dimension(50, 16)); numRoundsTextField.setMinimumS...
FileSpecification robotSpecification = (FileSpecification) robotList.elementAt(i);
FileSpecification robotSpecification = robotList.elementAt(i);
public void setRobotList(Vector<FileSpecification> robotListVector) { AvailableRobotsPanel.this.robotList = robotListVector; SwingUtilities.invokeLater( new Runnable() { public void run() { availablePackages.clear(); availableRobots.clear(); if (AvailableRobotsPanel.this.robotList == null) { Avail...
String[] tags = SystemGlobals.getValue(s).toUpperCase().split(",");
String s1 = SystemGlobals.getValue(s); if (s1==null) { return; } String[] tags = s1.toUpperCase().split(",");
private static void splitAndTrim(String s, Set data) { String[] tags = SystemGlobals.getValue(s).toUpperCase().split(","); for (int i = 0; i < tags.length; i++) { data.add(tags[i].trim()); } }
cache = new HashMap();
public DiagonalCachingKernel() { cache = new HashMap(); }
public void setString(String key, String value) { setString(DEFAULT_SESSION_ID, key, value);
public void setString(SessionID sessionID, String key, String value) { getOrCreateSessionProperties(sessionID).setProperty(key, value.trim());
public void setString(String key, String value) { setString(DEFAULT_SESSION_ID, key, value); }
for(int j = 0; localVariables != null && j < localVariables.length; j++){ while(!((InstructionHandle)localVariables[j].getEnd()).isReached()) { localVariables[j].setEnd(((InstructionHandle)localVariables[j].getEnd()).getPrevious()); } }
private boolean cleanCode() { boolean codeRemoved = false; for (int i = 0; i < handlers.length; i++) { while (!((InstructionHandle)handlers[i].getEnd()).isReached()) { handlers[i].setEnd(((InstructionHandle)handlers[i].getEnd()).getPrevious()); } // !!!if (start > end) remove handler } Ins...
while (level-- > 0 && codeChanged) {
while ( codeChanged) {
public static CodeInfo optimize(CodeInfo code, int level) { Optimizer opt = new Optimizer(code); // do work at specified level boolean codeChanged = true; while (level-- > 0 && codeChanged) { codeChanged = opt.optimizeCodeSequence(); } code = opt.getCodeInfo(); return code; }
HJBConnection result = findConnectionFactory(providerName, factoryName).getConnection(connectionIndex); if (null == result) {
try { HJBConnection result = findConnectionFactory(providerName, factoryName).getConnection(connectionIndex); if (null == result) { handleMissingComponent("" + PathNaming.CONNECTION + "" + connectionIndex); } return result; } catch (IndexOutOfBoundsException e) {
public HJBConnection findConnection(String providerName, String factoryName, int connectionIndex) { HJBConnection result = findConnectionFactory(providerName, factoryName).getConnection(connectionIndex); if (null == result) ...
return result;
public HJBConnection findConnection(String providerName, String factoryName, int connectionIndex) { HJBConnection result = findConnectionFactory(providerName, factoryName).getConnection(connectionIndex); if (null == result) ...
public static PermissionControl load(int userId, boolean force) throws Exception
public static PermissionControl load(int userId, boolean force)
public static PermissionControl load(int userId, boolean force) throws Exception { if (force || cache.get(FQN, Integer.toString(userId)) == null) { UserDAO um = DataAccessDriver.getInstance().newUserDAO(); return SecurityRepository.load(um.selectById(userId), force); } return SecurityRepository.get(userId)...
public RoleCollection loadRolesByUserGroups(User user) throws Exception;
public RoleCollection loadRolesByUserGroups(User user) ;
public RoleCollection loadRolesByUserGroups(User user) throws Exception;
else if (paramsList.get(i) instanceof Map) types[i] = Map.class;
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...
try
Principal p = this.sessionContext.getCallerPrincipal(); String name = p.getName(); if (name == null || name.equals(SubEthaLoginModule.UNAUTHENTICATED_IDENTITY))
protected EmailAddress getMyAddress() { try { Principal p = this.sessionContext.getCallerPrincipal(); String name = p.getName(); if (name == null) { return null; } else { try { return this.dao.findEmailAddress(name); } catch (NotFoundException ex) { return null; } ...
Principal p = this.sessionContext.getCallerPrincipal(); String name = p.getName(); if (name == null)
return null; } else { try { return this.dao.findEmailAddress(name); } catch (NotFoundException ex)
protected EmailAddress getMyAddress() { try { Principal p = this.sessionContext.getCallerPrincipal(); String name = p.getName(); if (name == null) { return null; } else { try { return this.dao.findEmailAddress(name); } catch (NotFoundException ex) { return null; } ...
else { try { return this.dao.findEmailAddress(name); } catch (NotFoundException ex) { return null; } } } catch (IllegalStateException ex) { return null;
protected EmailAddress getMyAddress() { try { Principal p = this.sessionContext.getCallerPrincipal(); String name = p.getName(); if (name == null) { return null; } else { try { return this.dao.findEmailAddress(name); } catch (NotFoundException ex) { return null; } ...
btnRefresh.setMnemonic('r');
btnRefresh.setMnemonic(java.util.ResourceBundle.getBundle("com/javaimagealbum/resources/MnemonicResource").getString("Refresh_Folder").charAt(0));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlCenter = new javax.swing.JPanel(); spScroll = new javax.swing.JScrol...
btnBrowse.setMnemonic('w');
btnBrowse.setMnemonic(java.util.ResourceBundle.getBundle("com/javaimagealbum/resources/MnemonicResource").getString("Browse").charAt(0));
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlCenter = new javax.swing.JPanel(); spScroll = new javax.swing.JScrol...
if( found != null ) {
if( found == null ) { break; } else {
public void setSelectedFile( File f ) { Stack composition = new Stack(); do { File parent = f.getParentFile(); String name = f.getName(); if( parent == null ) { // If this is a root filename, use toString instead of getName. name = f.toStr...
} else { break;
public void setSelectedFile( File f ) { Stack composition = new Stack(); do { File parent = f.getParentFile(); String name = f.getName(); if( parent == null ) { // If this is a root filename, use toString instead of getName. name = f.toStr...
super();
public CannotChangePanelException() { }
wrapper.setProperty(mrd.getAttributeName(i), mrd.getAttributeValue(i));
wrapper.setProperty(name, mrd.getAttributeValue(i)); } else if (name.equals("__id_")) { wrapper.addStaticArgument("id", mrd.getAttributeValue(i)); } else if (name.equals("id")) { continue;
protected void setProperties(FlowElement wrapper, HierarchicalStreamReader rd, UnmarshallingContext context) { MXppReader mrd = (MXppReader) rd; for (int i = 0; i < mrd.getAttributeCount(); i++) { String name = mrd.getAttributeName(i).toLowerCase().intern(); if (name.equalsIgnoreCase(FlowElement.UID)) { Int...
if( local.isMixin() ) { if(local.getDepth() == field.getOwner().getDepth()) {
if( local.isMixin() ) { if (field.isStatic()) { prefix = new JTypeNameExpression( getTokenReference(), new CClassNameType(field.getOwnerType().getQualifiedName()) ); } else if(local.getDepth() == field.getOwner().getDepth()) {
public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } JExpression origPrefix = prefix; CClass local = context.getClassContext().getCClass(); //findPrefix(local, new CExpressionContex...
if(!field.isStatic()) { prefix = new JOwnerExpression(getTokenReference(), local); } else { prefix = new JTypeNameExpression( getTokenReference(), new CClassNameType(field.getOwnerType().getQualifiedName()) ); }
prefix = new JOwnerExpression(getTokenReference(), local);
public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } JExpression origPrefix = prefix; CClass local = context.getClassContext().getCClass(); //findPrefix(local, new CExpressionContex...
check(context, !context.isLeftSide(), CaesarMessages.READ_ONLY_ACCESS_TO_CCLASS_FIELDS); return new CjAccessorCallExpression( getTokenReference(), prefix, field ).analyse(context);
return new CjAccessorCallExpression( getTokenReference(), prefix, field ).analyse(context);
public JExpression analyse(CExpressionContext context) throws PositionedError { TypeFactory factory = context.getTypeFactory(); if (analysed) { return this; } JExpression origPrefix = prefix; CClass local = context.getClassContext().getCClass(); //findPrefix(local, new CExpressionContex...
aspectClass.getPointcuts(),
new PointcutDeclaration[0],
public FjClassDeclaration createSingletonAspect() { AdviceDeclaration[] advices = aspectClass.getAdvices(); JMethodDeclaration[] methods = aspectClass.getMethods(); List fields = new ArrayList(); List singletonAspectMethods = new ArrayList(); JMethodDeclaration[] aspectClassMethods = new JMethodDeclaration[meth...
public MockExpectation(boolean matches, boolean needsMoreInvocations, boolean allowsMoreInvocations) { this.matches = matches; this.needsMoreInvocations = needsMoreInvocations; this.allowsMoreInvocations = allowsMoreInvocations; }
public MockExpectation() { this(false, false, false); }
public MockExpectation(boolean matches, boolean needsMoreInvocations, boolean allowsMoreInvocations) { this.matches = matches; this.needsMoreInvocations = needsMoreInvocations; this.allowsMoreInvocations = allowsMoreInvocations; }
if (DebugUtil.DEBUG) { System.err.println("In FutureTask innerGet: -- Client id: " + ManagerUtil.getClientID() + ", state: " + state + ", proxyRunner: " + proxyRunner); }
Object innerGet() throws InterruptedException, ExecutionException { lock.lock(); try { while (tryAcquireShared() < 0) { ran.await(); } } finally { lock.unlock(); } if (getSynchronizedState() == CANCELLED) throw new CancellationException(); if (exception !=...
if (start < 0 || end > length()) {
if (start < 1 || end > length()) {
public SymbolList subList(int start, int end) { if (start < 0 || end > length()) { throw new IndexOutOfBoundsException( "Sublist index out of bounds " + length() + ":" + start + "," + end ); } if (end < start) { throw new IndexOutOfBoundsException( ...
throw new IndexOutOfBoundsException( "send must not be lower than sstart: start=" + start + ", end=" + end
throw new IllegalArgumentException( "end must not be lower than start: start=" + start + ", end=" + end
public SymbolList subList(int start, int end) { if (start < 0 || end > length()) { throw new IndexOutOfBoundsException( "Sublist index out of bounds " + length() + ":" + start + "," + end ); } if (end < start) { throw new IndexOutOfBoundsException( ...
PreparedStatement ps = conn.prepareStatement("select residue_serial, serial, residue_id,code_3_letter, CHEM_ATOM_NAME_PDB_LS, chem_atom_name, element_symbol,alt_code, CHAIN_CODE_1_LETTER, chain_code, chain_pdb_code, OCCUPANCY, PDB_CHARGE,PDB_Group, x,y,z, CHEM_COMP_CODE, CHEM_ATOM_ID,U_ISO_OR_EQUIV, RESIDUE_P...
PreparedStatement ps = conn.prepareStatement("select residue_serial, serial, residue_id,code_3_letter, CHEM_ATOM_NAME_PDB_LS, chem_atom_name, element_symbol,alt_code, CHAIN_CODE_1_LETTER, chain_code, chain_pdb_code, OCCUPANCY, PDB_CHARGE,PDB_Group, x,y,z, CHEM_COMP_CODE, CHEM_ATOM_ID,U_ISO_OR_EQUIV, RESIDUE_P...
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
if ( chain_pdb_code == null ) {
if ( insertionCode == null ) insertionCode = ""; if ( chain_pdb_code == null )
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
} if (! prevChain.equals(chain_pdb_code)) {
if (! prevChain.equals(chain_pdb_code))
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
} if ( CHEM_ATOM_NAME_LS == null) {
if ( CHEM_ATOM_NAME_LS == null)
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
}
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
g.setPDBCode(residue_pdb_seq+"");
g.setPDBCode(residue_pdb_seq+insertionCode);
public Structure getStructureById(String pdbId) throws IOException { // open connection to database Connection conn ; Structure structure = new StructureImpl(); try { conn = dataSource.getConnection(); // create Structure object from MSD database query. } catch (SQLException e) { e.printStackTrace(); ...
altLoc = new Character(' ');
public AtomImpl () { name = null ; fullName = null ; coords = new double[3]; pdbline = "" ; occupancy = 0.0 ; tempfactor = 0.0 ; }
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws SQLException
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException { Blob clob = rs.getBlob(fieldName); InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize...
Blob clob = rs.getBlob(fieldName);
try { Blob clob = rs.getBlob(fieldName);
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException { Blob clob = rs.getBlob(fieldName); InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize...
InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096;
InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize]; readedBytes = is.read(bytes); if (readedBytes > 0) { String readed = new String(bytes, 0, readedBytes, "UTF-16"); sb.append(readed); } } while (readedBytes == ...
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException { Blob clob = rs.getBlob(fieldName); InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize...
do { byte[] bytes = new byte[bufferSize]; readedBytes = is.read(bytes); if (readedBytes > 0) { String readed = new String(bytes, 0, readedBytes, "UTF-16"); sb.append(readed); } } while (readedBytes == bufferSize);
is.close(); return sb.toString(); } catch (IOException e) { String es = "Erorr readBlobUTF16BinaryStream()"; log.error(es, e); throw new RuntimeException(es, e); }
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException { Blob clob = rs.getBlob(fieldName); InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize...
is.close(); return sb.toString();
public static String readBlobUTF16BinaryStream(ResultSet rs, String fieldName) throws IOException, SQLException { Blob clob = rs.getBlob(fieldName); InputStream is = clob.getBinaryStream(); StringBuffer sb = new StringBuffer(); int readedBytes = 0; int bufferSize = 4096; do { byte[] bytes = new byte[bufferSize...
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws SQLException
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1); ...
PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery);
PreparedStatement p=null; ResultSet rs=null; try { p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery);
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1); ...
ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1);
rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1);
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1); ...
OutputStream blobWriter = null; if (postText instanceof BLOB) { blobWriter = ((BLOB)postText).getBinaryOutputStream(); } else { blobWriter = postText.setBinaryStream(0); }
OutputStream blobWriter; if (postText instanceof BLOB) { blobWriter = ((BLOB)postText).getBinaryOutputStream(); } else { blobWriter = postText.setBinaryStream(0); }
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1); ...
blobWriter.close(); rs.close(); p.close(); }
blobWriter.close(); } catch (IOException e) { String es = "Erorr writeBlobUTF16BinaryStream()"; log.error(es, e); throw new RuntimeException(es, e); } finally { DbUtils.close(rs, p); } }
public static void writeBlobUTF16BinaryStream(String query, int idForQuery, String value) throws IOException, SQLException { PreparedStatement p = JForumExecutionContext.getConnection().prepareStatement(query); p.setInt(1, idForQuery); ResultSet rs = p.executeQuery(); rs.next(); Blob postText = rs.getBlob(1); ...
Boolean value = (Boolean)cfg.getValue();
String value = (String)cfg.getValue();
public void start() throws Exception { // If we haven't been bootstrapped, we need to run. try { Config cfg = this.dao.findConfig(BOOTSTRAPPED_CONFIG_ID); // Might as well sanity check it Boolean value = (Boolean)cfg.getValue(); if (value == null || value == false) { this.bootstrap(); cfg.setV...
if (value == null || value == false)
if (value == null || value.length() == 0)
public void start() throws Exception { // If we haven't been bootstrapped, we need to run. try { Config cfg = this.dao.findConfig(BOOTSTRAPPED_CONFIG_ID); // Might as well sanity check it Boolean value = (Boolean)cfg.getValue(); if (value == null || value == false) { this.bootstrap(); cfg.setV...
cfg.setValue(Boolean.TRUE);
cfg.setValue("1.0");
public void start() throws Exception { // If we haven't been bootstrapped, we need to run. try { Config cfg = this.dao.findConfig(BOOTSTRAPPED_CONFIG_ID); // Might as well sanity check it Boolean value = (Boolean)cfg.getValue(); if (value == null || value == false) { this.bootstrap(); cfg.setV...
Config cfg = new Config(BOOTSTRAPPED_CONFIG_ID, Boolean.TRUE);
Config cfg = new Config(BOOTSTRAPPED_CONFIG_ID, "1.0");
public void start() throws Exception { // If we haven't been bootstrapped, we need to run. try { Config cfg = this.dao.findConfig(BOOTSTRAPPED_CONFIG_ID); // Might as well sanity check it Boolean value = (Boolean)cfg.getValue(); if (value == null || value == false) { this.bootstrap(); cfg.setV...
public Config(String id, Object value) { if (log.isDebugEnabled()) log.debug("Creating new Config: " + id); this.id = id; this.value = value; }
public Config() {}
public Config(String id, Object value) { if (log.isDebugEnabled()) log.debug("Creating new Config: " + id); this.id = id; this.value = value; }
pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new javax.swing.JLabel(); tfAlbumTitle = new javax.swing.JTextField(); lblAlbumDescription = new javax.swing.JLabel(); tfAlbumDescription = new javax.swing.JTextField();
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
pnlLinkToAlbumIndex = new javax.swing.JPanel(); cbLinkToAlbumIndex = new javax.swing.JCheckBox();
pnShowExif = new javax.swing.JPanel(); cbShowExif = new javax.swing.JCheckBox();
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
cbShowExif = new javax.swing.JCheckBox();
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
pnlAlbumTitleOption.setLayout(new java.awt.GridBagLayout()); pnlAlbumTitleOption.setBackground(java.awt.Color.white); lblAlbumTitle.setDisplayedMnemonic('t'); lblAlbumTitle.setFont(new java.awt.Font("SansSerif", 0, 12)); lblAlbumTitle.setLabelFor(tfAlbumTitle); lblAlbumTitle.setText("Album Title:"); gridBagConstraints...
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
pnlLinkToAlbumIndex.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); pnlLinkToAlbumIndex.setBackground(java.awt.Color.white); cbLinkToAlbumIndex.setBackground(java.awt.Color.white); cbLinkToAlbumIndex.setFont(new java.awt.Font("SansSerif", 0, 12)); cbLinkToAlbumIndex.setMnemonic('i'); cbLinkToAlbumIndex.s...
pnShowExif.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT)); pnShowExif.setBackground(java.awt.Color.white);
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
pnlContents.add(cbShowExif, new java.awt.GridBagConstraints());
pnShowExif.add(cbShowExif); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = ...
private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; lblTitle = new javax.swing.JLabel(); pnlContents = new javax.swing.JPanel(); tpInstructions = new javax.swing.JTextPane(); pnlAlbumTitleOption = new javax.swing.JPanel(); lblAlbumTitle = new jav...
cbLinkToAlbumIndexActionPerformed(evt);
cbShowExifActionPerformed(evt);
public void actionPerformed(java.awt.event.ActionEvent evt) { cbLinkToAlbumIndexActionPerformed(evt); }
publishManager.setAlbumTitle( tfAlbumTitle.getText() ); publishManager.setAlbumDescription( tfAlbumDescription.getText() );
private void scanAndPersistOptions() { publishManager.setAlbumTitle( tfAlbumTitle.getText() ); publishManager.setAlbumDescription( tfAlbumDescription.getText() ); publishManager.setOutputColumns( Integer.parseInt( tfColumns.getText() ) ); publishManager.setThumbnailsPerPage( ...
publishManager.setLinkToAlbumIndex( cbLinkToAlbumIndex.isSelected() );
private void scanAndPersistOptions() { publishManager.setAlbumTitle( tfAlbumTitle.getText() ); publishManager.setAlbumDescription( tfAlbumDescription.getText() ); publishManager.setOutputColumns( Integer.parseInt( tfColumns.getText() ) ); publishManager.setThumbnailsPerPage( ...
tfAlbumTitle.setText( publishManager.getAlbumTitle() );
public void showPanel() { tfAlbumTitle.setText( publishManager.getAlbumTitle() ); tfColumns.setText( "" + publishManager.getOutputColumns() ); coThumbnailsPerPage.setSelectedItem( publishManager.getThumbnailsPerPage() ); cbResizeAll.setSelected( publishManager.getResizeAll() ...
cbLinkToAlbumIndex.setSelected( publishManager.getLinkToAlbumIndex() );
public void showPanel() { tfAlbumTitle.setText( publishManager.getAlbumTitle() ); tfColumns.setText( "" + publishManager.getOutputColumns() ); coThumbnailsPerPage.setSelectedItem( publishManager.getThumbnailsPerPage() ); cbResizeAll.setSelected( publishManager.getResizeAll() ...
SequenceFactory sFact = new SimpleSequenceFactory();
SequenceBuilderFactory sFact = new FastaDescriptionLineParser.Factory(SimpleSequenceBuilder.FACTORY);
public static final void main(String [] args) throws Exception { if(args.length != 2) { throw new Exception("Use: CorbaDBServer sequences.fa type"); } // work out what to load File seqDBFile = new File(args[0]); Alphabet alpha = AlphabetManager.alphabetForName(args[1]); if(alpha == null) { ...
System.out.println("Loading fasta database: " + seqDBFile);
System.err.println("Loading fasta database: " + seqDBFile);
public static final void main(String [] args) throws Exception { if(args.length != 2) { throw new Exception("Use: CorbaDBServer sequences.fa type"); } // work out what to load File seqDBFile = new File(args[0]); Alphabet alpha = AlphabetManager.alphabetForName(args[1]); if(alpha == null) { ...
throw new IllegalStateException("Already running");
throw new IllegalStateException("SMTPServer already running");
public void setHostName(String hostname) { if (this.smtpServer != null) throw new IllegalStateException("Already running"); this.hostName = hostname; }
throw new IllegalStateException("Already running");
throw new IllegalStateException("SMTPServer already running");
public void setPort(int port) { if (this.smtpServer != null) throw new IllegalStateException("Already running"); this.port = port; }
throw new IllegalStateException("Already running");
throw new IllegalStateException("SMTPServer already running");
public void start() throws IOException { if (this.smtpServer != null) throw new IllegalStateException("Already running"); if (this.hostName == null) { try { this.hostName = InetAddress.getLocalHost().getCanonicalHostName(); } catch (UnknownHostException e) { this.hostName = "localhost"; } } ...