rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
File infoFile; if(infoFileName.equals("")) { infoFile = null; }else{ | File infoFile = null; if (infoFileName != null){ | 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... |
if (f.canWrite()){ System.out.println("File " + f.getName() + " can not be written."); System.exit(1); } | private File validateOutputFile(String fn){ File f = new File(fn); if (f.canWrite()){ System.out.println("File " + f.getName() + " can not be written."); System.exit(1); } if (f.exists() && !quietMode){ System.out.println("File " + f.getName() + " already... | |
protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, | protected void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
final int ncols = 17; for (int colNo = 0; colNo < ncols; colNo++) { | for (int colNo = 0; colNo < totalColumn; colNo++) { | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
contents = col.isDefinitelyNullable() ? "Y" : "N"; alignment = Element.ALIGN_CENTER; | if ( cProfile != null && !cProfile.isError() ) { if ( col.isDefinitelyNullable() ) { contents = String.valueOf(cProfile.getNullCount()); if (rowCount == 0) { contents += " / N/A"; alignment = Element.ALIGN_CENTER; } else { contents += " / " + pctFormat.format(cProfile.getNullCount() / (double) rowCount); alignment = El... | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
contents = String.valueOf(cProfile.getNullCount()); alignment = Element.ALIGN_RIGHT; } else { contents = "Column Profiling Error"; | contents = String.valueOf(cProfile.getDistinctValueCount()); if (rowCount == 0) { contents += " / N/A"; } else { contents += " / " + pctFormat.format(cProfile.getDistinctValueCount() / (double) rowCount); } alignment = Element.ALIGN_RIGHT; } else { contents = ""; | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
if (rowCount == 0) { contents = "N/A"; alignment = Element.ALIGN_CENTER; } else { contents = pctFormat.format(cProfile.getNullCount() / (double) rowCount); alignment = Element.ALIGN_RIGHT; } | contents = String.valueOf(cProfile.getMinLength()); alignment = Element.ALIGN_RIGHT; | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
contents = String.valueOf(cProfile.getDistinctValueCount()); | contents = String.valueOf(cProfile.getMaxLength()); | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
if (rowCount == 0) { contents = "N/A"; alignment = Element.ALIGN_CENTER; } else { contents = pctFormat.format(cProfile.getDistinctValueCount() / (double) rowCount); alignment = Element.ALIGN_RIGHT; } | contents = String.valueOf(cProfile.getAvgLength()); alignment = Element.ALIGN_RIGHT; | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
contents = String.valueOf(cProfile.getMinLength()); alignment = Element.ALIGN_RIGHT; } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 10) { if ( cProfile != null && !cProfile.isError() ) { contents = String.valueOf(cProfile.getMaxLength()); alignment = Element.ALIGN_RIGHT; } else { contents... | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... | |
} } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 13) { if ( cProfile != null && !cProfile.isError() ) { contents = String.valueOf(cProfile.getMaxValue()); | contents = String.valueOf(cProfile.getMinValue()); } } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 10) { if ( cProfile != null && !cProfile.isError() ) { | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
} } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 14) { if ( cProfile != null && !cProfile.isError() ) { contents = String.valueOf(cProfile.getAvgValue()); | contents = String.valueOf(cProfile.getMaxValue()); } } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 11) { if ( cProfile != null && !cProfile.isError() ) { | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
} } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 15) { | contents = String.valueOf(cProfile.getAvgValue()); } } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 12) { | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
Object value = null; | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... | |
value = cvc.getValue(); sb.append(value).append("\n"); | sb.append(cvc.getValue()).append("\n"); | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
if (value == null) { alignment = Element.ALIGN_CENTER; } else if (value instanceof Number) { alignment = Element.ALIGN_RIGHT; } else { alignment = Element.ALIGN_LEFT; } } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 16) { | alignment = Element.ALIGN_LEFT; } else { contents = ""; alignment = Element.ALIGN_LEFT; } } else if (colNo == 13) { | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
StringBuffer truncContents = new StringBuffer(contents.length()); | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... | |
widths[colNo] = Math.max(widths[colNo], bf.getWidthPoint((String) contents, fsize)); Phrase phr = new Phrase((String) contents, f); PdfPCell cell = new PdfPCell(phr); cell.setBorder(Rectangle.NO_BORDER); | for (String contentLine : contents.split("\n")) { if (contentLine.length() > maxCharsInTopN) { contentLine = contentLine.substring(0, maxCharsInTopN) + "..."; } widths[colNo] = Math.max(widths[colNo], bf.getWidthPoint((String) contentLine, fsize)); truncContents.append(contentLine).append("\n"); } PdfPCell cell; if (... | protected static void addBodyRow(ProfileManager pm, SQLColumn col, PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException { ... |
private static void addHeaderRow(PdfPTable table, | private void addHeaderRow(PdfPTable table, | private static void addHeaderRow(PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException { final String[] headings = new String[] { "Table Name", "Record Co... |
final String[] headings = new String[] { "Table Name", "Record Count", "Column Name", "Data Type", "Nullable", "Null Count", "% null", "Unique Count", "% unique", "Min Length", "Max Length", "Avg Length", "Min Value", "Max Value", "Avg Value", "Top N Values", "Count" }; | private static void addHeaderRow(PdfPTable table, BaseFont bf, Font f, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException { final String[] headings = new String[] { "Table Name", "Record Co... | |
private static float calcHeaderHeight(PdfPTable table) { | private float calcHeaderHeight(PdfPTable table) { | private static float calcHeaderHeight(PdfPTable table) { int hrows = table.getHeaderRows(); float height = 0f; for (int i = 0; i < hrows; i++) { height += table.getRowHeight(i); } return height; } |
protected static PdfPTable makeNextTable(ProfileManager pm, SQLTable sqlTable, | protected PdfPTable makeNextTable(ProfileManager pm, SQLTable sqlTable, | protected static PdfPTable makeNextTable(ProfileManager pm, SQLTable sqlTable, BaseFont bf, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException ... |
TableProfileResult tProfile = (TableProfileResult) pm.getResult(sqlTable); | protected static PdfPTable makeNextTable(ProfileManager pm, SQLTable sqlTable, BaseFont bf, float fsize, float[] widths) throws DocumentException, IOException, ArchitectException, SQLException, InstantiationException, IllegalAccessException ... | |
saveDBCS(); | saveDataSources(); | public void save(ProgressMonitor pm) throws IOException, ArchitectException { out = new PrintWriter(new BufferedWriter(new FileWriter(file))); objectIdMap = new HashMap(); dbcsIdMap = new HashMap(); indent = 0; progress = 0; this.pm = pm; if (pm != null) { pm.setMinimum(0); int pmMax = countSourceTabl... |
d.addFactoryCreate("architect-project/project-data-sources/data-source", dbcsFactory); d.addCallMethod("architect-project/project-data-sources/data-source/property", "put", 2); d.addCallParam("architect-project/project-data-sources/data-source/property", 0, "key"); d.addCallParam("architect-project/project-data-sources... | protected Digester setupDigester() { Digester d = new Digester(); d.setValidating(false); d.push(this); // project name d.addCallMethod("architect-project/project-name", "setName", 0); // argument is element body text // source DB connection specs DBCSFactory dbcsFactory = new DBCSFactory(); d.addFactoryCreate... | |
changeBlocks(currentBlockDef); | if (currentBlockDef != BLOX_CUSTOM){ changeBlocks(currentBlockDef); }else{ Vector theBlocks = new Vector(); for (int x = 0; x < currentBlocks.size(); x++){ Vector goodies = new Vector(); int currentBlock[] = (int[])currentBlocks.elementAt(x); for (int marker = 0; marker < currentBlock.length; marker++){ for (int y = 0... | public void stateChanged(ChangeEvent e) { int tabNum = tabs.getSelectedIndex(); if (tabNum == VIEW_D_NUM || tabNum == VIEW_HAP_NUM){ exportMenuItems[0].setEnabled(true); exportMenuItems[1].setEnabled(true); }else if (tabNum == VIEW_TDT_NUM || tabNum... |
blockMenuItems[3].setEnabled(false); | public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ... | |
if (method == BLOX_NONE){ | if (method == BLOX_NONE || method == BLOX_CUSTOM){ | public void changeBlocks(int method){ if (method == BLOX_NONE){ blockMenuItems[BLOX_CUSTOM].setSelected(true); } theData.guessBlocks(method); dPrimeDisplay.repaint(); currentBlockDef = method; try{ if (tabs.getSelectedIndex() == VIEW_HAP_NUM){ ... |
theData.guessBlocks(method); | if (method != BLOX_CUSTOM){ theData.guessBlocks(method); } | public void changeBlocks(int method){ if (method == BLOX_NONE){ blockMenuItems[BLOX_CUSTOM].setSelected(true); } theData.guessBlocks(method); dPrimeDisplay.repaint(); currentBlockDef = method; try{ if (tabs.getSelectedIndex() == VIEW_HAP_NUM){ ... |
if (dPrimeDisplay != null && tabs.getSelectedIndex() == VIEW_D_NUM){ dPrimeDisplay.repaint(); } | changeBlocks(BLOX_CUSTOM); | void readBlocksFile(File file) { try{ Vector cust = theData.readBlocks(file); theData.guessBlocks(BLOX_CUSTOM, cust); if (dPrimeDisplay != null && tabs.getSelectedIndex() == VIEW_D_NUM){ dPrimeDisplay.repaint(); } }catch (HaploViewException hve){ ... |
getBody().run(context, output); | invokeBody(output); | public void doTag(final XMLOutput output) throws Exception { this.session = new JellySession( output ); getBody().run(context, output); } |
long minpos = Chromosome.getFilteredMarker(0).getPosition(); long maxpos = Chromosome.getFilteredMarker(Chromosome.getSize()-1).getPosition(); | long minpos = Chromosome.getMarker(0).getPosition(); long maxpos = Chromosome.getMarker(Chromosome.getSize()-1).getPosition(); | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); /* boxSize = ((clipRect.width-2*H_BORDER)/dPrimeTable.length-1); if (boxSize < 12){boxSize=1... |
for (int i = 0; i < Chromosome.getSize(); i++) { | for (int i = 0; i < Chromosome.getFilteredSize(); i++) { | public void paintComponent(Graphics g){ Graphics2D g2 = (Graphics2D) g; Dimension size = getSize(); Dimension pref = getPreferredSize(); Rectangle visRect = getVisibleRect(); /* boxSize = ((clipRect.width-2*H_BORDER)/dPrimeTable.length-1); if (boxSize < 12){boxSize=1... |
folderTree.setShowsRootHandles( true ); | folderTree.setShowsRootHandles( false ); | void createUI() { setLayout(new GridBagLayout()); folderTree = new JTree( ); folderTree.setRootVisible( true ); folderTree.setShowsRootHandles( true ); folderTree.setEditable( false ); JScrollPane scrollPane = new JScrollPane( folderTree ); scrollPane.setPreferredSize( new Dimension( 300, 300 ) ); GridBagConstra... |
TreePath parentPath = e.getTreePath(); folderTree.expandPath( parentPath ); | final TreePath parentPath = e.getTreePath(); SwingUtilities.invokeLater(new java.lang.Runnable() { public void run() { folderTree.expandPath( parentPath ); } }); | public void treeNodesInserted( TreeModelEvent e ) { TreePath parentPath = e.getTreePath(); folderTree.expandPath( parentPath ); } |
g.setFont(boxFont); | g.setFont(popupFont); | public void mousePressed (MouseEvent e) { Rectangle blockselector = new Rectangle(clickXShift-boxRadius,clickYShift - boxRadius, (int)alignedPositions[alignedPositions.length-1]+boxSize, boxSize); //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent... |
g.setFont(popupFont); | public void paintComponent(Graphics g){ DPrimeTable dPrimeTable = theData.dpTable; if (Chromosome.getSize() == 0){ //if there are no valid markers return; } Vector blocks = theData.blocks; Rectangle visRect = getVisibleRect(); //deal with zooming ... | |
if(description == null) return ""; | public String getDescription() { return description; } | |
if(type.startsWith("[")){ | if(type != null && type.startsWith("[")){ | protected String getDisplayType(String type){ if(type.startsWith("[")){ /* convert to readable name. e.g. [Ljava.lang.String to java.lang.String[]*/ String arrayBraces = ""; while(type.startsWith("[")){ type = type.substring(1); ar... |
JButton searchButton = new JButton("Search"); | JDefaultButton searchButton = new JDefaultButton("Search"); | public void showSearchDialog(final PlayPen pp) { // XXX need to convert to an ArchitectPanel before switching // this to use ArchitectPanelBuilder. final JDialog d = new JDialog((Frame) SwingUtilities.getAncestorOfClass(JFrame.class, pp), "Find"); ButtonGroup matchType = new ButtonGroup(); ... |
int[] block_size; if (theBlock.length < 9){ block_size = new int[1]; block_size[0] = theBlock.length; } else { int ones = theBlock.length%8; int eights = (theBlock.length - ones)/8; if (ones == 0){ block_size = new int[eights]; for (int i = 0; i < eights; i++){ block_size[i]=8; } } else { block_size = new int[eights+1... | Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo... | |
EM theEM = new EM(); EMReturn EMresults = theEM.full_em_breakup(input_haplos, 4, block_size, 0,trioCount); | EM theEM = new EM(chromosomes,numTrios); theEM.doEM(theBlock); | Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo... |
Haplotype[] tempArray = new Haplotype[EMresults.numHaplos()]; int[][] returnedHaplos = EMresults.getHaplotypes(); double[] returnedFreqs = EMresults.getFrequencies(); for (int i = 0; i < EMresults.numHaplos(); i++){ | Haplotype[] tempArray = new Haplotype[theEM.numHaplos()]; int[][] returnedHaplos = theEM.getHaplotypes(); double[] returnedFreqs = theEM.getFrequencies(); for (int i = 0; i < theEM.numHaplos(); i++){ | Haplotype[][] generateHaplotypes(Vector blocks, int hapthresh) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this.blo... |
chroms.add(new Chromosome(ped, indiv, genos, infile.getName())); | chroms.add(new Chromosome(ped, indiv, genos, infile.getName(), 0)); | 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]; ... |
Writer writer = new OutputStreamWriter( new FileOutputStream( name ), encoding ); | Writer writer = new OutputStreamWriter( new FileOutputStream( name, doAppend ), encoding ); | public void doTag(final XMLOutput output) throws JellyTagException { try { if ( name != null ) { String encoding = (this.encoding != null) ? this.encoding : "UTF-8"; Writer writer = new OutputStreamWriter( new FileOutputStream( name ), encoding ); write... |
if (haplos == null){ return null; } | public Haplotype[][] filterHaplos(Haplotype[][] haplos) { Haplotype[][] filteredHaplos = new Haplotype[haplos.length][]; for (int i = 0; i < haplos.length; i++){ Vector tempVector = new Vector(); for (int j = 0; j < haplos[i].length; j++){ if (haplos[i][j].getPerce... | |
OutputFile = validateOutputFile(fileName + ".4GAMblocks"); textData.guessBlocks(BLOX_4GAM); haplos = textData.generateHaplotypes(textData.blocks, false); filtHaplos = filterHaplos(haplos); textData.pickTags(filtHaplos); textData.saveHapsToText(haplos, textData.computeMultiDprime(filtHaplos), OutputFile);; OutputFile = ... | }else if (!quietMode){ System.out.println("Skipping block output: no valid blocks."); } | 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); } i... |
BufferedImage i = dpd.export(0,Chromosome.getSize(),outputCompressedPNG); | BufferedImage i = dpd.export(0,Chromosome.getUnfilteredSize(),outputCompressedPNG); | 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); } i... |
if (expectedValue == null && expectedValue == null) { | if (expectedValue == null && actualValue == null) { | public void doTag(XMLOutput output) throws Exception { String message = getBodyText(); Object expectedValue = expected.evaluate(context); Object actualValue = actual.evaluate(context); if (expectedValue == null && expectedValue == null) { ... |
message = "File does not exist." | message = "File does not exist."; | public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist." } if (file == null) { fail(message, "file given is null"); } ... |
public void setFile(File aFile) { file = aFile; } | public void doTag(XMLOutput output) throws JellyTagException { String message = getBodyText(); if (message == null || message.length() == 0) { message = "File does not exist." } if (file == null) { fail(message, "file given is null"); } ... | |
DateFormat df = new SimpleDateFormat( dateFormatStr ); | DateFormat df = getDateFormat(); | public FuzzyDate parse(String strDate) { DateFormat df = new SimpleDateFormat( dateFormatStr ); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLeng... |
fd = new FuzzyDate( midpoint, ((float)(getFuzzyPeriodLength(d))) / (2*FuzzyDate.MILLIS_IN_DAY) ); | fd = new FuzzyDate( midpoint, 0.5 * getFloatFuzzyPeriodLength( d ) ); | public FuzzyDate parse(String strDate) { DateFormat df = new SimpleDateFormat( dateFormatStr ); FuzzyDate fd = null; try { Date d = df.parse( strDate ); if ( d != null ) { Date midpoint = new Date( d.getTime() + getFuzzyPeriodLeng... |
iter = foldersNotFound.iterator(); while ( iter.hasNext() ) { PhotoFolder subfolder = (PhotoFolder)iter.next(); subfolder.delete(); } | void indexDirectory( File dir, PhotoFolder folder, int startPercent, int endPercent ) { /** Maintain information how many instances for the photos that were previously added to the folder is found */ HashMap photoInstanceCounts = new HashMap(); if ( folder != null ) { ... | |
Object title = attributes.remove("title"); if (title != null) { getWindow().getShell().setText((String)title); } | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { Map attributes = getAttributes(); Object parent = attributes.remove("parent"); if (parent != null) { if (parent instanceof Shell) { this.parent = (Shell) parent; ... | |
return new JSR160ServerConnection(jmxc); | return new JSR160ServerConnection(jmxc, jmxc.getMBeanServerConnection()); | public ServerConnection getServerConnection(ApplicationConfig config) throws ConnectionFailedException { try { /* Create an RMI connector client */ HashMap env = new HashMap(); String[] credentials = new String[] {config.getUsername(), ... |
Font bigguns = new Font("Default", Font.BOLD, 14); | Font bigguns = new Font("Default", Font.PLAIN, 14); | public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer v... |
changeScroller.setPreferredSize(new Dimension(150,150)); | changeScroller.setPreferredSize(new Dimension(250,150)); | public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer v... |
contents.add(changeScroller); | JPanel scrollHolder = new JPanel(); scrollHolder.add(changeScroller); contents.add(scrollHolder); | public UpdateDisplayDialog(HaploView h, String title, UpdateChecker uc) { super(h, title); JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); Font bigguns = new Font("Default", Font.BOLD, 14); JLabel announceLabel = new JLabel("A newer v... |
public void run(Context context, XMLOutput output) throws Exception { output.startElement( uri, localName, qname, attributes ); getBody().run(context, output); output.endElement( uri, localName, qname ); } | public void run(JellyContext context, XMLOutput output) throws Exception { output.startElement(uri, localName, qname, attributes); getBody().run(context, output); output.endElement(uri, localName, qname); } | public void run(Context context, XMLOutput output) throws Exception { output.startElement( uri, localName, qname, attributes ); getBody().run(context, output); output.endElement( uri, localName, qname ); } |
int index = attributes.getIndex( "", name ); if ( index > 0 ) { attributes.removeAttribute( index ); } if ( value != null ) { attributes.addAttribute( "", name, name, "CDATA", value.toString() ); } } | int index = attributes.getIndex("", name); if (index >= 0) { attributes.removeAttribute(index); } if (value != null) { attributes.addAttribute("", name, name, "CDATA", value.toString()); } } | public void setAttribute(String name, Object value) { // ### we'll assume that all attributes are in no namespace! // ### this is severely limiting! // ### - Tag attributes should allow for namespace aware int index = attributes.getIndex( "", name ); if ( index > 0 ) { ... |
if (fileType == HAPS){ caller.readPhasedGenotypes(returnStrings); }else if (fileType == PED){ caller.readPedGenotypes(returnStrings, PED); }else if (fileType == DCC){ caller.readPedGenotypes(returnStrings, DCC); } | caller.readGenotypes(returnStrings, fileType); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == HAPMAP_DATA){ load(DCC); }else if (command == BROWSE_GENO){ ... |
if ( value.length() > maxLength ) { | if ( value != null && value.length() > maxLength ) { | void checkStringProperty( String propertyName, String value, int maxLength ) throws IllegalArgumentException { if ( value.length() > maxLength ) { throw new IllegalArgumentException( propertyName + " cannot be longer than " + maxLength + " characters" ); } } |
* Populates the schema dropdown box from the schema * parent that doStuff() populated. * @throws ArchitectException | * Populates the schema dropdown box from the schema * parent that doStuff() populated. * * @throws ArchitectException | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogDropdown.removeAllItems(); catalogDropdown.setEnabled(false); // This is either a database, a catalog, or null depending on how db is structured SQLObject schemaParent; i... |
} else if (englishButton.isSelected()) { | } else if (englishButton.isSelected()) { int objectCount = 0; | public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); ... |
sourceDoc.insertString( sourceDoc.getLength(), chunk.getData().toString()+"\n", | if (chunk.getData() instanceof SQLRelationship) { if ( objectCount > 0 ) sourceDoc.insertString(sourceDoc.getLength(), "\n", styles.get(chunk.getType())); SQLRelationship rel = (SQLRelationship) chunk .getData(); sourceDoc.insertString(sourceDoc.getLength(), chunk .getData().toString() + "\n " + rel.getFkTable().ge... | public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); ... |
targetDoc.insertString( targetDoc.getLength(), chunk1.getData().toString()+"\n", | if (chunk1.getData() instanceof SQLRelationship) { if ( objectCount > 0 ) targetDoc.insertString(targetDoc.getLength(), "\n", styles.get(chunk1.getType())); SQLRelationship rel = (SQLRelationship) chunk1 .getData(); targetDoc.insertString(targetDoc.getLength(), chunk1 .getData().toString() + "\n " + rel.getFkTable(... | public void actionPerformed(ActionEvent e) { startCompareAction.setEnabled(false); CompareDMFrame cf = null; try { SQLObject left = source.getObjectToCompare(); if (left.getChildType() == SQLTable.class) { sourceTables = left.getChildren(); } else { sourceTables = new ArrayList(); ... |
ApplicationConfigManager.checkAppNameAlreadyPresent(data.getName()); | public ApplicationConfigData addApplication(ServiceContext context, ApplicationConfigData data){ AccessController.checkAccess(context, ACLConstants.ACL_ADD_APPLICATIONS); /* do the operation */ String appId = ApplicationConfig.getNextApplicationId(... | |
getBody().run(context, output); | invokeBody(output); | 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... |
PhotoCollectionTransferHandler.setLastImportTarget( folder ); | public void drop(DropTargetDropEvent e) { hoverTimer.stop(); // Prevent hover timer from doing an unwanted expandPath or collapsePath if (!isDropAcceptable(e)) { e.rejectDrop(); return; } e.acceptDrop(e.getDropAction()); Transferable transferable = e.getTransferable(); DataFlavor[] flavors = tra... | |
System.out.println(first + " " + last + " " + numStrong); | Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 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.... | |
numStrong = 0; numRec = 0; numInGroup = 0; | Vector doSFS(){ double cutHighCI = 0.98; double cutLowCI = 0.70; double recHighCI = 0.90; int numStrong = 0; int numRec = 0; int numInGroup = 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.... | |
ODMG.initODMG( "harri", "", db ); | try { ODMG.initODMG( "harri", "", db ); } catch (PhotovaultException ex) { fail( ex.getMessage() ); } | public void testCreateDB() { File confFile = null; File dbDir = null; // Create an empty configuration file & volume directory try { confFile = File.createTempFile( "photovault_settings_", ".xml" ); confFile.delete(); dbDir = File.createTempFile( "photova... |
jPanel1 = new javax.swing.JPanel(); | splashPane = new javax.swing.JPanel(); | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) | org.jdesktop.layout.GroupLayout splashPaneLayout = new org.jdesktop.layout.GroupLayout(splashPane); splashPane.setLayout(splashPaneLayout); splashPaneLayout.setHorizontalGroup( splashPaneLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) | splashPaneLayout.setVerticalGroup( splashPaneLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(splashLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE) | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
copyrightPane.addTab("Photovault", jPanel1); | copyrightPane.addTab("Photovault", splashPane); | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
.addContainerGap(260, Short.MAX_VALUE)) | .addContainerGap(231, Short.MAX_VALUE)) | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
.addContainerGap(162, Short.MAX_VALUE)) | .addContainerGap(157, Short.MAX_VALUE)) | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
.add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 267, Short.MAX_VALUE) | .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE) | private void initComponents() { copyrightPane = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); splashLabel = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLab... |
versionLabel.setText( prop.getProperty( "build.version", "unknown" ) ); | String version = prop.getProperty( "build.version", "unknown" ); String versionTag = prop.getProperty( "build.version_tag", "unknown" ); versionLabel.setText( version + " (" + versionTag + ")" ); | void setupInfo() { URL buildPropertyURL = AboutDlg.class.getClassLoader().getResource( "buildinfo.properties"); Properties prop = new Properties(); try { InputStream is = buildPropertyURL.openStream(); prop.load( is ); } catch (IOException e ) { // Cannot... |
table1.changeColumnIndex(table1.getColumnIndex(c1), 2); | table1.changeColumnIndex(table1.getColumnIndex(c1), 2, false); | public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener ... |
table1.changeColumnIndex(table1.getColumnIndex(c1), 1); | table1.changeColumnIndex(table1.getColumnIndex(c1), 1, false); | public void testFireDbChildrenInserted() throws Exception { SQLTable table1 = db.getTableByName("REGRESSION_TEST1"); SQLColumn c1 = table1.getColumn(0); Folder folder = table1.getColumnsFolder(); TestSQLObjectListener test1 = new TestSQLObjectListener(); folder.addSQLObjectListener(test1); TestSQLObjectListener ... |
for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); | for (int i = 0; i < model.getColumnsFolder().getChildCount(); i++) { model.getColumnsFolder().getChild(i).removeSQLObjectListener(tableListModel); | protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.removeSQLObjectListener(tableListModel); } |
model.removeSQLObjectListener(tableListModel); | model.getColumnsFolder().removeSQLObjectListener(tableListModel); | protected void cleanup() { try { for (int i = 0; i < model.getChildCount(); i++) { model.getChild(i).removeSQLObjectListener(tableListModel); } } catch (ArchitectException e) { logger.error("Caught exception removing treemodel from column listener list"); } model.removeSQLObjectListener(tableListModel); } |
boolean addToPK = false; int pkSize = getPkSize(); if (getColumns().size() > 0 && pos < pkSize) { addToPK = true; normalizePrimaryKey(); for (int i = pos; i < pkSize; i++) { ((SQLColumn) getColumns().get(i)).primaryKeySeq = new Integer(i + 1); } } col.setParent(null); if (addToPK) { col.nullable = DatabaseMetaData.col... | if (isMagicEnabled()) { boolean addToPK = false; int pkSize = getPkSize(); if (getColumns().size() > 0 && pos < pkSize) { addToPK = true; normalizePrimaryKey(); for (int i = pos; i < pkSize; i++) { ((SQLColumn) getColumns().get(i)).primaryKeySeq = new Integer(i + 1); } } col.setParent(null); if (addToPK) { col.nullabl... | private void addColumnImpl(int pos, SQLColumn col) throws ArchitectException { if (getColumnIndex(col) != -1) { col.addReference(); return; } boolean addToPK = false; int pkSize = getPkSize(); if (getColumns().size() > 0 && pos < pkSize) { addToPK = true; normalizePrimaryKey(); for (int i = pos; i < pkS... |
SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx); columnsFolder.fireDbChildRemoved(oldIdx, col); columnsFolder.children.add(newIdx, col); if (putInPK) { col.primaryKeySeq = new Integer(1); } else { col.primaryKeySeq = null; } normalizePrimaryKey(); columnsFolder.fireDbChildInserted(newIdx, col); | try { startCompoundEdit("Changing column index"); SQLColumn col = (SQLColumn) columnsFolder.children.get(oldIdx); Integer oldPkSeq = col.primaryKeySeq; Integer interimPkSeq; if (putInPK) { interimPkSeq = new Integer(1); } else { interimPkSeq = null; } col.primaryKeySeq = interimPkSeq; col.fireDbObjectChanged("primaryKe... | public void changeColumnIndex(int oldIdx, int newIdx, boolean putInPK) throws ArchitectException { // remove and add the column directly, then manually fire the event. // This is necessary because the relationships prevent deletion of locked keys. SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx... |
String oldName = getName(); try { startCompoundEdit("Table Name Change"); super.setName(argName); if (primaryKeyName == null || primaryKeyName.equals("") || primaryKeyName.equals(oldName+"_pk")) { setPrimaryKeyName( getName()+"_pk"); } } finally { endCompoundEdit("Ending table name compound edit"); } | if (!isMagicEnabled()) { super.setName(argName); } else try { String oldName = getName(); startCompoundEdit("Table Name Change"); super.setName(argName); if (primaryKeyName == null || primaryKeyName.equals("") || primaryKeyName.equals(oldName+"_pk")) { setPrimaryKeyName( getName()+"_pk"); } } finally { endCompoundEdit(... | public void setName(String argName) { String oldName = getName(); try { startCompoundEdit("Table Name Change"); super.setName(argName); if (primaryKeyName == null || primaryKeyName.equals("") || primaryKeyName.equals(oldName+"_pk")) { setPrimaryKeyName( getName()+"_pk"); } } finally { endCompo... |
if (l == null) throw new NullPointerException("You can't add a null listener"); | public void addSQLObjectListener(SQLObjectListener l) { if (getSQLObjectListeners().contains(l)) { if (logger.isDebugEnabled()) { logger.debug("NOT Adding duplicate listener "+l+" to SQLObject "+this); } return; } getSQLObjectListeners().add(l); } | |
for(Enumeration enum=request.getAttributeNames(); enum.hasMoreElements();){ String attribute = (String)enum.nextElement(); | for(Enumeration en=request.getAttributeNames(); en.hasMoreElements();){ String attribute = (String)en.nextElement(); | private ActionForward handleDebugMode(HttpServletRequest request, HttpServletResponse response, ActionForward resultForward) throws IOException { if("true".equals(request.getParameter("debug.xml"))){ response.... |
return resultForward; } | private ActionForward handleDebugMode(HttpServletRequest request, HttpServletResponse response, ActionForward resultForward) throws IOException { if("true".equals(request.getParameter("debug.xml"))){ response.... | |
try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION );... | Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { int n = JOptionPane.showConfirmDialog( parentFrame, "You have selected " + selectedPhotos.size() + " photos\n" + "Are you sure that you want to\ndisplay all of them at once?", "Open multiple photos", JOptionPane.YES_NO_OPTION ); if ( ... | public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open man... |
Cursor oldCursor = c.getCursor(); c.setCursor( new Cursor( Cursor.WAIT_CURSOR ) ); Iterator iter = selectedPhotos.iterator(); while ( iter.hasNext() ) { PhotoInfo photo = (PhotoInfo) iter.next(); JFrame frame = new JFrame( "Photo" ); final JAIPhotoViewer viewer = new JAIPhotoViewer(); frame.getContentPane().add( viewer... | c.setCursor( oldCursor ); | public void actionPerformed( ActionEvent ev ) { Frame parentFrame = null; Container c = view.getTopLevelAncestor(); if ( c instanceof Frame ) { parentFrame = (Frame) c; } try { Collection selectedPhotos = view.getSelection(); if ( selectedPhotos.size() > 1 ) { // If user wants to open man... |
viewer.setPhoto( null ); } | pv.setPhoto( null ); } | public void windowClosing( WindowEvent e ) { viewer.setPhoto( null ); } |
headingJLabel.setBackground(new Color(117, 138, 155)); | headingJLabel.setBackground(new Color(117, 138, 155, 255)); | void addHeading(final String headingText) { if(null == headingJLabel) { headingJLabel = LabelFactory.create(headingText, UIConstants.DefaultFontBold); headingJLabel.setBackground(new Color(117, 138, 155)); headingJLabel.setForeground(Color.WHITE); headingJLabel.setIcon(getHeadingIcon()); headingJLabel.se... |
private Fixture(final ArtifactModel aModel, final JabberId closedBy, | private Fixture(final ContainerModel cModel, final JabberId closedBy, | private Fixture(final ArtifactModel aModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.closedBy = closedBy; th... |
this.aModel = aModel; | this.cModel = cModel; | private Fixture(final ArtifactModel aModel, final JabberId closedBy, final Calendar closedOn, final InternalContainerModel cInternalModel, final Long containerId, final Integer eTeamSize) { this.aModel = aModel; this.closedBy = closedBy; th... |
datum = new Fixture(aModel, jUnitX.getJabberId(), currentDateTime(), | datum = new Fixture(cModel, jUnitX.getJabberId(), currentDateTime(), | protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document... |
aModel.readTeam(container.getId()).size()); | cModel.readTeam(container.getId()).size()); | protected void setUp() throws Exception { super.setUp(); login(); final ContainerModel cModel = getContainerModel(); final ArtifactModel aModel = getArtifactModel(); final ModelTestUser jUnitX = ModelTestUser.getX(); final Container container = createContainer(NAME); final Document... |
Set<User> team; | List<User> team; | public void testHandleClose() { Set<User> team; try { datum.cInternalModel.handleClose(datum.containerId, datum.closedBy, datum.closedOn); } catch(final ParityException px) { fail(createFailMessage(px)); } final Container container = datum.cInternalModel.read(datum.containerId); asse... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.