rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
st = new StringTokenizer(cc, ";"); | Object ccInput = this.cc.evaluate(context); st = new StringTokenizer(ccInput.toString(), ";"); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
msg.setSubject(subject); | Object subjectInput = this.subject.evaluate(context); msg.setSubject(subjectInput.toString()); | public void doTag(XMLOutput xmlOutput) throws JellyTagException { Properties props = new Properties(); props.putAll(context.getVariables()); // if a server was set then configure the system property if (server != null) { props.put("mail.smtp.host", server); } el... |
public void setCC(String cc) { | public void setCC(Expression cc) { | public void setCC(String cc) { this.cc = cc; } |
public void setFrom(String from) { | public void setFrom(Expression from) { | public void setFrom(String from) { this.from = from; } |
public void setMessage(String message) { | public void setMessage(Expression message) { | public void setMessage(String message) { this.message = message; } |
public void setServer(String server) { | public void setServer(Expression server) { | public void setServer(String server) { this.server = server; } |
public void setSubject(String subject) { | public void setSubject(Expression subject) { | public void setSubject(String subject) { this.subject = subject; } |
public void setTo(String to) { | public void setTo(Expression to) { | public void setTo(String to) { this.to = to; } |
amount--; | public int skipNext(int amount) throws FetchException { if (amount <= 0) { if (amount < 0) { throw new IllegalArgumentException("Cannot skip negative amount: " + amount); } return 0; } ResultSet rs = mResultSet; if (rs == null) { ... | |
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { // for use by inner classes this.output = output; Stylesheet stylesheet = getStylesheet(); stylesheet.clear(); // run the body to add the rules getBody().run(context, output); stylesheet.setModeName(getMode()); if (var != null) { context.setVariable(var,... |
private boolean login( LoginDlg ld ) { | private void login( LoginDlg ld ) throws PhotovaultException { | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... |
log.debug( "Mysql DB name: " + sqldbName ); if ( sqldbName == null ) { JOptionPane.showMessageDialog( ld, "Could not find dbname for configuration " + db, "Configuration error", JOptionPane.ERROR_MESSAGE ); return false; | log.debug( "Mysql DB name: " + sqldbName ); if ( sqldbName == null ) { JOptionPane.showMessageDialog( ld, "Could not find dbname for configuration " + db, "Configuration error", JOptionPane.ERROR_MESSAGE ); throw new PhotovaultException( "Could not find dbname for configuration " + db ); | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... |
if ( ODMG.initODMG( user, passwd, db ) ) { log.debug( "Connection succesful!!!" ); success = true; int schemaVersion = db.getSchemaVersion(); if ( schemaVersion < db.CURRENT_SCHEMA_VERSION ) { String options[] = {"Proceed", "Exit Photovault"}; if ( JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( ld, "The dat... | ODMG.initODMG( user, passwd, db ); log.debug( "Connection succesful!!!" ); success = true; int schemaVersion = db.getSchemaVersion(); if ( schemaVersion < db.CURRENT_SCHEMA_VERSION ) { String options[] = {"Proceed", "Exit Photovault"}; if ( JOptionPane.YES_OPTION == JOptionPane.showOptionDialog( ld, "The database wa... | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... |
return success; | private boolean login( LoginDlg ld ) { boolean success = false; String user = ld.getUsername(); String passwd = ld.getPassword(); String dbName = ld.getDb(); log.debug( "Using configuration " + dbName ); settings.setConfiguration( dbName ); PVDatabase db = settings.getDatabase( dbName ); String... | |
if ( login( login ) ) { | try { login( login ); | void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... |
} else { JOptionPane.showMessageDialog( null, "Error logging into Photovault", | } catch( PhotovaultException e ) { JOptionPane.showMessageDialog( null, e.getMessage(), | void run() { checkSystem(); PhotovaultSettings settings = PhotovaultSettings.getSettings(); Collection databases = settings.getDatabases(); if ( databases.size() == 0 ) { DbSettingsDlg dlg = new DbSettingsDlg( null, true ); if ( dlg.showDialog() != dlg.APPROVE_OPTIO... |
logger.debug("Creating new ExportTxProcess for tables: "+exportTables); | public ExportTxProcess (PLExport plExport,List<SQLTable> exportTables, JDialog parentDialog, JProgressBar progressBar, JLabel label) { this.plExport = plExport; this.exportTables = exportTables; d = parentDialog; label.setText("Exporting Meta Data..."); new ProgressWatcher(progressBar, plExpo... | |
tables = exportingTables; | logger.debug("setExportingTables(): got new list of tables to export: "+exportingTables); tables = new ArrayList<SQLTable>(exportingTables); | public void setExportingTables(List<SQLTable> exportingTables) { tables = exportingTables; } |
List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); | List targetDBWarnings = listMissingTargetTables(tables); | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... |
if (choice == JOptionPane.NO_OPTION) { | if (choice != JOptionPane.YES_OPTION) { | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... |
ExportTxProcess etp = new ExportTxProcess(plexp,targetTables,d, | ExportTxProcess etp = new ExportTxProcess(plexp,tables,d, | public synchronized void setupDialog() { logger.debug("running setupDialog()"); if (plexp == null) { throw new NullPointerException("setupDialog: plexp was null"); } // always refresh Target Database (it might have changed) plexp.setTargetDataSource(ArchitectFrame.getMainInstance().getProject().getTargetDatabas... |
List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); | List targetDBWarnings = listMissingTargetTables(tables); | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... |
if (choice == JOptionPane.NO_OPTION) { | if (choice != JOptionPane.YES_OPTION) { | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... |
ExportTxProcess etp = new ExportTxProcess(plexp,targetTables,d, | ExportTxProcess etp = new ExportTxProcess(plexp,tables,d, | public void actionPerformed(ActionEvent evt) { if (!plPanel.applyChanges()) { return; } try { List targetTables = tables; List targetDBWarnings = listMissingTargetTables(targetTables); if (!targetDBWarnings.isEmpty()) { // modal dialog (hold things up until the user says YES or N... |
HaploData(){ assocTest = 0; | HaploData(int b){ assocTest = b; | HaploData(){ assocTest = 0; } |
protected void setParameters() { | protected void setParameters(HttpUrlMethod method) { | protected void setParameters() { NameValuePair nvp = null; for (int index = 0; index < getParameters().size(); index++) { NameValuePair parameter = (NameValuePair) getParameters(). get(index); _postMethod.addParameter(parameter); } } |
_postMethod.addParameter(parameter); | ((UrlPostMethod) method).addParameter(parameter); | protected void setParameters() { NameValuePair nvp = null; for (int index = 0; index < getParameters().size(); index++) { NameValuePair parameter = (NameValuePair) getParameters(). get(index); _postMethod.addParameter(parameter); } } |
final MBeanConfig configuredMBean = config.findMBeanByObjectName(objectName.getCanonicalName()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
if(configuredMBean != null) AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_MBEANS); | AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_MBEANS); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... |
registerTag("responseCode", ResponseCodeTag.class); | public JettyTagLibrary() { registerTag("jettyHttpServer", JettyHttpServerTag.class); registerTag("socketListener", SocketListenerTag.class); registerTag("realm", RealmTag.class); registerTag("httpContext", HttpContextTag.class); registerTag("resourceHandler", ResourceHandlerTag.cl... | |
ServiceContext srvcContext = Utils.getServiceContext(context, expression); ObjectAttribute objAttribute = mbeanService.getObjectAttribute(srvcContext, expression.getTargetName()); | ServiceContext srvcContext = null; ObjectAttribute objAttribute = null; try { srvcContext = Utils.getServiceContext(context, expression); objAttribute = mbeanService.getObjectAttribute(srvcContext, expression.getTargetName()); } finally { if(srvcContext != null) srvcContext.getServerConnection().close(); } | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception{ Str... |
logger.debug("compoundGroupEnd: edit stack ="+compoundEditStackCount); | logger.debug("compoundGroupEnd: edit stack ="+compoundEditStackCount +" ce=" +ce); | private void compoundGroupEnd() { if (UndoManager.this.isUndoOrRedoing()) return; if (compoundEditStackCount <= 0){ throw new IllegalStateException("No compound edit in progress"); } compoundEditStackCount--; if (compoundEditStackCount == 0) returnToEditState(); if (logger.isDebugEnabled()) { ... |
if (compoundEditStackCount == 1) | if (compoundEditStackCount == 1){ | private void compoundGroupStart(String toolTip) { if (UndoManager.this.isUndoOrRedoing()) return; compoundEditStackCount++; if (compoundEditStackCount == 1) ce = new CompEdit(toolTip); if (logger.isDebugEnabled()) { logger.debug("compoundGroupStart: edit stack ="+compoundEditStackCount); } } |
fireStateChanged(); } | private void compoundGroupStart(String toolTip) { if (UndoManager.this.isUndoOrRedoing()) return; compoundEditStackCount++; if (compoundEditStackCount == 1) ce = new CompEdit(toolTip); if (logger.isDebugEnabled()) { logger.debug("compoundGroupStart: edit stack ="+compoundEditStackCount); } } | |
fireStateChanged(); | private void returnToEditState() { if (compoundEditStackCount != 0) { throw new IllegalStateException("The compound edit stack ("+compoundEditStackCount+") should be 0"); } // add any movements List<PlayPenComponentEvent> condensedMoveEvents = new ArrayList<PlayPenComponentEvent>(); for (Map.Entry... | |
settings.addDatabase( pvd ); | try { settings.addDatabase( pvd ); } catch (PhotovaultException ex) { ex.printStackTrace(); } | private void createDatabase() { File dbDir = null; try { dbDir = File.createTempFile("pv_junit_derby_instance", ""); dbDir.delete(); } catch (IOException ex) { ex.printStackTrace(); } PVDatabase pvd = new PVDatabase(); pvd.setInstanceType( P... |
public DDLStatement(SQLObject object, StatementType type, String sqlText) { | public DDLStatement(SQLObject object, StatementType type, String sqlText, String targetCatalog, String targetSchema) { | public DDLStatement(SQLObject object, StatementType type, String sqlText) { this.object = object; this.type = type; this.sqlText = sqlText; } |
this.targetCatalog = targetCatalog; this.targetSchema = targetSchema; | public DDLStatement(SQLObject object, StatementType type, String sqlText) { this.object = object; this.type = type; this.sqlText = sqlText; } | |
project = (Project) context.getVariable( "org.apache.commons.jelly.werkz.Project" ); | project = (Project) context.findVariable( "org.apache.commons.jelly.werkz.Project" ); | public Project getProject() { if ( project == null ) { // we may be invoked inside a child script, so lets try find the parent project project = (Project) context.getVariable( "org.apache.commons.jelly.werkz.Project" ); if ( project == null ) { project = new Project(); ... |
log.debug( "Looking up variable: " + name + " answer: " + answer ); | String answerString = null; try { answerString = answer.toString(); } catch(Exception ex) {} if(answerString==null && answer!=null) answerString = " of class " + answer.getClass(); log.debug( "Looking up variable: " + name + " answer: " + answerString ); | public Object getVariable(String name) { // look in parent first Object answer = super.getVariable(name); if (answer == null) { answer = project.getProperty(name); } if ( log.isDebugEnabled() ) { log.debug( "Looking up variable: " + name + " answer: " + answe... |
FindBlocks(String[][] data){ | FindBlocks(PairwiseLinkage[][] data){ | FindBlocks(String[][] data){ dPrime = data; } |
null); | data.getParamValues()); | public ApplicationConfigData addApplication(ServiceContext context, ApplicationConfigData data){ AccessController.checkAccess(context, ACLConstants.ACL_ADD_APPLICATIONS); /* do the operation */ String appId = ApplicationConfig.getNextApplicationId(... |
logger.debug("Starting to create relationship!"); | logger.debug("Starting to create relationship, setting active to TRUE!"); | public void actionPerformed(ActionEvent evt) { logger.debug("the hashcode is: " + super.hashCode()); pkTable = null; fkTable = null; logger.debug("Starting to create relationship!"); active = true; pp.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); // gets over the "can't select a selected item"... |
logger.debug("66666666666666 setting active to FALSE!"); | public void itemSelected(SelectionEvent e) { // what address am I? logger.debug("00000000000 object hash code: " + super.hashCode()); // ignore events unless active logger.debug("11111111ITEM SELECTED: " + e); if (!active) { logger.debug("222222222 not active."); return; } Selectable s = e.getSelectableSou... | |
int numStrong = 0; int numRec = 0; | int numStrong = 0; int numRec = 0; int numInGroup = 0; | Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ ... |
if (lowCI > cutLowCI && highCI > cutHighCI) numStrong++; | if (lowCI > cutLowCI && highCI > cutHighCI) { numStrong++; } | Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ ... |
if (numStrong + numRec == 0) continue; | if (numInGroup > 3){ if (numStrong + numRec < 6) continue; }else if (numInGroup > 2){ if (numStrong + numRec < 3) continue; }else{ if (numStrong + numRec < 1) continue; } | Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ ... |
numStrong = 0; numRec = 0; | numStrong = 0; numRec = 0; numInGroup = 0; | Vector doSFS(){ float cutHighCI = 0.98f; float cutLowCI = 0.70f; float recHighCI = 0.90f; int numStrong = 0; int numRec = 0; Vector blocks = new Vector(); Vector strongPairs = new Vector(); //first make a list of marker pairs in "strong LD", sorted by distance apart for (int x = 0; x < dPrime.length-1; x++){ ... |
registerTagLibrary( "jelly:core", new CoreTagLibrary() ); registerTagLibrary( "jelly:xml", new XMLTagLibrary() ); | InputStream in = null; URL url = getClassLoader().getResource( "org/apache/commons/jelly/jelly.properties" ); if ( url != null ) { log.debug( "Loading Jelly default tag libraries from: " + url ); Properties properties = new Properties(); try { in = url.openStream(); properties.load( in ); for ( Iterator iter = propert... | protected void configure() { registerTagLibrary( "jelly:core", new CoreTagLibrary() ); registerTagLibrary( "jelly:xml", new XMLTagLibrary() ); } |
registerTag("invokeStatic", InvokeStaticTag.class); | public CoreTagLibrary() { registerTag("jelly", JellyTag.class); // core tags registerTag("out", ExprTag.class); registerTag("catch", CatchTag.class); registerTag("forEach", ForEachTag.class); registerTag("set", SetTag.class); registerTag("remove", RemoveTag.c... | |
ClassLoaders loaders = new ClassLoaders(); loaders.put( getClassLoader() ); | ClassLoaders loaders = ClassLoaders.getAppLoaders(TagLibrary.class, getClass(), false); | public DiscoverClasses getDiscoverClasses() { if ( discovery == null ) { ClassLoaders loaders = new ClassLoaders(); loaders.put( getClassLoader() ); discovery = new DiscoverClasses(loaders); discovery.addClassLoader( getClassLoader() ); } return disco... |
discovery.addClassLoader( getClassLoader() ); | public DiscoverClasses getDiscoverClasses() { if ( discovery == null ) { ClassLoaders loaders = new ClassLoaders(); loaders.put( getClassLoader() ); discovery = new DiscoverClasses(loaders); discovery.addClassLoader( getClassLoader() ); } return disco... | |
DiscoverClass discover = new DiscoverClass(loaders); Class implClass = discover.find(TestInterface2.class); TagLibrary answer = null; try { answer = (TagLibrary) DiscoverSingleton.find(TagLibrary.class, name); } catch (Exception e) { log.error( "Could not load service: " + name ); } return answer; */ | public TagLibrary resolveTagLibrary(String uri) { DiscoverClasses discovery = getDiscoverClasses(); String name = uri; if ( uri.startsWith( "jelly:" ) ) { name = "jelly." + uri.substring(6); } log.info( "Looking up service name: " + name ); Resour... | |
if (noDivByZero){ | if (noDivByZero && multidprime <= 1.00){ | public double[] computeMultiDprime(Haplotype[][] haplos){ double[] multidprimeArray = new double[haplos.length]; for (int gap = 0; gap < haplos.length - 1; gap++){ double[][] multilocusTable = new double[haplos[gap].length][]; double[] rowSum = new double[haplos[gap].length]; ... |
haplos[i][k].clearTags(); | public void pickTags(Haplotype[][] haplos){ for (int i = 0; i < haplos.length; i++){ //first clear the tags for this block haplos[i][0].clearTags(); //next pick the tagSNPs Vector theBestSubset = getBestSubset(haplos[i]); for (int j = 0; j < theBestSubse... | |
Stylesheet answer = new Stylesheet(); answer.setValueOfAction( new Action() { public void run(Node node) throws Exception { String text = node.getStringValue(); if ( text != null && text.length() > 0 ) { output.write( text ); } } } ); return answer; | JellyStylesheet answer = new JellyStylesheet(); answer.setOutput(output); return answer; | protected Stylesheet createStylesheet(final XMLOutput output) { // add default actions Stylesheet answer = new Stylesheet(); answer.setValueOfAction( new Action() { public void run(Node node) throws Exception { String text = node... |
System.out.println("Haplotype association results must be generated one block\n" + "definition at a time and so cannot be used with output type ALL."); | System.out.println("Haplotype association results cannot be used with block output \"ALL\""); | private void processFile(String fileName, int fileType, String infoFileName){ try { HaploData textData; File OutputFile; File inputFile; if(!quietMode && fileName != null){ System.out.println("Using data file " + fileName); } in... |
public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException, HaploViewException, PedFileException{ | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... |
if(currentFamily.getNumMembers() == 1){ | if((currentFamily.getNumMembers() == 1 && assocTest == 0) || assocTest == 2){ | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... |
chrom.add(new Chromosome(currentInd.getFamilyID(),currentInd.getIndividualID(),chrom1,currentInd.getAffectedStatus()==2)); chrom.add(new Chromosome(currentInd.getFamilyID(),currentInd.getIndividualID(),chrom2,currentInd.getAffectedStatus()==2)); | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... | |
if (!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0") || currentInd.getAffectedStatus() != 2)){ if (!(usedParents.contains( currentInd.getFamilyID() + " " + currentInd.getMomID()) || usedParents.contains(currentInd.getFamilyID() + " " + currentInd.getDadID()))){ numMarkers = currentInd.getNumMa... | if (!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0")) && (currentInd.getAffectedStatus() == 2 || assocTest == 0)){ numMarkers = currentInd.getNumMarkers(); byte[] dadTb = new byte[numMarkers]; byte[] dadUb = new byte[numMarkers]; byte[] momTb = new byte[numMarkers]; byte[] momUb = new byte[numMa... | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... |
dadUb[i] = 0; } else if (dad1 == kid1) { dadTb[i] = dad1; dadUb[i] = dad2; } else { dadTb[i] = dad2; dadUb[i] = dad1; } if (mom1 == 0) { | } } else if (mom1 == 0 && dad1 == dad2) { dadTb[i] = dad1; dadUb[i] = dad1; momUb[i] = 0; if (kid1 == dad1) { momTb[i] = kid2; } else { | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... |
momUb[i] = 0; } else if (mom1 == kid1) { momTb[i] = mom1; momUb[i] = mom2; } else { momTb[i] = mom2; momUb[i] = mom1; } } else { if (dad1 == 0 && mom1 == 0) { dadTb[i] = 0; dadUb[i] = 0; momTb[i] = 0; momUb[i] = 0; } else if (dad1 == 0 && mom1 != mom2) { dadTb[i] = 0; dadUb[i] = 0; momTb[i] = 5; momUb[i] = 5; } else... | } } else if (dad1 == dad2 && mom1 != mom2) { dadTb[i] = dad1; dadUb[i] = dad2; if (kid1 == dad1) { momTb[i] = kid2; momUb[i] = kid1; } else { momTb[i] = kid1; momUb[i] = kid2; } } else if (mom1 == mom2 && dad1 != dad2) { momTb[i] = mom1; momUb[i] = mom2; if (kid1 == mom1) { dadTb[i] = kid2; dadUb[i] = kid1; } else { ... | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... |
chrom.add(new Chromosome(currentInd.getFamilyID(),currentInd.getIndividualID(),dadTb,true,kidMissing)); chrom.add(new Chromosome(currentInd.getFamilyID(),currentInd.getIndividualID(),dadUb,false,kidMissing)); chrom.add(new Chromosome(currentInd.getFamilyID(),currentInd.getIndividualID(),momTb,true,kidMissing)); chrom.a... | public void linkageToChrom(boolean[] markerResults, PedFile pedFile) throws IllegalArgumentException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); In... | |
public void linkageToHapsFormat(boolean[] markerResults, PedFile pedFile, String hapFileName)throws IOException{ | public void linkageToHapsFormat(boolean[] markerResults, PedFile pedFile, String hapFileName)throws IOException, PedFileException{ | public void linkageToHapsFormat(boolean[] markerResults, PedFile pedFile, String hapFileName)throws IOException{ FileWriter linkageToHapsWriter = new FileWriter(new File(hapFileName)); Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Indi... |
chroms.add(new Chromosome(ped, indiv, genos, infile.getName())); | chroms.add(new Chromosome(ped, indiv, genos, false, infile.getName())); | void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; ... |
String n1 = t1.getName().toLowerCase(); String n2 = t2.getName().toLowerCase(); | String n1 = t1.getName(); String n2 = t2.getName(); if (n1 != null) n1 = n1.toLowerCase(); if (n2 != null) n2 = n2.toLowerCase(); | public int compare(SQLObject t1, SQLObject t2) { // if t1 and t2 refer to the same object, or are both null, then they're equal if (t1 == t2) return 0; else if (t1 == null) return -1; else if (t2 == null) return 1; else { //TODO In version 2.0 we want this to be an option String n1 = t1.getName().t... |
assertEquals("There are multiple copies of this relationship in the parent's export keys folder",2,parentTable.getExportedKeys().size()); assertEquals("There are multiple copies of this relationship in the child's import keys folder",1,childTable1.getImportedKeys().size()); | assertEquals("There are multiple copies of this relationship in the parent's exported keys folder",2,parentTable.getExportedKeys().size()); assertEquals("There are multiple copies of this relationship in the child's imported keys folder",1,childTable1.getImportedKeys().size()); | public void testReconnectOldRelationshipWithCustomMapping() throws ArchitectException { List<SQLColumn> origParentCols = new ArrayList<SQLColumn>(parentTable.getColumns()); List<SQLColumn> origChild1Cols = new ArrayList<SQLColumn>(childTable1.getColumns()); parentTable.removeExportedKey(rel1); rel1.attachRelati... |
public FileIterator(Project project, Iterator fileSetIterator) { this.project = project; this.fileSetIterator = fileSetIterator; | public FileIterator(Project project, Iterator fileSetIterator) { this( project, fileSetIterator, false); | public FileIterator(Project project, Iterator fileSetIterator) { this.project = project; this.fileSetIterator = fileSetIterator; } |
files = ds.getIncludedFiles(); | if (iterateDirectories) { files = ds.getIncludedDirectories(); } else { files = ds.getIncludedFiles(); } | private boolean setNextObject() { while (true) { while (ds == null) { if ( ! fileSetIterator.hasNext() ) { return false; } FileSet fs = (FileSet) fileSetIterator.next(); ds = fs.getDirectoryScanner(project); ... |
public void run(Context context, XMLOutput output) throws Exception { | public void run(JellyContext context, XMLOutput output) throws Exception { | public void run(Context context, XMLOutput output) throws Exception { if ( test != null ) { if ( test.evaluateAsBoolean( context ) ) { getBody().run( context, output ); } } } |
logger.debug("project: " + ArchitectFrame.getMainInstance().getProject()); if (ArchitectFrame.getMainInstance().getProject() == null || ArchitectFrame.getMainInstance().getProject().getTargetDatabase() == value) { | SQLDatabase db = (SQLDatabase) value; if (db.isPlayPenDatabase()) { | public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { setText(value.toString()); if (value instanceof SQLDatabase) { logger.debug("proj... |
StringBuffer name = new StringBuffer(); name.append("Project"); | if (db.getName() == null || db.getName().length() == 0) { setText("Project"); } else { setText("Project ("+db.getName()+")"); } | public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { setText(value.toString()); if (value instanceof SQLDatabase) { logger.debug("proj... |
public DBTree() { | private DBTree() { | public DBTree() { setUI(new MultiDragTreeUI()); setRootVisible(false); setShowsRootHandles(true); ds = new DragSource(); ds.createDefaultDragGestureRecognizer (this, DnDConstants.ACTION_COPY, new DBTreeDragGestureListener()); newDBCSAction = new NewDBCSAction(); dbcsPropertiesAction = new DBCSPropertiesActi... |
return connectionSpec.getDisplayName(); | if (connectionSpec != null) { return connectionSpec.getDisplayName(); } else { return "PlayPen Database"; } | public String getName() { return connectionSpec.getDisplayName(); } |
return connectionSpec.getDisplayName(); | return getName(); | public String getShortDisplayName() { return connectionSpec.getDisplayName(); } |
if (connectionSpec != null) { return connectionSpec.getDisplayName(); } else { return "PlayPen Database"; } | return getName(); | public String toString() { if (connectionSpec != null) { return connectionSpec.getDisplayName(); } else { return "PlayPen Database"; } } |
int size = tagStack.size(); if ( size <= 0 ) { parentTag = null; } else { parentTag = (Tag) tagStack.remove( size - 1 ); } | public void endElement(String namespaceURI, String localName, String qName) throws SAXException { tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); if (tagScript != null) { if (textBuffer.length() > 0) { script.addScript(new TextScript(textBuffe... | |
parentTag = tag; | if ( parentTag != null ) { tagStack.add( parentTag ); } parentTag = tag; | public void startElement( String namespaceURI, String localName, String qName, Attributes list) throws SAXException { try { // if this is a tag then create a script to run it // otherwise pass the text to the current body ... |
Object size = attributes.remove("size"); if (size != null) { Point point = null; if (size instanceof Point) { point = (Point) size; } else { point = PointConverter.getInstance().parse(size.toString()); } Control control = (Control) bean; control.setSize(point); } | Control control = (Control) bean; Object size = attributes.remove("size"); setSize(control, size); Object colorValue = attributes.remove("background"); Color background = getColor(control, colorValue); control.setBackground(background); colorValue = attributes.remove("foreground"); Color foreground = getColor(co... | protected void setBeanProperties(Object bean, Map attributes) throws JellyTagException { // special handling of size property as the Control object breaks the // JavaBean naming conventions by overloading the setSize() method if (bean instanceof Control) { Object size = attributes.remove("s... |
if(Array.getLength(data) > 0){ return formatArray(data); } | return formatArray(data); | public static String format(Object data){ /* if data is null, return the configured null value */ if(data == null) return nullValue; /* check for a DataFormat for given type (normal object or array)*/ DataFormat formatter = findDataFormat(data); if(formatter != defaultFormatter){ ... |
for (index = begin; index < end; index += step ) { | for (index = begin; index <= end; index += step ) { | public void doTag(XMLOutput output) throws Exception { if (log.isDebugEnabled()) { log.debug("running with items: " + items); } if (items != null) { Iterator iter = items.evaluateAsIterator(context); if (log.isDebugEnabled()) { log.debug("Iteratin... |
public Object evaluate(Context context) { | public Object evaluate(JellyContext context) { | public Object evaluate(Context context) { // XXXX: unfortunately we must sychronize evaluations // so that we can swizzle in the context. // maybe we could create an expression from a context // (and so create a BSFManager for a context) synchronized (registry) { regist... |
registry.setContext(context); | registry.setJellyContext(context); | public Object evaluate(Context context) { // XXXX: unfortunately we must sychronize evaluations // so that we can swizzle in the context. // maybe we could create an expression from a context // (and so create a BSFManager for a context) synchronized (registry) { regist... |
public void setContext(Context context) { | public void setContext(JellyContext context) { | public void setContext(Context context) { this.context = context; } |
if (which.equals(c[i])){ | if (which.equalsIgnoreCase(c[i])){ | public GBrowseDialog(HaploView h, String title){ super (h,title); hv = h; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel chromPanel = new JPanel(); chromPanel.add(new JLabel("Chromosome")); String[] c = {"1", "2"... |
} if (Chromosome.getDataChrom().equalsIgnoreCase("chrp")){ cbox.setSelectedIndex(22); | public GBrowseDialog(HaploView h, String title){ super (h,title); hv = h; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel chromPanel = new JPanel(); chromPanel.add(new JLabel("Chromosome")); String[] c = {"1", "2"... | |
columnSelector.setModel(new SQLTableListModel(t)); new ProgressWatcher(progressBar,pm); new Thread(new Runnable() { public void run() { try { progressBar.setVisible(true); if (pm.getResult(t) == null) { pm.setCancelled(false); pm.createProfiles(Collections.nCopies(1, t)); } progressBar.setVisible(false); } catch (SQL... | List<SQLColumn> columns = new ArrayList<SQLColumn>(); for (ProfileResult pr : tableModel.getResultList() ) { if (pr instanceof ColumnProfileResult) { SQLColumn column = (SQLColumn)pr.getProfiledObject(); SQLTable t2 = column.getParentTable(); if ( t == t2 && (!columns.contains(column)) ) { columns.add(column); | private void setup() { progressBar.setVisible(false); FormLayout controlsLayout = new FormLayout( "4dlu,fill:min(150dlu;default):grow, 4dlu", // columns "default, 4dlu, fill:min(200dlu;default):grow,4dlu,default"); // rows CellConstraints cc = new CellConstraints()... |
}).start(); | columnSelector.setModel(new DefaultComboBoxModel(columns.toArray())); if ( columns.size() > 0 ) { if ( selectedColumn != null && columns.contains(selectedColumn)) { columnSelector.setSelectedValue(selectedColumn,true); } else { columnSelector.setSelectedIndex(0); } } | private void setup() { progressBar.setVisible(false); FormLayout controlsLayout = new FormLayout( "4dlu,fill:min(150dlu;default):grow, 4dlu", // columns "default, 4dlu, fill:min(200dlu;default):grow,4dlu,default"); // rows CellConstraints cc = new CellConstraints()... |
columnSelector.addMouseListener(new MouseListener() { public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { SQLColumn col = (SQLColumn)columnSelector.getSelectedValue(); for ( int i=0; i<viewTable.getRowCount(); i++ ) { if ( col == viewTable.getValueAt(i, viewTable.convertColumnIndexToView( ProfileCo... | private void setup() { progressBar.setVisible(false); FormLayout controlsLayout = new FormLayout( "4dlu,fill:min(150dlu;default):grow, 4dlu", // columns "default, 4dlu, fill:min(200dlu;default):grow,4dlu,default"); // rows CellConstraints cc = new CellConstraints()... | |
} | public void displayProfile(SQLTable t, SQLColumn c) { ColumnProfileResult cr = (ColumnProfileResult) pm.getResult(c); TableProfileResult tr = (TableProfileResult) pm.getResult(t); if (tr instanceof TableProfileResult) { rowCount = tr.getRowCount(); } else { rowCount... | |
} | public void displayProfile(SQLTable t, SQLColumn c) { ColumnProfileResult cr = (ColumnProfileResult) pm.getResult(c); TableProfileResult tr = (TableProfileResult) pm.getResult(t); if (tr instanceof TableProfileResult) { rowCount = tr.getRowCount(); } else { rowCount... | |
refreshTable(); | public TDTPanel(Vector chromosomes) { result = TDT.calcTDT(chromosomes); tableColumnNames.add("Name"); tableColumnNames.add("Chi Squared"); tableColumnNames.add("T/U Ratio"); tableColumnNames.add("p value"); } | |
logger.debug("Ignoring Reset request"); return; | logger.debug("Ignoring Reset request for: " + getConnectionSpec()); populated = true; } else { logger.debug("Resetting: " + getConnectionSpec()); List old = children; if (old != null && old.size() > 0) { int[] oldIndices = new int[old.size()]; for (int i = 0, n = old.size(); i < n; i++) { oldIndices[i] = i; } fireDbC... | protected void reset() { if (ignoreReset) { logger.debug("Ignoring Reset request"); return; } logger.debug("Resetting...."); // tear down old connection stuff List old = children; if (old != null && old.size() > 0) { int[] oldIndices = new int[old.size()]; for (int i = 0, n = old.size(); i < n; i++) { ... |
logger.debug("Resetting...."); List old = children; if (old != null && old.size() > 0) { int[] oldIndices = new int[old.size()]; for (int i = 0, n = old.size(); i < n; i++) { oldIndices[i] = i; } fireDbChildrenRemoved(oldIndices, old); } children = new ArrayList(); | protected void reset() { if (ignoreReset) { logger.debug("Ignoring Reset request"); return; } logger.debug("Resetting...."); // tear down old connection stuff List old = children; if (old != null && old.size() > 0) { int[] oldIndices = new int[old.size()]; for (int i = 0, n = old.size(); i < n; i++) { ... | |
populated = false; | protected void reset() { if (ignoreReset) { logger.debug("Ignoring Reset request"); return; } logger.debug("Resetting...."); // tear down old connection stuff List old = children; if (old != null && old.size() > 0) { int[] oldIndices = new int[old.size()]; for (int i = 0, n = old.size(); i < n; i++) { ... | |
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, currentDashboardConfig.getName()); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ... | |
table.getColumnModel().getColumn(2).setPreferredWidth(300); | table.getColumnModel().getColumn(0).setPreferredWidth(120); table.getColumnModel().getColumn(1).setPreferredWidth(120); table.getColumnModel().getColumn(2).setPreferredWidth(240); | public FilteredIndividualsDialog(HaploView h, String title) { super(h,title); JTable table; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents,BoxLayout.Y_AXIS)); Vector axedPeople = h.theData.getPedFile().getAxedPeople(); Vector colNames = new Vector... |
} catch(MessagingException e) { log.error("error processing incoming mail: " + e.getMessage()); throw e; | public void sendMail(MailAddress sender, Collection recipients, MimeMessage msg) throws MessagingException { MailProcessingRecord mailProcessingRecord = new MailProcessingRecord(); mailProcessingRecord.setReceivingQueue("smtpOutbound"); mailProcessingRecord.setTimeFetchStart(System.currentTimeM... | |
tmp=pA2; pA2=pB2; pB2=tmp; | pA2 = pA2 + pB2; pB2 = pA2 - pB2; pA2 = pA2 - pB2; | public PairwiseLinkage computeDPrime(int pos1, int pos2){ long sep = Chromosome.getMarker(pos2).getPosition() - Chromosome.getMarker(pos1).getPosition(); if (maxdist > 0){ if ((sep > maxdist || sep < negMaxdist)){ return null; } } compsDone++; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.